
Idx __regparm3 fetch_number(re_string_t *input,re_token_t *token,reg_syntax_t syntax)

{
  char cVar1;
  byte bVar2;
  int iVar3;
  int iVar4;
  
  iVar4 = -1;
  while( true ) {
    iVar3 = peek_token(token,input,syntax);
    input->cur_idx = input->cur_idx + iVar3;
    cVar1 = token->field_0x4;
    bVar2 = (token->opr).c;
    if (cVar1 == '\x02') {
      return -2;
    }
    if (cVar1 == '\x18') break;
    if (bVar2 == 0x2c) {
      return iVar4;
    }
    if (((cVar1 == '\x01') && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {
      if (iVar4 == -1) {
        iVar4 = bVar2 - 0x30;
      }
      else {
        iVar4 = (uint)bVar2 + iVar4 * 10;
        if (0x8030 < iVar4) {
          iVar4 = 0x8030;
        }
        iVar4 = iVar4 + -0x30;
      }
    }
    else {
      iVar4 = -2;
    }
  }
  return iVar4;
}



int __regparm3 FUN_000307e0(int param_1,byte *param_2)

{
  byte bVar1;
  byte bVar2;
  int iVar3;
  int iVar4;
  
  iVar4 = -1;
  while( true ) {
    iVar3 = FUN_000300e0();
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;
    bVar1 = param_2[4];
    bVar2 = *param_2;
    if (bVar1 == 2) {
      return -2;
    }
    if (bVar1 == 0x18) break;
    if (bVar2 == 0x2c) {
      return iVar4;
    }
    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {
      if (iVar4 == -1) {
        iVar4 = bVar2 - 0x30;
      }
      else {
        iVar4 = (uint)bVar2 + iVar4 * 10;
        if (0x8030 < iVar4) {
          iVar4 = 0x8030;
        }
        iVar4 = iVar4 + -0x30;
      }
    }
    else {
      iVar4 = -2;
    }
  }
  return iVar4;
}


PUSH EBP
MOV EBP,ECX
PUSH EDI
MOV EDI,0xffffffff
PUSH ESI
MOV ESI,EAX
PUSH EBX
MOV EBX,EDX
SUB ESP,0xc
LEA ESI,[ESI]
MOV EDX,ESI
MOV ECX,EBP
MOV EAX,EBX
CALL 0x000300e0
ADD dword ptr [ESI + 0x28],EAX
MOVZX EAX,byte ptr [EBX + 0x4]
MOVZX EDX,byte ptr [EBX]
CMP AL,0x2
JZ 0x00030858
CMP AL,0x18
JZ 0x0003085d
CMP DL,0x2c
JZ 0x0003085d
CMP AL,0x1
JZ 0x00030828
MOV EDI,0xfffffffe
JMP 0x000307f8
LEA EAX,[EDX + -0x30]
CMP AL,0x9
JA 0x0003081e
CMP EDI,-0x2
JZ 0x0003081e
CMP EDI,-0x1
JZ 0x00030870
LEA EAX,[EDI + EDI*0x4]
LEA EDI,[EDX + EAX*0x2]
MOV EAX,0x8030
CMP EDI,0x8030
CMOVG EDI,EAX
SUB EDI,0x30
JMP 0x000307f8
MOV EDI,0xfffffffe
ADD ESP,0xc
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EDI,[EDX + -0x30]
JMP 0x000307f8
(translation_unit "int __regparm3 FUN_000307e0(int param_1,byte *param_2)\n\n{\n  byte bVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = -1;\n  while( true ) {\n    iVar3 = FUN_000300e0();\n    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;\n    bVar1 = param_2[4];\n    bVar2 = *param_2;\n    if (bVar1 == 2) {\n      return -2;\n    }\n    if (bVar1 == 0x18) break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }\n  return iVar4;\n}\n\n" (function_definition "int __regparm3 FUN_000307e0(int param_1,byte *param_2)\n\n{\n  byte bVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = -1;\n  while( true ) {\n    iVar3 = FUN_000300e0();\n    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;\n    bVar1 = param_2[4];\n    bVar2 = *param_2;\n    if (bVar1 == 2) {\n      return -2;\n    }\n    if (bVar1 == 0x18) break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }\n  return iVar4;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000307e0(int param_1,byte *param_2)" identifier (parameter_list "(int param_1,byte *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = -1;\n  while( true ) {\n    iVar3 = FUN_000300e0();\n    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;\n    bVar1 = param_2[4];\n    bVar2 = *param_2;\n    if (bVar1 == 2) {\n      return -2;\n    }\n    if (bVar1 == 0x18) break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }\n  return iVar4;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) (while_statement "while( true ) {\n    iVar3 = FUN_000300e0();\n    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;\n    bVar1 = param_2[4];\n    bVar2 = *param_2;\n    if (bVar1 == 2) {\n      return -2;\n    }\n    if (bVar1 == 0x18) break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar3 = FUN_000300e0();\n    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;\n    bVar1 = param_2[4];\n    bVar2 = *param_2;\n    if (bVar1 == 2) {\n      return -2;\n    }\n    if (bVar1 == 0x18) break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }" { (expression_statement "iVar3 = FUN_000300e0();" (assignment_expression "iVar3 = FUN_000300e0()" identifier = (call_expression "FUN_000300e0()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;" (assignment_expression "*(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3" (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x28) + iVar3" (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) + identifier)) ;) (expression_statement "bVar1 = param_2[4];" (assignment_expression "bVar1 = param_2[4]" identifier = (subscript_expression "param_2[4]" identifier [ number_literal ])) ;) (expression_statement "bVar2 = *param_2;" (assignment_expression "bVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (bVar1 == 2) {\n      return -2;\n    }" if (parenthesized_expression "(bVar1 == 2)" ( (binary_expression "bVar1 == 2" identifier == number_literal) )) (compound_statement "{\n      return -2;\n    }" { (return_statement "return -2;" return number_literal ;) })) (if_statement "if (bVar1 == 0x18) break;" if (parenthesized_expression "(bVar1 == 0x18)" ( (binary_expression "bVar1 == 0x18" identifier == number_literal) )) (break_statement "break;" break ;)) (if_statement "if (bVar2 == 0x2c) {\n      return iVar4;\n    }" if (parenthesized_expression "(bVar2 == 0x2c)" ( (binary_expression "bVar2 == 0x2c" identifier == number_literal) )) (compound_statement "{\n      return iVar4;\n    }" { (return_statement "return iVar4;" return identifier ;) })) (if_statement "if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }" if (parenthesized_expression "(((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2))" ( (binary_expression "((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)" (parenthesized_expression "((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10))" ( (binary_expression "(bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)" (parenthesized_expression "(bVar1 == 1)" ( (binary_expression "bVar1 == 1" identifier == number_literal) )) && (parenthesized_expression "((byte)(bVar2 - 0x30) < 10)" ( (binary_expression "(byte)(bVar2 - 0x30) < 10" (call_expression "(byte)(bVar2 - 0x30)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar2 - 0x30)" ( (binary_expression "bVar2 - 0x30" identifier - number_literal) ))) < number_literal) ))) )) && (parenthesized_expression "(iVar4 != -2)" ( (binary_expression "iVar4 != -2" identifier != number_literal) ))) )) (compound_statement "{\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }" { (if_statement "if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n        iVar4 = bVar2 - 0x30;\n      }" { (expression_statement "iVar4 = bVar2 - 0x30;" (assignment_expression "iVar4 = bVar2 - 0x30" identifier = (binary_expression "bVar2 - 0x30" identifier - number_literal)) ;) }) (else_clause "else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }" else (compound_statement "{\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }" { (expression_statement "iVar4 = (uint)bVar2 + iVar4 * 10;" (assignment_expression "iVar4 = (uint)bVar2 + iVar4 * 10" identifier = (binary_expression "(uint)bVar2 + iVar4 * 10" (cast_expression "(uint)bVar2" ( (type_descriptor "uint" type_identifier) ) identifier) + (binary_expression "iVar4 * 10" identifier * number_literal))) ;) (if_statement "if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }" if (parenthesized_expression "(0x8030 < iVar4)" ( (binary_expression "0x8030 < iVar4" number_literal < identifier) )) (compound_statement "{\n          iVar4 = 0x8030;\n        }" { (expression_statement "iVar4 = 0x8030;" (assignment_expression "iVar4 = 0x8030" identifier = number_literal) ;) })) (expression_statement "iVar4 = iVar4 + -0x30;" (assignment_expression "iVar4 = iVar4 + -0x30" identifier = (binary_expression "iVar4 + -0x30" identifier + number_literal)) ;) }))) }) (else_clause "else {\n      iVar4 = -2;\n    }" else (compound_statement "{\n      iVar4 = -2;\n    }" { (expression_statement "iVar4 = -2;" (assignment_expression "iVar4 = -2" identifier = number_literal) ;) }))) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "Idx __regparm3 fetch_number(re_string_t *input,re_token_t *token,reg_syntax_t syntax)\n\n{\n  char cVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = -1;\n  while( true ) {\n    iVar3 = peek_token(token,input,syntax);\n    input->cur_idx = input->cur_idx + iVar3;\n    cVar1 = token->field_0x4;\n    bVar2 = (token->opr).c;\n    if (cVar1 == '\x02') {\n      return -2;\n    }\n    if (cVar1 == '\x18') break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((cVar1 == '\x01') && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }\n  return iVar4;\n}\n\n" (function_definition "Idx __regparm3 fetch_number(re_string_t *input,re_token_t *token,reg_syntax_t syntax)\n\n{\n  char cVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = -1;\n  while( true ) {\n    iVar3 = peek_token(token,input,syntax);\n    input->cur_idx = input->cur_idx + iVar3;\n    cVar1 = token->field_0x4;\n    bVar2 = (token->opr).c;\n    if (cVar1 == '\x02') {\n      return -2;\n    }\n    if (cVar1 == '\x18') break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((cVar1 == '\x01') && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }\n  return iVar4;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "fetch_number(re_string_t *input,re_token_t *token,reg_syntax_t syntax)" identifier (parameter_list "(re_string_t *input,re_token_t *token,reg_syntax_t syntax)" ( (parameter_declaration "re_string_t *input" type_identifier (pointer_declarator "*input" * identifier)) , (parameter_declaration "re_token_t *token" type_identifier (pointer_declarator "*token" * identifier)) , (parameter_declaration "reg_syntax_t syntax" type_identifier identifier) ))) (compound_statement "{\n  char cVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = -1;\n  while( true ) {\n    iVar3 = peek_token(token,input,syntax);\n    input->cur_idx = input->cur_idx + iVar3;\n    cVar1 = token->field_0x4;\n    bVar2 = (token->opr).c;\n    if (cVar1 == '\x02') {\n      return -2;\n    }\n    if (cVar1 == '\x18') break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((cVar1 == '\x01') && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }\n  return iVar4;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) (while_statement "while( true ) {\n    iVar3 = peek_token(token,input,syntax);\n    input->cur_idx = input->cur_idx + iVar3;\n    cVar1 = token->field_0x4;\n    bVar2 = (token->opr).c;\n    if (cVar1 == '\x02') {\n      return -2;\n    }\n    if (cVar1 == '\x18') break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((cVar1 == '\x01') && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar3 = peek_token(token,input,syntax);\n    input->cur_idx = input->cur_idx + iVar3;\n    cVar1 = token->field_0x4;\n    bVar2 = (token->opr).c;\n    if (cVar1 == '\x02') {\n      return -2;\n    }\n    if (cVar1 == '\x18') break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((cVar1 == '\x01') && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }" { (expression_statement "iVar3 = peek_token(token,input,syntax);" (assignment_expression "iVar3 = peek_token(token,input,syntax)" identifier = (call_expression "peek_token(token,input,syntax)" identifier (argument_list "(token,input,syntax)" ( identifier , identifier , identifier )))) ;) (expression_statement "input->cur_idx = input->cur_idx + iVar3;" (assignment_expression "input->cur_idx = input->cur_idx + iVar3" (field_expression "input->cur_idx" identifier -> field_identifier) = (binary_expression "input->cur_idx + iVar3" (field_expression "input->cur_idx" identifier -> field_identifier) + identifier)) ;) (expression_statement "cVar1 = token->field_0x4;" (assignment_expression "cVar1 = token->field_0x4" identifier = (field_expression "token->field_0x4" identifier -> field_identifier)) ;) (expression_statement "bVar2 = (token->opr).c;" (assignment_expression "bVar2 = (token->opr).c" identifier = (field_expression "(token->opr).c" (parenthesized_expression "(token->opr)" ( (field_expression "token->opr" identifier -> field_identifier) )) . field_identifier)) ;) (if_statement "if (cVar1 == '\x02') {\n      return -2;\n    }" if (parenthesized_expression "(cVar1 == '\x02')" ( (binary_expression "cVar1 == '\x02'" identifier == (char_literal "'\x02'" ' escape_sequence ')) )) (compound_statement "{\n      return -2;\n    }" { (return_statement "return -2;" return number_literal ;) })) (if_statement "if (cVar1 == '\x18') break;" if (parenthesized_expression "(cVar1 == '\x18')" ( (binary_expression "cVar1 == '\x18'" identifier == (char_literal "'\x18'" ' escape_sequence ')) )) (break_statement "break;" break ;)) (if_statement "if (bVar2 == 0x2c) {\n      return iVar4;\n    }" if (parenthesized_expression "(bVar2 == 0x2c)" ( (binary_expression "bVar2 == 0x2c" identifier == number_literal) )) (compound_statement "{\n      return iVar4;\n    }" { (return_statement "return iVar4;" return identifier ;) })) (if_statement "if (((cVar1 == '\x01') && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }" if (parenthesized_expression "(((cVar1 == '\x01') && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2))" ( (binary_expression "((cVar1 == '\x01') && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)" (parenthesized_expression "((cVar1 == '\x01') && ((byte)(bVar2 - 0x30) < 10))" ( (binary_expression "(cVar1 == '\x01') && ((byte)(bVar2 - 0x30) < 10)" (parenthesized_expression "(cVar1 == '\x01')" ( (binary_expression "cVar1 == '\x01'" identifier == (char_literal "'\x01'" ' escape_sequence ')) )) && (parenthesized_expression "((byte)(bVar2 - 0x30) < 10)" ( (binary_expression "(byte)(bVar2 - 0x30) < 10" (call_expression "(byte)(bVar2 - 0x30)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar2 - 0x30)" ( (binary_expression "bVar2 - 0x30" identifier - number_literal) ))) < number_literal) ))) )) && (parenthesized_expression "(iVar4 != -2)" ( (binary_expression "iVar4 != -2" identifier != number_literal) ))) )) (compound_statement "{\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }" { (if_statement "if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n        iVar4 = bVar2 - 0x30;\n      }" { (expression_statement "iVar4 = bVar2 - 0x30;" (assignment_expression "iVar4 = bVar2 - 0x30" identifier = (binary_expression "bVar2 - 0x30" identifier - number_literal)) ;) }) (else_clause "else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }" else (compound_statement "{\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }" { (expression_statement "iVar4 = (uint)bVar2 + iVar4 * 10;" (assignment_expression "iVar4 = (uint)bVar2 + iVar4 * 10" identifier = (binary_expression "(uint)bVar2 + iVar4 * 10" (cast_expression "(uint)bVar2" ( (type_descriptor "uint" type_identifier) ) identifier) + (binary_expression "iVar4 * 10" identifier * number_literal))) ;) (if_statement "if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }" if (parenthesized_expression "(0x8030 < iVar4)" ( (binary_expression "0x8030 < iVar4" number_literal < identifier) )) (compound_statement "{\n          iVar4 = 0x8030;\n        }" { (expression_statement "iVar4 = 0x8030;" (assignment_expression "iVar4 = 0x8030" identifier = number_literal) ;) })) (expression_statement "iVar4 = iVar4 + -0x30;" (assignment_expression "iVar4 = iVar4 + -0x30" identifier = (binary_expression "iVar4 + -0x30" identifier + number_literal)) ;) }))) }) (else_clause "else {\n      iVar4 = -2;\n    }" else (compound_statement "{\n      iVar4 = -2;\n    }" { (expression_statement "iVar4 = -2;" (assignment_expression "iVar4 = -2" identifier = number_literal) ;) }))) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "int __regparm3 FUN_000307e0(int param_1,byte *param_2)\n\n{\n  byte bVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = -1;\n  while( true ) {\n    iVar3 = FUN_000300e0();\n    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;\n    bVar1 = param_2[4];\n    bVar2 = *param_2;\n    if (bVar1 == 2) {\n      return -2;\n    }\n    if (bVar1 == 0x18) break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }\n  return iVar4;\n}\n\n" (function_definition "int __regparm3 FUN_000307e0(int param_1,byte *param_2)\n\n{\n  byte bVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = -1;\n  while( true ) {\n    iVar3 = FUN_000300e0();\n    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;\n    bVar1 = param_2[4];\n    bVar2 = *param_2;\n    if (bVar1 == 2) {\n      return -2;\n    }\n    if (bVar1 == 0x18) break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }\n  return iVar4;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000307e0(int param_1,byte *param_2)" identifier (parameter_list "(int param_1,byte *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = -1;\n  while( true ) {\n    iVar3 = FUN_000300e0();\n    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;\n    bVar1 = param_2[4];\n    bVar2 = *param_2;\n    if (bVar1 == 2) {\n      return -2;\n    }\n    if (bVar1 == 0x18) break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }\n  return iVar4;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" identifier = number_literal) ;) (while_statement "while( true ) {\n    iVar3 = FUN_000300e0();\n    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;\n    bVar1 = param_2[4];\n    bVar2 = *param_2;\n    if (bVar1 == 2) {\n      return -2;\n    }\n    if (bVar1 == 0x18) break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar3 = FUN_000300e0();\n    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;\n    bVar1 = param_2[4];\n    bVar2 = *param_2;\n    if (bVar1 == 2) {\n      return -2;\n    }\n    if (bVar1 == 0x18) break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }" { (expression_statement "iVar3 = FUN_000300e0();" (assignment_expression "iVar3 = FUN_000300e0()" identifier = (call_expression "FUN_000300e0()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;" (assignment_expression "*(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3" (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x28) + iVar3" (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) + identifier)) ;) (expression_statement "bVar1 = param_2[4];" (assignment_expression "bVar1 = param_2[4]" identifier = (subscript_expression "param_2[4]" identifier [ number_literal ])) ;) (expression_statement "bVar2 = *param_2;" (assignment_expression "bVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (bVar1 == 2) {\n      return -2;\n    }" if (parenthesized_expression "(bVar1 == 2)" ( (binary_expression "bVar1 == 2" identifier == number_literal) )) (compound_statement "{\n      return -2;\n    }" { (return_statement "return -2;" return number_literal ;) })) (if_statement "if (bVar1 == 0x18) break;" if (parenthesized_expression "(bVar1 == 0x18)" ( (binary_expression "bVar1 == 0x18" identifier == number_literal) )) (break_statement "break;" break ;)) (if_statement "if (bVar2 == 0x2c) {\n      return iVar4;\n    }" if (parenthesized_expression "(bVar2 == 0x2c)" ( (binary_expression "bVar2 == 0x2c" identifier == number_literal) )) (compound_statement "{\n      return iVar4;\n    }" { (return_statement "return iVar4;" return identifier ;) })) (if_statement "if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }" if (parenthesized_expression "(((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2))" ( (binary_expression "((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)" (parenthesized_expression "((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10))" ( (binary_expression "(bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)" (parenthesized_expression "(bVar1 == 1)" ( (binary_expression "bVar1 == 1" identifier == number_literal) )) && (parenthesized_expression "((byte)(bVar2 - 0x30) < 10)" ( (binary_expression "(byte)(bVar2 - 0x30) < 10" (call_expression "(byte)(bVar2 - 0x30)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar2 - 0x30)" ( (binary_expression "bVar2 - 0x30" identifier - number_literal) ))) < number_literal) ))) )) && (parenthesized_expression "(iVar4 != -2)" ( (binary_expression "iVar4 != -2" identifier != number_literal) ))) )) (compound_statement "{\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }" { (if_statement "if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n        iVar4 = bVar2 - 0x30;\n      }" { (expression_statement "iVar4 = bVar2 - 0x30;" (assignment_expression "iVar4 = bVar2 - 0x30" identifier = (binary_expression "bVar2 - 0x30" identifier - number_literal)) ;) }) (else_clause "else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }" else (compound_statement "{\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }" { (expression_statement "iVar4 = (uint)bVar2 + iVar4 * 10;" (assignment_expression "iVar4 = (uint)bVar2 + iVar4 * 10" identifier = (binary_expression "(uint)bVar2 + iVar4 * 10" (cast_expression "(uint)bVar2" ( (type_descriptor "uint" type_identifier) ) identifier) + (binary_expression "iVar4 * 10" identifier * number_literal))) ;) (if_statement "if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }" if (parenthesized_expression "(0x8030 < iVar4)" ( (binary_expression "0x8030 < iVar4" number_literal < identifier) )) (compound_statement "{\n          iVar4 = 0x8030;\n        }" { (expression_statement "iVar4 = 0x8030;" (assignment_expression "iVar4 = 0x8030" identifier = number_literal) ;) })) (expression_statement "iVar4 = iVar4 + -0x30;" (assignment_expression "iVar4 = iVar4 + -0x30" identifier = (binary_expression "iVar4 + -0x30" identifier + number_literal)) ;) }))) }) (else_clause "else {\n      iVar4 = -2;\n    }" else (compound_statement "{\n      iVar4 = -2;\n    }" { (expression_statement "iVar4 = -2;" (assignment_expression "iVar4 = -2" identifier = number_literal) ;) }))) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - LIT) ))) < LIT) ))) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (binary_expression IDENT * LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) })) (return_statement return IDENT ;) })))
(function_definition "int __regparm3 FUN_000307e0(int param_1,byte *param_2)\n\n{\n  byte bVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = -1;\n  while( true ) {\n    iVar3 = FUN_000300e0();\n    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;\n    bVar1 = param_2[4];\n    bVar2 = *param_2;\n    if (bVar1 == 2) {\n      return -2;\n    }\n    if (bVar1 == 0x18) break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }\n  return iVar4;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000307e0(int param_1,byte *param_2)" (identifier "FUN_000307e0") (parameter_list "(int param_1,byte *param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "byte *param_2" (type_identifier "byte") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  byte bVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = -1;\n  while( true ) {\n    iVar3 = FUN_000300e0();\n    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;\n    bVar1 = param_2[4];\n    bVar2 = *param_2;\n    if (bVar1 == 2) {\n      return -2;\n    }\n    if (bVar1 == 0x18) break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }\n  return iVar4;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "byte bVar2;" (type_identifier "byte") (identifier "bVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "iVar4 = -1;" (assignment_expression "iVar4 = -1" (identifier "iVar4") (= "=") (number_literal "-1")) (; ";")) (while_statement "while( true ) {\n    iVar3 = FUN_000300e0();\n    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;\n    bVar1 = param_2[4];\n    bVar2 = *param_2;\n    if (bVar1 == 2) {\n      return -2;\n    }\n    if (bVar1 == 0x18) break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    iVar3 = FUN_000300e0();\n    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;\n    bVar1 = param_2[4];\n    bVar2 = *param_2;\n    if (bVar1 == 2) {\n      return -2;\n    }\n    if (bVar1 == 0x18) break;\n    if (bVar2 == 0x2c) {\n      return iVar4;\n    }\n    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }\n  }" ({ "{") (expression_statement "iVar3 = FUN_000300e0();" (assignment_expression "iVar3 = FUN_000300e0()" (identifier "iVar3") (= "=") (call_expression "FUN_000300e0()" (identifier "FUN_000300e0") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;" (assignment_expression "*(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3" (pointer_expression "*(int *)(param_1 + 0x28)" (* "*") (cast_expression "(int *)(param_1 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (= "=") (binary_expression "*(int *)(param_1 + 0x28) + iVar3" (pointer_expression "*(int *)(param_1 + 0x28)" (* "*") (cast_expression "(int *)(param_1 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (+ "+") (identifier "iVar3"))) (; ";")) (expression_statement "bVar1 = param_2[4];" (assignment_expression "bVar1 = param_2[4]" (identifier "bVar1") (= "=") (subscript_expression "param_2[4]" (identifier "param_2") ([ "[") (number_literal "4") (] "]"))) (; ";")) (expression_statement "bVar2 = *param_2;" (assignment_expression "bVar2 = *param_2" (identifier "bVar2") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (if_statement "if (bVar1 == 2) {\n      return -2;\n    }" (if "if") (parenthesized_expression "(bVar1 == 2)" (( "(") (binary_expression "bVar1 == 2" (identifier "bVar1") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n      return -2;\n    }" ({ "{") (return_statement "return -2;" (return "return") (number_literal "-2") (; ";")) (} "}"))) (if_statement "if (bVar1 == 0x18) break;" (if "if") (parenthesized_expression "(bVar1 == 0x18)" (( "(") (binary_expression "bVar1 == 0x18" (identifier "bVar1") (== "==") (number_literal "0x18")) () ")")) (break_statement "break;" (break "break") (; ";"))) (if_statement "if (bVar2 == 0x2c) {\n      return iVar4;\n    }" (if "if") (parenthesized_expression "(bVar2 == 0x2c)" (( "(") (binary_expression "bVar2 == 0x2c" (identifier "bVar2") (== "==") (number_literal "0x2c")) () ")")) (compound_statement "{\n      return iVar4;\n    }" ({ "{") (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}"))) (if_statement "if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }\n    else {\n      iVar4 = -2;\n    }" (if "if") (parenthesized_expression "(((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2))" (( "(") (binary_expression "((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)" (parenthesized_expression "((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10))" (( "(") (binary_expression "(bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)" (parenthesized_expression "(bVar1 == 1)" (( "(") (binary_expression "bVar1 == 1" (identifier "bVar1") (== "==") (number_literal "1")) () ")")) (&& "&&") (parenthesized_expression "((byte)(bVar2 - 0x30) < 10)" (( "(") (binary_expression "(byte)(bVar2 - 0x30) < 10" (call_expression "(byte)(bVar2 - 0x30)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(bVar2 - 0x30)" (( "(") (binary_expression "bVar2 - 0x30" (identifier "bVar2") (- "-") (number_literal "0x30")) () ")"))) (< "<") (number_literal "10")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(iVar4 != -2)" (( "(") (binary_expression "iVar4 != -2" (identifier "iVar4") (!= "!=") (number_literal "-2")) () ")"))) () ")")) (compound_statement "{\n      if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }\n    }" ({ "{") (if_statement "if (iVar4 == -1) {\n        iVar4 = bVar2 - 0x30;\n      }\n      else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }" (if "if") (parenthesized_expression "(iVar4 == -1)" (( "(") (binary_expression "iVar4 == -1" (identifier "iVar4") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n        iVar4 = bVar2 - 0x30;\n      }" ({ "{") (expression_statement "iVar4 = bVar2 - 0x30;" (assignment_expression "iVar4 = bVar2 - 0x30" (identifier "iVar4") (= "=") (binary_expression "bVar2 - 0x30" (identifier "bVar2") (- "-") (number_literal "0x30"))) (; ";")) (} "}")) (else_clause "else {\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }" (else "else") (compound_statement "{\n        iVar4 = (uint)bVar2 + iVar4 * 10;\n        if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }\n        iVar4 = iVar4 + -0x30;\n      }" ({ "{") (expression_statement "iVar4 = (uint)bVar2 + iVar4 * 10;" (assignment_expression "iVar4 = (uint)bVar2 + iVar4 * 10" (identifier "iVar4") (= "=") (binary_expression "(uint)bVar2 + iVar4 * 10" (cast_expression "(uint)bVar2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar2")) (+ "+") (binary_expression "iVar4 * 10" (identifier "iVar4") (* "*") (number_literal "10")))) (; ";")) (if_statement "if (0x8030 < iVar4) {\n          iVar4 = 0x8030;\n        }" (if "if") (parenthesized_expression "(0x8030 < iVar4)" (( "(") (binary_expression "0x8030 < iVar4" (number_literal "0x8030") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n          iVar4 = 0x8030;\n        }" ({ "{") (expression_statement "iVar4 = 0x8030;" (assignment_expression "iVar4 = 0x8030" (identifier "iVar4") (= "=") (number_literal "0x8030")) (; ";")) (} "}"))) (expression_statement "iVar4 = iVar4 + -0x30;" (assignment_expression "iVar4 = iVar4 + -0x30" (identifier "iVar4") (= "=") (binary_expression "iVar4 + -0x30" (identifier "iVar4") (+ "+") (number_literal "-0x30"))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n      iVar4 = -2;\n    }" (else "else") (compound_statement "{\n      iVar4 = -2;\n    }" ({ "{") (expression_statement "iVar4 = -2;" (assignment_expression "iVar4 = -2" (identifier "iVar4") (= "=") (number_literal "-2")) (; ";")) (} "}")))) (} "}"))) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))

type_1 __regparm3 function_1(type_2 *input,type_3 *token,type_4 syntax)

{
  char var_3;
  type_5 var_4;
  int var_2;
  int var_5;
  
  var_5 = -1;
  while( true ) {
    var_2 = var_1(token,input,syntax);
    input->cur_idx = input->cur_idx + var_2;
    var_3 = token->field_0x4;
    var_4 = (token->opr).c;
    if (var_3 == '\x02') {
      return -2;
    }
    if (var_3 == '\x18') break;
    if (var_4 == 0x2c) {
      return var_5;
    }
    if (((var_3 == '\x01') && ((type_5)(var_4 - 0x30) < 10)) && (var_5 != -2)) {
      if (var_5 == -1) {
        var_5 = var_4 - 0x30;
      }
      else {
        var_5 = (type_6)var_4 + var_5 * 10;
        if (0x8030 < var_5) {
          var_5 = 0x8030;
        }
        var_5 = var_5 + -0x30;
      }
    }
    else {
      var_5 = -2;
    }
  }
  return var_5;
}


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

int __regparm3 MASKED(int param_1,byte *param_2)

{
  byte bVar1;
  byte bVar2;
  int iVar3;
  int iVar4;
  
  iVar4 = -1;
  while( true ) {
    iVar3 = FUN_000300e0();
    *(int *)(param_1 + 0x28) = *(int *)(param_1 + 0x28) + iVar3;
    bVar1 = param_2[4];
    bVar2 = *param_2;
    if (bVar1 == 2) {
      return -2;
    }
    if (bVar1 == 0x18) break;
    if (bVar2 == 0x2c) {
      return iVar4;
    }
    if (((bVar1 == 1) && ((byte)(bVar2 - 0x30) < 10)) && (iVar4 != -2)) {
      if (iVar4 == -1) {
        iVar4 = bVar2 - 0x30;
      }
      else {
        iVar4 = (uint)bVar2 + iVar4 * 10;
        if (0x8030 < iVar4) {
          iVar4 = 0x8030;
        }
        iVar4 = iVar4 + -0x30;
      }
    }
    else {
      iVar4 = -2;
    }
  }
  return iVar4;
}

