
/* WARNING: Unknown calling convention */

reg_errcode_t
check_arrival_expand_ecl_sub(re_dfa_t *dfa,re_node_set *dst_nodes,Idx target,Idx ex_subexp,int type)

{
  Idx *pIVar1;
  _Bool _Var2;
  int iVar3;
  reg_errcode_t rVar4;
  
  iVar3 = re_node_set_contains
                    ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target);
  while( true ) {
    if (iVar3 != 0) {
      return _REG_NOERROR;
    }
    if (((uint)(byte)dfa->nodes[target].field_0x4 == type) &&
       (dfa->nodes[target].opr.sbcset == (re_bitset_ptr_t)ex_subexp)) {
      if (type != 9) {
        return _REG_NOERROR;
      }
      _Var2 = re_node_set_insert(dst_nodes,target);
      if (_Var2) {
        return _REG_NOERROR;
      }
      return _REG_ESPACE;
    }
    _Var2 = re_node_set_insert(dst_nodes,target);
    if (!_Var2) {
      return _REG_ESPACE;
    }
    iVar3 = dfa->edests[target].nelem;
    if (iVar3 == 0) break;
    pIVar1 = dfa->edests[target].elems;
    if (iVar3 == 2) {
      rVar4 = check_arrival_expand_ecl_sub(dfa,dst_nodes,pIVar1[1],ex_subexp,type);
      if (rVar4 != _REG_NOERROR) {
        return rVar4;
      }
      target = *dfa->edests[target].elems;
    }
    else {
      target = *pIVar1;
    }
    iVar3 = re_node_set_contains
                      ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target)
    ;
  }
  return _REG_NOERROR;
}



int FUN_00018130(int *param_1,undefined4 param_2,int param_3,int param_4,uint param_5)

{
  int *piVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  
  iVar3 = FUN_000180c0();
  while( true ) {
    if (iVar3 != 0) {
      return 0;
    }
    piVar1 = (int *)(*param_1 + param_3 * 8);
    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {
      if (param_5 != 9) {
        return 0;
      }
      cVar2 = FUN_00016a00(param_2,param_3);
      if (cVar2 != '\0') {
        return 0;
      }
      return 0xc;
    }
    cVar2 = FUN_00016a00(param_2,param_3);
    if (cVar2 == '\0') {
      return 0xc;
    }
    iVar4 = param_1[5] + param_3 * 0xc;
    iVar3 = *(int *)(iVar4 + 4);
    if (iVar3 == 0) break;
    piVar1 = *(int **)(iVar4 + 8);
    if (iVar3 == 2) {
      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);
      if (iVar3 != 0) {
        return iVar3;
      }
      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);
    }
    else {
      param_3 = *piVar1;
    }
    iVar3 = FUN_000180c0();
  }
  return 0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0xc
