
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int dtoastr(char *buf,size_t bufsize,int flags,int width,double x)

{
  int iVar1;
  char *pcVar2;
  int iVar3;
  uint uVar4;
  int in_GS_OFFSET;
  double dVar5;
  char format [11];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  format[0] = '%';
  format[1] = '-';
  dVar5 = -x;
  if (0.0 <= x) {
    dVar5 = x;
  }
  pcVar2 = format + (flags & 1U) + 1;
  *pcVar2 = '+';
  pcVar2 = pcVar2 + ((uint)flags >> 1 & 1);
  *pcVar2 = ' ';
  pcVar2[(uint)flags >> 2 & 1] = '0';
  pcVar2 = pcVar2 + ((uint)flags >> 2 & 1) + ((uint)flags >> 3 & 1);
  pcVar2[0] = '*';
  pcVar2[1] = '.';
  pcVar2[2] = '*';
  pcVar2[4] = '\0';
  pcVar2[3] = (-((flags & 0x10U) == 0) & 0x20U) + 0x47;
  iVar3 = 0xf;
  if (dVar5 < DAT_0001faa0) {
    iVar3 = 1;
  }
  while( true ) {
    uVar4 = __snprintf_chk(buf,bufsize,1,0xffffffff,format,width,iVar3,x);
    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;
    if (uVar4 < bufsize) {
      dVar5 = strtod(buf,(char **)0x0);
      if (dVar5 == x) break;
    }
    iVar3 = iVar3 + 1;
  }
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return uVar4;
}



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

uint FUN_00015a00(char *param_1,uint param_2,uint param_3,undefined4 param_4,double param_5)

{
  undefined1 *puVar1;
  undefined2 *puVar2;
  int iVar3;
  uint uVar4;
  int in_GS_OFFSET;
  double dVar5;
  undefined4 local_44;
  undefined4 uStack_40;
  undefined1 local_2b [3];
  undefined2 uStack_28;
  undefined2 auStack_26 [3];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x15a09;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_2b._0_2_ = 0x2d25;
  dVar5 = -param_5;
  if (0.0 <= param_5) {
    dVar5 = param_5;
  }
  puVar1 = local_2b + (param_3 & 1) + 1;
  *puVar1 = 0x2b;
  puVar1 = puVar1 + (param_3 >> 1 & 1);
  *puVar1 = 0x20;
  puVar1[param_3 >> 2 & 1] = 0x30;
  puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1));
  *puVar2 = 0x2e2a;
  *(undefined1 *)(puVar2 + 1) = 0x2a;
  *(undefined1 *)(puVar2 + 2) = 0;
  *(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47;
  iVar3 = 0xf;
  if (dVar5 < DAT_0001faa0) {
    iVar3 = 1;
  }
  while( true ) {
    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);
    local_44 = SUB84(param_5,0);
    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);
    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;
    if (uVar4 < param_2) {
      dVar5 = strtod(param_1,(char **)0x0);
      if (dVar5 == param_5) break;
    }
    iVar3 = iVar3 + 1;
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0001d370();
  }
  return uVar4;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000127f0
