
/* DWARF original prototype: int ctrl_find_set(controlbox * b, char * path, int start, controlbox *
   b) */

int __regparm3 ctrl_find_set(controlbox *b,char *path,int start,controlbox *b_1)

{
  char cVar1;
  char cVar2;
  controlbox *pcVar3;
  int iVar4;
  char *pcVar5;
  char *pcVar6;
  int local_1c;
  
  if ((int)b < 1) {
    return (int)b;
  }
  local_1c = 0;
  pcVar3 = (controlbox *)0x0;
LAB_00029420:
  pcVar6 = (char *)**(undefined4 **)(*(int *)path + (int)pcVar3 * 4);
  iVar4 = 0;
  pcVar5 = (char *)start;
  do {
    cVar1 = *pcVar5;
    cVar2 = *pcVar6;
    if (cVar1 == '\0') {
      if (cVar2 == '\0') {
        return (int)pcVar3;
      }
      if (cVar2 != '/') break;
LAB_00029439:
      iVar4 = iVar4 + 1;
    }
    else if (cVar1 == '/') {
      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;
      break;
    }
    if (cVar1 != cVar2) break;
    pcVar5 = pcVar5 + 1;
    pcVar6 = pcVar6 + 1;
  } while( true );
  if (iVar4 < local_1c) {
    return (int)pcVar3;
  }
  if (iVar4 == 0x7fffffff) {
    return (int)pcVar3;
  }
  pcVar3 = (controlbox *)((int)&pcVar3->nctrlsets + 1);
  local_1c = iVar4;
  if (pcVar3 == b) {
    return (int)pcVar3;
  }
  goto LAB_00029420;
}



void __regparm3 FUN_00029400(int param_1,int *param_2,char *param_3)

{
  char cVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  char *pcVar5;
  char *pcVar6;
  int local_1c;
  
  if (param_1 < 1) {
    return;
  }
  local_1c = 0;
  iVar3 = 0;
LAB_00029420:
  pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);
  iVar4 = 0;
  pcVar5 = param_3;
  do {
    cVar1 = *pcVar5;
    cVar2 = *pcVar6;
    if (cVar1 == '\0') {
      if (cVar2 == '\0') {
        return;
      }
      if (cVar2 != '/') break;
LAB_00029439:
      iVar4 = iVar4 + 1;
    }
    else if (cVar1 == '/') {
      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;
      break;
    }
    if (cVar1 != cVar2) break;
    pcVar5 = pcVar5 + 1;
    pcVar6 = pcVar6 + 1;
  } while( true );
  if (iVar4 < local_1c) {
    return;
  }
  if (iVar4 == 0x7fffffff) {
    return;
  }
  iVar3 = iVar3 + 1;
  local_1c = iVar4;
  if (iVar3 == param_1) {
    return;
  }
  goto LAB_00029420;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0xc