MOV ESI,dword ptr [ESP + 0x24]
MOV EBX,dword ptr [ESP + 0x28]
MOV EDI,dword ptr [ESP + 0x20]
LEA EBP,[ESI + 0x8]
MOV EAX,dword ptr [ESI + 0x4]
MOV ECX,EBX
MOV EDX,EBP
CALL 0x000180c0
TEST EAX,EAX
JNZ 0x000181aa
MOV EAX,dword ptr [EDI]
LEA EAX,[EAX + EBX*0x8]
MOVZX EDX,byte ptr [EAX + 0x4]
CMP EDX,dword ptr [ESP + 0x30]
JNZ 0x0001816d
MOV ECX,dword ptr [ESP + 0x2c]
CMP dword ptr [EAX],ECX
JZ 0x000181e0
SUB ESP,0x8
PUSH EBX
PUSH ESI
CALL 0x00016a00
ADD ESP,0x10
TEST AL,AL
JZ 0x000181f8
LEA EBX,[EBX + EBX*0x2]
MOV EDX,dword ptr [EDI + 0x14]
SHL EBX,0x2
ADD EDX,EBX
MOV EAX,dword ptr [EDX + 0x4]
TEST EAX,EAX
JZ 0x000181aa
MOV EDX,dword ptr [EDX + 0x8]
CMP EAX,0x2
JZ 0x000181b8
MOV EBX,dword ptr [EDX]
MOV EAX,dword ptr [ESI + 0x4]
MOV ECX,EBX
MOV EDX,EBP
CALL 0x000180c0
TEST EAX,EAX
JZ 0x00018156
XOR EAX,EAX
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH dword ptr [ESP + 0x3c]
PUSH dword ptr [ESP + 0x3c]
PUSH dword ptr [EDX + 0x4]
PUSH ESI
PUSH EDI
CALL 0x00018130
ADD ESP,0x20
TEST EAX,EAX
JNZ 0x000181ac
MOV EAX,dword ptr [EDI + 0x14]
MOV EDX,dword ptr [EAX + EBX*0x1 + 0x8]
MOV EBX,dword ptr [EDX]
JMP 0x0001819a
CMP dword ptr [ESP + 0x30],0x9
JNZ 0x000181aa
SUB ESP,0x8
PUSH EBX
PUSH ESI
CALL 0x00016a00
ADD ESP,0x10
TEST AL,AL
JNZ 0x000181aa
ADD ESP,0xc
MOV EAX,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "int FUN_00018130(int *param_1,undefined4 param_2,int param_3,int param_4,uint param_5)\n\n{\n  int *piVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = FUN_000180c0();\n  while( true ) {\n    if (iVar3 != 0) {\n      return 0;\n    }\n    piVar1 = (int *)(*param_1 + param_3 * 8);\n    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }\n    cVar2 = FUN_00016a00(param_2,param_3);\n    if (cVar2 == '\0') {\n      return 0xc;\n    }\n    iVar4 = param_1[5] + param_3 * 0xc;\n    iVar3 = *(int *)(iVar4 + 4);\n    if (iVar3 == 0) break;\n    piVar1 = *(int **)(iVar4 + 8);\n    if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }\n    iVar3 = FUN_000180c0();\n  }\n  return 0;\n}\n\n" (function_definition "int FUN_00018130(int *param_1,undefined4 param_2,int param_3,int param_4,uint param_5)\n\n{\n  int *piVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = FUN_000180c0();\n  while( true ) {\n    if (iVar3 != 0) {\n      return 0;\n    }\n    piVar1 = (int *)(*param_1 + param_3 * 8);\n    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }\n    cVar2 = FUN_00016a00(param_2,param_3);\n    if (cVar2 == '\0') {\n      return 0xc;\n    }\n    iVar4 = param_1[5] + param_3 * 0xc;\n    iVar3 = *(int *)(iVar4 + 4);\n    if (iVar3 == 0) break;\n    piVar1 = *(int **)(iVar4 + 8);\n    if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }\n    iVar3 = FUN_000180c0();\n  }\n  return 0;\n}" primitive_type (function_declarator "FUN_00018130(int *param_1,undefined4 param_2,int param_3,int param_4,uint param_5)" identifier (parameter_list "(int *param_1,undefined4 param_2,int param_3,int param_4,uint param_5)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "uint param_5" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = FUN_000180c0();\n  while( true ) {\n    if (iVar3 != 0) {\n      return 0;\n    }\n    piVar1 = (int *)(*param_1 + param_3 * 8);\n    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }\n    cVar2 = FUN_00016a00(param_2,param_3);\n    if (cVar2 == '\0') {\n      return 0xc;\n    }\n    iVar4 = param_1[5] + param_3 * 0xc;\n    iVar3 = *(int *)(iVar4 + 4);\n    if (iVar3 == 0) break;\n    piVar1 = *(int **)(iVar4 + 8);\n    if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }\n    iVar3 = FUN_000180c0();\n  }\n  return 0;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar3 = FUN_000180c0();" (assignment_expression "iVar3 = FUN_000180c0()" identifier = (call_expression "FUN_000180c0()" identifier (argument_list "()" ( )))) ;) (while_statement "while( true ) {\n    if (iVar3 != 0) {\n      return 0;\n    }\n    piVar1 = (int *)(*param_1 + param_3 * 8);\n    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }\n    cVar2 = FUN_00016a00(param_2,param_3);\n    if (cVar2 == '\0') {\n      return 0xc;\n    }\n    iVar4 = param_1[5] + param_3 * 0xc;\n    iVar3 = *(int *)(iVar4 + 4);\n    if (iVar3 == 0) break;\n    piVar1 = *(int **)(iVar4 + 8);\n    if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }\n    iVar3 = FUN_000180c0();\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (iVar3 != 0) {\n      return 0;\n    }\n    piVar1 = (int *)(*param_1 + param_3 * 8);\n    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }\n    cVar2 = FUN_00016a00(param_2,param_3);\n    if (cVar2 == '\0') {\n      return 0xc;\n    }\n    iVar4 = param_1[5] + param_3 * 0xc;\n    iVar3 = *(int *)(iVar4 + 4);\n    if (iVar3 == 0) break;\n    piVar1 = *(int **)(iVar4 + 8);\n    if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }\n    iVar3 = FUN_000180c0();\n  }" { (if_statement "if (iVar3 != 0) {\n      return 0;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "piVar1 = (int *)(*param_1 + param_3 * 8);" (assignment_expression "piVar1 = (int *)(*param_1 + param_3 * 8)" identifier = (cast_expression "(int *)(*param_1 + param_3 * 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + param_3 * 8)" ( (binary_expression "*param_1 + param_3 * 8" (pointer_expression "*param_1" * identifier) + (binary_expression "param_3 * 8" identifier * number_literal)) )))) ;) (if_statement "if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }" if (parenthesized_expression "((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4))" ( (binary_expression "(*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)" (parenthesized_expression "(*(byte *)(piVar1 + 1) == param_5)" ( (binary_expression "*(byte *)(piVar1 + 1) == param_5" (pointer_expression "*(byte *)(piVar1 + 1)" * (cast_expression "(byte *)(piVar1 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1 + 1)" ( (binary_expression "piVar1 + 1" identifier + number_literal) )))) == identifier) )) && (parenthesized_expression "(*piVar1 == param_4)" ( (binary_expression "*piVar1 == param_4" (pointer_expression "*piVar1" * identifier) == identifier) ))) )) (compound_statement "{\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }" { (if_statement "if (param_5 != 9) {\n        return 0;\n      }" if (parenthesized_expression "(param_5 != 9)" ( (binary_expression "param_5 != 9" identifier != number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "cVar2 = FUN_00016a00(param_2,param_3);" (assignment_expression "cVar2 = FUN_00016a00(param_2,param_3)" identifier = (call_expression "FUN_00016a00(param_2,param_3)" identifier (argument_list "(param_2,param_3)" ( identifier , identifier )))) ;) (if_statement "if (cVar2 != '\0') {\n        return 0;\n      }" if (parenthesized_expression "(cVar2 != '\0')" ( (binary_expression "cVar2 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (return_statement "return 0xc;" return number_literal ;) })) (expression_statement "cVar2 = FUN_00016a00(param_2,param_3);" (assignment_expression "cVar2 = FUN_00016a00(param_2,param_3)" identifier = (call_expression "FUN_00016a00(param_2,param_3)" identifier (argument_list "(param_2,param_3)" ( identifier , identifier )))) ;) (if_statement "if (cVar2 == '\0') {\n      return 0xc;\n    }" if (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return 0xc;\n    }" { (return_statement "return 0xc;" return number_literal ;) })) (expression_statement "iVar4 = param_1[5] + param_3 * 0xc;" (assignment_expression "iVar4 = param_1[5] + param_3 * 0xc" identifier = (binary_expression "param_1[5] + param_3 * 0xc" (subscript_expression "param_1[5]" identifier [ number_literal ]) + (binary_expression "param_3 * 0xc" identifier * number_literal))) ;) (expression_statement "iVar3 = *(int *)(iVar4 + 4);" (assignment_expression "iVar3 = *(int *)(iVar4 + 4)" identifier = (pointer_expression "*(int *)(iVar4 + 4)" * (cast_expression "(int *)(iVar4 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 4)" ( (binary_expression "iVar4 + 4" identifier + number_literal) ))))) ;) (if_statement "if (iVar3 == 0) break;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "piVar1 = *(int **)(iVar4 + 8);" (assignment_expression "piVar1 = *(int **)(iVar4 + 8)" identifier = (pointer_expression "*(int **)(iVar4 + 8)" * (cast_expression "(int **)(iVar4 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar4 + 8)" ( (binary_expression "iVar4 + 8" identifier + number_literal) ))))) ;) (if_statement "if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }" if (parenthesized_expression "(iVar3 == 2)" ( (binary_expression "iVar3 == 2" identifier == number_literal) )) (compound_statement "{\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }" { (expression_statement "iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);" (assignment_expression "iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5)" identifier = (call_expression "FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5)" identifier (argument_list "(param_1,param_2,piVar1[1],param_4,param_5)" ( identifier , identifier , (subscript_expression "piVar1[1]" identifier [ number_literal ]) , identifier , identifier )))) ;) (if_statement "if (iVar3 != 0) {\n        return iVar3;\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        return iVar3;\n      }" { (return_statement "return iVar3;" return identifier ;) })) (expression_statement "param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);" (assignment_expression "param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc)" identifier = (pointer_expression "**(int **)(param_1[5] + 8 + param_3 * 0xc)" * (pointer_expression "*(int **)(param_1[5] + 8 + param_3 * 0xc)" * (cast_expression "(int **)(param_1[5] + 8 + param_3 * 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1[5] + 8 + param_3 * 0xc)" ( (binary_expression "param_1[5] + 8 + param_3 * 0xc" (binary_expression "param_1[5] + 8" (subscript_expression "param_1[5]" identifier [ number_literal ]) + number_literal) + (binary_expression "param_3 * 0xc" identifier * number_literal)) )))))) ;) }) (else_clause "else {\n      param_3 = *piVar1;\n    }" else (compound_statement "{\n      param_3 = *piVar1;\n    }" { (expression_statement "param_3 = *piVar1;" (assignment_expression "param_3 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) }))) (expression_statement "iVar3 = FUN_000180c0();" (assignment_expression "iVar3 = FUN_000180c0()" identifier = (call_expression "FUN_000180c0()" identifier (argument_list "()" ( )))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nreg_errcode_t\ncheck_arrival_expand_ecl_sub(re_dfa_t *dfa,re_node_set *dst_nodes,Idx target,Idx ex_subexp,int type)\n\n{\n  Idx *pIVar1;\n  _Bool _Var2;\n  int iVar3;\n  reg_errcode_t rVar4;\n  \n  iVar3 = re_node_set_contains\n                    ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target);\n  while( true ) {\n    if (iVar3 != 0) {\n      return _REG_NOERROR;\n    }\n    if (((uint)(byte)dfa->nodes[target].field_0x4 == type) &&\n       (dfa->nodes[target].opr.sbcset == (re_bitset_ptr_t)ex_subexp)) {\n      if (type != 9) {\n        return _REG_NOERROR;\n      }\n      _Var2 = re_node_set_insert(dst_nodes,target);\n      if (_Var2) {\n        return _REG_NOERROR;\n      }\n      return _REG_ESPACE;\n    }\n    _Var2 = re_node_set_insert(dst_nodes,target);\n    if (!_Var2) {\n      return _REG_ESPACE;\n    }\n    iVar3 = dfa->edests[target].nelem;\n    if (iVar3 == 0) break;\n    pIVar1 = dfa->edests[target].elems;\n    if (iVar3 == 2) {\n      rVar4 = check_arrival_expand_ecl_sub(dfa,dst_nodes,pIVar1[1],ex_subexp,type);\n      if (rVar4 != _REG_NOERROR) {\n        return rVar4;\n      }\n      target = *dfa->edests[target].elems;\n    }\n    else {\n      target = *pIVar1;\n    }\n    iVar3 = re_node_set_contains\n                      ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target)\n    ;\n  }\n  return _REG_NOERROR;\n}\n\n" comment (function_definition "reg_errcode_t\ncheck_arrival_expand_ecl_sub(re_dfa_t *dfa,re_node_set *dst_nodes,Idx target,Idx ex_subexp,int type)\n\n{\n  Idx *pIVar1;\n  _Bool _Var2;\n  int iVar3;\n  reg_errcode_t rVar4;\n  \n  iVar3 = re_node_set_contains\n                    ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target);\n  while( true ) {\n    if (iVar3 != 0) {\n      return _REG_NOERROR;\n    }\n    if (((uint)(byte)dfa->nodes[target].field_0x4 == type) &&\n       (dfa->nodes[target].opr.sbcset == (re_bitset_ptr_t)ex_subexp)) {\n      if (type != 9) {\n        return _REG_NOERROR;\n      }\n      _Var2 = re_node_set_insert(dst_nodes,target);\n      if (_Var2) {\n        return _REG_NOERROR;\n      }\n      return _REG_ESPACE;\n    }\n    _Var2 = re_node_set_insert(dst_nodes,target);\n    if (!_Var2) {\n      return _REG_ESPACE;\n    }\n    iVar3 = dfa->edests[target].nelem;\n    if (iVar3 == 0) break;\n    pIVar1 = dfa->edests[target].elems;\n    if (iVar3 == 2) {\n      rVar4 = check_arrival_expand_ecl_sub(dfa,dst_nodes,pIVar1[1],ex_subexp,type);\n      if (rVar4 != _REG_NOERROR) {\n        return rVar4;\n      }\n      target = *dfa->edests[target].elems;\n    }\n    else {\n      target = *pIVar1;\n    }\n    iVar3 = re_node_set_contains\n                      ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target)\n    ;\n  }\n  return _REG_NOERROR;\n}" type_identifier (function_declarator "check_arrival_expand_ecl_sub(re_dfa_t *dfa,re_node_set *dst_nodes,Idx target,Idx ex_subexp,int type)" identifier (parameter_list "(re_dfa_t *dfa,re_node_set *dst_nodes,Idx target,Idx ex_subexp,int type)" ( (parameter_declaration "re_dfa_t *dfa" type_identifier (pointer_declarator "*dfa" * identifier)) , (parameter_declaration "re_node_set *dst_nodes" type_identifier (pointer_declarator "*dst_nodes" * identifier)) , (parameter_declaration "Idx target" type_identifier identifier) , (parameter_declaration "Idx ex_subexp" type_identifier identifier) , (parameter_declaration "int type" primitive_type identifier) ))) (compound_statement "{\n  Idx *pIVar1;\n  _Bool _Var2;\n  int iVar3;\n  reg_errcode_t rVar4;\n  \n  iVar3 = re_node_set_contains\n                    ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target);\n  while( true ) {\n    if (iVar3 != 0) {\n      return _REG_NOERROR;\n    }\n    if (((uint)(byte)dfa->nodes[target].field_0x4 == type) &&\n       (dfa->nodes[target].opr.sbcset == (re_bitset_ptr_t)ex_subexp)) {\n      if (type != 9) {\n        return _REG_NOERROR;\n      }\n      _Var2 = re_node_set_insert(dst_nodes,target);\n      if (_Var2) {\n        return _REG_NOERROR;\n      }\n      return _REG_ESPACE;\n    }\n    _Var2 = re_node_set_insert(dst_nodes,target);\n    if (!_Var2) {\n      return _REG_ESPACE;\n    }\n    iVar3 = dfa->edests[target].nelem;\n    if (iVar3 == 0) break;\n    pIVar1 = dfa->edests[target].elems;\n    if (iVar3 == 2) {\n      rVar4 = check_arrival_expand_ecl_sub(dfa,dst_nodes,pIVar1[1],ex_subexp,type);\n      if (rVar4 != _REG_NOERROR) {\n        return rVar4;\n      }\n      target = *dfa->edests[target].elems;\n    }\n    else {\n      target = *pIVar1;\n    }\n    iVar3 = re_node_set_contains\n                      ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target)\n    ;\n  }\n  return _REG_NOERROR;\n}" { (declaration "Idx *pIVar1;" type_identifier (pointer_declarator "*pIVar1" * identifier) ;) (declaration "_Bool _Var2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "reg_errcode_t rVar4;" type_identifier identifier ;) (expression_statement "iVar3 = re_node_set_contains\n                    ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target);" (assignment_expression "iVar3 = re_node_set_contains\n                    ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target)" identifier = (call_expression "re_node_set_contains\n                    ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target)" identifier (argument_list "((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target)" ( (cast_expression "(re_node_set *)dst_nodes->nelem" ( (type_descriptor "re_node_set *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "dst_nodes->nelem" identifier -> field_identifier)) , (binary_expression "(Idx)&dst_nodes->elems" (parenthesized_expression "(Idx)" ( identifier )) & (field_expression "dst_nodes->elems" identifier -> field_identifier)) , (cast_expression "(re_node_set *)target" ( (type_descriptor "re_node_set *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (while_statement "while( true ) {\n    if (iVar3 != 0) {\n      return _REG_NOERROR;\n    }\n    if (((uint)(byte)dfa->nodes[target].field_0x4 == type) &&\n       (dfa->nodes[target].opr.sbcset == (re_bitset_ptr_t)ex_subexp)) {\n      if (type != 9) {\n        return _REG_NOERROR;\n      }\n      _Var2 = re_node_set_insert(dst_nodes,target);\n      if (_Var2) {\n        return _REG_NOERROR;\n      }\n      return _REG_ESPACE;\n    }\n    _Var2 = re_node_set_insert(dst_nodes,target);\n    if (!_Var2) {\n      return _REG_ESPACE;\n    }\n    iVar3 = dfa->edests[target].nelem;\n    if (iVar3 == 0) break;\n    pIVar1 = dfa->edests[target].elems;\n    if (iVar3 == 2) {\n      rVar4 = check_arrival_expand_ecl_sub(dfa,dst_nodes,pIVar1[1],ex_subexp,type);\n      if (rVar4 != _REG_NOERROR) {\n        return rVar4;\n      }\n      target = *dfa->edests[target].elems;\n    }\n    else {\n      target = *pIVar1;\n    }\n    iVar3 = re_node_set_contains\n                      ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target)\n    ;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (iVar3 != 0) {\n      return _REG_NOERROR;\n    }\n    if (((uint)(byte)dfa->nodes[target].field_0x4 == type) &&\n       (dfa->nodes[target].opr.sbcset == (re_bitset_ptr_t)ex_subexp)) {\n      if (type != 9) {\n        return _REG_NOERROR;\n      }\n      _Var2 = re_node_set_insert(dst_nodes,target);\n      if (_Var2) {\n        return _REG_NOERROR;\n      }\n      return _REG_ESPACE;\n    }\n    _Var2 = re_node_set_insert(dst_nodes,target);\n    if (!_Var2) {\n      return _REG_ESPACE;\n    }\n    iVar3 = dfa->edests[target].nelem;\n    if (iVar3 == 0) break;\n    pIVar1 = dfa->edests[target].elems;\n    if (iVar3 == 2) {\n      rVar4 = check_arrival_expand_ecl_sub(dfa,dst_nodes,pIVar1[1],ex_subexp,type);\n      if (rVar4 != _REG_NOERROR) {\n        return rVar4;\n      }\n      target = *dfa->edests[target].elems;\n    }\n    else {\n      target = *pIVar1;\n    }\n    iVar3 = re_node_set_contains\n                      ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target)\n    ;\n  }" { (if_statement "if (iVar3 != 0) {\n      return _REG_NOERROR;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      return _REG_NOERROR;\n    }" { (return_statement "return _REG_NOERROR;" return identifier ;) })) (if_statement "if (((uint)(byte)dfa->nodes[target].field_0x4 == type) &&\n       (dfa->nodes[target].opr.sbcset == (re_bitset_ptr_t)ex_subexp)) {\n      if (type != 9) {\n        return _REG_NOERROR;\n      }\n      _Var2 = re_node_set_insert(dst_nodes,target);\n      if (_Var2) {\n        return _REG_NOERROR;\n      }\n      return _REG_ESPACE;\n    }" if (parenthesized_expression "(((uint)(byte)dfa->nodes[target].field_0x4 == type) &&\n       (dfa->nodes[target].opr.sbcset == (re_bitset_ptr_t)ex_subexp))" ( (binary_expression "((uint)(byte)dfa->nodes[target].field_0x4 == type) &&\n       (dfa->nodes[target].opr.sbcset == (re_bitset_ptr_t)ex_subexp)" (parenthesized_expression "((uint)(byte)dfa->nodes[target].field_0x4 == type)" ( (binary_expression "(uint)(byte)dfa->nodes[target].field_0x4 == type" (cast_expression "(uint)(byte)dfa->nodes[target].field_0x4" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)dfa->nodes[target].field_0x4" ( (type_descriptor "byte" type_identifier) ) (field_expression "dfa->nodes[target].field_0x4" (subscript_expression "dfa->nodes[target]" (field_expression "dfa->nodes" identifier -> field_identifier) [ identifier ]) . field_identifier))) == identifier) )) && (parenthesized_expression "(dfa->nodes[target].opr.sbcset == (re_bitset_ptr_t)ex_subexp)" ( (binary_expression "dfa->nodes[target].opr.sbcset == (re_bitset_ptr_t)ex_subexp" (field_expression "dfa->nodes[target].opr.sbcset" (field_expression "dfa->nodes[target].opr" (subscript_expression "dfa->nodes[target]" (field_expression "dfa->nodes" identifier -> field_identifier) [ identifier ]) . field_identifier) . field_identifier) == (cast_expression "(re_bitset_ptr_t)ex_subexp" ( (type_descriptor "re_bitset_ptr_t" type_identifier) ) identifier)) ))) )) (compound_statement "{\n      if (type != 9) {\n        return _REG_NOERROR;\n      }\n      _Var2 = re_node_set_insert(dst_nodes,target);\n      if (_Var2) {\n        return _REG_NOERROR;\n      }\n      return _REG_ESPACE;\n    }" { (if_statement "if (type != 9) {\n        return _REG_NOERROR;\n      }" if (parenthesized_expression "(type != 9)" ( (binary_expression "type != 9" identifier != number_literal) )) (compound_statement "{\n        return _REG_NOERROR;\n      }" { (return_statement "return _REG_NOERROR;" return identifier ;) })) (expression_statement "_Var2 = re_node_set_insert(dst_nodes,target);" (assignment_expression "_Var2 = re_node_set_insert(dst_nodes,target)" identifier = (call_expression "re_node_set_insert(dst_nodes,target)" identifier (argument_list "(dst_nodes,target)" ( identifier , identifier )))) ;) (if_statement "if (_Var2) {\n        return _REG_NOERROR;\n      }" if (parenthesized_expression "(_Var2)" ( identifier )) (compound_statement "{\n        return _REG_NOERROR;\n      }" { (return_statement "return _REG_NOERROR;" return identifier ;) })) (return_statement "return _REG_ESPACE;" return identifier ;) })) (expression_statement "_Var2 = re_node_set_insert(dst_nodes,target);" (assignment_expression "_Var2 = re_node_set_insert(dst_nodes,target)" identifier = (call_expression "re_node_set_insert(dst_nodes,target)" identifier (argument_list "(dst_nodes,target)" ( identifier , identifier )))) ;) (if_statement "if (!_Var2) {\n      return _REG_ESPACE;\n    }" if (parenthesized_expression "(!_Var2)" ( (unary_expression "!_Var2" ! identifier) )) (compound_statement "{\n      return _REG_ESPACE;\n    }" { (return_statement "return _REG_ESPACE;" return identifier ;) })) (expression_statement "iVar3 = dfa->edests[target].nelem;" (assignment_expression "iVar3 = dfa->edests[target].nelem" identifier = (field_expression "dfa->edests[target].nelem" (subscript_expression "dfa->edests[target]" (field_expression "dfa->edests" identifier -> field_identifier) [ identifier ]) . field_identifier)) ;) (if_statement "if (iVar3 == 0) break;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "pIVar1 = dfa->edests[target].elems;" (assignment_expression "pIVar1 = dfa->edests[target].elems" identifier = (field_expression "dfa->edests[target].elems" (subscript_expression "dfa->edests[target]" (field_expression "dfa->edests" identifier -> field_identifier) [ identifier ]) . field_identifier)) ;) (if_statement "if (iVar3 == 2) {\n      rVar4 = check_arrival_expand_ecl_sub(dfa,dst_nodes,pIVar1[1],ex_subexp,type);\n      if (rVar4 != _REG_NOERROR) {\n        return rVar4;\n      }\n      target = *dfa->edests[target].elems;\n    }\n    else {\n      target = *pIVar1;\n    }" if (parenthesized_expression "(iVar3 == 2)" ( (binary_expression "iVar3 == 2" identifier == number_literal) )) (compound_statement "{\n      rVar4 = check_arrival_expand_ecl_sub(dfa,dst_nodes,pIVar1[1],ex_subexp,type);\n      if (rVar4 != _REG_NOERROR) {\n        return rVar4;\n      }\n      target = *dfa->edests[target].elems;\n    }" { (expression_statement "rVar4 = check_arrival_expand_ecl_sub(dfa,dst_nodes,pIVar1[1],ex_subexp,type);" (assignment_expression "rVar4 = check_arrival_expand_ecl_sub(dfa,dst_nodes,pIVar1[1],ex_subexp,type)" identifier = (call_expression "check_arrival_expand_ecl_sub(dfa,dst_nodes,pIVar1[1],ex_subexp,type)" identifier (argument_list "(dfa,dst_nodes,pIVar1[1],ex_subexp,type)" ( identifier , identifier , (subscript_expression "pIVar1[1]" identifier [ number_literal ]) , identifier , identifier )))) ;) (if_statement "if (rVar4 != _REG_NOERROR) {\n        return rVar4;\n      }" if (parenthesized_expression "(rVar4 != _REG_NOERROR)" ( (binary_expression "rVar4 != _REG_NOERROR" identifier != identifier) )) (compound_statement "{\n        return rVar4;\n      }" { (return_statement "return rVar4;" return identifier ;) })) (expression_statement "target = *dfa->edests[target].elems;" (assignment_expression "target = *dfa->edests[target].elems" identifier = (pointer_expression "*dfa->edests[target].elems" * (field_expression "dfa->edests[target].elems" (subscript_expression "dfa->edests[target]" (field_expression "dfa->edests" identifier -> field_identifier) [ identifier ]) . field_identifier))) ;) }) (else_clause "else {\n      target = *pIVar1;\n    }" else (compound_statement "{\n      target = *pIVar1;\n    }" { (expression_statement "target = *pIVar1;" (assignment_expression "target = *pIVar1" identifier = (pointer_expression "*pIVar1" * identifier)) ;) }))) (expression_statement "iVar3 = re_node_set_contains\n                      ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target)\n    ;" (assignment_expression "iVar3 = re_node_set_contains\n                      ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target)" identifier = (call_expression "re_node_set_contains\n                      ((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target)" identifier (argument_list "((re_node_set *)dst_nodes->nelem,(Idx)&dst_nodes->elems,(re_node_set *)target)" ( (cast_expression "(re_node_set *)dst_nodes->nelem" ( (type_descriptor "re_node_set *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "dst_nodes->nelem" identifier -> field_identifier)) , (binary_expression "(Idx)&dst_nodes->elems" (parenthesized_expression "(Idx)" ( identifier )) & (field_expression "dst_nodes->elems" identifier -> field_identifier)) , (cast_expression "(re_node_set *)target" ( (type_descriptor "re_node_set *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) })) (return_statement "return _REG_NOERROR;" return identifier ;) })))
(translation_unit "int FUN_00018130(int *param_1,undefined4 param_2,int param_3,int param_4,uint param_5)\n\n{\n  int *piVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = FUN_000180c0();\n  while( true ) {\n    if (iVar3 != 0) {\n      return 0;\n    }\n    piVar1 = (int *)(*param_1 + param_3 * 8);\n    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }\n    cVar2 = FUN_00016a00(param_2,param_3);\n    if (cVar2 == '\0') {\n      return 0xc;\n    }\n    iVar4 = param_1[5] + param_3 * 0xc;\n    iVar3 = *(int *)(iVar4 + 4);\n    if (iVar3 == 0) break;\n    piVar1 = *(int **)(iVar4 + 8);\n    if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }\n    iVar3 = FUN_000180c0();\n  }\n  return 0;\n}\n\n" (function_definition "int FUN_00018130(int *param_1,undefined4 param_2,int param_3,int param_4,uint param_5)\n\n{\n  int *piVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = FUN_000180c0();\n  while( true ) {\n    if (iVar3 != 0) {\n      return 0;\n    }\n    piVar1 = (int *)(*param_1 + param_3 * 8);\n    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }\n    cVar2 = FUN_00016a00(param_2,param_3);\n    if (cVar2 == '\0') {\n      return 0xc;\n    }\n    iVar4 = param_1[5] + param_3 * 0xc;\n    iVar3 = *(int *)(iVar4 + 4);\n    if (iVar3 == 0) break;\n    piVar1 = *(int **)(iVar4 + 8);\n    if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }\n    iVar3 = FUN_000180c0();\n  }\n  return 0;\n}" primitive_type (function_declarator "FUN_00018130(int *param_1,undefined4 param_2,int param_3,int param_4,uint param_5)" identifier (parameter_list "(int *param_1,undefined4 param_2,int param_3,int param_4,uint param_5)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "uint param_5" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = FUN_000180c0();\n  while( true ) {\n    if (iVar3 != 0) {\n      return 0;\n    }\n    piVar1 = (int *)(*param_1 + param_3 * 8);\n    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }\n    cVar2 = FUN_00016a00(param_2,param_3);\n    if (cVar2 == '\0') {\n      return 0xc;\n    }\n    iVar4 = param_1[5] + param_3 * 0xc;\n    iVar3 = *(int *)(iVar4 + 4);\n    if (iVar3 == 0) break;\n    piVar1 = *(int **)(iVar4 + 8);\n    if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }\n    iVar3 = FUN_000180c0();\n  }\n  return 0;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar3 = FUN_000180c0();" (assignment_expression "iVar3 = FUN_000180c0()" identifier = (call_expression "FUN_000180c0()" identifier (argument_list "()" ( )))) ;) (while_statement "while( true ) {\n    if (iVar3 != 0) {\n      return 0;\n    }\n    piVar1 = (int *)(*param_1 + param_3 * 8);\n    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }\n    cVar2 = FUN_00016a00(param_2,param_3);\n    if (cVar2 == '\0') {\n      return 0xc;\n    }\n    iVar4 = param_1[5] + param_3 * 0xc;\n    iVar3 = *(int *)(iVar4 + 4);\n    if (iVar3 == 0) break;\n    piVar1 = *(int **)(iVar4 + 8);\n    if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }\n    iVar3 = FUN_000180c0();\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (iVar3 != 0) {\n      return 0;\n    }\n    piVar1 = (int *)(*param_1 + param_3 * 8);\n    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }\n    cVar2 = FUN_00016a00(param_2,param_3);\n    if (cVar2 == '\0') {\n      return 0xc;\n    }\n    iVar4 = param_1[5] + param_3 * 0xc;\n    iVar3 = *(int *)(iVar4 + 4);\n    if (iVar3 == 0) break;\n    piVar1 = *(int **)(iVar4 + 8);\n    if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }\n    iVar3 = FUN_000180c0();\n  }" { (if_statement "if (iVar3 != 0) {\n      return 0;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "piVar1 = (int *)(*param_1 + param_3 * 8);" (assignment_expression "piVar1 = (int *)(*param_1 + param_3 * 8)" identifier = (cast_expression "(int *)(*param_1 + param_3 * 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + param_3 * 8)" ( (binary_expression "*param_1 + param_3 * 8" (pointer_expression "*param_1" * identifier) + (binary_expression "param_3 * 8" identifier * number_literal)) )))) ;) (if_statement "if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }" if (parenthesized_expression "((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4))" ( (binary_expression "(*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)" (parenthesized_expression "(*(byte *)(piVar1 + 1) == param_5)" ( (binary_expression "*(byte *)(piVar1 + 1) == param_5" (pointer_expression "*(byte *)(piVar1 + 1)" * (cast_expression "(byte *)(piVar1 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1 + 1)" ( (binary_expression "piVar1 + 1" identifier + number_literal) )))) == identifier) )) && (parenthesized_expression "(*piVar1 == param_4)" ( (binary_expression "*piVar1 == param_4" (pointer_expression "*piVar1" * identifier) == identifier) ))) )) (compound_statement "{\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }" { (if_statement "if (param_5 != 9) {\n        return 0;\n      }" if (parenthesized_expression "(param_5 != 9)" ( (binary_expression "param_5 != 9" identifier != number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "cVar2 = FUN_00016a00(param_2,param_3);" (assignment_expression "cVar2 = FUN_00016a00(param_2,param_3)" identifier = (call_expression "FUN_00016a00(param_2,param_3)" identifier (argument_list "(param_2,param_3)" ( identifier , identifier )))) ;) (if_statement "if (cVar2 != '\0') {\n        return 0;\n      }" if (parenthesized_expression "(cVar2 != '\0')" ( (binary_expression "cVar2 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (return_statement "return 0xc;" return number_literal ;) })) (expression_statement "cVar2 = FUN_00016a00(param_2,param_3);" (assignment_expression "cVar2 = FUN_00016a00(param_2,param_3)" identifier = (call_expression "FUN_00016a00(param_2,param_3)" identifier (argument_list "(param_2,param_3)" ( identifier , identifier )))) ;) (if_statement "if (cVar2 == '\0') {\n      return 0xc;\n    }" if (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return 0xc;\n    }" { (return_statement "return 0xc;" return number_literal ;) })) (expression_statement "iVar4 = param_1[5] + param_3 * 0xc;" (assignment_expression "iVar4 = param_1[5] + param_3 * 0xc" identifier = (binary_expression "param_1[5] + param_3 * 0xc" (subscript_expression "param_1[5]" identifier [ number_literal ]) + (binary_expression "param_3 * 0xc" identifier * number_literal))) ;) (expression_statement "iVar3 = *(int *)(iVar4 + 4);" (assignment_expression "iVar3 = *(int *)(iVar4 + 4)" identifier = (pointer_expression "*(int *)(iVar4 + 4)" * (cast_expression "(int *)(iVar4 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 4)" ( (binary_expression "iVar4 + 4" identifier + number_literal) ))))) ;) (if_statement "if (iVar3 == 0) break;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "piVar1 = *(int **)(iVar4 + 8);" (assignment_expression "piVar1 = *(int **)(iVar4 + 8)" identifier = (pointer_expression "*(int **)(iVar4 + 8)" * (cast_expression "(int **)(iVar4 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar4 + 8)" ( (binary_expression "iVar4 + 8" identifier + number_literal) ))))) ;) (if_statement "if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }" if (parenthesized_expression "(iVar3 == 2)" ( (binary_expression "iVar3 == 2" identifier == number_literal) )) (compound_statement "{\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }" { (expression_statement "iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);" (assignment_expression "iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5)" identifier = (call_expression "FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5)" identifier (argument_list "(param_1,param_2,piVar1[1],param_4,param_5)" ( identifier , identifier , (subscript_expression "piVar1[1]" identifier [ number_literal ]) , identifier , identifier )))) ;) (if_statement "if (iVar3 != 0) {\n        return iVar3;\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        return iVar3;\n      }" { (return_statement "return iVar3;" return identifier ;) })) (expression_statement "param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);" (assignment_expression "param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc)" identifier = (pointer_expression "**(int **)(param_1[5] + 8 + param_3 * 0xc)" * (pointer_expression "*(int **)(param_1[5] + 8 + param_3 * 0xc)" * (cast_expression "(int **)(param_1[5] + 8 + param_3 * 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1[5] + 8 + param_3 * 0xc)" ( (binary_expression "param_1[5] + 8 + param_3 * 0xc" (binary_expression "param_1[5] + 8" (subscript_expression "param_1[5]" identifier [ number_literal ]) + number_literal) + (binary_expression "param_3 * 0xc" identifier * number_literal)) )))))) ;) }) (else_clause "else {\n      param_3 = *piVar1;\n    }" else (compound_statement "{\n      param_3 = *piVar1;\n    }" { (expression_statement "param_3 = *piVar1;" (assignment_expression "param_3 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) }))) (expression_statement "iVar3 = FUN_000180c0();" (assignment_expression "iVar3 = FUN_000180c0()" identifier = (call_expression "FUN_000180c0()" identifier (argument_list "()" ( )))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + (binary_expression IDENT * LIT)) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == IDENT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == IDENT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return LIT ;) })) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) + (binary_expression IDENT * LIT))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (subscript_expression IDENT [ LIT ]) , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) + (binary_expression IDENT * LIT)) )))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) })) (return_statement return LIT ;) })))
(function_definition "int FUN_00018130(int *param_1,undefined4 param_2,int param_3,int param_4,uint param_5)\n\n{\n  int *piVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = FUN_000180c0();\n  while( true ) {\n    if (iVar3 != 0) {\n      return 0;\n    }\n    piVar1 = (int *)(*param_1 + param_3 * 8);\n    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }\n    cVar2 = FUN_00016a00(param_2,param_3);\n    if (cVar2 == '\0') {\n      return 0xc;\n    }\n    iVar4 = param_1[5] + param_3 * 0xc;\n    iVar3 = *(int *)(iVar4 + 4);\n    if (iVar3 == 0) break;\n    piVar1 = *(int **)(iVar4 + 8);\n    if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }\n    iVar3 = FUN_000180c0();\n  }\n  return 0;\n}" (primitive_type "int") (function_declarator "FUN_00018130(int *param_1,undefined4 param_2,int param_3,int param_4,uint param_5)" (identifier "FUN_00018130") (parameter_list "(int *param_1,undefined4 param_2,int param_3,int param_4,uint param_5)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "uint param_5" (type_identifier "uint") (identifier "param_5")) () ")"))) (compound_statement "{\n  int *piVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = FUN_000180c0();\n  while( true ) {\n    if (iVar3 != 0) {\n      return 0;\n    }\n    piVar1 = (int *)(*param_1 + param_3 * 8);\n    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }\n    cVar2 = FUN_00016a00(param_2,param_3);\n    if (cVar2 == '\0') {\n      return 0xc;\n    }\n    iVar4 = param_1[5] + param_3 * 0xc;\n    iVar3 = *(int *)(iVar4 + 4);\n    if (iVar3 == 0) break;\n    piVar1 = *(int **)(iVar4 + 8);\n    if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }\n    iVar3 = FUN_000180c0();\n  }\n  return 0;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "char cVar2;" (primitive_type "char") (identifier "cVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "iVar3 = FUN_000180c0();" (assignment_expression "iVar3 = FUN_000180c0()" (identifier "iVar3") (= "=") (call_expression "FUN_000180c0()" (identifier "FUN_000180c0") (argument_list "()" (( "(") () ")")))) (; ";")) (while_statement "while( true ) {\n    if (iVar3 != 0) {\n      return 0;\n    }\n    piVar1 = (int *)(*param_1 + param_3 * 8);\n    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }\n    cVar2 = FUN_00016a00(param_2,param_3);\n    if (cVar2 == '\0') {\n      return 0xc;\n    }\n    iVar4 = param_1[5] + param_3 * 0xc;\n    iVar3 = *(int *)(iVar4 + 4);\n    if (iVar3 == 0) break;\n    piVar1 = *(int **)(iVar4 + 8);\n    if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }\n    iVar3 = FUN_000180c0();\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    if (iVar3 != 0) {\n      return 0;\n    }\n    piVar1 = (int *)(*param_1 + param_3 * 8);\n    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }\n    cVar2 = FUN_00016a00(param_2,param_3);\n    if (cVar2 == '\0') {\n      return 0xc;\n    }\n    iVar4 = param_1[5] + param_3 * 0xc;\n    iVar3 = *(int *)(iVar4 + 4);\n    if (iVar3 == 0) break;\n    piVar1 = *(int **)(iVar4 + 8);\n    if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }\n    iVar3 = FUN_000180c0();\n  }" ({ "{") (if_statement "if (iVar3 != 0) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "piVar1 = (int *)(*param_1 + param_3 * 8);" (assignment_expression "piVar1 = (int *)(*param_1 + param_3 * 8)" (identifier "piVar1") (= "=") (cast_expression "(int *)(*param_1 + param_3 * 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + param_3 * 8)" (( "(") (binary_expression "*param_1 + param_3 * 8" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (binary_expression "param_3 * 8" (identifier "param_3") (* "*") (number_literal "8"))) () ")")))) (; ";")) (if_statement "if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }" (if "if") (parenthesized_expression "((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4))" (( "(") (binary_expression "(*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)" (parenthesized_expression "(*(byte *)(piVar1 + 1) == param_5)" (( "(") (binary_expression "*(byte *)(piVar1 + 1) == param_5" (pointer_expression "*(byte *)(piVar1 + 1)" (* "*") (cast_expression "(byte *)(piVar1 + 1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar1 + 1)" (( "(") (binary_expression "piVar1 + 1" (identifier "piVar1") (+ "+") (number_literal "1")) () ")")))) (== "==") (identifier "param_5")) () ")")) (&& "&&") (parenthesized_expression "(*piVar1 == param_4)" (( "(") (binary_expression "*piVar1 == param_4" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (== "==") (identifier "param_4")) () ")"))) () ")")) (compound_statement "{\n      if (param_5 != 9) {\n        return 0;\n      }\n      cVar2 = FUN_00016a00(param_2,param_3);\n      if (cVar2 != '\0') {\n        return 0;\n      }\n      return 0xc;\n    }" ({ "{") (if_statement "if (param_5 != 9) {\n        return 0;\n      }" (if "if") (parenthesized_expression "(param_5 != 9)" (( "(") (binary_expression "param_5 != 9" (identifier "param_5") (!= "!=") (number_literal "9")) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "cVar2 = FUN_00016a00(param_2,param_3);" (assignment_expression "cVar2 = FUN_00016a00(param_2,param_3)" (identifier "cVar2") (= "=") (call_expression "FUN_00016a00(param_2,param_3)" (identifier "FUN_00016a00") (argument_list "(param_2,param_3)" (( "(") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (cVar2 != '\0') {\n        return 0;\n      }" (if "if") (parenthesized_expression "(cVar2 != '\0')" (( "(") (binary_expression "cVar2 != '\0'" (identifier "cVar2") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (return_statement "return 0xc;" (return "return") (number_literal "0xc") (; ";")) (} "}"))) (expression_statement "cVar2 = FUN_00016a00(param_2,param_3);" (assignment_expression "cVar2 = FUN_00016a00(param_2,param_3)" (identifier "cVar2") (= "=") (call_expression "FUN_00016a00(param_2,param_3)" (identifier "FUN_00016a00") (argument_list "(param_2,param_3)" (( "(") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (cVar2 == '\0') {\n      return 0xc;\n    }" (if "if") (parenthesized_expression "(cVar2 == '\0')" (( "(") (binary_expression "cVar2 == '\0'" (identifier "cVar2") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      return 0xc;\n    }" ({ "{") (return_statement "return 0xc;" (return "return") (number_literal "0xc") (; ";")) (} "}"))) (expression_statement "iVar4 = param_1[5] + param_3 * 0xc;" (assignment_expression "iVar4 = param_1[5] + param_3 * 0xc" (identifier "iVar4") (= "=") (binary_expression "param_1[5] + param_3 * 0xc" (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) (+ "+") (binary_expression "param_3 * 0xc" (identifier "param_3") (* "*") (number_literal "0xc")))) (; ";")) (expression_statement "iVar3 = *(int *)(iVar4 + 4);" (assignment_expression "iVar3 = *(int *)(iVar4 + 4)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(iVar4 + 4)" (* "*") (cast_expression "(int *)(iVar4 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 4)" (( "(") (binary_expression "iVar4 + 4" (identifier "iVar4") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (if_statement "if (iVar3 == 0) break;" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "piVar1 = *(int **)(iVar4 + 8);" (assignment_expression "piVar1 = *(int **)(iVar4 + 8)" (identifier "piVar1") (= "=") (pointer_expression "*(int **)(iVar4 + 8)" (* "*") (cast_expression "(int **)(iVar4 + 8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar4 + 8)" (( "(") (binary_expression "iVar4 + 8" (identifier "iVar4") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (if_statement "if (iVar3 == 2) {\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }\n    else {\n      param_3 = *piVar1;\n    }" (if "if") (parenthesized_expression "(iVar3 == 2)" (( "(") (binary_expression "iVar3 == 2" (identifier "iVar3") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n      iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);\n      if (iVar3 != 0) {\n        return iVar3;\n      }\n      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);\n    }" ({ "{") (expression_statement "iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5);" (assignment_expression "iVar3 = FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5)" (identifier "iVar3") (= "=") (call_expression "FUN_00018130(param_1,param_2,piVar1[1],param_4,param_5)" (identifier "FUN_00018130") (argument_list "(param_1,param_2,piVar1[1],param_4,param_5)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (subscript_expression "piVar1[1]" (identifier "piVar1") ([ "[") (number_literal "1") (] "]")) (, ",") (identifier "param_4") (, ",") (identifier "param_5") () ")")))) (; ";")) (if_statement "if (iVar3 != 0) {\n        return iVar3;\n      }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        return iVar3;\n      }" ({ "{") (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}"))) (expression_statement "param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);" (assignment_expression "param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc)" (identifier "param_3") (= "=") (pointer_expression "**(int **)(param_1[5] + 8 + param_3 * 0xc)" (* "*") (pointer_expression "*(int **)(param_1[5] + 8 + param_3 * 0xc)" (* "*") (cast_expression "(int **)(param_1[5] + 8 + param_3 * 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1[5] + 8 + param_3 * 0xc)" (( "(") (binary_expression "param_1[5] + 8 + param_3 * 0xc" (binary_expression "param_1[5] + 8" (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) (+ "+") (number_literal "8")) (+ "+") (binary_expression "param_3 * 0xc" (identifier "param_3") (* "*") (number_literal "0xc"))) () ")")))))) (; ";")) (} "}")) (else_clause "else {\n      param_3 = *piVar1;\n    }" (else "else") (compound_statement "{\n      param_3 = *piVar1;\n    }" ({ "{") (expression_statement "param_3 = *piVar1;" (assignment_expression "param_3 = *piVar1" (identifier "param_3") (= "=") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) (; ";")) (} "}")))) (expression_statement "iVar3 = FUN_000180c0();" (assignment_expression "iVar3 = FUN_000180c0()" (identifier "iVar3") (= "=") (call_expression "FUN_000180c0()" (identifier "FUN_000180c0") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

type_1
function_1(type_2 *dfa,type_3 *dst_nodes,type_4 target,type_4 ex_subexp,int var_3)

{
  type_4 *pIVar1;
  type_5 _Var2;
  int var_2;
  type_1 var_5;
  
  var_2 = var_1
                    ((type_3 *)dst_nodes->nelem,(type_4)&dst_nodes->elems,(type_3 *)target);
  while( true ) {
    if (var_2 != 0) {
      return var_6;
    }
    if (((type_6)(type_7)dfa->nodes[target].field_0x4 == var_3) &&
       (dfa->nodes[target].opr.sbcset == (type_8)ex_subexp)) {
      if (var_3 != 9) {
        return var_6;
      }
      _Var2 = var_4(dst_nodes,target);
      if (_Var2) {
        return var_6;
      }
      return _REG_ESPACE;
    }
    _Var2 = var_4(dst_nodes,target);
    if (!_Var2) {
      return _REG_ESPACE;
    }
    var_2 = dfa->edests[target].nelem;
    if (var_2 == 0) break;
    pIVar1 = dfa->edests[target].elems;
    if (var_2 == 2) {
      var_5 = function_1(dfa,dst_nodes,pIVar1[1],ex_subexp,var_3);
      if (var_5 != var_6) {
        return var_5;
      }
      target = *dfa->edests[target].elems;
    }
    else {
      target = *pIVar1;
    }
    var_2 = var_1
                      ((type_3 *)dst_nodes->nelem,(type_4)&dst_nodes->elems,(type_3 *)target)
    ;
  }
  return var_6;
}


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

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

{
  int *piVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  
  iVar3 = FUN_000180c0();
  while( true ) {
    if (iVar3 != 0) {
      return 0;
    }
    piVar1 = (int *)(*param_1 + param_3 * 8);
    if ((*(byte *)(piVar1 + 1) == param_5) && (*piVar1 == param_4)) {
      if (param_5 != 9) {
        return 0;
      }
      cVar2 = FUN_00016a00(param_2,param_3);
      if (cVar2 != '\0') {
        return 0;
      }
      return 0xc;
    }
    cVar2 = FUN_00016a00(param_2,param_3);
    if (cVar2 == '\0') {
      return 0xc;
    }
    iVar4 = param_1[5] + param_3 * 0xc;
    iVar3 = *(int *)(iVar4 + 4);
    if (iVar3 == 0) break;
    piVar1 = *(int **)(iVar4 + 8);
    if (iVar3 == 2) {
      iVar3 = MASKED(param_1,param_2,piVar1[1],param_4,param_5);
      if (iVar3 != 0) {
        return iVar3;
      }
      param_3 = **(int **)(param_1[5] + 8 + param_3 * 0xc);
    }
    else {
      param_3 = *piVar1;
    }
    iVar3 = FUN_000180c0();
  }
  return 0;
}

