
wchar_t filesearch_init(_Bool forwards)

{
  char cVar1;
  wchar_t wVar2;
  char *__ptr;
  char *pcVar3;
  size_t sVar4;
  undefined8 uVar5;
  ulong uVar6;
  undefined *puVar7;
  char *pcVar8;
  byte bVar9;
  
  bVar9 = 0;
  if (*last_search == '\0') {
    pcVar3 = mallocstrcpy((char *)0x0,"");
  }
  else {
    __ptr = display_string(last_search,0,(long)(COLS / 3),false);
    uVar6 = 0xffffffffffffffff;
    pcVar3 = __ptr;
    do {
      if (uVar6 == 0) break;
      uVar6 = uVar6 - 1;
      cVar1 = *pcVar3;
      pcVar3 = pcVar3 + (ulong)bVar9 * -2 + 1;
    } while (cVar1 != '\0');
    pcVar3 = (char *)nmalloc(~uVar6 + 6);
    sVar4 = strlenpt(last_search);
    pcVar8 = "...";
    if (sVar4 <= (ulong)(long)(COLS / 3)) {
      pcVar8 = "";
    }
    __sprintf_chk(pcVar3,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar8);
    free(__ptr);
  }
  puVar7 = &DAT_001304ae;
  if (!forwards) {
    puVar7 = (undefined *)dcgettext(0," [Backwards]",5);
  }
  uVar5 = dcgettext(0,"Search",5);
  wVar2 = do_prompt(false,false,L'ࠀ',(char *)0x0,&search_history,browser_refresh,"%s%s%s",uVar5,
                    puVar7,pcVar3);
  free(pcVar3);
  if (wVar2 == L'\xfffffffe') {
    if (*last_search != '\0') {
      return L'\0';
    }
  }
  else if (L'\xffffffff' < wVar2) {
    return wVar2;
  }
  pcVar3 = (char *)dcgettext(0,"Cancelled",5);
  statusbar(pcVar3);
  return wVar2;
}



int FUN_0010643a(char param_1)

{
  char cVar1;
  int iVar2;
  char *__ptr;
  void *__ptr_00;
  undefined8 uVar3;
  ulong uVar4;
  undefined *puVar5;
  char *pcVar6;
  byte bVar7;
  
  bVar7 = 0;
  if (*DAT_0013bc68 == '\0') {
    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);
  }
  else {
    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);
    uVar4 = 0xffffffffffffffff;
    pcVar6 = __ptr;
    do {
      if (uVar4 == 0) break;
      uVar4 = uVar4 - 1;
      cVar1 = *pcVar6;
      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;
    } while (cVar1 != '\0');
    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);
    uVar4 = FUN_00125023(DAT_0013bc68);
    pcVar6 = "...";
    if (uVar4 <= (ulong)(long)(COLS / 3)) {
      pcVar6 = "";
    }
    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);
    free(__ptr);
  }
  puVar5 = &DAT_001304ae;
  if (param_1 == '\0') {
    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);
  }
  uVar3 = dcgettext(0,"Search",5);
  iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00);
  free(__ptr_00);
  if (iVar2 == -2) {
    if (*DAT_0013bc68 != '\0') {
      return 0;
    }
  }
  else if (-1 < iVar2) {
    return iVar2;
  }
  uVar3 = dcgettext(0,"Cancelled",5);
  FUN_001279f7(uVar3);
  return iVar2;
}


PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R12D,EDI
MOV RDI,qword ptr [0x0013bc68]
CMP byte ptr [RDI],0x0
JZ 0x00106587
MOV ECX,dword ptr [0x0013b9a0]
MOV EBX,0x55555556
MOV EAX,ECX
IMUL EBX
SAR ECX,0x1f
SUB EDX,ECX
MOVSXD RDX,EDX
MOV ECX,0x0
MOV ESI,0x0
CALL 0x0012688d
MOV R13,RAX
MOV RCX,-0x1
MOV EAX,0x0
MOV RDI,R13
SCASB.REPNE RDI
MOV RSI,RCX
NOT RSI
LEA RDI,[RSI + 0x6]
CALL 0x00124bbd
MOV RBP,RAX
MOV RDI,qword ptr [0x0013bc68]
CALL 0x00125023
MOV RSI,RAX
MOV ECX,dword ptr [0x0013b9a0]
MOV EAX,ECX
IMUL EBX
MOV EBX,EDX
SAR ECX,0x1f
SUB EBX,ECX
MOVSXD RBX,EBX
CMP RSI,RBX
LEA R9,[0x1317d8]
LEA RAX,[0x1304ae]
CMOVBE R9,RAX
MOV R8,R13
LEA RCX,[0x12c027]
MOV RDX,-0x1
MOV ESI,0x1
MOV RDI,RBP
MOV EAX,0x0
CALL 0x00105aa0
MOV RDI,R13
CALL 0x001050f0
LEA RBX,[0x1304ae]
TEST R12B,R12B
JZ 0x001065a0
MOV EDX,0x5
LEA RSI,[0x12c03c]
MOV EDI,0x0
CALL 0x001052f0
PUSH RBP
PUSH RBX
PUSH RAX
LEA RAX,[0x12c34c]
PUSH RAX
LEA R9,[0x105bd4]
LEA R8,[0x13bb80]
MOV ECX,0x0
MOV EDX,0x800
MOV ESI,0x0
MOV EDI,0x0
MOV EAX,0x0
CALL 0x0011a1c5
MOV EBX,EAX
ADD RSP,0x20
MOV RDI,RBP
CALL 0x001050f0
CMP EBX,-0x2
JZ 0x001065be
TEST EBX,EBX
JS 0x001065ca
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
RET
LEA RSI,[0x1304ae]
MOV EDI,0x0
CALL 0x00124d68
MOV RBP,RAX
JMP 0x00106506
MOV EDX,0x5
LEA RSI,[0x12c02f]
MOV EDI,0x0
CALL 0x001052f0
MOV RBX,RAX
JMP 0x00106516
MOV RAX,qword ptr [0x0013bc68]
CMP byte ptr [RAX],0x0
JNZ 0x001065ea
MOV EDX,0x5
LEA RSI,[0x12c043]
MOV EDI,0x0
CALL 0x001052f0
MOV RDI,RAX
CALL 0x001279f7
JMP 0x0010657a
MOV EBX,0x0
JMP 0x0010657a
(translation_unit "int FUN_0010643a(char param_1)\n\n{\n  char cVar1;\n  int iVar2;\n  char *__ptr;\n  void *__ptr_00;\n  undefined8 uVar3;\n  ulong uVar4;\n  undefined *puVar5;\n  char *pcVar6;\n  byte bVar7;\n  \n  bVar7 = 0;\n  if (*DAT_0013bc68 == '\0') {\n    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);\n  }\n  else {\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }\n  puVar5 = &DAT_001304ae;\n  if (param_1 == '\0') {\n    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar3 = dcgettext(0,"Search",5);\n  iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00);\n  free(__ptr_00);\n  if (iVar2 == -2) {\n    if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar2) {\n    return iVar2;\n  }\n  uVar3 = dcgettext(0,"Cancelled",5);\n  FUN_001279f7(uVar3);\n  return iVar2;\n}\n\n" (function_definition "int FUN_0010643a(char param_1)\n\n{\n  char cVar1;\n  int iVar2;\n  char *__ptr;\n  void *__ptr_00;\n  undefined8 uVar3;\n  ulong uVar4;\n  undefined *puVar5;\n  char *pcVar6;\n  byte bVar7;\n  \n  bVar7 = 0;\n  if (*DAT_0013bc68 == '\0') {\n    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);\n  }\n  else {\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }\n  puVar5 = &DAT_001304ae;\n  if (param_1 == '\0') {\n    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar3 = dcgettext(0,"Search",5);\n  iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00);\n  free(__ptr_00);\n  if (iVar2 == -2) {\n    if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar2) {\n    return iVar2;\n  }\n  uVar3 = dcgettext(0,"Cancelled",5);\n  FUN_001279f7(uVar3);\n  return iVar2;\n}" primitive_type (function_declarator "FUN_0010643a(char param_1)" identifier (parameter_list "(char param_1)" ( (parameter_declaration "char param_1" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  char *__ptr;\n  void *__ptr_00;\n  undefined8 uVar3;\n  ulong uVar4;\n  undefined *puVar5;\n  char *pcVar6;\n  byte bVar7;\n  \n  bVar7 = 0;\n  if (*DAT_0013bc68 == '\0') {\n    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);\n  }\n  else {\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }\n  puVar5 = &DAT_001304ae;\n  if (param_1 == '\0') {\n    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar3 = dcgettext(0,"Search",5);\n  iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00);\n  free(__ptr_00);\n  if (iVar2 == -2) {\n    if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar2) {\n    return iVar2;\n  }\n  uVar3 = dcgettext(0,"Cancelled",5);\n  FUN_001279f7(uVar3);\n  return iVar2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "void *__ptr_00;" primitive_type (pointer_declarator "*__ptr_00" * identifier) ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "undefined *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "byte bVar7;" type_identifier identifier ;) (expression_statement "bVar7 = 0;" (assignment_expression "bVar7 = 0" identifier = number_literal) ;) (if_statement "if (*DAT_0013bc68 == '\0') {\n    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);\n  }\n  else {\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }" if (parenthesized_expression "(*DAT_0013bc68 == '\0')" ( (binary_expression "*DAT_0013bc68 == '\0'" (pointer_expression "*DAT_0013bc68" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);\n  }" { (expression_statement "__ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);" (assignment_expression "__ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae)" identifier = (cast_expression "(void *)FUN_00124d68(0,&DAT_001304ae)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00124d68(0,&DAT_001304ae)" identifier (argument_list "(0,&DAT_001304ae)" ( number_literal , (pointer_expression "&DAT_001304ae" & identifier) ))))) ;) }) (else_clause "else {\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }" else (compound_statement "{\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }" { (expression_statement "__ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);" (assignment_expression "__ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0)" identifier = (cast_expression "(char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0)" identifier (argument_list "(DAT_0013bc68,0,(long)(COLS / 3),0)" ( identifier , number_literal , (cast_expression "(long)(COLS / 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(COLS / 3)" ( (binary_expression "COLS / 3" identifier / number_literal) ))) , number_literal ))))) ;) (expression_statement "uVar4 = 0xffffffffffffffff;" (assignment_expression "uVar4 = 0xffffffffffffffff" identifier = number_literal) ;) (expression_statement "pcVar6 = __ptr;" (assignment_expression "pcVar6 = __ptr" identifier = identifier) ;) (do_statement "do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');" do (compound_statement "{\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    }" { (if_statement "if (uVar4 == 0) break;" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar4 = uVar4 - 1;" (assignment_expression "uVar4 = uVar4 - 1" identifier = (binary_expression "uVar4 - 1" identifier - number_literal)) ;) (expression_statement "cVar1 = *pcVar6;" (assignment_expression "cVar1 = *pcVar6" identifier = (pointer_expression "*pcVar6" * identifier)) ;) (expression_statement "pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;" (assignment_expression "pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1" identifier = (binary_expression "pcVar6 + (ulong)bVar7 * -2 + 1" (binary_expression "pcVar6 + (ulong)bVar7 * -2" identifier + (binary_expression "(ulong)bVar7 * -2" (cast_expression "(ulong)bVar7" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(cVar1 != '\0')" ( (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (expression_statement "__ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);" (assignment_expression "__ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6)" identifier = (cast_expression "(void *)FUN_00124bbd(~uVar4 + 6)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00124bbd(~uVar4 + 6)" identifier (argument_list "(~uVar4 + 6)" ( (binary_expression "~uVar4 + 6" (unary_expression "~uVar4" ~ identifier) + number_literal) ))))) ;) (expression_statement "uVar4 = FUN_00125023(DAT_0013bc68);" (assignment_expression "uVar4 = FUN_00125023(DAT_0013bc68)" identifier = (call_expression "FUN_00125023(DAT_0013bc68)" identifier (argument_list "(DAT_0013bc68)" ( identifier )))) ;) (expression_statement "pcVar6 = "...";" (assignment_expression "pcVar6 = "..."" identifier = (string_literal ""..."" " string_content ")) ;) (if_statement "if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }" if (parenthesized_expression "(uVar4 <= (ulong)(long)(COLS / 3))" ( (binary_expression "uVar4 <= (ulong)(long)(COLS / 3)" identifier <= (call_expression "(ulong)(long)(COLS / 3)" (call_expression "(ulong)(long)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(long)" ( identifier ))) (argument_list "(COLS / 3)" ( (binary_expression "COLS / 3" identifier / number_literal) )))) )) (compound_statement "{\n      pcVar6 = "";\n    }" { (expression_statement "pcVar6 = "";" (assignment_expression "pcVar6 = """ identifier = (string_literal """" " ")) ;) })) (expression_statement "__sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);" (call_expression "__sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6)" identifier (argument_list "(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6)" ( identifier , number_literal , number_literal , (string_literal "" [%s%s]"" " string_content ") , identifier , identifier ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) }))) (expression_statement "puVar5 = &DAT_001304ae;" (assignment_expression "puVar5 = &DAT_001304ae" identifier = (pointer_expression "&DAT_001304ae" & identifier)) ;) (if_statement "if (param_1 == '\0') {\n    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" if (parenthesized_expression "(param_1 == '\0')" ( (binary_expression "param_1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" { (expression_statement "puVar5 = (undefined *)dcgettext(0," [Backwards]",5);" (assignment_expression "puVar5 = (undefined *)dcgettext(0," [Backwards]",5)" identifier = (cast_expression "(undefined *)dcgettext(0," [Backwards]",5)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0," [Backwards]",5)" identifier (argument_list "(0," [Backwards]",5)" ( number_literal , (string_literal "" [Backwards]"" " string_content ") , number_literal ))))) ;) })) (expression_statement "uVar3 = dcgettext(0,"Search",5);" (assignment_expression "uVar3 = dcgettext(0,"Search",5)" identifier = (call_expression "dcgettext(0,"Search",5)" identifier (argument_list "(0,"Search",5)" ( number_literal , (string_literal ""Search"" " string_content ") , number_literal )))) ;) (expression_statement "iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00);" (assignment_expression "iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00)" identifier = (call_expression "FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00)" identifier (argument_list "(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00)" ( number_literal , number_literal , number_literal , number_literal , (pointer_expression "&DAT_0013bb80" & identifier) , identifier , (string_literal ""%s%s%s"" " string_content ") , identifier , identifier , identifier )))) ;) (expression_statement "free(__ptr_00);" (call_expression "free(__ptr_00)" identifier (argument_list "(__ptr_00)" ( identifier ))) ;) (if_statement "if (iVar2 == -2) {\n    if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar2) {\n    return iVar2;\n  }" if (parenthesized_expression "(iVar2 == -2)" ( (binary_expression "iVar2 == -2" identifier == number_literal) )) (compound_statement "{\n    if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }\n  }" { (if_statement "if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }" if (parenthesized_expression "(*DAT_0013bc68 != '\0')" ( (binary_expression "*DAT_0013bc68 != '\0'" (pointer_expression "*DAT_0013bc68" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) }) (else_clause "else if (-1 < iVar2) {\n    return iVar2;\n  }" else (if_statement "if (-1 < iVar2) {\n    return iVar2;\n  }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })))) (expression_statement "uVar3 = dcgettext(0,"Cancelled",5);" (assignment_expression "uVar3 = dcgettext(0,"Cancelled",5)" identifier = (call_expression "dcgettext(0,"Cancelled",5)" identifier (argument_list "(0,"Cancelled",5)" ( number_literal , (string_literal ""Cancelled"" " string_content ") , number_literal )))) ;) (expression_statement "FUN_001279f7(uVar3);" (call_expression "FUN_001279f7(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "wchar_t filesearch_init(_Bool forwards)\n\n{\n  char cVar1;\n  wchar_t wVar2;\n  char *__ptr;\n  char *pcVar3;\n  size_t sVar4;\n  undefined8 uVar5;\n  ulong uVar6;\n  undefined *puVar7;\n  char *pcVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if (*last_search == '\0') {\n    pcVar3 = mallocstrcpy((char *)0x0,"");\n  }\n  else {\n    __ptr = display_string(last_search,0,(long)(COLS / 3),false);\n    uVar6 = 0xffffffffffffffff;\n    pcVar3 = __ptr;\n    do {\n      if (uVar6 == 0) break;\n      uVar6 = uVar6 - 1;\n      cVar1 = *pcVar3;\n      pcVar3 = pcVar3 + (ulong)bVar9 * -2 + 1;\n    } while (cVar1 != '\0');\n    pcVar3 = (char *)nmalloc(~uVar6 + 6);\n    sVar4 = strlenpt(last_search);\n    pcVar8 = "...";\n    if (sVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar8 = "";\n    }\n    __sprintf_chk(pcVar3,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar8);\n    free(__ptr);\n  }\n  puVar7 = &DAT_001304ae;\n  if (!forwards) {\n    puVar7 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar5 = dcgettext(0,"Search",5);\n  wVar2 = do_prompt(false,false,L'ࠀ',(char *)0x0,&search_history,browser_refresh,"%s%s%s",uVar5,\n                    puVar7,pcVar3);\n  free(pcVar3);\n  if (wVar2 == L'\xfffffffe') {\n    if (*last_search != '\0') {\n      return L'\0';\n    }\n  }\n  else if (L'\xffffffff' < wVar2) {\n    return wVar2;\n  }\n  pcVar3 = (char *)dcgettext(0,"Cancelled",5);\n  statusbar(pcVar3);\n  return wVar2;\n}\n\n" (function_definition "wchar_t filesearch_init(_Bool forwards)\n\n{\n  char cVar1;\n  wchar_t wVar2;\n  char *__ptr;\n  char *pcVar3;\n  size_t sVar4;\n  undefined8 uVar5;\n  ulong uVar6;\n  undefined *puVar7;\n  char *pcVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if (*last_search == '\0') {\n    pcVar3 = mallocstrcpy((char *)0x0,"");\n  }\n  else {\n    __ptr = display_string(last_search,0,(long)(COLS / 3),false);\n    uVar6 = 0xffffffffffffffff;\n    pcVar3 = __ptr;\n    do {\n      if (uVar6 == 0) break;\n      uVar6 = uVar6 - 1;\n      cVar1 = *pcVar3;\n      pcVar3 = pcVar3 + (ulong)bVar9 * -2 + 1;\n    } while (cVar1 != '\0');\n    pcVar3 = (char *)nmalloc(~uVar6 + 6);\n    sVar4 = strlenpt(last_search);\n    pcVar8 = "...";\n    if (sVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar8 = "";\n    }\n    __sprintf_chk(pcVar3,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar8);\n    free(__ptr);\n  }\n  puVar7 = &DAT_001304ae;\n  if (!forwards) {\n    puVar7 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar5 = dcgettext(0,"Search",5);\n  wVar2 = do_prompt(false,false,L'ࠀ',(char *)0x0,&search_history,browser_refresh,"%s%s%s",uVar5,\n                    puVar7,pcVar3);\n  free(pcVar3);\n  if (wVar2 == L'\xfffffffe') {\n    if (*last_search != '\0') {\n      return L'\0';\n    }\n  }\n  else if (L'\xffffffff' < wVar2) {\n    return wVar2;\n  }\n  pcVar3 = (char *)dcgettext(0,"Cancelled",5);\n  statusbar(pcVar3);\n  return wVar2;\n}" type_identifier (function_declarator "filesearch_init(_Bool forwards)" identifier (parameter_list "(_Bool forwards)" ( (parameter_declaration "_Bool forwards" type_identifier identifier) ))) (compound_statement "{\n  char cVar1;\n  wchar_t wVar2;\n  char *__ptr;\n  char *pcVar3;\n  size_t sVar4;\n  undefined8 uVar5;\n  ulong uVar6;\n  undefined *puVar7;\n  char *pcVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if (*last_search == '\0') {\n    pcVar3 = mallocstrcpy((char *)0x0,"");\n  }\n  else {\n    __ptr = display_string(last_search,0,(long)(COLS / 3),false);\n    uVar6 = 0xffffffffffffffff;\n    pcVar3 = __ptr;\n    do {\n      if (uVar6 == 0) break;\n      uVar6 = uVar6 - 1;\n      cVar1 = *pcVar3;\n      pcVar3 = pcVar3 + (ulong)bVar9 * -2 + 1;\n    } while (cVar1 != '\0');\n    pcVar3 = (char *)nmalloc(~uVar6 + 6);\n    sVar4 = strlenpt(last_search);\n    pcVar8 = "...";\n    if (sVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar8 = "";\n    }\n    __sprintf_chk(pcVar3,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar8);\n    free(__ptr);\n  }\n  puVar7 = &DAT_001304ae;\n  if (!forwards) {\n    puVar7 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar5 = dcgettext(0,"Search",5);\n  wVar2 = do_prompt(false,false,L'ࠀ',(char *)0x0,&search_history,browser_refresh,"%s%s%s",uVar5,\n                    puVar7,pcVar3);\n  free(pcVar3);\n  if (wVar2 == L'\xfffffffe') {\n    if (*last_search != '\0') {\n      return L'\0';\n    }\n  }\n  else if (L'\xffffffff' < wVar2) {\n    return wVar2;\n  }\n  pcVar3 = (char *)dcgettext(0,"Cancelled",5);\n  statusbar(pcVar3);\n  return wVar2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "wchar_t wVar2;" type_identifier identifier ;) (declaration "char *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (declaration "ulong uVar6;" type_identifier identifier ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "char *pcVar8;" primitive_type (pointer_declarator "*pcVar8" * identifier) ;) (declaration "byte bVar9;" type_identifier identifier ;) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" identifier = number_literal) ;) (if_statement "if (*last_search == '\0') {\n    pcVar3 = mallocstrcpy((char *)0x0,"");\n  }\n  else {\n    __ptr = display_string(last_search,0,(long)(COLS / 3),false);\n    uVar6 = 0xffffffffffffffff;\n    pcVar3 = __ptr;\n    do {\n      if (uVar6 == 0) break;\n      uVar6 = uVar6 - 1;\n      cVar1 = *pcVar3;\n      pcVar3 = pcVar3 + (ulong)bVar9 * -2 + 1;\n    } while (cVar1 != '\0');\n    pcVar3 = (char *)nmalloc(~uVar6 + 6);\n    sVar4 = strlenpt(last_search);\n    pcVar8 = "...";\n    if (sVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar8 = "";\n    }\n    __sprintf_chk(pcVar3,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar8);\n    free(__ptr);\n  }" if (parenthesized_expression "(*last_search == '\0')" ( (binary_expression "*last_search == '\0'" (pointer_expression "*last_search" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    pcVar3 = mallocstrcpy((char *)0x0,"");\n  }" { (expression_statement "pcVar3 = mallocstrcpy((char *)0x0,"");" (assignment_expression "pcVar3 = mallocstrcpy((char *)0x0,"")" identifier = (call_expression "mallocstrcpy((char *)0x0,"")" identifier (argument_list "((char *)0x0,"")" ( (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (string_literal """" " ") )))) ;) }) (else_clause "else {\n    __ptr = display_string(last_search,0,(long)(COLS / 3),false);\n    uVar6 = 0xffffffffffffffff;\n    pcVar3 = __ptr;\n    do {\n      if (uVar6 == 0) break;\n      uVar6 = uVar6 - 1;\n      cVar1 = *pcVar3;\n      pcVar3 = pcVar3 + (ulong)bVar9 * -2 + 1;\n    } while (cVar1 != '\0');\n    pcVar3 = (char *)nmalloc(~uVar6 + 6);\n    sVar4 = strlenpt(last_search);\n    pcVar8 = "...";\n    if (sVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar8 = "";\n    }\n    __sprintf_chk(pcVar3,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar8);\n    free(__ptr);\n  }" else (compound_statement "{\n    __ptr = display_string(last_search,0,(long)(COLS / 3),false);\n    uVar6 = 0xffffffffffffffff;\n    pcVar3 = __ptr;\n    do {\n      if (uVar6 == 0) break;\n      uVar6 = uVar6 - 1;\n      cVar1 = *pcVar3;\n      pcVar3 = pcVar3 + (ulong)bVar9 * -2 + 1;\n    } while (cVar1 != '\0');\n    pcVar3 = (char *)nmalloc(~uVar6 + 6);\n    sVar4 = strlenpt(last_search);\n    pcVar8 = "...";\n    if (sVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar8 = "";\n    }\n    __sprintf_chk(pcVar3,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar8);\n    free(__ptr);\n  }" { (expression_statement "__ptr = display_string(last_search,0,(long)(COLS / 3),false);" (assignment_expression "__ptr = display_string(last_search,0,(long)(COLS / 3),false)" identifier = (call_expression "display_string(last_search,0,(long)(COLS / 3),false)" identifier (argument_list "(last_search,0,(long)(COLS / 3),false)" ( identifier , number_literal , (cast_expression "(long)(COLS / 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(COLS / 3)" ( (binary_expression "COLS / 3" identifier / number_literal) ))) , false )))) ;) (expression_statement "uVar6 = 0xffffffffffffffff;" (assignment_expression "uVar6 = 0xffffffffffffffff" identifier = number_literal) ;) (expression_statement "pcVar3 = __ptr;" (assignment_expression "pcVar3 = __ptr" identifier = identifier) ;) (do_statement "do {\n      if (uVar6 == 0) break;\n      uVar6 = uVar6 - 1;\n      cVar1 = *pcVar3;\n      pcVar3 = pcVar3 + (ulong)bVar9 * -2 + 1;\n    } while (cVar1 != '\0');" do (compound_statement "{\n      if (uVar6 == 0) break;\n      uVar6 = uVar6 - 1;\n      cVar1 = *pcVar3;\n      pcVar3 = pcVar3 + (ulong)bVar9 * -2 + 1;\n    }" { (if_statement "if (uVar6 == 0) break;" if (parenthesized_expression "(uVar6 == 0)" ( (binary_expression "uVar6 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar6 = uVar6 - 1;" (assignment_expression "uVar6 = uVar6 - 1" identifier = (binary_expression "uVar6 - 1" identifier - number_literal)) ;) (expression_statement "cVar1 = *pcVar3;" (assignment_expression "cVar1 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) (expression_statement "pcVar3 = pcVar3 + (ulong)bVar9 * -2 + 1;" (assignment_expression "pcVar3 = pcVar3 + (ulong)bVar9 * -2 + 1" identifier = (binary_expression "pcVar3 + (ulong)bVar9 * -2 + 1" (binary_expression "pcVar3 + (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 "(cVar1 != '\0')" ( (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (expression_statement "pcVar3 = (char *)nmalloc(~uVar6 + 6);" (assignment_expression "pcVar3 = (char *)nmalloc(~uVar6 + 6)" identifier = (cast_expression "(char *)nmalloc(~uVar6 + 6)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "nmalloc(~uVar6 + 6)" identifier (argument_list "(~uVar6 + 6)" ( (binary_expression "~uVar6 + 6" (unary_expression "~uVar6" ~ identifier) + number_literal) ))))) ;) (expression_statement "sVar4 = strlenpt(last_search);" (assignment_expression "sVar4 = strlenpt(last_search)" identifier = (call_expression "strlenpt(last_search)" identifier (argument_list "(last_search)" ( identifier )))) ;) (expression_statement "pcVar8 = "...";" (assignment_expression "pcVar8 = "..."" identifier = (string_literal ""..."" " string_content ")) ;) (if_statement "if (sVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar8 = "";\n    }" if (parenthesized_expression "(sVar4 <= (ulong)(long)(COLS / 3))" ( (binary_expression "sVar4 <= (ulong)(long)(COLS / 3)" identifier <= (call_expression "(ulong)(long)(COLS / 3)" (call_expression "(ulong)(long)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(long)" ( identifier ))) (argument_list "(COLS / 3)" ( (binary_expression "COLS / 3" identifier / number_literal) )))) )) (compound_statement "{\n      pcVar8 = "";\n    }" { (expression_statement "pcVar8 = "";" (assignment_expression "pcVar8 = """ identifier = (string_literal """" " ")) ;) })) (expression_statement "__sprintf_chk(pcVar3,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar8);" (call_expression "__sprintf_chk(pcVar3,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar8)" identifier (argument_list "(pcVar3,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar8)" ( identifier , number_literal , number_literal , (string_literal "" [%s%s]"" " string_content ") , identifier , identifier ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) }))) (expression_statement "puVar7 = &DAT_001304ae;" (assignment_expression "puVar7 = &DAT_001304ae" identifier = (pointer_expression "&DAT_001304ae" & identifier)) ;) (if_statement "if (!forwards) {\n    puVar7 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" if (parenthesized_expression "(!forwards)" ( (unary_expression "!forwards" ! identifier) )) (compound_statement "{\n    puVar7 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" { (expression_statement "puVar7 = (undefined *)dcgettext(0," [Backwards]",5);" (assignment_expression "puVar7 = (undefined *)dcgettext(0," [Backwards]",5)" identifier = (cast_expression "(undefined *)dcgettext(0," [Backwards]",5)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0," [Backwards]",5)" identifier (argument_list "(0," [Backwards]",5)" ( number_literal , (string_literal "" [Backwards]"" " string_content ") , number_literal ))))) ;) })) (expression_statement "uVar5 = dcgettext(0,"Search",5);" (assignment_expression "uVar5 = dcgettext(0,"Search",5)" identifier = (call_expression "dcgettext(0,"Search",5)" identifier (argument_list "(0,"Search",5)" ( number_literal , (string_literal ""Search"" " string_content ") , number_literal )))) ;) (expression_statement "wVar2 = do_prompt(false,false,L'ࠀ',(char *)0x0,&search_history,browser_refresh,"%s%s%s",uVar5,\n                    puVar7,pcVar3);" (assignment_expression "wVar2 = do_prompt(false,false,L'ࠀ',(char *)0x0,&search_history,browser_refresh,"%s%s%s",uVar5,\n                    puVar7,pcVar3)" identifier = (call_expression "do_prompt(false,false,L'ࠀ',(char *)0x0,&search_history,browser_refresh,"%s%s%s",uVar5,\n                    puVar7,pcVar3)" identifier (argument_list "(false,false,L'ࠀ',(char *)0x0,&search_history,browser_refresh,"%s%s%s",uVar5,\n                    puVar7,pcVar3)" ( false , false , (char_literal "L'ࠀ'" L' character ') , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (pointer_expression "&search_history" & identifier) , identifier , (string_literal ""%s%s%s"" " string_content ") , identifier , identifier , identifier )))) ;) (expression_statement "free(pcVar3);" (call_expression "free(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))) ;) (if_statement "if (wVar2 == L'\xfffffffe') {\n    if (*last_search != '\0') {\n      return L'\0';\n    }\n  }\n  else if (L'\xffffffff' < wVar2) {\n    return wVar2;\n  }" if (parenthesized_expression "(wVar2 == L'\xfffffffe')" ( (binary_expression "wVar2 == L'\xfffffffe'" identifier == (char_literal "L'\xfffffffe'" L' escape_sequence character character character character ')) )) (compound_statement "{\n    if (*last_search != '\0') {\n      return L'\0';\n    }\n  }" { (if_statement "if (*last_search != '\0') {\n      return L'\0';\n    }" if (parenthesized_expression "(*last_search != '\0')" ( (binary_expression "*last_search != '\0'" (pointer_expression "*last_search" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return L'\0';\n    }" { (return_statement "return L'\0';" return (char_literal "L'\0'" L' escape_sequence ') ;) })) }) (else_clause "else if (L'\xffffffff' < wVar2) {\n    return wVar2;\n  }" else (if_statement "if (L'\xffffffff' < wVar2) {\n    return wVar2;\n  }" if (parenthesized_expression "(L'\xffffffff' < wVar2)" ( (binary_expression "L'\xffffffff' < wVar2" (char_literal "L'\xffffffff'" L' escape_sequence character character character character ') < identifier) )) (compound_statement "{\n    return wVar2;\n  }" { (return_statement "return wVar2;" return identifier ;) })))) (expression_statement "pcVar3 = (char *)dcgettext(0,"Cancelled",5);" (assignment_expression "pcVar3 = (char *)dcgettext(0,"Cancelled",5)" identifier = (cast_expression "(char *)dcgettext(0,"Cancelled",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"Cancelled",5)" identifier (argument_list "(0,"Cancelled",5)" ( number_literal , (string_literal ""Cancelled"" " string_content ") , number_literal ))))) ;) (expression_statement "statusbar(pcVar3);" (call_expression "statusbar(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))) ;) (return_statement "return wVar2;" return identifier ;) })))
(translation_unit "int FUN_0010643a(char param_1)\n\n{\n  char cVar1;\n  int iVar2;\n  char *__ptr;\n  void *__ptr_00;\n  undefined8 uVar3;\n  ulong uVar4;\n  undefined *puVar5;\n  char *pcVar6;\n  byte bVar7;\n  \n  bVar7 = 0;\n  if (*DAT_0013bc68 == '\0') {\n    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);\n  }\n  else {\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }\n  puVar5 = &DAT_001304ae;\n  if (param_1 == '\0') {\n    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar3 = dcgettext(0,"Search",5);\n  iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00);\n  free(__ptr_00);\n  if (iVar2 == -2) {\n    if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar2) {\n    return iVar2;\n  }\n  uVar3 = dcgettext(0,"Cancelled",5);\n  FUN_001279f7(uVar3);\n  return iVar2;\n}\n\n" (function_definition "int FUN_0010643a(char param_1)\n\n{\n  char cVar1;\n  int iVar2;\n  char *__ptr;\n  void *__ptr_00;\n  undefined8 uVar3;\n  ulong uVar4;\n  undefined *puVar5;\n  char *pcVar6;\n  byte bVar7;\n  \n  bVar7 = 0;\n  if (*DAT_0013bc68 == '\0') {\n    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);\n  }\n  else {\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }\n  puVar5 = &DAT_001304ae;\n  if (param_1 == '\0') {\n    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar3 = dcgettext(0,"Search",5);\n  iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00);\n  free(__ptr_00);\n  if (iVar2 == -2) {\n    if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar2) {\n    return iVar2;\n  }\n  uVar3 = dcgettext(0,"Cancelled",5);\n  FUN_001279f7(uVar3);\n  return iVar2;\n}" primitive_type (function_declarator "FUN_0010643a(char param_1)" identifier (parameter_list "(char param_1)" ( (parameter_declaration "char param_1" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  char *__ptr;\n  void *__ptr_00;\n  undefined8 uVar3;\n  ulong uVar4;\n  undefined *puVar5;\n  char *pcVar6;\n  byte bVar7;\n  \n  bVar7 = 0;\n  if (*DAT_0013bc68 == '\0') {\n    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);\n  }\n  else {\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }\n  puVar5 = &DAT_001304ae;\n  if (param_1 == '\0') {\n    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar3 = dcgettext(0,"Search",5);\n  iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00);\n  free(__ptr_00);\n  if (iVar2 == -2) {\n    if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar2) {\n    return iVar2;\n  }\n  uVar3 = dcgettext(0,"Cancelled",5);\n  FUN_001279f7(uVar3);\n  return iVar2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "void *__ptr_00;" primitive_type (pointer_declarator "*__ptr_00" * identifier) ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "undefined *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "byte bVar7;" type_identifier identifier ;) (expression_statement "bVar7 = 0;" (assignment_expression "bVar7 = 0" identifier = number_literal) ;) (if_statement "if (*DAT_0013bc68 == '\0') {\n    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);\n  }\n  else {\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }" if (parenthesized_expression "(*DAT_0013bc68 == '\0')" ( (binary_expression "*DAT_0013bc68 == '\0'" (pointer_expression "*DAT_0013bc68" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);\n  }" { (expression_statement "__ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);" (assignment_expression "__ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae)" identifier = (cast_expression "(void *)FUN_00124d68(0,&DAT_001304ae)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00124d68(0,&DAT_001304ae)" identifier (argument_list "(0,&DAT_001304ae)" ( number_literal , (pointer_expression "&DAT_001304ae" & identifier) ))))) ;) }) (else_clause "else {\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }" else (compound_statement "{\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }" { (expression_statement "__ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);" (assignment_expression "__ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0)" identifier = (cast_expression "(char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0)" identifier (argument_list "(DAT_0013bc68,0,(long)(COLS / 3),0)" ( identifier , number_literal , (cast_expression "(long)(COLS / 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(COLS / 3)" ( (binary_expression "COLS / 3" identifier / number_literal) ))) , number_literal ))))) ;) (expression_statement "uVar4 = 0xffffffffffffffff;" (assignment_expression "uVar4 = 0xffffffffffffffff" identifier = number_literal) ;) (expression_statement "pcVar6 = __ptr;" (assignment_expression "pcVar6 = __ptr" identifier = identifier) ;) (do_statement "do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');" do (compound_statement "{\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    }" { (if_statement "if (uVar4 == 0) break;" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar4 = uVar4 - 1;" (assignment_expression "uVar4 = uVar4 - 1" identifier = (binary_expression "uVar4 - 1" identifier - number_literal)) ;) (expression_statement "cVar1 = *pcVar6;" (assignment_expression "cVar1 = *pcVar6" identifier = (pointer_expression "*pcVar6" * identifier)) ;) (expression_statement "pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;" (assignment_expression "pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1" identifier = (binary_expression "pcVar6 + (ulong)bVar7 * -2 + 1" (binary_expression "pcVar6 + (ulong)bVar7 * -2" identifier + (binary_expression "(ulong)bVar7 * -2" (cast_expression "(ulong)bVar7" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(cVar1 != '\0')" ( (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (expression_statement "__ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);" (assignment_expression "__ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6)" identifier = (cast_expression "(void *)FUN_00124bbd(~uVar4 + 6)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00124bbd(~uVar4 + 6)" identifier (argument_list "(~uVar4 + 6)" ( (binary_expression "~uVar4 + 6" (unary_expression "~uVar4" ~ identifier) + number_literal) ))))) ;) (expression_statement "uVar4 = FUN_00125023(DAT_0013bc68);" (assignment_expression "uVar4 = FUN_00125023(DAT_0013bc68)" identifier = (call_expression "FUN_00125023(DAT_0013bc68)" identifier (argument_list "(DAT_0013bc68)" ( identifier )))) ;) (expression_statement "pcVar6 = "...";" (assignment_expression "pcVar6 = "..."" identifier = (string_literal ""..."" " string_content ")) ;) (if_statement "if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }" if (parenthesized_expression "(uVar4 <= (ulong)(long)(COLS / 3))" ( (binary_expression "uVar4 <= (ulong)(long)(COLS / 3)" identifier <= (call_expression "(ulong)(long)(COLS / 3)" (call_expression "(ulong)(long)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(long)" ( identifier ))) (argument_list "(COLS / 3)" ( (binary_expression "COLS / 3" identifier / number_literal) )))) )) (compound_statement "{\n      pcVar6 = "";\n    }" { (expression_statement "pcVar6 = "";" (assignment_expression "pcVar6 = """ identifier = (string_literal """" " ")) ;) })) (expression_statement "__sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);" (call_expression "__sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6)" identifier (argument_list "(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6)" ( identifier , number_literal , number_literal , (string_literal "" [%s%s]"" " string_content ") , identifier , identifier ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) }))) (expression_statement "puVar5 = &DAT_001304ae;" (assignment_expression "puVar5 = &DAT_001304ae" identifier = (pointer_expression "&DAT_001304ae" & identifier)) ;) (if_statement "if (param_1 == '\0') {\n    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" if (parenthesized_expression "(param_1 == '\0')" ( (binary_expression "param_1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" { (expression_statement "puVar5 = (undefined *)dcgettext(0," [Backwards]",5);" (assignment_expression "puVar5 = (undefined *)dcgettext(0," [Backwards]",5)" identifier = (cast_expression "(undefined *)dcgettext(0," [Backwards]",5)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0," [Backwards]",5)" identifier (argument_list "(0," [Backwards]",5)" ( number_literal , (string_literal "" [Backwards]"" " string_content ") , number_literal ))))) ;) })) (expression_statement "uVar3 = dcgettext(0,"Search",5);" (assignment_expression "uVar3 = dcgettext(0,"Search",5)" identifier = (call_expression "dcgettext(0,"Search",5)" identifier (argument_list "(0,"Search",5)" ( number_literal , (string_literal ""Search"" " string_content ") , number_literal )))) ;) (expression_statement "iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00);" (assignment_expression "iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00)" identifier = (call_expression "FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00)" identifier (argument_list "(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00)" ( number_literal , number_literal , number_literal , number_literal , (pointer_expression "&DAT_0013bb80" & identifier) , identifier , (string_literal ""%s%s%s"" " string_content ") , identifier , identifier , identifier )))) ;) (expression_statement "free(__ptr_00);" (call_expression "free(__ptr_00)" identifier (argument_list "(__ptr_00)" ( identifier ))) ;) (if_statement "if (iVar2 == -2) {\n    if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar2) {\n    return iVar2;\n  }" if (parenthesized_expression "(iVar2 == -2)" ( (binary_expression "iVar2 == -2" identifier == number_literal) )) (compound_statement "{\n    if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }\n  }" { (if_statement "if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }" if (parenthesized_expression "(*DAT_0013bc68 != '\0')" ( (binary_expression "*DAT_0013bc68 != '\0'" (pointer_expression "*DAT_0013bc68" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) }) (else_clause "else if (-1 < iVar2) {\n    return iVar2;\n  }" else (if_statement "if (-1 < iVar2) {\n    return iVar2;\n  }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })))) (expression_statement "uVar3 = dcgettext(0,"Cancelled",5);" (assignment_expression "uVar3 = dcgettext(0,"Cancelled",5)" identifier = (call_expression "dcgettext(0,"Cancelled",5)" identifier (argument_list "(0,"Cancelled",5)" ( number_literal , (string_literal ""Cancelled"" " string_content ") , number_literal )))) ;) (expression_statement "FUN_001279f7(uVar3);" (call_expression "FUN_001279f7(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , (pointer_expression & IDENT) ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT / LIT) ))) , LIT ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (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 = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression (unary_expression ~ IDENT) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (call_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( IDENT ))) (argument_list ( (binary_expression IDENT / LIT) )))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " ")) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT , (string_literal " string_content ") , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , LIT ))))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , LIT , LIT , LIT , (pointer_expression & IDENT) , IDENT , (string_literal " string_content ") , IDENT , IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return LIT ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (return_statement return 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 ))) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_0010643a(char param_1)\n\n{\n  char cVar1;\n  int iVar2;\n  char *__ptr;\n  void *__ptr_00;\n  undefined8 uVar3;\n  ulong uVar4;\n  undefined *puVar5;\n  char *pcVar6;\n  byte bVar7;\n  \n  bVar7 = 0;\n  if (*DAT_0013bc68 == '\0') {\n    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);\n  }\n  else {\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }\n  puVar5 = &DAT_001304ae;\n  if (param_1 == '\0') {\n    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar3 = dcgettext(0,"Search",5);\n  iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00);\n  free(__ptr_00);\n  if (iVar2 == -2) {\n    if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar2) {\n    return iVar2;\n  }\n  uVar3 = dcgettext(0,"Cancelled",5);\n  FUN_001279f7(uVar3);\n  return iVar2;\n}" (primitive_type "int") (function_declarator "FUN_0010643a(char param_1)" (identifier "FUN_0010643a") (parameter_list "(char param_1)" (( "(") (parameter_declaration "char param_1" (primitive_type "char") (identifier "param_1")) () ")"))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  char *__ptr;\n  void *__ptr_00;\n  undefined8 uVar3;\n  ulong uVar4;\n  undefined *puVar5;\n  char *pcVar6;\n  byte bVar7;\n  \n  bVar7 = 0;\n  if (*DAT_0013bc68 == '\0') {\n    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);\n  }\n  else {\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }\n  puVar5 = &DAT_001304ae;\n  if (param_1 == '\0') {\n    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar3 = dcgettext(0,"Search",5);\n  iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00);\n  free(__ptr_00);\n  if (iVar2 == -2) {\n    if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar2) {\n    return iVar2;\n  }\n  uVar3 = dcgettext(0,"Cancelled",5);\n  FUN_001279f7(uVar3);\n  return iVar2;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "char *__ptr;" (primitive_type "char") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "void *__ptr_00;" (primitive_type "void") (pointer_declarator "*__ptr_00" (* "*") (identifier "__ptr_00")) (; ";")) (declaration "undefined8 uVar3;" (type_identifier "undefined8") (identifier "uVar3") (; ";")) (declaration "ulong uVar4;" (type_identifier "ulong") (identifier "uVar4") (; ";")) (declaration "undefined *puVar5;" (type_identifier "undefined") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "char *pcVar6;" (primitive_type "char") (pointer_declarator "*pcVar6" (* "*") (identifier "pcVar6")) (; ";")) (declaration "byte bVar7;" (type_identifier "byte") (identifier "bVar7") (; ";")) (expression_statement "bVar7 = 0;" (assignment_expression "bVar7 = 0" (identifier "bVar7") (= "=") (number_literal "0")) (; ";")) (if_statement "if (*DAT_0013bc68 == '\0') {\n    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);\n  }\n  else {\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }" (if "if") (parenthesized_expression "(*DAT_0013bc68 == '\0')" (( "(") (binary_expression "*DAT_0013bc68 == '\0'" (pointer_expression "*DAT_0013bc68" (* "*") (identifier "DAT_0013bc68")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);\n  }" ({ "{") (expression_statement "__ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);" (assignment_expression "__ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae)" (identifier "__ptr_00") (= "=") (cast_expression "(void *)FUN_00124d68(0,&DAT_001304ae)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00124d68(0,&DAT_001304ae)" (identifier "FUN_00124d68") (argument_list "(0,&DAT_001304ae)" (( "(") (number_literal "0") (, ",") (pointer_expression "&DAT_001304ae" (& "&") (identifier "DAT_001304ae")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }" (else "else") (compound_statement "{\n    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);\n    uVar4 = 0xffffffffffffffff;\n    pcVar6 = __ptr;\n    do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');\n    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);\n    uVar4 = FUN_00125023(DAT_0013bc68);\n    pcVar6 = "...";\n    if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }\n    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);\n    free(__ptr);\n  }" ({ "{") (expression_statement "__ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);" (assignment_expression "__ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0)" (identifier "__ptr") (= "=") (cast_expression "(char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0)" (identifier "FUN_0012688d") (argument_list "(DAT_0013bc68,0,(long)(COLS / 3),0)" (( "(") (identifier "DAT_0013bc68") (, ",") (number_literal "0") (, ",") (cast_expression "(long)(COLS / 3)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(COLS / 3)" (( "(") (binary_expression "COLS / 3" (identifier "COLS") (/ "/") (number_literal "3")) () ")"))) (, ",") (number_literal "0") () ")"))))) (; ";")) (expression_statement "uVar4 = 0xffffffffffffffff;" (assignment_expression "uVar4 = 0xffffffffffffffff" (identifier "uVar4") (= "=") (number_literal "0xffffffffffffffff")) (; ";")) (expression_statement "pcVar6 = __ptr;" (assignment_expression "pcVar6 = __ptr" (identifier "pcVar6") (= "=") (identifier "__ptr")) (; ";")) (do_statement "do {\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    } while (cVar1 != '\0');" (do "do") (compound_statement "{\n      if (uVar4 == 0) break;\n      uVar4 = uVar4 - 1;\n      cVar1 = *pcVar6;\n      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;\n    }" ({ "{") (if_statement "if (uVar4 == 0) break;" (if "if") (parenthesized_expression "(uVar4 == 0)" (( "(") (binary_expression "uVar4 == 0" (identifier "uVar4") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "uVar4 = uVar4 - 1;" (assignment_expression "uVar4 = uVar4 - 1" (identifier "uVar4") (= "=") (binary_expression "uVar4 - 1" (identifier "uVar4") (- "-") (number_literal "1"))) (; ";")) (expression_statement "cVar1 = *pcVar6;" (assignment_expression "cVar1 = *pcVar6" (identifier "cVar1") (= "=") (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6"))) (; ";")) (expression_statement "pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;" (assignment_expression "pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1" (identifier "pcVar6") (= "=") (binary_expression "pcVar6 + (ulong)bVar7 * -2 + 1" (binary_expression "pcVar6 + (ulong)bVar7 * -2" (identifier "pcVar6") (+ "+") (binary_expression "(ulong)bVar7 * -2" (cast_expression "(ulong)bVar7" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "bVar7")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(cVar1 != '\0')" (( "(") (binary_expression "cVar1 != '\0'" (identifier "cVar1") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (; ";")) (expression_statement "__ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);" (assignment_expression "__ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6)" (identifier "__ptr_00") (= "=") (cast_expression "(void *)FUN_00124bbd(~uVar4 + 6)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00124bbd(~uVar4 + 6)" (identifier "FUN_00124bbd") (argument_list "(~uVar4 + 6)" (( "(") (binary_expression "~uVar4 + 6" (unary_expression "~uVar4" (~ "~") (identifier "uVar4")) (+ "+") (number_literal "6")) () ")"))))) (; ";")) (expression_statement "uVar4 = FUN_00125023(DAT_0013bc68);" (assignment_expression "uVar4 = FUN_00125023(DAT_0013bc68)" (identifier "uVar4") (= "=") (call_expression "FUN_00125023(DAT_0013bc68)" (identifier "FUN_00125023") (argument_list "(DAT_0013bc68)" (( "(") (identifier "DAT_0013bc68") () ")")))) (; ";")) (expression_statement "pcVar6 = "...";" (assignment_expression "pcVar6 = "..."" (identifier "pcVar6") (= "=") (string_literal ""..."" (" """) (string_content "...") (" """))) (; ";")) (if_statement "if (uVar4 <= (ulong)(long)(COLS / 3)) {\n      pcVar6 = "";\n    }" (if "if") (parenthesized_expression "(uVar4 <= (ulong)(long)(COLS / 3))" (( "(") (binary_expression "uVar4 <= (ulong)(long)(COLS / 3)" (identifier "uVar4") (<= "<=") (call_expression "(ulong)(long)(COLS / 3)" (call_expression "(ulong)(long)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(long)" (( "(") (identifier "long") () ")"))) (argument_list "(COLS / 3)" (( "(") (binary_expression "COLS / 3" (identifier "COLS") (/ "/") (number_literal "3")) () ")")))) () ")")) (compound_statement "{\n      pcVar6 = "";\n    }" ({ "{") (expression_statement "pcVar6 = "";" (assignment_expression "pcVar6 = """ (identifier "pcVar6") (= "=") (string_literal """" (" """) (" """))) (; ";")) (} "}"))) (expression_statement "__sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);" (call_expression "__sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6)" (identifier "__sprintf_chk") (argument_list "(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6)" (( "(") (identifier "__ptr_00") (, ",") (number_literal "1") (, ",") (number_literal "0xffffffffffffffff") (, ",") (string_literal "" [%s%s]"" (" """) (string_content " [%s%s]") (" """)) (, ",") (identifier "__ptr") (, ",") (identifier "pcVar6") () ")"))) (; ";")) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (} "}")))) (expression_statement "puVar5 = &DAT_001304ae;" (assignment_expression "puVar5 = &DAT_001304ae" (identifier "puVar5") (= "=") (pointer_expression "&DAT_001304ae" (& "&") (identifier "DAT_001304ae"))) (; ";")) (if_statement "if (param_1 == '\0') {\n    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" (if "if") (parenthesized_expression "(param_1 == '\0')" (( "(") (binary_expression "param_1 == '\0'" (identifier "param_1") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" ({ "{") (expression_statement "puVar5 = (undefined *)dcgettext(0," [Backwards]",5);" (assignment_expression "puVar5 = (undefined *)dcgettext(0," [Backwards]",5)" (identifier "puVar5") (= "=") (cast_expression "(undefined *)dcgettext(0," [Backwards]",5)" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "dcgettext(0," [Backwards]",5)" (identifier "dcgettext") (argument_list "(0," [Backwards]",5)" (( "(") (number_literal "0") (, ",") (string_literal "" [Backwards]"" (" """) (string_content " [Backwards]") (" """)) (, ",") (number_literal "5") () ")"))))) (; ";")) (} "}"))) (expression_statement "uVar3 = dcgettext(0,"Search",5);" (assignment_expression "uVar3 = dcgettext(0,"Search",5)" (identifier "uVar3") (= "=") (call_expression "dcgettext(0,"Search",5)" (identifier "dcgettext") (argument_list "(0,"Search",5)" (( "(") (number_literal "0") (, ",") (string_literal ""Search"" (" """) (string_content "Search") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00);" (assignment_expression "iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00)" (identifier "iVar2") (= "=") (call_expression "FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00)" (identifier "FUN_0011a1c5") (argument_list "(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00)" (( "(") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0x800") (, ",") (number_literal "0") (, ",") (pointer_expression "&DAT_0013bb80" (& "&") (identifier "DAT_0013bb80")) (, ",") (identifier "FUN_00105bd4") (, ",") (string_literal ""%s%s%s"" (" """) (string_content "%s%s%s") (" """)) (, ",") (identifier "uVar3") (, ",") (identifier "puVar5") (, ",") (identifier "__ptr_00") () ")")))) (; ";")) (expression_statement "free(__ptr_00);" (call_expression "free(__ptr_00)" (identifier "free") (argument_list "(__ptr_00)" (( "(") (identifier "__ptr_00") () ")"))) (; ";")) (if_statement "if (iVar2 == -2) {\n    if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar2) {\n    return iVar2;\n  }" (if "if") (parenthesized_expression "(iVar2 == -2)" (( "(") (binary_expression "iVar2 == -2" (identifier "iVar2") (== "==") (number_literal "-2")) () ")")) (compound_statement "{\n    if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }\n  }" ({ "{") (if_statement "if (*DAT_0013bc68 != '\0') {\n      return 0;\n    }" (if "if") (parenthesized_expression "(*DAT_0013bc68 != '\0')" (( "(") (binary_expression "*DAT_0013bc68 != '\0'" (pointer_expression "*DAT_0013bc68" (* "*") (identifier "DAT_0013bc68")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (} "}")) (else_clause "else if (-1 < iVar2) {\n    return iVar2;\n  }" (else "else") (if_statement "if (-1 < iVar2) {\n    return iVar2;\n  }" (if "if") (parenthesized_expression "(-1 < iVar2)" (( "(") (binary_expression "-1 < iVar2" (number_literal "-1") (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n    return iVar2;\n  }" ({ "{") (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}"))))) (expression_statement "uVar3 = dcgettext(0,"Cancelled",5);" (assignment_expression "uVar3 = dcgettext(0,"Cancelled",5)" (identifier "uVar3") (= "=") (call_expression "dcgettext(0,"Cancelled",5)" (identifier "dcgettext") (argument_list "(0,"Cancelled",5)" (( "(") (number_literal "0") (, ",") (string_literal ""Cancelled"" (" """) (string_content "Cancelled") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "FUN_001279f7(uVar3);" (call_expression "FUN_001279f7(uVar3)" (identifier "FUN_001279f7") (argument_list "(uVar3)" (( "(") (identifier "uVar3") () ")"))) (; ";")) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))

type_1 function_1(type_2 forwards)

{
  char var_6;
  type_1 var_14;
  char *__ptr;
  char *var_5;
  size_t var_9;
  type_3 uVar5;
  type_4 var_4;
  type_5 *puVar7;
  char *pcVar8;
  type_6 bVar9;
  
  bVar9 = 0;
  if (*last_search == '\0') {
    var_5 = var_1((char *)0x0,"");
  }
  else {
    __ptr = var_2(last_search,0,(long)(var_3 / 3),false);
    var_4 = 0xffffffffffffffff;
    var_5 = __ptr;
    do {
      if (var_4 == 0) break;
      var_4 = var_4 - 1;
      var_6 = *var_5;
      var_5 = var_5 + (type_4)bVar9 * -2 + 1;
    } while (var_6 != '\0');
    var_5 = (char *)var_7(~var_4 + 6);
    var_9 = var_8(last_search);
    pcVar8 = "...";
    if (var_9 <= (type_4)(long)(var_3 / 3)) {
      pcVar8 = "";
    }
    var_10(var_5,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar8);
    var_11(__ptr);
  }
  puVar7 = &DAT_001304ae;
  if (!forwards) {
    puVar7 = (type_5 *)var_12(0," [Backwards]",5);
  }
  uVar5 = var_12(0,"Search",5);
  var_14 = var_13(false,false,L'ࠀ',(char *)0x0,&search_history,browser_refresh,"%s%s%s",uVar5,
                    puVar7,var_5);
  var_11(var_5);
  if (var_14 == L'\xfffffffe') {
    if (*last_search != '\0') {
      return L'\0';
    }
  }
  else if (L'\xffffffff' < var_14) {
    return var_14;
  }
  var_5 = (char *)var_12(0,"Cancelled",5);
  var_15(var_5);
  return var_14;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator 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: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (number_literal) (pointer_expression argument: (identifier)))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (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: (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))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (unary_expression argument: (identifier)) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (string_literal (string_content)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (call_expression function: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (identifier))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (string_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (string_literal (string_content)) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (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) (string_literal (string_content)) (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content)) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (number_literal) (number_literal) (number_literal) (pointer_expression argument: (identifier)) (identifier) (string_literal (string_content)) (identifier) (identifier) (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (return_statement (number_literal))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (return_statement (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)))) (return_statement (identifier)))))

int MASKED(char param_1)

{
  char cVar1;
  int iVar2;
  char *__ptr;
  void *__ptr_00;
  undefined8 uVar3;
  ulong uVar4;
  undefined *puVar5;
  char *pcVar6;
  byte bVar7;
  
  bVar7 = 0;
  if (*DAT_0013bc68 == '\0') {
    __ptr_00 = (void *)FUN_00124d68(0,&DAT_001304ae);
  }
  else {
    __ptr = (char *)FUN_0012688d(DAT_0013bc68,0,(long)(COLS / 3),0);
    uVar4 = 0xffffffffffffffff;
    pcVar6 = __ptr;
    do {
      if (uVar4 == 0) break;
      uVar4 = uVar4 - 1;
      cVar1 = *pcVar6;
      pcVar6 = pcVar6 + (ulong)bVar7 * -2 + 1;
    } while (cVar1 != '\0');
    __ptr_00 = (void *)FUN_00124bbd(~uVar4 + 6);
    uVar4 = FUN_00125023(DAT_0013bc68);
    pcVar6 = "...";
    if (uVar4 <= (ulong)(long)(COLS / 3)) {
      pcVar6 = "";
    }
    __sprintf_chk(__ptr_00,1,0xffffffffffffffff," [%s%s]",__ptr,pcVar6);
    free(__ptr);
  }
  puVar5 = &DAT_001304ae;
  if (param_1 == '\0') {
    puVar5 = (undefined *)dcgettext(0," [Backwards]",5);
  }
  uVar3 = dcgettext(0,"Search",5);
  iVar2 = FUN_0011a1c5(0,0,0x800,0,&DAT_0013bb80,FUN_00105bd4,"%s%s%s",uVar3,puVar5,__ptr_00);
  free(__ptr_00);
  if (iVar2 == -2) {
    if (*DAT_0013bc68 != '\0') {
      return 0;
    }
  }
  else if (-1 < iVar2) {
    return iVar2;
  }
  uVar3 = dcgettext(0,"Cancelled",5);
  FUN_001279f7(uVar3);
  return iVar2;
}