MOV dword ptr [ESP + 0x8],EAX
MOV dword ptr [ESP + 0x4],ECX
TEST EAX,EAX
JLE 0x00029477
MOV dword ptr [ESP],0x0
MOV EBP,dword ptr [EDX]
XOR EAX,EAX
NOP
MOV EDX,dword ptr [EBP + EAX*0x4]
MOV ESI,dword ptr [ESP + 0x4]
MOV EDI,dword ptr [EDX]
XOR EDX,EDX
JMP 0x00029446
TEST CL,CL
JZ 0x00029477
CMP CL,0x2f
JNZ 0x0002945e
ADD EDX,0x1
CMP BL,CL
JNZ 0x0002945e
ADD ESI,0x1
ADD EDI,0x1
MOVZX EBX,byte ptr [ESI]
MOVZX ECX,byte ptr [EDI]
TEST BL,BL
JZ 0x00029430
CMP BL,0x2f
JNZ 0x0002943c
CMP CL,0x2f
JZ 0x00029439
TEST CL,CL
JZ 0x00029439
CMP dword ptr [ESP],EDX
JG 0x00029477
CMP EDX,0x7fffffff
JZ 0x00029477
ADD EAX,0x1
MOV dword ptr [ESP],EDX
CMP EAX,dword ptr [ESP + 0x8]
JNZ 0x00029420
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "void __regparm3 FUN_00029400(int param_1,int *param_2,char *param_3)\n\n{\n  char cVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  char *pcVar6;\n  int local_1c;\n  \n  if (param_1 < 1) {\n    return;\n  }\n  local_1c = 0;\n  iVar3 = 0;\nLAB_00029420:\n  pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);\n  iVar4 = 0;\n  pcVar5 = param_3;\n  do {\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  } while( true );\n  if (iVar4 < local_1c) {\n    return;\n  }\n  if (iVar4 == 0x7fffffff) {\n    return;\n  }\n  iVar3 = iVar3 + 1;\n  local_1c = iVar4;\n  if (iVar3 == param_1) {\n    return;\n  }\n  goto LAB_00029420;\n}\n\n" (function_definition "void __regparm3 FUN_00029400(int param_1,int *param_2,char *param_3)\n\n{\n  char cVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  char *pcVar6;\n  int local_1c;\n  \n  if (param_1 < 1) {\n    return;\n  }\n  local_1c = 0;\n  iVar3 = 0;\nLAB_00029420:\n  pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);\n  iVar4 = 0;\n  pcVar5 = param_3;\n  do {\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  } while( true );\n  if (iVar4 < local_1c) {\n    return;\n  }\n  if (iVar4 == 0x7fffffff) {\n    return;\n  }\n  iVar3 = iVar3 + 1;\n  local_1c = iVar4;\n  if (iVar3 == param_1) {\n    return;\n  }\n  goto LAB_00029420;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00029400(int param_1,int *param_2,char *param_3)" identifier (parameter_list "(int param_1,int *param_2,char *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  char *pcVar6;\n  int local_1c;\n  \n  if (param_1 < 1) {\n    return;\n  }\n  local_1c = 0;\n  iVar3 = 0;\nLAB_00029420:\n  pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);\n  iVar4 = 0;\n  pcVar5 = param_3;\n  do {\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  } while( true );\n  if (iVar4 < local_1c) {\n    return;\n  }\n  if (iVar4 == 0x7fffffff) {\n    return;\n  }\n  iVar3 = iVar3 + 1;\n  local_1c = iVar4;\n  if (iVar3 == param_1) {\n    return;\n  }\n  goto LAB_00029420;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "int local_1c;" primitive_type identifier ;) (if_statement "if (param_1 < 1) {\n    return;\n  }" if (parenthesized_expression "(param_1 < 1)" ( (binary_expression "param_1 < 1" identifier < number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "local_1c = 0;" (assignment_expression "local_1c = 0" identifier = number_literal) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (labeled_statement "LAB_00029420:\n  pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);" statement_identifier : (expression_statement "pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);" (assignment_expression "pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4)" identifier = (cast_expression "(char *)**(undefined4 **)(*param_2 + iVar3 * 4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "**(undefined4 **)(*param_2 + iVar3 * 4)" * (pointer_expression "*(undefined4 **)(*param_2 + iVar3 * 4)" * (cast_expression "(undefined4 **)(*param_2 + iVar3 * 4)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_2 + iVar3 * 4)" ( (binary_expression "*param_2 + iVar3 * 4" (pointer_expression "*param_2" * identifier) + (binary_expression "iVar3 * 4" identifier * number_literal)) ))))))) ;)) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (expression_statement "pcVar5 = param_3;" (assignment_expression "pcVar5 = param_3" identifier = identifier) ;) (do_statement "do {\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  } while( true );" do (compound_statement "{\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  }" { (expression_statement "cVar1 = *pcVar5;" (assignment_expression "cVar1 = *pcVar5" identifier = (pointer_expression "*pcVar5" * identifier)) ;) (expression_statement "cVar2 = *pcVar6;" (assignment_expression "cVar2 = *pcVar6" identifier = (pointer_expression "*pcVar6" * identifier)) ;) (if_statement "if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }" { (if_statement "if (cVar2 == '\0') {\n        return;\n      }" if (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (if_statement "if (cVar2 != '/') break;" if (parenthesized_expression "(cVar2 != '/')" ( (binary_expression "cVar2 != '/'" identifier != (char_literal "'/'" ' character ')) )) (break_statement "break;" break ;)) (labeled_statement "LAB_00029439:\n      iVar4 = iVar4 + 1;" statement_identifier : (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;)) }) (else_clause "else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" else (if_statement "if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" if (parenthesized_expression "(cVar1 == '/')" ( (binary_expression "cVar1 == '/'" identifier == (char_literal "'/'" ' character ')) )) (compound_statement "{\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" { (if_statement "if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;" if (parenthesized_expression "((cVar2 == '/') || (cVar2 == '\0'))" ( (binary_expression "(cVar2 == '/') || (cVar2 == '\0')" (parenthesized_expression "(cVar2 == '/')" ( (binary_expression "cVar2 == '/'" identifier == (char_literal "'/'" ' character ')) )) || (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) ))) )) (goto_statement "goto LAB_00029439;" goto statement_identifier ;)) (break_statement "break;" break ;) })))) (if_statement "if (cVar1 != cVar2) break;" if (parenthesized_expression "(cVar1 != cVar2)" ( (binary_expression "cVar1 != cVar2" identifier != identifier) )) (break_statement "break;" break ;)) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" identifier = (binary_expression "pcVar5 + 1" identifier + number_literal)) ;) (expression_statement "pcVar6 = pcVar6 + 1;" (assignment_expression "pcVar6 = pcVar6 + 1" identifier = (binary_expression "pcVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "( true )" ( true )) ;) (if_statement "if (iVar4 < local_1c) {\n    return;\n  }" if (parenthesized_expression "(iVar4 < local_1c)" ( (binary_expression "iVar4 < local_1c" identifier < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (if_statement "if (iVar4 == 0x7fffffff) {\n    return;\n  }" if (parenthesized_expression "(iVar4 == 0x7fffffff)" ( (binary_expression "iVar4 == 0x7fffffff" identifier == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "local_1c = iVar4;" (assignment_expression "local_1c = iVar4" identifier = identifier) ;) (if_statement "if (iVar3 == param_1) {\n    return;\n  }" if (parenthesized_expression "(iVar3 == param_1)" ( (binary_expression "iVar3 == param_1" identifier == identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (goto_statement "goto LAB_00029420;" goto statement_identifier ;) })))
(translation_unit "/* DWARF original prototype: int ctrl_find_set(controlbox * b, char * path, int start, controlbox *\n   b) */\n\nint __regparm3 ctrl_find_set(controlbox *b,char *path,int start,controlbox *b_1)\n\n{\n  char cVar1;\n  char cVar2;\n  controlbox *pcVar3;\n  int iVar4;\n  char *pcVar5;\n  char *pcVar6;\n  int local_1c;\n  \n  if ((int)b < 1) {\n    return (int)b;\n  }\n  local_1c = 0;\n  pcVar3 = (controlbox *)0x0;\nLAB_00029420:\n  pcVar6 = (char *)**(undefined4 **)(*(int *)path + (int)pcVar3 * 4);\n  iVar4 = 0;\n  pcVar5 = (char *)start;\n  do {\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return (int)pcVar3;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  } while( true );\n  if (iVar4 < local_1c) {\n    return (int)pcVar3;\n  }\n  if (iVar4 == 0x7fffffff) {\n    return (int)pcVar3;\n  }\n  pcVar3 = (controlbox *)((int)&pcVar3->nctrlsets + 1);\n  local_1c = iVar4;\n  if (pcVar3 == b) {\n    return (int)pcVar3;\n  }\n  goto LAB_00029420;\n}\n\n" comment (function_definition "int __regparm3 ctrl_find_set(controlbox *b,char *path,int start,controlbox *b_1)\n\n{\n  char cVar1;\n  char cVar2;\n  controlbox *pcVar3;\n  int iVar4;\n  char *pcVar5;\n  char *pcVar6;\n  int local_1c;\n  \n  if ((int)b < 1) {\n    return (int)b;\n  }\n  local_1c = 0;\n  pcVar3 = (controlbox *)0x0;\nLAB_00029420:\n  pcVar6 = (char *)**(undefined4 **)(*(int *)path + (int)pcVar3 * 4);\n  iVar4 = 0;\n  pcVar5 = (char *)start;\n  do {\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return (int)pcVar3;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  } while( true );\n  if (iVar4 < local_1c) {\n    return (int)pcVar3;\n  }\n  if (iVar4 == 0x7fffffff) {\n    return (int)pcVar3;\n  }\n  pcVar3 = (controlbox *)((int)&pcVar3->nctrlsets + 1);\n  local_1c = iVar4;\n  if (pcVar3 == b) {\n    return (int)pcVar3;\n  }\n  goto LAB_00029420;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "ctrl_find_set(controlbox *b,char *path,int start,controlbox *b_1)" identifier (parameter_list "(controlbox *b,char *path,int start,controlbox *b_1)" ( (parameter_declaration "controlbox *b" type_identifier (pointer_declarator "*b" * identifier)) , (parameter_declaration "char *path" primitive_type (pointer_declarator "*path" * identifier)) , (parameter_declaration "int start" primitive_type identifier) , (parameter_declaration "controlbox *b_1" type_identifier (pointer_declarator "*b_1" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  char cVar2;\n  controlbox *pcVar3;\n  int iVar4;\n  char *pcVar5;\n  char *pcVar6;\n  int local_1c;\n  \n  if ((int)b < 1) {\n    return (int)b;\n  }\n  local_1c = 0;\n  pcVar3 = (controlbox *)0x0;\nLAB_00029420:\n  pcVar6 = (char *)**(undefined4 **)(*(int *)path + (int)pcVar3 * 4);\n  iVar4 = 0;\n  pcVar5 = (char *)start;\n  do {\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return (int)pcVar3;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  } while( true );\n  if (iVar4 < local_1c) {\n    return (int)pcVar3;\n  }\n  if (iVar4 == 0x7fffffff) {\n    return (int)pcVar3;\n  }\n  pcVar3 = (controlbox *)((int)&pcVar3->nctrlsets + 1);\n  local_1c = iVar4;\n  if (pcVar3 == b) {\n    return (int)pcVar3;\n  }\n  goto LAB_00029420;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "controlbox *pcVar3;" type_identifier (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "int local_1c;" primitive_type identifier ;) (if_statement "if ((int)b < 1) {\n    return (int)b;\n  }" if (parenthesized_expression "((int)b < 1)" ( (binary_expression "(int)b < 1" (cast_expression "(int)b" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n    return (int)b;\n  }" { (return_statement "return (int)b;" return (cast_expression "(int)b" ( (type_descriptor "int" primitive_type) ) identifier) ;) })) (expression_statement "local_1c = 0;" (assignment_expression "local_1c = 0" identifier = number_literal) ;) (expression_statement "pcVar3 = (controlbox *)0x0;" (assignment_expression "pcVar3 = (controlbox *)0x0" identifier = (cast_expression "(controlbox *)0x0" ( (type_descriptor "controlbox *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_00029420:\n  pcVar6 = (char *)**(undefined4 **)(*(int *)path + (int)pcVar3 * 4);" statement_identifier : (expression_statement "pcVar6 = (char *)**(undefined4 **)(*(int *)path + (int)pcVar3 * 4);" (assignment_expression "pcVar6 = (char *)**(undefined4 **)(*(int *)path + (int)pcVar3 * 4)" identifier = (cast_expression "(char *)**(undefined4 **)(*(int *)path + (int)pcVar3 * 4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "**(undefined4 **)(*(int *)path + (int)pcVar3 * 4)" * (pointer_expression "*(undefined4 **)(*(int *)path + (int)pcVar3 * 4)" * (cast_expression "(undefined4 **)(*(int *)path + (int)pcVar3 * 4)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)path + (int)pcVar3 * 4)" ( (binary_expression "*(int *)path + (int)pcVar3 * 4" (pointer_expression "*(int *)path" * (cast_expression "(int *)path" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "(int)pcVar3 * 4" (cast_expression "(int)pcVar3" ( (type_descriptor "int" primitive_type) ) identifier) * number_literal)) ))))))) ;)) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (expression_statement "pcVar5 = (char *)start;" (assignment_expression "pcVar5 = (char *)start" identifier = (cast_expression "(char *)start" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (do_statement "do {\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return (int)pcVar3;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  } while( true );" do (compound_statement "{\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return (int)pcVar3;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  }" { (expression_statement "cVar1 = *pcVar5;" (assignment_expression "cVar1 = *pcVar5" identifier = (pointer_expression "*pcVar5" * identifier)) ;) (expression_statement "cVar2 = *pcVar6;" (assignment_expression "cVar2 = *pcVar6" identifier = (pointer_expression "*pcVar6" * identifier)) ;) (if_statement "if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return (int)pcVar3;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      if (cVar2 == '\0') {\n        return (int)pcVar3;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }" { (if_statement "if (cVar2 == '\0') {\n        return (int)pcVar3;\n      }" if (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        return (int)pcVar3;\n      }" { (return_statement "return (int)pcVar3;" return (cast_expression "(int)pcVar3" ( (type_descriptor "int" primitive_type) ) identifier) ;) })) (if_statement "if (cVar2 != '/') break;" if (parenthesized_expression "(cVar2 != '/')" ( (binary_expression "cVar2 != '/'" identifier != (char_literal "'/'" ' character ')) )) (break_statement "break;" break ;)) (labeled_statement "LAB_00029439:\n      iVar4 = iVar4 + 1;" statement_identifier : (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;)) }) (else_clause "else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" else (if_statement "if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" if (parenthesized_expression "(cVar1 == '/')" ( (binary_expression "cVar1 == '/'" identifier == (char_literal "'/'" ' character ')) )) (compound_statement "{\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" { (if_statement "if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;" if (parenthesized_expression "((cVar2 == '/') || (cVar2 == '\0'))" ( (binary_expression "(cVar2 == '/') || (cVar2 == '\0')" (parenthesized_expression "(cVar2 == '/')" ( (binary_expression "cVar2 == '/'" identifier == (char_literal "'/'" ' character ')) )) || (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) ))) )) (goto_statement "goto LAB_00029439;" goto statement_identifier ;)) (break_statement "break;" break ;) })))) (if_statement "if (cVar1 != cVar2) break;" if (parenthesized_expression "(cVar1 != cVar2)" ( (binary_expression "cVar1 != cVar2" identifier != identifier) )) (break_statement "break;" break ;)) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" identifier = (binary_expression "pcVar5 + 1" identifier + number_literal)) ;) (expression_statement "pcVar6 = pcVar6 + 1;" (assignment_expression "pcVar6 = pcVar6 + 1" identifier = (binary_expression "pcVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "( true )" ( true )) ;) (if_statement "if (iVar4 < local_1c) {\n    return (int)pcVar3;\n  }" if (parenthesized_expression "(iVar4 < local_1c)" ( (binary_expression "iVar4 < local_1c" identifier < identifier) )) (compound_statement "{\n    return (int)pcVar3;\n  }" { (return_statement "return (int)pcVar3;" return (cast_expression "(int)pcVar3" ( (type_descriptor "int" primitive_type) ) identifier) ;) })) (if_statement "if (iVar4 == 0x7fffffff) {\n    return (int)pcVar3;\n  }" if (parenthesized_expression "(iVar4 == 0x7fffffff)" ( (binary_expression "iVar4 == 0x7fffffff" identifier == number_literal) )) (compound_statement "{\n    return (int)pcVar3;\n  }" { (return_statement "return (int)pcVar3;" return (cast_expression "(int)pcVar3" ( (type_descriptor "int" primitive_type) ) identifier) ;) })) (expression_statement "pcVar3 = (controlbox *)((int)&pcVar3->nctrlsets + 1);" (assignment_expression "pcVar3 = (controlbox *)((int)&pcVar3->nctrlsets + 1)" identifier = (cast_expression "(controlbox *)((int)&pcVar3->nctrlsets + 1)" ( (type_descriptor "controlbox *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&pcVar3->nctrlsets + 1)" ( (binary_expression "(int)&pcVar3->nctrlsets + 1" (cast_expression "(int)&pcVar3->nctrlsets" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&pcVar3->nctrlsets" & (field_expression "pcVar3->nctrlsets" identifier -> field_identifier))) + number_literal) )))) ;) (expression_statement "local_1c = iVar4;" (assignment_expression "local_1c = iVar4" identifier = identifier) ;) (if_statement "if (pcVar3 == b) {\n    return (int)pcVar3;\n  }" if (parenthesized_expression "(pcVar3 == b)" ( (binary_expression "pcVar3 == b" identifier == identifier) )) (compound_statement "{\n    return (int)pcVar3;\n  }" { (return_statement "return (int)pcVar3;" return (cast_expression "(int)pcVar3" ( (type_descriptor "int" primitive_type) ) identifier) ;) })) (goto_statement "goto LAB_00029420;" goto statement_identifier ;) })))
(translation_unit "void __regparm3 FUN_00029400(int param_1,int *param_2,char *param_3)\n\n{\n  char cVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  char *pcVar6;\n  int local_1c;\n  \n  if (param_1 < 1) {\n    return;\n  }\n  local_1c = 0;\n  iVar3 = 0;\nLAB_00029420:\n  pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);\n  iVar4 = 0;\n  pcVar5 = param_3;\n  do {\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  } while( true );\n  if (iVar4 < local_1c) {\n    return;\n  }\n  if (iVar4 == 0x7fffffff) {\n    return;\n  }\n  iVar3 = iVar3 + 1;\n  local_1c = iVar4;\n  if (iVar3 == param_1) {\n    return;\n  }\n  goto LAB_00029420;\n}\n\n" (function_definition "void __regparm3 FUN_00029400(int param_1,int *param_2,char *param_3)\n\n{\n  char cVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  char *pcVar6;\n  int local_1c;\n  \n  if (param_1 < 1) {\n    return;\n  }\n  local_1c = 0;\n  iVar3 = 0;\nLAB_00029420:\n  pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);\n  iVar4 = 0;\n  pcVar5 = param_3;\n  do {\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  } while( true );\n  if (iVar4 < local_1c) {\n    return;\n  }\n  if (iVar4 == 0x7fffffff) {\n    return;\n  }\n  iVar3 = iVar3 + 1;\n  local_1c = iVar4;\n  if (iVar3 == param_1) {\n    return;\n  }\n  goto LAB_00029420;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00029400(int param_1,int *param_2,char *param_3)" identifier (parameter_list "(int param_1,int *param_2,char *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  char *pcVar6;\n  int local_1c;\n  \n  if (param_1 < 1) {\n    return;\n  }\n  local_1c = 0;\n  iVar3 = 0;\nLAB_00029420:\n  pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);\n  iVar4 = 0;\n  pcVar5 = param_3;\n  do {\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  } while( true );\n  if (iVar4 < local_1c) {\n    return;\n  }\n  if (iVar4 == 0x7fffffff) {\n    return;\n  }\n  iVar3 = iVar3 + 1;\n  local_1c = iVar4;\n  if (iVar3 == param_1) {\n    return;\n  }\n  goto LAB_00029420;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "int local_1c;" primitive_type identifier ;) (if_statement "if (param_1 < 1) {\n    return;\n  }" if (parenthesized_expression "(param_1 < 1)" ( (binary_expression "param_1 < 1" identifier < number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "local_1c = 0;" (assignment_expression "local_1c = 0" identifier = number_literal) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (labeled_statement "LAB_00029420:\n  pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);" statement_identifier : (expression_statement "pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);" (assignment_expression "pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4)" identifier = (cast_expression "(char *)**(undefined4 **)(*param_2 + iVar3 * 4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "**(undefined4 **)(*param_2 + iVar3 * 4)" * (pointer_expression "*(undefined4 **)(*param_2 + iVar3 * 4)" * (cast_expression "(undefined4 **)(*param_2 + iVar3 * 4)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_2 + iVar3 * 4)" ( (binary_expression "*param_2 + iVar3 * 4" (pointer_expression "*param_2" * identifier) + (binary_expression "iVar3 * 4" identifier * number_literal)) ))))))) ;)) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (expression_statement "pcVar5 = param_3;" (assignment_expression "pcVar5 = param_3" identifier = identifier) ;) (do_statement "do {\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  } while( true );" do (compound_statement "{\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  }" { (expression_statement "cVar1 = *pcVar5;" (assignment_expression "cVar1 = *pcVar5" identifier = (pointer_expression "*pcVar5" * identifier)) ;) (expression_statement "cVar2 = *pcVar6;" (assignment_expression "cVar2 = *pcVar6" identifier = (pointer_expression "*pcVar6" * identifier)) ;) (if_statement "if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }" { (if_statement "if (cVar2 == '\0') {\n        return;\n      }" if (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (if_statement "if (cVar2 != '/') break;" if (parenthesized_expression "(cVar2 != '/')" ( (binary_expression "cVar2 != '/'" identifier != (char_literal "'/'" ' character ')) )) (break_statement "break;" break ;)) (labeled_statement "LAB_00029439:\n      iVar4 = iVar4 + 1;" statement_identifier : (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;)) }) (else_clause "else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" else (if_statement "if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" if (parenthesized_expression "(cVar1 == '/')" ( (binary_expression "cVar1 == '/'" identifier == (char_literal "'/'" ' character ')) )) (compound_statement "{\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" { (if_statement "if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;" if (parenthesized_expression "((cVar2 == '/') || (cVar2 == '\0'))" ( (binary_expression "(cVar2 == '/') || (cVar2 == '\0')" (parenthesized_expression "(cVar2 == '/')" ( (binary_expression "cVar2 == '/'" identifier == (char_literal "'/'" ' character ')) )) || (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) ))) )) (goto_statement "goto LAB_00029439;" goto statement_identifier ;)) (break_statement "break;" break ;) })))) (if_statement "if (cVar1 != cVar2) break;" if (parenthesized_expression "(cVar1 != cVar2)" ( (binary_expression "cVar1 != cVar2" identifier != identifier) )) (break_statement "break;" break ;)) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" identifier = (binary_expression "pcVar5 + 1" identifier + number_literal)) ;) (expression_statement "pcVar6 = pcVar6 + 1;" (assignment_expression "pcVar6 = pcVar6 + 1" identifier = (binary_expression "pcVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "( true )" ( true )) ;) (if_statement "if (iVar4 < local_1c) {\n    return;\n  }" if (parenthesized_expression "(iVar4 < local_1c)" ( (binary_expression "iVar4 < local_1c" identifier < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (if_statement "if (iVar4 == 0x7fffffff) {\n    return;\n  }" if (parenthesized_expression "(iVar4 == 0x7fffffff)" ( (binary_expression "iVar4 == 0x7fffffff" identifier == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "local_1c = iVar4;" (assignment_expression "local_1c = iVar4" identifier = identifier) ;) (if_statement "if (iVar3 == param_1) {\n    return;\n  }" if (parenthesized_expression "(iVar3 == param_1)" ( (binary_expression "iVar3 == param_1" identifier == identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (goto_statement "goto LAB_00029420;" goto statement_identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + (binary_expression IDENT * LIT)) ))))))) ;)) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' character ')) )) (break_statement break ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;)) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' character ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (char_literal ' character ')) )) || (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) ))) )) (goto_statement goto statement_identifier ;)) (break_statement break ;) })))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( BOOL )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return ;) })) (goto_statement goto statement_identifier ;) })))
(function_definition "void __regparm3 FUN_00029400(int param_1,int *param_2,char *param_3)\n\n{\n  char cVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  char *pcVar6;\n  int local_1c;\n  \n  if (param_1 < 1) {\n    return;\n  }\n  local_1c = 0;\n  iVar3 = 0;\nLAB_00029420:\n  pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);\n  iVar4 = 0;\n  pcVar5 = param_3;\n  do {\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  } while( true );\n  if (iVar4 < local_1c) {\n    return;\n  }\n  if (iVar4 == 0x7fffffff) {\n    return;\n  }\n  iVar3 = iVar3 + 1;\n  local_1c = iVar4;\n  if (iVar3 == param_1) {\n    return;\n  }\n  goto LAB_00029420;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00029400(int param_1,int *param_2,char *param_3)" (identifier "FUN_00029400") (parameter_list "(int param_1,int *param_2,char *param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "char *param_3" (primitive_type "char") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  char cVar1;\n  char cVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  char *pcVar6;\n  int local_1c;\n  \n  if (param_1 < 1) {\n    return;\n  }\n  local_1c = 0;\n  iVar3 = 0;\nLAB_00029420:\n  pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);\n  iVar4 = 0;\n  pcVar5 = param_3;\n  do {\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  } while( true );\n  if (iVar4 < local_1c) {\n    return;\n  }\n  if (iVar4 == 0x7fffffff) {\n    return;\n  }\n  iVar3 = iVar3 + 1;\n  local_1c = iVar4;\n  if (iVar3 == param_1) {\n    return;\n  }\n  goto LAB_00029420;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "char cVar2;" (primitive_type "char") (identifier "cVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "char *pcVar5;" (primitive_type "char") (pointer_declarator "*pcVar5" (* "*") (identifier "pcVar5")) (; ";")) (declaration "char *pcVar6;" (primitive_type "char") (pointer_declarator "*pcVar6" (* "*") (identifier "pcVar6")) (; ";")) (declaration "int local_1c;" (primitive_type "int") (identifier "local_1c") (; ";")) (if_statement "if (param_1 < 1) {\n    return;\n  }" (if "if") (parenthesized_expression "(param_1 < 1)" (( "(") (binary_expression "param_1 < 1" (identifier "param_1") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "local_1c = 0;" (assignment_expression "local_1c = 0" (identifier "local_1c") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_00029420:\n  pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);" (statement_identifier "LAB_00029420") (: ":") (expression_statement "pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);" (assignment_expression "pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4)" (identifier "pcVar6") (= "=") (cast_expression "(char *)**(undefined4 **)(*param_2 + iVar3 * 4)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "**(undefined4 **)(*param_2 + iVar3 * 4)" (* "*") (pointer_expression "*(undefined4 **)(*param_2 + iVar3 * 4)" (* "*") (cast_expression "(undefined4 **)(*param_2 + iVar3 * 4)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_2 + iVar3 * 4)" (( "(") (binary_expression "*param_2 + iVar3 * 4" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (+ "+") (binary_expression "iVar3 * 4" (identifier "iVar3") (* "*") (number_literal "4"))) () ")"))))))) (; ";"))) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "pcVar5 = param_3;" (assignment_expression "pcVar5 = param_3" (identifier "pcVar5") (= "=") (identifier "param_3")) (; ";")) (do_statement "do {\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  } while( true );" (do "do") (compound_statement "{\n    cVar1 = *pcVar5;\n    cVar2 = *pcVar6;\n    if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }\n    if (cVar1 != cVar2) break;\n    pcVar5 = pcVar5 + 1;\n    pcVar6 = pcVar6 + 1;\n  }" ({ "{") (expression_statement "cVar1 = *pcVar5;" (assignment_expression "cVar1 = *pcVar5" (identifier "cVar1") (= "=") (pointer_expression "*pcVar5" (* "*") (identifier "pcVar5"))) (; ";")) (expression_statement "cVar2 = *pcVar6;" (assignment_expression "cVar2 = *pcVar6" (identifier "cVar2") (= "=") (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6"))) (; ";")) (if_statement "if (cVar1 == '\0') {\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }\n    else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" (if "if") (parenthesized_expression "(cVar1 == '\0')" (( "(") (binary_expression "cVar1 == '\0'" (identifier "cVar1") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      if (cVar2 == '\0') {\n        return;\n      }\n      if (cVar2 != '/') break;\nLAB_00029439:\n      iVar4 = iVar4 + 1;\n    }" ({ "{") (if_statement "if (cVar2 == '\0') {\n        return;\n      }" (if "if") (parenthesized_expression "(cVar2 == '\0')" (( "(") (binary_expression "cVar2 == '\0'" (identifier "cVar2") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (cVar2 != '/') break;" (if "if") (parenthesized_expression "(cVar2 != '/')" (( "(") (binary_expression "cVar2 != '/'" (identifier "cVar2") (!= "!=") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (labeled_statement "LAB_00029439:\n      iVar4 = iVar4 + 1;" (statement_identifier "LAB_00029439") (: ":") (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";"))) (} "}")) (else_clause "else if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" (else "else") (if_statement "if (cVar1 == '/') {\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" (if "if") (parenthesized_expression "(cVar1 == '/')" (( "(") (binary_expression "cVar1 == '/'" (identifier "cVar1") (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (compound_statement "{\n      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;\n      break;\n    }" ({ "{") (if_statement "if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;" (if "if") (parenthesized_expression "((cVar2 == '/') || (cVar2 == '\0'))" (( "(") (binary_expression "(cVar2 == '/') || (cVar2 == '\0')" (parenthesized_expression "(cVar2 == '/')" (( "(") (binary_expression "cVar2 == '/'" (identifier "cVar2") (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(cVar2 == '\0')" (( "(") (binary_expression "cVar2 == '\0'" (identifier "cVar2") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (goto_statement "goto LAB_00029439;" (goto "goto") (statement_identifier "LAB_00029439") (; ";"))) (break_statement "break;" (break "break") (; ";")) (} "}"))))) (if_statement "if (cVar1 != cVar2) break;" (if "if") (parenthesized_expression "(cVar1 != cVar2)" (( "(") (binary_expression "cVar1 != cVar2" (identifier "cVar1") (!= "!=") (identifier "cVar2")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" (identifier "pcVar5") (= "=") (binary_expression "pcVar5 + 1" (identifier "pcVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pcVar6 = pcVar6 + 1;" (assignment_expression "pcVar6 = pcVar6 + 1" (identifier "pcVar6") (= "=") (binary_expression "pcVar6 + 1" (identifier "pcVar6") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (if_statement "if (iVar4 < local_1c) {\n    return;\n  }" (if "if") (parenthesized_expression "(iVar4 < local_1c)" (( "(") (binary_expression "iVar4 < local_1c" (identifier "iVar4") (< "<") (identifier "local_1c")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (iVar4 == 0x7fffffff) {\n    return;\n  }" (if "if") (parenthesized_expression "(iVar4 == 0x7fffffff)" (( "(") (binary_expression "iVar4 == 0x7fffffff" (identifier "iVar4") (== "==") (number_literal "0x7fffffff")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "local_1c = iVar4;" (assignment_expression "local_1c = iVar4" (identifier "local_1c") (= "=") (identifier "iVar4")) (; ";")) (if_statement "if (iVar3 == param_1) {\n    return;\n  }" (if "if") (parenthesized_expression "(iVar3 == param_1)" (( "(") (binary_expression "iVar3 == param_1" (identifier "iVar3") (== "==") (identifier "param_1")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (goto_statement "goto LAB_00029420;" (goto "goto") (statement_identifier "LAB_00029420") (; ";")) (} "}")))

/* DWARF original prototype: int ctrl_find_set(controlbox * b, char * path, int start, controlbox *
   b) */

int __regparm3 function_1(type_1 *var_8,char *path,int start,type_1 *b_1)

{
  char var_1;
  char var_2;
  type_1 *var_7;
  int var_3;
  char *var_4;
  char *var_5;
  int var_6;
  
  if ((int)var_8 < 1) {
    return (int)var_8;
  }
  var_6 = 0;
  var_7 = (type_1 *)0x0;
LAB_00029420:
  var_5 = (char *)**(type_2 **)(*(int *)path + (int)var_7 * 4);
  var_3 = 0;
  var_4 = (char *)start;
  do {
    var_1 = *var_4;
    var_2 = *var_5;
    if (var_1 == '\0') {
      if (var_2 == '\0') {
        return (int)var_7;
      }
      if (var_2 != '/') break;
LAB_00029439:
      var_3 = var_3 + 1;
    }
    else if (var_1 == '/') {
      if ((var_2 == '/') || (var_2 == '\0')) goto LAB_00029439;
      break;
    }
    if (var_1 != var_2) break;
    var_4 = var_4 + 1;
    var_5 = var_5 + 1;
  } while( true );
  if (var_3 < var_6) {
    return (int)var_7;
  }
  if (var_3 == 0x7fffffff) {
    return (int)var_7;
  }
  var_7 = (type_1 *)((int)&var_7->nctrlsets + 1);
  var_6 = var_3;
  if (var_7 == var_8) {
    return (int)var_7;
  }
  goto LAB_00029420;
}


(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: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (number_literal))))))))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (character)))) consequence: (break_statement)) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (character)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (character)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))))) consequence: (goto_statement label: (statement_identifier))) (break_statement))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (true))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement))) (goto_statement label: (statement_identifier)))))

