
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

gboolean scroll_internal(gui_data *inst,gdouble delta,guint state,gdouble ex,gdouble ey)

{
  int iVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  double dVar5;
  int iVar6;
  Mouse_Button local_4c;
  
  show_mouseptr(inst,1);
  if (send_raw_mouse == 0) {
    dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;
    inst->cumulative_scroll = dVar5;
LAB_00052015:
    iVar1 = (int)ROUND(dVar5);
    if (iVar1 != 0) {
      term_scroll(inst->term,0,iVar1);
      inst->cumulative_scroll = inst->cumulative_scroll - (double)iVar1;
      return 1;
    }
  }
  else {
    iVar1 = inst->font_width;
    uVar2 = inst->meta_mod_mask;
    iVar3 = inst->window_border;
    iVar4 = inst->font_height;
    if ((state & 1) == 0) {
      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;
      inst->cumulative_scroll = dVar5;
    }
    else {
      iVar6 = conf_get_int(inst->conf,0x8e);
      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;
      inst->cumulative_scroll = dVar5;
      if (iVar6 != 0) goto LAB_00052015;
    }
    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);
    if (iVar6 != 0) {
      local_4c = MBT_WHEEL_DOWN;
      inst->cumulative_scroll = dVar5 - (double)(iVar6 * 5);
      if (iVar6 < 1) {
        iVar6 = -iVar6;
        local_4c = MBT_WHEEL_UP;
      }
      iVar6 = iVar6 + -1;
      do {
        iVar6 = iVar6 + -1;
        term_mouse(inst->term,local_4c,MBT_NOTHING,MA_CLICK,
                   (int)ROUND((ex - (double)iVar3) / (double)iVar1),
                   (int)ROUND((ey - (double)iVar3) / (double)iVar4),state & 1,state & 4,
                   uVar2 & state);
      } while (iVar6 != -1);
    }
  }
  return 1;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 FUN_00051e90(int param_1,double param_2,uint param_3,double param_4,double param_5)

{
  int iVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  double dVar5;
  int iVar6;
  undefined8 uVar7;
  ulonglong uVar8;
  ulonglong uVar9;
  
  FUN_00051080(param_2,param_4,param_5);
  if (DAT_000a20f8 == 0) {
    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);
    *(double *)(param_1 + 0x2248) = dVar5;
LAB_00052015:
    iVar1 = (int)ROUND(dVar5);
    if (iVar1 != 0) {
      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);
      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;
      return 1;
    }
  }
  else {
    iVar1 = *(int *)(param_1 + 0xcdc);
    uVar2 = *(uint *)(param_1 + 0x2260);
    iVar3 = *(int *)(param_1 + 0x2254);
    iVar4 = *(int *)(param_1 + 0xce0);
    if ((param_3 & 1) == 0) {
      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);
      *(double *)(param_1 + 0x2248) = dVar5;
    }
    else {
      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);
      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);
      *(double *)(param_1 + 0x2248) = dVar5;
      if (iVar6 != 0) goto LAB_00052015;
    }
    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);
    if (iVar6 != 0) {
      uVar7 = 8;
      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);
      if (iVar6 < 1) {
        iVar6 = -iVar6;
        uVar7 = 7;
      }
      iVar6 = iVar6 + -1;
      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);
      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);
      do {
        iVar6 = iVar6 + -1;
        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,
                     param_3 & 1,param_3 & 4,uVar2 & param_3);
      } while (iVar6 != -1);
    }
  }
  return 1;
}


