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

long getfraction(char **sp,char *printopt,int *errp)

{
  int iVar1;
  char cVar2;
  bool bVar3;
  char *pcVar4;
  int iVar5;
  uint uVar6;
  int in_GS_OFFSET;
  uint local_30;
  PARG parg;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x255d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pcVar4 = skipsp(*sp);
  cVar2 = *pcVar4;
  if ((byte)(cVar2 - 0x30U) < 10) {
    local_30 = 0;
    iVar1 = 0;
    do {
      iVar5 = iVar1;
      pcVar4 = pcVar4 + 1;
      iVar1 = iVar5 + 1;
      local_30 = cVar2 + -0x30 + local_30 * 10;
      cVar2 = *pcVar4;
    } while ((byte)(cVar2 - 0x30U) < 10);
    if (iVar1 < 7) {
      uVar6 = iVar5 + 2;
      if (iVar1 != 6) {
        do {
          local_30 = local_30 * 10;
          bVar3 = uVar6 < 6;
          uVar6 = uVar6 + 1;
        } while (bVar3);
      }
    }
    else {
      do {
        local_30 = local_30 / 10;
        bVar3 = 6 < iVar5;
        iVar5 = iVar5 + -1;
      } while (bVar3);
    }
    *sp = pcVar4;
    if (errp != (int *)0x0) {
      *errp = 0;
    }
  }
  else if (errp == (int *)0x0) {
    local_30 = 0xffffffff;
    if (printopt != (char *)0x0) {
      local_30 = 0xffffffff;
      parg.p_string = printopt;
      error("Number is required after %s",&parg);
    }
  }
  else {
    *errp = 1;
    local_30 = 0xffffffff;
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return local_30;
}



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

uint FUN_000255d0(undefined4 *param_1,int param_2,undefined4 *param_3)

{
  int iVar1;
  char cVar2;
  bool bVar3;
  char *pcVar4;
  int iVar5;
  uint uVar6;
  int in_GS_OFFSET;
  uint local_30;
  int local_28 [2];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x255d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pcVar4 = (char *)FUN_00012ae0(*param_1);
  cVar2 = *pcVar4;
  if ((byte)(cVar2 - 0x30U) < 10) {
    local_30 = 0;
    iVar1 = 0;
    do {
      iVar5 = iVar1;
      pcVar4 = pcVar4 + 1;
      iVar1 = iVar5 + 1;
      local_30 = cVar2 + -0x30 + local_30 * 10;
      cVar2 = *pcVar4;
    } while ((byte)(cVar2 - 0x30U) < 10);
    if (iVar1 < 7) {
      uVar6 = iVar5 + 2;
      if (iVar1 != 6) {
        do {
          local_30 = local_30 * 10;
          bVar3 = uVar6 < 6;
          uVar6 = uVar6 + 1;
        } while (bVar3);
      }
    }
    else {
      do {
        local_30 = local_30 / 10;
        bVar3 = 6 < iVar5;
        iVar5 = iVar5 + -1;
      } while (bVar3);
    }
    *param_1 = pcVar4;
    if (param_3 != (undefined4 *)0x0) {
      *param_3 = 0;
    }
  }
  else if (param_3 == (undefined4 *)0x0) {
    local_30 = 0xffffffff;
    if (param_2 != 0) {
      local_30 = 0xffffffff;
      local_28[0] = param_2;
      error("Number is required after %s",local_28);
    }
  }
  else {
    *param_3 = 1;
    local_30 = 0xffffffff;
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0002b510();
  }
  return local_30;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000129a0
ADD EBX,0x168bf
SUB ESP,0x38
MOV EAX,dword ptr [ESP + 0x54]
MOV ESI,dword ptr [ESP + 0x4c]
MOV EDI,dword ptr [ESP + 0x50]
MOV dword ptr [ESP + 0x18],EAX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x28],EAX
XOR EAX,EAX
PUSH dword ptr [ESI]
CALL 0x00012ae0
ADD ESP,0x10
MOVSX EDX,byte ptr [EAX]
MOV ECX,EAX
LEA EAX,[EDX + -0x30]
CMP AL,0x9
JA 0x000256af
XOR EBX,EBX
XOR EAX,EAX
MOV EDI,ECX
JMP 0x00025622
MOV EBX,EBP
LEA EAX,[EAX + EAX*0x4]
ADD EDI,0x1
LEA EBP,[EBX + 0x1]
LEA EAX,[EDX + EAX*0x2 + -0x30]
MOVSX EDX,byte ptr [EDI]
LEA ECX,[EDX + -0x30]
CMP CL,0x9
JBE 0x00025620
MOV ECX,EDI
MOV EDX,EAX
MOV EDI,0xcccccccd
CMP EBP,0x6
JG 0x00025652
JMP 0x00025690
MOV EBX,EAX
MOV EAX,EDX
MUL EDI
LEA EAX,[EBX + -0x1]
SHR EDX,0x3
CMP EBX,0x6
JG 0x00025650
MOV EAX,EDX
MOV dword ptr [ESI],ECX
MOV ESI,dword ptr [ESP + 0xc]
TEST ESI,ESI
JZ 0x00025673
MOV dword ptr [ESI],0x0
MOV ESI,dword ptr [ESP + 0x1c]
XOR ESI,dword ptr GS:[0x14]
JNZ 0x000256f2
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD EBX,0x2
CMP EBP,0x6
JZ 0x00025663
LEA ESI,[ESI]
NOP
LEA EAX,[EAX + EAX*0x4]
ADD EAX,EAX
CMP EBX,0x5
LEA EBX,[EBX + 0x1]
JBE 0x000256a0
JMP 0x00025663
MOV EAX,dword ptr [ESP + 0xc]
TEST EAX,EAX
JZ 0x000256c4
MOV dword ptr [EAX],0x1
MOV EAX,0xffffffff
JMP 0x00025673
MOV EAX,0xffffffff
TEST EDI,EDI
JZ 0x00025673
MOV dword ptr [ESP + 0xc],EAX
SUB ESP,0x8
MOV dword ptr [ESP + 0x1c],EDI
LEA EDX,[ESP + 0x1c]
PUSH EDX
LEA EDX,[EBX + 0xffff49cf]
PUSH EDX
CALL 0x000262b0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
JMP 0x00025673
CALL 0x0002b510
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint FUN_000255d0(undefined4 *param_1,int param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  char cVar2;\n  bool bVar3;\n  char *pcVar4;\n  int iVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  uint local_30;\n  int local_28 [2];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x255d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar4 = (char *)FUN_00012ae0(*param_1);\n  cVar2 = *pcVar4;\n  if ((byte)(cVar2 - 0x30U) < 10) {\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *param_1 = pcVar4;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }\n  }\n  else if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002b510();\n  }\n  return local_30;\n}\n\n" comment (function_definition "uint FUN_000255d0(undefined4 *param_1,int param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  char cVar2;\n  bool bVar3;\n  char *pcVar4;\n  int iVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  uint local_30;\n  int local_28 [2];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x255d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar4 = (char *)FUN_00012ae0(*param_1);\n  cVar2 = *pcVar4;\n  if ((byte)(cVar2 - 0x30U) < 10) {\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *param_1 = pcVar4;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }\n  }\n  else if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002b510();\n  }\n  return local_30;\n}" type_identifier (function_declarator "FUN_000255d0(undefined4 *param_1,int param_2,undefined4 *param_3)" identifier (parameter_list "(undefined4 *param_1,int param_2,undefined4 *param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  char cVar2;\n  bool bVar3;\n  char *pcVar4;\n  int iVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  uint local_30;\n  int local_28 [2];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x255d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar4 = (char *)FUN_00012ae0(*param_1);\n  cVar2 = *pcVar4;\n  if ((byte)(cVar2 - 0x30U) < 10) {\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *param_1 = pcVar4;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }\n  }\n  else if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002b510();\n  }\n  return local_30;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint local_30;" type_identifier identifier ;) (declaration "int local_28 [2];" primitive_type (array_declarator "local_28 [2]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x255d9;" (assignment_expression "uStack_14 = 0x255d9" 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 "pcVar4 = (char *)FUN_00012ae0(*param_1);" (assignment_expression "pcVar4 = (char *)FUN_00012ae0(*param_1)" identifier = (cast_expression "(char *)FUN_00012ae0(*param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00012ae0(*param_1)" identifier (argument_list "(*param_1)" ( (pointer_expression "*param_1" * identifier) ))))) ;) (expression_statement "cVar2 = *pcVar4;" (assignment_expression "cVar2 = *pcVar4" identifier = (pointer_expression "*pcVar4" * identifier)) ;) (if_statement "if ((byte)(cVar2 - 0x30U) < 10) {\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *param_1 = pcVar4;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }\n  }\n  else if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }" if (parenthesized_expression "((byte)(cVar2 - 0x30U) < 10)" ( (binary_expression "(byte)(cVar2 - 0x30U) < 10" (call_expression "(byte)(cVar2 - 0x30U)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(cVar2 - 0x30U)" ( (binary_expression "cVar2 - 0x30U" identifier - number_literal) ))) < number_literal) )) (compound_statement "{\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *param_1 = pcVar4;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }\n  }" { (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);" do (compound_statement "{\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    }" { (expression_statement "iVar5 = iVar1;" (assignment_expression "iVar5 = iVar1" identifier = identifier) ;) (expression_statement "pcVar4 = pcVar4 + 1;" (assignment_expression "pcVar4 = pcVar4 + 1" identifier = (binary_expression "pcVar4 + 1" identifier + number_literal)) ;) (expression_statement "iVar1 = iVar5 + 1;" (assignment_expression "iVar1 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "local_30 = cVar2 + -0x30 + local_30 * 10;" (assignment_expression "local_30 = cVar2 + -0x30 + local_30 * 10" identifier = (binary_expression "cVar2 + -0x30 + local_30 * 10" (binary_expression "cVar2 + -0x30" identifier + number_literal) + (binary_expression "local_30 * 10" identifier * number_literal))) ;) (expression_statement "cVar2 = *pcVar4;" (assignment_expression "cVar2 = *pcVar4" identifier = (pointer_expression "*pcVar4" * identifier)) ;) }) while (parenthesized_expression "((byte)(cVar2 - 0x30U) < 10)" ( (binary_expression "(byte)(cVar2 - 0x30U) < 10" (call_expression "(byte)(cVar2 - 0x30U)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(cVar2 - 0x30U)" ( (binary_expression "cVar2 - 0x30U" identifier - number_literal) ))) < number_literal) )) ;) (if_statement "if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }" if (parenthesized_expression "(iVar1 < 7)" ( (binary_expression "iVar1 < 7" identifier < number_literal) )) (compound_statement "{\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }" { (expression_statement "uVar6 = iVar5 + 2;" (assignment_expression "uVar6 = iVar5 + 2" identifier = (binary_expression "iVar5 + 2" identifier + number_literal)) ;) (if_statement "if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }" if (parenthesized_expression "(iVar1 != 6)" ( (binary_expression "iVar1 != 6" identifier != number_literal) )) (compound_statement "{\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }" { (do_statement "do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);" do (compound_statement "{\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        }" { (expression_statement "local_30 = local_30 * 10;" (assignment_expression "local_30 = local_30 * 10" identifier = (binary_expression "local_30 * 10" identifier * number_literal)) ;) (expression_statement "bVar3 = uVar6 < 6;" (assignment_expression "bVar3 = uVar6 < 6" identifier = (binary_expression "uVar6 < 6" identifier < number_literal)) ;) (expression_statement "uVar6 = uVar6 + 1;" (assignment_expression "uVar6 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar3)" ( identifier )) ;) })) }) (else_clause "else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }" else (compound_statement "{\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }" { (do_statement "do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);" do (compound_statement "{\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      }" { (expression_statement "local_30 = local_30 / 10;" (assignment_expression "local_30 = local_30 / 10" identifier = (binary_expression "local_30 / 10" identifier / number_literal)) ;) (expression_statement "bVar3 = 6 < iVar5;" (assignment_expression "bVar3 = 6 < iVar5" identifier = (binary_expression "6 < iVar5" number_literal < identifier)) ;) (expression_statement "iVar5 = iVar5 + -1;" (assignment_expression "iVar5 = iVar5 + -1" identifier = (binary_expression "iVar5 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar3)" ( identifier )) ;) }))) (expression_statement "*param_1 = pcVar4;" (assignment_expression "*param_1 = pcVar4" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }" if (parenthesized_expression "(param_3 != (undefined4 *)0x0)" ( (binary_expression "param_3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_3 = 0;\n    }" { (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) })) }) (else_clause "else if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }" else (if_statement "if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }" if (parenthesized_expression "(param_3 == (undefined4 *)0x0)" ( (binary_expression "param_3 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }" { (expression_statement "local_30 = 0xffffffff;" (assignment_expression "local_30 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }" { (expression_statement "local_30 = 0xffffffff;" (assignment_expression "local_30 = 0xffffffff" identifier = number_literal) ;) (expression_statement "local_28[0] = param_2;" (assignment_expression "local_28[0] = param_2" (subscript_expression "local_28[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "error("Number is required after %s",local_28);" (call_expression "error("Number is required after %s",local_28)" identifier (argument_list "("Number is required after %s",local_28)" ( (string_literal ""Number is required after %s"" " string_content ") , identifier ))) ;) })) }) (else_clause "else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }" else (compound_statement "{\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }" { (expression_statement "*param_3 = 1;" (assignment_expression "*param_3 = 1" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "local_30 = 0xffffffff;" (assignment_expression "local_30 = 0xffffffff" identifier = number_literal) ;) }))))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002b510();\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_0002b510();\n  }" { comment (expression_statement "FUN_0002b510();" (call_expression "FUN_0002b510()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return local_30;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nlong getfraction(char **sp,char *printopt,int *errp)\n\n{\n  int iVar1;\n  char cVar2;\n  bool bVar3;\n  char *pcVar4;\n  int iVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  uint local_30;\n  PARG parg;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x255d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar4 = skipsp(*sp);\n  cVar2 = *pcVar4;\n  if ((byte)(cVar2 - 0x30U) < 10) {\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *sp = pcVar4;\n    if (errp != (int *)0x0) {\n      *errp = 0;\n    }\n  }\n  else if (errp == (int *)0x0) {\n    local_30 = 0xffffffff;\n    if (printopt != (char *)0x0) {\n      local_30 = 0xffffffff;\n      parg.p_string = printopt;\n      error("Number is required after %s",&parg);\n    }\n  }\n  else {\n    *errp = 1;\n    local_30 = 0xffffffff;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return local_30;\n}\n\n" comment comment (function_definition "long getfraction(char **sp,char *printopt,int *errp)\n\n{\n  int iVar1;\n  char cVar2;\n  bool bVar3;\n  char *pcVar4;\n  int iVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  uint local_30;\n  PARG parg;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x255d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar4 = skipsp(*sp);\n  cVar2 = *pcVar4;\n  if ((byte)(cVar2 - 0x30U) < 10) {\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *sp = pcVar4;\n    if (errp != (int *)0x0) {\n      *errp = 0;\n    }\n  }\n  else if (errp == (int *)0x0) {\n    local_30 = 0xffffffff;\n    if (printopt != (char *)0x0) {\n      local_30 = 0xffffffff;\n      parg.p_string = printopt;\n      error("Number is required after %s",&parg);\n    }\n  }\n  else {\n    *errp = 1;\n    local_30 = 0xffffffff;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return local_30;\n}" (sized_type_specifier "long" long) (function_declarator "getfraction(char **sp,char *printopt,int *errp)" identifier (parameter_list "(char **sp,char *printopt,int *errp)" ( (parameter_declaration "char **sp" primitive_type (pointer_declarator "**sp" * (pointer_declarator "*sp" * identifier))) , (parameter_declaration "char *printopt" primitive_type (pointer_declarator "*printopt" * identifier)) , (parameter_declaration "int *errp" primitive_type (pointer_declarator "*errp" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  char cVar2;\n  bool bVar3;\n  char *pcVar4;\n  int iVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  uint local_30;\n  PARG parg;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x255d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar4 = skipsp(*sp);\n  cVar2 = *pcVar4;\n  if ((byte)(cVar2 - 0x30U) < 10) {\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *sp = pcVar4;\n    if (errp != (int *)0x0) {\n      *errp = 0;\n    }\n  }\n  else if (errp == (int *)0x0) {\n    local_30 = 0xffffffff;\n    if (printopt != (char *)0x0) {\n      local_30 = 0xffffffff;\n      parg.p_string = printopt;\n      error("Number is required after %s",&parg);\n    }\n  }\n  else {\n    *errp = 1;\n    local_30 = 0xffffffff;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return local_30;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint local_30;" type_identifier identifier ;) (declaration "PARG parg;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x255d9;" (assignment_expression "uStack_14 = 0x255d9" 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 "pcVar4 = skipsp(*sp);" (assignment_expression "pcVar4 = skipsp(*sp)" identifier = (call_expression "skipsp(*sp)" identifier (argument_list "(*sp)" ( (pointer_expression "*sp" * identifier) )))) ;) (expression_statement "cVar2 = *pcVar4;" (assignment_expression "cVar2 = *pcVar4" identifier = (pointer_expression "*pcVar4" * identifier)) ;) (if_statement "if ((byte)(cVar2 - 0x30U) < 10) {\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *sp = pcVar4;\n    if (errp != (int *)0x0) {\n      *errp = 0;\n    }\n  }\n  else if (errp == (int *)0x0) {\n    local_30 = 0xffffffff;\n    if (printopt != (char *)0x0) {\n      local_30 = 0xffffffff;\n      parg.p_string = printopt;\n      error("Number is required after %s",&parg);\n    }\n  }\n  else {\n    *errp = 1;\n    local_30 = 0xffffffff;\n  }" if (parenthesized_expression "((byte)(cVar2 - 0x30U) < 10)" ( (binary_expression "(byte)(cVar2 - 0x30U) < 10" (call_expression "(byte)(cVar2 - 0x30U)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(cVar2 - 0x30U)" ( (binary_expression "cVar2 - 0x30U" identifier - number_literal) ))) < number_literal) )) (compound_statement "{\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *sp = pcVar4;\n    if (errp != (int *)0x0) {\n      *errp = 0;\n    }\n  }" { (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);" do (compound_statement "{\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    }" { (expression_statement "iVar5 = iVar1;" (assignment_expression "iVar5 = iVar1" identifier = identifier) ;) (expression_statement "pcVar4 = pcVar4 + 1;" (assignment_expression "pcVar4 = pcVar4 + 1" identifier = (binary_expression "pcVar4 + 1" identifier + number_literal)) ;) (expression_statement "iVar1 = iVar5 + 1;" (assignment_expression "iVar1 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "local_30 = cVar2 + -0x30 + local_30 * 10;" (assignment_expression "local_30 = cVar2 + -0x30 + local_30 * 10" identifier = (binary_expression "cVar2 + -0x30 + local_30 * 10" (binary_expression "cVar2 + -0x30" identifier + number_literal) + (binary_expression "local_30 * 10" identifier * number_literal))) ;) (expression_statement "cVar2 = *pcVar4;" (assignment_expression "cVar2 = *pcVar4" identifier = (pointer_expression "*pcVar4" * identifier)) ;) }) while (parenthesized_expression "((byte)(cVar2 - 0x30U) < 10)" ( (binary_expression "(byte)(cVar2 - 0x30U) < 10" (call_expression "(byte)(cVar2 - 0x30U)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(cVar2 - 0x30U)" ( (binary_expression "cVar2 - 0x30U" identifier - number_literal) ))) < number_literal) )) ;) (if_statement "if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }" if (parenthesized_expression "(iVar1 < 7)" ( (binary_expression "iVar1 < 7" identifier < number_literal) )) (compound_statement "{\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }" { (expression_statement "uVar6 = iVar5 + 2;" (assignment_expression "uVar6 = iVar5 + 2" identifier = (binary_expression "iVar5 + 2" identifier + number_literal)) ;) (if_statement "if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }" if (parenthesized_expression "(iVar1 != 6)" ( (binary_expression "iVar1 != 6" identifier != number_literal) )) (compound_statement "{\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }" { (do_statement "do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);" do (compound_statement "{\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        }" { (expression_statement "local_30 = local_30 * 10;" (assignment_expression "local_30 = local_30 * 10" identifier = (binary_expression "local_30 * 10" identifier * number_literal)) ;) (expression_statement "bVar3 = uVar6 < 6;" (assignment_expression "bVar3 = uVar6 < 6" identifier = (binary_expression "uVar6 < 6" identifier < number_literal)) ;) (expression_statement "uVar6 = uVar6 + 1;" (assignment_expression "uVar6 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar3)" ( identifier )) ;) })) }) (else_clause "else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }" else (compound_statement "{\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }" { (do_statement "do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);" do (compound_statement "{\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      }" { (expression_statement "local_30 = local_30 / 10;" (assignment_expression "local_30 = local_30 / 10" identifier = (binary_expression "local_30 / 10" identifier / number_literal)) ;) (expression_statement "bVar3 = 6 < iVar5;" (assignment_expression "bVar3 = 6 < iVar5" identifier = (binary_expression "6 < iVar5" number_literal < identifier)) ;) (expression_statement "iVar5 = iVar5 + -1;" (assignment_expression "iVar5 = iVar5 + -1" identifier = (binary_expression "iVar5 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar3)" ( identifier )) ;) }))) (expression_statement "*sp = pcVar4;" (assignment_expression "*sp = pcVar4" (pointer_expression "*sp" * identifier) = identifier) ;) (if_statement "if (errp != (int *)0x0) {\n      *errp = 0;\n    }" if (parenthesized_expression "(errp != (int *)0x0)" ( (binary_expression "errp != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *errp = 0;\n    }" { (expression_statement "*errp = 0;" (assignment_expression "*errp = 0" (pointer_expression "*errp" * identifier) = number_literal) ;) })) }) (else_clause "else if (errp == (int *)0x0) {\n    local_30 = 0xffffffff;\n    if (printopt != (char *)0x0) {\n      local_30 = 0xffffffff;\n      parg.p_string = printopt;\n      error("Number is required after %s",&parg);\n    }\n  }\n  else {\n    *errp = 1;\n    local_30 = 0xffffffff;\n  }" else (if_statement "if (errp == (int *)0x0) {\n    local_30 = 0xffffffff;\n    if (printopt != (char *)0x0) {\n      local_30 = 0xffffffff;\n      parg.p_string = printopt;\n      error("Number is required after %s",&parg);\n    }\n  }\n  else {\n    *errp = 1;\n    local_30 = 0xffffffff;\n  }" if (parenthesized_expression "(errp == (int *)0x0)" ( (binary_expression "errp == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    local_30 = 0xffffffff;\n    if (printopt != (char *)0x0) {\n      local_30 = 0xffffffff;\n      parg.p_string = printopt;\n      error("Number is required after %s",&parg);\n    }\n  }" { (expression_statement "local_30 = 0xffffffff;" (assignment_expression "local_30 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (printopt != (char *)0x0) {\n      local_30 = 0xffffffff;\n      parg.p_string = printopt;\n      error("Number is required after %s",&parg);\n    }" if (parenthesized_expression "(printopt != (char *)0x0)" ( (binary_expression "printopt != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      local_30 = 0xffffffff;\n      parg.p_string = printopt;\n      error("Number is required after %s",&parg);\n    }" { (expression_statement "local_30 = 0xffffffff;" (assignment_expression "local_30 = 0xffffffff" identifier = number_literal) ;) (expression_statement "parg.p_string = printopt;" (assignment_expression "parg.p_string = printopt" (field_expression "parg.p_string" identifier . field_identifier) = identifier) ;) (expression_statement "error("Number is required after %s",&parg);" (call_expression "error("Number is required after %s",&parg)" identifier (argument_list "("Number is required after %s",&parg)" ( (string_literal ""Number is required after %s"" " string_content ") , (pointer_expression "&parg" & identifier) ))) ;) })) }) (else_clause "else {\n    *errp = 1;\n    local_30 = 0xffffffff;\n  }" else (compound_statement "{\n    *errp = 1;\n    local_30 = 0xffffffff;\n  }" { (expression_statement "*errp = 1;" (assignment_expression "*errp = 1" (pointer_expression "*errp" * identifier) = number_literal) ;) (expression_statement "local_30 = 0xffffffff;" (assignment_expression "local_30 = 0xffffffff" identifier = number_literal) ;) }))))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\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    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return local_30;" return identifier ;) })))
(translation_unit "uint FUN_000255d0(undefined4 *param_1,int param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  char cVar2;\n  bool bVar3;\n  char *pcVar4;\n  int iVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  uint local_30;\n  int local_28 [2];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x255d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar4 = (char *)FUN_00012ae0(*param_1);\n  cVar2 = *pcVar4;\n  if ((byte)(cVar2 - 0x30U) < 10) {\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *param_1 = pcVar4;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }\n  }\n  else if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\n  }\n  return local_30;\n}\n\n" (function_definition "uint FUN_000255d0(undefined4 *param_1,int param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  char cVar2;\n  bool bVar3;\n  char *pcVar4;\n  int iVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  uint local_30;\n  int local_28 [2];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x255d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar4 = (char *)FUN_00012ae0(*param_1);\n  cVar2 = *pcVar4;\n  if ((byte)(cVar2 - 0x30U) < 10) {\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *param_1 = pcVar4;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }\n  }\n  else if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\n  }\n  return local_30;\n}" type_identifier (function_declarator "FUN_000255d0(undefined4 *param_1,int param_2,undefined4 *param_3)" identifier (parameter_list "(undefined4 *param_1,int param_2,undefined4 *param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  char cVar2;\n  bool bVar3;\n  char *pcVar4;\n  int iVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  uint local_30;\n  int local_28 [2];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x255d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar4 = (char *)FUN_00012ae0(*param_1);\n  cVar2 = *pcVar4;\n  if ((byte)(cVar2 - 0x30U) < 10) {\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *param_1 = pcVar4;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }\n  }\n  else if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\n  }\n  return local_30;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint local_30;" type_identifier identifier ;) (declaration "int local_28 [2];" primitive_type (array_declarator "local_28 [2]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x255d9;" (assignment_expression "uStack_14 = 0x255d9" 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 "pcVar4 = (char *)FUN_00012ae0(*param_1);" (assignment_expression "pcVar4 = (char *)FUN_00012ae0(*param_1)" identifier = (cast_expression "(char *)FUN_00012ae0(*param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00012ae0(*param_1)" identifier (argument_list "(*param_1)" ( (pointer_expression "*param_1" * identifier) ))))) ;) (expression_statement "cVar2 = *pcVar4;" (assignment_expression "cVar2 = *pcVar4" identifier = (pointer_expression "*pcVar4" * identifier)) ;) (if_statement "if ((byte)(cVar2 - 0x30U) < 10) {\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *param_1 = pcVar4;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }\n  }\n  else if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }" if (parenthesized_expression "((byte)(cVar2 - 0x30U) < 10)" ( (binary_expression "(byte)(cVar2 - 0x30U) < 10" (call_expression "(byte)(cVar2 - 0x30U)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(cVar2 - 0x30U)" ( (binary_expression "cVar2 - 0x30U" identifier - number_literal) ))) < number_literal) )) (compound_statement "{\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *param_1 = pcVar4;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }\n  }" { (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);" do (compound_statement "{\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    }" { (expression_statement "iVar5 = iVar1;" (assignment_expression "iVar5 = iVar1" identifier = identifier) ;) (expression_statement "pcVar4 = pcVar4 + 1;" (assignment_expression "pcVar4 = pcVar4 + 1" identifier = (binary_expression "pcVar4 + 1" identifier + number_literal)) ;) (expression_statement "iVar1 = iVar5 + 1;" (assignment_expression "iVar1 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "local_30 = cVar2 + -0x30 + local_30 * 10;" (assignment_expression "local_30 = cVar2 + -0x30 + local_30 * 10" identifier = (binary_expression "cVar2 + -0x30 + local_30 * 10" (binary_expression "cVar2 + -0x30" identifier + number_literal) + (binary_expression "local_30 * 10" identifier * number_literal))) ;) (expression_statement "cVar2 = *pcVar4;" (assignment_expression "cVar2 = *pcVar4" identifier = (pointer_expression "*pcVar4" * identifier)) ;) }) while (parenthesized_expression "((byte)(cVar2 - 0x30U) < 10)" ( (binary_expression "(byte)(cVar2 - 0x30U) < 10" (call_expression "(byte)(cVar2 - 0x30U)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(cVar2 - 0x30U)" ( (binary_expression "cVar2 - 0x30U" identifier - number_literal) ))) < number_literal) )) ;) (if_statement "if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }" if (parenthesized_expression "(iVar1 < 7)" ( (binary_expression "iVar1 < 7" identifier < number_literal) )) (compound_statement "{\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }" { (expression_statement "uVar6 = iVar5 + 2;" (assignment_expression "uVar6 = iVar5 + 2" identifier = (binary_expression "iVar5 + 2" identifier + number_literal)) ;) (if_statement "if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }" if (parenthesized_expression "(iVar1 != 6)" ( (binary_expression "iVar1 != 6" identifier != number_literal) )) (compound_statement "{\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }" { (do_statement "do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);" do (compound_statement "{\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        }" { (expression_statement "local_30 = local_30 * 10;" (assignment_expression "local_30 = local_30 * 10" identifier = (binary_expression "local_30 * 10" identifier * number_literal)) ;) (expression_statement "bVar3 = uVar6 < 6;" (assignment_expression "bVar3 = uVar6 < 6" identifier = (binary_expression "uVar6 < 6" identifier < number_literal)) ;) (expression_statement "uVar6 = uVar6 + 1;" (assignment_expression "uVar6 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar3)" ( identifier )) ;) })) }) (else_clause "else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }" else (compound_statement "{\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }" { (do_statement "do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);" do (compound_statement "{\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      }" { (expression_statement "local_30 = local_30 / 10;" (assignment_expression "local_30 = local_30 / 10" identifier = (binary_expression "local_30 / 10" identifier / number_literal)) ;) (expression_statement "bVar3 = 6 < iVar5;" (assignment_expression "bVar3 = 6 < iVar5" identifier = (binary_expression "6 < iVar5" number_literal < identifier)) ;) (expression_statement "iVar5 = iVar5 + -1;" (assignment_expression "iVar5 = iVar5 + -1" identifier = (binary_expression "iVar5 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar3)" ( identifier )) ;) }))) (expression_statement "*param_1 = pcVar4;" (assignment_expression "*param_1 = pcVar4" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }" if (parenthesized_expression "(param_3 != (undefined4 *)0x0)" ( (binary_expression "param_3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_3 = 0;\n    }" { (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) })) }) (else_clause "else if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }" else (if_statement "if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }" if (parenthesized_expression "(param_3 == (undefined4 *)0x0)" ( (binary_expression "param_3 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }" { (expression_statement "local_30 = 0xffffffff;" (assignment_expression "local_30 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }" { (expression_statement "local_30 = 0xffffffff;" (assignment_expression "local_30 = 0xffffffff" identifier = number_literal) ;) (expression_statement "local_28[0] = param_2;" (assignment_expression "local_28[0] = param_2" (subscript_expression "local_28[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "error("Number is required after %s",local_28);" (call_expression "error("Number is required after %s",local_28)" identifier (argument_list "("Number is required after %s",local_28)" ( (string_literal ""Number is required after %s"" " string_content ") , identifier ))) ;) })) }) (else_clause "else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }" else (compound_statement "{\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }" { (expression_statement "*param_3 = 1;" (assignment_expression "*param_3 = 1" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "local_30 = 0xffffffff;" (assignment_expression "local_30 = 0xffffffff" identifier = number_literal) ;) }))))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\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_0002b510();\n  }" { (expression_statement "FUN_0002b510();" (call_expression "FUN_0002b510()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return local_30;" 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 (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (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 IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (pointer_expression * IDENT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - LIT) ))) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }) while (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - LIT) ))) < LIT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT < LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( IDENT )) ;) })) }) (else_clause else (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT / LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression LIT < IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( IDENT )) ;) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT ))) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_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_000255d0(undefined4 *param_1,int param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  char cVar2;\n  bool bVar3;\n  char *pcVar4;\n  int iVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  uint local_30;\n  int local_28 [2];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x255d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar4 = (char *)FUN_00012ae0(*param_1);\n  cVar2 = *pcVar4;\n  if ((byte)(cVar2 - 0x30U) < 10) {\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *param_1 = pcVar4;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }\n  }\n  else if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\n  }\n  return local_30;\n}" (type_identifier "uint") (function_declarator "FUN_000255d0(undefined4 *param_1,int param_2,undefined4 *param_3)" (identifier "FUN_000255d0") (parameter_list "(undefined4 *param_1,int param_2,undefined4 *param_3)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 *param_3" (type_identifier "undefined4") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  int iVar1;\n  char cVar2;\n  bool bVar3;\n  char *pcVar4;\n  int iVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  uint local_30;\n  int local_28 [2];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x255d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar4 = (char *)FUN_00012ae0(*param_1);\n  cVar2 = *pcVar4;\n  if ((byte)(cVar2 - 0x30U) < 10) {\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *param_1 = pcVar4;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }\n  }\n  else if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\n  }\n  return local_30;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "char cVar2;" (primitive_type "char") (identifier "cVar2") (; ";")) (declaration "bool bVar3;" (primitive_type "bool") (identifier "bVar3") (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "uint local_30;" (type_identifier "uint") (identifier "local_30") (; ";")) (declaration "int local_28 [2];" (primitive_type "int") (array_declarator "local_28 [2]" (identifier "local_28") ([ "[") (number_literal "2") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x255d9;" (assignment_expression "uStack_14 = 0x255d9" (identifier "uStack_14") (= "=") (number_literal "0x255d9")) (; ";")) (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 "pcVar4 = (char *)FUN_00012ae0(*param_1);" (assignment_expression "pcVar4 = (char *)FUN_00012ae0(*param_1)" (identifier "pcVar4") (= "=") (cast_expression "(char *)FUN_00012ae0(*param_1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00012ae0(*param_1)" (identifier "FUN_00012ae0") (argument_list "(*param_1)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) () ")"))))) (; ";")) (expression_statement "cVar2 = *pcVar4;" (assignment_expression "cVar2 = *pcVar4" (identifier "cVar2") (= "=") (pointer_expression "*pcVar4" (* "*") (identifier "pcVar4"))) (; ";")) (if_statement "if ((byte)(cVar2 - 0x30U) < 10) {\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *param_1 = pcVar4;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }\n  }\n  else if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }" (if "if") (parenthesized_expression "((byte)(cVar2 - 0x30U) < 10)" (( "(") (binary_expression "(byte)(cVar2 - 0x30U) < 10" (call_expression "(byte)(cVar2 - 0x30U)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(cVar2 - 0x30U)" (( "(") (binary_expression "cVar2 - 0x30U" (identifier "cVar2") (- "-") (number_literal "0x30U")) () ")"))) (< "<") (number_literal "10")) () ")")) (compound_statement "{\n    local_30 = 0;\n    iVar1 = 0;\n    do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);\n    if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }\n    *param_1 = pcVar4;\n    if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }\n  }" ({ "{") (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" (identifier "local_30") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    } while ((byte)(cVar2 - 0x30U) < 10);" (do "do") (compound_statement "{\n      iVar5 = iVar1;\n      pcVar4 = pcVar4 + 1;\n      iVar1 = iVar5 + 1;\n      local_30 = cVar2 + -0x30 + local_30 * 10;\n      cVar2 = *pcVar4;\n    }" ({ "{") (expression_statement "iVar5 = iVar1;" (assignment_expression "iVar5 = iVar1" (identifier "iVar5") (= "=") (identifier "iVar1")) (; ";")) (expression_statement "pcVar4 = pcVar4 + 1;" (assignment_expression "pcVar4 = pcVar4 + 1" (identifier "pcVar4") (= "=") (binary_expression "pcVar4 + 1" (identifier "pcVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar1 = iVar5 + 1;" (assignment_expression "iVar1 = iVar5 + 1" (identifier "iVar1") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "local_30 = cVar2 + -0x30 + local_30 * 10;" (assignment_expression "local_30 = cVar2 + -0x30 + local_30 * 10" (identifier "local_30") (= "=") (binary_expression "cVar2 + -0x30 + local_30 * 10" (binary_expression "cVar2 + -0x30" (identifier "cVar2") (+ "+") (number_literal "-0x30")) (+ "+") (binary_expression "local_30 * 10" (identifier "local_30") (* "*") (number_literal "10")))) (; ";")) (expression_statement "cVar2 = *pcVar4;" (assignment_expression "cVar2 = *pcVar4" (identifier "cVar2") (= "=") (pointer_expression "*pcVar4" (* "*") (identifier "pcVar4"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "((byte)(cVar2 - 0x30U) < 10)" (( "(") (binary_expression "(byte)(cVar2 - 0x30U) < 10" (call_expression "(byte)(cVar2 - 0x30U)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(cVar2 - 0x30U)" (( "(") (binary_expression "cVar2 - 0x30U" (identifier "cVar2") (- "-") (number_literal "0x30U")) () ")"))) (< "<") (number_literal "10")) () ")")) (; ";")) (if_statement "if (iVar1 < 7) {\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }\n    else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }" (if "if") (parenthesized_expression "(iVar1 < 7)" (( "(") (binary_expression "iVar1 < 7" (identifier "iVar1") (< "<") (number_literal "7")) () ")")) (compound_statement "{\n      uVar6 = iVar5 + 2;\n      if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }\n    }" ({ "{") (expression_statement "uVar6 = iVar5 + 2;" (assignment_expression "uVar6 = iVar5 + 2" (identifier "uVar6") (= "=") (binary_expression "iVar5 + 2" (identifier "iVar5") (+ "+") (number_literal "2"))) (; ";")) (if_statement "if (iVar1 != 6) {\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }" (if "if") (parenthesized_expression "(iVar1 != 6)" (( "(") (binary_expression "iVar1 != 6" (identifier "iVar1") (!= "!=") (number_literal "6")) () ")")) (compound_statement "{\n        do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);\n      }" ({ "{") (do_statement "do {\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        } while (bVar3);" (do "do") (compound_statement "{\n          local_30 = local_30 * 10;\n          bVar3 = uVar6 < 6;\n          uVar6 = uVar6 + 1;\n        }" ({ "{") (expression_statement "local_30 = local_30 * 10;" (assignment_expression "local_30 = local_30 * 10" (identifier "local_30") (= "=") (binary_expression "local_30 * 10" (identifier "local_30") (* "*") (number_literal "10"))) (; ";")) (expression_statement "bVar3 = uVar6 < 6;" (assignment_expression "bVar3 = uVar6 < 6" (identifier "bVar3") (= "=") (binary_expression "uVar6 < 6" (identifier "uVar6") (< "<") (number_literal "6"))) (; ";")) (expression_statement "uVar6 = uVar6 + 1;" (assignment_expression "uVar6 = uVar6 + 1" (identifier "uVar6") (= "=") (binary_expression "uVar6 + 1" (identifier "uVar6") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar3)" (( "(") (identifier "bVar3") () ")")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }" (else "else") (compound_statement "{\n      do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);\n    }" ({ "{") (do_statement "do {\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      } while (bVar3);" (do "do") (compound_statement "{\n        local_30 = local_30 / 10;\n        bVar3 = 6 < iVar5;\n        iVar5 = iVar5 + -1;\n      }" ({ "{") (expression_statement "local_30 = local_30 / 10;" (assignment_expression "local_30 = local_30 / 10" (identifier "local_30") (= "=") (binary_expression "local_30 / 10" (identifier "local_30") (/ "/") (number_literal "10"))) (; ";")) (expression_statement "bVar3 = 6 < iVar5;" (assignment_expression "bVar3 = 6 < iVar5" (identifier "bVar3") (= "=") (binary_expression "6 < iVar5" (number_literal "6") (< "<") (identifier "iVar5"))) (; ";")) (expression_statement "iVar5 = iVar5 + -1;" (assignment_expression "iVar5 = iVar5 + -1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + -1" (identifier "iVar5") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar3)" (( "(") (identifier "bVar3") () ")")) (; ";")) (} "}")))) (expression_statement "*param_1 = pcVar4;" (assignment_expression "*param_1 = pcVar4" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "pcVar4")) (; ";")) (if_statement "if (param_3 != (undefined4 *)0x0) {\n      *param_3 = 0;\n    }" (if "if") (parenthesized_expression "(param_3 != (undefined4 *)0x0)" (( "(") (binary_expression "param_3 != (undefined4 *)0x0" (identifier "param_3") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      *param_3 = 0;\n    }" ({ "{") (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}")) (else_clause "else if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }" (else "else") (if_statement "if (param_3 == (undefined4 *)0x0) {\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }\n  else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }" (if "if") (parenthesized_expression "(param_3 == (undefined4 *)0x0)" (( "(") (binary_expression "param_3 == (undefined4 *)0x0" (identifier "param_3") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    local_30 = 0xffffffff;\n    if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }\n  }" ({ "{") (expression_statement "local_30 = 0xffffffff;" (assignment_expression "local_30 = 0xffffffff" (identifier "local_30") (= "=") (number_literal "0xffffffff")) (; ";")) (if_statement "if (param_2 != 0) {\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      local_30 = 0xffffffff;\n      local_28[0] = param_2;\n      error("Number is required after %s",local_28);\n    }" ({ "{") (expression_statement "local_30 = 0xffffffff;" (assignment_expression "local_30 = 0xffffffff" (identifier "local_30") (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "local_28[0] = param_2;" (assignment_expression "local_28[0] = param_2" (subscript_expression "local_28[0]" (identifier "local_28") ([ "[") (number_literal "0") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "error("Number is required after %s",local_28);" (call_expression "error("Number is required after %s",local_28)" (identifier "error") (argument_list "("Number is required after %s",local_28)" (( "(") (string_literal ""Number is required after %s"" (" """) (string_content "Number is required after %s") (" """)) (, ",") (identifier "local_28") () ")"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }" (else "else") (compound_statement "{\n    *param_3 = 1;\n    local_30 = 0xffffffff;\n  }" ({ "{") (expression_statement "*param_3 = 1;" (assignment_expression "*param_3 = 1" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "1")) (; ";")) (expression_statement "local_30 = 0xffffffff;" (assignment_expression "local_30 = 0xffffffff" (identifier "local_30") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")))))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\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_0002b510();\n  }" ({ "{") (expression_statement "FUN_0002b510();" (call_expression "FUN_0002b510()" (identifier "FUN_0002b510") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return local_30;" (return "return") (identifier "local_30") (; ";")) (} "}")))

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

long function_1(char **sp,char *var_10,int *var_9)

{
  int var_7;
  char var_3;
  bool bVar3;
  char *var_4;
  int var_5;
  type_1 var_8;
  int var_1;
  type_1 var_6;
  type_2 parg;
  int var_12;
  type_3 uStack_14;
  
  uStack_14 = 0x255d9;
  var_12 = *(int *)(var_1 + 0x14);
  var_4 = var_2(*sp);
  var_3 = *var_4;
  if ((byte)(var_3 - 0x30U) < 10) {
    var_6 = 0;
    var_7 = 0;
    do {
      var_5 = var_7;
      var_4 = var_4 + 1;
      var_7 = var_5 + 1;
      var_6 = var_3 + -0x30 + var_6 * 10;
      var_3 = *var_4;
    } while ((byte)(var_3 - 0x30U) < 10);
    if (var_7 < 7) {
      var_8 = var_5 + 2;
      if (var_7 != 6) {
        do {
          var_6 = var_6 * 10;
          bVar3 = var_8 < 6;
          var_8 = var_8 + 1;
        } while (bVar3);
      }
    }
    else {
      do {
        var_6 = var_6 / 10;
        bVar3 = 6 < var_5;
        var_5 = var_5 + -1;
      } while (bVar3);
    }
    *sp = var_4;
    if (var_9 != (int *)0x0) {
      *var_9 = 0;
    }
  }
  else if (var_9 == (int *)0x0) {
    var_6 = 0xffffffff;
    if (var_10 != (char *)0x0) {
      var_6 = 0xffffffff;
      parg.p_string = var_10;
      var_11("Number is required after %s",&parg);
    }
  }
  else {
    *var_9 = 1;
    var_6 = 0xffffffff;
  }
  if (var_12 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_13();
  }
  return var_6;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) 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: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) 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: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_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: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))) condition: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))) 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: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_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: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (identifier)))))) alternative: (else_clause (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (number_literal) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_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: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (identifier))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_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(undefined4 *param_1,int param_2,undefined4 *param_3)

{
  int iVar1;
  char cVar2;
  bool bVar3;
  char *pcVar4;
  int iVar5;
  uint uVar6;
  int in_GS_OFFSET;
  uint local_30;
  int local_28 [2];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x255d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pcVar4 = (char *)FUN_00012ae0(*param_1);
  cVar2 = *pcVar4;
  if ((byte)(cVar2 - 0x30U) < 10) {
    local_30 = 0;
    iVar1 = 0;
    do {
      iVar5 = iVar1;
      pcVar4 = pcVar4 + 1;
      iVar1 = iVar5 + 1;
      local_30 = cVar2 + -0x30 + local_30 * 10;
      cVar2 = *pcVar4;
    } while ((byte)(cVar2 - 0x30U) < 10);
    if (iVar1 < 7) {
      uVar6 = iVar5 + 2;
      if (iVar1 != 6) {
        do {
          local_30 = local_30 * 10;
          bVar3 = uVar6 < 6;
          uVar6 = uVar6 + 1;
        } while (bVar3);
      }
    }
    else {
      do {
        local_30 = local_30 / 10;
        bVar3 = 6 < iVar5;
        iVar5 = iVar5 + -1;
      } while (bVar3);
    }
    *param_1 = pcVar4;
    if (param_3 != (undefined4 *)0x0) {
      *param_3 = 0;
    }
  }
  else if (param_3 == (undefined4 *)0x0) {
    local_30 = 0xffffffff;
    if (param_2 != 0) {
      local_30 = 0xffffffff;
      local_28[0] = param_2;
      error("Number is required after %s",local_28);
    }
  }
  else {
    *param_3 = 1;
    local_30 = 0xffffffff;
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0002b510();
  }
  return local_30;
}

