
int rl_history_substr_search_backward(int count,int ignore)

{
  int iVar1;
  
  if (count == 0) {
    return 0;
  }
  if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&
     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {
    rl_history_search_reinit(0);
  }
  if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {
    if (-1 < count) {
      iVar1 = -1;
      if (count < 1) {
        iVar1 = 1;
      }
      iVar1 = rl_history_search_internal(count,iVar1);
      return iVar1;
    }
    iVar1 = -1;
    if (count < 1) {
      iVar1 = 1;
    }
    iVar1 = rl_history_search_internal(-count,iVar1);
    return iVar1;
  }
                    /* WARNING: Could not recover jumptable at 0x000e90ec. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  iVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(count,ignore);
  return iVar1;
}



undefined4 rl_history_substr_search_backward(int param_1,undefined4 param_2)

{
  undefined4 uVar1;
  
  if (param_1 == 0) {
    return 0;
  }
  if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&
     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {
    FUN_000e8298(0);
  }
  if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {
    if (-1 < param_1) {
      uVar1 = 0xffffffff;
      if (param_1 < 1) {
        uVar1 = 1;
      }
      uVar1 = FUN_000e8b9c(param_1,uVar1);
      return uVar1;
    }
    uVar1 = 0xffffffff;
    if (param_1 < 1) {
      uVar1 = 1;
    }
    uVar1 = FUN_000e8b9c(-param_1,uVar1);
    return uVar1;
  }
                    /* WARNING: Could not recover jumptable at 0x000e90ec. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2);
  return uVar1;
}


lui gp,0x6
addiu gp,gp,0x3540
addu gp,gp,t9
beq a0,zero,0x000e90d0
_nop
lw v0,-0x6fa8(gp)
addiu sp,sp,-0x28
lw v1,-0x66b8(gp)
sw gp,0x10(sp)
sw s1,0x20(sp)
or s1,a1,zero
sw s0,0x1c(sp)
sw ra,0x24(sp)
lw v0,0x0(v0)
beq v0,v1,0x000e905c
_or s0,a0,zero
lw v1,-0x66b4(gp)
beq v0,v1,0x000e905c
_lw t9,-0x6704(gp)
addiu t9,t9,-0x7d68
bal 0x000e8298
_or a0,zero,zero
lw gp,0x10(sp)
lw v0,-0x73ec(gp)
lw v0,-0x623c(v0)
beq v0,zero,0x000e90d8
_lw ra,0x24(sp)
bltz s0,0x000e90a0
_or a0,s0,zero
li a1,-0x1
lw t9,-0x6704(gp)
li v0,0x1
lw ra,0x24(sp)
slt s0,zero,s0
lw s1,0x20(sp)
movz a1,v0,s0
addiu t9,t9,-0x7464
lw s0,0x1c(sp)
b 0x000e8b9c
_addiu sp,sp,0x28
li a1,-0x1
lw t9,-0x6704(gp)
li v0,0x1
lw ra,0x24(sp)
subu a0,zero,s0
lw s1,0x20(sp)
slt s0,zero,s0
movz a1,v0,s0
addiu t9,t9,-0x7464
lw s0,0x1c(sp)
b 0x000e8b9c
_addiu sp,sp,0x28
jr ra
_or v0,zero,zero
or a1,s1,zero
or a0,s0,zero
lw s1,0x20(sp)
lw s0,0x1c(sp)
lw t9,-0x6f68(gp)
jr t9
_addiu sp,sp,0x28
(translation_unit "undefined4 rl_history_substr_search_backward(int param_1,undefined4 param_2)\n\n{\n  undefined4 uVar1;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {\n    FUN_000e8298(0);\n  }\n  if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {\n    if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }\n    uVar1 = 0xffffffff;\n    if (param_1 < 1) {\n      uVar1 = 1;\n    }\n    uVar1 = FUN_000e8b9c(-param_1,uVar1);\n    return uVar1;\n  }\n                    /* WARNING: Could not recover jumptable at 0x000e90ec. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2);\n  return uVar1;\n}\n\n" (function_definition "undefined4 rl_history_substr_search_backward(int param_1,undefined4 param_2)\n\n{\n  undefined4 uVar1;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {\n    FUN_000e8298(0);\n  }\n  if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {\n    if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }\n    uVar1 = 0xffffffff;\n    if (param_1 < 1) {\n      uVar1 = 1;\n    }\n    uVar1 = FUN_000e8b9c(-param_1,uVar1);\n    return uVar1;\n  }\n                    /* WARNING: Could not recover jumptable at 0x000e90ec. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2);\n  return uVar1;\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  undefined4 uVar1;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {\n    FUN_000e8298(0);\n  }\n  if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {\n    if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }\n    uVar1 = 0xffffffff;\n    if (param_1 < 1) {\n      uVar1 = 1;\n    }\n    uVar1 = FUN_000e8b9c(-param_1,uVar1);\n    return uVar1;\n  }\n                    /* WARNING: Could not recover jumptable at 0x000e90ec. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2);\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {\n    FUN_000e8298(0);\n  }" if (parenthesized_expression "((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c))" ( (binary_expression "(*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)" (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88)" ( (binary_expression "*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88" (pointer_expression "*(undefined **)PTR_rl_last_func_00145598" * (cast_expression "(undefined **)PTR_rl_last_func_00145598" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) != identifier) )) && (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)" ( (binary_expression "*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c" (pointer_expression "*(undefined **)PTR_rl_last_func_00145598" * (cast_expression "(undefined **)PTR_rl_last_func_00145598" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) != identifier) ))) )) (compound_statement "{\n    FUN_000e8298(0);\n  }" { (expression_statement "FUN_000e8298(0);" (call_expression "FUN_000e8298(0)" identifier (argument_list "(0)" ( number_literal ))) ;) })) (if_statement "if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {\n    if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }\n    uVar1 = 0xffffffff;\n    if (param_1 < 1) {\n      uVar1 = 1;\n    }\n    uVar1 = FUN_000e8b9c(-param_1,uVar1);\n    return uVar1;\n  }" if (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x623c) != 0)" ( (binary_expression "*(int *)(PTR___environ_00145154 + -0x623c) != 0" (pointer_expression "*(int *)(PTR___environ_00145154 + -0x623c)" * (cast_expression "(int *)(PTR___environ_00145154 + -0x623c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR___environ_00145154 + -0x623c)" ( (binary_expression "PTR___environ_00145154 + -0x623c" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }\n    uVar1 = 0xffffffff;\n    if (param_1 < 1) {\n      uVar1 = 1;\n    }\n    uVar1 = FUN_000e8b9c(-param_1,uVar1);\n    return uVar1;\n  }" { (if_statement "if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }" if (parenthesized_expression "(-1 < param_1)" ( (binary_expression "-1 < param_1" number_literal < identifier) )) (compound_statement "{\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }" { (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (param_1 < 1) {\n        uVar1 = 1;\n      }" if (parenthesized_expression "(param_1 < 1)" ( (binary_expression "param_1 < 1" identifier < number_literal) )) (compound_statement "{\n        uVar1 = 1;\n      }" { (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" identifier = number_literal) ;) })) (expression_statement "uVar1 = FUN_000e8b9c(param_1,uVar1);" (assignment_expression "uVar1 = FUN_000e8b9c(param_1,uVar1)" identifier = (call_expression "FUN_000e8b9c(param_1,uVar1)" identifier (argument_list "(param_1,uVar1)" ( identifier , identifier )))) ;) (return_statement "return uVar1;" return identifier ;) })) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (param_1 < 1) {\n      uVar1 = 1;\n    }" if (parenthesized_expression "(param_1 < 1)" ( (binary_expression "param_1 < 1" identifier < number_literal) )) (compound_statement "{\n      uVar1 = 1;\n    }" { (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" identifier = number_literal) ;) })) (expression_statement "uVar1 = FUN_000e8b9c(-param_1,uVar1);" (assignment_expression "uVar1 = FUN_000e8b9c(-param_1,uVar1)" identifier = (call_expression "FUN_000e8b9c(-param_1,uVar1)" identifier (argument_list "(-param_1,uVar1)" ( (unary_expression "-param_1" - identifier) , identifier )))) ;) (return_statement "return uVar1;" return identifier ;) })) comment comment (expression_statement "uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2);" (assignment_expression "uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2)" identifier = (call_expression "(*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2)" (parenthesized_expression "(*(code *)PTR_rl_get_previous_history_001455d8)" ( (pointer_expression "*(code *)PTR_rl_get_previous_history_001455d8" * (cast_expression "(code *)PTR_rl_get_previous_history_001455d8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "int rl_history_substr_search_backward(int count,int ignore)\n\n{\n  int iVar1;\n  \n  if (count == 0) {\n    return 0;\n  }\n  if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {\n    rl_history_search_reinit(0);\n  }\n  if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {\n    if (-1 < count) {\n      iVar1 = -1;\n      if (count < 1) {\n        iVar1 = 1;\n      }\n      iVar1 = rl_history_search_internal(count,iVar1);\n      return iVar1;\n    }\n    iVar1 = -1;\n    if (count < 1) {\n      iVar1 = 1;\n    }\n    iVar1 = rl_history_search_internal(-count,iVar1);\n    return iVar1;\n  }\n                    /* WARNING: Could not recover jumptable at 0x000e90ec. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  iVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(count,ignore);\n  return iVar1;\n}\n\n" (function_definition "int rl_history_substr_search_backward(int count,int ignore)\n\n{\n  int iVar1;\n  \n  if (count == 0) {\n    return 0;\n  }\n  if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {\n    rl_history_search_reinit(0);\n  }\n  if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {\n    if (-1 < count) {\n      iVar1 = -1;\n      if (count < 1) {\n        iVar1 = 1;\n      }\n      iVar1 = rl_history_search_internal(count,iVar1);\n      return iVar1;\n    }\n    iVar1 = -1;\n    if (count < 1) {\n      iVar1 = 1;\n    }\n    iVar1 = rl_history_search_internal(-count,iVar1);\n    return iVar1;\n  }\n                    /* WARNING: Could not recover jumptable at 0x000e90ec. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  iVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(count,ignore);\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  \n  if (count == 0) {\n    return 0;\n  }\n  if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {\n    rl_history_search_reinit(0);\n  }\n  if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {\n    if (-1 < count) {\n      iVar1 = -1;\n      if (count < 1) {\n        iVar1 = 1;\n      }\n      iVar1 = rl_history_search_internal(count,iVar1);\n      return iVar1;\n    }\n    iVar1 = -1;\n    if (count < 1) {\n      iVar1 = 1;\n    }\n    iVar1 = rl_history_search_internal(-count,iVar1);\n    return iVar1;\n  }\n                    /* WARNING: Could not recover jumptable at 0x000e90ec. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  iVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(count,ignore);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (count == 0) {\n    return 0;\n  }" if (parenthesized_expression "(count == 0)" ( (binary_expression "count == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {\n    rl_history_search_reinit(0);\n  }" if (parenthesized_expression "((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c))" ( (binary_expression "(*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)" (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88)" ( (binary_expression "*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88" (pointer_expression "*(undefined **)PTR_rl_last_func_00145598" * (cast_expression "(undefined **)PTR_rl_last_func_00145598" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) != identifier) )) && (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)" ( (binary_expression "*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c" (pointer_expression "*(undefined **)PTR_rl_last_func_00145598" * (cast_expression "(undefined **)PTR_rl_last_func_00145598" ( (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___environ_00145154 + -0x623c) != 0) {\n    if (-1 < count) {\n      iVar1 = -1;\n      if (count < 1) {\n        iVar1 = 1;\n      }\n      iVar1 = rl_history_search_internal(count,iVar1);\n      return iVar1;\n    }\n    iVar1 = -1;\n    if (count < 1) {\n      iVar1 = 1;\n    }\n    iVar1 = rl_history_search_internal(-count,iVar1);\n    return iVar1;\n  }" if (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x623c) != 0)" ( (binary_expression "*(int *)(PTR___environ_00145154 + -0x623c) != 0" (pointer_expression "*(int *)(PTR___environ_00145154 + -0x623c)" * (cast_expression "(int *)(PTR___environ_00145154 + -0x623c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR___environ_00145154 + -0x623c)" ( (binary_expression "PTR___environ_00145154 + -0x623c" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    if (-1 < count) {\n      iVar1 = -1;\n      if (count < 1) {\n        iVar1 = 1;\n      }\n      iVar1 = rl_history_search_internal(count,iVar1);\n      return iVar1;\n    }\n    iVar1 = -1;\n    if (count < 1) {\n      iVar1 = 1;\n    }\n    iVar1 = rl_history_search_internal(-count,iVar1);\n    return iVar1;\n  }" { (if_statement "if (-1 < count) {\n      iVar1 = -1;\n      if (count < 1) {\n        iVar1 = 1;\n      }\n      iVar1 = rl_history_search_internal(count,iVar1);\n      return iVar1;\n    }" if (parenthesized_expression "(-1 < count)" ( (binary_expression "-1 < count" number_literal < identifier) )) (compound_statement "{\n      iVar1 = -1;\n      if (count < 1) {\n        iVar1 = 1;\n      }\n      iVar1 = rl_history_search_internal(count,iVar1);\n      return iVar1;\n    }" { (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) (if_statement "if (count < 1) {\n        iVar1 = 1;\n      }" if (parenthesized_expression "(count < 1)" ( (binary_expression "count < 1" identifier < number_literal) )) (compound_statement "{\n        iVar1 = 1;\n      }" { (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) })) (expression_statement "iVar1 = rl_history_search_internal(count,iVar1);" (assignment_expression "iVar1 = rl_history_search_internal(count,iVar1)" identifier = (call_expression "rl_history_search_internal(count,iVar1)" identifier (argument_list "(count,iVar1)" ( identifier , identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) (if_statement "if (count < 1) {\n      iVar1 = 1;\n    }" if (parenthesized_expression "(count < 1)" ( (binary_expression "count < 1" identifier < number_literal) )) (compound_statement "{\n      iVar1 = 1;\n    }" { (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) })) (expression_statement "iVar1 = rl_history_search_internal(-count,iVar1);" (assignment_expression "iVar1 = rl_history_search_internal(-count,iVar1)" identifier = (call_expression "rl_history_search_internal(-count,iVar1)" identifier (argument_list "(-count,iVar1)" ( (unary_expression "-count" - identifier) , identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })) comment comment (expression_statement "iVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(count,ignore);" (assignment_expression "iVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(count,ignore)" identifier = (call_expression "(*(code *)PTR_rl_get_previous_history_001455d8)(count,ignore)" (parenthesized_expression "(*(code *)PTR_rl_get_previous_history_001455d8)" ( (pointer_expression "*(code *)PTR_rl_get_previous_history_001455d8" * (cast_expression "(code *)PTR_rl_get_previous_history_001455d8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(count,ignore)" ( 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  undefined4 uVar1;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {\n    FUN_000e8298(0);\n  }\n  if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {\n    if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }\n    uVar1 = 0xffffffff;\n    if (param_1 < 1) {\n      uVar1 = 1;\n    }\n    uVar1 = FUN_000e8b9c(-param_1,uVar1);\n    return uVar1;\n  }\n                    \n                    \n  uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2);\n  return uVar1;\n}\n\n" (function_definition "undefined4 rl_history_substr_search_backward(int param_1,undefined4 param_2)\n\n{\n  undefined4 uVar1;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {\n    FUN_000e8298(0);\n  }\n  if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {\n    if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }\n    uVar1 = 0xffffffff;\n    if (param_1 < 1) {\n      uVar1 = 1;\n    }\n    uVar1 = FUN_000e8b9c(-param_1,uVar1);\n    return uVar1;\n  }\n                    \n                    \n  uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2);\n  return uVar1;\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  undefined4 uVar1;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {\n    FUN_000e8298(0);\n  }\n  if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {\n    if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }\n    uVar1 = 0xffffffff;\n    if (param_1 < 1) {\n      uVar1 = 1;\n    }\n    uVar1 = FUN_000e8b9c(-param_1,uVar1);\n    return uVar1;\n  }\n                    \n                    \n  uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2);\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {\n    FUN_000e8298(0);\n  }" if (parenthesized_expression "((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c))" ( (binary_expression "(*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)" (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88)" ( (binary_expression "*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88" (pointer_expression "*(undefined **)PTR_rl_last_func_00145598" * (cast_expression "(undefined **)PTR_rl_last_func_00145598" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) != identifier) )) && (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)" ( (binary_expression "*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c" (pointer_expression "*(undefined **)PTR_rl_last_func_00145598" * (cast_expression "(undefined **)PTR_rl_last_func_00145598" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) != identifier) ))) )) (compound_statement "{\n    FUN_000e8298(0);\n  }" { (expression_statement "FUN_000e8298(0);" (call_expression "FUN_000e8298(0)" identifier (argument_list "(0)" ( number_literal ))) ;) })) (if_statement "if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {\n    if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }\n    uVar1 = 0xffffffff;\n    if (param_1 < 1) {\n      uVar1 = 1;\n    }\n    uVar1 = FUN_000e8b9c(-param_1,uVar1);\n    return uVar1;\n  }" if (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x623c) != 0)" ( (binary_expression "*(int *)(PTR___environ_00145154 + -0x623c) != 0" (pointer_expression "*(int *)(PTR___environ_00145154 + -0x623c)" * (cast_expression "(int *)(PTR___environ_00145154 + -0x623c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR___environ_00145154 + -0x623c)" ( (binary_expression "PTR___environ_00145154 + -0x623c" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }\n    uVar1 = 0xffffffff;\n    if (param_1 < 1) {\n      uVar1 = 1;\n    }\n    uVar1 = FUN_000e8b9c(-param_1,uVar1);\n    return uVar1;\n  }" { (if_statement "if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }" if (parenthesized_expression "(-1 < param_1)" ( (binary_expression "-1 < param_1" number_literal < identifier) )) (compound_statement "{\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }" { (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (param_1 < 1) {\n        uVar1 = 1;\n      }" if (parenthesized_expression "(param_1 < 1)" ( (binary_expression "param_1 < 1" identifier < number_literal) )) (compound_statement "{\n        uVar1 = 1;\n      }" { (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" identifier = number_literal) ;) })) (expression_statement "uVar1 = FUN_000e8b9c(param_1,uVar1);" (assignment_expression "uVar1 = FUN_000e8b9c(param_1,uVar1)" identifier = (call_expression "FUN_000e8b9c(param_1,uVar1)" identifier (argument_list "(param_1,uVar1)" ( identifier , identifier )))) ;) (return_statement "return uVar1;" return identifier ;) })) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (param_1 < 1) {\n      uVar1 = 1;\n    }" if (parenthesized_expression "(param_1 < 1)" ( (binary_expression "param_1 < 1" identifier < number_literal) )) (compound_statement "{\n      uVar1 = 1;\n    }" { (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" identifier = number_literal) ;) })) (expression_statement "uVar1 = FUN_000e8b9c(-param_1,uVar1);" (assignment_expression "uVar1 = FUN_000e8b9c(-param_1,uVar1)" identifier = (call_expression "FUN_000e8b9c(-param_1,uVar1)" identifier (argument_list "(-param_1,uVar1)" ( (unary_expression "-param_1" - identifier) , identifier )))) ;) (return_statement "return uVar1;" return identifier ;) })) (expression_statement "uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2);" (assignment_expression "uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2)" identifier = (call_expression "(*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2)" (parenthesized_expression "(*(code *)PTR_rl_get_previous_history_001455d8)" ( (pointer_expression "*(code *)PTR_rl_get_previous_history_001455d8" * (cast_expression "(code *)PTR_rl_get_previous_history_001455d8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (return_statement "return uVar1;" 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 ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (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 { (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (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 ;) })) (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 ( (unary_expression - IDENT) , IDENT )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) 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  undefined4 uVar1;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {\n    FUN_000e8298(0);\n  }\n  if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {\n    if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }\n    uVar1 = 0xffffffff;\n    if (param_1 < 1) {\n      uVar1 = 1;\n    }\n    uVar1 = FUN_000e8b9c(-param_1,uVar1);\n    return uVar1;\n  }\n                    \n                    \n  uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2);\n  return uVar1;\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  undefined4 uVar1;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {\n    FUN_000e8298(0);\n  }\n  if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {\n    if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }\n    uVar1 = 0xffffffff;\n    if (param_1 < 1) {\n      uVar1 = 1;\n    }\n    uVar1 = FUN_000e8b9c(-param_1,uVar1);\n    return uVar1;\n  }\n                    \n                    \n  uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2);\n  return uVar1;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (if_statement "if (param_1 == 0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)) {\n    FUN_000e8298(0);\n  }" (if "if") (parenthesized_expression "((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c))" (( "(") (binary_expression "(*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&\n     (*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)" (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88)" (( "(") (binary_expression "*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88" (pointer_expression "*(undefined **)PTR_rl_last_func_00145598" (* "*") (cast_expression "(undefined **)PTR_rl_last_func_00145598" (( "(") (type_descriptor "undefined **" (type_identifier "undefined") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR_rl_last_func_00145598"))) (!= "!=") (identifier "PTR_rl_history_substr_search_forward_00145e88")) () ")")) (&& "&&") (parenthesized_expression "(*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c)" (( "(") (binary_expression "*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_backward_00145e8c" (pointer_expression "*(undefined **)PTR_rl_last_func_00145598" (* "*") (cast_expression "(undefined **)PTR_rl_last_func_00145598" (( "(") (type_descriptor "undefined **" (type_identifier "undefined") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR_rl_last_func_00145598"))) (!= "!=") (identifier "PTR_rl_history_substr_search_backward_00145e8c")) () ")"))) () ")")) (compound_statement "{\n    FUN_000e8298(0);\n  }" ({ "{") (expression_statement "FUN_000e8298(0);" (call_expression "FUN_000e8298(0)" (identifier "FUN_000e8298") (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (} "}"))) (if_statement "if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {\n    if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }\n    uVar1 = 0xffffffff;\n    if (param_1 < 1) {\n      uVar1 = 1;\n    }\n    uVar1 = FUN_000e8b9c(-param_1,uVar1);\n    return uVar1;\n  }" (if "if") (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x623c) != 0)" (( "(") (binary_expression "*(int *)(PTR___environ_00145154 + -0x623c) != 0" (pointer_expression "*(int *)(PTR___environ_00145154 + -0x623c)" (* "*") (cast_expression "(int *)(PTR___environ_00145154 + -0x623c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR___environ_00145154 + -0x623c)" (( "(") (binary_expression "PTR___environ_00145154 + -0x623c" (identifier "PTR___environ_00145154") (+ "+") (number_literal "-0x623c")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }\n    uVar1 = 0xffffffff;\n    if (param_1 < 1) {\n      uVar1 = 1;\n    }\n    uVar1 = FUN_000e8b9c(-param_1,uVar1);\n    return uVar1;\n  }" ({ "{") (if_statement "if (-1 < param_1) {\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }" (if "if") (parenthesized_expression "(-1 < param_1)" (( "(") (binary_expression "-1 < param_1" (number_literal "-1") (< "<") (identifier "param_1")) () ")")) (compound_statement "{\n      uVar1 = 0xffffffff;\n      if (param_1 < 1) {\n        uVar1 = 1;\n      }\n      uVar1 = FUN_000e8b9c(param_1,uVar1);\n      return uVar1;\n    }" ({ "{") (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" (identifier "uVar1") (= "=") (number_literal "0xffffffff")) (; ";")) (if_statement "if (param_1 < 1) {\n        uVar1 = 1;\n      }" (if "if") (parenthesized_expression "(param_1 < 1)" (( "(") (binary_expression "param_1 < 1" (identifier "param_1") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n        uVar1 = 1;\n      }" ({ "{") (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" (identifier "uVar1") (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "uVar1 = FUN_000e8b9c(param_1,uVar1);" (assignment_expression "uVar1 = FUN_000e8b9c(param_1,uVar1)" (identifier "uVar1") (= "=") (call_expression "FUN_000e8b9c(param_1,uVar1)" (identifier "FUN_000e8b9c") (argument_list "(param_1,uVar1)" (( "(") (identifier "param_1") (, ",") (identifier "uVar1") () ")")))) (; ";")) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}"))) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" (identifier "uVar1") (= "=") (number_literal "0xffffffff")) (; ";")) (if_statement "if (param_1 < 1) {\n      uVar1 = 1;\n    }" (if "if") (parenthesized_expression "(param_1 < 1)" (( "(") (binary_expression "param_1 < 1" (identifier "param_1") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n      uVar1 = 1;\n    }" ({ "{") (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" (identifier "uVar1") (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "uVar1 = FUN_000e8b9c(-param_1,uVar1);" (assignment_expression "uVar1 = FUN_000e8b9c(-param_1,uVar1)" (identifier "uVar1") (= "=") (call_expression "FUN_000e8b9c(-param_1,uVar1)" (identifier "FUN_000e8b9c") (argument_list "(-param_1,uVar1)" (( "(") (unary_expression "-param_1" (- "-") (identifier "param_1")) (, ",") (identifier "uVar1") () ")")))) (; ";")) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}"))) (expression_statement "uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2);" (assignment_expression "uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2)" (identifier "uVar1") (= "=") (call_expression "(*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2)" (parenthesized_expression "(*(code *)PTR_rl_get_previous_history_001455d8)" (( "(") (pointer_expression "*(code *)PTR_rl_get_previous_history_001455d8" (* "*") (cast_expression "(code *)PTR_rl_get_previous_history_001455d8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_rl_get_previous_history_001455d8"))) () ")")) (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

int function_1(int var_1,int ignore)

{
  int iVar1;
  
  if (var_1 == 0) {
    return 0;
  }
  if ((*(type_1 **)PTR_rl_last_func_00145598 != var_2) &&
     (*(type_1 **)PTR_rl_last_func_00145598 != var_3)) {
    var_4(0);
  }
  if (*(int *)(var_5 + -0x623c) != 0) {
    if (-1 < var_1) {
      iVar1 = -1;
      if (var_1 < 1) {
        iVar1 = 1;
      }
      iVar1 = var_6(var_1,iVar1);
      return iVar1;
    }
    iVar1 = -1;
    if (var_1 < 1) {
      iVar1 = 1;
    }
    iVar1 = var_6(-var_1,iVar1);
    return iVar1;
  }
                    /* WARNING: Could not recover jumptable at 0x000e90ec. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  iVar1 = (*(type_2 *)PTR_rl_get_previous_history_001455d8)(var_1,ignore);
  return iVar1;
}


(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: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (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 (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (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)))) (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 (unary_expression argument: (identifier)) (identifier))))) (return_statement (identifier)))) (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))))) (return_statement (identifier)))))

undefined4 MASKED(int param_1,undefined4 param_2)

{
  undefined4 uVar1;
  
  if (param_1 == 0) {
    return 0;
  }
  if ((*(undefined **)PTR_rl_last_func_00145598 != PTR_rl_history_substr_search_forward_00145e88) &&
     (*(undefined **)PTR_rl_last_func_00145598 != PTR_MASKED_00145e8c)) {
    FUN_000e8298(0);
  }
  if (*(int *)(PTR___environ_00145154 + -0x623c) != 0) {
    if (-1 < param_1) {
      uVar1 = 0xffffffff;
      if (param_1 < 1) {
        uVar1 = 1;
      }
      uVar1 = FUN_000e8b9c(param_1,uVar1);
      return uVar1;
    }
    uVar1 = 0xffffffff;
    if (param_1 < 1) {
      uVar1 = 1;
    }
    uVar1 = FUN_000e8b9c(-param_1,uVar1);
    return uVar1;
  }
                    /* WARNING: Could not recover jumptable at 0x000e90ec. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  uVar1 = (*(code *)PTR_rl_get_previous_history_001455d8)(param_1,param_2);
  return uVar1;
}

