
void ldfile_add_library_path(char *name,bfd_boolean cmdline)

{
  search_dirs_type *psVar1;
  search_dirs_type *psVar2;
  char *pcVar3;
  long lVar4;
  byte *pbVar5;
  byte *pbVar6;
  bool bVar7;
  bool bVar8;
  byte bVar9;
  
  bVar9 = 0;
  if ((cmdline == 0) && (config.only_cmd_line_lib_dirs != 0)) {
    return;
  }
  psVar2 = (search_dirs_type *)xmalloc(0x18);
  psVar2->next = (search_dirs *)0x0;
  psVar2->cmdline = cmdline;
  psVar1 = psVar2;
  *search_tail_ptr = psVar2;
  search_tail_ptr = &psVar1->next;
  bVar7 = (byte)*name < 0x3d;
  bVar8 = *name == 0x3d;
  if (bVar8) {
    pcVar3 = (char *)concat(ld_sysroot,name + 1,0);
    psVar2->name = pcVar3;
    return;
  }
  lVar4 = 8;
  pbVar5 = (byte *)name;
  pbVar6 = (byte *)"$SYSROOT";
  do {
    if (lVar4 == 0) break;
    lVar4 = lVar4 + -1;
    bVar7 = *pbVar5 < *pbVar6;
    bVar8 = *pbVar5 == *pbVar6;
    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;
    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;
  } while (bVar8);
  if ((!bVar7 && !bVar8) != bVar7) {
    pcVar3 = (char *)xstrdup(name);
    psVar2->name = pcVar3;
    return;
  }
  pcVar3 = (char *)concat(ld_sysroot,name + 8,0);
  psVar2->name = pcVar3;
  return;
}



void FUN_001297e0(byte *param_1,int param_2)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  undefined8 uVar3;
  long lVar4;
  byte *pbVar5;
  byte *pbVar6;
  bool bVar7;
  bool bVar8;
  byte bVar9;
  
  bVar9 = 0;
  if ((param_2 == 0) && (DAT_002b60fc != 0)) {
    return;
  }
  puVar2 = (undefined8 *)xmalloc(0x18);
  *puVar2 = 0;
  *(int *)(puVar2 + 2) = param_2;
  puVar1 = puVar2;
  *(undefined8 **)PTR_DAT_002b2810 = puVar2;
  PTR_DAT_002b2810 = (undefined *)puVar1;
  bVar7 = *param_1 < 0x3d;
  bVar8 = *param_1 == 0x3d;
  if (bVar8) {
    uVar3 = concat(DAT_002b6028,param_1 + 1,0);
    puVar2[1] = uVar3;
    return;
  }
  lVar4 = 8;
  pbVar5 = param_1;
  pbVar6 = (byte *)"$SYSROOT";
  do {
    if (lVar4 == 0) break;
    lVar4 = lVar4 + -1;
    bVar7 = *pbVar5 < *pbVar6;
    bVar8 = *pbVar5 == *pbVar6;
    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;
    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;
  } while (bVar8);
  if ((!bVar7 && !bVar8) != bVar7) {
    uVar3 = xstrdup(param_1);
    puVar2[1] = uVar3;
    return;
  }
  uVar3 = concat(DAT_002b6028,param_1 + 8,0);
  puVar2[1] = uVar3;
  return;
}