ADD EBX,0x105f7
SUB ESP,0x3c
FLD qword ptr [ESP + 0x60]
MOV ECX,dword ptr [ESP + 0x58]
MOV EDI,dword ptr [ESP + 0x50]
MOV ESI,dword ptr [ESP + 0x54]
MOV EDX,ECX
FST qword ptr [ESP + 0x8]
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x2c],EAX
XOR EAX,EAX
FLD ST0
MOV EAX,0x2d25
FCHS
MOV word ptr [ESP + 0x21],AX
MOV EAX,ECX
FLDZ
FCOMIP ST0,ST2
FCMOVBE ST0,ST1
FSTP ST1
AND EAX,0x1
SHR EDX,0x1
FLD qword ptr [EBX + 0xffff9aa0]
LEA EAX,[ESP + EAX*0x1 + 0x22]
AND EDX,0x1
MOV byte ptr [EAX],0x2b
LEA EBP,[EAX + EDX*0x1]
MOV EAX,ECX
SHR EAX,0x2
MOV byte ptr [EBP],0x20
AND EAX,0x1
FST qword ptr [ESP + 0x10]
LEA EDX,[EBP + EAX*0x1]
MOV EAX,ECX
AND ECX,0x10
SHR EAX,0x3
MOV byte ptr [EDX],0x30
AND EAX,0x1
ADD EAX,EDX
CMP ECX,0x1
MOV EDX,0x2e2a
MOV word ptr [EAX],DX
SBB EDX,EDX
AND EDX,0x20
MOV byte ptr [EAX + 0x2],0x2a
ADD EDX,0x47
MOV byte ptr [EAX + 0x4],0x0
FCOMIP ST0,ST1
FSTP ST0
MOV byte ptr [EAX + 0x3],DL
MOV EDX,0x1
MOV EAX,0xf
CMOVA EAX,EDX
MOV EBP,EAX
LEA EAX,[ESP + 0x21]
MOV dword ptr [ESP + 0x10],EAX
JMP 0x00015acb
ADD EBP,0x1
SUB ESP,0xc
PUSH dword ptr [ESP + 0x18]
PUSH dword ptr [ESP + 0x18]
PUSH EBP
PUSH dword ptr [ESP + 0x74]
PUSH dword ptr [ESP + 0x2c]
PUSH -0x1
PUSH 0x1
PUSH ESI
PUSH EDI
CALL 0x00011040
ADD ESP,0x30
TEST EAX,EAX
JS 0x00015b1e
CMP EBP,0x10
JG 0x00015b1e
CMP EAX,ESI
JNC 0x00015ac8
MOV dword ptr [ESP + 0x1c],EAX
SUB ESP,0x8
PUSH 0x0
PUSH EDI
CALL 0x000112d0
ADD ESP,0x10
FLD qword ptr [ESP + 0x8]
FXCH
MOV EAX,dword ptr [ESP + 0x1c]
FUCOMIP ST0,ST1
FSTP ST0
JP 0x00015ac8
JNZ 0x00015ac8
MOV ECX,dword ptr [ESP + 0x2c]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x00015b33
ADD ESP,0x3c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x0001d370
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint FUN_00015a00(char *param_1,uint param_2,uint param_3,undefined4 param_4,double param_5)\n\n{\n  undefined1 *puVar1;\n  undefined2 *puVar2;\n  int iVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  double dVar5;\n  undefined4 local_44;\n  undefined4 uStack_40;\n  undefined1 local_2b [3];\n  undefined2 uStack_28;\n  undefined2 auStack_26 [3];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x15a09;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_2b._0_2_ = 0x2d25;\n  dVar5 = -param_5;\n  if (0.0 <= param_5) {\n    dVar5 = param_5;\n  }\n  puVar1 = local_2b + (param_3 & 1) + 1;\n  *puVar1 = 0x2b;\n  puVar1 = puVar1 + (param_3 >> 1 & 1);\n  *puVar1 = 0x20;\n  puVar1[param_3 >> 2 & 1] = 0x30;\n  puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1));\n  *puVar2 = 0x2e2a;\n  *(undefined1 *)(puVar2 + 1) = 0x2a;\n  *(undefined1 *)(puVar2 + 2) = 0;\n  *(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47;\n  iVar3 = 0xf;\n  if (dVar5 < DAT_0001faa0) {\n    iVar3 = 1;\n  }\n  while( true ) {\n    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);\n    local_44 = SUB84(param_5,0);\n    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }\n    iVar3 = iVar3 + 1;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0001d370();\n  }\n  return uVar4;\n}\n\n" comment (function_definition "uint FUN_00015a00(char *param_1,uint param_2,uint param_3,undefined4 param_4,double param_5)\n\n{\n  undefined1 *puVar1;\n  undefined2 *puVar2;\n  int iVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  double dVar5;\n  undefined4 local_44;\n  undefined4 uStack_40;\n  undefined1 local_2b [3];\n  undefined2 uStack_28;\n  undefined2 auStack_26 [3];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x15a09;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_2b._0_2_ = 0x2d25;\n  dVar5 = -param_5;\n  if (0.0 <= param_5) {\n    dVar5 = param_5;\n  }\n  puVar1 = local_2b + (param_3 & 1) + 1;\n  *puVar1 = 0x2b;\n  puVar1 = puVar1 + (param_3 >> 1 & 1);\n  *puVar1 = 0x20;\n  puVar1[param_3 >> 2 & 1] = 0x30;\n  puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1));\n  *puVar2 = 0x2e2a;\n  *(undefined1 *)(puVar2 + 1) = 0x2a;\n  *(undefined1 *)(puVar2 + 2) = 0;\n  *(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47;\n  iVar3 = 0xf;\n  if (dVar5 < DAT_0001faa0) {\n    iVar3 = 1;\n  }\n  while( true ) {\n    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);\n    local_44 = SUB84(param_5,0);\n    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }\n    iVar3 = iVar3 + 1;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0001d370();\n  }\n  return uVar4;\n}" type_identifier (function_declarator "FUN_00015a00(char *param_1,uint param_2,uint param_3,undefined4 param_4,double param_5)" identifier (parameter_list "(char *param_1,uint param_2,uint param_3,undefined4 param_4,double param_5)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "double param_5" primitive_type identifier) ))) (compound_statement "{\n  undefined1 *puVar1;\n  undefined2 *puVar2;\n  int iVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  double dVar5;\n  undefined4 local_44;\n  undefined4 uStack_40;\n  undefined1 local_2b [3];\n  undefined2 uStack_28;\n  undefined2 auStack_26 [3];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x15a09;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_2b._0_2_ = 0x2d25;\n  dVar5 = -param_5;\n  if (0.0 <= param_5) {\n    dVar5 = param_5;\n  }\n  puVar1 = local_2b + (param_3 & 1) + 1;\n  *puVar1 = 0x2b;\n  puVar1 = puVar1 + (param_3 >> 1 & 1);\n  *puVar1 = 0x20;\n  puVar1[param_3 >> 2 & 1] = 0x30;\n  puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1));\n  *puVar2 = 0x2e2a;\n  *(undefined1 *)(puVar2 + 1) = 0x2a;\n  *(undefined1 *)(puVar2 + 2) = 0;\n  *(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47;\n  iVar3 = 0xf;\n  if (dVar5 < DAT_0001faa0) {\n    iVar3 = 1;\n  }\n  while( true ) {\n    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);\n    local_44 = SUB84(param_5,0);\n    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }\n    iVar3 = iVar3 + 1;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0001d370();\n  }\n  return uVar4;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined2 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "double dVar5;" primitive_type identifier ;) (declaration "undefined4 local_44;" type_identifier identifier ;) (declaration "undefined4 uStack_40;" type_identifier identifier ;) (declaration "undefined1 local_2b [3];" type_identifier (array_declarator "local_2b [3]" identifier [ number_literal ]) ;) (declaration "undefined2 uStack_28;" type_identifier identifier ;) (declaration "undefined2 auStack_26 [3];" type_identifier (array_declarator "auStack_26 [3]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x15a09;" (assignment_expression "uStack_14 = 0x15a09" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_2b._0_2_ = 0x2d25;" (assignment_expression "local_2b._0_2_ = 0x2d25" (field_expression "local_2b._0_2_" identifier . field_identifier) = number_literal) ;) (expression_statement "dVar5 = -param_5;" (assignment_expression "dVar5 = -param_5" identifier = (unary_expression "-param_5" - identifier)) ;) (if_statement "if (0.0 <= param_5) {\n    dVar5 = param_5;\n  }" if (parenthesized_expression "(0.0 <= param_5)" ( (binary_expression "0.0 <= param_5" number_literal <= identifier) )) (compound_statement "{\n    dVar5 = param_5;\n  }" { (expression_statement "dVar5 = param_5;" (assignment_expression "dVar5 = param_5" identifier = identifier) ;) })) (expression_statement "puVar1 = local_2b + (param_3 & 1) + 1;" (assignment_expression "puVar1 = local_2b + (param_3 & 1) + 1" identifier = (binary_expression "local_2b + (param_3 & 1) + 1" (binary_expression "local_2b + (param_3 & 1)" identifier + (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) ))) + number_literal)) ;) (expression_statement "*puVar1 = 0x2b;" (assignment_expression "*puVar1 = 0x2b" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar1 = puVar1 + (param_3 >> 1 & 1);" (assignment_expression "puVar1 = puVar1 + (param_3 >> 1 & 1)" identifier = (binary_expression "puVar1 + (param_3 >> 1 & 1)" identifier + (parenthesized_expression "(param_3 >> 1 & 1)" ( (binary_expression "param_3 >> 1 & 1" (binary_expression "param_3 >> 1" identifier >> number_literal) & number_literal) )))) ;) (expression_statement "*puVar1 = 0x20;" (assignment_expression "*puVar1 = 0x20" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar1[param_3 >> 2 & 1] = 0x30;" (assignment_expression "puVar1[param_3 >> 2 & 1] = 0x30" (subscript_expression "puVar1[param_3 >> 2 & 1]" identifier [ (binary_expression "param_3 >> 2 & 1" (binary_expression "param_3 >> 2" identifier >> number_literal) & number_literal) ]) = number_literal) ;) (expression_statement "puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1));" (assignment_expression "puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1))" identifier = (cast_expression "(undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1))" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1))" ( (binary_expression "puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1)" (binary_expression "puVar1 + (param_3 >> 2 & 1)" identifier + (parenthesized_expression "(param_3 >> 2 & 1)" ( (binary_expression "param_3 >> 2 & 1" (binary_expression "param_3 >> 2" identifier >> number_literal) & number_literal) ))) + (parenthesized_expression "(param_3 >> 3 & 1)" ( (binary_expression "param_3 >> 3 & 1" (binary_expression "param_3 >> 3" identifier >> number_literal) & number_literal) ))) )))) ;) (expression_statement "*puVar2 = 0x2e2a;" (assignment_expression "*puVar2 = 0x2e2a" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "*(undefined1 *)(puVar2 + 1) = 0x2a;" (assignment_expression "*(undefined1 *)(puVar2 + 1) = 0x2a" (pointer_expression "*(undefined1 *)(puVar2 + 1)" * (cast_expression "(undefined1 *)(puVar2 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + 1)" ( (binary_expression "puVar2 + 1" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(puVar2 + 2) = 0;" (assignment_expression "*(undefined1 *)(puVar2 + 2) = 0" (pointer_expression "*(undefined1 *)(puVar2 + 2)" * (cast_expression "(undefined1 *)(puVar2 + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + 2)" ( (binary_expression "puVar2 + 2" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47;" (assignment_expression "*(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47" (pointer_expression "*(byte *)((int)puVar2 + 3)" * (cast_expression "(byte *)((int)puVar2 + 3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar2 + 3)" ( (binary_expression "(int)puVar2 + 3" (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (binary_expression "(-((param_3 & 0x10) == 0) & 0x20U) + 0x47" (parenthesized_expression "(-((param_3 & 0x10) == 0) & 0x20U)" ( (binary_expression "-((param_3 & 0x10) == 0) & 0x20U" (unary_expression "-((param_3 & 0x10) == 0)" - (parenthesized_expression "((param_3 & 0x10) == 0)" ( (binary_expression "(param_3 & 0x10) == 0" (parenthesized_expression "(param_3 & 0x10)" ( (binary_expression "param_3 & 0x10" identifier & number_literal) )) == number_literal) ))) & number_literal) )) + number_literal)) ;) (expression_statement "iVar3 = 0xf;" (assignment_expression "iVar3 = 0xf" identifier = number_literal) ;) (if_statement "if (dVar5 < DAT_0001faa0) {\n    iVar3 = 1;\n  }" if (parenthesized_expression "(dVar5 < DAT_0001faa0)" ( (binary_expression "dVar5 < DAT_0001faa0" identifier < identifier) )) (compound_statement "{\n    iVar3 = 1;\n  }" { (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) })) (while_statement "while( true ) {\n    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);\n    local_44 = SUB84(param_5,0);\n    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }\n    iVar3 = iVar3 + 1;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);\n    local_44 = SUB84(param_5,0);\n    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }\n    iVar3 = iVar3 + 1;\n  }" { (expression_statement "uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);" (assignment_expression "uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20)" identifier = (call_expression "(undefined4)((ulonglong)param_5 >> 0x20)" (parenthesized_expression "(undefined4)" ( identifier )) (argument_list "((ulonglong)param_5 >> 0x20)" ( (binary_expression "(ulonglong)param_5 >> 0x20" (cast_expression "(ulonglong)param_5" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "local_44 = SUB84(param_5,0);" (assignment_expression "local_44 = SUB84(param_5,0)" identifier = (call_expression "SUB84(param_5,0)" identifier (argument_list "(param_5,0)" ( identifier , number_literal )))) ;) (expression_statement "uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);" (assignment_expression "uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40)" identifier = (call_expression "__snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40)" identifier (argument_list "(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40)" ( identifier , identifier , number_literal , number_literal , identifier , identifier , identifier , identifier , identifier )))) ;) (if_statement "if (((int)uVar4 < 0) || (0x10 < iVar3)) break;" if (parenthesized_expression "(((int)uVar4 < 0) || (0x10 < iVar3))" ( (binary_expression "((int)uVar4 < 0) || (0x10 < iVar3)" (parenthesized_expression "((int)uVar4 < 0)" ( (binary_expression "(int)uVar4 < 0" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) || (parenthesized_expression "(0x10 < iVar3)" ( (binary_expression "0x10 < iVar3" number_literal < identifier) ))) )) (break_statement "break;" break ;)) (if_statement "if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }" if (parenthesized_expression "(uVar4 < param_2)" ( (binary_expression "uVar4 < param_2" identifier < identifier) )) (compound_statement "{\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }" { (expression_statement "dVar5 = strtod(param_1,(char **)0x0);" (assignment_expression "dVar5 = strtod(param_1,(char **)0x0)" identifier = (call_expression "strtod(param_1,(char **)0x0)" identifier (argument_list "(param_1,(char **)0x0)" ( identifier , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) )))) ;) (if_statement "if (dVar5 == param_5) break;" if (parenthesized_expression "(dVar5 == param_5)" ( (binary_expression "dVar5 == param_5" identifier == identifier) )) (break_statement "break;" break ;)) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) })) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0001d370();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_0001d370();\n  }" { comment (expression_statement "FUN_0001d370();" (call_expression "FUN_0001d370()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint dtoastr(char *buf,size_t bufsize,int flags,int width,double x)\n\n{\n  int iVar1;\n  char *pcVar2;\n  int iVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  double dVar5;\n  char format [11];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  format[0] = '%';\n  format[1] = '-';\n  dVar5 = -x;\n  if (0.0 <= x) {\n    dVar5 = x;\n  }\n  pcVar2 = format + (flags & 1U) + 1;\n  *pcVar2 = '+';\n  pcVar2 = pcVar2 + ((uint)flags >> 1 & 1);\n  *pcVar2 = ' ';\n  pcVar2[(uint)flags >> 2 & 1] = '0';\n  pcVar2 = pcVar2 + ((uint)flags >> 2 & 1) + ((uint)flags >> 3 & 1);\n  pcVar2[0] = '*';\n  pcVar2[1] = '.';\n  pcVar2[2] = '*';\n  pcVar2[4] = '\0';\n  pcVar2[3] = (-((flags & 0x10U) == 0) & 0x20U) + 0x47;\n  iVar3 = 0xf;\n  if (dVar5 < DAT_0001faa0) {\n    iVar3 = 1;\n  }\n  while( true ) {\n    uVar4 = __snprintf_chk(buf,bufsize,1,0xffffffff,format,width,iVar3,x);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < bufsize) {\n      dVar5 = strtod(buf,(char **)0x0);\n      if (dVar5 == x) break;\n    }\n    iVar3 = iVar3 + 1;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return uVar4;\n}\n\n" comment comment (function_definition "int dtoastr(char *buf,size_t bufsize,int flags,int width,double x)\n\n{\n  int iVar1;\n  char *pcVar2;\n  int iVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  double dVar5;\n  char format [11];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  format[0] = '%';\n  format[1] = '-';\n  dVar5 = -x;\n  if (0.0 <= x) {\n    dVar5 = x;\n  }\n  pcVar2 = format + (flags & 1U) + 1;\n  *pcVar2 = '+';\n  pcVar2 = pcVar2 + ((uint)flags >> 1 & 1);\n  *pcVar2 = ' ';\n  pcVar2[(uint)flags >> 2 & 1] = '0';\n  pcVar2 = pcVar2 + ((uint)flags >> 2 & 1) + ((uint)flags >> 3 & 1);\n  pcVar2[0] = '*';\n  pcVar2[1] = '.';\n  pcVar2[2] = '*';\n  pcVar2[4] = '\0';\n  pcVar2[3] = (-((flags & 0x10U) == 0) & 0x20U) + 0x47;\n  iVar3 = 0xf;\n  if (dVar5 < DAT_0001faa0) {\n    iVar3 = 1;\n  }\n  while( true ) {\n    uVar4 = __snprintf_chk(buf,bufsize,1,0xffffffff,format,width,iVar3,x);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < bufsize) {\n      dVar5 = strtod(buf,(char **)0x0);\n      if (dVar5 == x) break;\n    }\n    iVar3 = iVar3 + 1;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return uVar4;\n}" primitive_type (function_declarator "dtoastr(char *buf,size_t bufsize,int flags,int width,double x)" identifier (parameter_list "(char *buf,size_t bufsize,int flags,int width,double x)" ( (parameter_declaration "char *buf" primitive_type (pointer_declarator "*buf" * identifier)) , (parameter_declaration "size_t bufsize" primitive_type identifier) , (parameter_declaration "int flags" primitive_type identifier) , (parameter_declaration "int width" primitive_type identifier) , (parameter_declaration "double x" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  int iVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  double dVar5;\n  char format [11];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  format[0] = '%';\n  format[1] = '-';\n  dVar5 = -x;\n  if (0.0 <= x) {\n    dVar5 = x;\n  }\n  pcVar2 = format + (flags & 1U) + 1;\n  *pcVar2 = '+';\n  pcVar2 = pcVar2 + ((uint)flags >> 1 & 1);\n  *pcVar2 = ' ';\n  pcVar2[(uint)flags >> 2 & 1] = '0';\n  pcVar2 = pcVar2 + ((uint)flags >> 2 & 1) + ((uint)flags >> 3 & 1);\n  pcVar2[0] = '*';\n  pcVar2[1] = '.';\n  pcVar2[2] = '*';\n  pcVar2[4] = '\0';\n  pcVar2[3] = (-((flags & 0x10U) == 0) & 0x20U) + 0x47;\n  iVar3 = 0xf;\n  if (dVar5 < DAT_0001faa0) {\n    iVar3 = 1;\n  }\n  while( true ) {\n    uVar4 = __snprintf_chk(buf,bufsize,1,0xffffffff,format,width,iVar3,x);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < bufsize) {\n      dVar5 = strtod(buf,(char **)0x0);\n      if (dVar5 == x) break;\n    }\n    iVar3 = iVar3 + 1;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return uVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "double dVar5;" primitive_type identifier ;) (declaration "char format [11];" primitive_type (array_declarator "format [11]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "format[0] = '%';" (assignment_expression "format[0] = '%'" (subscript_expression "format[0]" identifier [ number_literal ]) = (char_literal "'%'" ' character ')) ;) (expression_statement "format[1] = '-';" (assignment_expression "format[1] = '-'" (subscript_expression "format[1]" identifier [ number_literal ]) = (char_literal "'-'" ' character ')) ;) (expression_statement "dVar5 = -x;" (assignment_expression "dVar5 = -x" identifier = (unary_expression "-x" - identifier)) ;) (if_statement "if (0.0 <= x) {\n    dVar5 = x;\n  }" if (parenthesized_expression "(0.0 <= x)" ( (binary_expression "0.0 <= x" number_literal <= identifier) )) (compound_statement "{\n    dVar5 = x;\n  }" { (expression_statement "dVar5 = x;" (assignment_expression "dVar5 = x" identifier = identifier) ;) })) (expression_statement "pcVar2 = format + (flags & 1U) + 1;" (assignment_expression "pcVar2 = format + (flags & 1U) + 1" identifier = (binary_expression "format + (flags & 1U) + 1" (binary_expression "format + (flags & 1U)" identifier + (parenthesized_expression "(flags & 1U)" ( (binary_expression "flags & 1U" identifier & number_literal) ))) + number_literal)) ;) (expression_statement "*pcVar2 = '+';" (assignment_expression "*pcVar2 = '+'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'+'" ' character ')) ;) (expression_statement "pcVar2 = pcVar2 + ((uint)flags >> 1 & 1);" (assignment_expression "pcVar2 = pcVar2 + ((uint)flags >> 1 & 1)" identifier = (binary_expression "pcVar2 + ((uint)flags >> 1 & 1)" identifier + (parenthesized_expression "((uint)flags >> 1 & 1)" ( (binary_expression "(uint)flags >> 1 & 1" (binary_expression "(uint)flags >> 1" (cast_expression "(uint)flags" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) & number_literal) )))) ;) (expression_statement "*pcVar2 = ' ';" (assignment_expression "*pcVar2 = ' '" (pointer_expression "*pcVar2" * identifier) = (char_literal "' '" ' character ')) ;) (expression_statement "pcVar2[(uint)flags >> 2 & 1] = '0';" (assignment_expression "pcVar2[(uint)flags >> 2 & 1] = '0'" (subscript_expression "pcVar2[(uint)flags >> 2 & 1]" identifier [ (binary_expression "(uint)flags >> 2 & 1" (binary_expression "(uint)flags >> 2" (cast_expression "(uint)flags" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) & number_literal) ]) = (char_literal "'0'" ' character ')) ;) (expression_statement "pcVar2 = pcVar2 + ((uint)flags >> 2 & 1) + ((uint)flags >> 3 & 1);" (assignment_expression "pcVar2 = pcVar2 + ((uint)flags >> 2 & 1) + ((uint)flags >> 3 & 1)" identifier = (binary_expression "pcVar2 + ((uint)flags >> 2 & 1) + ((uint)flags >> 3 & 1)" (binary_expression "pcVar2 + ((uint)flags >> 2 & 1)" identifier + (parenthesized_expression "((uint)flags >> 2 & 1)" ( (binary_expression "(uint)flags >> 2 & 1" (binary_expression "(uint)flags >> 2" (cast_expression "(uint)flags" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) & number_literal) ))) + (parenthesized_expression "((uint)flags >> 3 & 1)" ( (binary_expression "(uint)flags >> 3 & 1" (binary_expression "(uint)flags >> 3" (cast_expression "(uint)flags" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) & number_literal) )))) ;) (expression_statement "pcVar2[0] = '*';" (assignment_expression "pcVar2[0] = '*'" (subscript_expression "pcVar2[0]" identifier [ number_literal ]) = (char_literal "'*'" ' character ')) ;) (expression_statement "pcVar2[1] = '.';" (assignment_expression "pcVar2[1] = '.'" (subscript_expression "pcVar2[1]" identifier [ number_literal ]) = (char_literal "'.'" ' character ')) ;) (expression_statement "pcVar2[2] = '*';" (assignment_expression "pcVar2[2] = '*'" (subscript_expression "pcVar2[2]" identifier [ number_literal ]) = (char_literal "'*'" ' character ')) ;) (expression_statement "pcVar2[4] = '\0';" (assignment_expression "pcVar2[4] = '\0'" (subscript_expression "pcVar2[4]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pcVar2[3] = (-((flags & 0x10U) == 0) & 0x20U) + 0x47;" (assignment_expression "pcVar2[3] = (-((flags & 0x10U) == 0) & 0x20U) + 0x47" (subscript_expression "pcVar2[3]" identifier [ number_literal ]) = (binary_expression "(-((flags & 0x10U) == 0) & 0x20U) + 0x47" (parenthesized_expression "(-((flags & 0x10U) == 0) & 0x20U)" ( (binary_expression "-((flags & 0x10U) == 0) & 0x20U" (unary_expression "-((flags & 0x10U) == 0)" - (parenthesized_expression "((flags & 0x10U) == 0)" ( (binary_expression "(flags & 0x10U) == 0" (parenthesized_expression "(flags & 0x10U)" ( (binary_expression "flags & 0x10U" identifier & number_literal) )) == number_literal) ))) & number_literal) )) + number_literal)) ;) (expression_statement "iVar3 = 0xf;" (assignment_expression "iVar3 = 0xf" identifier = number_literal) ;) (if_statement "if (dVar5 < DAT_0001faa0) {\n    iVar3 = 1;\n  }" if (parenthesized_expression "(dVar5 < DAT_0001faa0)" ( (binary_expression "dVar5 < DAT_0001faa0" identifier < identifier) )) (compound_statement "{\n    iVar3 = 1;\n  }" { (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) })) (while_statement "while( true ) {\n    uVar4 = __snprintf_chk(buf,bufsize,1,0xffffffff,format,width,iVar3,x);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < bufsize) {\n      dVar5 = strtod(buf,(char **)0x0);\n      if (dVar5 == x) break;\n    }\n    iVar3 = iVar3 + 1;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    uVar4 = __snprintf_chk(buf,bufsize,1,0xffffffff,format,width,iVar3,x);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < bufsize) {\n      dVar5 = strtod(buf,(char **)0x0);\n      if (dVar5 == x) break;\n    }\n    iVar3 = iVar3 + 1;\n  }" { (expression_statement "uVar4 = __snprintf_chk(buf,bufsize,1,0xffffffff,format,width,iVar3,x);" (assignment_expression "uVar4 = __snprintf_chk(buf,bufsize,1,0xffffffff,format,width,iVar3,x)" identifier = (call_expression "__snprintf_chk(buf,bufsize,1,0xffffffff,format,width,iVar3,x)" identifier (argument_list "(buf,bufsize,1,0xffffffff,format,width,iVar3,x)" ( identifier , identifier , number_literal , number_literal , identifier , identifier , identifier , identifier )))) ;) (if_statement "if (((int)uVar4 < 0) || (0x10 < iVar3)) break;" if (parenthesized_expression "(((int)uVar4 < 0) || (0x10 < iVar3))" ( (binary_expression "((int)uVar4 < 0) || (0x10 < iVar3)" (parenthesized_expression "((int)uVar4 < 0)" ( (binary_expression "(int)uVar4 < 0" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) || (parenthesized_expression "(0x10 < iVar3)" ( (binary_expression "0x10 < iVar3" number_literal < identifier) ))) )) (break_statement "break;" break ;)) (if_statement "if (uVar4 < bufsize) {\n      dVar5 = strtod(buf,(char **)0x0);\n      if (dVar5 == x) break;\n    }" if (parenthesized_expression "(uVar4 < bufsize)" ( (binary_expression "uVar4 < bufsize" identifier < identifier) )) (compound_statement "{\n      dVar5 = strtod(buf,(char **)0x0);\n      if (dVar5 == x) break;\n    }" { (expression_statement "dVar5 = strtod(buf,(char **)0x0);" (assignment_expression "dVar5 = strtod(buf,(char **)0x0)" identifier = (call_expression "strtod(buf,(char **)0x0)" identifier (argument_list "(buf,(char **)0x0)" ( identifier , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) )))) ;) (if_statement "if (dVar5 == x) break;" if (parenthesized_expression "(dVar5 == x)" ( (binary_expression "dVar5 == x" identifier == identifier) )) (break_statement "break;" break ;)) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) })) (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "uint FUN_00015a00(char *param_1,uint param_2,uint param_3,undefined4 param_4,double param_5)\n\n{\n  undefined1 *puVar1;\n  undefined2 *puVar2;\n  int iVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  double dVar5;\n  undefined4 local_44;\n  undefined4 uStack_40;\n  undefined1 local_2b [3];\n  undefined2 uStack_28;\n  undefined2 auStack_26 [3];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x15a09;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_2b._0_2_ = 0x2d25;\n  dVar5 = -param_5;\n  if (0.0 <= param_5) {\n    dVar5 = param_5;\n  }\n  puVar1 = local_2b + (param_3 & 1) + 1;\n  *puVar1 = 0x2b;\n  puVar1 = puVar1 + (param_3 >> 1 & 1);\n  *puVar1 = 0x20;\n  puVar1[param_3 >> 2 & 1] = 0x30;\n  puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1));\n  *puVar2 = 0x2e2a;\n  *(undefined1 *)(puVar2 + 1) = 0x2a;\n  *(undefined1 *)(puVar2 + 2) = 0;\n  *(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47;\n  iVar3 = 0xf;\n  if (dVar5 < DAT_0001faa0) {\n    iVar3 = 1;\n  }\n  while( true ) {\n    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);\n    local_44 = SUB84(param_5,0);\n    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }\n    iVar3 = iVar3 + 1;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001d370();\n  }\n  return uVar4;\n}\n\n" (function_definition "uint FUN_00015a00(char *param_1,uint param_2,uint param_3,undefined4 param_4,double param_5)\n\n{\n  undefined1 *puVar1;\n  undefined2 *puVar2;\n  int iVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  double dVar5;\n  undefined4 local_44;\n  undefined4 uStack_40;\n  undefined1 local_2b [3];\n  undefined2 uStack_28;\n  undefined2 auStack_26 [3];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x15a09;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_2b._0_2_ = 0x2d25;\n  dVar5 = -param_5;\n  if (0.0 <= param_5) {\n    dVar5 = param_5;\n  }\n  puVar1 = local_2b + (param_3 & 1) + 1;\n  *puVar1 = 0x2b;\n  puVar1 = puVar1 + (param_3 >> 1 & 1);\n  *puVar1 = 0x20;\n  puVar1[param_3 >> 2 & 1] = 0x30;\n  puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1));\n  *puVar2 = 0x2e2a;\n  *(undefined1 *)(puVar2 + 1) = 0x2a;\n  *(undefined1 *)(puVar2 + 2) = 0;\n  *(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47;\n  iVar3 = 0xf;\n  if (dVar5 < DAT_0001faa0) {\n    iVar3 = 1;\n  }\n  while( true ) {\n    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);\n    local_44 = SUB84(param_5,0);\n    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }\n    iVar3 = iVar3 + 1;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001d370();\n  }\n  return uVar4;\n}" type_identifier (function_declarator "FUN_00015a00(char *param_1,uint param_2,uint param_3,undefined4 param_4,double param_5)" identifier (parameter_list "(char *param_1,uint param_2,uint param_3,undefined4 param_4,double param_5)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "double param_5" primitive_type identifier) ))) (compound_statement "{\n  undefined1 *puVar1;\n  undefined2 *puVar2;\n  int iVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  double dVar5;\n  undefined4 local_44;\n  undefined4 uStack_40;\n  undefined1 local_2b [3];\n  undefined2 uStack_28;\n  undefined2 auStack_26 [3];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x15a09;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_2b._0_2_ = 0x2d25;\n  dVar5 = -param_5;\n  if (0.0 <= param_5) {\n    dVar5 = param_5;\n  }\n  puVar1 = local_2b + (param_3 & 1) + 1;\n  *puVar1 = 0x2b;\n  puVar1 = puVar1 + (param_3 >> 1 & 1);\n  *puVar1 = 0x20;\n  puVar1[param_3 >> 2 & 1] = 0x30;\n  puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1));\n  *puVar2 = 0x2e2a;\n  *(undefined1 *)(puVar2 + 1) = 0x2a;\n  *(undefined1 *)(puVar2 + 2) = 0;\n  *(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47;\n  iVar3 = 0xf;\n  if (dVar5 < DAT_0001faa0) {\n    iVar3 = 1;\n  }\n  while( true ) {\n    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);\n    local_44 = SUB84(param_5,0);\n    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }\n    iVar3 = iVar3 + 1;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001d370();\n  }\n  return uVar4;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined2 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "double dVar5;" primitive_type identifier ;) (declaration "undefined4 local_44;" type_identifier identifier ;) (declaration "undefined4 uStack_40;" type_identifier identifier ;) (declaration "undefined1 local_2b [3];" type_identifier (array_declarator "local_2b [3]" identifier [ number_literal ]) ;) (declaration "undefined2 uStack_28;" type_identifier identifier ;) (declaration "undefined2 auStack_26 [3];" type_identifier (array_declarator "auStack_26 [3]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x15a09;" (assignment_expression "uStack_14 = 0x15a09" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_2b._0_2_ = 0x2d25;" (assignment_expression "local_2b._0_2_ = 0x2d25" (field_expression "local_2b._0_2_" identifier . field_identifier) = number_literal) ;) (expression_statement "dVar5 = -param_5;" (assignment_expression "dVar5 = -param_5" identifier = (unary_expression "-param_5" - identifier)) ;) (if_statement "if (0.0 <= param_5) {\n    dVar5 = param_5;\n  }" if (parenthesized_expression "(0.0 <= param_5)" ( (binary_expression "0.0 <= param_5" number_literal <= identifier) )) (compound_statement "{\n    dVar5 = param_5;\n  }" { (expression_statement "dVar5 = param_5;" (assignment_expression "dVar5 = param_5" identifier = identifier) ;) })) (expression_statement "puVar1 = local_2b + (param_3 & 1) + 1;" (assignment_expression "puVar1 = local_2b + (param_3 & 1) + 1" identifier = (binary_expression "local_2b + (param_3 & 1) + 1" (binary_expression "local_2b + (param_3 & 1)" identifier + (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) ))) + number_literal)) ;) (expression_statement "*puVar1 = 0x2b;" (assignment_expression "*puVar1 = 0x2b" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar1 = puVar1 + (param_3 >> 1 & 1);" (assignment_expression "puVar1 = puVar1 + (param_3 >> 1 & 1)" identifier = (binary_expression "puVar1 + (param_3 >> 1 & 1)" identifier + (parenthesized_expression "(param_3 >> 1 & 1)" ( (binary_expression "param_3 >> 1 & 1" (binary_expression "param_3 >> 1" identifier >> number_literal) & number_literal) )))) ;) (expression_statement "*puVar1 = 0x20;" (assignment_expression "*puVar1 = 0x20" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar1[param_3 >> 2 & 1] = 0x30;" (assignment_expression "puVar1[param_3 >> 2 & 1] = 0x30" (subscript_expression "puVar1[param_3 >> 2 & 1]" identifier [ (binary_expression "param_3 >> 2 & 1" (binary_expression "param_3 >> 2" identifier >> number_literal) & number_literal) ]) = number_literal) ;) (expression_statement "puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1));" (assignment_expression "puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1))" identifier = (cast_expression "(undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1))" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1))" ( (binary_expression "puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1)" (binary_expression "puVar1 + (param_3 >> 2 & 1)" identifier + (parenthesized_expression "(param_3 >> 2 & 1)" ( (binary_expression "param_3 >> 2 & 1" (binary_expression "param_3 >> 2" identifier >> number_literal) & number_literal) ))) + (parenthesized_expression "(param_3 >> 3 & 1)" ( (binary_expression "param_3 >> 3 & 1" (binary_expression "param_3 >> 3" identifier >> number_literal) & number_literal) ))) )))) ;) (expression_statement "*puVar2 = 0x2e2a;" (assignment_expression "*puVar2 = 0x2e2a" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "*(undefined1 *)(puVar2 + 1) = 0x2a;" (assignment_expression "*(undefined1 *)(puVar2 + 1) = 0x2a" (pointer_expression "*(undefined1 *)(puVar2 + 1)" * (cast_expression "(undefined1 *)(puVar2 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + 1)" ( (binary_expression "puVar2 + 1" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(puVar2 + 2) = 0;" (assignment_expression "*(undefined1 *)(puVar2 + 2) = 0" (pointer_expression "*(undefined1 *)(puVar2 + 2)" * (cast_expression "(undefined1 *)(puVar2 + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + 2)" ( (binary_expression "puVar2 + 2" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47;" (assignment_expression "*(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47" (pointer_expression "*(byte *)((int)puVar2 + 3)" * (cast_expression "(byte *)((int)puVar2 + 3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar2 + 3)" ( (binary_expression "(int)puVar2 + 3" (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (binary_expression "(-((param_3 & 0x10) == 0) & 0x20U) + 0x47" (parenthesized_expression "(-((param_3 & 0x10) == 0) & 0x20U)" ( (binary_expression "-((param_3 & 0x10) == 0) & 0x20U" (unary_expression "-((param_3 & 0x10) == 0)" - (parenthesized_expression "((param_3 & 0x10) == 0)" ( (binary_expression "(param_3 & 0x10) == 0" (parenthesized_expression "(param_3 & 0x10)" ( (binary_expression "param_3 & 0x10" identifier & number_literal) )) == number_literal) ))) & number_literal) )) + number_literal)) ;) (expression_statement "iVar3 = 0xf;" (assignment_expression "iVar3 = 0xf" identifier = number_literal) ;) (if_statement "if (dVar5 < DAT_0001faa0) {\n    iVar3 = 1;\n  }" if (parenthesized_expression "(dVar5 < DAT_0001faa0)" ( (binary_expression "dVar5 < DAT_0001faa0" identifier < identifier) )) (compound_statement "{\n    iVar3 = 1;\n  }" { (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) })) (while_statement "while( true ) {\n    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);\n    local_44 = SUB84(param_5,0);\n    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }\n    iVar3 = iVar3 + 1;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);\n    local_44 = SUB84(param_5,0);\n    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }\n    iVar3 = iVar3 + 1;\n  }" { (expression_statement "uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);" (assignment_expression "uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20)" identifier = (call_expression "(undefined4)((ulonglong)param_5 >> 0x20)" (parenthesized_expression "(undefined4)" ( identifier )) (argument_list "((ulonglong)param_5 >> 0x20)" ( (binary_expression "(ulonglong)param_5 >> 0x20" (cast_expression "(ulonglong)param_5" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "local_44 = SUB84(param_5,0);" (assignment_expression "local_44 = SUB84(param_5,0)" identifier = (call_expression "SUB84(param_5,0)" identifier (argument_list "(param_5,0)" ( identifier , number_literal )))) ;) (expression_statement "uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);" (assignment_expression "uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40)" identifier = (call_expression "__snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40)" identifier (argument_list "(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40)" ( identifier , identifier , number_literal , number_literal , identifier , identifier , identifier , identifier , identifier )))) ;) (if_statement "if (((int)uVar4 < 0) || (0x10 < iVar3)) break;" if (parenthesized_expression "(((int)uVar4 < 0) || (0x10 < iVar3))" ( (binary_expression "((int)uVar4 < 0) || (0x10 < iVar3)" (parenthesized_expression "((int)uVar4 < 0)" ( (binary_expression "(int)uVar4 < 0" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) || (parenthesized_expression "(0x10 < iVar3)" ( (binary_expression "0x10 < iVar3" number_literal < identifier) ))) )) (break_statement "break;" break ;)) (if_statement "if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }" if (parenthesized_expression "(uVar4 < param_2)" ( (binary_expression "uVar4 < param_2" identifier < identifier) )) (compound_statement "{\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }" { (expression_statement "dVar5 = strtod(param_1,(char **)0x0);" (assignment_expression "dVar5 = strtod(param_1,(char **)0x0)" identifier = (call_expression "strtod(param_1,(char **)0x0)" identifier (argument_list "(param_1,(char **)0x0)" ( identifier , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) )))) ;) (if_statement "if (dVar5 == param_5) break;" if (parenthesized_expression "(dVar5 == param_5)" ( (binary_expression "dVar5 == param_5" identifier == identifier) )) (break_statement "break;" break ;)) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) })) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001d370();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_0001d370();\n  }" { (expression_statement "FUN_0001d370();" (call_expression "FUN_0001d370()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_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 (field_expression IDENT . field_identifier) = LIT) ;) (expression_statement (assignment_expression IDENT = (unary_expression - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT & LIT) ))) + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (parenthesized_expression ( (binary_expression (binary_expression IDENT >> LIT) & LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression (binary_expression IDENT >> LIT) & LIT) ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + (parenthesized_expression ( (binary_expression (binary_expression IDENT >> LIT) & LIT) ))) + (parenthesized_expression ( (binary_expression (binary_expression IDENT >> LIT) & LIT) ))) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = (binary_expression (parenthesized_expression ( (binary_expression (unary_expression - (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) ))) & LIT) )) + LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT , IDENT , IDENT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) || (parenthesized_expression ( (binary_expression LIT < IDENT) ))) )) (break_statement break ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (break_statement break ;)) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "uint FUN_00015a00(char *param_1,uint param_2,uint param_3,undefined4 param_4,double param_5)\n\n{\n  undefined1 *puVar1;\n  undefined2 *puVar2;\n  int iVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  double dVar5;\n  undefined4 local_44;\n  undefined4 uStack_40;\n  undefined1 local_2b [3];\n  undefined2 uStack_28;\n  undefined2 auStack_26 [3];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x15a09;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_2b._0_2_ = 0x2d25;\n  dVar5 = -param_5;\n  if (0.0 <= param_5) {\n    dVar5 = param_5;\n  }\n  puVar1 = local_2b + (param_3 & 1) + 1;\n  *puVar1 = 0x2b;\n  puVar1 = puVar1 + (param_3 >> 1 & 1);\n  *puVar1 = 0x20;\n  puVar1[param_3 >> 2 & 1] = 0x30;\n  puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1));\n  *puVar2 = 0x2e2a;\n  *(undefined1 *)(puVar2 + 1) = 0x2a;\n  *(undefined1 *)(puVar2 + 2) = 0;\n  *(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47;\n  iVar3 = 0xf;\n  if (dVar5 < DAT_0001faa0) {\n    iVar3 = 1;\n  }\n  while( true ) {\n    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);\n    local_44 = SUB84(param_5,0);\n    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }\n    iVar3 = iVar3 + 1;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001d370();\n  }\n  return uVar4;\n}" (type_identifier "uint") (function_declarator "FUN_00015a00(char *param_1,uint param_2,uint param_3,undefined4 param_4,double param_5)" (identifier "FUN_00015a00") (parameter_list "(char *param_1,uint param_2,uint param_3,undefined4 param_4,double param_5)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "double param_5" (primitive_type "double") (identifier "param_5")) () ")"))) (compound_statement "{\n  undefined1 *puVar1;\n  undefined2 *puVar2;\n  int iVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  double dVar5;\n  undefined4 local_44;\n  undefined4 uStack_40;\n  undefined1 local_2b [3];\n  undefined2 uStack_28;\n  undefined2 auStack_26 [3];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x15a09;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_2b._0_2_ = 0x2d25;\n  dVar5 = -param_5;\n  if (0.0 <= param_5) {\n    dVar5 = param_5;\n  }\n  puVar1 = local_2b + (param_3 & 1) + 1;\n  *puVar1 = 0x2b;\n  puVar1 = puVar1 + (param_3 >> 1 & 1);\n  *puVar1 = 0x20;\n  puVar1[param_3 >> 2 & 1] = 0x30;\n  puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1));\n  *puVar2 = 0x2e2a;\n  *(undefined1 *)(puVar2 + 1) = 0x2a;\n  *(undefined1 *)(puVar2 + 2) = 0;\n  *(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47;\n  iVar3 = 0xf;\n  if (dVar5 < DAT_0001faa0) {\n    iVar3 = 1;\n  }\n  while( true ) {\n    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);\n    local_44 = SUB84(param_5,0);\n    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }\n    iVar3 = iVar3 + 1;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001d370();\n  }\n  return uVar4;\n}" ({ "{") (declaration "undefined1 *puVar1;" (type_identifier "undefined1") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined2 *puVar2;" (type_identifier "undefined2") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "double dVar5;" (primitive_type "double") (identifier "dVar5") (; ";")) (declaration "undefined4 local_44;" (type_identifier "undefined4") (identifier "local_44") (; ";")) (declaration "undefined4 uStack_40;" (type_identifier "undefined4") (identifier "uStack_40") (; ";")) (declaration "undefined1 local_2b [3];" (type_identifier "undefined1") (array_declarator "local_2b [3]" (identifier "local_2b") ([ "[") (number_literal "3") (] "]")) (; ";")) (declaration "undefined2 uStack_28;" (type_identifier "undefined2") (identifier "uStack_28") (; ";")) (declaration "undefined2 auStack_26 [3];" (type_identifier "undefined2") (array_declarator "auStack_26 [3]" (identifier "auStack_26") ([ "[") (number_literal "3") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x15a09;" (assignment_expression "uStack_14 = 0x15a09" (identifier "uStack_14") (= "=") (number_literal "0x15a09")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "local_2b._0_2_ = 0x2d25;" (assignment_expression "local_2b._0_2_ = 0x2d25" (field_expression "local_2b._0_2_" (identifier "local_2b") (. ".") (field_identifier "_0_2_")) (= "=") (number_literal "0x2d25")) (; ";")) (expression_statement "dVar5 = -param_5;" (assignment_expression "dVar5 = -param_5" (identifier "dVar5") (= "=") (unary_expression "-param_5" (- "-") (identifier "param_5"))) (; ";")) (if_statement "if (0.0 <= param_5) {\n    dVar5 = param_5;\n  }" (if "if") (parenthesized_expression "(0.0 <= param_5)" (( "(") (binary_expression "0.0 <= param_5" (number_literal "0.0") (<= "<=") (identifier "param_5")) () ")")) (compound_statement "{\n    dVar5 = param_5;\n  }" ({ "{") (expression_statement "dVar5 = param_5;" (assignment_expression "dVar5 = param_5" (identifier "dVar5") (= "=") (identifier "param_5")) (; ";")) (} "}"))) (expression_statement "puVar1 = local_2b + (param_3 & 1) + 1;" (assignment_expression "puVar1 = local_2b + (param_3 & 1) + 1" (identifier "puVar1") (= "=") (binary_expression "local_2b + (param_3 & 1) + 1" (binary_expression "local_2b + (param_3 & 1)" (identifier "local_2b") (+ "+") (parenthesized_expression "(param_3 & 1)" (( "(") (binary_expression "param_3 & 1" (identifier "param_3") (& "&") (number_literal "1")) () ")"))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*puVar1 = 0x2b;" (assignment_expression "*puVar1 = 0x2b" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (number_literal "0x2b")) (; ";")) (expression_statement "puVar1 = puVar1 + (param_3 >> 1 & 1);" (assignment_expression "puVar1 = puVar1 + (param_3 >> 1 & 1)" (identifier "puVar1") (= "=") (binary_expression "puVar1 + (param_3 >> 1 & 1)" (identifier "puVar1") (+ "+") (parenthesized_expression "(param_3 >> 1 & 1)" (( "(") (binary_expression "param_3 >> 1 & 1" (binary_expression "param_3 >> 1" (identifier "param_3") (>> ">>") (number_literal "1")) (& "&") (number_literal "1")) () ")")))) (; ";")) (expression_statement "*puVar1 = 0x20;" (assignment_expression "*puVar1 = 0x20" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (number_literal "0x20")) (; ";")) (expression_statement "puVar1[param_3 >> 2 & 1] = 0x30;" (assignment_expression "puVar1[param_3 >> 2 & 1] = 0x30" (subscript_expression "puVar1[param_3 >> 2 & 1]" (identifier "puVar1") ([ "[") (binary_expression "param_3 >> 2 & 1" (binary_expression "param_3 >> 2" (identifier "param_3") (>> ">>") (number_literal "2")) (& "&") (number_literal "1")) (] "]")) (= "=") (number_literal "0x30")) (; ";")) (expression_statement "puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1));" (assignment_expression "puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1))" (identifier "puVar2") (= "=") (cast_expression "(undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1))" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1))" (( "(") (binary_expression "puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1)" (binary_expression "puVar1 + (param_3 >> 2 & 1)" (identifier "puVar1") (+ "+") (parenthesized_expression "(param_3 >> 2 & 1)" (( "(") (binary_expression "param_3 >> 2 & 1" (binary_expression "param_3 >> 2" (identifier "param_3") (>> ">>") (number_literal "2")) (& "&") (number_literal "1")) () ")"))) (+ "+") (parenthesized_expression "(param_3 >> 3 & 1)" (( "(") (binary_expression "param_3 >> 3 & 1" (binary_expression "param_3 >> 3" (identifier "param_3") (>> ">>") (number_literal "3")) (& "&") (number_literal "1")) () ")"))) () ")")))) (; ";")) (expression_statement "*puVar2 = 0x2e2a;" (assignment_expression "*puVar2 = 0x2e2a" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (number_literal "0x2e2a")) (; ";")) (expression_statement "*(undefined1 *)(puVar2 + 1) = 0x2a;" (assignment_expression "*(undefined1 *)(puVar2 + 1) = 0x2a" (pointer_expression "*(undefined1 *)(puVar2 + 1)" (* "*") (cast_expression "(undefined1 *)(puVar2 + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2 + 1)" (( "(") (binary_expression "puVar2 + 1" (identifier "puVar2") (+ "+") (number_literal "1")) () ")")))) (= "=") (number_literal "0x2a")) (; ";")) (expression_statement "*(undefined1 *)(puVar2 + 2) = 0;" (assignment_expression "*(undefined1 *)(puVar2 + 2) = 0" (pointer_expression "*(undefined1 *)(puVar2 + 2)" (* "*") (cast_expression "(undefined1 *)(puVar2 + 2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2 + 2)" (( "(") (binary_expression "puVar2 + 2" (identifier "puVar2") (+ "+") (number_literal "2")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47;" (assignment_expression "*(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47" (pointer_expression "*(byte *)((int)puVar2 + 3)" (* "*") (cast_expression "(byte *)((int)puVar2 + 3)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar2 + 3)" (( "(") (binary_expression "(int)puVar2 + 3" (cast_expression "(int)puVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar2")) (+ "+") (number_literal "3")) () ")")))) (= "=") (binary_expression "(-((param_3 & 0x10) == 0) & 0x20U) + 0x47" (parenthesized_expression "(-((param_3 & 0x10) == 0) & 0x20U)" (( "(") (binary_expression "-((param_3 & 0x10) == 0) & 0x20U" (unary_expression "-((param_3 & 0x10) == 0)" (- "-") (parenthesized_expression "((param_3 & 0x10) == 0)" (( "(") (binary_expression "(param_3 & 0x10) == 0" (parenthesized_expression "(param_3 & 0x10)" (( "(") (binary_expression "param_3 & 0x10" (identifier "param_3") (& "&") (number_literal "0x10")) () ")")) (== "==") (number_literal "0")) () ")"))) (& "&") (number_literal "0x20U")) () ")")) (+ "+") (number_literal "0x47"))) (; ";")) (expression_statement "iVar3 = 0xf;" (assignment_expression "iVar3 = 0xf" (identifier "iVar3") (= "=") (number_literal "0xf")) (; ";")) (if_statement "if (dVar5 < DAT_0001faa0) {\n    iVar3 = 1;\n  }" (if "if") (parenthesized_expression "(dVar5 < DAT_0001faa0)" (( "(") (binary_expression "dVar5 < DAT_0001faa0" (identifier "dVar5") (< "<") (identifier "DAT_0001faa0")) () ")")) (compound_statement "{\n    iVar3 = 1;\n  }" ({ "{") (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" (identifier "iVar3") (= "=") (number_literal "1")) (; ";")) (} "}"))) (while_statement "while( true ) {\n    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);\n    local_44 = SUB84(param_5,0);\n    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }\n    iVar3 = iVar3 + 1;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);\n    local_44 = SUB84(param_5,0);\n    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);\n    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;\n    if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }\n    iVar3 = iVar3 + 1;\n  }" ({ "{") (expression_statement "uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);" (assignment_expression "uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20)" (identifier "uStack_40") (= "=") (call_expression "(undefined4)((ulonglong)param_5 >> 0x20)" (parenthesized_expression "(undefined4)" (( "(") (identifier "undefined4") () ")")) (argument_list "((ulonglong)param_5 >> 0x20)" (( "(") (binary_expression "(ulonglong)param_5 >> 0x20" (cast_expression "(ulonglong)param_5" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "param_5")) (>> ">>") (number_literal "0x20")) () ")")))) (; ";")) (expression_statement "local_44 = SUB84(param_5,0);" (assignment_expression "local_44 = SUB84(param_5,0)" (identifier "local_44") (= "=") (call_expression "SUB84(param_5,0)" (identifier "SUB84") (argument_list "(param_5,0)" (( "(") (identifier "param_5") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);" (assignment_expression "uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40)" (identifier "uVar4") (= "=") (call_expression "__snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40)" (identifier "__snprintf_chk") (argument_list "(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (number_literal "1") (, ",") (number_literal "0xffffffff") (, ",") (identifier "local_2b") (, ",") (identifier "param_4") (, ",") (identifier "iVar3") (, ",") (identifier "local_44") (, ",") (identifier "uStack_40") () ")")))) (; ";")) (if_statement "if (((int)uVar4 < 0) || (0x10 < iVar3)) break;" (if "if") (parenthesized_expression "(((int)uVar4 < 0) || (0x10 < iVar3))" (( "(") (binary_expression "((int)uVar4 < 0) || (0x10 < iVar3)" (parenthesized_expression "((int)uVar4 < 0)" (( "(") (binary_expression "(int)uVar4 < 0" (cast_expression "(int)uVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar4")) (< "<") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(0x10 < iVar3)" (( "(") (binary_expression "0x10 < iVar3" (number_literal "0x10") (< "<") (identifier "iVar3")) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (if_statement "if (uVar4 < param_2) {\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }" (if "if") (parenthesized_expression "(uVar4 < param_2)" (( "(") (binary_expression "uVar4 < param_2" (identifier "uVar4") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n      dVar5 = strtod(param_1,(char **)0x0);\n      if (dVar5 == param_5) break;\n    }" ({ "{") (expression_statement "dVar5 = strtod(param_1,(char **)0x0);" (assignment_expression "dVar5 = strtod(param_1,(char **)0x0)" (identifier "dVar5") (= "=") (call_expression "strtod(param_1,(char **)0x0)" (identifier "strtod") (argument_list "(param_1,(char **)0x0)" (( "(") (identifier "param_1") (, ",") (cast_expression "(char **)0x0" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (number_literal "0x0")) () ")")))) (; ";")) (if_statement "if (dVar5 == param_5) break;" (if "if") (parenthesized_expression "(dVar5 == param_5)" (( "(") (binary_expression "dVar5 == param_5" (identifier "dVar5") (== "==") (identifier "param_5")) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}"))) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001d370();\n  }" (if "if") (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_0001d370();\n  }" ({ "{") (expression_statement "FUN_0001d370();" (call_expression "FUN_0001d370()" (identifier "FUN_0001d370") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int function_1(char *buf,size_t var_11,int var_4,int width,double var_2)

{
  int var_13;
  char *var_5;
  int var_9;
  type_1 var_10;
  int var_1;
  double var_6;
  char var_3 [11];
  
  var_13 = *(int *)(var_1 + 0x14);
  var_3[0] = '%';
  var_3[1] = '-';
  var_6 = -var_2;
  if (0.0 <= var_2) {
    var_6 = var_2;
  }
  var_5 = var_3 + (var_4 & 1U) + 1;
  *var_5 = '+';
  var_5 = var_5 + ((type_1)var_4 >> 1 & 1);
  *var_5 = ' ';
  var_5[(type_1)var_4 >> 2 & 1] = '0';
  var_5 = var_5 + ((type_1)var_4 >> 2 & 1) + ((type_1)var_4 >> 3 & 1);
  var_5[0] = '*';
  var_5[1] = '.';
  var_5[2] = '*';
  var_5[4] = '\0';
  var_5[3] = (-((var_4 & 0x10U) == 0) & 0x20U) + 0x47;
  var_9 = 0xf;
  if (var_6 < var_7) {
    var_9 = 1;
  }
  while( true ) {
    var_10 = var_8(buf,var_11,1,0xffffffff,var_3,width,var_9,var_2);
    if (((int)var_10 < 0) || (0x10 < var_9)) break;
    if (var_10 < var_11) {
      var_6 = var_12(buf,(char **)0x0);
      if (var_6 == var_2) break;
    }
    var_9 = var_9 + 1;
  }
  if (var_13 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_14();
  }
  return var_10;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (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: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_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: (field_expression argument: (identifier) field: (field_identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (unary_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal)))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal)))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (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))))) right: (number_literal))) (expression_statement (assignment_expression left: (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))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (unary_expression argument: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)))) right: (number_literal))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal) (number_literal) (identifier) (identifier) (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))))) consequence: (break_statement)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (break_statement)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_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))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement (identifier)))))

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

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