void __regparm3 MASKED(int param_1,int *param_2,char *param_3)

{
  char cVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  char *pcVar5;
  char *pcVar6;
  int local_1c;
  
  if (param_1 < 1) {
    return;
  }
  local_1c = 0;
  iVar3 = 0;
LAB_00029420:
  pcVar6 = (char *)**(undefined4 **)(*param_2 + iVar3 * 4);
  iVar4 = 0;
  pcVar5 = param_3;
  do {
    cVar1 = *pcVar5;
    cVar2 = *pcVar6;
    if (cVar1 == '\0') {
      if (cVar2 == '\0') {
        return;
      }
      if (cVar2 != '/') break;
LAB_00029439:
      iVar4 = iVar4 + 1;
    }
    else if (cVar1 == '/') {
      if ((cVar2 == '/') || (cVar2 == '\0')) goto LAB_00029439;
      break;
    }
    if (cVar1 != cVar2) break;
    pcVar5 = pcVar5 + 1;
    pcVar6 = pcVar6 + 1;
  } while( true );
  if (iVar4 < local_1c) {
    return;
  }
  if (iVar4 == 0x7fffffff) {
    return;
  }
  iVar3 = iVar3 + 1;
  local_1c = iVar4;
  if (iVar3 == param_1) {
    return;
  }
  goto LAB_00029420;
}

