
int rl_history_substr_search_backward(int count,int ignore)

{
  int iVar1;
  int dir;
  
  if (count == 0) {
    iVar1 = 0;
  }
  else {
    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)
       && (*(undefined **)PTR_rl_last_func_00157638 !=
           PTR_rl_history_substr_search_backward_00157f24)) {
      rl_history_search_reinit(0);
    }
    if (*(int *)(PTR_pidstat_table_3077__0015656c + -0x418c) == 0) {
      iVar1 = (*(code *)PTR_rl_get_previous_history_00157668)(count,ignore);
    }
    else {
      iVar1 = count;
      if (count < 0) {
        iVar1 = -count;
      }
      dir = -1;
      if (count < 1) {
        dir = 1;
      }
      iVar1 = rl_history_search_internal(iVar1,dir);
    }
  }
  return iVar1;
}



undefined4 rl_history_substr_search_backward(int param_1,undefined4 param_2)

{
  int iVar1;
  undefined4 uVar2;
  
  if (param_1 == 0) {
    uVar2 = 0;
  }
  else {
    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)
       && (*(undefined **)PTR_rl_last_func_00157638 !=
           PTR_rl_history_substr_search_backward_00157f24)) {
      FUN_000f81f4(0);
    }
    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {
      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);
    }
    else {
      iVar1 = param_1;
      if (param_1 < 0) {
        iVar1 = -param_1;
      }
      uVar2 = 0xffffffff;
      if (param_1 < 1) {
        uVar2 = 1;
      }
      uVar2 = FUN_000f830c(iVar1,uVar2);
    }
  }
  return uVar2;
}


