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

void ldemul_choose_mode(char *target)

{
  int iVar1;
  char *pcVar2;
  ld_emulation_xfer_type *plVar3;
  undefined **ppuVar4;
  
  if (((*target == 'g') && (target[1] == 'l')) && (target[2] == 'd')) {
    target = target + 3;
  }
  ppuVar4 = &ld_emulations;
  plVar3 = (ld_emulation_xfer_type *)ld_emulations;
  if (ld_emulations != (undefined *)0x0) {
    do {
      iVar1 = strcmp(target,plVar3->emulation_name);
      if (iVar1 == 0) {
        ld_emulation = plVar3;
        return;
      }
      ppuVar4 = ppuVar4 + 1;
      plVar3 = (ld_emulation_xfer_type *)*ppuVar4;
    } while (plVar3 != (ld_emulation_xfer_type *)0x0);
  }
  pcVar2 = (char *)dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);
  einfo(pcVar2,target);
  pcVar2 = (char *)dcgettext(0,"Supported emulations: ",5);
  einfo(pcVar2);
  ldemul_list_emulations(*(FILE **)PTR_stderr_00090f98);
  einfo("%F\n");
  return;
}



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

void FUN_00030500(char *param_1)

{
  int iVar1;
  undefined4 uVar2;
  undefined *puVar3;
  undefined **ppuVar4;
  
  if (((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')) {
    param_1 = param_1 + 3;
  }
  ppuVar4 = &PTR_PTR_FUN_000913c0;
  puVar3 = PTR_PTR_FUN_000913c0;
  if (PTR_PTR_FUN_000913c0 != (undefined *)0x0) {
    do {
      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));
      if (iVar1 == 0) {
        DAT_0009194c = puVar3;
        return;
      }
      ppuVar4 = ppuVar4 + 1;
      puVar3 = *ppuVar4;
    } while (puVar3 != (undefined *)0x0);
  }
  uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);
  FUN_00031760(uVar2,param_1);
  uVar2 = dcgettext(0,"Supported emulations: ",5);
  FUN_00031760(uVar2);
  FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98);
  FUN_00031760(&DAT_0004c086);
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00015a80
ADD EBX,0x60af7
SUB ESP,0xc
MOV EBP,dword ptr [ESP + 0x20]
CMP byte ptr [EBP],0x67
JZ 0x000305d0
MOV ESI,dword ptr [EBX + 0x3c0]
LEA EDI,[EBX + 0x3c0]
TEST ESI,ESI
JNZ 0x00030541
JMP 0x00030568
ADD EDI,0x4
MOV ESI,dword ptr [EDI]
TEST ESI,ESI
JZ 0x00030568
SUB ESP,0x8
PUSH dword ptr [ESI + 0x2c]
PUSH EBP
CALL 0x000140c0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00030538
MOV dword ptr [EBX + 0x94c],ESI
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
LEA EAX,[EBX + 0xfffbd468]
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x000142f0
POP EDX
POP ECX
PUSH EBP
PUSH EAX
CALL 0x00031760
ADD ESP,0xc
LEA EAX,[EBX + 0xfffbd44b]
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x000142f0
MOV dword ptr [ESP],EAX
CALL 0x00031760
MOV EAX,dword ptr [EBX + 0xffffff98]
POP ESI
PUSH dword ptr [EAX]
CALL 0x000304a0
LEA EAX,[EBX + 0xfffbb086]
MOV dword ptr [ESP],EAX
CALL 0x00031760
ADD ESP,0x10
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP byte ptr [EBP + 0x1],0x6c
JNZ 0x00030520
CMP byte ptr [EBP + 0x2],0x64
JNZ 0x00030520
ADD EBP,0x3
JMP 0x00030520
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00030500(char *param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  undefined **ppuVar4;\n  \n  if (((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')) {\n    param_1 = param_1 + 3;\n  }\n  ppuVar4 = &PTR_PTR_FUN_000913c0;\n  puVar3 = PTR_PTR_FUN_000913c0;\n  if (PTR_PTR_FUN_000913c0 != (undefined *)0x0) {\n    do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);\n  }\n  uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);\n  FUN_00031760(uVar2,param_1);\n  uVar2 = dcgettext(0,"Supported emulations: ",5);\n  FUN_00031760(uVar2);\n  FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98);\n  FUN_00031760(&DAT_0004c086);\n  return;\n}\n\n" comment (function_definition "void FUN_00030500(char *param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  undefined **ppuVar4;\n  \n  if (((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')) {\n    param_1 = param_1 + 3;\n  }\n  ppuVar4 = &PTR_PTR_FUN_000913c0;\n  puVar3 = PTR_PTR_FUN_000913c0;\n  if (PTR_PTR_FUN_000913c0 != (undefined *)0x0) {\n    do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);\n  }\n  uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);\n  FUN_00031760(uVar2,param_1);\n  uVar2 = dcgettext(0,"Supported emulations: ",5);\n  FUN_00031760(uVar2);\n  FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98);\n  FUN_00031760(&DAT_0004c086);\n  return;\n}" primitive_type (function_declarator "FUN_00030500(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  undefined **ppuVar4;\n  \n  if (((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')) {\n    param_1 = param_1 + 3;\n  }\n  ppuVar4 = &PTR_PTR_FUN_000913c0;\n  puVar3 = PTR_PTR_FUN_000913c0;\n  if (PTR_PTR_FUN_000913c0 != (undefined *)0x0) {\n    do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);\n  }\n  uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);\n  FUN_00031760(uVar2,param_1);\n  uVar2 = dcgettext(0,"Supported emulations: ",5);\n  FUN_00031760(uVar2);\n  FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98);\n  FUN_00031760(&DAT_0004c086);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined **ppuVar4;" type_identifier (pointer_declarator "**ppuVar4" * (pointer_declarator "*ppuVar4" * identifier)) ;) (if_statement "if (((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')) {\n    param_1 = param_1 + 3;\n  }" if (parenthesized_expression "(((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd'))" ( (binary_expression "((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')" (parenthesized_expression "((*param_1 == 'g') && (param_1[1] == 'l'))" ( (binary_expression "(*param_1 == 'g') && (param_1[1] == 'l')" (parenthesized_expression "(*param_1 == 'g')" ( (binary_expression "*param_1 == 'g'" (pointer_expression "*param_1" * identifier) == (char_literal "'g'" ' character ')) )) && (parenthesized_expression "(param_1[1] == 'l')" ( (binary_expression "param_1[1] == 'l'" (subscript_expression "param_1[1]" identifier [ number_literal ]) == (char_literal "'l'" ' character ')) ))) )) && (parenthesized_expression "(param_1[2] == 'd')" ( (binary_expression "param_1[2] == 'd'" (subscript_expression "param_1[2]" identifier [ number_literal ]) == (char_literal "'d'" ' character ')) ))) )) (compound_statement "{\n    param_1 = param_1 + 3;\n  }" { (expression_statement "param_1 = param_1 + 3;" (assignment_expression "param_1 = param_1 + 3" identifier = (binary_expression "param_1 + 3" identifier + number_literal)) ;) })) (expression_statement "ppuVar4 = &PTR_PTR_FUN_000913c0;" (assignment_expression "ppuVar4 = &PTR_PTR_FUN_000913c0" identifier = (pointer_expression "&PTR_PTR_FUN_000913c0" & identifier)) ;) (expression_statement "puVar3 = PTR_PTR_FUN_000913c0;" (assignment_expression "puVar3 = PTR_PTR_FUN_000913c0" identifier = identifier) ;) (if_statement "if (PTR_PTR_FUN_000913c0 != (undefined *)0x0) {\n    do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);\n  }" if (parenthesized_expression "(PTR_PTR_FUN_000913c0 != (undefined *)0x0)" ( (binary_expression "PTR_PTR_FUN_000913c0 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);\n  }" { (do_statement "do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);" do (compound_statement "{\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    }" { (expression_statement "iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));" (assignment_expression "iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c))" identifier = (call_expression "strcmp(param_1,*(char **)(puVar3 + 0x2c))" identifier (argument_list "(param_1,*(char **)(puVar3 + 0x2c))" ( identifier , (pointer_expression "*(char **)(puVar3 + 0x2c)" * (cast_expression "(char **)(puVar3 + 0x2c)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar3 + 0x2c)" ( (binary_expression "puVar3 + 0x2c" identifier + number_literal) )))) )))) ;) (if_statement "if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        DAT_0009194c = puVar3;\n        return;\n      }" { (expression_statement "DAT_0009194c = puVar3;" (assignment_expression "DAT_0009194c = puVar3" identifier = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "ppuVar4 = ppuVar4 + 1;" (assignment_expression "ppuVar4 = ppuVar4 + 1" identifier = (binary_expression "ppuVar4 + 1" identifier + number_literal)) ;) (expression_statement "puVar3 = *ppuVar4;" (assignment_expression "puVar3 = *ppuVar4" identifier = (pointer_expression "*ppuVar4" * identifier)) ;) }) while (parenthesized_expression "(puVar3 != (undefined *)0x0)" ( (binary_expression "puVar3 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (expression_statement "uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);" (assignment_expression "uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5)" identifier = (call_expression "dcgettext(0,"%P: unrecognised emulation mode: %s\n",5)" identifier (argument_list "(0,"%P: unrecognised emulation mode: %s\n",5)" ( number_literal , (string_literal ""%P: unrecognised emulation mode: %s\n"" " string_content escape_sequence ") , number_literal )))) ;) (expression_statement "FUN_00031760(uVar2,param_1);" (call_expression "FUN_00031760(uVar2,param_1)" identifier (argument_list "(uVar2,param_1)" ( identifier , identifier ))) ;) (expression_statement "uVar2 = dcgettext(0,"Supported emulations: ",5);" (assignment_expression "uVar2 = dcgettext(0,"Supported emulations: ",5)" identifier = (call_expression "dcgettext(0,"Supported emulations: ",5)" identifier (argument_list "(0,"Supported emulations: ",5)" ( number_literal , (string_literal ""Supported emulations: "" " string_content ") , number_literal )))) ;) (expression_statement "FUN_00031760(uVar2);" (call_expression "FUN_00031760(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98);" (call_expression "FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98)" identifier (argument_list "(*(undefined4 *)PTR_stderr_00090f98)" ( (pointer_expression "*(undefined4 *)PTR_stderr_00090f98" * (cast_expression "(undefined4 *)PTR_stderr_00090f98" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ))) ;) (expression_statement "FUN_00031760(&DAT_0004c086);" (call_expression "FUN_00031760(&DAT_0004c086)" identifier (argument_list "(&DAT_0004c086)" ( (pointer_expression "&DAT_0004c086" & identifier) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid ldemul_choose_mode(char *target)\n\n{\n  int iVar1;\n  char *pcVar2;\n  ld_emulation_xfer_type *plVar3;\n  undefined **ppuVar4;\n  \n  if (((*target == 'g') && (target[1] == 'l')) && (target[2] == 'd')) {\n    target = target + 3;\n  }\n  ppuVar4 = &ld_emulations;\n  plVar3 = (ld_emulation_xfer_type *)ld_emulations;\n  if (ld_emulations != (undefined *)0x0) {\n    do {\n      iVar1 = strcmp(target,plVar3->emulation_name);\n      if (iVar1 == 0) {\n        ld_emulation = plVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      plVar3 = (ld_emulation_xfer_type *)*ppuVar4;\n    } while (plVar3 != (ld_emulation_xfer_type *)0x0);\n  }\n  pcVar2 = (char *)dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);\n  einfo(pcVar2,target);\n  pcVar2 = (char *)dcgettext(0,"Supported emulations: ",5);\n  einfo(pcVar2);\n  ldemul_list_emulations(*(FILE **)PTR_stderr_00090f98);\n  einfo("%F\n");\n  return;\n}\n\n" comment (function_definition "void ldemul_choose_mode(char *target)\n\n{\n  int iVar1;\n  char *pcVar2;\n  ld_emulation_xfer_type *plVar3;\n  undefined **ppuVar4;\n  \n  if (((*target == 'g') && (target[1] == 'l')) && (target[2] == 'd')) {\n    target = target + 3;\n  }\n  ppuVar4 = &ld_emulations;\n  plVar3 = (ld_emulation_xfer_type *)ld_emulations;\n  if (ld_emulations != (undefined *)0x0) {\n    do {\n      iVar1 = strcmp(target,plVar3->emulation_name);\n      if (iVar1 == 0) {\n        ld_emulation = plVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      plVar3 = (ld_emulation_xfer_type *)*ppuVar4;\n    } while (plVar3 != (ld_emulation_xfer_type *)0x0);\n  }\n  pcVar2 = (char *)dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);\n  einfo(pcVar2,target);\n  pcVar2 = (char *)dcgettext(0,"Supported emulations: ",5);\n  einfo(pcVar2);\n  ldemul_list_emulations(*(FILE **)PTR_stderr_00090f98);\n  einfo("%F\n");\n  return;\n}" primitive_type (function_declarator "ldemul_choose_mode(char *target)" identifier (parameter_list "(char *target)" ( (parameter_declaration "char *target" primitive_type (pointer_declarator "*target" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  ld_emulation_xfer_type *plVar3;\n  undefined **ppuVar4;\n  \n  if (((*target == 'g') && (target[1] == 'l')) && (target[2] == 'd')) {\n    target = target + 3;\n  }\n  ppuVar4 = &ld_emulations;\n  plVar3 = (ld_emulation_xfer_type *)ld_emulations;\n  if (ld_emulations != (undefined *)0x0) {\n    do {\n      iVar1 = strcmp(target,plVar3->emulation_name);\n      if (iVar1 == 0) {\n        ld_emulation = plVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      plVar3 = (ld_emulation_xfer_type *)*ppuVar4;\n    } while (plVar3 != (ld_emulation_xfer_type *)0x0);\n  }\n  pcVar2 = (char *)dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);\n  einfo(pcVar2,target);\n  pcVar2 = (char *)dcgettext(0,"Supported emulations: ",5);\n  einfo(pcVar2);\n  ldemul_list_emulations(*(FILE **)PTR_stderr_00090f98);\n  einfo("%F\n");\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "ld_emulation_xfer_type *plVar3;" type_identifier (pointer_declarator "*plVar3" * identifier) ;) (declaration "undefined **ppuVar4;" type_identifier (pointer_declarator "**ppuVar4" * (pointer_declarator "*ppuVar4" * identifier)) ;) (if_statement "if (((*target == 'g') && (target[1] == 'l')) && (target[2] == 'd')) {\n    target = target + 3;\n  }" if (parenthesized_expression "(((*target == 'g') && (target[1] == 'l')) && (target[2] == 'd'))" ( (binary_expression "((*target == 'g') && (target[1] == 'l')) && (target[2] == 'd')" (parenthesized_expression "((*target == 'g') && (target[1] == 'l'))" ( (binary_expression "(*target == 'g') && (target[1] == 'l')" (parenthesized_expression "(*target == 'g')" ( (binary_expression "*target == 'g'" (pointer_expression "*target" * identifier) == (char_literal "'g'" ' character ')) )) && (parenthesized_expression "(target[1] == 'l')" ( (binary_expression "target[1] == 'l'" (subscript_expression "target[1]" identifier [ number_literal ]) == (char_literal "'l'" ' character ')) ))) )) && (parenthesized_expression "(target[2] == 'd')" ( (binary_expression "target[2] == 'd'" (subscript_expression "target[2]" identifier [ number_literal ]) == (char_literal "'d'" ' character ')) ))) )) (compound_statement "{\n    target = target + 3;\n  }" { (expression_statement "target = target + 3;" (assignment_expression "target = target + 3" identifier = (binary_expression "target + 3" identifier + number_literal)) ;) })) (expression_statement "ppuVar4 = &ld_emulations;" (assignment_expression "ppuVar4 = &ld_emulations" identifier = (pointer_expression "&ld_emulations" & identifier)) ;) (expression_statement "plVar3 = (ld_emulation_xfer_type *)ld_emulations;" (assignment_expression "plVar3 = (ld_emulation_xfer_type *)ld_emulations" identifier = (cast_expression "(ld_emulation_xfer_type *)ld_emulations" ( (type_descriptor "ld_emulation_xfer_type *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if (ld_emulations != (undefined *)0x0) {\n    do {\n      iVar1 = strcmp(target,plVar3->emulation_name);\n      if (iVar1 == 0) {\n        ld_emulation = plVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      plVar3 = (ld_emulation_xfer_type *)*ppuVar4;\n    } while (plVar3 != (ld_emulation_xfer_type *)0x0);\n  }" if (parenthesized_expression "(ld_emulations != (undefined *)0x0)" ( (binary_expression "ld_emulations != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    do {\n      iVar1 = strcmp(target,plVar3->emulation_name);\n      if (iVar1 == 0) {\n        ld_emulation = plVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      plVar3 = (ld_emulation_xfer_type *)*ppuVar4;\n    } while (plVar3 != (ld_emulation_xfer_type *)0x0);\n  }" { (do_statement "do {\n      iVar1 = strcmp(target,plVar3->emulation_name);\n      if (iVar1 == 0) {\n        ld_emulation = plVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      plVar3 = (ld_emulation_xfer_type *)*ppuVar4;\n    } while (plVar3 != (ld_emulation_xfer_type *)0x0);" do (compound_statement "{\n      iVar1 = strcmp(target,plVar3->emulation_name);\n      if (iVar1 == 0) {\n        ld_emulation = plVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      plVar3 = (ld_emulation_xfer_type *)*ppuVar4;\n    }" { (expression_statement "iVar1 = strcmp(target,plVar3->emulation_name);" (assignment_expression "iVar1 = strcmp(target,plVar3->emulation_name)" identifier = (call_expression "strcmp(target,plVar3->emulation_name)" identifier (argument_list "(target,plVar3->emulation_name)" ( identifier , (field_expression "plVar3->emulation_name" identifier -> field_identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n        ld_emulation = plVar3;\n        return;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        ld_emulation = plVar3;\n        return;\n      }" { (expression_statement "ld_emulation = plVar3;" (assignment_expression "ld_emulation = plVar3" identifier = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "ppuVar4 = ppuVar4 + 1;" (assignment_expression "ppuVar4 = ppuVar4 + 1" identifier = (binary_expression "ppuVar4 + 1" identifier + number_literal)) ;) (expression_statement "plVar3 = (ld_emulation_xfer_type *)*ppuVar4;" (assignment_expression "plVar3 = (ld_emulation_xfer_type *)*ppuVar4" identifier = (cast_expression "(ld_emulation_xfer_type *)*ppuVar4" ( (type_descriptor "ld_emulation_xfer_type *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*ppuVar4" * identifier))) ;) }) while (parenthesized_expression "(plVar3 != (ld_emulation_xfer_type *)0x0)" ( (binary_expression "plVar3 != (ld_emulation_xfer_type *)0x0" identifier != (cast_expression "(ld_emulation_xfer_type *)0x0" ( (type_descriptor "ld_emulation_xfer_type *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (expression_statement "pcVar2 = (char *)dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);" (assignment_expression "pcVar2 = (char *)dcgettext(0,"%P: unrecognised emulation mode: %s\n",5)" identifier = (cast_expression "(char *)dcgettext(0,"%P: unrecognised emulation mode: %s\n",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"%P: unrecognised emulation mode: %s\n",5)" identifier (argument_list "(0,"%P: unrecognised emulation mode: %s\n",5)" ( number_literal , (string_literal ""%P: unrecognised emulation mode: %s\n"" " string_content escape_sequence ") , number_literal ))))) ;) (expression_statement "einfo(pcVar2,target);" (call_expression "einfo(pcVar2,target)" identifier (argument_list "(pcVar2,target)" ( identifier , identifier ))) ;) (expression_statement "pcVar2 = (char *)dcgettext(0,"Supported emulations: ",5);" (assignment_expression "pcVar2 = (char *)dcgettext(0,"Supported emulations: ",5)" identifier = (cast_expression "(char *)dcgettext(0,"Supported emulations: ",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"Supported emulations: ",5)" identifier (argument_list "(0,"Supported emulations: ",5)" ( number_literal , (string_literal ""Supported emulations: "" " string_content ") , number_literal ))))) ;) (expression_statement "einfo(pcVar2);" (call_expression "einfo(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) (expression_statement "ldemul_list_emulations(*(FILE **)PTR_stderr_00090f98);" (call_expression "ldemul_list_emulations(*(FILE **)PTR_stderr_00090f98)" identifier (argument_list "(*(FILE **)PTR_stderr_00090f98)" ( (pointer_expression "*(FILE **)PTR_stderr_00090f98" * (cast_expression "(FILE **)PTR_stderr_00090f98" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) ))) ;) (expression_statement "einfo("%F\n");" (call_expression "einfo("%F\n")" identifier (argument_list "("%F\n")" ( (string_literal ""%F\n"" " string_content escape_sequence ") ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00030500(char *param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  undefined **ppuVar4;\n  \n  if (((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')) {\n    param_1 = param_1 + 3;\n  }\n  ppuVar4 = &PTR_PTR_FUN_000913c0;\n  puVar3 = PTR_PTR_FUN_000913c0;\n  if (PTR_PTR_FUN_000913c0 != (undefined *)0x0) {\n    do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);\n  }\n  uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);\n  FUN_00031760(uVar2,param_1);\n  uVar2 = dcgettext(0,"Supported emulations: ",5);\n  FUN_00031760(uVar2);\n  FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98);\n  FUN_00031760(&DAT_0004c086);\n  return;\n}\n\n" (function_definition "void FUN_00030500(char *param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  undefined **ppuVar4;\n  \n  if (((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')) {\n    param_1 = param_1 + 3;\n  }\n  ppuVar4 = &PTR_PTR_FUN_000913c0;\n  puVar3 = PTR_PTR_FUN_000913c0;\n  if (PTR_PTR_FUN_000913c0 != (undefined *)0x0) {\n    do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);\n  }\n  uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);\n  FUN_00031760(uVar2,param_1);\n  uVar2 = dcgettext(0,"Supported emulations: ",5);\n  FUN_00031760(uVar2);\n  FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98);\n  FUN_00031760(&DAT_0004c086);\n  return;\n}" primitive_type (function_declarator "FUN_00030500(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  undefined **ppuVar4;\n  \n  if (((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')) {\n    param_1 = param_1 + 3;\n  }\n  ppuVar4 = &PTR_PTR_FUN_000913c0;\n  puVar3 = PTR_PTR_FUN_000913c0;\n  if (PTR_PTR_FUN_000913c0 != (undefined *)0x0) {\n    do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);\n  }\n  uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);\n  FUN_00031760(uVar2,param_1);\n  uVar2 = dcgettext(0,"Supported emulations: ",5);\n  FUN_00031760(uVar2);\n  FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98);\n  FUN_00031760(&DAT_0004c086);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined **ppuVar4;" type_identifier (pointer_declarator "**ppuVar4" * (pointer_declarator "*ppuVar4" * identifier)) ;) (if_statement "if (((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')) {\n    param_1 = param_1 + 3;\n  }" if (parenthesized_expression "(((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd'))" ( (binary_expression "((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')" (parenthesized_expression "((*param_1 == 'g') && (param_1[1] == 'l'))" ( (binary_expression "(*param_1 == 'g') && (param_1[1] == 'l')" (parenthesized_expression "(*param_1 == 'g')" ( (binary_expression "*param_1 == 'g'" (pointer_expression "*param_1" * identifier) == (char_literal "'g'" ' character ')) )) && (parenthesized_expression "(param_1[1] == 'l')" ( (binary_expression "param_1[1] == 'l'" (subscript_expression "param_1[1]" identifier [ number_literal ]) == (char_literal "'l'" ' character ')) ))) )) && (parenthesized_expression "(param_1[2] == 'd')" ( (binary_expression "param_1[2] == 'd'" (subscript_expression "param_1[2]" identifier [ number_literal ]) == (char_literal "'d'" ' character ')) ))) )) (compound_statement "{\n    param_1 = param_1 + 3;\n  }" { (expression_statement "param_1 = param_1 + 3;" (assignment_expression "param_1 = param_1 + 3" identifier = (binary_expression "param_1 + 3" identifier + number_literal)) ;) })) (expression_statement "ppuVar4 = &PTR_PTR_FUN_000913c0;" (assignment_expression "ppuVar4 = &PTR_PTR_FUN_000913c0" identifier = (pointer_expression "&PTR_PTR_FUN_000913c0" & identifier)) ;) (expression_statement "puVar3 = PTR_PTR_FUN_000913c0;" (assignment_expression "puVar3 = PTR_PTR_FUN_000913c0" identifier = identifier) ;) (if_statement "if (PTR_PTR_FUN_000913c0 != (undefined *)0x0) {\n    do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);\n  }" if (parenthesized_expression "(PTR_PTR_FUN_000913c0 != (undefined *)0x0)" ( (binary_expression "PTR_PTR_FUN_000913c0 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);\n  }" { (do_statement "do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);" do (compound_statement "{\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    }" { (expression_statement "iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));" (assignment_expression "iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c))" identifier = (call_expression "strcmp(param_1,*(char **)(puVar3 + 0x2c))" identifier (argument_list "(param_1,*(char **)(puVar3 + 0x2c))" ( identifier , (pointer_expression "*(char **)(puVar3 + 0x2c)" * (cast_expression "(char **)(puVar3 + 0x2c)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar3 + 0x2c)" ( (binary_expression "puVar3 + 0x2c" identifier + number_literal) )))) )))) ;) (if_statement "if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        DAT_0009194c = puVar3;\n        return;\n      }" { (expression_statement "DAT_0009194c = puVar3;" (assignment_expression "DAT_0009194c = puVar3" identifier = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "ppuVar4 = ppuVar4 + 1;" (assignment_expression "ppuVar4 = ppuVar4 + 1" identifier = (binary_expression "ppuVar4 + 1" identifier + number_literal)) ;) (expression_statement "puVar3 = *ppuVar4;" (assignment_expression "puVar3 = *ppuVar4" identifier = (pointer_expression "*ppuVar4" * identifier)) ;) }) while (parenthesized_expression "(puVar3 != (undefined *)0x0)" ( (binary_expression "puVar3 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (expression_statement "uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);" (assignment_expression "uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5)" identifier = (call_expression "dcgettext(0,"%P: unrecognised emulation mode: %s\n",5)" identifier (argument_list "(0,"%P: unrecognised emulation mode: %s\n",5)" ( number_literal , (string_literal ""%P: unrecognised emulation mode: %s\n"" " string_content escape_sequence ") , number_literal )))) ;) (expression_statement "FUN_00031760(uVar2,param_1);" (call_expression "FUN_00031760(uVar2,param_1)" identifier (argument_list "(uVar2,param_1)" ( identifier , identifier ))) ;) (expression_statement "uVar2 = dcgettext(0,"Supported emulations: ",5);" (assignment_expression "uVar2 = dcgettext(0,"Supported emulations: ",5)" identifier = (call_expression "dcgettext(0,"Supported emulations: ",5)" identifier (argument_list "(0,"Supported emulations: ",5)" ( number_literal , (string_literal ""Supported emulations: "" " string_content ") , number_literal )))) ;) (expression_statement "FUN_00031760(uVar2);" (call_expression "FUN_00031760(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98);" (call_expression "FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98)" identifier (argument_list "(*(undefined4 *)PTR_stderr_00090f98)" ( (pointer_expression "*(undefined4 *)PTR_stderr_00090f98" * (cast_expression "(undefined4 *)PTR_stderr_00090f98" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ))) ;) (expression_statement "FUN_00031760(&DAT_0004c086);" (call_expression "FUN_00031760(&DAT_0004c086)" identifier (argument_list "(&DAT_0004c086)" ( (pointer_expression "&DAT_0004c086" & identifier) ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' character ')) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' character ')) ))) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' character ')) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence ") , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00030500(char *param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  undefined **ppuVar4;\n  \n  if (((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')) {\n    param_1 = param_1 + 3;\n  }\n  ppuVar4 = &PTR_PTR_FUN_000913c0;\n  puVar3 = PTR_PTR_FUN_000913c0;\n  if (PTR_PTR_FUN_000913c0 != (undefined *)0x0) {\n    do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);\n  }\n  uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);\n  FUN_00031760(uVar2,param_1);\n  uVar2 = dcgettext(0,"Supported emulations: ",5);\n  FUN_00031760(uVar2);\n  FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98);\n  FUN_00031760(&DAT_0004c086);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00030500(char *param_1)" (identifier "FUN_00030500") (parameter_list "(char *param_1)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined *puVar3;\n  undefined **ppuVar4;\n  \n  if (((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')) {\n    param_1 = param_1 + 3;\n  }\n  ppuVar4 = &PTR_PTR_FUN_000913c0;\n  puVar3 = PTR_PTR_FUN_000913c0;\n  if (PTR_PTR_FUN_000913c0 != (undefined *)0x0) {\n    do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);\n  }\n  uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);\n  FUN_00031760(uVar2,param_1);\n  uVar2 = dcgettext(0,"Supported emulations: ",5);\n  FUN_00031760(uVar2);\n  FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98);\n  FUN_00031760(&DAT_0004c086);\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "undefined *puVar3;" (type_identifier "undefined") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "undefined **ppuVar4;" (type_identifier "undefined") (pointer_declarator "**ppuVar4" (* "*") (pointer_declarator "*ppuVar4" (* "*") (identifier "ppuVar4"))) (; ";")) (if_statement "if (((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')) {\n    param_1 = param_1 + 3;\n  }" (if "if") (parenthesized_expression "(((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd'))" (( "(") (binary_expression "((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')" (parenthesized_expression "((*param_1 == 'g') && (param_1[1] == 'l'))" (( "(") (binary_expression "(*param_1 == 'g') && (param_1[1] == 'l')" (parenthesized_expression "(*param_1 == 'g')" (( "(") (binary_expression "*param_1 == 'g'" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (char_literal "'g'" (' "'") (character "g") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(param_1[1] == 'l')" (( "(") (binary_expression "param_1[1] == 'l'" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (== "==") (char_literal "'l'" (' "'") (character "l") (' "'"))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(param_1[2] == 'd')" (( "(") (binary_expression "param_1[2] == 'd'" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (== "==") (char_literal "'d'" (' "'") (character "d") (' "'"))) () ")"))) () ")")) (compound_statement "{\n    param_1 = param_1 + 3;\n  }" ({ "{") (expression_statement "param_1 = param_1 + 3;" (assignment_expression "param_1 = param_1 + 3" (identifier "param_1") (= "=") (binary_expression "param_1 + 3" (identifier "param_1") (+ "+") (number_literal "3"))) (; ";")) (} "}"))) (expression_statement "ppuVar4 = &PTR_PTR_FUN_000913c0;" (assignment_expression "ppuVar4 = &PTR_PTR_FUN_000913c0" (identifier "ppuVar4") (= "=") (pointer_expression "&PTR_PTR_FUN_000913c0" (& "&") (identifier "PTR_PTR_FUN_000913c0"))) (; ";")) (expression_statement "puVar3 = PTR_PTR_FUN_000913c0;" (assignment_expression "puVar3 = PTR_PTR_FUN_000913c0" (identifier "puVar3") (= "=") (identifier "PTR_PTR_FUN_000913c0")) (; ";")) (if_statement "if (PTR_PTR_FUN_000913c0 != (undefined *)0x0) {\n    do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);\n  }" (if "if") (parenthesized_expression "(PTR_PTR_FUN_000913c0 != (undefined *)0x0)" (( "(") (binary_expression "PTR_PTR_FUN_000913c0 != (undefined *)0x0" (identifier "PTR_PTR_FUN_000913c0") (!= "!=") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);\n  }" ({ "{") (do_statement "do {\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    } while (puVar3 != (undefined *)0x0);" (do "do") (compound_statement "{\n      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));\n      if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }\n      ppuVar4 = ppuVar4 + 1;\n      puVar3 = *ppuVar4;\n    }" ({ "{") (expression_statement "iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));" (assignment_expression "iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c))" (identifier "iVar1") (= "=") (call_expression "strcmp(param_1,*(char **)(puVar3 + 0x2c))" (identifier "strcmp") (argument_list "(param_1,*(char **)(puVar3 + 0x2c))" (( "(") (identifier "param_1") (, ",") (pointer_expression "*(char **)(puVar3 + 0x2c)" (* "*") (cast_expression "(char **)(puVar3 + 0x2c)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar3 + 0x2c)" (( "(") (binary_expression "puVar3 + 0x2c" (identifier "puVar3") (+ "+") (number_literal "0x2c")) () ")")))) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n        DAT_0009194c = puVar3;\n        return;\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        DAT_0009194c = puVar3;\n        return;\n      }" ({ "{") (expression_statement "DAT_0009194c = puVar3;" (assignment_expression "DAT_0009194c = puVar3" (identifier "DAT_0009194c") (= "=") (identifier "puVar3")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "ppuVar4 = ppuVar4 + 1;" (assignment_expression "ppuVar4 = ppuVar4 + 1" (identifier "ppuVar4") (= "=") (binary_expression "ppuVar4 + 1" (identifier "ppuVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar3 = *ppuVar4;" (assignment_expression "puVar3 = *ppuVar4" (identifier "puVar3") (= "=") (pointer_expression "*ppuVar4" (* "*") (identifier "ppuVar4"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar3 != (undefined *)0x0)" (( "(") (binary_expression "puVar3 != (undefined *)0x0" (identifier "puVar3") (!= "!=") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (} "}"))) (expression_statement "uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);" (assignment_expression "uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5)" (identifier "uVar2") (= "=") (call_expression "dcgettext(0,"%P: unrecognised emulation mode: %s\n",5)" (identifier "dcgettext") (argument_list "(0,"%P: unrecognised emulation mode: %s\n",5)" (( "(") (number_literal "0") (, ",") (string_literal ""%P: unrecognised emulation mode: %s\n"" (" """) (string_content "%P: unrecognised emulation mode: %s") (escape_sequence "\n") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "FUN_00031760(uVar2,param_1);" (call_expression "FUN_00031760(uVar2,param_1)" (identifier "FUN_00031760") (argument_list "(uVar2,param_1)" (( "(") (identifier "uVar2") (, ",") (identifier "param_1") () ")"))) (; ";")) (expression_statement "uVar2 = dcgettext(0,"Supported emulations: ",5);" (assignment_expression "uVar2 = dcgettext(0,"Supported emulations: ",5)" (identifier "uVar2") (= "=") (call_expression "dcgettext(0,"Supported emulations: ",5)" (identifier "dcgettext") (argument_list "(0,"Supported emulations: ",5)" (( "(") (number_literal "0") (, ",") (string_literal ""Supported emulations: "" (" """) (string_content "Supported emulations: ") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "FUN_00031760(uVar2);" (call_expression "FUN_00031760(uVar2)" (identifier "FUN_00031760") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98);" (call_expression "FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98)" (identifier "FUN_000304a0") (argument_list "(*(undefined4 *)PTR_stderr_00090f98)" (( "(") (pointer_expression "*(undefined4 *)PTR_stderr_00090f98" (* "*") (cast_expression "(undefined4 *)PTR_stderr_00090f98" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_stderr_00090f98"))) () ")"))) (; ";")) (expression_statement "FUN_00031760(&DAT_0004c086);" (call_expression "FUN_00031760(&DAT_0004c086)" (identifier "FUN_00031760") (argument_list "(&DAT_0004c086)" (( "(") (pointer_expression "&DAT_0004c086" (& "&") (identifier "DAT_0004c086")) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(char *var_1)

{
  int var_4;
  char *pcVar2;
  type_1 *var_6;
  type_2 **var_5;
  
  if (((*var_1 == 'g') && (var_1[1] == 'l')) && (var_1[2] == 'd')) {
    var_1 = var_1 + 3;
  }
  var_5 = &var_2;
  var_6 = (type_1 *)var_2;
  if (var_2 != (type_2 *)0x0) {
    do {
      var_4 = var_3(var_1,var_6->emulation_name);
      if (var_4 == 0) {
        ld_emulation = var_6;
        return;
      }
      var_5 = var_5 + 1;
      var_6 = (type_1 *)*var_5;
    } while (var_6 != (type_1 *)0x0);
  }
  pcVar2 = (char *)var_7(0,"%P: unrecognised emulation mode: %s\n",5);
  var_8(pcVar2,var_1);
  pcVar2 = (char *)var_7(0,"Supported emulations: ",5);
  var_8(pcVar2);
  var_9(*(type_3 **)PTR_stderr_00090f98);
  var_8("%F\n");
  return;
}


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

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

void MASKED(char *param_1)

{
  int iVar1;
  undefined4 uVar2;
  undefined *puVar3;
  undefined **ppuVar4;
  
  if (((*param_1 == 'g') && (param_1[1] == 'l')) && (param_1[2] == 'd')) {
    param_1 = param_1 + 3;
  }
  ppuVar4 = &PTR_PTR_FUN_000913c0;
  puVar3 = PTR_PTR_FUN_000913c0;
  if (PTR_PTR_FUN_000913c0 != (undefined *)0x0) {
    do {
      iVar1 = strcmp(param_1,*(char **)(puVar3 + 0x2c));
      if (iVar1 == 0) {
        DAT_0009194c = puVar3;
        return;
      }
      ppuVar4 = ppuVar4 + 1;
      puVar3 = *ppuVar4;
    } while (puVar3 != (undefined *)0x0);
  }
  uVar2 = dcgettext(0,"%P: unrecognised emulation mode: %s\n",5);
  FUN_00031760(uVar2,param_1);
  uVar2 = dcgettext(0,"Supported emulations: ",5);
  FUN_00031760(uVar2);
  FUN_000304a0(*(undefined4 *)PTR_stderr_00090f98);
  FUN_00031760(&DAT_0004c086);
  return;
}