TEST ESI,ESI
JNZ 0x001297ee
MOV EAX,dword ptr [0x002b60fc]
TEST EAX,EAX
JNZ 0x00129858
PUSH R12
MOV R12D,ESI
PUSH RBP
PUSH RBX
MOV RBX,RDI
MOV EDI,0x18
CALL 0x0010dda0
MOV RBP,RAX
MOV qword ptr [RAX],0x0
MOV dword ptr [RAX + 0x10],R12D
MOV RAX,qword ptr [0x002b2810]
MOV qword ptr [0x002b2810],RBP
MOV qword ptr [RAX],RBP
CMP byte ptr [RBX],0x3d
JZ 0x00129880
MOV ECX,0x8
LEA RDI,[0x16c200]
MOV RSI,RBX
CMPSB.REPE RDI,RSI
SETA AL
SBB AL,0x0
TEST AL,AL
JZ 0x00129860
MOV RDI,RBX
CALL 0x0010d510
POP RBX
MOV qword ptr [RBP + 0x8],RAX
POP RBP
POP R12
RET
RET
MOV RDI,qword ptr [0x002b6028]
LEA RSI,[RBX + 0x8]
XOR EDX,EDX
CALL 0x0010d450
POP RBX
MOV qword ptr [RBP + 0x8],RAX
POP RBP
POP R12
RET
MOV RDI,qword ptr [0x002b6028]
LEA RSI,[RBX + 0x1]
XOR EDX,EDX
XOR EAX,EAX
CALL 0x0010d450
POP RBX
MOV qword ptr [RBP + 0x8],RAX
POP RBP
POP R12
RET
(translation_unit "void FUN_001297e0(byte *param_1,int param_2)\n\n{\n  undefined8 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 == 0) && (DAT_002b60fc != 0)) {\n    return;\n  }\n  puVar2 = (undefined8 *)xmalloc(0x18);\n  *puVar2 = 0;\n  *(int *)(puVar2 + 2) = param_2;\n  puVar1 = puVar2;\n  *(undefined8 **)PTR_DAT_002b2810 = puVar2;\n  PTR_DAT_002b2810 = (undefined *)puVar1;\n  bVar7 = *param_1 < 0x3d;\n  bVar8 = *param_1 == 0x3d;\n  if (bVar8) {\n    uVar3 = concat(DAT_002b6028,param_1 + 1,0);\n    puVar2[1] = uVar3;\n    return;\n  }\n  lVar4 = 8;\n  pbVar5 = param_1;\n  pbVar6 = (byte *)"$SYSROOT";\n  do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while (bVar8);\n  if ((!bVar7 && !bVar8) != bVar7) {\n    uVar3 = xstrdup(param_1);\n    puVar2[1] = uVar3;\n    return;\n  }\n  uVar3 = concat(DAT_002b6028,param_1 + 8,0);\n  puVar2[1] = uVar3;\n  return;\n}\n\n" (function_definition "void FUN_001297e0(byte *param_1,int param_2)\n\n{\n  undefined8 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 == 0) && (DAT_002b60fc != 0)) {\n    return;\n  }\n  puVar2 = (undefined8 *)xmalloc(0x18);\n  *puVar2 = 0;\n  *(int *)(puVar2 + 2) = param_2;\n  puVar1 = puVar2;\n  *(undefined8 **)PTR_DAT_002b2810 = puVar2;\n  PTR_DAT_002b2810 = (undefined *)puVar1;\n  bVar7 = *param_1 < 0x3d;\n  bVar8 = *param_1 == 0x3d;\n  if (bVar8) {\n    uVar3 = concat(DAT_002b6028,param_1 + 1,0);\n    puVar2[1] = uVar3;\n    return;\n  }\n  lVar4 = 8;\n  pbVar5 = param_1;\n  pbVar6 = (byte *)"$SYSROOT";\n  do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while (bVar8);\n  if ((!bVar7 && !bVar8) != bVar7) {\n    uVar3 = xstrdup(param_1);\n    puVar2[1] = uVar3;\n    return;\n  }\n  uVar3 = concat(DAT_002b6028,param_1 + 8,0);\n  puVar2[1] = uVar3;\n  return;\n}" primitive_type (function_declarator "FUN_001297e0(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined8 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 == 0) && (DAT_002b60fc != 0)) {\n    return;\n  }\n  puVar2 = (undefined8 *)xmalloc(0x18);\n  *puVar2 = 0;\n  *(int *)(puVar2 + 2) = param_2;\n  puVar1 = puVar2;\n  *(undefined8 **)PTR_DAT_002b2810 = puVar2;\n  PTR_DAT_002b2810 = (undefined *)puVar1;\n  bVar7 = *param_1 < 0x3d;\n  bVar8 = *param_1 == 0x3d;\n  if (bVar8) {\n    uVar3 = concat(DAT_002b6028,param_1 + 1,0);\n    puVar2[1] = uVar3;\n    return;\n  }\n  lVar4 = 8;\n  pbVar5 = param_1;\n  pbVar6 = (byte *)"$SYSROOT";\n  do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while (bVar8);\n  if ((!bVar7 && !bVar8) != bVar7) {\n    uVar3 = xstrdup(param_1);\n    puVar2[1] = uVar3;\n    return;\n  }\n  uVar3 = concat(DAT_002b6028,param_1 + 8,0);\n  puVar2[1] = uVar3;\n  return;\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined8 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "bool bVar8;" primitive_type identifier ;) (declaration "byte bVar9;" type_identifier identifier ;) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" identifier = number_literal) ;) (if_statement "if ((param_2 == 0) && (DAT_002b60fc != 0)) {\n    return;\n  }" if (parenthesized_expression "((param_2 == 0) && (DAT_002b60fc != 0))" ( (binary_expression "(param_2 == 0) && (DAT_002b60fc != 0)" (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) && (parenthesized_expression "(DAT_002b60fc != 0)" ( (binary_expression "DAT_002b60fc != 0" identifier != number_literal) ))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "puVar2 = (undefined8 *)xmalloc(0x18);" (assignment_expression "puVar2 = (undefined8 *)xmalloc(0x18)" identifier = (cast_expression "(undefined8 *)xmalloc(0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x18)" identifier (argument_list "(0x18)" ( number_literal ))))) ;) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "*(int *)(puVar2 + 2) = param_2;" (assignment_expression "*(int *)(puVar2 + 2) = param_2" (pointer_expression "*(int *)(puVar2 + 2)" * (cast_expression "(int *)(puVar2 + 2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + 2)" ( (binary_expression "puVar2 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" identifier = identifier) ;) (expression_statement "*(undefined8 **)PTR_DAT_002b2810 = puVar2;" (assignment_expression "*(undefined8 **)PTR_DAT_002b2810 = puVar2" (pointer_expression "*(undefined8 **)PTR_DAT_002b2810" * (cast_expression "(undefined8 **)PTR_DAT_002b2810" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (expression_statement "PTR_DAT_002b2810 = (undefined *)puVar1;" (assignment_expression "PTR_DAT_002b2810 = (undefined *)puVar1" identifier = (cast_expression "(undefined *)puVar1" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "bVar7 = *param_1 < 0x3d;" (assignment_expression "bVar7 = *param_1 < 0x3d" identifier = (binary_expression "*param_1 < 0x3d" (pointer_expression "*param_1" * identifier) < number_literal)) ;) (expression_statement "bVar8 = *param_1 == 0x3d;" (assignment_expression "bVar8 = *param_1 == 0x3d" identifier = (binary_expression "*param_1 == 0x3d" (pointer_expression "*param_1" * identifier) == number_literal)) ;) (if_statement "if (bVar8) {\n    uVar3 = concat(DAT_002b6028,param_1 + 1,0);\n    puVar2[1] = uVar3;\n    return;\n  }" if (parenthesized_expression "(bVar8)" ( identifier )) (compound_statement "{\n    uVar3 = concat(DAT_002b6028,param_1 + 1,0);\n    puVar2[1] = uVar3;\n    return;\n  }" { (expression_statement "uVar3 = concat(DAT_002b6028,param_1 + 1,0);" (assignment_expression "uVar3 = concat(DAT_002b6028,param_1 + 1,0)" identifier = (call_expression "concat(DAT_002b6028,param_1 + 1,0)" identifier (argument_list "(DAT_002b6028,param_1 + 1,0)" ( identifier , (binary_expression "param_1 + 1" identifier + number_literal) , number_literal )))) ;) (expression_statement "puVar2[1] = uVar3;" (assignment_expression "puVar2[1] = uVar3" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "lVar4 = 8;" (assignment_expression "lVar4 = 8" identifier = number_literal) ;) (expression_statement "pbVar5 = param_1;" (assignment_expression "pbVar5 = param_1" identifier = identifier) ;) (expression_statement "pbVar6 = (byte *)"$SYSROOT";" (assignment_expression "pbVar6 = (byte *)"$SYSROOT"" identifier = (cast_expression "(byte *)"$SYSROOT"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""$SYSROOT"" " string_content "))) ;) (do_statement "do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while (bVar8);" do (compound_statement "{\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  }" { (if_statement "if (lVar4 == 0) break;" if (parenthesized_expression "(lVar4 == 0)" ( (binary_expression "lVar4 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar4 = lVar4 + -1;" (assignment_expression "lVar4 = lVar4 + -1" identifier = (binary_expression "lVar4 + -1" identifier + number_literal)) ;) (expression_statement "bVar7 = *pbVar5 < *pbVar6;" (assignment_expression "bVar7 = *pbVar5 < *pbVar6" identifier = (binary_expression "*pbVar5 < *pbVar6" (pointer_expression "*pbVar5" * identifier) < (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "bVar8 = *pbVar5 == *pbVar6;" (assignment_expression "bVar8 = *pbVar5 == *pbVar6" identifier = (binary_expression "*pbVar5 == *pbVar6" (pointer_expression "*pbVar5" * identifier) == (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;" (assignment_expression "pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1" identifier = (binary_expression "pbVar5 + (ulong)bVar9 * -2 + 1" (binary_expression "pbVar5 + (ulong)bVar9 * -2" identifier + (binary_expression "(ulong)bVar9 * -2" (cast_expression "(ulong)bVar9" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;" (assignment_expression "pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1" identifier = (binary_expression "pbVar6 + (ulong)bVar9 * -2 + 1" (binary_expression "pbVar6 + (ulong)bVar9 * -2" identifier + (binary_expression "(ulong)bVar9 * -2" (cast_expression "(ulong)bVar9" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(bVar8)" ( identifier )) ;) (if_statement "if ((!bVar7 && !bVar8) != bVar7) {\n    uVar3 = xstrdup(param_1);\n    puVar2[1] = uVar3;\n    return;\n  }" if (parenthesized_expression "((!bVar7 && !bVar8) != bVar7)" ( (binary_expression "(!bVar7 && !bVar8) != bVar7" (parenthesized_expression "(!bVar7 && !bVar8)" ( (binary_expression "!bVar7 && !bVar8" (unary_expression "!bVar7" ! identifier) && (unary_expression "!bVar8" ! identifier)) )) != identifier) )) (compound_statement "{\n    uVar3 = xstrdup(param_1);\n    puVar2[1] = uVar3;\n    return;\n  }" { (expression_statement "uVar3 = xstrdup(param_1);" (assignment_expression "uVar3 = xstrdup(param_1)" identifier = (call_expression "xstrdup(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "puVar2[1] = uVar3;" (assignment_expression "puVar2[1] = uVar3" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "uVar3 = concat(DAT_002b6028,param_1 + 8,0);" (assignment_expression "uVar3 = concat(DAT_002b6028,param_1 + 8,0)" identifier = (call_expression "concat(DAT_002b6028,param_1 + 8,0)" identifier (argument_list "(DAT_002b6028,param_1 + 8,0)" ( identifier , (binary_expression "param_1 + 8" identifier + number_literal) , number_literal )))) ;) (expression_statement "puVar2[1] = uVar3;" (assignment_expression "puVar2[1] = uVar3" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void ldfile_add_library_path(char *name,bfd_boolean cmdline)\n\n{\n  search_dirs_type *psVar1;\n  search_dirs_type *psVar2;\n  char *pcVar3;\n  long lVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((cmdline == 0) && (config.only_cmd_line_lib_dirs != 0)) {\n    return;\n  }\n  psVar2 = (search_dirs_type *)xmalloc(0x18);\n  psVar2->next = (search_dirs *)0x0;\n  psVar2->cmdline = cmdline;\n  psVar1 = psVar2;\n  *search_tail_ptr = psVar2;\n  search_tail_ptr = &psVar1->next;\n  bVar7 = (byte)*name < 0x3d;\n  bVar8 = *name == 0x3d;\n  if (bVar8) {\n    pcVar3 = (char *)concat(ld_sysroot,name + 1,0);\n    psVar2->name = pcVar3;\n    return;\n  }\n  lVar4 = 8;\n  pbVar5 = (byte *)name;\n  pbVar6 = (byte *)"$SYSROOT";\n  do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while (bVar8);\n  if ((!bVar7 && !bVar8) != bVar7) {\n    pcVar3 = (char *)xstrdup(name);\n    psVar2->name = pcVar3;\n    return;\n  }\n  pcVar3 = (char *)concat(ld_sysroot,name + 8,0);\n  psVar2->name = pcVar3;\n  return;\n}\n\n" (function_definition "void ldfile_add_library_path(char *name,bfd_boolean cmdline)\n\n{\n  search_dirs_type *psVar1;\n  search_dirs_type *psVar2;\n  char *pcVar3;\n  long lVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((cmdline == 0) && (config.only_cmd_line_lib_dirs != 0)) {\n    return;\n  }\n  psVar2 = (search_dirs_type *)xmalloc(0x18);\n  psVar2->next = (search_dirs *)0x0;\n  psVar2->cmdline = cmdline;\n  psVar1 = psVar2;\n  *search_tail_ptr = psVar2;\n  search_tail_ptr = &psVar1->next;\n  bVar7 = (byte)*name < 0x3d;\n  bVar8 = *name == 0x3d;\n  if (bVar8) {\n    pcVar3 = (char *)concat(ld_sysroot,name + 1,0);\n    psVar2->name = pcVar3;\n    return;\n  }\n  lVar4 = 8;\n  pbVar5 = (byte *)name;\n  pbVar6 = (byte *)"$SYSROOT";\n  do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while (bVar8);\n  if ((!bVar7 && !bVar8) != bVar7) {\n    pcVar3 = (char *)xstrdup(name);\n    psVar2->name = pcVar3;\n    return;\n  }\n  pcVar3 = (char *)concat(ld_sysroot,name + 8,0);\n  psVar2->name = pcVar3;\n  return;\n}" primitive_type (function_declarator "ldfile_add_library_path(char *name,bfd_boolean cmdline)" identifier (parameter_list "(char *name,bfd_boolean cmdline)" ( (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "bfd_boolean cmdline" type_identifier identifier) ))) (compound_statement "{\n  search_dirs_type *psVar1;\n  search_dirs_type *psVar2;\n  char *pcVar3;\n  long lVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((cmdline == 0) && (config.only_cmd_line_lib_dirs != 0)) {\n    return;\n  }\n  psVar2 = (search_dirs_type *)xmalloc(0x18);\n  psVar2->next = (search_dirs *)0x0;\n  psVar2->cmdline = cmdline;\n  psVar1 = psVar2;\n  *search_tail_ptr = psVar2;\n  search_tail_ptr = &psVar1->next;\n  bVar7 = (byte)*name < 0x3d;\n  bVar8 = *name == 0x3d;\n  if (bVar8) {\n    pcVar3 = (char *)concat(ld_sysroot,name + 1,0);\n    psVar2->name = pcVar3;\n    return;\n  }\n  lVar4 = 8;\n  pbVar5 = (byte *)name;\n  pbVar6 = (byte *)"$SYSROOT";\n  do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while (bVar8);\n  if ((!bVar7 && !bVar8) != bVar7) {\n    pcVar3 = (char *)xstrdup(name);\n    psVar2->name = pcVar3;\n    return;\n  }\n  pcVar3 = (char *)concat(ld_sysroot,name + 8,0);\n  psVar2->name = pcVar3;\n  return;\n}" { (declaration "search_dirs_type *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (declaration "search_dirs_type *psVar2;" type_identifier (pointer_declarator "*psVar2" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "bool bVar8;" primitive_type identifier ;) (declaration "byte bVar9;" type_identifier identifier ;) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" identifier = number_literal) ;) (if_statement "if ((cmdline == 0) && (config.only_cmd_line_lib_dirs != 0)) {\n    return;\n  }" if (parenthesized_expression "((cmdline == 0) && (config.only_cmd_line_lib_dirs != 0))" ( (binary_expression "(cmdline == 0) && (config.only_cmd_line_lib_dirs != 0)" (parenthesized_expression "(cmdline == 0)" ( (binary_expression "cmdline == 0" identifier == number_literal) )) && (parenthesized_expression "(config.only_cmd_line_lib_dirs != 0)" ( (binary_expression "config.only_cmd_line_lib_dirs != 0" (field_expression "config.only_cmd_line_lib_dirs" identifier . field_identifier) != number_literal) ))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "psVar2 = (search_dirs_type *)xmalloc(0x18);" (assignment_expression "psVar2 = (search_dirs_type *)xmalloc(0x18)" identifier = (cast_expression "(search_dirs_type *)xmalloc(0x18)" ( (type_descriptor "search_dirs_type *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x18)" identifier (argument_list "(0x18)" ( number_literal ))))) ;) (expression_statement "psVar2->next = (search_dirs *)0x0;" (assignment_expression "psVar2->next = (search_dirs *)0x0" (field_expression "psVar2->next" identifier -> field_identifier) = (cast_expression "(search_dirs *)0x0" ( (type_descriptor "search_dirs *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "psVar2->cmdline = cmdline;" (assignment_expression "psVar2->cmdline = cmdline" (field_expression "psVar2->cmdline" identifier -> field_identifier) = identifier) ;) (expression_statement "psVar1 = psVar2;" (assignment_expression "psVar1 = psVar2" identifier = identifier) ;) (expression_statement "*search_tail_ptr = psVar2;" (assignment_expression "*search_tail_ptr = psVar2" (pointer_expression "*search_tail_ptr" * identifier) = identifier) ;) (expression_statement "search_tail_ptr = &psVar1->next;" (assignment_expression "search_tail_ptr = &psVar1->next" identifier = (pointer_expression "&psVar1->next" & (field_expression "psVar1->next" identifier -> field_identifier))) ;) (expression_statement "bVar7 = (byte)*name < 0x3d;" (assignment_expression "bVar7 = (byte)*name < 0x3d" identifier = (binary_expression "(byte)*name < 0x3d" (binary_expression "(byte)*name" (parenthesized_expression "(byte)" ( identifier )) * identifier) < number_literal)) ;) (expression_statement "bVar8 = *name == 0x3d;" (assignment_expression "bVar8 = *name == 0x3d" identifier = (binary_expression "*name == 0x3d" (pointer_expression "*name" * identifier) == number_literal)) ;) (if_statement "if (bVar8) {\n    pcVar3 = (char *)concat(ld_sysroot,name + 1,0);\n    psVar2->name = pcVar3;\n    return;\n  }" if (parenthesized_expression "(bVar8)" ( identifier )) (compound_statement "{\n    pcVar3 = (char *)concat(ld_sysroot,name + 1,0);\n    psVar2->name = pcVar3;\n    return;\n  }" { (expression_statement "pcVar3 = (char *)concat(ld_sysroot,name + 1,0);" (assignment_expression "pcVar3 = (char *)concat(ld_sysroot,name + 1,0)" identifier = (cast_expression "(char *)concat(ld_sysroot,name + 1,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "concat(ld_sysroot,name + 1,0)" identifier (argument_list "(ld_sysroot,name + 1,0)" ( identifier , (binary_expression "name + 1" identifier + number_literal) , number_literal ))))) ;) (expression_statement "psVar2->name = pcVar3;" (assignment_expression "psVar2->name = pcVar3" (field_expression "psVar2->name" identifier -> field_identifier) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "lVar4 = 8;" (assignment_expression "lVar4 = 8" identifier = number_literal) ;) (expression_statement "pbVar5 = (byte *)name;" (assignment_expression "pbVar5 = (byte *)name" identifier = (cast_expression "(byte *)name" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pbVar6 = (byte *)"$SYSROOT";" (assignment_expression "pbVar6 = (byte *)"$SYSROOT"" identifier = (cast_expression "(byte *)"$SYSROOT"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""$SYSROOT"" " string_content "))) ;) (do_statement "do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while (bVar8);" do (compound_statement "{\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  }" { (if_statement "if (lVar4 == 0) break;" if (parenthesized_expression "(lVar4 == 0)" ( (binary_expression "lVar4 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar4 = lVar4 + -1;" (assignment_expression "lVar4 = lVar4 + -1" identifier = (binary_expression "lVar4 + -1" identifier + number_literal)) ;) (expression_statement "bVar7 = *pbVar5 < *pbVar6;" (assignment_expression "bVar7 = *pbVar5 < *pbVar6" identifier = (binary_expression "*pbVar5 < *pbVar6" (pointer_expression "*pbVar5" * identifier) < (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "bVar8 = *pbVar5 == *pbVar6;" (assignment_expression "bVar8 = *pbVar5 == *pbVar6" identifier = (binary_expression "*pbVar5 == *pbVar6" (pointer_expression "*pbVar5" * identifier) == (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;" (assignment_expression "pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1" identifier = (binary_expression "pbVar5 + (ulong)bVar9 * -2 + 1" (binary_expression "pbVar5 + (ulong)bVar9 * -2" identifier + (binary_expression "(ulong)bVar9 * -2" (cast_expression "(ulong)bVar9" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;" (assignment_expression "pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1" identifier = (binary_expression "pbVar6 + (ulong)bVar9 * -2 + 1" (binary_expression "pbVar6 + (ulong)bVar9 * -2" identifier + (binary_expression "(ulong)bVar9 * -2" (cast_expression "(ulong)bVar9" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(bVar8)" ( identifier )) ;) (if_statement "if ((!bVar7 && !bVar8) != bVar7) {\n    pcVar3 = (char *)xstrdup(name);\n    psVar2->name = pcVar3;\n    return;\n  }" if (parenthesized_expression "((!bVar7 && !bVar8) != bVar7)" ( (binary_expression "(!bVar7 && !bVar8) != bVar7" (parenthesized_expression "(!bVar7 && !bVar8)" ( (binary_expression "!bVar7 && !bVar8" (unary_expression "!bVar7" ! identifier) && (unary_expression "!bVar8" ! identifier)) )) != identifier) )) (compound_statement "{\n    pcVar3 = (char *)xstrdup(name);\n    psVar2->name = pcVar3;\n    return;\n  }" { (expression_statement "pcVar3 = (char *)xstrdup(name);" (assignment_expression "pcVar3 = (char *)xstrdup(name)" identifier = (cast_expression "(char *)xstrdup(name)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xstrdup(name)" identifier (argument_list "(name)" ( identifier ))))) ;) (expression_statement "psVar2->name = pcVar3;" (assignment_expression "psVar2->name = pcVar3" (field_expression "psVar2->name" identifier -> field_identifier) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "pcVar3 = (char *)concat(ld_sysroot,name + 8,0);" (assignment_expression "pcVar3 = (char *)concat(ld_sysroot,name + 8,0)" identifier = (cast_expression "(char *)concat(ld_sysroot,name + 8,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "concat(ld_sysroot,name + 8,0)" identifier (argument_list "(ld_sysroot,name + 8,0)" ( identifier , (binary_expression "name + 8" identifier + number_literal) , number_literal ))))) ;) (expression_statement "psVar2->name = pcVar3;" (assignment_expression "psVar2->name = pcVar3" (field_expression "psVar2->name" identifier -> field_identifier) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_001297e0(byte *param_1,int param_2)\n\n{\n  undefined8 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 == 0) && (DAT_002b60fc != 0)) {\n    return;\n  }\n  puVar2 = (undefined8 *)xmalloc(0x18);\n  *puVar2 = 0;\n  *(int *)(puVar2 + 2) = param_2;\n  puVar1 = puVar2;\n  *(undefined8 **)PTR_DAT_002b2810 = puVar2;\n  PTR_DAT_002b2810 = (undefined *)puVar1;\n  bVar7 = *param_1 < 0x3d;\n  bVar8 = *param_1 == 0x3d;\n  if (bVar8) {\n    uVar3 = concat(DAT_002b6028,param_1 + 1,0);\n    puVar2[1] = uVar3;\n    return;\n  }\n  lVar4 = 8;\n  pbVar5 = param_1;\n  pbVar6 = (byte *)"$SYSROOT";\n  do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while (bVar8);\n  if ((!bVar7 && !bVar8) != bVar7) {\n    uVar3 = xstrdup(param_1);\n    puVar2[1] = uVar3;\n    return;\n  }\n  uVar3 = concat(DAT_002b6028,param_1 + 8,0);\n  puVar2[1] = uVar3;\n  return;\n}\n\n" (function_definition "void FUN_001297e0(byte *param_1,int param_2)\n\n{\n  undefined8 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 == 0) && (DAT_002b60fc != 0)) {\n    return;\n  }\n  puVar2 = (undefined8 *)xmalloc(0x18);\n  *puVar2 = 0;\n  *(int *)(puVar2 + 2) = param_2;\n  puVar1 = puVar2;\n  *(undefined8 **)PTR_DAT_002b2810 = puVar2;\n  PTR_DAT_002b2810 = (undefined *)puVar1;\n  bVar7 = *param_1 < 0x3d;\n  bVar8 = *param_1 == 0x3d;\n  if (bVar8) {\n    uVar3 = concat(DAT_002b6028,param_1 + 1,0);\n    puVar2[1] = uVar3;\n    return;\n  }\n  lVar4 = 8;\n  pbVar5 = param_1;\n  pbVar6 = (byte *)"$SYSROOT";\n  do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while (bVar8);\n  if ((!bVar7 && !bVar8) != bVar7) {\n    uVar3 = xstrdup(param_1);\n    puVar2[1] = uVar3;\n    return;\n  }\n  uVar3 = concat(DAT_002b6028,param_1 + 8,0);\n  puVar2[1] = uVar3;\n  return;\n}" primitive_type (function_declarator "FUN_001297e0(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined8 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 == 0) && (DAT_002b60fc != 0)) {\n    return;\n  }\n  puVar2 = (undefined8 *)xmalloc(0x18);\n  *puVar2 = 0;\n  *(int *)(puVar2 + 2) = param_2;\n  puVar1 = puVar2;\n  *(undefined8 **)PTR_DAT_002b2810 = puVar2;\n  PTR_DAT_002b2810 = (undefined *)puVar1;\n  bVar7 = *param_1 < 0x3d;\n  bVar8 = *param_1 == 0x3d;\n  if (bVar8) {\n    uVar3 = concat(DAT_002b6028,param_1 + 1,0);\n    puVar2[1] = uVar3;\n    return;\n  }\n  lVar4 = 8;\n  pbVar5 = param_1;\n  pbVar6 = (byte *)"$SYSROOT";\n  do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while (bVar8);\n  if ((!bVar7 && !bVar8) != bVar7) {\n    uVar3 = xstrdup(param_1);\n    puVar2[1] = uVar3;\n    return;\n  }\n  uVar3 = concat(DAT_002b6028,param_1 + 8,0);\n  puVar2[1] = uVar3;\n  return;\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined8 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "bool bVar8;" primitive_type identifier ;) (declaration "byte bVar9;" type_identifier identifier ;) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" identifier = number_literal) ;) (if_statement "if ((param_2 == 0) && (DAT_002b60fc != 0)) {\n    return;\n  }" if (parenthesized_expression "((param_2 == 0) && (DAT_002b60fc != 0))" ( (binary_expression "(param_2 == 0) && (DAT_002b60fc != 0)" (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) && (parenthesized_expression "(DAT_002b60fc != 0)" ( (binary_expression "DAT_002b60fc != 0" identifier != number_literal) ))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "puVar2 = (undefined8 *)xmalloc(0x18);" (assignment_expression "puVar2 = (undefined8 *)xmalloc(0x18)" identifier = (cast_expression "(undefined8 *)xmalloc(0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x18)" identifier (argument_list "(0x18)" ( number_literal ))))) ;) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "*(int *)(puVar2 + 2) = param_2;" (assignment_expression "*(int *)(puVar2 + 2) = param_2" (pointer_expression "*(int *)(puVar2 + 2)" * (cast_expression "(int *)(puVar2 + 2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + 2)" ( (binary_expression "puVar2 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" identifier = identifier) ;) (expression_statement "*(undefined8 **)PTR_DAT_002b2810 = puVar2;" (assignment_expression "*(undefined8 **)PTR_DAT_002b2810 = puVar2" (pointer_expression "*(undefined8 **)PTR_DAT_002b2810" * (cast_expression "(undefined8 **)PTR_DAT_002b2810" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (expression_statement "PTR_DAT_002b2810 = (undefined *)puVar1;" (assignment_expression "PTR_DAT_002b2810 = (undefined *)puVar1" identifier = (cast_expression "(undefined *)puVar1" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "bVar7 = *param_1 < 0x3d;" (assignment_expression "bVar7 = *param_1 < 0x3d" identifier = (binary_expression "*param_1 < 0x3d" (pointer_expression "*param_1" * identifier) < number_literal)) ;) (expression_statement "bVar8 = *param_1 == 0x3d;" (assignment_expression "bVar8 = *param_1 == 0x3d" identifier = (binary_expression "*param_1 == 0x3d" (pointer_expression "*param_1" * identifier) == number_literal)) ;) (if_statement "if (bVar8) {\n    uVar3 = concat(DAT_002b6028,param_1 + 1,0);\n    puVar2[1] = uVar3;\n    return;\n  }" if (parenthesized_expression "(bVar8)" ( identifier )) (compound_statement "{\n    uVar3 = concat(DAT_002b6028,param_1 + 1,0);\n    puVar2[1] = uVar3;\n    return;\n  }" { (expression_statement "uVar3 = concat(DAT_002b6028,param_1 + 1,0);" (assignment_expression "uVar3 = concat(DAT_002b6028,param_1 + 1,0)" identifier = (call_expression "concat(DAT_002b6028,param_1 + 1,0)" identifier (argument_list "(DAT_002b6028,param_1 + 1,0)" ( identifier , (binary_expression "param_1 + 1" identifier + number_literal) , number_literal )))) ;) (expression_statement "puVar2[1] = uVar3;" (assignment_expression "puVar2[1] = uVar3" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "lVar4 = 8;" (assignment_expression "lVar4 = 8" identifier = number_literal) ;) (expression_statement "pbVar5 = param_1;" (assignment_expression "pbVar5 = param_1" identifier = identifier) ;) (expression_statement "pbVar6 = (byte *)"$SYSROOT";" (assignment_expression "pbVar6 = (byte *)"$SYSROOT"" identifier = (cast_expression "(byte *)"$SYSROOT"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""$SYSROOT"" " string_content "))) ;) (do_statement "do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while (bVar8);" do (compound_statement "{\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  }" { (if_statement "if (lVar4 == 0) break;" if (parenthesized_expression "(lVar4 == 0)" ( (binary_expression "lVar4 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar4 = lVar4 + -1;" (assignment_expression "lVar4 = lVar4 + -1" identifier = (binary_expression "lVar4 + -1" identifier + number_literal)) ;) (expression_statement "bVar7 = *pbVar5 < *pbVar6;" (assignment_expression "bVar7 = *pbVar5 < *pbVar6" identifier = (binary_expression "*pbVar5 < *pbVar6" (pointer_expression "*pbVar5" * identifier) < (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "bVar8 = *pbVar5 == *pbVar6;" (assignment_expression "bVar8 = *pbVar5 == *pbVar6" identifier = (binary_expression "*pbVar5 == *pbVar6" (pointer_expression "*pbVar5" * identifier) == (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;" (assignment_expression "pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1" identifier = (binary_expression "pbVar5 + (ulong)bVar9 * -2 + 1" (binary_expression "pbVar5 + (ulong)bVar9 * -2" identifier + (binary_expression "(ulong)bVar9 * -2" (cast_expression "(ulong)bVar9" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;" (assignment_expression "pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1" identifier = (binary_expression "pbVar6 + (ulong)bVar9 * -2 + 1" (binary_expression "pbVar6 + (ulong)bVar9 * -2" identifier + (binary_expression "(ulong)bVar9 * -2" (cast_expression "(ulong)bVar9" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(bVar8)" ( identifier )) ;) (if_statement "if ((!bVar7 && !bVar8) != bVar7) {\n    uVar3 = xstrdup(param_1);\n    puVar2[1] = uVar3;\n    return;\n  }" if (parenthesized_expression "((!bVar7 && !bVar8) != bVar7)" ( (binary_expression "(!bVar7 && !bVar8) != bVar7" (parenthesized_expression "(!bVar7 && !bVar8)" ( (binary_expression "!bVar7 && !bVar8" (unary_expression "!bVar7" ! identifier) && (unary_expression "!bVar8" ! identifier)) )) != identifier) )) (compound_statement "{\n    uVar3 = xstrdup(param_1);\n    puVar2[1] = uVar3;\n    return;\n  }" { (expression_statement "uVar3 = xstrdup(param_1);" (assignment_expression "uVar3 = xstrdup(param_1)" identifier = (call_expression "xstrdup(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "puVar2[1] = uVar3;" (assignment_expression "puVar2[1] = uVar3" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "uVar3 = concat(DAT_002b6028,param_1 + 8,0);" (assignment_expression "uVar3 = concat(DAT_002b6028,param_1 + 8,0)" identifier = (call_expression "concat(DAT_002b6028,param_1 + 8,0)" identifier (argument_list "(DAT_002b6028,param_1 + 8,0)" ( identifier , (binary_expression "param_1 + 8" identifier + number_literal) , number_literal )))) ;) (expression_statement "puVar2[1] = uVar3;" (assignment_expression "puVar2[1] = uVar3" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT)) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) < LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) == LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , LIT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (string_literal " string_content "))) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) < (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) == (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) }) while (parenthesized_expression ( IDENT )) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (unary_expression ! IDENT) && (unary_expression ! IDENT)) )) != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , LIT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return ;) })))
(function_definition "void FUN_001297e0(byte *param_1,int param_2)\n\n{\n  undefined8 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 == 0) && (DAT_002b60fc != 0)) {\n    return;\n  }\n  puVar2 = (undefined8 *)xmalloc(0x18);\n  *puVar2 = 0;\n  *(int *)(puVar2 + 2) = param_2;\n  puVar1 = puVar2;\n  *(undefined8 **)PTR_DAT_002b2810 = puVar2;\n  PTR_DAT_002b2810 = (undefined *)puVar1;\n  bVar7 = *param_1 < 0x3d;\n  bVar8 = *param_1 == 0x3d;\n  if (bVar8) {\n    uVar3 = concat(DAT_002b6028,param_1 + 1,0);\n    puVar2[1] = uVar3;\n    return;\n  }\n  lVar4 = 8;\n  pbVar5 = param_1;\n  pbVar6 = (byte *)"$SYSROOT";\n  do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while (bVar8);\n  if ((!bVar7 && !bVar8) != bVar7) {\n    uVar3 = xstrdup(param_1);\n    puVar2[1] = uVar3;\n    return;\n  }\n  uVar3 = concat(DAT_002b6028,param_1 + 8,0);\n  puVar2[1] = uVar3;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_001297e0(byte *param_1,int param_2)" (identifier "FUN_001297e0") (parameter_list "(byte *param_1,int param_2)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined8 *puVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 == 0) && (DAT_002b60fc != 0)) {\n    return;\n  }\n  puVar2 = (undefined8 *)xmalloc(0x18);\n  *puVar2 = 0;\n  *(int *)(puVar2 + 2) = param_2;\n  puVar1 = puVar2;\n  *(undefined8 **)PTR_DAT_002b2810 = puVar2;\n  PTR_DAT_002b2810 = (undefined *)puVar1;\n  bVar7 = *param_1 < 0x3d;\n  bVar8 = *param_1 == 0x3d;\n  if (bVar8) {\n    uVar3 = concat(DAT_002b6028,param_1 + 1,0);\n    puVar2[1] = uVar3;\n    return;\n  }\n  lVar4 = 8;\n  pbVar5 = param_1;\n  pbVar6 = (byte *)"$SYSROOT";\n  do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while (bVar8);\n  if ((!bVar7 && !bVar8) != bVar7) {\n    uVar3 = xstrdup(param_1);\n    puVar2[1] = uVar3;\n    return;\n  }\n  uVar3 = concat(DAT_002b6028,param_1 + 8,0);\n  puVar2[1] = uVar3;\n  return;\n}" ({ "{") (declaration "undefined8 *puVar1;" (type_identifier "undefined8") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined8 *puVar2;" (type_identifier "undefined8") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined8 uVar3;" (type_identifier "undefined8") (identifier "uVar3") (; ";")) (declaration "long lVar4;" (sized_type_specifier "long" (long "long")) (identifier "lVar4") (; ";")) (declaration "byte *pbVar5;" (type_identifier "byte") (pointer_declarator "*pbVar5" (* "*") (identifier "pbVar5")) (; ";")) (declaration "byte *pbVar6;" (type_identifier "byte") (pointer_declarator "*pbVar6" (* "*") (identifier "pbVar6")) (; ";")) (declaration "bool bVar7;" (primitive_type "bool") (identifier "bVar7") (; ";")) (declaration "bool bVar8;" (primitive_type "bool") (identifier "bVar8") (; ";")) (declaration "byte bVar9;" (type_identifier "byte") (identifier "bVar9") (; ";")) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" (identifier "bVar9") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((param_2 == 0) && (DAT_002b60fc != 0)) {\n    return;\n  }" (if "if") (parenthesized_expression "((param_2 == 0) && (DAT_002b60fc != 0))" (( "(") (binary_expression "(param_2 == 0) && (DAT_002b60fc != 0)" (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(DAT_002b60fc != 0)" (( "(") (binary_expression "DAT_002b60fc != 0" (identifier "DAT_002b60fc") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "puVar2 = (undefined8 *)xmalloc(0x18);" (assignment_expression "puVar2 = (undefined8 *)xmalloc(0x18)" (identifier "puVar2") (= "=") (cast_expression "(undefined8 *)xmalloc(0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(0x18)" (identifier "xmalloc") (argument_list "(0x18)" (( "(") (number_literal "0x18") () ")"))))) (; ";")) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(int *)(puVar2 + 2) = param_2;" (assignment_expression "*(int *)(puVar2 + 2) = param_2" (pointer_expression "*(int *)(puVar2 + 2)" (* "*") (cast_expression "(int *)(puVar2 + 2)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2 + 2)" (( "(") (binary_expression "puVar2 + 2" (identifier "puVar2") (+ "+") (number_literal "2")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" (identifier "puVar1") (= "=") (identifier "puVar2")) (; ";")) (expression_statement "*(undefined8 **)PTR_DAT_002b2810 = puVar2;" (assignment_expression "*(undefined8 **)PTR_DAT_002b2810 = puVar2" (pointer_expression "*(undefined8 **)PTR_DAT_002b2810" (* "*") (cast_expression "(undefined8 **)PTR_DAT_002b2810" (( "(") (type_descriptor "undefined8 **" (type_identifier "undefined8") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR_DAT_002b2810"))) (= "=") (identifier "puVar2")) (; ";")) (expression_statement "PTR_DAT_002b2810 = (undefined *)puVar1;" (assignment_expression "PTR_DAT_002b2810 = (undefined *)puVar1" (identifier "PTR_DAT_002b2810") (= "=") (cast_expression "(undefined *)puVar1" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) (; ";")) (expression_statement "bVar7 = *param_1 < 0x3d;" (assignment_expression "bVar7 = *param_1 < 0x3d" (identifier "bVar7") (= "=") (binary_expression "*param_1 < 0x3d" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (< "<") (number_literal "0x3d"))) (; ";")) (expression_statement "bVar8 = *param_1 == 0x3d;" (assignment_expression "bVar8 = *param_1 == 0x3d" (identifier "bVar8") (= "=") (binary_expression "*param_1 == 0x3d" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (number_literal "0x3d"))) (; ";")) (if_statement "if (bVar8) {\n    uVar3 = concat(DAT_002b6028,param_1 + 1,0);\n    puVar2[1] = uVar3;\n    return;\n  }" (if "if") (parenthesized_expression "(bVar8)" (( "(") (identifier "bVar8") () ")")) (compound_statement "{\n    uVar3 = concat(DAT_002b6028,param_1 + 1,0);\n    puVar2[1] = uVar3;\n    return;\n  }" ({ "{") (expression_statement "uVar3 = concat(DAT_002b6028,param_1 + 1,0);" (assignment_expression "uVar3 = concat(DAT_002b6028,param_1 + 1,0)" (identifier "uVar3") (= "=") (call_expression "concat(DAT_002b6028,param_1 + 1,0)" (identifier "concat") (argument_list "(DAT_002b6028,param_1 + 1,0)" (( "(") (identifier "DAT_002b6028") (, ",") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1")) (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "puVar2[1] = uVar3;" (assignment_expression "puVar2[1] = uVar3" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "lVar4 = 8;" (assignment_expression "lVar4 = 8" (identifier "lVar4") (= "=") (number_literal "8")) (; ";")) (expression_statement "pbVar5 = param_1;" (assignment_expression "pbVar5 = param_1" (identifier "pbVar5") (= "=") (identifier "param_1")) (; ";")) (expression_statement "pbVar6 = (byte *)"$SYSROOT";" (assignment_expression "pbVar6 = (byte *)"$SYSROOT"" (identifier "pbVar6") (= "=") (cast_expression "(byte *)"$SYSROOT"" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (string_literal ""$SYSROOT"" (" """) (string_content "$SYSROOT") (" """)))) (; ";")) (do_statement "do {\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  } while (bVar8);" (do "do") (compound_statement "{\n    if (lVar4 == 0) break;\n    lVar4 = lVar4 + -1;\n    bVar7 = *pbVar5 < *pbVar6;\n    bVar8 = *pbVar5 == *pbVar6;\n    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;\n    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;\n  }" ({ "{") (if_statement "if (lVar4 == 0) break;" (if "if") (parenthesized_expression "(lVar4 == 0)" (( "(") (binary_expression "lVar4 == 0" (identifier "lVar4") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "lVar4 = lVar4 + -1;" (assignment_expression "lVar4 = lVar4 + -1" (identifier "lVar4") (= "=") (binary_expression "lVar4 + -1" (identifier "lVar4") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "bVar7 = *pbVar5 < *pbVar6;" (assignment_expression "bVar7 = *pbVar5 < *pbVar6" (identifier "bVar7") (= "=") (binary_expression "*pbVar5 < *pbVar6" (pointer_expression "*pbVar5" (* "*") (identifier "pbVar5")) (< "<") (pointer_expression "*pbVar6" (* "*") (identifier "pbVar6")))) (; ";")) (expression_statement "bVar8 = *pbVar5 == *pbVar6;" (assignment_expression "bVar8 = *pbVar5 == *pbVar6" (identifier "bVar8") (= "=") (binary_expression "*pbVar5 == *pbVar6" (pointer_expression "*pbVar5" (* "*") (identifier "pbVar5")) (== "==") (pointer_expression "*pbVar6" (* "*") (identifier "pbVar6")))) (; ";")) (expression_statement "pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;" (assignment_expression "pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1" (identifier "pbVar5") (= "=") (binary_expression "pbVar5 + (ulong)bVar9 * -2 + 1" (binary_expression "pbVar5 + (ulong)bVar9 * -2" (identifier "pbVar5") (+ "+") (binary_expression "(ulong)bVar9 * -2" (cast_expression "(ulong)bVar9" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "bVar9")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;" (assignment_expression "pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1" (identifier "pbVar6") (= "=") (binary_expression "pbVar6 + (ulong)bVar9 * -2 + 1" (binary_expression "pbVar6 + (ulong)bVar9 * -2" (identifier "pbVar6") (+ "+") (binary_expression "(ulong)bVar9 * -2" (cast_expression "(ulong)bVar9" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "bVar9")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar8)" (( "(") (identifier "bVar8") () ")")) (; ";")) (if_statement "if ((!bVar7 && !bVar8) != bVar7) {\n    uVar3 = xstrdup(param_1);\n    puVar2[1] = uVar3;\n    return;\n  }" (if "if") (parenthesized_expression "((!bVar7 && !bVar8) != bVar7)" (( "(") (binary_expression "(!bVar7 && !bVar8) != bVar7" (parenthesized_expression "(!bVar7 && !bVar8)" (( "(") (binary_expression "!bVar7 && !bVar8" (unary_expression "!bVar7" (! "!") (identifier "bVar7")) (&& "&&") (unary_expression "!bVar8" (! "!") (identifier "bVar8"))) () ")")) (!= "!=") (identifier "bVar7")) () ")")) (compound_statement "{\n    uVar3 = xstrdup(param_1);\n    puVar2[1] = uVar3;\n    return;\n  }" ({ "{") (expression_statement "uVar3 = xstrdup(param_1);" (assignment_expression "uVar3 = xstrdup(param_1)" (identifier "uVar3") (= "=") (call_expression "xstrdup(param_1)" (identifier "xstrdup") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "puVar2[1] = uVar3;" (assignment_expression "puVar2[1] = uVar3" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "uVar3 = concat(DAT_002b6028,param_1 + 8,0);" (assignment_expression "uVar3 = concat(DAT_002b6028,param_1 + 8,0)" (identifier "uVar3") (= "=") (call_expression "concat(DAT_002b6028,param_1 + 8,0)" (identifier "concat") (argument_list "(DAT_002b6028,param_1 + 8,0)" (( "(") (identifier "DAT_002b6028") (, ",") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "puVar2[1] = uVar3;" (assignment_expression "puVar2[1] = uVar3" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(char *var_3,type_1 var_1)

{
  type_2 *psVar1;
  type_2 *psVar2;
  char *pcVar3;
  long var_5;
  type_3 *var_6;
  type_3 *var_7;
  bool var_8;
  bool bVar8;
  type_3 bVar9;
  
  bVar9 = 0;
  if ((var_1 == 0) && (config.only_cmd_line_lib_dirs != 0)) {
    return;
  }
  psVar2 = (type_2 *)var_2(0x18);
  psVar2->next = (type_4 *)0x0;
  psVar2->var_1 = var_1;
  psVar1 = psVar2;
  *search_tail_ptr = psVar2;
  search_tail_ptr = &psVar1->next;
  var_8 = (type_3)*var_3 < 0x3d;
  bVar8 = *var_3 == 0x3d;
  if (bVar8) {
    pcVar3 = (char *)var_4(ld_sysroot,var_3 + 1,0);
    psVar2->var_3 = pcVar3;
    return;
  }
  var_5 = 8;
  var_6 = (type_3 *)var_3;
  var_7 = (type_3 *)"$SYSROOT";
  do {
    if (var_5 == 0) break;
    var_5 = var_5 + -1;
    var_8 = *var_6 < *var_7;
    bVar8 = *var_6 == *var_7;
    var_6 = var_6 + (type_5)bVar9 * -2 + 1;
    var_7 = var_7 + (type_5)bVar9 * -2 + 1;
  } while (bVar8);
  if ((!var_8 && !bVar8) != var_8) {
    pcVar3 = (char *)var_9(var_3);
    psVar2->var_3 = pcVar3;
    return;
  }
  pcVar3 = (char *)var_4(ld_sysroot,var_3 + 8,0);
  psVar2->var_3 = pcVar3;
  return;
}


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

void MASKED(byte *param_1,int param_2)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  undefined8 uVar3;
  long lVar4;
  byte *pbVar5;
  byte *pbVar6;
  bool bVar7;
  bool bVar8;
  byte bVar9;
  
  bVar9 = 0;
  if ((param_2 == 0) && (DAT_002b60fc != 0)) {
    return;
  }
  puVar2 = (undefined8 *)xmalloc(0x18);
  *puVar2 = 0;
  *(int *)(puVar2 + 2) = param_2;
  puVar1 = puVar2;
  *(undefined8 **)PTR_DAT_002b2810 = puVar2;
  PTR_DAT_002b2810 = (undefined *)puVar1;
  bVar7 = *param_1 < 0x3d;
  bVar8 = *param_1 == 0x3d;
  if (bVar8) {
    uVar3 = concat(DAT_002b6028,param_1 + 1,0);
    puVar2[1] = uVar3;
    return;
  }
  lVar4 = 8;
  pbVar5 = param_1;
  pbVar6 = (byte *)"$SYSROOT";
  do {
    if (lVar4 == 0) break;
    lVar4 = lVar4 + -1;
    bVar7 = *pbVar5 < *pbVar6;
    bVar8 = *pbVar5 == *pbVar6;
    pbVar5 = pbVar5 + (ulong)bVar9 * -2 + 1;
    pbVar6 = pbVar6 + (ulong)bVar9 * -2 + 1;
  } while (bVar8);
  if ((!bVar7 && !bVar8) != bVar7) {
    uVar3 = xstrdup(param_1);
    puVar2[1] = uVar3;
    return;
  }
  uVar3 = concat(DAT_002b6028,param_1 + 8,0);
  puVar2[1] = uVar3;
  return;
}

