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

int charset_from_macenc(int script,int region,int sysvers,char *fontname)

{
  int iVar1;
  anon_struct_20_5_e57ed7c5 *paVar2;
  int iVar3;
  
  paVar2 = macencs;
  if (fontname == (char *)0x0) {
    iVar3 = 0;
    do {
      if ((script == paVar2->script) &&
         ((((region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers)) &&
          (paVar2->fontname == (char *)0x0)))) goto LAB_0001aa5a;
      iVar3 = iVar3 + 1;
      paVar2 = paVar2 + 1;
    } while (iVar3 != 0x1b);
  }
  else {
    iVar3 = 0;
    do {
      if ((((paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region)))) &&
          (paVar2->sysvermin <= sysvers)) &&
         ((paVar2->fontname == (char *)0x0 ||
          (iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0)))) {
LAB_0001aa5a:
        return macencs[iVar3].charset;
      }
      iVar3 = iVar3 + 1;
      paVar2 = paVar2 + 1;
    } while (iVar3 != 0x1b);
  }
  return 0;
}



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

undefined4 FUN_0001a9d0(int param_1,int param_2,int param_3,char *param_4)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  piVar2 = &DAT_000b4260;
  if (param_4 == (char *)0x0) {
    iVar3 = 0;
    do {
      if ((param_1 == *piVar2) &&
         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)
          ))) goto LAB_0001aa5a;
      iVar3 = iVar3 + 1;
      piVar2 = piVar2 + 5;
    } while (iVar3 != 0x1b);
  }
  else {
    iVar3 = 0;
    do {
      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&
          (piVar2[2] <= param_3)) &&
         (((char *)piVar2[3] == (char *)0x0 ||
          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {
LAB_0001aa5a:
        return (&DAT_000b4270)[iVar3 * 5];
      }
      iVar3 = iVar3 + 1;
      piVar2 = piVar2 + 5;
    } while (iVar3 != 0x1b);
  }
  return 0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001a360
ADD EBX,0x9ae0b
SUB ESP,0x1c
MOV ESI,dword ptr [ESP + 0x3c]
MOV EBP,dword ptr [ESP + 0x30]
MOV EDX,dword ptr [ESP + 0x34]
MOV ECX,dword ptr [ESP + 0x38]
TEST ESI,ESI
LEA EAX,[EBX + 0xffffea7c]
MOV dword ptr [ESP + 0xc],EAX
JZ 0x0001aa80
MOV EDI,EAX
XOR ESI,ESI
JMP 0x0001aa1b
ADD ESI,0x1
ADD EDI,0x14
CMP ESI,0x1b
JZ 0x0001aa70
CMP dword ptr [EDI],EBP
JNZ 0x0001aa10
MOV EAX,dword ptr [EDI + 0x4]
TEST EAX,EAX
JS 0x0001aa2a
CMP EAX,EDX
JNZ 0x0001aa10
CMP dword ptr [EDI + 0x8],ECX
JG 0x0001aa10
MOV EAX,dword ptr [EDI + 0xc]
TEST EAX,EAX
JZ 0x0001aa5a
MOV dword ptr [ESP + 0x38],ECX
SUB ESP,0x8
MOV dword ptr [ESP + 0x3c],EDX
PUSH dword ptr [ESP + 0x44]
PUSH EAX
CALL 0x00018b00
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x34]
MOV ECX,dword ptr [ESP + 0x38]
TEST EAX,EAX
JNZ 0x0001aa10
MOV ECX,dword ptr [ESP + 0xc]
LEA EAX,[ESI + ESI*0x4]
MOV EAX,dword ptr [ECX + EAX*0x4 + 0x10]
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD ESP,0x1c
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
POP EBP
RET
XOR ESI,ESI
JMP 0x0001aa93
ADD ESI,0x1
ADD EAX,0x14
CMP ESI,0x1b
JZ 0x0001aa70
CMP EBP,dword ptr [EAX]
JNZ 0x0001aa88
MOV EBX,dword ptr [EAX + 0x4]
CMP EDX,EBX
JZ 0x0001aaa2
TEST EBX,EBX
JNS 0x0001aa88
CMP ECX,dword ptr [EAX + 0x8]
JL 0x0001aa88
MOV EBX,dword ptr [EAX + 0xc]
TEST EBX,EBX
JNZ 0x0001aa88
JMP 0x0001aa5a
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0001a9d0(int param_1,int param_2,int param_3,char *param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = &DAT_000b4260;\n  if (param_4 == (char *)0x0) {\n    iVar3 = 0;\n    do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  else {\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_0001a9d0(int param_1,int param_2,int param_3,char *param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = &DAT_000b4260;\n  if (param_4 == (char *)0x0) {\n    iVar3 = 0;\n    do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  else {\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0001a9d0(int param_1,int param_2,int param_3,char *param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,char *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "char *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = &DAT_000b4260;\n  if (param_4 == (char *)0x0) {\n    iVar3 = 0;\n    do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  else {\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "piVar2 = &DAT_000b4260;" (assignment_expression "piVar2 = &DAT_000b4260" identifier = (pointer_expression "&DAT_000b4260" & identifier)) ;) (if_statement "if (param_4 == (char *)0x0) {\n    iVar3 = 0;\n    do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  else {\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }" if (parenthesized_expression "(param_4 == (char *)0x0)" ( (binary_expression "param_4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar3 = 0;\n    do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);" do (compound_statement "{\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    }" { (if_statement "if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;" if (parenthesized_expression "((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          )))" ( (binary_expression "(param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))" (parenthesized_expression "(param_1 == *piVar2)" ( (binary_expression "param_1 == *piVar2" identifier == (pointer_expression "*piVar2" * identifier)) )) && (parenthesized_expression "((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))" ( (parenthesized_expression "(((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          )" ( (binary_expression "((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)" (parenthesized_expression "((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3))" ( (binary_expression "(param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)" (parenthesized_expression "(param_2 == piVar2[1] || (piVar2[1] < 0))" ( (binary_expression "param_2 == piVar2[1] || (piVar2[1] < 0)" (binary_expression "param_2 == piVar2[1]" identifier == (subscript_expression "piVar2[1]" identifier [ number_literal ])) || (parenthesized_expression "(piVar2[1] < 0)" ( (binary_expression "piVar2[1] < 0" (subscript_expression "piVar2[1]" identifier [ number_literal ]) < number_literal) ))) )) && (parenthesized_expression "(piVar2[2] <= param_3)" ( (binary_expression "piVar2[2] <= param_3" (subscript_expression "piVar2[2]" identifier [ number_literal ]) <= identifier) ))) )) && (parenthesized_expression "(piVar2[3] == 0)" ( (binary_expression "piVar2[3] == 0" (subscript_expression "piVar2[3]" identifier [ number_literal ]) == number_literal) ))) )) ))) )) (goto_statement "goto LAB_0001aa5a;" goto statement_identifier ;)) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "piVar2 = piVar2 + 5;" (assignment_expression "piVar2 = piVar2 + 5" identifier = (binary_expression "piVar2 + 5" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar3 != 0x1b)" ( (binary_expression "iVar3 != 0x1b" identifier != number_literal) )) ;) }) (else_clause "else {\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }" else (compound_statement "{\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);" do (compound_statement "{\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    }" { (if_statement "if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }" if (parenthesized_expression "((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0))))" ( (binary_expression "(((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))" (parenthesized_expression "(((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3))" ( (binary_expression "((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)" (parenthesized_expression "((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2))))" ( (binary_expression "(*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))" (parenthesized_expression "(*piVar2 == param_1)" ( (binary_expression "*piVar2 == param_1" (pointer_expression "*piVar2" * identifier) == identifier) )) && (parenthesized_expression "((piVar2[1] < 0 || (piVar2[1] == param_2)))" ( (parenthesized_expression "(piVar2[1] < 0 || (piVar2[1] == param_2))" ( (binary_expression "piVar2[1] < 0 || (piVar2[1] == param_2)" (binary_expression "piVar2[1] < 0" (subscript_expression "piVar2[1]" identifier [ number_literal ]) < number_literal) || (parenthesized_expression "(piVar2[1] == param_2)" ( (binary_expression "piVar2[1] == param_2" (subscript_expression "piVar2[1]" identifier [ number_literal ]) == identifier) ))) )) ))) )) && (parenthesized_expression "(piVar2[2] <= param_3)" ( (binary_expression "piVar2[2] <= param_3" (subscript_expression "piVar2[2]" identifier [ number_literal ]) <= identifier) ))) )) && (parenthesized_expression "(((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))" ( (parenthesized_expression "((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0))" ( (binary_expression "(char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)" (binary_expression "(char *)piVar2[3] == (char *)0x0" (cast_expression "(char *)piVar2[3]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar2[3]" identifier [ number_literal ])) == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) || (parenthesized_expression "(iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)" ( (comma_expression "iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0" (assignment_expression "iVar1 = strcmp((char *)piVar2[3],param_4)" identifier = (call_expression "strcmp((char *)piVar2[3],param_4)" identifier (argument_list "((char *)piVar2[3],param_4)" ( (cast_expression "(char *)piVar2[3]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar2[3]" identifier [ number_literal ])) , identifier )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) ))) )) (compound_statement "{\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }" { (labeled_statement "LAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];" statement_identifier : (return_statement "return (&DAT_000b4270)[iVar3 * 5];" return (subscript_expression "(&DAT_000b4270)[iVar3 * 5]" (parenthesized_expression "(&DAT_000b4270)" ( (pointer_expression "&DAT_000b4270" & identifier) )) [ (binary_expression "iVar3 * 5" identifier * number_literal) ]) ;)) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "piVar2 = piVar2 + 5;" (assignment_expression "piVar2 = piVar2 + 5" identifier = (binary_expression "piVar2 + 5" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar3 != 0x1b)" ( (binary_expression "iVar3 != 0x1b" identifier != number_literal) )) ;) }))) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint charset_from_macenc(int script,int region,int sysvers,char *fontname)\n\n{\n  int iVar1;\n  anon_struct_20_5_e57ed7c5 *paVar2;\n  int iVar3;\n  \n  paVar2 = macencs;\n  if (fontname == (char *)0x0) {\n    iVar3 = 0;\n    do {\n      if ((script == paVar2->script) &&\n         ((((region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers)) &&\n          (paVar2->fontname == (char *)0x0)))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      paVar2 = paVar2 + 1;\n    } while (iVar3 != 0x1b);\n  }\n  else {\n    iVar3 = 0;\n    do {\n      if ((((paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region)))) &&\n          (paVar2->sysvermin <= sysvers)) &&\n         ((paVar2->fontname == (char *)0x0 ||\n          (iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return macencs[iVar3].charset;\n      }\n      iVar3 = iVar3 + 1;\n      paVar2 = paVar2 + 1;\n    } while (iVar3 != 0x1b);\n  }\n  return 0;\n}\n\n" comment (function_definition "int charset_from_macenc(int script,int region,int sysvers,char *fontname)\n\n{\n  int iVar1;\n  anon_struct_20_5_e57ed7c5 *paVar2;\n  int iVar3;\n  \n  paVar2 = macencs;\n  if (fontname == (char *)0x0) {\n    iVar3 = 0;\n    do {\n      if ((script == paVar2->script) &&\n         ((((region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers)) &&\n          (paVar2->fontname == (char *)0x0)))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      paVar2 = paVar2 + 1;\n    } while (iVar3 != 0x1b);\n  }\n  else {\n    iVar3 = 0;\n    do {\n      if ((((paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region)))) &&\n          (paVar2->sysvermin <= sysvers)) &&\n         ((paVar2->fontname == (char *)0x0 ||\n          (iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return macencs[iVar3].charset;\n      }\n      iVar3 = iVar3 + 1;\n      paVar2 = paVar2 + 1;\n    } while (iVar3 != 0x1b);\n  }\n  return 0;\n}" primitive_type (function_declarator "charset_from_macenc(int script,int region,int sysvers,char *fontname)" identifier (parameter_list "(int script,int region,int sysvers,char *fontname)" ( (parameter_declaration "int script" primitive_type identifier) , (parameter_declaration "int region" primitive_type identifier) , (parameter_declaration "int sysvers" primitive_type identifier) , (parameter_declaration "char *fontname" primitive_type (pointer_declarator "*fontname" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  anon_struct_20_5_e57ed7c5 *paVar2;\n  int iVar3;\n  \n  paVar2 = macencs;\n  if (fontname == (char *)0x0) {\n    iVar3 = 0;\n    do {\n      if ((script == paVar2->script) &&\n         ((((region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers)) &&\n          (paVar2->fontname == (char *)0x0)))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      paVar2 = paVar2 + 1;\n    } while (iVar3 != 0x1b);\n  }\n  else {\n    iVar3 = 0;\n    do {\n      if ((((paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region)))) &&\n          (paVar2->sysvermin <= sysvers)) &&\n         ((paVar2->fontname == (char *)0x0 ||\n          (iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return macencs[iVar3].charset;\n      }\n      iVar3 = iVar3 + 1;\n      paVar2 = paVar2 + 1;\n    } while (iVar3 != 0x1b);\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "anon_struct_20_5_e57ed7c5 *paVar2;" type_identifier (pointer_declarator "*paVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "paVar2 = macencs;" (assignment_expression "paVar2 = macencs" identifier = identifier) ;) (if_statement "if (fontname == (char *)0x0) {\n    iVar3 = 0;\n    do {\n      if ((script == paVar2->script) &&\n         ((((region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers)) &&\n          (paVar2->fontname == (char *)0x0)))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      paVar2 = paVar2 + 1;\n    } while (iVar3 != 0x1b);\n  }\n  else {\n    iVar3 = 0;\n    do {\n      if ((((paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region)))) &&\n          (paVar2->sysvermin <= sysvers)) &&\n         ((paVar2->fontname == (char *)0x0 ||\n          (iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return macencs[iVar3].charset;\n      }\n      iVar3 = iVar3 + 1;\n      paVar2 = paVar2 + 1;\n    } while (iVar3 != 0x1b);\n  }" if (parenthesized_expression "(fontname == (char *)0x0)" ( (binary_expression "fontname == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar3 = 0;\n    do {\n      if ((script == paVar2->script) &&\n         ((((region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers)) &&\n          (paVar2->fontname == (char *)0x0)))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      paVar2 = paVar2 + 1;\n    } while (iVar3 != 0x1b);\n  }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n      if ((script == paVar2->script) &&\n         ((((region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers)) &&\n          (paVar2->fontname == (char *)0x0)))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      paVar2 = paVar2 + 1;\n    } while (iVar3 != 0x1b);" do (compound_statement "{\n      if ((script == paVar2->script) &&\n         ((((region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers)) &&\n          (paVar2->fontname == (char *)0x0)))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      paVar2 = paVar2 + 1;\n    }" { (if_statement "if ((script == paVar2->script) &&\n         ((((region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers)) &&\n          (paVar2->fontname == (char *)0x0)))) goto LAB_0001aa5a;" if (parenthesized_expression "((script == paVar2->script) &&\n         ((((region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers)) &&\n          (paVar2->fontname == (char *)0x0))))" ( (binary_expression "(script == paVar2->script) &&\n         ((((region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers)) &&\n          (paVar2->fontname == (char *)0x0)))" (parenthesized_expression "(script == paVar2->script)" ( (binary_expression "script == paVar2->script" identifier == (field_expression "paVar2->script" identifier -> field_identifier)) )) && (parenthesized_expression "((((region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers)) &&\n          (paVar2->fontname == (char *)0x0)))" ( (parenthesized_expression "(((region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers)) &&\n          (paVar2->fontname == (char *)0x0))" ( (binary_expression "((region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers)) &&\n          (paVar2->fontname == (char *)0x0)" (parenthesized_expression "((region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers))" ( (binary_expression "(region == paVar2->region || (paVar2->region < 0)) && (paVar2->sysvermin <= sysvers)" (parenthesized_expression "(region == paVar2->region || (paVar2->region < 0))" ( (binary_expression "region == paVar2->region || (paVar2->region < 0)" (binary_expression "region == paVar2->region" identifier == (field_expression "paVar2->region" identifier -> field_identifier)) || (parenthesized_expression "(paVar2->region < 0)" ( (binary_expression "paVar2->region < 0" (field_expression "paVar2->region" identifier -> field_identifier) < number_literal) ))) )) && (parenthesized_expression "(paVar2->sysvermin <= sysvers)" ( (binary_expression "paVar2->sysvermin <= sysvers" (field_expression "paVar2->sysvermin" identifier -> field_identifier) <= identifier) ))) )) && (parenthesized_expression "(paVar2->fontname == (char *)0x0)" ( (binary_expression "paVar2->fontname == (char *)0x0" (field_expression "paVar2->fontname" identifier -> field_identifier) == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) ))) )) (goto_statement "goto LAB_0001aa5a;" goto statement_identifier ;)) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "paVar2 = paVar2 + 1;" (assignment_expression "paVar2 = paVar2 + 1" identifier = (binary_expression "paVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar3 != 0x1b)" ( (binary_expression "iVar3 != 0x1b" identifier != number_literal) )) ;) }) (else_clause "else {\n    iVar3 = 0;\n    do {\n      if ((((paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region)))) &&\n          (paVar2->sysvermin <= sysvers)) &&\n         ((paVar2->fontname == (char *)0x0 ||\n          (iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return macencs[iVar3].charset;\n      }\n      iVar3 = iVar3 + 1;\n      paVar2 = paVar2 + 1;\n    } while (iVar3 != 0x1b);\n  }" else (compound_statement "{\n    iVar3 = 0;\n    do {\n      if ((((paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region)))) &&\n          (paVar2->sysvermin <= sysvers)) &&\n         ((paVar2->fontname == (char *)0x0 ||\n          (iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return macencs[iVar3].charset;\n      }\n      iVar3 = iVar3 + 1;\n      paVar2 = paVar2 + 1;\n    } while (iVar3 != 0x1b);\n  }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n      if ((((paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region)))) &&\n          (paVar2->sysvermin <= sysvers)) &&\n         ((paVar2->fontname == (char *)0x0 ||\n          (iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return macencs[iVar3].charset;\n      }\n      iVar3 = iVar3 + 1;\n      paVar2 = paVar2 + 1;\n    } while (iVar3 != 0x1b);" do (compound_statement "{\n      if ((((paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region)))) &&\n          (paVar2->sysvermin <= sysvers)) &&\n         ((paVar2->fontname == (char *)0x0 ||\n          (iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return macencs[iVar3].charset;\n      }\n      iVar3 = iVar3 + 1;\n      paVar2 = paVar2 + 1;\n    }" { (if_statement "if ((((paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region)))) &&\n          (paVar2->sysvermin <= sysvers)) &&\n         ((paVar2->fontname == (char *)0x0 ||\n          (iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return macencs[iVar3].charset;\n      }" if (parenthesized_expression "((((paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region)))) &&\n          (paVar2->sysvermin <= sysvers)) &&\n         ((paVar2->fontname == (char *)0x0 ||\n          (iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0))))" ( (binary_expression "(((paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region)))) &&\n          (paVar2->sysvermin <= sysvers)) &&\n         ((paVar2->fontname == (char *)0x0 ||\n          (iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0)))" (parenthesized_expression "(((paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region)))) &&\n          (paVar2->sysvermin <= sysvers))" ( (binary_expression "((paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region)))) &&\n          (paVar2->sysvermin <= sysvers)" (parenthesized_expression "((paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region))))" ( (binary_expression "(paVar2->script == script) && ((paVar2->region < 0 || (paVar2->region == region)))" (parenthesized_expression "(paVar2->script == script)" ( (binary_expression "paVar2->script == script" (field_expression "paVar2->script" identifier -> field_identifier) == identifier) )) && (parenthesized_expression "((paVar2->region < 0 || (paVar2->region == region)))" ( (parenthesized_expression "(paVar2->region < 0 || (paVar2->region == region))" ( (binary_expression "paVar2->region < 0 || (paVar2->region == region)" (binary_expression "paVar2->region < 0" (field_expression "paVar2->region" identifier -> field_identifier) < number_literal) || (parenthesized_expression "(paVar2->region == region)" ( (binary_expression "paVar2->region == region" (field_expression "paVar2->region" identifier -> field_identifier) == identifier) ))) )) ))) )) && (parenthesized_expression "(paVar2->sysvermin <= sysvers)" ( (binary_expression "paVar2->sysvermin <= sysvers" (field_expression "paVar2->sysvermin" identifier -> field_identifier) <= identifier) ))) )) && (parenthesized_expression "((paVar2->fontname == (char *)0x0 ||\n          (iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0)))" ( (parenthesized_expression "(paVar2->fontname == (char *)0x0 ||\n          (iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0))" ( (binary_expression "paVar2->fontname == (char *)0x0 ||\n          (iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0)" (binary_expression "paVar2->fontname == (char *)0x0" (field_expression "paVar2->fontname" identifier -> field_identifier) == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) || (parenthesized_expression "(iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0)" ( (comma_expression "iVar1 = strcmp(paVar2->fontname,fontname), iVar1 == 0" (assignment_expression "iVar1 = strcmp(paVar2->fontname,fontname)" identifier = (call_expression "strcmp(paVar2->fontname,fontname)" identifier (argument_list "(paVar2->fontname,fontname)" ( (field_expression "paVar2->fontname" identifier -> field_identifier) , identifier )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) ))) )) (compound_statement "{\nLAB_0001aa5a:\n        return macencs[iVar3].charset;\n      }" { (labeled_statement "LAB_0001aa5a:\n        return macencs[iVar3].charset;" statement_identifier : (return_statement "return macencs[iVar3].charset;" return (field_expression "macencs[iVar3].charset" (subscript_expression "macencs[iVar3]" identifier [ identifier ]) . field_identifier) ;)) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "paVar2 = paVar2 + 1;" (assignment_expression "paVar2 = paVar2 + 1" identifier = (binary_expression "paVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar3 != 0x1b)" ( (binary_expression "iVar3 != 0x1b" identifier != number_literal) )) ;) }))) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_0001a9d0(int param_1,int param_2,int param_3,char *param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = &DAT_000b4260;\n  if (param_4 == (char *)0x0) {\n    iVar3 = 0;\n    do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  else {\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_0001a9d0(int param_1,int param_2,int param_3,char *param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = &DAT_000b4260;\n  if (param_4 == (char *)0x0) {\n    iVar3 = 0;\n    do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  else {\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0001a9d0(int param_1,int param_2,int param_3,char *param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,char *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "char *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = &DAT_000b4260;\n  if (param_4 == (char *)0x0) {\n    iVar3 = 0;\n    do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  else {\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "piVar2 = &DAT_000b4260;" (assignment_expression "piVar2 = &DAT_000b4260" identifier = (pointer_expression "&DAT_000b4260" & identifier)) ;) (if_statement "if (param_4 == (char *)0x0) {\n    iVar3 = 0;\n    do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  else {\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }" if (parenthesized_expression "(param_4 == (char *)0x0)" ( (binary_expression "param_4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar3 = 0;\n    do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);" do (compound_statement "{\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    }" { (if_statement "if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;" if (parenthesized_expression "((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          )))" ( (binary_expression "(param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))" (parenthesized_expression "(param_1 == *piVar2)" ( (binary_expression "param_1 == *piVar2" identifier == (pointer_expression "*piVar2" * identifier)) )) && (parenthesized_expression "((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))" ( (parenthesized_expression "(((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          )" ( (binary_expression "((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)" (parenthesized_expression "((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3))" ( (binary_expression "(param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)" (parenthesized_expression "(param_2 == piVar2[1] || (piVar2[1] < 0))" ( (binary_expression "param_2 == piVar2[1] || (piVar2[1] < 0)" (binary_expression "param_2 == piVar2[1]" identifier == (subscript_expression "piVar2[1]" identifier [ number_literal ])) || (parenthesized_expression "(piVar2[1] < 0)" ( (binary_expression "piVar2[1] < 0" (subscript_expression "piVar2[1]" identifier [ number_literal ]) < number_literal) ))) )) && (parenthesized_expression "(piVar2[2] <= param_3)" ( (binary_expression "piVar2[2] <= param_3" (subscript_expression "piVar2[2]" identifier [ number_literal ]) <= identifier) ))) )) && (parenthesized_expression "(piVar2[3] == 0)" ( (binary_expression "piVar2[3] == 0" (subscript_expression "piVar2[3]" identifier [ number_literal ]) == number_literal) ))) )) ))) )) (goto_statement "goto LAB_0001aa5a;" goto statement_identifier ;)) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "piVar2 = piVar2 + 5;" (assignment_expression "piVar2 = piVar2 + 5" identifier = (binary_expression "piVar2 + 5" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar3 != 0x1b)" ( (binary_expression "iVar3 != 0x1b" identifier != number_literal) )) ;) }) (else_clause "else {\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }" else (compound_statement "{\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);" do (compound_statement "{\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    }" { (if_statement "if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }" if (parenthesized_expression "((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0))))" ( (binary_expression "(((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))" (parenthesized_expression "(((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3))" ( (binary_expression "((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)" (parenthesized_expression "((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2))))" ( (binary_expression "(*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))" (parenthesized_expression "(*piVar2 == param_1)" ( (binary_expression "*piVar2 == param_1" (pointer_expression "*piVar2" * identifier) == identifier) )) && (parenthesized_expression "((piVar2[1] < 0 || (piVar2[1] == param_2)))" ( (parenthesized_expression "(piVar2[1] < 0 || (piVar2[1] == param_2))" ( (binary_expression "piVar2[1] < 0 || (piVar2[1] == param_2)" (binary_expression "piVar2[1] < 0" (subscript_expression "piVar2[1]" identifier [ number_literal ]) < number_literal) || (parenthesized_expression "(piVar2[1] == param_2)" ( (binary_expression "piVar2[1] == param_2" (subscript_expression "piVar2[1]" identifier [ number_literal ]) == identifier) ))) )) ))) )) && (parenthesized_expression "(piVar2[2] <= param_3)" ( (binary_expression "piVar2[2] <= param_3" (subscript_expression "piVar2[2]" identifier [ number_literal ]) <= identifier) ))) )) && (parenthesized_expression "(((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))" ( (parenthesized_expression "((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0))" ( (binary_expression "(char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)" (binary_expression "(char *)piVar2[3] == (char *)0x0" (cast_expression "(char *)piVar2[3]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar2[3]" identifier [ number_literal ])) == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) || (parenthesized_expression "(iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)" ( (comma_expression "iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0" (assignment_expression "iVar1 = strcmp((char *)piVar2[3],param_4)" identifier = (call_expression "strcmp((char *)piVar2[3],param_4)" identifier (argument_list "((char *)piVar2[3],param_4)" ( (cast_expression "(char *)piVar2[3]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar2[3]" identifier [ number_literal ])) , identifier )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) ))) )) (compound_statement "{\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }" { (labeled_statement "LAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];" statement_identifier : (return_statement "return (&DAT_000b4270)[iVar3 * 5];" return (subscript_expression "(&DAT_000b4270)[iVar3 * 5]" (parenthesized_expression "(&DAT_000b4270)" ( (pointer_expression "&DAT_000b4270" & identifier) )) [ (binary_expression "iVar3 * 5" identifier * number_literal) ]) ;)) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "piVar2 = piVar2 + 5;" (assignment_expression "piVar2 = piVar2 + 5" identifier = (binary_expression "piVar2 + 5" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar3 != 0x1b)" ( (binary_expression "iVar3 != 0x1b" identifier != number_literal) )) ;) }))) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * IDENT)) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT == (subscript_expression IDENT [ LIT ])) || (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) < LIT) ))) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) <= IDENT) ))) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) ))) )) ))) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == IDENT) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) < LIT) || (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == IDENT) ))) )) ))) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) <= IDENT) ))) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) , IDENT )))) , (binary_expression IDENT == LIT)) ))) )) ))) )) (compound_statement { (labeled_statement statement_identifier : (return_statement return (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (binary_expression IDENT * LIT) ]) ;)) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) }))) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_0001a9d0(int param_1,int param_2,int param_3,char *param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = &DAT_000b4260;\n  if (param_4 == (char *)0x0) {\n    iVar3 = 0;\n    do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  else {\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_0001a9d0(int param_1,int param_2,int param_3,char *param_4)" (identifier "FUN_0001a9d0") (parameter_list "(int param_1,int param_2,int param_3,char *param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "char *param_4" (primitive_type "char") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = &DAT_000b4260;\n  if (param_4 == (char *)0x0) {\n    iVar3 = 0;\n    do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  else {\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "piVar2 = &DAT_000b4260;" (assignment_expression "piVar2 = &DAT_000b4260" (identifier "piVar2") (= "=") (pointer_expression "&DAT_000b4260" (& "&") (identifier "DAT_000b4260"))) (; ";")) (if_statement "if (param_4 == (char *)0x0) {\n    iVar3 = 0;\n    do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }\n  else {\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }" (if "if") (parenthesized_expression "(param_4 == (char *)0x0)" (( "(") (binary_expression "param_4 == (char *)0x0" (identifier "param_4") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    iVar3 = 0;\n    do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }" ({ "{") (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);" (do "do") (compound_statement "{\n      if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    }" ({ "{") (if_statement "if ((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))) goto LAB_0001aa5a;" (if "if") (parenthesized_expression "((param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          )))" (( "(") (binary_expression "(param_1 == *piVar2) &&\n         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))" (parenthesized_expression "(param_1 == *piVar2)" (( "(") (binary_expression "param_1 == *piVar2" (identifier "param_1") (== "==") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) () ")")) (&& "&&") (parenthesized_expression "((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          ))" (( "(") (parenthesized_expression "(((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)\n          )" (( "(") (binary_expression "((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)" (parenthesized_expression "((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3))" (( "(") (binary_expression "(param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)" (parenthesized_expression "(param_2 == piVar2[1] || (piVar2[1] < 0))" (( "(") (binary_expression "param_2 == piVar2[1] || (piVar2[1] < 0)" (binary_expression "param_2 == piVar2[1]" (identifier "param_2") (== "==") (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]"))) (|| "||") (parenthesized_expression "(piVar2[1] < 0)" (( "(") (binary_expression "piVar2[1] < 0" (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")) (< "<") (number_literal "0")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(piVar2[2] <= param_3)" (( "(") (binary_expression "piVar2[2] <= param_3" (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]")) (<= "<=") (identifier "param_3")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(piVar2[3] == 0)" (( "(") (binary_expression "piVar2[3] == 0" (subscript_expression "piVar2[3]" (identifier "piVar2") ([ "[") (number_literal "3") (] "]")) (== "==") (number_literal "0")) () ")"))) () ")")) () ")"))) () ")")) (goto_statement "goto LAB_0001aa5a;" (goto "goto") (statement_identifier "LAB_0001aa5a") (; ";"))) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "piVar2 = piVar2 + 5;" (assignment_expression "piVar2 = piVar2 + 5" (identifier "piVar2") (= "=") (binary_expression "piVar2 + 5" (identifier "piVar2") (+ "+") (number_literal "5"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar3 != 0x1b)" (( "(") (binary_expression "iVar3 != 0x1b" (identifier "iVar3") (!= "!=") (number_literal "0x1b")) () ")")) (; ";")) (} "}")) (else_clause "else {\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }" (else "else") (compound_statement "{\n    iVar3 = 0;\n    do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);\n  }" ({ "{") (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    } while (iVar3 != 0x1b);" (do "do") (compound_statement "{\n      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }\n      iVar3 = iVar3 + 1;\n      piVar2 = piVar2 + 5;\n    }" ({ "{") (if_statement "if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }" (if "if") (parenthesized_expression "((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0))))" (( "(") (binary_expression "(((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)) &&\n         (((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))" (parenthesized_expression "(((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3))" (( "(") (binary_expression "((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&\n          (piVar2[2] <= param_3)" (parenthesized_expression "((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2))))" (( "(") (binary_expression "(*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))" (parenthesized_expression "(*piVar2 == param_1)" (( "(") (binary_expression "*piVar2 == param_1" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (== "==") (identifier "param_1")) () ")")) (&& "&&") (parenthesized_expression "((piVar2[1] < 0 || (piVar2[1] == param_2)))" (( "(") (parenthesized_expression "(piVar2[1] < 0 || (piVar2[1] == param_2))" (( "(") (binary_expression "piVar2[1] < 0 || (piVar2[1] == param_2)" (binary_expression "piVar2[1] < 0" (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")) (< "<") (number_literal "0")) (|| "||") (parenthesized_expression "(piVar2[1] == param_2)" (( "(") (binary_expression "piVar2[1] == param_2" (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")) (== "==") (identifier "param_2")) () ")"))) () ")")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(piVar2[2] <= param_3)" (( "(") (binary_expression "piVar2[2] <= param_3" (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]")) (<= "<=") (identifier "param_3")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))" (( "(") (parenthesized_expression "((char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0))" (( "(") (binary_expression "(char *)piVar2[3] == (char *)0x0 ||\n          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)" (binary_expression "(char *)piVar2[3] == (char *)0x0" (cast_expression "(char *)piVar2[3]" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "piVar2[3]" (identifier "piVar2") ([ "[") (number_literal "3") (] "]"))) (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (|| "||") (parenthesized_expression "(iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)" (( "(") (comma_expression "iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0" (assignment_expression "iVar1 = strcmp((char *)piVar2[3],param_4)" (identifier "iVar1") (= "=") (call_expression "strcmp((char *)piVar2[3],param_4)" (identifier "strcmp") (argument_list "((char *)piVar2[3],param_4)" (( "(") (cast_expression "(char *)piVar2[3]" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "piVar2[3]" (identifier "piVar2") ([ "[") (number_literal "3") (] "]"))) (, ",") (identifier "param_4") () ")")))) (, ",") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0"))) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\nLAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];\n      }" ({ "{") (labeled_statement "LAB_0001aa5a:\n        return (&DAT_000b4270)[iVar3 * 5];" (statement_identifier "LAB_0001aa5a") (: ":") (return_statement "return (&DAT_000b4270)[iVar3 * 5];" (return "return") (subscript_expression "(&DAT_000b4270)[iVar3 * 5]" (parenthesized_expression "(&DAT_000b4270)" (( "(") (pointer_expression "&DAT_000b4270" (& "&") (identifier "DAT_000b4270")) () ")")) ([ "[") (binary_expression "iVar3 * 5" (identifier "iVar3") (* "*") (number_literal "5")) (] "]")) (; ";"))) (} "}"))) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "piVar2 = piVar2 + 5;" (assignment_expression "piVar2 = piVar2 + 5" (identifier "piVar2") (= "=") (binary_expression "piVar2 + 5" (identifier "piVar2") (+ "+") (number_literal "5"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar3 != 0x1b)" (( "(") (binary_expression "iVar3 != 0x1b" (identifier "iVar3") (!= "!=") (number_literal "0x1b")) () ")")) (; ";")) (} "}")))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

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

int function_1(int var_2,int var_3,int var_4,char *var_1)

{
  int var_8;
  type_1 *var_6;
  int var_5;
  
  var_6 = macencs;
  if (var_1 == (char *)0x0) {
    var_5 = 0;
    do {
      if ((var_2 == var_6->var_2) &&
         ((((var_3 == var_6->var_3 || (var_6->var_3 < 0)) && (var_6->sysvermin <= var_4)) &&
          (var_6->var_1 == (char *)0x0)))) goto LAB_0001aa5a;
      var_5 = var_5 + 1;
      var_6 = var_6 + 1;
    } while (var_5 != 0x1b);
  }
  else {
    var_5 = 0;
    do {
      if ((((var_6->var_2 == var_2) && ((var_6->var_3 < 0 || (var_6->var_3 == var_3)))) &&
          (var_6->sysvermin <= var_4)) &&
         ((var_6->var_1 == (char *)0x0 ||
          (var_8 = var_7(var_6->var_1,var_1), var_8 == 0)))) {
LAB_0001aa5a:
        return macencs[var_5].charset;
      }
      var_5 = var_5 + 1;
      var_6 = var_6 + 1;
    } while (var_5 != 0x1b);
  }
  return 0;
}


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

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

undefined4 MASKED(int param_1,int param_2,int param_3,char *param_4)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  piVar2 = &DAT_000b4260;
  if (param_4 == (char *)0x0) {
    iVar3 = 0;
    do {
      if ((param_1 == *piVar2) &&
         ((((param_2 == piVar2[1] || (piVar2[1] < 0)) && (piVar2[2] <= param_3)) && (piVar2[3] == 0)
          ))) goto LAB_0001aa5a;
      iVar3 = iVar3 + 1;
      piVar2 = piVar2 + 5;
    } while (iVar3 != 0x1b);
  }
  else {
    iVar3 = 0;
    do {
      if ((((*piVar2 == param_1) && ((piVar2[1] < 0 || (piVar2[1] == param_2)))) &&
          (piVar2[2] <= param_3)) &&
         (((char *)piVar2[3] == (char *)0x0 ||
          (iVar1 = strcmp((char *)piVar2[3],param_4), iVar1 == 0)))) {
LAB_0001aa5a:
        return (&DAT_000b4270)[iVar3 * 5];
      }
      iVar3 = iVar3 + 1;
      piVar2 = piVar2 + 5;
    } while (iVar3 != 0x1b);
  }
  return 0;
}

