
void multi_search(char *pattern,int n,int silent)

{
  int iVar1;
  void *save_ifile;
  uint uVar2;
  uint uVar3;
  
  save_ifile = save_curr_ifile();
  uVar3 = search_type & 0x400;
  if (uVar3 != 0) {
    if ((search_type & 1U) == 0) {
      iVar1 = edit_last();
    }
    else {
      iVar1 = edit_first();
    }
    if (iVar1 != 0) {
      unsave_ifile(save_ifile);
      return;
    }
    search_type = search_type & 0xfffffbff;
    uVar3 = 1;
  }
  while( true ) {
    n = search(search_type,pattern,n);
    uVar2 = search_type & 0xfffffffb;
    if (n == 0) {
      search_type = uVar2;
      unsave_ifile(save_ifile);
      return;
    }
    if (n < 0) goto LAB_0010a1a1;
    if ((search_type & 0x200U) == 0) break;
    if ((search_type & 1U) == 0) {
      search_type = uVar2;
      iVar1 = edit_prev(1);
    }
    else {
      search_type = uVar2;
      iVar1 = edit_next(1);
    }
    uVar2 = search_type;
    if (iVar1 != 0) break;
    uVar3 = 1;
  }
  search_type = uVar2;
  uVar2 = search_type;
  if ((0 < n) && (silent == 0)) {
    error("Pattern not found",(PARG *)0x0);
    uVar2 = search_type;
  }
LAB_0010a1a1:
  search_type = uVar2;
  if (uVar3 != 0) {
    reedit_ifile(save_ifile);
    return;
  }
  unsave_ifile(save_ifile);
  return;
}



void FUN_0010a0a2(undefined8 param_1,int param_2,int param_3)

{
  int iVar1;
  undefined8 uVar2;
  uint uVar3;
  uint uVar4;
  
  uVar2 = FUN_0010d02b();
  uVar4 = DAT_0012a308 & 0x400;
  if (uVar4 != 0) {
    if ((DAT_0012a308 & 1) == 0) {
      iVar1 = FUN_0010d9ff();
    }
    else {
      iVar1 = FUN_0010d9bb();
    }
    if (iVar1 != 0) {
      FUN_0010d05e(uVar2);
      return;
    }
    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;
    uVar4 = 1;
  }
  while( true ) {
    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);
    uVar3 = DAT_0012a308 & 0xfffffffb;
    if (param_2 == 0) {
      DAT_0012a308 = uVar3;
      FUN_0010d05e(uVar2);
      return;
    }
    if (param_2 < 0) goto LAB_0010a1a1;
    if ((DAT_0012a308 & 0x200) == 0) break;
    if ((DAT_0012a308 & 1) == 0) {
      DAT_0012a308 = uVar3;
      iVar1 = FUN_0010d9de(1);
    }
    else {
      DAT_0012a308 = uVar3;
      iVar1 = FUN_0010d99a(1);
    }
    uVar3 = DAT_0012a308;
    if (iVar1 != 0) break;
    uVar4 = 1;
  }
  DAT_0012a308 = uVar3;
  uVar3 = DAT_0012a308;
  if ((0 < param_2) && (param_3 == 0)) {
    error("Pattern not found",0);
    uVar3 = DAT_0012a308;
  }
LAB_0010a1a1:
  DAT_0012a308 = uVar3;
  if (uVar4 != 0) {
    FUN_0010da70(uVar2);
    return;
  }
  FUN_0010d05e(uVar2);
  return;
}


PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R12,RDI
MOV EBX,ESI
MOV R14D,EDX
MOV EAX,0x0
CALL 0x0010d02b
MOV R13,RAX
MOV EAX,dword ptr [0x0012a308]
MOV EBP,EAX
AND EBP,0x400
JZ 0x0010a13a
TEST AL,0x1
JZ 0x0010a0f2
MOV EAX,0x0
CALL 0x0010d9bb
TEST EAX,EAX
JNZ 0x0010a0fe
AND dword ptr [0x0012a308],0xfffffbff
MOV EBP,0x1
JMP 0x0010a13a
MOV EAX,0x0
CALL 0x0010d9ff
JMP 0x0010a0dd
MOV RDI,R13
MOV EAX,0x0
CALL 0x0010d05e
JMP 0x0010a1b2
MOV RDI,R13
MOV EAX,0x0
CALL 0x0010d05e
JMP 0x0010a1b2
MOV EDI,0x1
MOV EAX,0x0
CALL 0x0010d9de
TEST EAX,EAX
JNZ 0x0010a182
MOV EBP,0x1
MOV EDX,EBX
MOV RSI,R12
MOV EDI,dword ptr [0x0012a308]
MOV EAX,0x0
CALL 0x001182a7
MOV EBX,EAX
MOV EAX,dword ptr [0x0012a308]
MOV EDX,EAX
AND EDX,0xfffffffb
MOV dword ptr [0x0012a308],EDX
TEST EBX,EBX
JZ 0x0010a110
JS 0x0010a1a1
TEST AH,0x2
JZ 0x0010a182
TEST AL,0x1
JZ 0x0010a122
MOV EDI,0x1
MOV EAX,0x0
CALL 0x0010d99a
JMP 0x0010a131
TEST EBX,EBX
JLE 0x0010a1a1
TEST R14D,R14D
JNZ 0x0010a1a1
MOV ESI,0x0
LEA RDI,[0x11aae5]
MOV EAX,0x0
CALL 0x00115874
TEST EBP,EBP
JZ 0x0010a1bb
MOV RDI,R13
MOV EAX,0x0
CALL 0x0010da70
POP RBX
POP RBP
POP R12
POP R13
POP R14
RET
MOV RDI,R13
MOV EAX,0x0
CALL 0x0010d05e
JMP 0x0010a1b2
(translation_unit "void FUN_0010a0a2(undefined8 param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = FUN_0010d02b();\n  uVar4 = DAT_0012a308 & 0x400;\n  if (uVar4 != 0) {\n    if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }\n    if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;\n    uVar4 = 1;\n  }\n  while( true ) {\n    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);\n    uVar3 = DAT_0012a308 & 0xfffffffb;\n    if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    if (param_2 < 0) goto LAB_0010a1a1;\n    if ((DAT_0012a308 & 0x200) == 0) break;\n    if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }\n    uVar3 = DAT_0012a308;\n    if (iVar1 != 0) break;\n    uVar4 = 1;\n  }\n  DAT_0012a308 = uVar3;\n  uVar3 = DAT_0012a308;\n  if ((0 < param_2) && (param_3 == 0)) {\n    error("Pattern not found",0);\n    uVar3 = DAT_0012a308;\n  }\nLAB_0010a1a1:\n  DAT_0012a308 = uVar3;\n  if (uVar4 != 0) {\n    FUN_0010da70(uVar2);\n    return;\n  }\n  FUN_0010d05e(uVar2);\n  return;\n}\n\n" (function_definition "void FUN_0010a0a2(undefined8 param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = FUN_0010d02b();\n  uVar4 = DAT_0012a308 & 0x400;\n  if (uVar4 != 0) {\n    if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }\n    if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;\n    uVar4 = 1;\n  }\n  while( true ) {\n    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);\n    uVar3 = DAT_0012a308 & 0xfffffffb;\n    if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    if (param_2 < 0) goto LAB_0010a1a1;\n    if ((DAT_0012a308 & 0x200) == 0) break;\n    if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }\n    uVar3 = DAT_0012a308;\n    if (iVar1 != 0) break;\n    uVar4 = 1;\n  }\n  DAT_0012a308 = uVar3;\n  uVar3 = DAT_0012a308;\n  if ((0 < param_2) && (param_3 == 0)) {\n    error("Pattern not found",0);\n    uVar3 = DAT_0012a308;\n  }\nLAB_0010a1a1:\n  DAT_0012a308 = uVar3;\n  if (uVar4 != 0) {\n    FUN_0010da70(uVar2);\n    return;\n  }\n  FUN_0010d05e(uVar2);\n  return;\n}" primitive_type (function_declarator "FUN_0010a0a2(undefined8 param_1,int param_2,int param_3)" identifier (parameter_list "(undefined8 param_1,int param_2,int param_3)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = FUN_0010d02b();\n  uVar4 = DAT_0012a308 & 0x400;\n  if (uVar4 != 0) {\n    if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }\n    if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;\n    uVar4 = 1;\n  }\n  while( true ) {\n    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);\n    uVar3 = DAT_0012a308 & 0xfffffffb;\n    if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    if (param_2 < 0) goto LAB_0010a1a1;\n    if ((DAT_0012a308 & 0x200) == 0) break;\n    if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }\n    uVar3 = DAT_0012a308;\n    if (iVar1 != 0) break;\n    uVar4 = 1;\n  }\n  DAT_0012a308 = uVar3;\n  uVar3 = DAT_0012a308;\n  if ((0 < param_2) && (param_3 == 0)) {\n    error("Pattern not found",0);\n    uVar3 = DAT_0012a308;\n  }\nLAB_0010a1a1:\n  DAT_0012a308 = uVar3;\n  if (uVar4 != 0) {\n    FUN_0010da70(uVar2);\n    return;\n  }\n  FUN_0010d05e(uVar2);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "uVar2 = FUN_0010d02b();" (assignment_expression "uVar2 = FUN_0010d02b()" identifier = (call_expression "FUN_0010d02b()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar4 = DAT_0012a308 & 0x400;" (assignment_expression "uVar4 = DAT_0012a308 & 0x400" identifier = (binary_expression "DAT_0012a308 & 0x400" identifier & number_literal)) ;) (if_statement "if (uVar4 != 0) {\n    if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }\n    if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;\n    uVar4 = 1;\n  }" if (parenthesized_expression "(uVar4 != 0)" ( (binary_expression "uVar4 != 0" identifier != number_literal) )) (compound_statement "{\n    if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }\n    if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;\n    uVar4 = 1;\n  }" { (if_statement "if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }" if (parenthesized_expression "((DAT_0012a308 & 1) == 0)" ( (binary_expression "(DAT_0012a308 & 1) == 0" (parenthesized_expression "(DAT_0012a308 & 1)" ( (binary_expression "DAT_0012a308 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      iVar1 = FUN_0010d9ff();\n    }" { (expression_statement "iVar1 = FUN_0010d9ff();" (assignment_expression "iVar1 = FUN_0010d9ff()" identifier = (call_expression "FUN_0010d9ff()" identifier (argument_list "()" ( )))) ;) }) (else_clause "else {\n      iVar1 = FUN_0010d9bb();\n    }" else (compound_statement "{\n      iVar1 = FUN_0010d9bb();\n    }" { (expression_statement "iVar1 = FUN_0010d9bb();" (assignment_expression "iVar1 = FUN_0010d9bb()" identifier = (call_expression "FUN_0010d9bb()" identifier (argument_list "()" ( )))) ;) }))) (if_statement "if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_0010d05e(uVar2);\n      return;\n    }" { (expression_statement "FUN_0010d05e(uVar2);" (call_expression "FUN_0010d05e(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "DAT_0012a308 = DAT_0012a308 & 0xfffffbff;" (assignment_expression "DAT_0012a308 = DAT_0012a308 & 0xfffffbff" identifier = (binary_expression "DAT_0012a308 & 0xfffffbff" identifier & number_literal)) ;) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) })) (while_statement "while( true ) {\n    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);\n    uVar3 = DAT_0012a308 & 0xfffffffb;\n    if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    if (param_2 < 0) goto LAB_0010a1a1;\n    if ((DAT_0012a308 & 0x200) == 0) break;\n    if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }\n    uVar3 = DAT_0012a308;\n    if (iVar1 != 0) break;\n    uVar4 = 1;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);\n    uVar3 = DAT_0012a308 & 0xfffffffb;\n    if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    if (param_2 < 0) goto LAB_0010a1a1;\n    if ((DAT_0012a308 & 0x200) == 0) break;\n    if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }\n    uVar3 = DAT_0012a308;\n    if (iVar1 != 0) break;\n    uVar4 = 1;\n  }" { (expression_statement "param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);" (assignment_expression "param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2)" identifier = (call_expression "FUN_001182a7(DAT_0012a308,param_1,param_2)" identifier (argument_list "(DAT_0012a308,param_1,param_2)" ( identifier , identifier , identifier )))) ;) (expression_statement "uVar3 = DAT_0012a308 & 0xfffffffb;" (assignment_expression "uVar3 = DAT_0012a308 & 0xfffffffb" identifier = (binary_expression "DAT_0012a308 & 0xfffffffb" identifier & number_literal)) ;) (if_statement "if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }" { (expression_statement "DAT_0012a308 = uVar3;" (assignment_expression "DAT_0012a308 = uVar3" identifier = identifier) ;) (expression_statement "FUN_0010d05e(uVar2);" (call_expression "FUN_0010d05e(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return;" return ;) })) (if_statement "if (param_2 < 0) goto LAB_0010a1a1;" if (parenthesized_expression "(param_2 < 0)" ( (binary_expression "param_2 < 0" identifier < number_literal) )) (goto_statement "goto LAB_0010a1a1;" goto statement_identifier ;)) (if_statement "if ((DAT_0012a308 & 0x200) == 0) break;" if (parenthesized_expression "((DAT_0012a308 & 0x200) == 0)" ( (binary_expression "(DAT_0012a308 & 0x200) == 0" (parenthesized_expression "(DAT_0012a308 & 0x200)" ( (binary_expression "DAT_0012a308 & 0x200" identifier & number_literal) )) == number_literal) )) (break_statement "break;" break ;)) (if_statement "if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }" if (parenthesized_expression "((DAT_0012a308 & 1) == 0)" ( (binary_expression "(DAT_0012a308 & 1) == 0" (parenthesized_expression "(DAT_0012a308 & 1)" ( (binary_expression "DAT_0012a308 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }" { (expression_statement "DAT_0012a308 = uVar3;" (assignment_expression "DAT_0012a308 = uVar3" identifier = identifier) ;) (expression_statement "iVar1 = FUN_0010d9de(1);" (assignment_expression "iVar1 = FUN_0010d9de(1)" identifier = (call_expression "FUN_0010d9de(1)" identifier (argument_list "(1)" ( number_literal )))) ;) }) (else_clause "else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }" else (compound_statement "{\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }" { (expression_statement "DAT_0012a308 = uVar3;" (assignment_expression "DAT_0012a308 = uVar3" identifier = identifier) ;) (expression_statement "iVar1 = FUN_0010d99a(1);" (assignment_expression "iVar1 = FUN_0010d99a(1)" identifier = (call_expression "FUN_0010d99a(1)" identifier (argument_list "(1)" ( number_literal )))) ;) }))) (expression_statement "uVar3 = DAT_0012a308;" (assignment_expression "uVar3 = DAT_0012a308" identifier = identifier) ;) (if_statement "if (iVar1 != 0) break;" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) })) (expression_statement "DAT_0012a308 = uVar3;" (assignment_expression "DAT_0012a308 = uVar3" identifier = identifier) ;) (expression_statement "uVar3 = DAT_0012a308;" (assignment_expression "uVar3 = DAT_0012a308" identifier = identifier) ;) (if_statement "if ((0 < param_2) && (param_3 == 0)) {\n    error("Pattern not found",0);\n    uVar3 = DAT_0012a308;\n  }" if (parenthesized_expression "((0 < param_2) && (param_3 == 0))" ( (binary_expression "(0 < param_2) && (param_3 == 0)" (parenthesized_expression "(0 < param_2)" ( (binary_expression "0 < param_2" number_literal < identifier) )) && (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) ))) )) (compound_statement "{\n    error("Pattern not found",0);\n    uVar3 = DAT_0012a308;\n  }" { (expression_statement "error("Pattern not found",0);" (call_expression "error("Pattern not found",0)" identifier (argument_list "("Pattern not found",0)" ( (string_literal ""Pattern not found"" " string_content ") , number_literal ))) ;) (expression_statement "uVar3 = DAT_0012a308;" (assignment_expression "uVar3 = DAT_0012a308" identifier = identifier) ;) })) (labeled_statement "LAB_0010a1a1:\n  DAT_0012a308 = uVar3;" statement_identifier : (expression_statement "DAT_0012a308 = uVar3;" (assignment_expression "DAT_0012a308 = uVar3" identifier = identifier) ;)) (if_statement "if (uVar4 != 0) {\n    FUN_0010da70(uVar2);\n    return;\n  }" if (parenthesized_expression "(uVar4 != 0)" ( (binary_expression "uVar4 != 0" identifier != number_literal) )) (compound_statement "{\n    FUN_0010da70(uVar2);\n    return;\n  }" { (expression_statement "FUN_0010da70(uVar2);" (call_expression "FUN_0010da70(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0010d05e(uVar2);" (call_expression "FUN_0010d05e(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void multi_search(char *pattern,int n,int silent)\n\n{\n  int iVar1;\n  void *save_ifile;\n  uint uVar2;\n  uint uVar3;\n  \n  save_ifile = save_curr_ifile();\n  uVar3 = search_type & 0x400;\n  if (uVar3 != 0) {\n    if ((search_type & 1U) == 0) {\n      iVar1 = edit_last();\n    }\n    else {\n      iVar1 = edit_first();\n    }\n    if (iVar1 != 0) {\n      unsave_ifile(save_ifile);\n      return;\n    }\n    search_type = search_type & 0xfffffbff;\n    uVar3 = 1;\n  }\n  while( true ) {\n    n = search(search_type,pattern,n);\n    uVar2 = search_type & 0xfffffffb;\n    if (n == 0) {\n      search_type = uVar2;\n      unsave_ifile(save_ifile);\n      return;\n    }\n    if (n < 0) goto LAB_0010a1a1;\n    if ((search_type & 0x200U) == 0) break;\n    if ((search_type & 1U) == 0) {\n      search_type = uVar2;\n      iVar1 = edit_prev(1);\n    }\n    else {\n      search_type = uVar2;\n      iVar1 = edit_next(1);\n    }\n    uVar2 = search_type;\n    if (iVar1 != 0) break;\n    uVar3 = 1;\n  }\n  search_type = uVar2;\n  uVar2 = search_type;\n  if ((0 < n) && (silent == 0)) {\n    error("Pattern not found",(PARG *)0x0);\n    uVar2 = search_type;\n  }\nLAB_0010a1a1:\n  search_type = uVar2;\n  if (uVar3 != 0) {\n    reedit_ifile(save_ifile);\n    return;\n  }\n  unsave_ifile(save_ifile);\n  return;\n}\n\n" (function_definition "void multi_search(char *pattern,int n,int silent)\n\n{\n  int iVar1;\n  void *save_ifile;\n  uint uVar2;\n  uint uVar3;\n  \n  save_ifile = save_curr_ifile();\n  uVar3 = search_type & 0x400;\n  if (uVar3 != 0) {\n    if ((search_type & 1U) == 0) {\n      iVar1 = edit_last();\n    }\n    else {\n      iVar1 = edit_first();\n    }\n    if (iVar1 != 0) {\n      unsave_ifile(save_ifile);\n      return;\n    }\n    search_type = search_type & 0xfffffbff;\n    uVar3 = 1;\n  }\n  while( true ) {\n    n = search(search_type,pattern,n);\n    uVar2 = search_type & 0xfffffffb;\n    if (n == 0) {\n      search_type = uVar2;\n      unsave_ifile(save_ifile);\n      return;\n    }\n    if (n < 0) goto LAB_0010a1a1;\n    if ((search_type & 0x200U) == 0) break;\n    if ((search_type & 1U) == 0) {\n      search_type = uVar2;\n      iVar1 = edit_prev(1);\n    }\n    else {\n      search_type = uVar2;\n      iVar1 = edit_next(1);\n    }\n    uVar2 = search_type;\n    if (iVar1 != 0) break;\n    uVar3 = 1;\n  }\n  search_type = uVar2;\n  uVar2 = search_type;\n  if ((0 < n) && (silent == 0)) {\n    error("Pattern not found",(PARG *)0x0);\n    uVar2 = search_type;\n  }\nLAB_0010a1a1:\n  search_type = uVar2;\n  if (uVar3 != 0) {\n    reedit_ifile(save_ifile);\n    return;\n  }\n  unsave_ifile(save_ifile);\n  return;\n}" primitive_type (function_declarator "multi_search(char *pattern,int n,int silent)" identifier (parameter_list "(char *pattern,int n,int silent)" ( (parameter_declaration "char *pattern" primitive_type (pointer_declarator "*pattern" * identifier)) , (parameter_declaration "int n" primitive_type identifier) , (parameter_declaration "int silent" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  void *save_ifile;\n  uint uVar2;\n  uint uVar3;\n  \n  save_ifile = save_curr_ifile();\n  uVar3 = search_type & 0x400;\n  if (uVar3 != 0) {\n    if ((search_type & 1U) == 0) {\n      iVar1 = edit_last();\n    }\n    else {\n      iVar1 = edit_first();\n    }\n    if (iVar1 != 0) {\n      unsave_ifile(save_ifile);\n      return;\n    }\n    search_type = search_type & 0xfffffbff;\n    uVar3 = 1;\n  }\n  while( true ) {\n    n = search(search_type,pattern,n);\n    uVar2 = search_type & 0xfffffffb;\n    if (n == 0) {\n      search_type = uVar2;\n      unsave_ifile(save_ifile);\n      return;\n    }\n    if (n < 0) goto LAB_0010a1a1;\n    if ((search_type & 0x200U) == 0) break;\n    if ((search_type & 1U) == 0) {\n      search_type = uVar2;\n      iVar1 = edit_prev(1);\n    }\n    else {\n      search_type = uVar2;\n      iVar1 = edit_next(1);\n    }\n    uVar2 = search_type;\n    if (iVar1 != 0) break;\n    uVar3 = 1;\n  }\n  search_type = uVar2;\n  uVar2 = search_type;\n  if ((0 < n) && (silent == 0)) {\n    error("Pattern not found",(PARG *)0x0);\n    uVar2 = search_type;\n  }\nLAB_0010a1a1:\n  search_type = uVar2;\n  if (uVar3 != 0) {\n    reedit_ifile(save_ifile);\n    return;\n  }\n  unsave_ifile(save_ifile);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *save_ifile;" primitive_type (pointer_declarator "*save_ifile" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "save_ifile = save_curr_ifile();" (assignment_expression "save_ifile = save_curr_ifile()" identifier = (call_expression "save_curr_ifile()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = search_type & 0x400;" (assignment_expression "uVar3 = search_type & 0x400" identifier = (binary_expression "search_type & 0x400" identifier & number_literal)) ;) (if_statement "if (uVar3 != 0) {\n    if ((search_type & 1U) == 0) {\n      iVar1 = edit_last();\n    }\n    else {\n      iVar1 = edit_first();\n    }\n    if (iVar1 != 0) {\n      unsave_ifile(save_ifile);\n      return;\n    }\n    search_type = search_type & 0xfffffbff;\n    uVar3 = 1;\n  }" if (parenthesized_expression "(uVar3 != 0)" ( (binary_expression "uVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    if ((search_type & 1U) == 0) {\n      iVar1 = edit_last();\n    }\n    else {\n      iVar1 = edit_first();\n    }\n    if (iVar1 != 0) {\n      unsave_ifile(save_ifile);\n      return;\n    }\n    search_type = search_type & 0xfffffbff;\n    uVar3 = 1;\n  }" { (if_statement "if ((search_type & 1U) == 0) {\n      iVar1 = edit_last();\n    }\n    else {\n      iVar1 = edit_first();\n    }" if (parenthesized_expression "((search_type & 1U) == 0)" ( (binary_expression "(search_type & 1U) == 0" (parenthesized_expression "(search_type & 1U)" ( (binary_expression "search_type & 1U" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      iVar1 = edit_last();\n    }" { (expression_statement "iVar1 = edit_last();" (assignment_expression "iVar1 = edit_last()" identifier = (call_expression "edit_last()" identifier (argument_list "()" ( )))) ;) }) (else_clause "else {\n      iVar1 = edit_first();\n    }" else (compound_statement "{\n      iVar1 = edit_first();\n    }" { (expression_statement "iVar1 = edit_first();" (assignment_expression "iVar1 = edit_first()" identifier = (call_expression "edit_first()" identifier (argument_list "()" ( )))) ;) }))) (if_statement "if (iVar1 != 0) {\n      unsave_ifile(save_ifile);\n      return;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      unsave_ifile(save_ifile);\n      return;\n    }" { (expression_statement "unsave_ifile(save_ifile);" (call_expression "unsave_ifile(save_ifile)" identifier (argument_list "(save_ifile)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "search_type = search_type & 0xfffffbff;" (assignment_expression "search_type = search_type & 0xfffffbff" identifier = (binary_expression "search_type & 0xfffffbff" identifier & number_literal)) ;) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) })) (while_statement "while( true ) {\n    n = search(search_type,pattern,n);\n    uVar2 = search_type & 0xfffffffb;\n    if (n == 0) {\n      search_type = uVar2;\n      unsave_ifile(save_ifile);\n      return;\n    }\n    if (n < 0) goto LAB_0010a1a1;\n    if ((search_type & 0x200U) == 0) break;\n    if ((search_type & 1U) == 0) {\n      search_type = uVar2;\n      iVar1 = edit_prev(1);\n    }\n    else {\n      search_type = uVar2;\n      iVar1 = edit_next(1);\n    }\n    uVar2 = search_type;\n    if (iVar1 != 0) break;\n    uVar3 = 1;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    n = search(search_type,pattern,n);\n    uVar2 = search_type & 0xfffffffb;\n    if (n == 0) {\n      search_type = uVar2;\n      unsave_ifile(save_ifile);\n      return;\n    }\n    if (n < 0) goto LAB_0010a1a1;\n    if ((search_type & 0x200U) == 0) break;\n    if ((search_type & 1U) == 0) {\n      search_type = uVar2;\n      iVar1 = edit_prev(1);\n    }\n    else {\n      search_type = uVar2;\n      iVar1 = edit_next(1);\n    }\n    uVar2 = search_type;\n    if (iVar1 != 0) break;\n    uVar3 = 1;\n  }" { (expression_statement "n = search(search_type,pattern,n);" (assignment_expression "n = search(search_type,pattern,n)" identifier = (call_expression "search(search_type,pattern,n)" identifier (argument_list "(search_type,pattern,n)" ( identifier , identifier , identifier )))) ;) (expression_statement "uVar2 = search_type & 0xfffffffb;" (assignment_expression "uVar2 = search_type & 0xfffffffb" identifier = (binary_expression "search_type & 0xfffffffb" identifier & number_literal)) ;) (if_statement "if (n == 0) {\n      search_type = uVar2;\n      unsave_ifile(save_ifile);\n      return;\n    }" if (parenthesized_expression "(n == 0)" ( (binary_expression "n == 0" identifier == number_literal) )) (compound_statement "{\n      search_type = uVar2;\n      unsave_ifile(save_ifile);\n      return;\n    }" { (expression_statement "search_type = uVar2;" (assignment_expression "search_type = uVar2" identifier = identifier) ;) (expression_statement "unsave_ifile(save_ifile);" (call_expression "unsave_ifile(save_ifile)" identifier (argument_list "(save_ifile)" ( identifier ))) ;) (return_statement "return;" return ;) })) (if_statement "if (n < 0) goto LAB_0010a1a1;" if (parenthesized_expression "(n < 0)" ( (binary_expression "n < 0" identifier < number_literal) )) (goto_statement "goto LAB_0010a1a1;" goto statement_identifier ;)) (if_statement "if ((search_type & 0x200U) == 0) break;" if (parenthesized_expression "((search_type & 0x200U) == 0)" ( (binary_expression "(search_type & 0x200U) == 0" (parenthesized_expression "(search_type & 0x200U)" ( (binary_expression "search_type & 0x200U" identifier & number_literal) )) == number_literal) )) (break_statement "break;" break ;)) (if_statement "if ((search_type & 1U) == 0) {\n      search_type = uVar2;\n      iVar1 = edit_prev(1);\n    }\n    else {\n      search_type = uVar2;\n      iVar1 = edit_next(1);\n    }" if (parenthesized_expression "((search_type & 1U) == 0)" ( (binary_expression "(search_type & 1U) == 0" (parenthesized_expression "(search_type & 1U)" ( (binary_expression "search_type & 1U" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      search_type = uVar2;\n      iVar1 = edit_prev(1);\n    }" { (expression_statement "search_type = uVar2;" (assignment_expression "search_type = uVar2" identifier = identifier) ;) (expression_statement "iVar1 = edit_prev(1);" (assignment_expression "iVar1 = edit_prev(1)" identifier = (call_expression "edit_prev(1)" identifier (argument_list "(1)" ( number_literal )))) ;) }) (else_clause "else {\n      search_type = uVar2;\n      iVar1 = edit_next(1);\n    }" else (compound_statement "{\n      search_type = uVar2;\n      iVar1 = edit_next(1);\n    }" { (expression_statement "search_type = uVar2;" (assignment_expression "search_type = uVar2" identifier = identifier) ;) (expression_statement "iVar1 = edit_next(1);" (assignment_expression "iVar1 = edit_next(1)" identifier = (call_expression "edit_next(1)" identifier (argument_list "(1)" ( number_literal )))) ;) }))) (expression_statement "uVar2 = search_type;" (assignment_expression "uVar2 = search_type" identifier = identifier) ;) (if_statement "if (iVar1 != 0) break;" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) })) (expression_statement "search_type = uVar2;" (assignment_expression "search_type = uVar2" identifier = identifier) ;) (expression_statement "uVar2 = search_type;" (assignment_expression "uVar2 = search_type" identifier = identifier) ;) (if_statement "if ((0 < n) && (silent == 0)) {\n    error("Pattern not found",(PARG *)0x0);\n    uVar2 = search_type;\n  }" if (parenthesized_expression "((0 < n) && (silent == 0))" ( (binary_expression "(0 < n) && (silent == 0)" (parenthesized_expression "(0 < n)" ( (binary_expression "0 < n" number_literal < identifier) )) && (parenthesized_expression "(silent == 0)" ( (binary_expression "silent == 0" identifier == number_literal) ))) )) (compound_statement "{\n    error("Pattern not found",(PARG *)0x0);\n    uVar2 = search_type;\n  }" { (expression_statement "error("Pattern not found",(PARG *)0x0);" (call_expression "error("Pattern not found",(PARG *)0x0)" identifier (argument_list "("Pattern not found",(PARG *)0x0)" ( (string_literal ""Pattern not found"" " string_content ") , (cast_expression "(PARG *)0x0" ( (type_descriptor "PARG *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) (expression_statement "uVar2 = search_type;" (assignment_expression "uVar2 = search_type" identifier = identifier) ;) })) (labeled_statement "LAB_0010a1a1:\n  search_type = uVar2;" statement_identifier : (expression_statement "search_type = uVar2;" (assignment_expression "search_type = uVar2" identifier = identifier) ;)) (if_statement "if (uVar3 != 0) {\n    reedit_ifile(save_ifile);\n    return;\n  }" if (parenthesized_expression "(uVar3 != 0)" ( (binary_expression "uVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    reedit_ifile(save_ifile);\n    return;\n  }" { (expression_statement "reedit_ifile(save_ifile);" (call_expression "reedit_ifile(save_ifile)" identifier (argument_list "(save_ifile)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "unsave_ifile(save_ifile);" (call_expression "unsave_ifile(save_ifile)" identifier (argument_list "(save_ifile)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0010a0a2(undefined8 param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = FUN_0010d02b();\n  uVar4 = DAT_0012a308 & 0x400;\n  if (uVar4 != 0) {\n    if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }\n    if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;\n    uVar4 = 1;\n  }\n  while( true ) {\n    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);\n    uVar3 = DAT_0012a308 & 0xfffffffb;\n    if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    if (param_2 < 0) goto LAB_0010a1a1;\n    if ((DAT_0012a308 & 0x200) == 0) break;\n    if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }\n    uVar3 = DAT_0012a308;\n    if (iVar1 != 0) break;\n    uVar4 = 1;\n  }\n  DAT_0012a308 = uVar3;\n  uVar3 = DAT_0012a308;\n  if ((0 < param_2) && (param_3 == 0)) {\n    error("Pattern not found",0);\n    uVar3 = DAT_0012a308;\n  }\nLAB_0010a1a1:\n  DAT_0012a308 = uVar3;\n  if (uVar4 != 0) {\n    FUN_0010da70(uVar2);\n    return;\n  }\n  FUN_0010d05e(uVar2);\n  return;\n}\n\n" (function_definition "void FUN_0010a0a2(undefined8 param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = FUN_0010d02b();\n  uVar4 = DAT_0012a308 & 0x400;\n  if (uVar4 != 0) {\n    if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }\n    if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;\n    uVar4 = 1;\n  }\n  while( true ) {\n    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);\n    uVar3 = DAT_0012a308 & 0xfffffffb;\n    if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    if (param_2 < 0) goto LAB_0010a1a1;\n    if ((DAT_0012a308 & 0x200) == 0) break;\n    if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }\n    uVar3 = DAT_0012a308;\n    if (iVar1 != 0) break;\n    uVar4 = 1;\n  }\n  DAT_0012a308 = uVar3;\n  uVar3 = DAT_0012a308;\n  if ((0 < param_2) && (param_3 == 0)) {\n    error("Pattern not found",0);\n    uVar3 = DAT_0012a308;\n  }\nLAB_0010a1a1:\n  DAT_0012a308 = uVar3;\n  if (uVar4 != 0) {\n    FUN_0010da70(uVar2);\n    return;\n  }\n  FUN_0010d05e(uVar2);\n  return;\n}" primitive_type (function_declarator "FUN_0010a0a2(undefined8 param_1,int param_2,int param_3)" identifier (parameter_list "(undefined8 param_1,int param_2,int param_3)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = FUN_0010d02b();\n  uVar4 = DAT_0012a308 & 0x400;\n  if (uVar4 != 0) {\n    if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }\n    if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;\n    uVar4 = 1;\n  }\n  while( true ) {\n    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);\n    uVar3 = DAT_0012a308 & 0xfffffffb;\n    if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    if (param_2 < 0) goto LAB_0010a1a1;\n    if ((DAT_0012a308 & 0x200) == 0) break;\n    if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }\n    uVar3 = DAT_0012a308;\n    if (iVar1 != 0) break;\n    uVar4 = 1;\n  }\n  DAT_0012a308 = uVar3;\n  uVar3 = DAT_0012a308;\n  if ((0 < param_2) && (param_3 == 0)) {\n    error("Pattern not found",0);\n    uVar3 = DAT_0012a308;\n  }\nLAB_0010a1a1:\n  DAT_0012a308 = uVar3;\n  if (uVar4 != 0) {\n    FUN_0010da70(uVar2);\n    return;\n  }\n  FUN_0010d05e(uVar2);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "uVar2 = FUN_0010d02b();" (assignment_expression "uVar2 = FUN_0010d02b()" identifier = (call_expression "FUN_0010d02b()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar4 = DAT_0012a308 & 0x400;" (assignment_expression "uVar4 = DAT_0012a308 & 0x400" identifier = (binary_expression "DAT_0012a308 & 0x400" identifier & number_literal)) ;) (if_statement "if (uVar4 != 0) {\n    if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }\n    if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;\n    uVar4 = 1;\n  }" if (parenthesized_expression "(uVar4 != 0)" ( (binary_expression "uVar4 != 0" identifier != number_literal) )) (compound_statement "{\n    if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }\n    if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;\n    uVar4 = 1;\n  }" { (if_statement "if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }" if (parenthesized_expression "((DAT_0012a308 & 1) == 0)" ( (binary_expression "(DAT_0012a308 & 1) == 0" (parenthesized_expression "(DAT_0012a308 & 1)" ( (binary_expression "DAT_0012a308 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      iVar1 = FUN_0010d9ff();\n    }" { (expression_statement "iVar1 = FUN_0010d9ff();" (assignment_expression "iVar1 = FUN_0010d9ff()" identifier = (call_expression "FUN_0010d9ff()" identifier (argument_list "()" ( )))) ;) }) (else_clause "else {\n      iVar1 = FUN_0010d9bb();\n    }" else (compound_statement "{\n      iVar1 = FUN_0010d9bb();\n    }" { (expression_statement "iVar1 = FUN_0010d9bb();" (assignment_expression "iVar1 = FUN_0010d9bb()" identifier = (call_expression "FUN_0010d9bb()" identifier (argument_list "()" ( )))) ;) }))) (if_statement "if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_0010d05e(uVar2);\n      return;\n    }" { (expression_statement "FUN_0010d05e(uVar2);" (call_expression "FUN_0010d05e(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "DAT_0012a308 = DAT_0012a308 & 0xfffffbff;" (assignment_expression "DAT_0012a308 = DAT_0012a308 & 0xfffffbff" identifier = (binary_expression "DAT_0012a308 & 0xfffffbff" identifier & number_literal)) ;) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) })) (while_statement "while( true ) {\n    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);\n    uVar3 = DAT_0012a308 & 0xfffffffb;\n    if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    if (param_2 < 0) goto LAB_0010a1a1;\n    if ((DAT_0012a308 & 0x200) == 0) break;\n    if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }\n    uVar3 = DAT_0012a308;\n    if (iVar1 != 0) break;\n    uVar4 = 1;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);\n    uVar3 = DAT_0012a308 & 0xfffffffb;\n    if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    if (param_2 < 0) goto LAB_0010a1a1;\n    if ((DAT_0012a308 & 0x200) == 0) break;\n    if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }\n    uVar3 = DAT_0012a308;\n    if (iVar1 != 0) break;\n    uVar4 = 1;\n  }" { (expression_statement "param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);" (assignment_expression "param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2)" identifier = (call_expression "FUN_001182a7(DAT_0012a308,param_1,param_2)" identifier (argument_list "(DAT_0012a308,param_1,param_2)" ( identifier , identifier , identifier )))) ;) (expression_statement "uVar3 = DAT_0012a308 & 0xfffffffb;" (assignment_expression "uVar3 = DAT_0012a308 & 0xfffffffb" identifier = (binary_expression "DAT_0012a308 & 0xfffffffb" identifier & number_literal)) ;) (if_statement "if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }" { (expression_statement "DAT_0012a308 = uVar3;" (assignment_expression "DAT_0012a308 = uVar3" identifier = identifier) ;) (expression_statement "FUN_0010d05e(uVar2);" (call_expression "FUN_0010d05e(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return;" return ;) })) (if_statement "if (param_2 < 0) goto LAB_0010a1a1;" if (parenthesized_expression "(param_2 < 0)" ( (binary_expression "param_2 < 0" identifier < number_literal) )) (goto_statement "goto LAB_0010a1a1;" goto statement_identifier ;)) (if_statement "if ((DAT_0012a308 & 0x200) == 0) break;" if (parenthesized_expression "((DAT_0012a308 & 0x200) == 0)" ( (binary_expression "(DAT_0012a308 & 0x200) == 0" (parenthesized_expression "(DAT_0012a308 & 0x200)" ( (binary_expression "DAT_0012a308 & 0x200" identifier & number_literal) )) == number_literal) )) (break_statement "break;" break ;)) (if_statement "if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }" if (parenthesized_expression "((DAT_0012a308 & 1) == 0)" ( (binary_expression "(DAT_0012a308 & 1) == 0" (parenthesized_expression "(DAT_0012a308 & 1)" ( (binary_expression "DAT_0012a308 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }" { (expression_statement "DAT_0012a308 = uVar3;" (assignment_expression "DAT_0012a308 = uVar3" identifier = identifier) ;) (expression_statement "iVar1 = FUN_0010d9de(1);" (assignment_expression "iVar1 = FUN_0010d9de(1)" identifier = (call_expression "FUN_0010d9de(1)" identifier (argument_list "(1)" ( number_literal )))) ;) }) (else_clause "else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }" else (compound_statement "{\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }" { (expression_statement "DAT_0012a308 = uVar3;" (assignment_expression "DAT_0012a308 = uVar3" identifier = identifier) ;) (expression_statement "iVar1 = FUN_0010d99a(1);" (assignment_expression "iVar1 = FUN_0010d99a(1)" identifier = (call_expression "FUN_0010d99a(1)" identifier (argument_list "(1)" ( number_literal )))) ;) }))) (expression_statement "uVar3 = DAT_0012a308;" (assignment_expression "uVar3 = DAT_0012a308" identifier = identifier) ;) (if_statement "if (iVar1 != 0) break;" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) })) (expression_statement "DAT_0012a308 = uVar3;" (assignment_expression "DAT_0012a308 = uVar3" identifier = identifier) ;) (expression_statement "uVar3 = DAT_0012a308;" (assignment_expression "uVar3 = DAT_0012a308" identifier = identifier) ;) (if_statement "if ((0 < param_2) && (param_3 == 0)) {\n    error("Pattern not found",0);\n    uVar3 = DAT_0012a308;\n  }" if (parenthesized_expression "((0 < param_2) && (param_3 == 0))" ( (binary_expression "(0 < param_2) && (param_3 == 0)" (parenthesized_expression "(0 < param_2)" ( (binary_expression "0 < param_2" number_literal < identifier) )) && (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) ))) )) (compound_statement "{\n    error("Pattern not found",0);\n    uVar3 = DAT_0012a308;\n  }" { (expression_statement "error("Pattern not found",0);" (call_expression "error("Pattern not found",0)" identifier (argument_list "("Pattern not found",0)" ( (string_literal ""Pattern not found"" " string_content ") , number_literal ))) ;) (expression_statement "uVar3 = DAT_0012a308;" (assignment_expression "uVar3 = DAT_0012a308" identifier = identifier) ;) })) (labeled_statement "LAB_0010a1a1:\n  DAT_0012a308 = uVar3;" statement_identifier : (expression_statement "DAT_0012a308 = uVar3;" (assignment_expression "DAT_0012a308 = uVar3" identifier = identifier) ;)) (if_statement "if (uVar4 != 0) {\n    FUN_0010da70(uVar2);\n    return;\n  }" if (parenthesized_expression "(uVar4 != 0)" ( (binary_expression "uVar4 != 0" identifier != number_literal) )) (compound_statement "{\n    FUN_0010da70(uVar2);\n    return;\n  }" { (expression_statement "FUN_0010da70(uVar2);" (call_expression "FUN_0010da70(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0010d05e(uVar2);" (call_expression "FUN_0010d05e(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (break_statement break ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) }))) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) && (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , LIT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0010a0a2(undefined8 param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = FUN_0010d02b();\n  uVar4 = DAT_0012a308 & 0x400;\n  if (uVar4 != 0) {\n    if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }\n    if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;\n    uVar4 = 1;\n  }\n  while( true ) {\n    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);\n    uVar3 = DAT_0012a308 & 0xfffffffb;\n    if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    if (param_2 < 0) goto LAB_0010a1a1;\n    if ((DAT_0012a308 & 0x200) == 0) break;\n    if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }\n    uVar3 = DAT_0012a308;\n    if (iVar1 != 0) break;\n    uVar4 = 1;\n  }\n  DAT_0012a308 = uVar3;\n  uVar3 = DAT_0012a308;\n  if ((0 < param_2) && (param_3 == 0)) {\n    error("Pattern not found",0);\n    uVar3 = DAT_0012a308;\n  }\nLAB_0010a1a1:\n  DAT_0012a308 = uVar3;\n  if (uVar4 != 0) {\n    FUN_0010da70(uVar2);\n    return;\n  }\n  FUN_0010d05e(uVar2);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0010a0a2(undefined8 param_1,int param_2,int param_3)" (identifier "FUN_0010a0a2") (parameter_list "(undefined8 param_1,int param_2,int param_3)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = FUN_0010d02b();\n  uVar4 = DAT_0012a308 & 0x400;\n  if (uVar4 != 0) {\n    if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }\n    if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;\n    uVar4 = 1;\n  }\n  while( true ) {\n    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);\n    uVar3 = DAT_0012a308 & 0xfffffffb;\n    if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    if (param_2 < 0) goto LAB_0010a1a1;\n    if ((DAT_0012a308 & 0x200) == 0) break;\n    if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }\n    uVar3 = DAT_0012a308;\n    if (iVar1 != 0) break;\n    uVar4 = 1;\n  }\n  DAT_0012a308 = uVar3;\n  uVar3 = DAT_0012a308;\n  if ((0 < param_2) && (param_3 == 0)) {\n    error("Pattern not found",0);\n    uVar3 = DAT_0012a308;\n  }\nLAB_0010a1a1:\n  DAT_0012a308 = uVar3;\n  if (uVar4 != 0) {\n    FUN_0010da70(uVar2);\n    return;\n  }\n  FUN_0010d05e(uVar2);\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (expression_statement "uVar2 = FUN_0010d02b();" (assignment_expression "uVar2 = FUN_0010d02b()" (identifier "uVar2") (= "=") (call_expression "FUN_0010d02b()" (identifier "FUN_0010d02b") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar4 = DAT_0012a308 & 0x400;" (assignment_expression "uVar4 = DAT_0012a308 & 0x400" (identifier "uVar4") (= "=") (binary_expression "DAT_0012a308 & 0x400" (identifier "DAT_0012a308") (& "&") (number_literal "0x400"))) (; ";")) (if_statement "if (uVar4 != 0) {\n    if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }\n    if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;\n    uVar4 = 1;\n  }" (if "if") (parenthesized_expression "(uVar4 != 0)" (( "(") (binary_expression "uVar4 != 0" (identifier "uVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }\n    if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;\n    uVar4 = 1;\n  }" ({ "{") (if_statement "if ((DAT_0012a308 & 1) == 0) {\n      iVar1 = FUN_0010d9ff();\n    }\n    else {\n      iVar1 = FUN_0010d9bb();\n    }" (if "if") (parenthesized_expression "((DAT_0012a308 & 1) == 0)" (( "(") (binary_expression "(DAT_0012a308 & 1) == 0" (parenthesized_expression "(DAT_0012a308 & 1)" (( "(") (binary_expression "DAT_0012a308 & 1" (identifier "DAT_0012a308") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar1 = FUN_0010d9ff();\n    }" ({ "{") (expression_statement "iVar1 = FUN_0010d9ff();" (assignment_expression "iVar1 = FUN_0010d9ff()" (identifier "iVar1") (= "=") (call_expression "FUN_0010d9ff()" (identifier "FUN_0010d9ff") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}")) (else_clause "else {\n      iVar1 = FUN_0010d9bb();\n    }" (else "else") (compound_statement "{\n      iVar1 = FUN_0010d9bb();\n    }" ({ "{") (expression_statement "iVar1 = FUN_0010d9bb();" (assignment_expression "iVar1 = FUN_0010d9bb()" (identifier "iVar1") (= "=") (call_expression "FUN_0010d9bb()" (identifier "FUN_0010d9bb") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}")))) (if_statement "if (iVar1 != 0) {\n      FUN_0010d05e(uVar2);\n      return;\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_0010d05e(uVar2);\n      return;\n    }" ({ "{") (expression_statement "FUN_0010d05e(uVar2);" (call_expression "FUN_0010d05e(uVar2)" (identifier "FUN_0010d05e") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "DAT_0012a308 = DAT_0012a308 & 0xfffffbff;" (assignment_expression "DAT_0012a308 = DAT_0012a308 & 0xfffffbff" (identifier "DAT_0012a308") (= "=") (binary_expression "DAT_0012a308 & 0xfffffbff" (identifier "DAT_0012a308") (& "&") (number_literal "0xfffffbff"))) (; ";")) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" (identifier "uVar4") (= "=") (number_literal "1")) (; ";")) (} "}"))) (while_statement "while( true ) {\n    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);\n    uVar3 = DAT_0012a308 & 0xfffffffb;\n    if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    if (param_2 < 0) goto LAB_0010a1a1;\n    if ((DAT_0012a308 & 0x200) == 0) break;\n    if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }\n    uVar3 = DAT_0012a308;\n    if (iVar1 != 0) break;\n    uVar4 = 1;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);\n    uVar3 = DAT_0012a308 & 0xfffffffb;\n    if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }\n    if (param_2 < 0) goto LAB_0010a1a1;\n    if ((DAT_0012a308 & 0x200) == 0) break;\n    if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }\n    uVar3 = DAT_0012a308;\n    if (iVar1 != 0) break;\n    uVar4 = 1;\n  }" ({ "{") (expression_statement "param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);" (assignment_expression "param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2)" (identifier "param_2") (= "=") (call_expression "FUN_001182a7(DAT_0012a308,param_1,param_2)" (identifier "FUN_001182a7") (argument_list "(DAT_0012a308,param_1,param_2)" (( "(") (identifier "DAT_0012a308") (, ",") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (expression_statement "uVar3 = DAT_0012a308 & 0xfffffffb;" (assignment_expression "uVar3 = DAT_0012a308 & 0xfffffffb" (identifier "uVar3") (= "=") (binary_expression "DAT_0012a308 & 0xfffffffb" (identifier "DAT_0012a308") (& "&") (number_literal "0xfffffffb"))) (; ";")) (if_statement "if (param_2 == 0) {\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      DAT_0012a308 = uVar3;\n      FUN_0010d05e(uVar2);\n      return;\n    }" ({ "{") (expression_statement "DAT_0012a308 = uVar3;" (assignment_expression "DAT_0012a308 = uVar3" (identifier "DAT_0012a308") (= "=") (identifier "uVar3")) (; ";")) (expression_statement "FUN_0010d05e(uVar2);" (call_expression "FUN_0010d05e(uVar2)" (identifier "FUN_0010d05e") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (param_2 < 0) goto LAB_0010a1a1;" (if "if") (parenthesized_expression "(param_2 < 0)" (( "(") (binary_expression "param_2 < 0" (identifier "param_2") (< "<") (number_literal "0")) () ")")) (goto_statement "goto LAB_0010a1a1;" (goto "goto") (statement_identifier "LAB_0010a1a1") (; ";"))) (if_statement "if ((DAT_0012a308 & 0x200) == 0) break;" (if "if") (parenthesized_expression "((DAT_0012a308 & 0x200) == 0)" (( "(") (binary_expression "(DAT_0012a308 & 0x200) == 0" (parenthesized_expression "(DAT_0012a308 & 0x200)" (( "(") (binary_expression "DAT_0012a308 & 0x200" (identifier "DAT_0012a308") (& "&") (number_literal "0x200")) () ")")) (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (if_statement "if ((DAT_0012a308 & 1) == 0) {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }\n    else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }" (if "if") (parenthesized_expression "((DAT_0012a308 & 1) == 0)" (( "(") (binary_expression "(DAT_0012a308 & 1) == 0" (parenthesized_expression "(DAT_0012a308 & 1)" (( "(") (binary_expression "DAT_0012a308 & 1" (identifier "DAT_0012a308") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d9de(1);\n    }" ({ "{") (expression_statement "DAT_0012a308 = uVar3;" (assignment_expression "DAT_0012a308 = uVar3" (identifier "DAT_0012a308") (= "=") (identifier "uVar3")) (; ";")) (expression_statement "iVar1 = FUN_0010d9de(1);" (assignment_expression "iVar1 = FUN_0010d9de(1)" (identifier "iVar1") (= "=") (call_expression "FUN_0010d9de(1)" (identifier "FUN_0010d9de") (argument_list "(1)" (( "(") (number_literal "1") () ")")))) (; ";")) (} "}")) (else_clause "else {\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }" (else "else") (compound_statement "{\n      DAT_0012a308 = uVar3;\n      iVar1 = FUN_0010d99a(1);\n    }" ({ "{") (expression_statement "DAT_0012a308 = uVar3;" (assignment_expression "DAT_0012a308 = uVar3" (identifier "DAT_0012a308") (= "=") (identifier "uVar3")) (; ";")) (expression_statement "iVar1 = FUN_0010d99a(1);" (assignment_expression "iVar1 = FUN_0010d99a(1)" (identifier "iVar1") (= "=") (call_expression "FUN_0010d99a(1)" (identifier "FUN_0010d99a") (argument_list "(1)" (( "(") (number_literal "1") () ")")))) (; ";")) (} "}")))) (expression_statement "uVar3 = DAT_0012a308;" (assignment_expression "uVar3 = DAT_0012a308" (identifier "uVar3") (= "=") (identifier "DAT_0012a308")) (; ";")) (if_statement "if (iVar1 != 0) break;" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" (identifier "uVar4") (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "DAT_0012a308 = uVar3;" (assignment_expression "DAT_0012a308 = uVar3" (identifier "DAT_0012a308") (= "=") (identifier "uVar3")) (; ";")) (expression_statement "uVar3 = DAT_0012a308;" (assignment_expression "uVar3 = DAT_0012a308" (identifier "uVar3") (= "=") (identifier "DAT_0012a308")) (; ";")) (if_statement "if ((0 < param_2) && (param_3 == 0)) {\n    error("Pattern not found",0);\n    uVar3 = DAT_0012a308;\n  }" (if "if") (parenthesized_expression "((0 < param_2) && (param_3 == 0))" (( "(") (binary_expression "(0 < param_2) && (param_3 == 0)" (parenthesized_expression "(0 < param_2)" (( "(") (binary_expression "0 < param_2" (number_literal "0") (< "<") (identifier "param_2")) () ")")) (&& "&&") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    error("Pattern not found",0);\n    uVar3 = DAT_0012a308;\n  }" ({ "{") (expression_statement "error("Pattern not found",0);" (call_expression "error("Pattern not found",0)" (identifier "error") (argument_list "("Pattern not found",0)" (( "(") (string_literal ""Pattern not found"" (" """) (string_content "Pattern not found") (" """)) (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "uVar3 = DAT_0012a308;" (assignment_expression "uVar3 = DAT_0012a308" (identifier "uVar3") (= "=") (identifier "DAT_0012a308")) (; ";")) (} "}"))) (labeled_statement "LAB_0010a1a1:\n  DAT_0012a308 = uVar3;" (statement_identifier "LAB_0010a1a1") (: ":") (expression_statement "DAT_0012a308 = uVar3;" (assignment_expression "DAT_0012a308 = uVar3" (identifier "DAT_0012a308") (= "=") (identifier "uVar3")) (; ";"))) (if_statement "if (uVar4 != 0) {\n    FUN_0010da70(uVar2);\n    return;\n  }" (if "if") (parenthesized_expression "(uVar4 != 0)" (( "(") (binary_expression "uVar4 != 0" (identifier "uVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_0010da70(uVar2);\n    return;\n  }" ({ "{") (expression_statement "FUN_0010da70(uVar2);" (call_expression "FUN_0010da70(uVar2)" (identifier "FUN_0010da70") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0010d05e(uVar2);" (call_expression "FUN_0010d05e(uVar2)" (identifier "FUN_0010d05e") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(char *pattern,int var_9,int var_12)

{
  int var_6;
  void *save_ifile;
  type_1 uVar2;
  type_1 var_3;
  
  save_ifile = var_1();
  var_3 = var_2 & 0x400;
  if (var_3 != 0) {
    if ((var_2 & 1U) == 0) {
      var_6 = var_4();
    }
    else {
      var_6 = var_5();
    }
    if (var_6 != 0) {
      var_7(save_ifile);
      return;
    }
    var_2 = var_2 & 0xfffffbff;
    var_3 = 1;
  }
  while( true ) {
    var_9 = var_8(var_2,pattern,var_9);
    uVar2 = var_2 & 0xfffffffb;
    if (var_9 == 0) {
      var_2 = uVar2;
      var_7(save_ifile);
      return;
    }
    if (var_9 < 0) goto LAB_0010a1a1;
    if ((var_2 & 0x200U) == 0) break;
    if ((var_2 & 1U) == 0) {
      var_2 = uVar2;
      var_6 = var_10(1);
    }
    else {
      var_2 = uVar2;
      var_6 = var_11(1);
    }
    uVar2 = var_2;
    if (var_6 != 0) break;
    var_3 = 1;
  }
  var_2 = uVar2;
  uVar2 = var_2;
  if ((0 < var_9) && (var_12 == 0)) {
    var_13("Pattern not found",(type_2 *)0x0);
    uVar2 = var_2;
  }
LAB_0010a1a1:
  var_2 = uVar2;
  if (var_3 != 0) {
    var_14(save_ifile);
    return;
  }
  var_7(save_ifile);
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (break_statement)) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_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: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))))

void MASKED(undefined8 param_1,int param_2,int param_3)

{
  int iVar1;
  undefined8 uVar2;
  uint uVar3;
  uint uVar4;
  
  uVar2 = FUN_0010d02b();
  uVar4 = DAT_0012a308 & 0x400;
  if (uVar4 != 0) {
    if ((DAT_0012a308 & 1) == 0) {
      iVar1 = FUN_0010d9ff();
    }
    else {
      iVar1 = FUN_0010d9bb();
    }
    if (iVar1 != 0) {
      FUN_0010d05e(uVar2);
      return;
    }
    DAT_0012a308 = DAT_0012a308 & 0xfffffbff;
    uVar4 = 1;
  }
  while( true ) {
    param_2 = FUN_001182a7(DAT_0012a308,param_1,param_2);
    uVar3 = DAT_0012a308 & 0xfffffffb;
    if (param_2 == 0) {
      DAT_0012a308 = uVar3;
      FUN_0010d05e(uVar2);
      return;
    }
    if (param_2 < 0) goto LAB_0010a1a1;
    if ((DAT_0012a308 & 0x200) == 0) break;
    if ((DAT_0012a308 & 1) == 0) {
      DAT_0012a308 = uVar3;
      iVar1 = FUN_0010d9de(1);
    }
    else {
      DAT_0012a308 = uVar3;
      iVar1 = FUN_0010d99a(1);
    }
    uVar3 = DAT_0012a308;
    if (iVar1 != 0) break;
    uVar4 = 1;
  }
  DAT_0012a308 = uVar3;
  uVar3 = DAT_0012a308;
  if ((0 < param_2) && (param_3 == 0)) {
    error("Pattern not found",0);
    uVar3 = DAT_0012a308;
  }
LAB_0010a1a1:
  DAT_0012a308 = uVar3;
  if (uVar4 != 0) {
    FUN_0010da70(uVar2);
    return;
  }
  FUN_0010d05e(uVar2);
  return;
}