{
  undefined1 *puVar1;
  undefined2 *puVar2;
  int iVar3;
  uint uVar4;
  int in_GS_OFFSET;
  double dVar5;
  undefined4 local_44;
  undefined4 uStack_40;
  undefined1 local_2b [3];
  undefined2 uStack_28;
  undefined2 auStack_26 [3];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x15a09;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_2b._0_2_ = 0x2d25;
  dVar5 = -param_5;
  if (0.0 <= param_5) {
    dVar5 = param_5;
  }
  puVar1 = local_2b + (param_3 & 1) + 1;
  *puVar1 = 0x2b;
  puVar1 = puVar1 + (param_3 >> 1 & 1);
  *puVar1 = 0x20;
  puVar1[param_3 >> 2 & 1] = 0x30;
  puVar2 = (undefined2 *)(puVar1 + (param_3 >> 2 & 1) + (param_3 >> 3 & 1));
  *puVar2 = 0x2e2a;
  *(undefined1 *)(puVar2 + 1) = 0x2a;
  *(undefined1 *)(puVar2 + 2) = 0;
  *(byte *)((int)puVar2 + 3) = (-((param_3 & 0x10) == 0) & 0x20U) + 0x47;
  iVar3 = 0xf;
  if (dVar5 < DAT_0001faa0) {
    iVar3 = 1;
  }
  while( true ) {
    uStack_40 = (undefined4)((ulonglong)param_5 >> 0x20);
    local_44 = SUB84(param_5,0);
    uVar4 = __snprintf_chk(param_1,param_2,1,0xffffffff,local_2b,param_4,iVar3,local_44,uStack_40);
    if (((int)uVar4 < 0) || (0x10 < iVar3)) break;
    if (uVar4 < param_2) {
      dVar5 = strtod(param_1,(char **)0x0);
      if (dVar5 == param_5) break;
    }
    iVar3 = iVar3 + 1;
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0001d370();
  }
  return uVar4;
}