lui gp,0x6
addiu gp,gp,0x5d20
addu gp,gp,t9
addiu sp,sp,-0x28
sw ra,0x24(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
sw gp,0x10(sp)
beq a0,zero,0x000f88f0
_or s1,a1,zero
lw v0,-0x6f08(gp)
lw v0,0x0(v0)
lw v1,-0x6620(gp)
beq v0,v1,0x000f887c
_or s0,a0,zero
lw v1,-0x661c(gp)
beq v0,v1,0x000f887c
_or a0,zero,zero
lw t9,-0x6624(gp)
addiu t9,t9,-0x7e0c
bal 0x000f81f4
_nop
lw gp,0x10(sp)
lw v0,-0x7fd4(gp)
lw v0,-0x418c(v0)
beq v0,zero,0x000f88cc
_or a1,s1,zero
bltz s0,0x000f88e8
_or a0,s0,zero
slt s0,zero,s0
li a1,-0x1
li v0,0x1
movz a1,v0,s0
lw t9,-0x6624(gp)
addiu t9,t9,-0x7cf4
bal 0x000f830c
_nop
lw gp,0x10(sp)
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
or a0,s0,zero
lw t9,-0x6ed8(gp)
jalr t9
_nop
lw gp,0x10(sp)
b 0x000f88bc
_lw ra,0x24(sp)
b 0x000f8894
_subu a0,zero,s0
b 0x000f88b8
_or v0,a0,zero
(translation_unit "undefined4 rl_history_substr_search_backward(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4 rl_history_substr_search_backward(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }\n  return uVar2;\n}" type_identifier (function_declarator "rl_history_substr_search_backward(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar2 = 0;\n  }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }" else (compound_statement "{\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }" { (if_statement "if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }" if (parenthesized_expression "((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24))" ( (binary_expression "(*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)" (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)" ( (binary_expression "*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20" (pointer_expression "*(undefined **)PTR_rl_last_func_00157638" * (cast_expression "(undefined **)PTR_rl_last_func_00157638" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) != identifier) )) && (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)" ( (binary_expression "*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24" (pointer_expression "*(undefined **)PTR_rl_last_func_00157638" * (cast_expression "(undefined **)PTR_rl_last_func_00157638" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) != identifier) ))) )) (compound_statement "{\n      FUN_000f81f4(0);\n    }" { (expression_statement "FUN_000f81f4(0);" (call_expression "FUN_000f81f4(0)" identifier (argument_list "(0)" ( number_literal ))) ;) })) (if_statement "if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }" if (parenthesized_expression "(*(int *)(PTR_DAT_0015656c + -0x418c) == 0)" ( (binary_expression "*(int *)(PTR_DAT_0015656c + -0x418c) == 0" (pointer_expression "*(int *)(PTR_DAT_0015656c + -0x418c)" * (cast_expression "(int *)(PTR_DAT_0015656c + -0x418c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0015656c + -0x418c)" ( (binary_expression "PTR_DAT_0015656c + -0x418c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }" { (expression_statement "uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);" (assignment_expression "uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2)" identifier = (call_expression "(*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2)" (parenthesized_expression "(*(code *)PTR_rl_get_previous_history_00157668)" ( (pointer_expression "*(code *)PTR_rl_get_previous_history_00157668" * (cast_expression "(code *)PTR_rl_get_previous_history_00157668" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) }) (else_clause "else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }" else (compound_statement "{\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }" { (expression_statement "iVar1 = param_1;" (assignment_expression "iVar1 = param_1" identifier = identifier) ;) (if_statement "if (param_1 < 0) {\n        iVar1 = -param_1;\n      }" if (parenthesized_expression "(param_1 < 0)" ( (binary_expression "param_1 < 0" identifier < number_literal) )) (compound_statement "{\n        iVar1 = -param_1;\n      }" { (expression_statement "iVar1 = -param_1;" (assignment_expression "iVar1 = -param_1" identifier = (unary_expression "-param_1" - identifier)) ;) })) (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (param_1 < 1) {\n        uVar2 = 1;\n      }" if (parenthesized_expression "(param_1 < 1)" ( (binary_expression "param_1 < 1" identifier < number_literal) )) (compound_statement "{\n        uVar2 = 1;\n      }" { (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) })) (expression_statement "uVar2 = FUN_000f830c(iVar1,uVar2);" (assignment_expression "uVar2 = FUN_000f830c(iVar1,uVar2)" identifier = (call_expression "FUN_000f830c(iVar1,uVar2)" identifier (argument_list "(iVar1,uVar2)" ( identifier , identifier )))) ;) }))) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "int rl_history_substr_search_backward(int count,int ignore)\n\n{\n  int iVar1;\n  int dir;\n  \n  if (count == 0) {\n    iVar1 = 0;\n  }\n  else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      rl_history_search_reinit(0);\n    }\n    if (*(int *)(PTR_pidstat_table_3077__0015656c + -0x418c) == 0) {\n      iVar1 = (*(code *)PTR_rl_get_previous_history_00157668)(count,ignore);\n    }\n    else {\n      iVar1 = count;\n      if (count < 0) {\n        iVar1 = -count;\n      }\n      dir = -1;\n      if (count < 1) {\n        dir = 1;\n      }\n      iVar1 = rl_history_search_internal(iVar1,dir);\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int rl_history_substr_search_backward(int count,int ignore)\n\n{\n  int iVar1;\n  int dir;\n  \n  if (count == 0) {\n    iVar1 = 0;\n  }\n  else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      rl_history_search_reinit(0);\n    }\n    if (*(int *)(PTR_pidstat_table_3077__0015656c + -0x418c) == 0) {\n      iVar1 = (*(code *)PTR_rl_get_previous_history_00157668)(count,ignore);\n    }\n    else {\n      iVar1 = count;\n      if (count < 0) {\n        iVar1 = -count;\n      }\n      dir = -1;\n      if (count < 1) {\n        dir = 1;\n      }\n      iVar1 = rl_history_search_internal(iVar1,dir);\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "rl_history_substr_search_backward(int count,int ignore)" identifier (parameter_list "(int count,int ignore)" ( (parameter_declaration "int count" primitive_type identifier) , (parameter_declaration "int ignore" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int dir;\n  \n  if (count == 0) {\n    iVar1 = 0;\n  }\n  else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      rl_history_search_reinit(0);\n    }\n    if (*(int *)(PTR_pidstat_table_3077__0015656c + -0x418c) == 0) {\n      iVar1 = (*(code *)PTR_rl_get_previous_history_00157668)(count,ignore);\n    }\n    else {\n      iVar1 = count;\n      if (count < 0) {\n        iVar1 = -count;\n      }\n      dir = -1;\n      if (count < 1) {\n        dir = 1;\n      }\n      iVar1 = rl_history_search_internal(iVar1,dir);\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int dir;" primitive_type identifier ;) (if_statement "if (count == 0) {\n    iVar1 = 0;\n  }\n  else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      rl_history_search_reinit(0);\n    }\n    if (*(int *)(PTR_pidstat_table_3077__0015656c + -0x418c) == 0) {\n      iVar1 = (*(code *)PTR_rl_get_previous_history_00157668)(count,ignore);\n    }\n    else {\n      iVar1 = count;\n      if (count < 0) {\n        iVar1 = -count;\n      }\n      dir = -1;\n      if (count < 1) {\n        dir = 1;\n      }\n      iVar1 = rl_history_search_internal(iVar1,dir);\n    }\n  }" if (parenthesized_expression "(count == 0)" ( (binary_expression "count == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = 0;\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      rl_history_search_reinit(0);\n    }\n    if (*(int *)(PTR_pidstat_table_3077__0015656c + -0x418c) == 0) {\n      iVar1 = (*(code *)PTR_rl_get_previous_history_00157668)(count,ignore);\n    }\n    else {\n      iVar1 = count;\n      if (count < 0) {\n        iVar1 = -count;\n      }\n      dir = -1;\n      if (count < 1) {\n        dir = 1;\n      }\n      iVar1 = rl_history_search_internal(iVar1,dir);\n    }\n  }" else (compound_statement "{\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      rl_history_search_reinit(0);\n    }\n    if (*(int *)(PTR_pidstat_table_3077__0015656c + -0x418c) == 0) {\n      iVar1 = (*(code *)PTR_rl_get_previous_history_00157668)(count,ignore);\n    }\n    else {\n      iVar1 = count;\n      if (count < 0) {\n        iVar1 = -count;\n      }\n      dir = -1;\n      if (count < 1) {\n        dir = 1;\n      }\n      iVar1 = rl_history_search_internal(iVar1,dir);\n    }\n  }" { (if_statement "if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      rl_history_search_reinit(0);\n    }" if (parenthesized_expression "((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24))" ( (binary_expression "(*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)" (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)" ( (binary_expression "*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20" (pointer_expression "*(undefined **)PTR_rl_last_func_00157638" * (cast_expression "(undefined **)PTR_rl_last_func_00157638" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) != identifier) )) && (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)" ( (binary_expression "*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24" (pointer_expression "*(undefined **)PTR_rl_last_func_00157638" * (cast_expression "(undefined **)PTR_rl_last_func_00157638" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) != identifier) ))) )) (compound_statement "{\n      rl_history_search_reinit(0);\n    }" { (expression_statement "rl_history_search_reinit(0);" (call_expression "rl_history_search_reinit(0)" identifier (argument_list "(0)" ( number_literal ))) ;) })) (if_statement "if (*(int *)(PTR_pidstat_table_3077__0015656c + -0x418c) == 0) {\n      iVar1 = (*(code *)PTR_rl_get_previous_history_00157668)(count,ignore);\n    }\n    else {\n      iVar1 = count;\n      if (count < 0) {\n        iVar1 = -count;\n      }\n      dir = -1;\n      if (count < 1) {\n        dir = 1;\n      }\n      iVar1 = rl_history_search_internal(iVar1,dir);\n    }" if (parenthesized_expression "(*(int *)(PTR_pidstat_table_3077__0015656c + -0x418c) == 0)" ( (binary_expression "*(int *)(PTR_pidstat_table_3077__0015656c + -0x418c) == 0" (pointer_expression "*(int *)(PTR_pidstat_table_3077__0015656c + -0x418c)" * (cast_expression "(int *)(PTR_pidstat_table_3077__0015656c + -0x418c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_pidstat_table_3077__0015656c + -0x418c)" ( (binary_expression "PTR_pidstat_table_3077__0015656c + -0x418c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      iVar1 = (*(code *)PTR_rl_get_previous_history_00157668)(count,ignore);\n    }" { (expression_statement "iVar1 = (*(code *)PTR_rl_get_previous_history_00157668)(count,ignore);" (assignment_expression "iVar1 = (*(code *)PTR_rl_get_previous_history_00157668)(count,ignore)" identifier = (call_expression "(*(code *)PTR_rl_get_previous_history_00157668)(count,ignore)" (parenthesized_expression "(*(code *)PTR_rl_get_previous_history_00157668)" ( (pointer_expression "*(code *)PTR_rl_get_previous_history_00157668" * (cast_expression "(code *)PTR_rl_get_previous_history_00157668" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(count,ignore)" ( identifier , identifier )))) ;) }) (else_clause "else {\n      iVar1 = count;\n      if (count < 0) {\n        iVar1 = -count;\n      }\n      dir = -1;\n      if (count < 1) {\n        dir = 1;\n      }\n      iVar1 = rl_history_search_internal(iVar1,dir);\n    }" else (compound_statement "{\n      iVar1 = count;\n      if (count < 0) {\n        iVar1 = -count;\n      }\n      dir = -1;\n      if (count < 1) {\n        dir = 1;\n      }\n      iVar1 = rl_history_search_internal(iVar1,dir);\n    }" { (expression_statement "iVar1 = count;" (assignment_expression "iVar1 = count" identifier = identifier) ;) (if_statement "if (count < 0) {\n        iVar1 = -count;\n      }" if (parenthesized_expression "(count < 0)" ( (binary_expression "count < 0" identifier < number_literal) )) (compound_statement "{\n        iVar1 = -count;\n      }" { (expression_statement "iVar1 = -count;" (assignment_expression "iVar1 = -count" identifier = (unary_expression "-count" - identifier)) ;) })) (expression_statement "dir = -1;" (assignment_expression "dir = -1" identifier = number_literal) ;) (if_statement "if (count < 1) {\n        dir = 1;\n      }" if (parenthesized_expression "(count < 1)" ( (binary_expression "count < 1" identifier < number_literal) )) (compound_statement "{\n        dir = 1;\n      }" { (expression_statement "dir = 1;" (assignment_expression "dir = 1" identifier = number_literal) ;) })) (expression_statement "iVar1 = rl_history_search_internal(iVar1,dir);" (assignment_expression "iVar1 = rl_history_search_internal(iVar1,dir)" identifier = (call_expression "rl_history_search_internal(iVar1,dir)" identifier (argument_list "(iVar1,dir)" ( identifier , identifier )))) ;) }))) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined4 rl_history_substr_search_backward(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4 rl_history_substr_search_backward(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }\n  return uVar2;\n}" type_identifier (function_declarator "rl_history_substr_search_backward(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar2 = 0;\n  }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }" else (compound_statement "{\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }" { (if_statement "if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }" if (parenthesized_expression "((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24))" ( (binary_expression "(*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)" (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)" ( (binary_expression "*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20" (pointer_expression "*(undefined **)PTR_rl_last_func_00157638" * (cast_expression "(undefined **)PTR_rl_last_func_00157638" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) != identifier) )) && (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)" ( (binary_expression "*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24" (pointer_expression "*(undefined **)PTR_rl_last_func_00157638" * (cast_expression "(undefined **)PTR_rl_last_func_00157638" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) != identifier) ))) )) (compound_statement "{\n      FUN_000f81f4(0);\n    }" { (expression_statement "FUN_000f81f4(0);" (call_expression "FUN_000f81f4(0)" identifier (argument_list "(0)" ( number_literal ))) ;) })) (if_statement "if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }" if (parenthesized_expression "(*(int *)(PTR_DAT_0015656c + -0x418c) == 0)" ( (binary_expression "*(int *)(PTR_DAT_0015656c + -0x418c) == 0" (pointer_expression "*(int *)(PTR_DAT_0015656c + -0x418c)" * (cast_expression "(int *)(PTR_DAT_0015656c + -0x418c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0015656c + -0x418c)" ( (binary_expression "PTR_DAT_0015656c + -0x418c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }" { (expression_statement "uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);" (assignment_expression "uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2)" identifier = (call_expression "(*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2)" (parenthesized_expression "(*(code *)PTR_rl_get_previous_history_00157668)" ( (pointer_expression "*(code *)PTR_rl_get_previous_history_00157668" * (cast_expression "(code *)PTR_rl_get_previous_history_00157668" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) }) (else_clause "else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }" else (compound_statement "{\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }" { (expression_statement "iVar1 = param_1;" (assignment_expression "iVar1 = param_1" identifier = identifier) ;) (if_statement "if (param_1 < 0) {\n        iVar1 = -param_1;\n      }" if (parenthesized_expression "(param_1 < 0)" ( (binary_expression "param_1 < 0" identifier < number_literal) )) (compound_statement "{\n        iVar1 = -param_1;\n      }" { (expression_statement "iVar1 = -param_1;" (assignment_expression "iVar1 = -param_1" identifier = (unary_expression "-param_1" - identifier)) ;) })) (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (param_1 < 1) {\n        uVar2 = 1;\n      }" if (parenthesized_expression "(param_1 < 1)" ( (binary_expression "param_1 < 1" identifier < number_literal) )) (compound_statement "{\n        uVar2 = 1;\n      }" { (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) })) (expression_statement "uVar2 = FUN_000f830c(iVar1,uVar2);" (assignment_expression "uVar2 = FUN_000f830c(iVar1,uVar2)" identifier = (call_expression "FUN_000f830c(iVar1,uVar2)" identifier (argument_list "(iVar1,uVar2)" ( identifier , identifier )))) ;) }))) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT)) != IDENT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT)) != IDENT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (unary_expression - IDENT)) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) }))) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 rl_history_substr_search_backward(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }\n  return uVar2;\n}" (type_identifier "undefined4") (function_declarator "rl_history_substr_search_backward(int param_1,undefined4 param_2)" (identifier "rl_history_substr_search_backward") (parameter_list "(int param_1,undefined4 param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (if_statement "if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = 0;\n  }" ({ "{") (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }" (else "else") (compound_statement "{\n    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }\n    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }\n  }" ({ "{") (if_statement "if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)) {\n      FUN_000f81f4(0);\n    }" (if "if") (parenthesized_expression "((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24))" (( "(") (binary_expression "(*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)\n       && (*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)" (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)" (( "(") (binary_expression "*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20" (pointer_expression "*(undefined **)PTR_rl_last_func_00157638" (* "*") (cast_expression "(undefined **)PTR_rl_last_func_00157638" (( "(") (type_descriptor "undefined **" (type_identifier "undefined") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR_rl_last_func_00157638"))) (!= "!=") (identifier "PTR_rl_history_substr_search_forward_00157f20")) () ")")) (&& "&&") (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24)" (( "(") (binary_expression "*(undefined **)PTR_rl_last_func_00157638 !=\n           PTR_rl_history_substr_search_backward_00157f24" (pointer_expression "*(undefined **)PTR_rl_last_func_00157638" (* "*") (cast_expression "(undefined **)PTR_rl_last_func_00157638" (( "(") (type_descriptor "undefined **" (type_identifier "undefined") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR_rl_last_func_00157638"))) (!= "!=") (identifier "PTR_rl_history_substr_search_backward_00157f24")) () ")"))) () ")")) (compound_statement "{\n      FUN_000f81f4(0);\n    }" ({ "{") (expression_statement "FUN_000f81f4(0);" (call_expression "FUN_000f81f4(0)" (identifier "FUN_000f81f4") (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (} "}"))) (if_statement "if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }\n    else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }" (if "if") (parenthesized_expression "(*(int *)(PTR_DAT_0015656c + -0x418c) == 0)" (( "(") (binary_expression "*(int *)(PTR_DAT_0015656c + -0x418c) == 0" (pointer_expression "*(int *)(PTR_DAT_0015656c + -0x418c)" (* "*") (cast_expression "(int *)(PTR_DAT_0015656c + -0x418c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_0015656c + -0x418c)" (( "(") (binary_expression "PTR_DAT_0015656c + -0x418c" (identifier "PTR_DAT_0015656c") (+ "+") (number_literal "-0x418c")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);\n    }" ({ "{") (expression_statement "uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);" (assignment_expression "uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2)" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2)" (parenthesized_expression "(*(code *)PTR_rl_get_previous_history_00157668)" (( "(") (pointer_expression "*(code *)PTR_rl_get_previous_history_00157668" (* "*") (cast_expression "(code *)PTR_rl_get_previous_history_00157668" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_rl_get_previous_history_00157668"))) () ")")) (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (} "}")) (else_clause "else {\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }" (else "else") (compound_statement "{\n      iVar1 = param_1;\n      if (param_1 < 0) {\n        iVar1 = -param_1;\n      }\n      uVar2 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar2 = 1;\n      }\n      uVar2 = FUN_000f830c(iVar1,uVar2);\n    }" ({ "{") (expression_statement "iVar1 = param_1;" (assignment_expression "iVar1 = param_1" (identifier "iVar1") (= "=") (identifier "param_1")) (; ";")) (if_statement "if (param_1 < 0) {\n        iVar1 = -param_1;\n      }" (if "if") (parenthesized_expression "(param_1 < 0)" (( "(") (binary_expression "param_1 < 0" (identifier "param_1") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        iVar1 = -param_1;\n      }" ({ "{") (expression_statement "iVar1 = -param_1;" (assignment_expression "iVar1 = -param_1" (identifier "iVar1") (= "=") (unary_expression "-param_1" (- "-") (identifier "param_1"))) (; ";")) (} "}"))) (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" (identifier "uVar2") (= "=") (number_literal "0xffffffff")) (; ";")) (if_statement "if (param_1 < 1) {\n        uVar2 = 1;\n      }" (if "if") (parenthesized_expression "(param_1 < 1)" (( "(") (binary_expression "param_1 < 1" (identifier "param_1") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n        uVar2 = 1;\n      }" ({ "{") (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" (identifier "uVar2") (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "uVar2 = FUN_000f830c(iVar1,uVar2);" (assignment_expression "uVar2 = FUN_000f830c(iVar1,uVar2)" (identifier "uVar2") (= "=") (call_expression "FUN_000f830c(iVar1,uVar2)" (identifier "FUN_000f830c") (argument_list "(iVar1,uVar2)" (( "(") (identifier "iVar1") (, ",") (identifier "uVar2") () ")")))) (; ";")) (} "}")))) (} "}")))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (identifier))) right: (identifier))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (identifier))) right: (identifier))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (identifier)))))) alternative: (else_clause (compound_statement (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 (assignment_expression left: (identifier) right: (unary_expression argument: (identifier)))))) (expression_statement (assignment_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: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))))))))) (return_statement (identifier)))))

undefined4 MASKED(int param_1,undefined4 param_2)

{
  int iVar1;
  undefined4 uVar2;
  
  if (param_1 == 0) {
    uVar2 = 0;
  }
  else {
    if ((*(undefined **)PTR_rl_last_func_00157638 != PTR_rl_history_substr_search_forward_00157f20)
       && (*(undefined **)PTR_rl_last_func_00157638 !=
           PTR_MASKED_00157f24)) {
      FUN_000f81f4(0);
    }
    if (*(int *)(PTR_DAT_0015656c + -0x418c) == 0) {
      uVar2 = (*(code *)PTR_rl_get_previous_history_00157668)(param_1,param_2);
    }
    else {
      iVar1 = param_1;
      if (param_1 < 0) {
        iVar1 = -param_1;
      }
      uVar2 = 0xffffffff;
      if (param_1 < 1) {
        uVar2 = 1;
      }
      uVar2 = FUN_000f830c(iVar1,uVar2);
    }
  }
  return uVar2;
}