PUSH EBP
MOV EDX,0x1
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001a360
ADD EBX,0x4f946
SUB ESP,0x3c
FLD qword ptr [ESP + 0x54]
MOV EDI,dword ptr [ESP + 0x50]
MOV EAX,EDI
FSTP qword ptr [ESP]
FLD qword ptr [ESP + 0x60]
FSTP qword ptr [ESP + 0x8]
FLD qword ptr [ESP + 0x68]
FSTP qword ptr [ESP + 0x10]
CALL 0x00051080
MOV EAX,dword ptr [EBX + 0x914]
TEST EAX,EAX
JZ 0x00052000
MOV EAX,dword ptr [EDI + 0xcdc]
MOV EBP,dword ptr [EDI + 0x2260]
MOV ESI,dword ptr [EDI + 0x2254]
MOV dword ptr [ESP + 0x1c],EAX
MOV EAX,dword ptr [EDI + 0xce0]
MOV dword ptr [ESP + 0x20],EAX
MOV EAX,dword ptr [ESP + 0x5c]
AND EAX,0x1
MOV dword ptr [ESP + 0x18],EAX
JNZ 0x00052070
FLD qword ptr [ESP]
FMUL dword ptr [EBX + 0xfffd89f8]
FADD qword ptr [EDI + 0x2248]
FST qword ptr [EDI + 0x2248]
FNSTCW word ptr [ESP + 0x2e]
FLD ST0
FDIV dword ptr [EBX + 0xfffd89f8]
MOVZX EAX,word ptr [ESP + 0x2e]
OR AH,0xc
MOV word ptr [ESP + 0x2c],AX
FLDCW word ptr [ESP + 0x2c]
FISTP dword ptr [ESP + 0x28]
FLDCW word ptr [ESP + 0x2e]
MOV EAX,dword ptr [ESP + 0x28]
TEST EAX,EAX
JZ 0x00051ff0
LEA EDX,[EAX + EAX*0x4]
MOV dword ptr [ESP],EDX
FILD dword ptr [ESP]
MOV dword ptr [ESP],0x8
FSUBP
FSTP qword ptr [EDI + 0x2248]
JLE 0x000520b0
MOV dword ptr [ESP + 0x24],ESI
FILD dword ptr [ESP + 0x24]
LEA ESI,[EAX + -0x1]
FLD qword ptr [ESP + 0x10]
MOV EAX,dword ptr [ESP + 0x5c]
AND EBP,dword ptr [ESP + 0x5c]
AND EAX,0x4
FSUB ST0,ST1
FILD dword ptr [ESP + 0x20]
FDIVP
FLDCW word ptr [ESP + 0x2c]
FISTP dword ptr [ESP + 0x10]
FLDCW word ptr [ESP + 0x2e]
FSUBR qword ptr [ESP + 0x8]
FILD dword ptr [ESP + 0x1c]
MOV dword ptr [ESP + 0x1c],EAX
FDIVP
FLDCW word ptr [ESP + 0x2c]
FISTP dword ptr [ESP + 0x8]
FLDCW word ptr [ESP + 0x2e]
LEA ESI,[ESI]
SUB ESP,0xc
SUB ESI,0x1
PUSH EBP
PUSH dword ptr [ESP + 0x2c]
PUSH dword ptr [ESP + 0x2c]
PUSH dword ptr [ESP + 0x28]
PUSH dword ptr [ESP + 0x24]
PUSH 0x1
PUSH 0x0
PUSH dword ptr [ESP + 0x28]
PUSH dword ptr [EDI + 0xd1c]
CALL 0x0003de10
ADD ESP,0x30
CMP ESI,-0x1
JNZ 0x00051fb8
JMP 0x00051ff2
FSTP ST0
ADD ESP,0x3c
MOV EAX,0x1
POP EBX
POP ESI
POP EDI
POP EBP
RET
FLD qword ptr [ESP]
FMUL dword ptr [EBX + 0xfffd89f8]
FADD qword ptr [EDI + 0x2248]
FST qword ptr [EDI + 0x2248]
FNSTCW word ptr [ESP + 0x2e]
MOVZX EAX,word ptr [ESP + 0x2e]
OR AH,0xc
MOV word ptr [ESP + 0x2c],AX
FLDCW word ptr [ESP + 0x2c]
FISTP dword ptr [ESP + 0x28]
FLDCW word ptr [ESP + 0x2e]
MOV ESI,dword ptr [ESP + 0x28]
TEST ESI,ESI
JZ 0x00051ff2
SUB ESP,0x4
PUSH ESI
PUSH 0x0
PUSH dword ptr [EDI + 0xd1c]
CALL 0x0003d9b0
MOV dword ptr [ESP + 0x28],ESI
FILD dword ptr [ESP + 0x28]
ADD ESP,0x10
FSUBR qword ptr [EDI + 0x2248]
MOV EAX,0x1
FSTP qword ptr [EDI + 0x2248]
ADD ESP,0x3c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
PUSH 0x8e
PUSH dword ptr [EDI + 0x2238]
CALL 0x0001d690
ADD ESP,0x10
FLD qword ptr [ESP]
FMUL dword ptr [EBX + 0xfffd89f8]
FADD qword ptr [EDI + 0x2248]
FST qword ptr [EDI + 0x2248]
TEST EAX,EAX
JNZ 0x00052015
JMP 0x00051f1d
NEG EAX
MOV dword ptr [ESP],0x7
JMP 0x00051f6c
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00051e90(int param_1,double param_2,uint param_3,double param_4,double param_5)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  double dVar5;\n  int iVar6;\n  undefined8 uVar7;\n  ulonglong uVar8;\n  ulonglong uVar9;\n  \n  FUN_00051080(param_2,param_4,param_5);\n  if (DAT_000a20f8 == 0) {\n    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n    *(double *)(param_1 + 0x2248) = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }\n  }\n  else {\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }\n  return 1;\n}\n\n" comment (function_definition "undefined4 FUN_00051e90(int param_1,double param_2,uint param_3,double param_4,double param_5)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  double dVar5;\n  int iVar6;\n  undefined8 uVar7;\n  ulonglong uVar8;\n  ulonglong uVar9;\n  \n  FUN_00051080(param_2,param_4,param_5);\n  if (DAT_000a20f8 == 0) {\n    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n    *(double *)(param_1 + 0x2248) = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }\n  }\n  else {\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }\n  return 1;\n}" type_identifier (function_declarator "FUN_00051e90(int param_1,double param_2,uint param_3,double param_4,double param_5)" identifier (parameter_list "(int param_1,double param_2,uint param_3,double param_4,double param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "double param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "double param_4" primitive_type identifier) , (parameter_declaration "double param_5" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  double dVar5;\n  int iVar6;\n  undefined8 uVar7;\n  ulonglong uVar8;\n  ulonglong uVar9;\n  \n  FUN_00051080(param_2,param_4,param_5);\n  if (DAT_000a20f8 == 0) {\n    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n    *(double *)(param_1 + 0x2248) = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }\n  }\n  else {\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }\n  return 1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "double dVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined8 uVar7;" type_identifier identifier ;) (declaration "ulonglong uVar8;" type_identifier identifier ;) (declaration "ulonglong uVar9;" type_identifier identifier ;) (expression_statement "FUN_00051080(param_2,param_4,param_5);" (call_expression "FUN_00051080(param_2,param_4,param_5)" identifier (argument_list "(param_2,param_4,param_5)" ( identifier , identifier , identifier ))) ;) (if_statement "if (DAT_000a20f8 == 0) {\n    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n    *(double *)(param_1 + 0x2248) = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }\n  }\n  else {\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }" if (parenthesized_expression "(DAT_000a20f8 == 0)" ( (binary_expression "DAT_000a20f8 == 0" identifier == number_literal) )) (compound_statement "{\n    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n    *(double *)(param_1 + 0x2248) = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }\n  }" { (expression_statement "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);" (assignment_expression "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" identifier = (binary_expression "param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" (binary_expression "param_2 * (double)DAT_0007a1dc" identifier * (cast_expression "(double)DAT_0007a1dc" ( (type_descriptor "double" primitive_type) ) identifier)) + (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))))) ;) (expression_statement "*(double *)(param_1 + 0x2248) = dVar5;" (assignment_expression "*(double *)(param_1 + 0x2248) = dVar5" (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))) = identifier) ;) (labeled_statement "LAB_00052015:\n    iVar1 = (int)ROUND(dVar5);" statement_identifier : (expression_statement "iVar1 = (int)ROUND(dVar5);" (assignment_expression "iVar1 = (int)ROUND(dVar5)" identifier = (cast_expression "(int)ROUND(dVar5)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND(dVar5)" identifier (argument_list "(dVar5)" ( identifier ))))) ;)) (if_statement "if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }" { (expression_statement "FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);" (call_expression "FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1)" identifier (argument_list "(*(undefined4 *)(param_1 + 0xd1c),0,iVar1)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xd1c)" * (cast_expression "(undefined4 *)(param_1 + 0xd1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd1c)" ( (binary_expression "param_1 + 0xd1c" identifier + number_literal) )))) , number_literal , identifier ))) ;) (expression_statement "*(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;" (assignment_expression "*(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1" (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))) = (binary_expression "*(double *)(param_1 + 0x2248) - (double)iVar1" (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))) - (cast_expression "(double)iVar1" ( (type_descriptor "double" primitive_type) ) identifier))) ;) (return_statement "return 1;" return number_literal ;) })) }) (else_clause "else {\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }" else (compound_statement "{\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }" { (expression_statement "iVar1 = *(int *)(param_1 + 0xcdc);" (assignment_expression "iVar1 = *(int *)(param_1 + 0xcdc)" identifier = (pointer_expression "*(int *)(param_1 + 0xcdc)" * (cast_expression "(int *)(param_1 + 0xcdc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xcdc)" ( (binary_expression "param_1 + 0xcdc" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(uint *)(param_1 + 0x2260);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x2260)" identifier = (pointer_expression "*(uint *)(param_1 + 0x2260)" * (cast_expression "(uint *)(param_1 + 0x2260)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2260)" ( (binary_expression "param_1 + 0x2260" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x2254);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x2254)" identifier = (pointer_expression "*(int *)(param_1 + 0x2254)" * (cast_expression "(int *)(param_1 + 0x2254)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2254)" ( (binary_expression "param_1 + 0x2254" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = *(int *)(param_1 + 0xce0);" (assignment_expression "iVar4 = *(int *)(param_1 + 0xce0)" identifier = (pointer_expression "*(int *)(param_1 + 0xce0)" * (cast_expression "(int *)(param_1 + 0xce0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xce0)" ( (binary_expression "param_1 + 0xce0" identifier + number_literal) ))))) ;) (if_statement "if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }" if (parenthesized_expression "((param_3 & 1) == 0)" ( (binary_expression "(param_3 & 1) == 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }" { (expression_statement "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);" (assignment_expression "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" identifier = (binary_expression "param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" (binary_expression "param_2 * (double)DAT_0007a1dc" identifier * (cast_expression "(double)DAT_0007a1dc" ( (type_descriptor "double" primitive_type) ) identifier)) + (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))))) ;) (expression_statement "*(double *)(param_1 + 0x2248) = dVar5;" (assignment_expression "*(double *)(param_1 + 0x2248) = dVar5" (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))) = identifier) ;) }) (else_clause "else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }" else (compound_statement "{\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }" { (expression_statement "iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);" (assignment_expression "iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e)" identifier = (call_expression "FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x2238),0x8e)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x2238)" * (cast_expression "(undefined4 *)(param_1 + 0x2238)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2238)" ( (binary_expression "param_1 + 0x2238" identifier + number_literal) )))) , number_literal )))) ;) (expression_statement "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);" (assignment_expression "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" identifier = (binary_expression "param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" (binary_expression "param_2 * (double)DAT_0007a1dc" identifier * (cast_expression "(double)DAT_0007a1dc" ( (type_descriptor "double" primitive_type) ) identifier)) + (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))))) ;) (expression_statement "*(double *)(param_1 + 0x2248) = dVar5;" (assignment_expression "*(double *)(param_1 + 0x2248) = dVar5" (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar6 != 0) goto LAB_00052015;" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00052015;" goto statement_identifier ;)) }))) (expression_statement "iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);" (assignment_expression "iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc)" identifier = (cast_expression "(int)ROUND(dVar5 / (double)DAT_0007a1dc)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND(dVar5 / (double)DAT_0007a1dc)" identifier (argument_list "(dVar5 / (double)DAT_0007a1dc)" ( (binary_expression "dVar5 / (double)DAT_0007a1dc" identifier / (cast_expression "(double)DAT_0007a1dc" ( (type_descriptor "double" primitive_type) ) identifier)) ))))) ;) (if_statement "if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }" { (expression_statement "uVar7 = 8;" (assignment_expression "uVar7 = 8" identifier = number_literal) ;) (expression_statement "*(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);" (assignment_expression "*(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5)" (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))) = (binary_expression "dVar5 - (double)(iVar6 * 5)" identifier - (cast_expression "(double)(iVar6 * 5)" ( (type_descriptor "double" primitive_type) ) (parenthesized_expression "(iVar6 * 5)" ( (binary_expression "iVar6 * 5" identifier * number_literal) ))))) ;) (if_statement "if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }" if (parenthesized_expression "(iVar6 < 1)" ( (binary_expression "iVar6 < 1" identifier < number_literal) )) (compound_statement "{\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }" { (expression_statement "iVar6 = -iVar6;" (assignment_expression "iVar6 = -iVar6" identifier = (unary_expression "-iVar6" - identifier)) ;) (expression_statement "uVar7 = 7;" (assignment_expression "uVar7 = 7" identifier = number_literal) ;) })) (expression_statement "iVar6 = iVar6 + -1;" (assignment_expression "iVar6 = iVar6 + -1" identifier = (binary_expression "iVar6 + -1" identifier + number_literal)) ;) (expression_statement "uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);" (assignment_expression "uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4)" identifier = (cast_expression "(ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4)" ( (type_descriptor "ulonglong" type_identifier) ) (cast_expression "(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4)" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(int)ROUND((param_5 - (double)iVar3) / (double)iVar4)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND((param_5 - (double)iVar3) / (double)iVar4)" identifier (argument_list "((param_5 - (double)iVar3) / (double)iVar4)" ( (binary_expression "(param_5 - (double)iVar3) / (double)iVar4" (parenthesized_expression "(param_5 - (double)iVar3)" ( (binary_expression "param_5 - (double)iVar3" identifier - (cast_expression "(double)iVar3" ( (type_descriptor "double" primitive_type) ) identifier)) )) / (cast_expression "(double)iVar4" ( (type_descriptor "double" primitive_type) ) identifier)) ))))))) ;) (expression_statement "uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);" (assignment_expression "uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1)" identifier = (cast_expression "(ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1)" ( (type_descriptor "ulonglong" type_identifier) ) (cast_expression "(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1)" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(int)ROUND((param_4 - (double)iVar3) / (double)iVar1)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND((param_4 - (double)iVar3) / (double)iVar1)" identifier (argument_list "((param_4 - (double)iVar3) / (double)iVar1)" ( (binary_expression "(param_4 - (double)iVar3) / (double)iVar1" (parenthesized_expression "(param_4 - (double)iVar3)" ( (binary_expression "param_4 - (double)iVar3" identifier - (cast_expression "(double)iVar3" ( (type_descriptor "double" primitive_type) ) identifier)) )) / (cast_expression "(double)iVar1" ( (type_descriptor "double" primitive_type) ) identifier)) ))))))) ;) (do_statement "do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);" do (compound_statement "{\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      }" { (expression_statement "iVar6 = iVar6 + -1;" (assignment_expression "iVar6 = iVar6 + -1" identifier = (binary_expression "iVar6 + -1" identifier + number_literal)) ;) (expression_statement "FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);" (call_expression "FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3)" identifier (argument_list "(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xd1c)" * (cast_expression "(undefined4 *)(param_1 + 0xd1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd1c)" ( (binary_expression "param_1 + 0xd1c" identifier + number_literal) )))) , (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier) , number_literal , number_literal , (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier) , (cast_expression "(int)uVar9" ( (type_descriptor "int" primitive_type) ) identifier) , (binary_expression "param_3 & 1" identifier & number_literal) , (binary_expression "param_3 & 4" identifier & number_literal) , (binary_expression "uVar2 & param_3" identifier & identifier) ))) ;) }) while (parenthesized_expression "(iVar6 != -1)" ( (binary_expression "iVar6 != -1" identifier != number_literal) )) ;) })) }))) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\ngboolean scroll_internal(gui_data *inst,gdouble delta,guint state,gdouble ex,gdouble ey)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  double dVar5;\n  int iVar6;\n  Mouse_Button local_4c;\n  \n  show_mouseptr(inst,1);\n  if (send_raw_mouse == 0) {\n    dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n    inst->cumulative_scroll = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      term_scroll(inst->term,0,iVar1);\n      inst->cumulative_scroll = inst->cumulative_scroll - (double)iVar1;\n      return 1;\n    }\n  }\n  else {\n    iVar1 = inst->font_width;\n    uVar2 = inst->meta_mod_mask;\n    iVar3 = inst->window_border;\n    iVar4 = inst->font_height;\n    if ((state & 1) == 0) {\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n    }\n    else {\n      iVar6 = conf_get_int(inst->conf,0x8e);\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      local_4c = MBT_WHEEL_DOWN;\n      inst->cumulative_scroll = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        local_4c = MBT_WHEEL_UP;\n      }\n      iVar6 = iVar6 + -1;\n      do {\n        iVar6 = iVar6 + -1;\n        term_mouse(inst->term,local_4c,MBT_NOTHING,MA_CLICK,\n                   (int)ROUND((ex - (double)iVar3) / (double)iVar1),\n                   (int)ROUND((ey - (double)iVar3) / (double)iVar4),state & 1,state & 4,\n                   uVar2 & state);\n      } while (iVar6 != -1);\n    }\n  }\n  return 1;\n}\n\n" comment comment comment (function_definition "gboolean scroll_internal(gui_data *inst,gdouble delta,guint state,gdouble ex,gdouble ey)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  double dVar5;\n  int iVar6;\n  Mouse_Button local_4c;\n  \n  show_mouseptr(inst,1);\n  if (send_raw_mouse == 0) {\n    dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n    inst->cumulative_scroll = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      term_scroll(inst->term,0,iVar1);\n      inst->cumulative_scroll = inst->cumulative_scroll - (double)iVar1;\n      return 1;\n    }\n  }\n  else {\n    iVar1 = inst->font_width;\n    uVar2 = inst->meta_mod_mask;\n    iVar3 = inst->window_border;\n    iVar4 = inst->font_height;\n    if ((state & 1) == 0) {\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n    }\n    else {\n      iVar6 = conf_get_int(inst->conf,0x8e);\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      local_4c = MBT_WHEEL_DOWN;\n      inst->cumulative_scroll = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        local_4c = MBT_WHEEL_UP;\n      }\n      iVar6 = iVar6 + -1;\n      do {\n        iVar6 = iVar6 + -1;\n        term_mouse(inst->term,local_4c,MBT_NOTHING,MA_CLICK,\n                   (int)ROUND((ex - (double)iVar3) / (double)iVar1),\n                   (int)ROUND((ey - (double)iVar3) / (double)iVar4),state & 1,state & 4,\n                   uVar2 & state);\n      } while (iVar6 != -1);\n    }\n  }\n  return 1;\n}" type_identifier (function_declarator "scroll_internal(gui_data *inst,gdouble delta,guint state,gdouble ex,gdouble ey)" identifier (parameter_list "(gui_data *inst,gdouble delta,guint state,gdouble ex,gdouble ey)" ( (parameter_declaration "gui_data *inst" type_identifier (pointer_declarator "*inst" * identifier)) , (parameter_declaration "gdouble delta" type_identifier identifier) , (parameter_declaration "guint state" type_identifier identifier) , (parameter_declaration "gdouble ex" type_identifier identifier) , (parameter_declaration "gdouble ey" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  double dVar5;\n  int iVar6;\n  Mouse_Button local_4c;\n  \n  show_mouseptr(inst,1);\n  if (send_raw_mouse == 0) {\n    dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n    inst->cumulative_scroll = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      term_scroll(inst->term,0,iVar1);\n      inst->cumulative_scroll = inst->cumulative_scroll - (double)iVar1;\n      return 1;\n    }\n  }\n  else {\n    iVar1 = inst->font_width;\n    uVar2 = inst->meta_mod_mask;\n    iVar3 = inst->window_border;\n    iVar4 = inst->font_height;\n    if ((state & 1) == 0) {\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n    }\n    else {\n      iVar6 = conf_get_int(inst->conf,0x8e);\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      local_4c = MBT_WHEEL_DOWN;\n      inst->cumulative_scroll = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        local_4c = MBT_WHEEL_UP;\n      }\n      iVar6 = iVar6 + -1;\n      do {\n        iVar6 = iVar6 + -1;\n        term_mouse(inst->term,local_4c,MBT_NOTHING,MA_CLICK,\n                   (int)ROUND((ex - (double)iVar3) / (double)iVar1),\n                   (int)ROUND((ey - (double)iVar3) / (double)iVar4),state & 1,state & 4,\n                   uVar2 & state);\n      } while (iVar6 != -1);\n    }\n  }\n  return 1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "double dVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "Mouse_Button local_4c;" type_identifier identifier ;) (expression_statement "show_mouseptr(inst,1);" (call_expression "show_mouseptr(inst,1)" identifier (argument_list "(inst,1)" ( identifier , number_literal ))) ;) (if_statement "if (send_raw_mouse == 0) {\n    dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n    inst->cumulative_scroll = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      term_scroll(inst->term,0,iVar1);\n      inst->cumulative_scroll = inst->cumulative_scroll - (double)iVar1;\n      return 1;\n    }\n  }\n  else {\n    iVar1 = inst->font_width;\n    uVar2 = inst->meta_mod_mask;\n    iVar3 = inst->window_border;\n    iVar4 = inst->font_height;\n    if ((state & 1) == 0) {\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n    }\n    else {\n      iVar6 = conf_get_int(inst->conf,0x8e);\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      local_4c = MBT_WHEEL_DOWN;\n      inst->cumulative_scroll = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        local_4c = MBT_WHEEL_UP;\n      }\n      iVar6 = iVar6 + -1;\n      do {\n        iVar6 = iVar6 + -1;\n        term_mouse(inst->term,local_4c,MBT_NOTHING,MA_CLICK,\n                   (int)ROUND((ex - (double)iVar3) / (double)iVar1),\n                   (int)ROUND((ey - (double)iVar3) / (double)iVar4),state & 1,state & 4,\n                   uVar2 & state);\n      } while (iVar6 != -1);\n    }\n  }" if (parenthesized_expression "(send_raw_mouse == 0)" ( (binary_expression "send_raw_mouse == 0" identifier == number_literal) )) (compound_statement "{\n    dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n    inst->cumulative_scroll = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      term_scroll(inst->term,0,iVar1);\n      inst->cumulative_scroll = inst->cumulative_scroll - (double)iVar1;\n      return 1;\n    }\n  }" { (expression_statement "dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;" (assignment_expression "dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll" identifier = (binary_expression "delta * (double)DAT_0007a1dc + inst->cumulative_scroll" (binary_expression "delta * (double)DAT_0007a1dc" identifier * (cast_expression "(double)DAT_0007a1dc" ( (type_descriptor "double" primitive_type) ) identifier)) + (field_expression "inst->cumulative_scroll" identifier -> field_identifier))) ;) (expression_statement "inst->cumulative_scroll = dVar5;" (assignment_expression "inst->cumulative_scroll = dVar5" (field_expression "inst->cumulative_scroll" identifier -> field_identifier) = identifier) ;) (labeled_statement "LAB_00052015:\n    iVar1 = (int)ROUND(dVar5);" statement_identifier : (expression_statement "iVar1 = (int)ROUND(dVar5);" (assignment_expression "iVar1 = (int)ROUND(dVar5)" identifier = (cast_expression "(int)ROUND(dVar5)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND(dVar5)" identifier (argument_list "(dVar5)" ( identifier ))))) ;)) (if_statement "if (iVar1 != 0) {\n      term_scroll(inst->term,0,iVar1);\n      inst->cumulative_scroll = inst->cumulative_scroll - (double)iVar1;\n      return 1;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      term_scroll(inst->term,0,iVar1);\n      inst->cumulative_scroll = inst->cumulative_scroll - (double)iVar1;\n      return 1;\n    }" { (expression_statement "term_scroll(inst->term,0,iVar1);" (call_expression "term_scroll(inst->term,0,iVar1)" identifier (argument_list "(inst->term,0,iVar1)" ( (field_expression "inst->term" identifier -> field_identifier) , number_literal , identifier ))) ;) (expression_statement "inst->cumulative_scroll = inst->cumulative_scroll - (double)iVar1;" (assignment_expression "inst->cumulative_scroll = inst->cumulative_scroll - (double)iVar1" (field_expression "inst->cumulative_scroll" identifier -> field_identifier) = (binary_expression "inst->cumulative_scroll - (double)iVar1" (field_expression "inst->cumulative_scroll" identifier -> field_identifier) - (cast_expression "(double)iVar1" ( (type_descriptor "double" primitive_type) ) identifier))) ;) (return_statement "return 1;" return number_literal ;) })) }) (else_clause "else {\n    iVar1 = inst->font_width;\n    uVar2 = inst->meta_mod_mask;\n    iVar3 = inst->window_border;\n    iVar4 = inst->font_height;\n    if ((state & 1) == 0) {\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n    }\n    else {\n      iVar6 = conf_get_int(inst->conf,0x8e);\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      local_4c = MBT_WHEEL_DOWN;\n      inst->cumulative_scroll = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        local_4c = MBT_WHEEL_UP;\n      }\n      iVar6 = iVar6 + -1;\n      do {\n        iVar6 = iVar6 + -1;\n        term_mouse(inst->term,local_4c,MBT_NOTHING,MA_CLICK,\n                   (int)ROUND((ex - (double)iVar3) / (double)iVar1),\n                   (int)ROUND((ey - (double)iVar3) / (double)iVar4),state & 1,state & 4,\n                   uVar2 & state);\n      } while (iVar6 != -1);\n    }\n  }" else (compound_statement "{\n    iVar1 = inst->font_width;\n    uVar2 = inst->meta_mod_mask;\n    iVar3 = inst->window_border;\n    iVar4 = inst->font_height;\n    if ((state & 1) == 0) {\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n    }\n    else {\n      iVar6 = conf_get_int(inst->conf,0x8e);\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      local_4c = MBT_WHEEL_DOWN;\n      inst->cumulative_scroll = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        local_4c = MBT_WHEEL_UP;\n      }\n      iVar6 = iVar6 + -1;\n      do {\n        iVar6 = iVar6 + -1;\n        term_mouse(inst->term,local_4c,MBT_NOTHING,MA_CLICK,\n                   (int)ROUND((ex - (double)iVar3) / (double)iVar1),\n                   (int)ROUND((ey - (double)iVar3) / (double)iVar4),state & 1,state & 4,\n                   uVar2 & state);\n      } while (iVar6 != -1);\n    }\n  }" { (expression_statement "iVar1 = inst->font_width;" (assignment_expression "iVar1 = inst->font_width" identifier = (field_expression "inst->font_width" identifier -> field_identifier)) ;) (expression_statement "uVar2 = inst->meta_mod_mask;" (assignment_expression "uVar2 = inst->meta_mod_mask" identifier = (field_expression "inst->meta_mod_mask" identifier -> field_identifier)) ;) (expression_statement "iVar3 = inst->window_border;" (assignment_expression "iVar3 = inst->window_border" identifier = (field_expression "inst->window_border" identifier -> field_identifier)) ;) (expression_statement "iVar4 = inst->font_height;" (assignment_expression "iVar4 = inst->font_height" identifier = (field_expression "inst->font_height" identifier -> field_identifier)) ;) (if_statement "if ((state & 1) == 0) {\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n    }\n    else {\n      iVar6 = conf_get_int(inst->conf,0x8e);\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }" if (parenthesized_expression "((state & 1) == 0)" ( (binary_expression "(state & 1) == 0" (parenthesized_expression "(state & 1)" ( (binary_expression "state & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n    }" { (expression_statement "dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;" (assignment_expression "dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll" identifier = (binary_expression "delta * (double)DAT_0007a1dc + inst->cumulative_scroll" (binary_expression "delta * (double)DAT_0007a1dc" identifier * (cast_expression "(double)DAT_0007a1dc" ( (type_descriptor "double" primitive_type) ) identifier)) + (field_expression "inst->cumulative_scroll" identifier -> field_identifier))) ;) (expression_statement "inst->cumulative_scroll = dVar5;" (assignment_expression "inst->cumulative_scroll = dVar5" (field_expression "inst->cumulative_scroll" identifier -> field_identifier) = identifier) ;) }) (else_clause "else {\n      iVar6 = conf_get_int(inst->conf,0x8e);\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }" else (compound_statement "{\n      iVar6 = conf_get_int(inst->conf,0x8e);\n      dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;\n      inst->cumulative_scroll = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }" { (expression_statement "iVar6 = conf_get_int(inst->conf,0x8e);" (assignment_expression "iVar6 = conf_get_int(inst->conf,0x8e)" identifier = (call_expression "conf_get_int(inst->conf,0x8e)" identifier (argument_list "(inst->conf,0x8e)" ( (field_expression "inst->conf" identifier -> field_identifier) , number_literal )))) ;) (expression_statement "dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll;" (assignment_expression "dVar5 = delta * (double)DAT_0007a1dc + inst->cumulative_scroll" identifier = (binary_expression "delta * (double)DAT_0007a1dc + inst->cumulative_scroll" (binary_expression "delta * (double)DAT_0007a1dc" identifier * (cast_expression "(double)DAT_0007a1dc" ( (type_descriptor "double" primitive_type) ) identifier)) + (field_expression "inst->cumulative_scroll" identifier -> field_identifier))) ;) (expression_statement "inst->cumulative_scroll = dVar5;" (assignment_expression "inst->cumulative_scroll = dVar5" (field_expression "inst->cumulative_scroll" identifier -> field_identifier) = identifier) ;) (if_statement "if (iVar6 != 0) goto LAB_00052015;" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00052015;" goto statement_identifier ;)) }))) (expression_statement "iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);" (assignment_expression "iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc)" identifier = (cast_expression "(int)ROUND(dVar5 / (double)DAT_0007a1dc)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND(dVar5 / (double)DAT_0007a1dc)" identifier (argument_list "(dVar5 / (double)DAT_0007a1dc)" ( (binary_expression "dVar5 / (double)DAT_0007a1dc" identifier / (cast_expression "(double)DAT_0007a1dc" ( (type_descriptor "double" primitive_type) ) identifier)) ))))) ;) (if_statement "if (iVar6 != 0) {\n      local_4c = MBT_WHEEL_DOWN;\n      inst->cumulative_scroll = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        local_4c = MBT_WHEEL_UP;\n      }\n      iVar6 = iVar6 + -1;\n      do {\n        iVar6 = iVar6 + -1;\n        term_mouse(inst->term,local_4c,MBT_NOTHING,MA_CLICK,\n                   (int)ROUND((ex - (double)iVar3) / (double)iVar1),\n                   (int)ROUND((ey - (double)iVar3) / (double)iVar4),state & 1,state & 4,\n                   uVar2 & state);\n      } while (iVar6 != -1);\n    }" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (compound_statement "{\n      local_4c = MBT_WHEEL_DOWN;\n      inst->cumulative_scroll = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        local_4c = MBT_WHEEL_UP;\n      }\n      iVar6 = iVar6 + -1;\n      do {\n        iVar6 = iVar6 + -1;\n        term_mouse(inst->term,local_4c,MBT_NOTHING,MA_CLICK,\n                   (int)ROUND((ex - (double)iVar3) / (double)iVar1),\n                   (int)ROUND((ey - (double)iVar3) / (double)iVar4),state & 1,state & 4,\n                   uVar2 & state);\n      } while (iVar6 != -1);\n    }" { (expression_statement "local_4c = MBT_WHEEL_DOWN;" (assignment_expression "local_4c = MBT_WHEEL_DOWN" identifier = identifier) ;) (expression_statement "inst->cumulative_scroll = dVar5 - (double)(iVar6 * 5);" (assignment_expression "inst->cumulative_scroll = dVar5 - (double)(iVar6 * 5)" (field_expression "inst->cumulative_scroll" identifier -> field_identifier) = (binary_expression "dVar5 - (double)(iVar6 * 5)" identifier - (cast_expression "(double)(iVar6 * 5)" ( (type_descriptor "double" primitive_type) ) (parenthesized_expression "(iVar6 * 5)" ( (binary_expression "iVar6 * 5" identifier * number_literal) ))))) ;) (if_statement "if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        local_4c = MBT_WHEEL_UP;\n      }" if (parenthesized_expression "(iVar6 < 1)" ( (binary_expression "iVar6 < 1" identifier < number_literal) )) (compound_statement "{\n        iVar6 = -iVar6;\n        local_4c = MBT_WHEEL_UP;\n      }" { (expression_statement "iVar6 = -iVar6;" (assignment_expression "iVar6 = -iVar6" identifier = (unary_expression "-iVar6" - identifier)) ;) (expression_statement "local_4c = MBT_WHEEL_UP;" (assignment_expression "local_4c = MBT_WHEEL_UP" identifier = identifier) ;) })) (expression_statement "iVar6 = iVar6 + -1;" (assignment_expression "iVar6 = iVar6 + -1" identifier = (binary_expression "iVar6 + -1" identifier + number_literal)) ;) (do_statement "do {\n        iVar6 = iVar6 + -1;\n        term_mouse(inst->term,local_4c,MBT_NOTHING,MA_CLICK,\n                   (int)ROUND((ex - (double)iVar3) / (double)iVar1),\n                   (int)ROUND((ey - (double)iVar3) / (double)iVar4),state & 1,state & 4,\n                   uVar2 & state);\n      } while (iVar6 != -1);" do (compound_statement "{\n        iVar6 = iVar6 + -1;\n        term_mouse(inst->term,local_4c,MBT_NOTHING,MA_CLICK,\n                   (int)ROUND((ex - (double)iVar3) / (double)iVar1),\n                   (int)ROUND((ey - (double)iVar3) / (double)iVar4),state & 1,state & 4,\n                   uVar2 & state);\n      }" { (expression_statement "iVar6 = iVar6 + -1;" (assignment_expression "iVar6 = iVar6 + -1" identifier = (binary_expression "iVar6 + -1" identifier + number_literal)) ;) (expression_statement "term_mouse(inst->term,local_4c,MBT_NOTHING,MA_CLICK,\n                   (int)ROUND((ex - (double)iVar3) / (double)iVar1),\n                   (int)ROUND((ey - (double)iVar3) / (double)iVar4),state & 1,state & 4,\n                   uVar2 & state);" (call_expression "term_mouse(inst->term,local_4c,MBT_NOTHING,MA_CLICK,\n                   (int)ROUND((ex - (double)iVar3) / (double)iVar1),\n                   (int)ROUND((ey - (double)iVar3) / (double)iVar4),state & 1,state & 4,\n                   uVar2 & state)" identifier (argument_list "(inst->term,local_4c,MBT_NOTHING,MA_CLICK,\n                   (int)ROUND((ex - (double)iVar3) / (double)iVar1),\n                   (int)ROUND((ey - (double)iVar3) / (double)iVar4),state & 1,state & 4,\n                   uVar2 & state)" ( (field_expression "inst->term" identifier -> field_identifier) , identifier , identifier , identifier , (cast_expression "(int)ROUND((ex - (double)iVar3) / (double)iVar1)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND((ex - (double)iVar3) / (double)iVar1)" identifier (argument_list "((ex - (double)iVar3) / (double)iVar1)" ( (binary_expression "(ex - (double)iVar3) / (double)iVar1" (parenthesized_expression "(ex - (double)iVar3)" ( (binary_expression "ex - (double)iVar3" identifier - (cast_expression "(double)iVar3" ( (type_descriptor "double" primitive_type) ) identifier)) )) / (cast_expression "(double)iVar1" ( (type_descriptor "double" primitive_type) ) identifier)) )))) , (cast_expression "(int)ROUND((ey - (double)iVar3) / (double)iVar4)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND((ey - (double)iVar3) / (double)iVar4)" identifier (argument_list "((ey - (double)iVar3) / (double)iVar4)" ( (binary_expression "(ey - (double)iVar3) / (double)iVar4" (parenthesized_expression "(ey - (double)iVar3)" ( (binary_expression "ey - (double)iVar3" identifier - (cast_expression "(double)iVar3" ( (type_descriptor "double" primitive_type) ) identifier)) )) / (cast_expression "(double)iVar4" ( (type_descriptor "double" primitive_type) ) identifier)) )))) , (binary_expression "state & 1" identifier & number_literal) , (binary_expression "state & 4" identifier & number_literal) , (binary_expression "uVar2 & state" identifier & identifier) ))) ;) }) while (parenthesized_expression "(iVar6 != -1)" ( (binary_expression "iVar6 != -1" identifier != number_literal) )) ;) })) }))) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "undefined4 FUN_00051e90(int param_1,double param_2,uint param_3,double param_4,double param_5)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  double dVar5;\n  int iVar6;\n  undefined8 uVar7;\n  ulonglong uVar8;\n  ulonglong uVar9;\n  \n  FUN_00051080(param_2,param_4,param_5);\n  if (DAT_000a20f8 == 0) {\n    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n    *(double *)(param_1 + 0x2248) = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }\n  }\n  else {\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }\n  return 1;\n}\n\n" (function_definition "undefined4 FUN_00051e90(int param_1,double param_2,uint param_3,double param_4,double param_5)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  double dVar5;\n  int iVar6;\n  undefined8 uVar7;\n  ulonglong uVar8;\n  ulonglong uVar9;\n  \n  FUN_00051080(param_2,param_4,param_5);\n  if (DAT_000a20f8 == 0) {\n    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n    *(double *)(param_1 + 0x2248) = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }\n  }\n  else {\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }\n  return 1;\n}" type_identifier (function_declarator "FUN_00051e90(int param_1,double param_2,uint param_3,double param_4,double param_5)" identifier (parameter_list "(int param_1,double param_2,uint param_3,double param_4,double param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "double param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "double param_4" primitive_type identifier) , (parameter_declaration "double param_5" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  double dVar5;\n  int iVar6;\n  undefined8 uVar7;\n  ulonglong uVar8;\n  ulonglong uVar9;\n  \n  FUN_00051080(param_2,param_4,param_5);\n  if (DAT_000a20f8 == 0) {\n    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n    *(double *)(param_1 + 0x2248) = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }\n  }\n  else {\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }\n  return 1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "double dVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined8 uVar7;" type_identifier identifier ;) (declaration "ulonglong uVar8;" type_identifier identifier ;) (declaration "ulonglong uVar9;" type_identifier identifier ;) (expression_statement "FUN_00051080(param_2,param_4,param_5);" (call_expression "FUN_00051080(param_2,param_4,param_5)" identifier (argument_list "(param_2,param_4,param_5)" ( identifier , identifier , identifier ))) ;) (if_statement "if (DAT_000a20f8 == 0) {\n    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n    *(double *)(param_1 + 0x2248) = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }\n  }\n  else {\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }" if (parenthesized_expression "(DAT_000a20f8 == 0)" ( (binary_expression "DAT_000a20f8 == 0" identifier == number_literal) )) (compound_statement "{\n    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n    *(double *)(param_1 + 0x2248) = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }\n  }" { (expression_statement "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);" (assignment_expression "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" identifier = (binary_expression "param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" (binary_expression "param_2 * (double)DAT_0007a1dc" identifier * (cast_expression "(double)DAT_0007a1dc" ( (type_descriptor "double" primitive_type) ) identifier)) + (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))))) ;) (expression_statement "*(double *)(param_1 + 0x2248) = dVar5;" (assignment_expression "*(double *)(param_1 + 0x2248) = dVar5" (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))) = identifier) ;) (labeled_statement "LAB_00052015:\n    iVar1 = (int)ROUND(dVar5);" statement_identifier : (expression_statement "iVar1 = (int)ROUND(dVar5);" (assignment_expression "iVar1 = (int)ROUND(dVar5)" identifier = (cast_expression "(int)ROUND(dVar5)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND(dVar5)" identifier (argument_list "(dVar5)" ( identifier ))))) ;)) (if_statement "if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }" { (expression_statement "FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);" (call_expression "FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1)" identifier (argument_list "(*(undefined4 *)(param_1 + 0xd1c),0,iVar1)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xd1c)" * (cast_expression "(undefined4 *)(param_1 + 0xd1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd1c)" ( (binary_expression "param_1 + 0xd1c" identifier + number_literal) )))) , number_literal , identifier ))) ;) (expression_statement "*(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;" (assignment_expression "*(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1" (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))) = (binary_expression "*(double *)(param_1 + 0x2248) - (double)iVar1" (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))) - (cast_expression "(double)iVar1" ( (type_descriptor "double" primitive_type) ) identifier))) ;) (return_statement "return 1;" return number_literal ;) })) }) (else_clause "else {\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }" else (compound_statement "{\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }" { (expression_statement "iVar1 = *(int *)(param_1 + 0xcdc);" (assignment_expression "iVar1 = *(int *)(param_1 + 0xcdc)" identifier = (pointer_expression "*(int *)(param_1 + 0xcdc)" * (cast_expression "(int *)(param_1 + 0xcdc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xcdc)" ( (binary_expression "param_1 + 0xcdc" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(uint *)(param_1 + 0x2260);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x2260)" identifier = (pointer_expression "*(uint *)(param_1 + 0x2260)" * (cast_expression "(uint *)(param_1 + 0x2260)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2260)" ( (binary_expression "param_1 + 0x2260" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x2254);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x2254)" identifier = (pointer_expression "*(int *)(param_1 + 0x2254)" * (cast_expression "(int *)(param_1 + 0x2254)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2254)" ( (binary_expression "param_1 + 0x2254" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = *(int *)(param_1 + 0xce0);" (assignment_expression "iVar4 = *(int *)(param_1 + 0xce0)" identifier = (pointer_expression "*(int *)(param_1 + 0xce0)" * (cast_expression "(int *)(param_1 + 0xce0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xce0)" ( (binary_expression "param_1 + 0xce0" identifier + number_literal) ))))) ;) (if_statement "if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }" if (parenthesized_expression "((param_3 & 1) == 0)" ( (binary_expression "(param_3 & 1) == 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }" { (expression_statement "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);" (assignment_expression "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" identifier = (binary_expression "param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" (binary_expression "param_2 * (double)DAT_0007a1dc" identifier * (cast_expression "(double)DAT_0007a1dc" ( (type_descriptor "double" primitive_type) ) identifier)) + (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))))) ;) (expression_statement "*(double *)(param_1 + 0x2248) = dVar5;" (assignment_expression "*(double *)(param_1 + 0x2248) = dVar5" (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))) = identifier) ;) }) (else_clause "else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }" else (compound_statement "{\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }" { (expression_statement "iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);" (assignment_expression "iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e)" identifier = (call_expression "FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x2238),0x8e)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x2238)" * (cast_expression "(undefined4 *)(param_1 + 0x2238)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2238)" ( (binary_expression "param_1 + 0x2238" identifier + number_literal) )))) , number_literal )))) ;) (expression_statement "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);" (assignment_expression "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" identifier = (binary_expression "param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" (binary_expression "param_2 * (double)DAT_0007a1dc" identifier * (cast_expression "(double)DAT_0007a1dc" ( (type_descriptor "double" primitive_type) ) identifier)) + (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))))) ;) (expression_statement "*(double *)(param_1 + 0x2248) = dVar5;" (assignment_expression "*(double *)(param_1 + 0x2248) = dVar5" (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar6 != 0) goto LAB_00052015;" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00052015;" goto statement_identifier ;)) }))) (expression_statement "iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);" (assignment_expression "iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc)" identifier = (cast_expression "(int)ROUND(dVar5 / (double)DAT_0007a1dc)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND(dVar5 / (double)DAT_0007a1dc)" identifier (argument_list "(dVar5 / (double)DAT_0007a1dc)" ( (binary_expression "dVar5 / (double)DAT_0007a1dc" identifier / (cast_expression "(double)DAT_0007a1dc" ( (type_descriptor "double" primitive_type) ) identifier)) ))))) ;) (if_statement "if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }" { (expression_statement "uVar7 = 8;" (assignment_expression "uVar7 = 8" identifier = number_literal) ;) (expression_statement "*(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);" (assignment_expression "*(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5)" (pointer_expression "*(double *)(param_1 + 0x2248)" * (cast_expression "(double *)(param_1 + 0x2248)" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2248)" ( (binary_expression "param_1 + 0x2248" identifier + number_literal) )))) = (binary_expression "dVar5 - (double)(iVar6 * 5)" identifier - (cast_expression "(double)(iVar6 * 5)" ( (type_descriptor "double" primitive_type) ) (parenthesized_expression "(iVar6 * 5)" ( (binary_expression "iVar6 * 5" identifier * number_literal) ))))) ;) (if_statement "if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }" if (parenthesized_expression "(iVar6 < 1)" ( (binary_expression "iVar6 < 1" identifier < number_literal) )) (compound_statement "{\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }" { (expression_statement "iVar6 = -iVar6;" (assignment_expression "iVar6 = -iVar6" identifier = (unary_expression "-iVar6" - identifier)) ;) (expression_statement "uVar7 = 7;" (assignment_expression "uVar7 = 7" identifier = number_literal) ;) })) (expression_statement "iVar6 = iVar6 + -1;" (assignment_expression "iVar6 = iVar6 + -1" identifier = (binary_expression "iVar6 + -1" identifier + number_literal)) ;) (expression_statement "uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);" (assignment_expression "uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4)" identifier = (cast_expression "(ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4)" ( (type_descriptor "ulonglong" type_identifier) ) (cast_expression "(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4)" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(int)ROUND((param_5 - (double)iVar3) / (double)iVar4)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND((param_5 - (double)iVar3) / (double)iVar4)" identifier (argument_list "((param_5 - (double)iVar3) / (double)iVar4)" ( (binary_expression "(param_5 - (double)iVar3) / (double)iVar4" (parenthesized_expression "(param_5 - (double)iVar3)" ( (binary_expression "param_5 - (double)iVar3" identifier - (cast_expression "(double)iVar3" ( (type_descriptor "double" primitive_type) ) identifier)) )) / (cast_expression "(double)iVar4" ( (type_descriptor "double" primitive_type) ) identifier)) ))))))) ;) (expression_statement "uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);" (assignment_expression "uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1)" identifier = (cast_expression "(ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1)" ( (type_descriptor "ulonglong" type_identifier) ) (cast_expression "(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1)" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(int)ROUND((param_4 - (double)iVar3) / (double)iVar1)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND((param_4 - (double)iVar3) / (double)iVar1)" identifier (argument_list "((param_4 - (double)iVar3) / (double)iVar1)" ( (binary_expression "(param_4 - (double)iVar3) / (double)iVar1" (parenthesized_expression "(param_4 - (double)iVar3)" ( (binary_expression "param_4 - (double)iVar3" identifier - (cast_expression "(double)iVar3" ( (type_descriptor "double" primitive_type) ) identifier)) )) / (cast_expression "(double)iVar1" ( (type_descriptor "double" primitive_type) ) identifier)) ))))))) ;) (do_statement "do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);" do (compound_statement "{\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      }" { (expression_statement "iVar6 = iVar6 + -1;" (assignment_expression "iVar6 = iVar6 + -1" identifier = (binary_expression "iVar6 + -1" identifier + number_literal)) ;) (expression_statement "FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);" (call_expression "FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3)" identifier (argument_list "(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xd1c)" * (cast_expression "(undefined4 *)(param_1 + 0xd1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd1c)" ( (binary_expression "param_1 + 0xd1c" identifier + number_literal) )))) , (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier) , number_literal , number_literal , (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier) , (cast_expression "(int)uVar9" ( (type_descriptor "int" primitive_type) ) identifier) , (binary_expression "param_3 & 1" identifier & number_literal) , (binary_expression "param_3 & 4" identifier & number_literal) , (binary_expression "uVar2 & param_3" identifier & identifier) ))) ;) }) while (parenthesized_expression "(iVar6 != -1)" ( (binary_expression "iVar6 != -1" identifier != number_literal) )) ;) })) }))) (return_statement "return 1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT * (cast_expression ( (type_descriptor TYPE) ) IDENT)) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( IDENT ))))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (return_statement return LIT ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT * (cast_expression ( (type_descriptor TYPE) ) IDENT)) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT * (cast_expression ( (type_descriptor TYPE) ) IDENT)) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( (binary_expression IDENT / (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT * LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (unary_expression - IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) / (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) / (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))))))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (cast_expression ( (type_descriptor TYPE) ) IDENT) , LIT , LIT , (cast_expression ( (type_descriptor TYPE) ) IDENT) , (cast_expression ( (type_descriptor TYPE) ) IDENT) , (binary_expression IDENT & LIT) , (binary_expression IDENT & LIT) , (binary_expression IDENT & IDENT) ))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) }))) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00051e90(int param_1,double param_2,uint param_3,double param_4,double param_5)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  double dVar5;\n  int iVar6;\n  undefined8 uVar7;\n  ulonglong uVar8;\n  ulonglong uVar9;\n  \n  FUN_00051080(param_2,param_4,param_5);\n  if (DAT_000a20f8 == 0) {\n    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n    *(double *)(param_1 + 0x2248) = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }\n  }\n  else {\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }\n  return 1;\n}" (type_identifier "undefined4") (function_declarator "FUN_00051e90(int param_1,double param_2,uint param_3,double param_4,double param_5)" (identifier "FUN_00051e90") (parameter_list "(int param_1,double param_2,uint param_3,double param_4,double param_5)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "double param_2" (primitive_type "double") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "double param_4" (primitive_type "double") (identifier "param_4")) (, ",") (parameter_declaration "double param_5" (primitive_type "double") (identifier "param_5")) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  double dVar5;\n  int iVar6;\n  undefined8 uVar7;\n  ulonglong uVar8;\n  ulonglong uVar9;\n  \n  FUN_00051080(param_2,param_4,param_5);\n  if (DAT_000a20f8 == 0) {\n    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n    *(double *)(param_1 + 0x2248) = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }\n  }\n  else {\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }\n  return 1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "double dVar5;" (primitive_type "double") (identifier "dVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "undefined8 uVar7;" (type_identifier "undefined8") (identifier "uVar7") (; ";")) (declaration "ulonglong uVar8;" (type_identifier "ulonglong") (identifier "uVar8") (; ";")) (declaration "ulonglong uVar9;" (type_identifier "ulonglong") (identifier "uVar9") (; ";")) (expression_statement "FUN_00051080(param_2,param_4,param_5);" (call_expression "FUN_00051080(param_2,param_4,param_5)" (identifier "FUN_00051080") (argument_list "(param_2,param_4,param_5)" (( "(") (identifier "param_2") (, ",") (identifier "param_4") (, ",") (identifier "param_5") () ")"))) (; ";")) (if_statement "if (DAT_000a20f8 == 0) {\n    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n    *(double *)(param_1 + 0x2248) = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }\n  }\n  else {\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }" (if "if") (parenthesized_expression "(DAT_000a20f8 == 0)" (( "(") (binary_expression "DAT_000a20f8 == 0" (identifier "DAT_000a20f8") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n    *(double *)(param_1 + 0x2248) = dVar5;\nLAB_00052015:\n    iVar1 = (int)ROUND(dVar5);\n    if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }\n  }" ({ "{") (expression_statement "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);" (assignment_expression "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" (identifier "dVar5") (= "=") (binary_expression "param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" (binary_expression "param_2 * (double)DAT_0007a1dc" (identifier "param_2") (* "*") (cast_expression "(double)DAT_0007a1dc" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "DAT_0007a1dc"))) (+ "+") (pointer_expression "*(double *)(param_1 + 0x2248)" (* "*") (cast_expression "(double *)(param_1 + 0x2248)" (( "(") (type_descriptor "double *" (primitive_type "double") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2248)" (( "(") (binary_expression "param_1 + 0x2248" (identifier "param_1") (+ "+") (number_literal "0x2248")) () ")")))))) (; ";")) (expression_statement "*(double *)(param_1 + 0x2248) = dVar5;" (assignment_expression "*(double *)(param_1 + 0x2248) = dVar5" (pointer_expression "*(double *)(param_1 + 0x2248)" (* "*") (cast_expression "(double *)(param_1 + 0x2248)" (( "(") (type_descriptor "double *" (primitive_type "double") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2248)" (( "(") (binary_expression "param_1 + 0x2248" (identifier "param_1") (+ "+") (number_literal "0x2248")) () ")")))) (= "=") (identifier "dVar5")) (; ";")) (labeled_statement "LAB_00052015:\n    iVar1 = (int)ROUND(dVar5);" (statement_identifier "LAB_00052015") (: ":") (expression_statement "iVar1 = (int)ROUND(dVar5);" (assignment_expression "iVar1 = (int)ROUND(dVar5)" (identifier "iVar1") (= "=") (cast_expression "(int)ROUND(dVar5)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (call_expression "ROUND(dVar5)" (identifier "ROUND") (argument_list "(dVar5)" (( "(") (identifier "dVar5") () ")"))))) (; ";"))) (if_statement "if (iVar1 != 0) {\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);\n      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;\n      return 1;\n    }" ({ "{") (expression_statement "FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);" (call_expression "FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1)" (identifier "FUN_0003d9b0") (argument_list "(*(undefined4 *)(param_1 + 0xd1c),0,iVar1)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0xd1c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xd1c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd1c)" (( "(") (binary_expression "param_1 + 0xd1c" (identifier "param_1") (+ "+") (number_literal "0xd1c")) () ")")))) (, ",") (number_literal "0") (, ",") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "*(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;" (assignment_expression "*(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1" (pointer_expression "*(double *)(param_1 + 0x2248)" (* "*") (cast_expression "(double *)(param_1 + 0x2248)" (( "(") (type_descriptor "double *" (primitive_type "double") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2248)" (( "(") (binary_expression "param_1 + 0x2248" (identifier "param_1") (+ "+") (number_literal "0x2248")) () ")")))) (= "=") (binary_expression "*(double *)(param_1 + 0x2248) - (double)iVar1" (pointer_expression "*(double *)(param_1 + 0x2248)" (* "*") (cast_expression "(double *)(param_1 + 0x2248)" (( "(") (type_descriptor "double *" (primitive_type "double") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2248)" (( "(") (binary_expression "param_1 + 0x2248" (identifier "param_1") (+ "+") (number_literal "0x2248")) () ")")))) (- "-") (cast_expression "(double)iVar1" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "iVar1")))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }" (else "else") (compound_statement "{\n    iVar1 = *(int *)(param_1 + 0xcdc);\n    uVar2 = *(uint *)(param_1 + 0x2260);\n    iVar3 = *(int *)(param_1 + 0x2254);\n    iVar4 = *(int *)(param_1 + 0xce0);\n    if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }\n    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);\n    if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }\n  }" ({ "{") (expression_statement "iVar1 = *(int *)(param_1 + 0xcdc);" (assignment_expression "iVar1 = *(int *)(param_1 + 0xcdc)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 0xcdc)" (* "*") (cast_expression "(int *)(param_1 + 0xcdc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xcdc)" (( "(") (binary_expression "param_1 + 0xcdc" (identifier "param_1") (+ "+") (number_literal "0xcdc")) () ")"))))) (; ";")) (expression_statement "uVar2 = *(uint *)(param_1 + 0x2260);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x2260)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(param_1 + 0x2260)" (* "*") (cast_expression "(uint *)(param_1 + 0x2260)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2260)" (( "(") (binary_expression "param_1 + 0x2260" (identifier "param_1") (+ "+") (number_literal "0x2260")) () ")"))))) (; ";")) (expression_statement "iVar3 = *(int *)(param_1 + 0x2254);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x2254)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x2254)" (* "*") (cast_expression "(int *)(param_1 + 0x2254)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2254)" (( "(") (binary_expression "param_1 + 0x2254" (identifier "param_1") (+ "+") (number_literal "0x2254")) () ")"))))) (; ";")) (expression_statement "iVar4 = *(int *)(param_1 + 0xce0);" (assignment_expression "iVar4 = *(int *)(param_1 + 0xce0)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(param_1 + 0xce0)" (* "*") (cast_expression "(int *)(param_1 + 0xce0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xce0)" (( "(") (binary_expression "param_1 + 0xce0" (identifier "param_1") (+ "+") (number_literal "0xce0")) () ")"))))) (; ";")) (if_statement "if ((param_3 & 1) == 0) {\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }\n    else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }" (if "if") (parenthesized_expression "((param_3 & 1) == 0)" (( "(") (binary_expression "(param_3 & 1) == 0" (parenthesized_expression "(param_3 & 1)" (( "(") (binary_expression "param_3 & 1" (identifier "param_3") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n    }" ({ "{") (expression_statement "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);" (assignment_expression "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" (identifier "dVar5") (= "=") (binary_expression "param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" (binary_expression "param_2 * (double)DAT_0007a1dc" (identifier "param_2") (* "*") (cast_expression "(double)DAT_0007a1dc" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "DAT_0007a1dc"))) (+ "+") (pointer_expression "*(double *)(param_1 + 0x2248)" (* "*") (cast_expression "(double *)(param_1 + 0x2248)" (( "(") (type_descriptor "double *" (primitive_type "double") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2248)" (( "(") (binary_expression "param_1 + 0x2248" (identifier "param_1") (+ "+") (number_literal "0x2248")) () ")")))))) (; ";")) (expression_statement "*(double *)(param_1 + 0x2248) = dVar5;" (assignment_expression "*(double *)(param_1 + 0x2248) = dVar5" (pointer_expression "*(double *)(param_1 + 0x2248)" (* "*") (cast_expression "(double *)(param_1 + 0x2248)" (( "(") (type_descriptor "double *" (primitive_type "double") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2248)" (( "(") (binary_expression "param_1 + 0x2248" (identifier "param_1") (+ "+") (number_literal "0x2248")) () ")")))) (= "=") (identifier "dVar5")) (; ";")) (} "}")) (else_clause "else {\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }" (else "else") (compound_statement "{\n      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);\n      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);\n      *(double *)(param_1 + 0x2248) = dVar5;\n      if (iVar6 != 0) goto LAB_00052015;\n    }" ({ "{") (expression_statement "iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);" (assignment_expression "iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e)" (identifier "iVar6") (= "=") (call_expression "FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e)" (identifier "FUN_0001d690") (argument_list "(*(undefined4 *)(param_1 + 0x2238),0x8e)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x2238)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x2238)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2238)" (( "(") (binary_expression "param_1 + 0x2238" (identifier "param_1") (+ "+") (number_literal "0x2238")) () ")")))) (, ",") (number_literal "0x8e") () ")")))) (; ";")) (expression_statement "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);" (assignment_expression "dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" (identifier "dVar5") (= "=") (binary_expression "param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248)" (binary_expression "param_2 * (double)DAT_0007a1dc" (identifier "param_2") (* "*") (cast_expression "(double)DAT_0007a1dc" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "DAT_0007a1dc"))) (+ "+") (pointer_expression "*(double *)(param_1 + 0x2248)" (* "*") (cast_expression "(double *)(param_1 + 0x2248)" (( "(") (type_descriptor "double *" (primitive_type "double") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2248)" (( "(") (binary_expression "param_1 + 0x2248" (identifier "param_1") (+ "+") (number_literal "0x2248")) () ")")))))) (; ";")) (expression_statement "*(double *)(param_1 + 0x2248) = dVar5;" (assignment_expression "*(double *)(param_1 + 0x2248) = dVar5" (pointer_expression "*(double *)(param_1 + 0x2248)" (* "*") (cast_expression "(double *)(param_1 + 0x2248)" (( "(") (type_descriptor "double *" (primitive_type "double") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2248)" (( "(") (binary_expression "param_1 + 0x2248" (identifier "param_1") (+ "+") (number_literal "0x2248")) () ")")))) (= "=") (identifier "dVar5")) (; ";")) (if_statement "if (iVar6 != 0) goto LAB_00052015;" (if "if") (parenthesized_expression "(iVar6 != 0)" (( "(") (binary_expression "iVar6 != 0" (identifier "iVar6") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00052015;" (goto "goto") (statement_identifier "LAB_00052015") (; ";"))) (} "}")))) (expression_statement "iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);" (assignment_expression "iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc)" (identifier "iVar6") (= "=") (cast_expression "(int)ROUND(dVar5 / (double)DAT_0007a1dc)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (call_expression "ROUND(dVar5 / (double)DAT_0007a1dc)" (identifier "ROUND") (argument_list "(dVar5 / (double)DAT_0007a1dc)" (( "(") (binary_expression "dVar5 / (double)DAT_0007a1dc" (identifier "dVar5") (/ "/") (cast_expression "(double)DAT_0007a1dc" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "DAT_0007a1dc"))) () ")"))))) (; ";")) (if_statement "if (iVar6 != 0) {\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }" (if "if") (parenthesized_expression "(iVar6 != 0)" (( "(") (binary_expression "iVar6 != 0" (identifier "iVar6") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar7 = 8;\n      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);\n      if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }\n      iVar6 = iVar6 + -1;\n      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);\n      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);\n      do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);\n    }" ({ "{") (expression_statement "uVar7 = 8;" (assignment_expression "uVar7 = 8" (identifier "uVar7") (= "=") (number_literal "8")) (; ";")) (expression_statement "*(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);" (assignment_expression "*(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5)" (pointer_expression "*(double *)(param_1 + 0x2248)" (* "*") (cast_expression "(double *)(param_1 + 0x2248)" (( "(") (type_descriptor "double *" (primitive_type "double") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2248)" (( "(") (binary_expression "param_1 + 0x2248" (identifier "param_1") (+ "+") (number_literal "0x2248")) () ")")))) (= "=") (binary_expression "dVar5 - (double)(iVar6 * 5)" (identifier "dVar5") (- "-") (cast_expression "(double)(iVar6 * 5)" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (parenthesized_expression "(iVar6 * 5)" (( "(") (binary_expression "iVar6 * 5" (identifier "iVar6") (* "*") (number_literal "5")) () ")"))))) (; ";")) (if_statement "if (iVar6 < 1) {\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }" (if "if") (parenthesized_expression "(iVar6 < 1)" (( "(") (binary_expression "iVar6 < 1" (identifier "iVar6") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n        iVar6 = -iVar6;\n        uVar7 = 7;\n      }" ({ "{") (expression_statement "iVar6 = -iVar6;" (assignment_expression "iVar6 = -iVar6" (identifier "iVar6") (= "=") (unary_expression "-iVar6" (- "-") (identifier "iVar6"))) (; ";")) (expression_statement "uVar7 = 7;" (assignment_expression "uVar7 = 7" (identifier "uVar7") (= "=") (number_literal "7")) (; ";")) (} "}"))) (expression_statement "iVar6 = iVar6 + -1;" (assignment_expression "iVar6 = iVar6 + -1" (identifier "iVar6") (= "=") (binary_expression "iVar6 + -1" (identifier "iVar6") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);" (assignment_expression "uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4)" (identifier "uVar9") (= "=") (cast_expression "(ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4)" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (cast_expression "(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4)" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (cast_expression "(int)ROUND((param_5 - (double)iVar3) / (double)iVar4)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (call_expression "ROUND((param_5 - (double)iVar3) / (double)iVar4)" (identifier "ROUND") (argument_list "((param_5 - (double)iVar3) / (double)iVar4)" (( "(") (binary_expression "(param_5 - (double)iVar3) / (double)iVar4" (parenthesized_expression "(param_5 - (double)iVar3)" (( "(") (binary_expression "param_5 - (double)iVar3" (identifier "param_5") (- "-") (cast_expression "(double)iVar3" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "iVar3"))) () ")")) (/ "/") (cast_expression "(double)iVar4" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "iVar4"))) () ")"))))))) (; ";")) (expression_statement "uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);" (assignment_expression "uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1)" (identifier "uVar8") (= "=") (cast_expression "(ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1)" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (cast_expression "(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1)" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (cast_expression "(int)ROUND((param_4 - (double)iVar3) / (double)iVar1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (call_expression "ROUND((param_4 - (double)iVar3) / (double)iVar1)" (identifier "ROUND") (argument_list "((param_4 - (double)iVar3) / (double)iVar1)" (( "(") (binary_expression "(param_4 - (double)iVar3) / (double)iVar1" (parenthesized_expression "(param_4 - (double)iVar3)" (( "(") (binary_expression "param_4 - (double)iVar3" (identifier "param_4") (- "-") (cast_expression "(double)iVar3" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "iVar3"))) () ")")) (/ "/") (cast_expression "(double)iVar1" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "iVar1"))) () ")"))))))) (; ";")) (do_statement "do {\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      } while (iVar6 != -1);" (do "do") (compound_statement "{\n        iVar6 = iVar6 + -1;\n        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);\n      }" ({ "{") (expression_statement "iVar6 = iVar6 + -1;" (assignment_expression "iVar6 = iVar6 + -1" (identifier "iVar6") (= "=") (binary_expression "iVar6 + -1" (identifier "iVar6") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3);" (call_expression "FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3)" (identifier "FUN_0003de10") (argument_list "(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,\n                     param_3 & 1,param_3 & 4,uVar2 & param_3)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0xd1c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xd1c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd1c)" (( "(") (binary_expression "param_1 + 0xd1c" (identifier "param_1") (+ "+") (number_literal "0xd1c")) () ")")))) (, ",") (cast_expression "(int)uVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar7")) (, ",") (number_literal "0") (, ",") (number_literal "1") (, ",") (cast_expression "(int)uVar8" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar8")) (, ",") (cast_expression "(int)uVar9" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar9")) (, ",") (binary_expression "param_3 & 1" (identifier "param_3") (& "&") (number_literal "1")) (, ",") (binary_expression "param_3 & 4" (identifier "param_3") (& "&") (number_literal "4")) (, ",") (binary_expression "uVar2 & param_3" (identifier "uVar2") (& "&") (identifier "param_3")) () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar6 != -1)" (( "(") (binary_expression "iVar6 != -1" (identifier "iVar6") (!= "!=") (number_literal "-1")) () ")")) (; ";")) (} "}"))) (} "}")))) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

type_1 function_1(type_2 *inst,type_3 var_3,type_4 var_7,type_3 var_12,type_3 var_13)

{
  int var_5;
  type_5 var_14;
  int iVar3;
  int iVar4;
  double var_10;
  int var_9;
  type_6 local_4c;
  
  var_1(inst,1);
  if (var_2 == 0) {
    var_10 = var_3 * (double)DAT_0007a1dc + inst->cumulative_scroll;
    inst->cumulative_scroll = var_10;
LAB_00052015:
    var_5 = (int)var_4(var_10);
    if (var_5 != 0) {
      var_6(inst->term,0,var_5);
      inst->cumulative_scroll = inst->cumulative_scroll - (double)var_5;
      return 1;
    }
  }
  else {
    var_5 = inst->font_width;
    var_14 = inst->meta_mod_mask;
    iVar3 = inst->window_border;
    iVar4 = inst->font_height;
    if ((var_7 & 1) == 0) {
      var_10 = var_3 * (double)DAT_0007a1dc + inst->cumulative_scroll;
      inst->cumulative_scroll = var_10;
    }
    else {
      var_9 = var_8(inst->conf,0x8e);
      var_10 = var_3 * (double)DAT_0007a1dc + inst->cumulative_scroll;
      inst->cumulative_scroll = var_10;
      if (var_9 != 0) goto LAB_00052015;
    }
    var_9 = (int)var_4(var_10 / (double)DAT_0007a1dc);
    if (var_9 != 0) {
      local_4c = MBT_WHEEL_DOWN;
      inst->cumulative_scroll = var_10 - (double)(var_9 * 5);
      if (var_9 < 1) {
        var_9 = -var_9;
        local_4c = MBT_WHEEL_UP;
      }
      var_9 = var_9 + -1;
      do {
        var_9 = var_9 + -1;
        var_11(inst->term,local_4c,MBT_NOTHING,MA_CLICK,
                   (int)var_4((var_12 - (double)iVar3) / (double)var_5),
                   (int)var_4((var_13 - (double)iVar3) / (double)iVar4),var_7 & 1,var_7 & 4,
                   var_14 & var_7);
      } while (var_9 != -1);
    }
  }
  return 1;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (call_expression function: (identifier) arguments: (argument_list (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (number_literal) (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (return_statement (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (unary_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (cast_expression type: (type_descriptor type: (type_identifier)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (cast_expression type: (type_descriptor type: (type_identifier)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) (number_literal) (number_literal) (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (identifier) right: (identifier)))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) (return_statement (number_literal)))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 MASKED(int param_1,double param_2,uint param_3,double param_4,double param_5)

{
  int iVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  double dVar5;
  int iVar6;
  undefined8 uVar7;
  ulonglong uVar8;
  ulonglong uVar9;
  
  FUN_00051080(param_2,param_4,param_5);
  if (DAT_000a20f8 == 0) {
    dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);
    *(double *)(param_1 + 0x2248) = dVar5;
LAB_00052015:
    iVar1 = (int)ROUND(dVar5);
    if (iVar1 != 0) {
      FUN_0003d9b0(*(undefined4 *)(param_1 + 0xd1c),0,iVar1);
      *(double *)(param_1 + 0x2248) = *(double *)(param_1 + 0x2248) - (double)iVar1;
      return 1;
    }
  }
  else {
    iVar1 = *(int *)(param_1 + 0xcdc);
    uVar2 = *(uint *)(param_1 + 0x2260);
    iVar3 = *(int *)(param_1 + 0x2254);
    iVar4 = *(int *)(param_1 + 0xce0);
    if ((param_3 & 1) == 0) {
      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);
      *(double *)(param_1 + 0x2248) = dVar5;
    }
    else {
      iVar6 = FUN_0001d690(*(undefined4 *)(param_1 + 0x2238),0x8e);
      dVar5 = param_2 * (double)DAT_0007a1dc + *(double *)(param_1 + 0x2248);
      *(double *)(param_1 + 0x2248) = dVar5;
      if (iVar6 != 0) goto LAB_00052015;
    }
    iVar6 = (int)ROUND(dVar5 / (double)DAT_0007a1dc);
    if (iVar6 != 0) {
      uVar7 = 8;
      *(double *)(param_1 + 0x2248) = dVar5 - (double)(iVar6 * 5);
      if (iVar6 < 1) {
        iVar6 = -iVar6;
        uVar7 = 7;
      }
      iVar6 = iVar6 + -1;
      uVar9 = (ulonglong)(uint)(int)ROUND((param_5 - (double)iVar3) / (double)iVar4);
      uVar8 = (ulonglong)(uint)(int)ROUND((param_4 - (double)iVar3) / (double)iVar1);
      do {
        iVar6 = iVar6 + -1;
        FUN_0003de10(*(undefined4 *)(param_1 + 0xd1c),(int)uVar7,0,1,(int)uVar8,(int)uVar9,
                     param_3 & 1,param_3 & 4,uVar2 & param_3);
      } while (iVar6 != -1);
    }
  }
  return 1;
}

