
SHELL_VAR * bind_function(char *name,COMMAND *value)

{
  SHELL_VAR *pSVar1;
  COMMAND *pCVar2;
  uint uVar3;
  undefined4 uVar4;
  uint uVar5;
  int iVar6;
  
  pSVar1 = find_function(name);
  if (pSVar1 == (SHELL_VAR *)0x0) {
    iVar6 = (*(code *)PTR_strlen_00146390)(name);
    uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar6 + 1);
    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,name);
    iVar6 = (*(code *)PTR_hash_insert_00144fcc)(uVar4,*(undefined4 *)PTR_shell_functions_00144700,1)
    ;
    pSVar1 = new_shell_variable(name);
    *(SHELL_VAR **)(iVar6 + 8) = pSVar1;
  }
  else if (pSVar1->exportstr != (char *)0x0) {
    (*(code *)PTR_free_001464fc)();
    pSVar1->exportstr = (char *)0x0;
  }
  if ((COMMAND *)pSVar1->value != (COMMAND *)0x0) {
    dispose_command((COMMAND *)pSVar1->value);
  }
  if (value != (COMMAND *)0x0) {
    pCVar2 = copy_command(value);
    pSVar1->value = (char *)pCVar2;
    uVar5 = pSVar1->attributes;
    iVar6 = *(int *)PTR_mark_modified_vars_00144fb4;
    uVar3 = uVar5 | 8;
    pSVar1->attributes = uVar3;
    if (iVar6 != 0) {
      uVar3 = uVar5 | 9;
    }
    pSVar1->attributes = uVar3 & 0xffffefff;
    if ((uVar3 & 1) != 0) {
      *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;
    }
    (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);
    return pSVar1;
  }
  pSVar1->value = (char *)0x0;
  pSVar1 = (SHELL_VAR *)FUN_00057868();
  return pSVar1;
}



int bind_function(undefined4 param_1,int param_2)

{
  int iVar1;
  undefined4 uVar2;
  uint uVar3;
  uint uVar4;
  int iVar5;
  
  iVar1 = find_function();
  if (iVar1 == 0) {
    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);
    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);
    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);
    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)
    ;
    iVar1 = FUN_000531c8(param_1);
    *(int *)(iVar5 + 8) = iVar1;
  }
  else if (*(int *)(iVar1 + 8) != 0) {
    (*(code *)PTR_free_001464fc)();
    *(undefined4 *)(iVar1 + 8) = 0;
  }
  if (*(int *)(iVar1 + 4) != 0) {
    dispose_command();
  }
  if (param_2 == 0) {
    *(undefined4 *)(iVar1 + 4) = 0;
  }
  else {
    uVar2 = copy_command(param_2);
    *(undefined4 *)(iVar1 + 4) = uVar2;
  }
  uVar4 = *(uint *)(iVar1 + 0x14);
  iVar5 = *(int *)PTR_mark_modified_vars_00144fb4;
  uVar3 = uVar4 | 8;
  *(uint *)(iVar1 + 0x14) = uVar3;
  if (iVar5 != 0) {
    uVar3 = uVar4 | 9;
  }
  *(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff;
  if ((uVar3 & 1) != 0) {
    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;
  }
  (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);
  return iVar1;
}


lui gp,0xf
addiu gp,gp,0x4d64
addu gp,gp,t9
addiu sp,sp,-0x28
lw t9,-0x7840(gp)
sw gp,0x10(sp)
sw s2,0x20(sp)
or s2,a0,zero
sw s1,0x1c(sp)
or s1,a1,zero
sw ra,0x24(sp)
bal 0x00056848
_sw s0,0x18(sp)
beq v0,zero,0x000578d8
_lw gp,0x10(sp)
lw a0,0x8(v0)
beq a0,zero,0x00057838
_or s0,v0,zero
lw t9,-0x6044(gp)
jalr t9
_nop
lw gp,0x10(sp)
sw zero,0x8(s0)
lw a0,0x4(s0)
beq a0,zero,0x00057850
_lw t9,-0x7ce0(gp)
bal 0x00048374
_nop
lw gp,0x10(sp)
beq s1,zero,0x000578d0
_lw t9,-0x79d4(gp)
bal 0x0005ee9c
_or a0,s1,zero
lw gp,0x10(sp)
sw v0,0x4(s0)
lw v0,-0x758c(gp)
lw v1,0x14(s0)
lw a0,0x0(v0)
ori v0,v1,0x8
beq a0,zero,0x00057884
_sw v0,0x14(s0)
ori v0,v1,0x9
li a0,-0x1001
andi v1,v0,0x1
and v0,v0,a0
beq v1,zero,0x000578a4
_sw v0,0x14(s0)
lw v0,-0x7588(gp)
li v1,0x1
sw v1,0x0(v0)
lw t9,-0x757c(gp)
lw a0,-0x7578(gp)
jalr t9
_nop
or v0,s0,zero
lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
b 0x00057868
_sw zero,0x4(s0)
lw t9,-0x61b0(gp)
jalr t9
_or a0,s2,zero
lw gp,0x10(sp)
lw t9,-0x7f90(gp)
jalr t9
_addiu a0,v0,0x1
or a1,s2,zero
lw gp,0x10(sp)
lw t9,-0x6128(gp)
jalr t9
_or a0,v0,zero
li a2,0x1
lw gp,0x10(sp)
or a0,v0,zero
lw v0,-0x7e40(gp)
lw t9,-0x7574(gp)
jalr t9
_lw a1,0x0(v0)
or a0,s2,zero
lw gp,0x10(sp)
lw t9,-0x7970(gp)
addiu t9,t9,0x31c8
bal 0x000531c8
_or s2,v0,zero
lw gp,0x10(sp)
or s0,v0,zero
b 0x00057838
_sw v0,0x8(s2)
(translation_unit "int bind_function(undefined4 param_1,int param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  \n  iVar1 = find_function();\n  if (iVar1 == 0) {\n    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);\n    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);\n    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    iVar1 = FUN_000531c8(param_1);\n    *(int *)(iVar5 + 8) = iVar1;\n  }\n  else if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }\n  if (*(int *)(iVar1 + 4) != 0) {\n    dispose_command();\n  }\n  if (param_2 == 0) {\n    *(undefined4 *)(iVar1 + 4) = 0;\n  }\n  else {\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }\n  uVar4 = *(uint *)(iVar1 + 0x14);\n  iVar5 = *(int *)PTR_mark_modified_vars_00144fb4;\n  uVar3 = uVar4 | 8;\n  *(uint *)(iVar1 + 0x14) = uVar3;\n  if (iVar5 != 0) {\n    uVar3 = uVar4 | 9;\n  }\n  *(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff;\n  if ((uVar3 & 1) != 0) {\n    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n  }\n  (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);\n  return iVar1;\n}\n\n" (function_definition "int bind_function(undefined4 param_1,int param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  \n  iVar1 = find_function();\n  if (iVar1 == 0) {\n    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);\n    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);\n    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    iVar1 = FUN_000531c8(param_1);\n    *(int *)(iVar5 + 8) = iVar1;\n  }\n  else if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }\n  if (*(int *)(iVar1 + 4) != 0) {\n    dispose_command();\n  }\n  if (param_2 == 0) {\n    *(undefined4 *)(iVar1 + 4) = 0;\n  }\n  else {\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }\n  uVar4 = *(uint *)(iVar1 + 0x14);\n  iVar5 = *(int *)PTR_mark_modified_vars_00144fb4;\n  uVar3 = uVar4 | 8;\n  *(uint *)(iVar1 + 0x14) = uVar3;\n  if (iVar5 != 0) {\n    uVar3 = uVar4 | 9;\n  }\n  *(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff;\n  if ((uVar3 & 1) != 0) {\n    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n  }\n  (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);\n  return iVar1;\n}" primitive_type (function_declarator "bind_function(undefined4 param_1,int param_2)" identifier (parameter_list "(undefined4 param_1,int param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  \n  iVar1 = find_function();\n  if (iVar1 == 0) {\n    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);\n    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);\n    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    iVar1 = FUN_000531c8(param_1);\n    *(int *)(iVar5 + 8) = iVar1;\n  }\n  else if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }\n  if (*(int *)(iVar1 + 4) != 0) {\n    dispose_command();\n  }\n  if (param_2 == 0) {\n    *(undefined4 *)(iVar1 + 4) = 0;\n  }\n  else {\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }\n  uVar4 = *(uint *)(iVar1 + 0x14);\n  iVar5 = *(int *)PTR_mark_modified_vars_00144fb4;\n  uVar3 = uVar4 | 8;\n  *(uint *)(iVar1 + 0x14) = uVar3;\n  if (iVar5 != 0) {\n    uVar3 = uVar4 | 9;\n  }\n  *(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff;\n  if ((uVar3 & 1) != 0) {\n    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n  }\n  (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "iVar1 = find_function();" (assignment_expression "iVar1 = find_function()" identifier = (call_expression "find_function()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 == 0) {\n    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);\n    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);\n    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    iVar1 = FUN_000531c8(param_1);\n    *(int *)(iVar5 + 8) = iVar1;\n  }\n  else if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);\n    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);\n    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    iVar1 = FUN_000531c8(param_1);\n    *(int *)(iVar5 + 8) = iVar1;\n  }" { (expression_statement "iVar1 = (*(code *)PTR_strlen_00146390)(param_1);" (assignment_expression "iVar1 = (*(code *)PTR_strlen_00146390)(param_1)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(param_1)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);" (assignment_expression "uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1)" identifier = (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar1 + 1)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" ( (pointer_expression "*(code *)PTR_xmalloc_001445b0" * (cast_expression "(code *)PTR_xmalloc_001445b0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1 + 1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) )))) ;) (expression_statement "uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);" (assignment_expression "uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1)" identifier = (call_expression "(*(code *)PTR_strcpy_00146418)(uVar2,param_1)" (parenthesized_expression "(*(code *)PTR_strcpy_00146418)" ( (pointer_expression "*(code *)PTR_strcpy_00146418" * (cast_expression "(code *)PTR_strcpy_00146418" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,param_1)" ( identifier , identifier )))) ;) (expression_statement "iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;" (assignment_expression "iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)" identifier = (call_expression "(*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)" (parenthesized_expression "(*(code *)PTR_hash_insert_00144fcc)" ( (pointer_expression "*(code *)PTR_hash_insert_00144fcc" * (cast_expression "(code *)PTR_hash_insert_00144fcc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)" ( identifier , (pointer_expression "*(undefined4 *)PTR_shell_functions_00144700" * (cast_expression "(undefined4 *)PTR_shell_functions_00144700" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) , number_literal )))) ;) (expression_statement "iVar1 = FUN_000531c8(param_1);" (assignment_expression "iVar1 = FUN_000531c8(param_1)" identifier = (call_expression "FUN_000531c8(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "*(int *)(iVar5 + 8) = iVar1;" (assignment_expression "*(int *)(iVar5 + 8) = iVar1" (pointer_expression "*(int *)(iVar5 + 8)" * (cast_expression "(int *)(iVar5 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 8)" ( (binary_expression "iVar5 + 8" identifier + number_literal) )))) = identifier) ;) }) (else_clause "else if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }" else (if_statement "if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }" if (parenthesized_expression "(*(int *)(iVar1 + 8) != 0)" ( (binary_expression "*(int *)(iVar1 + 8) != 0" (pointer_expression "*(int *)(iVar1 + 8)" * (cast_expression "(int *)(iVar1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }" { (expression_statement "(*(code *)PTR_free_001464fc)();" (call_expression "(*(code *)PTR_free_001464fc)()" (parenthesized_expression "(*(code *)PTR_free_001464fc)" ( (pointer_expression "*(code *)PTR_free_001464fc" * (cast_expression "(code *)PTR_free_001464fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "*(undefined4 *)(iVar1 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 8)" * (cast_expression "(undefined4 *)(iVar1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) = number_literal) ;) })))) (if_statement "if (*(int *)(iVar1 + 4) != 0) {\n    dispose_command();\n  }" if (parenthesized_expression "(*(int *)(iVar1 + 4) != 0)" ( (binary_expression "*(int *)(iVar1 + 4) != 0" (pointer_expression "*(int *)(iVar1 + 4)" * (cast_expression "(int *)(iVar1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    dispose_command();\n  }" { (expression_statement "dispose_command();" (call_expression "dispose_command()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (param_2 == 0) {\n    *(undefined4 *)(iVar1 + 4) = 0;\n  }\n  else {\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    *(undefined4 *)(iVar1 + 4) = 0;\n  }" { (expression_statement "*(undefined4 *)(iVar1 + 4) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 4) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 4)" * (cast_expression "(undefined4 *)(iVar1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }" else (compound_statement "{\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }" { (expression_statement "uVar2 = copy_command(param_2);" (assignment_expression "uVar2 = copy_command(param_2)" identifier = (call_expression "copy_command(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "*(undefined4 *)(iVar1 + 4) = uVar2;" (assignment_expression "*(undefined4 *)(iVar1 + 4) = uVar2" (pointer_expression "*(undefined4 *)(iVar1 + 4)" * (cast_expression "(undefined4 *)(iVar1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) = identifier) ;) }))) (expression_statement "uVar4 = *(uint *)(iVar1 + 0x14);" (assignment_expression "uVar4 = *(uint *)(iVar1 + 0x14)" identifier = (pointer_expression "*(uint *)(iVar1 + 0x14)" * (cast_expression "(uint *)(iVar1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar5 = *(int *)PTR_mark_modified_vars_00144fb4;" (assignment_expression "iVar5 = *(int *)PTR_mark_modified_vars_00144fb4" identifier = (pointer_expression "*(int *)PTR_mark_modified_vars_00144fb4" * (cast_expression "(int *)PTR_mark_modified_vars_00144fb4" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar3 = uVar4 | 8;" (assignment_expression "uVar3 = uVar4 | 8" identifier = (binary_expression "uVar4 | 8" identifier | number_literal)) ;) (expression_statement "*(uint *)(iVar1 + 0x14) = uVar3;" (assignment_expression "*(uint *)(iVar1 + 0x14) = uVar3" (pointer_expression "*(uint *)(iVar1 + 0x14)" * (cast_expression "(uint *)(iVar1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar5 != 0) {\n    uVar3 = uVar4 | 9;\n  }" if (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar3 = uVar4 | 9;\n  }" { (expression_statement "uVar3 = uVar4 | 9;" (assignment_expression "uVar3 = uVar4 | 9" identifier = (binary_expression "uVar4 | 9" identifier | number_literal)) ;) })) (expression_statement "*(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff;" (assignment_expression "*(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff" (pointer_expression "*(uint *)(iVar1 + 0x14)" * (cast_expression "(uint *)(iVar1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) = (binary_expression "uVar3 & 0xffffefff" identifier & number_literal)) ;) (if_statement "if ((uVar3 & 1) != 0) {\n    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n  }" if (parenthesized_expression "((uVar3 & 1) != 0)" ( (binary_expression "(uVar3 & 1) != 0" (parenthesized_expression "(uVar3 & 1)" ( (binary_expression "uVar3 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n  }" { (expression_statement "*(undefined4 *)PTR_array_needs_making_00144fb8 = 1;" (assignment_expression "*(undefined4 *)PTR_array_needs_making_00144fb8 = 1" (pointer_expression "*(undefined4 *)PTR_array_needs_making_00144fb8" * (cast_expression "(undefined4 *)PTR_array_needs_making_00144fb8" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) })) (expression_statement "(*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);" (call_expression "(*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8)" (parenthesized_expression "(*(code *)PTR_set_itemlist_dirty_00144fc4)" ( (pointer_expression "*(code *)PTR_set_itemlist_dirty_00144fc4" * (cast_expression "(code *)PTR_set_itemlist_dirty_00144fc4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_it_functions_00144fc8)" ( identifier ))) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "SHELL_VAR * bind_function(char *name,COMMAND *value)\n\n{\n  SHELL_VAR *pSVar1;\n  COMMAND *pCVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  int iVar6;\n  \n  pSVar1 = find_function(name);\n  if (pSVar1 == (SHELL_VAR *)0x0) {\n    iVar6 = (*(code *)PTR_strlen_00146390)(name);\n    uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar6 + 1);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,name);\n    iVar6 = (*(code *)PTR_hash_insert_00144fcc)(uVar4,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    pSVar1 = new_shell_variable(name);\n    *(SHELL_VAR **)(iVar6 + 8) = pSVar1;\n  }\n  else if (pSVar1->exportstr != (char *)0x0) {\n    (*(code *)PTR_free_001464fc)();\n    pSVar1->exportstr = (char *)0x0;\n  }\n  if ((COMMAND *)pSVar1->value != (COMMAND *)0x0) {\n    dispose_command((COMMAND *)pSVar1->value);\n  }\n  if (value != (COMMAND *)0x0) {\n    pCVar2 = copy_command(value);\n    pSVar1->value = (char *)pCVar2;\n    uVar5 = pSVar1->attributes;\n    iVar6 = *(int *)PTR_mark_modified_vars_00144fb4;\n    uVar3 = uVar5 | 8;\n    pSVar1->attributes = uVar3;\n    if (iVar6 != 0) {\n      uVar3 = uVar5 | 9;\n    }\n    pSVar1->attributes = uVar3 & 0xffffefff;\n    if ((uVar3 & 1) != 0) {\n      *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n    }\n    (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);\n    return pSVar1;\n  }\n  pSVar1->value = (char *)0x0;\n  pSVar1 = (SHELL_VAR *)FUN_00057868();\n  return pSVar1;\n}\n\n" (function_definition "SHELL_VAR * bind_function(char *name,COMMAND *value)\n\n{\n  SHELL_VAR *pSVar1;\n  COMMAND *pCVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  int iVar6;\n  \n  pSVar1 = find_function(name);\n  if (pSVar1 == (SHELL_VAR *)0x0) {\n    iVar6 = (*(code *)PTR_strlen_00146390)(name);\n    uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar6 + 1);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,name);\n    iVar6 = (*(code *)PTR_hash_insert_00144fcc)(uVar4,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    pSVar1 = new_shell_variable(name);\n    *(SHELL_VAR **)(iVar6 + 8) = pSVar1;\n  }\n  else if (pSVar1->exportstr != (char *)0x0) {\n    (*(code *)PTR_free_001464fc)();\n    pSVar1->exportstr = (char *)0x0;\n  }\n  if ((COMMAND *)pSVar1->value != (COMMAND *)0x0) {\n    dispose_command((COMMAND *)pSVar1->value);\n  }\n  if (value != (COMMAND *)0x0) {\n    pCVar2 = copy_command(value);\n    pSVar1->value = (char *)pCVar2;\n    uVar5 = pSVar1->attributes;\n    iVar6 = *(int *)PTR_mark_modified_vars_00144fb4;\n    uVar3 = uVar5 | 8;\n    pSVar1->attributes = uVar3;\n    if (iVar6 != 0) {\n      uVar3 = uVar5 | 9;\n    }\n    pSVar1->attributes = uVar3 & 0xffffefff;\n    if ((uVar3 & 1) != 0) {\n      *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n    }\n    (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);\n    return pSVar1;\n  }\n  pSVar1->value = (char *)0x0;\n  pSVar1 = (SHELL_VAR *)FUN_00057868();\n  return pSVar1;\n}" type_identifier (pointer_declarator "* bind_function(char *name,COMMAND *value)" * (function_declarator "bind_function(char *name,COMMAND *value)" identifier (parameter_list "(char *name,COMMAND *value)" ( (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "COMMAND *value" type_identifier (pointer_declarator "*value" * identifier)) )))) (compound_statement "{\n  SHELL_VAR *pSVar1;\n  COMMAND *pCVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  int iVar6;\n  \n  pSVar1 = find_function(name);\n  if (pSVar1 == (SHELL_VAR *)0x0) {\n    iVar6 = (*(code *)PTR_strlen_00146390)(name);\n    uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar6 + 1);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,name);\n    iVar6 = (*(code *)PTR_hash_insert_00144fcc)(uVar4,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    pSVar1 = new_shell_variable(name);\n    *(SHELL_VAR **)(iVar6 + 8) = pSVar1;\n  }\n  else if (pSVar1->exportstr != (char *)0x0) {\n    (*(code *)PTR_free_001464fc)();\n    pSVar1->exportstr = (char *)0x0;\n  }\n  if ((COMMAND *)pSVar1->value != (COMMAND *)0x0) {\n    dispose_command((COMMAND *)pSVar1->value);\n  }\n  if (value != (COMMAND *)0x0) {\n    pCVar2 = copy_command(value);\n    pSVar1->value = (char *)pCVar2;\n    uVar5 = pSVar1->attributes;\n    iVar6 = *(int *)PTR_mark_modified_vars_00144fb4;\n    uVar3 = uVar5 | 8;\n    pSVar1->attributes = uVar3;\n    if (iVar6 != 0) {\n      uVar3 = uVar5 | 9;\n    }\n    pSVar1->attributes = uVar3 & 0xffffefff;\n    if ((uVar3 & 1) != 0) {\n      *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n    }\n    (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);\n    return pSVar1;\n  }\n  pSVar1->value = (char *)0x0;\n  pSVar1 = (SHELL_VAR *)FUN_00057868();\n  return pSVar1;\n}" { (declaration "SHELL_VAR *pSVar1;" type_identifier (pointer_declarator "*pSVar1" * identifier) ;) (declaration "COMMAND *pCVar2;" type_identifier (pointer_declarator "*pCVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (expression_statement "pSVar1 = find_function(name);" (assignment_expression "pSVar1 = find_function(name)" identifier = (call_expression "find_function(name)" identifier (argument_list "(name)" ( identifier )))) ;) (if_statement "if (pSVar1 == (SHELL_VAR *)0x0) {\n    iVar6 = (*(code *)PTR_strlen_00146390)(name);\n    uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar6 + 1);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,name);\n    iVar6 = (*(code *)PTR_hash_insert_00144fcc)(uVar4,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    pSVar1 = new_shell_variable(name);\n    *(SHELL_VAR **)(iVar6 + 8) = pSVar1;\n  }\n  else if (pSVar1->exportstr != (char *)0x0) {\n    (*(code *)PTR_free_001464fc)();\n    pSVar1->exportstr = (char *)0x0;\n  }" if (parenthesized_expression "(pSVar1 == (SHELL_VAR *)0x0)" ( (binary_expression "pSVar1 == (SHELL_VAR *)0x0" identifier == (cast_expression "(SHELL_VAR *)0x0" ( (type_descriptor "SHELL_VAR *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar6 = (*(code *)PTR_strlen_00146390)(name);\n    uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar6 + 1);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,name);\n    iVar6 = (*(code *)PTR_hash_insert_00144fcc)(uVar4,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    pSVar1 = new_shell_variable(name);\n    *(SHELL_VAR **)(iVar6 + 8) = pSVar1;\n  }" { (expression_statement "iVar6 = (*(code *)PTR_strlen_00146390)(name);" (assignment_expression "iVar6 = (*(code *)PTR_strlen_00146390)(name)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(name)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(name)" ( identifier )))) ;) (expression_statement "uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar6 + 1);" (assignment_expression "uVar4 = (*(code *)PTR_xmalloc_001445b0)(iVar6 + 1)" identifier = (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar6 + 1)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" ( (pointer_expression "*(code *)PTR_xmalloc_001445b0" * (cast_expression "(code *)PTR_xmalloc_001445b0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar6 + 1)" ( (binary_expression "iVar6 + 1" identifier + number_literal) )))) ;) (expression_statement "uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,name);" (assignment_expression "uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,name)" identifier = (call_expression "(*(code *)PTR_strcpy_00146418)(uVar4,name)" (parenthesized_expression "(*(code *)PTR_strcpy_00146418)" ( (pointer_expression "*(code *)PTR_strcpy_00146418" * (cast_expression "(code *)PTR_strcpy_00146418" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar4,name)" ( identifier , identifier )))) ;) (expression_statement "iVar6 = (*(code *)PTR_hash_insert_00144fcc)(uVar4,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;" (assignment_expression "iVar6 = (*(code *)PTR_hash_insert_00144fcc)(uVar4,*(undefined4 *)PTR_shell_functions_00144700,1)" identifier = (call_expression "(*(code *)PTR_hash_insert_00144fcc)(uVar4,*(undefined4 *)PTR_shell_functions_00144700,1)" (parenthesized_expression "(*(code *)PTR_hash_insert_00144fcc)" ( (pointer_expression "*(code *)PTR_hash_insert_00144fcc" * (cast_expression "(code *)PTR_hash_insert_00144fcc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar4,*(undefined4 *)PTR_shell_functions_00144700,1)" ( identifier , (pointer_expression "*(undefined4 *)PTR_shell_functions_00144700" * (cast_expression "(undefined4 *)PTR_shell_functions_00144700" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) , number_literal )))) ;) (expression_statement "pSVar1 = new_shell_variable(name);" (assignment_expression "pSVar1 = new_shell_variable(name)" identifier = (call_expression "new_shell_variable(name)" identifier (argument_list "(name)" ( identifier )))) ;) (expression_statement "*(SHELL_VAR **)(iVar6 + 8) = pSVar1;" (assignment_expression "*(SHELL_VAR **)(iVar6 + 8) = pSVar1" (pointer_expression "*(SHELL_VAR **)(iVar6 + 8)" * (cast_expression "(SHELL_VAR **)(iVar6 + 8)" ( (type_descriptor "SHELL_VAR **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar6 + 8)" ( (binary_expression "iVar6 + 8" identifier + number_literal) )))) = identifier) ;) }) (else_clause "else if (pSVar1->exportstr != (char *)0x0) {\n    (*(code *)PTR_free_001464fc)();\n    pSVar1->exportstr = (char *)0x0;\n  }" else (if_statement "if (pSVar1->exportstr != (char *)0x0) {\n    (*(code *)PTR_free_001464fc)();\n    pSVar1->exportstr = (char *)0x0;\n  }" if (parenthesized_expression "(pSVar1->exportstr != (char *)0x0)" ( (binary_expression "pSVar1->exportstr != (char *)0x0" (field_expression "pSVar1->exportstr" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*(code *)PTR_free_001464fc)();\n    pSVar1->exportstr = (char *)0x0;\n  }" { (expression_statement "(*(code *)PTR_free_001464fc)();" (call_expression "(*(code *)PTR_free_001464fc)()" (parenthesized_expression "(*(code *)PTR_free_001464fc)" ( (pointer_expression "*(code *)PTR_free_001464fc" * (cast_expression "(code *)PTR_free_001464fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "pSVar1->exportstr = (char *)0x0;" (assignment_expression "pSVar1->exportstr = (char *)0x0" (field_expression "pSVar1->exportstr" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })))) (if_statement "if ((COMMAND *)pSVar1->value != (COMMAND *)0x0) {\n    dispose_command((COMMAND *)pSVar1->value);\n  }" if (parenthesized_expression "((COMMAND *)pSVar1->value != (COMMAND *)0x0)" ( (binary_expression "(COMMAND *)pSVar1->value != (COMMAND *)0x0" (cast_expression "(COMMAND *)pSVar1->value" ( (type_descriptor "COMMAND *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pSVar1->value" identifier -> field_identifier)) != (cast_expression "(COMMAND *)0x0" ( (type_descriptor "COMMAND *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    dispose_command((COMMAND *)pSVar1->value);\n  }" { (expression_statement "dispose_command((COMMAND *)pSVar1->value);" (call_expression "dispose_command((COMMAND *)pSVar1->value)" identifier (argument_list "((COMMAND *)pSVar1->value)" ( (cast_expression "(COMMAND *)pSVar1->value" ( (type_descriptor "COMMAND *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pSVar1->value" identifier -> field_identifier)) ))) ;) })) (if_statement "if (value != (COMMAND *)0x0) {\n    pCVar2 = copy_command(value);\n    pSVar1->value = (char *)pCVar2;\n    uVar5 = pSVar1->attributes;\n    iVar6 = *(int *)PTR_mark_modified_vars_00144fb4;\n    uVar3 = uVar5 | 8;\n    pSVar1->attributes = uVar3;\n    if (iVar6 != 0) {\n      uVar3 = uVar5 | 9;\n    }\n    pSVar1->attributes = uVar3 & 0xffffefff;\n    if ((uVar3 & 1) != 0) {\n      *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n    }\n    (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);\n    return pSVar1;\n  }" if (parenthesized_expression "(value != (COMMAND *)0x0)" ( (binary_expression "value != (COMMAND *)0x0" identifier != (cast_expression "(COMMAND *)0x0" ( (type_descriptor "COMMAND *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pCVar2 = copy_command(value);\n    pSVar1->value = (char *)pCVar2;\n    uVar5 = pSVar1->attributes;\n    iVar6 = *(int *)PTR_mark_modified_vars_00144fb4;\n    uVar3 = uVar5 | 8;\n    pSVar1->attributes = uVar3;\n    if (iVar6 != 0) {\n      uVar3 = uVar5 | 9;\n    }\n    pSVar1->attributes = uVar3 & 0xffffefff;\n    if ((uVar3 & 1) != 0) {\n      *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n    }\n    (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);\n    return pSVar1;\n  }" { (expression_statement "pCVar2 = copy_command(value);" (assignment_expression "pCVar2 = copy_command(value)" identifier = (call_expression "copy_command(value)" identifier (argument_list "(value)" ( identifier )))) ;) (expression_statement "pSVar1->value = (char *)pCVar2;" (assignment_expression "pSVar1->value = (char *)pCVar2" (field_expression "pSVar1->value" identifier -> field_identifier) = (cast_expression "(char *)pCVar2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "uVar5 = pSVar1->attributes;" (assignment_expression "uVar5 = pSVar1->attributes" identifier = (field_expression "pSVar1->attributes" identifier -> field_identifier)) ;) (expression_statement "iVar6 = *(int *)PTR_mark_modified_vars_00144fb4;" (assignment_expression "iVar6 = *(int *)PTR_mark_modified_vars_00144fb4" identifier = (pointer_expression "*(int *)PTR_mark_modified_vars_00144fb4" * (cast_expression "(int *)PTR_mark_modified_vars_00144fb4" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar3 = uVar5 | 8;" (assignment_expression "uVar3 = uVar5 | 8" identifier = (binary_expression "uVar5 | 8" identifier | number_literal)) ;) (expression_statement "pSVar1->attributes = uVar3;" (assignment_expression "pSVar1->attributes = uVar3" (field_expression "pSVar1->attributes" identifier -> field_identifier) = identifier) ;) (if_statement "if (iVar6 != 0) {\n      uVar3 = uVar5 | 9;\n    }" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar3 = uVar5 | 9;\n    }" { (expression_statement "uVar3 = uVar5 | 9;" (assignment_expression "uVar3 = uVar5 | 9" identifier = (binary_expression "uVar5 | 9" identifier | number_literal)) ;) })) (expression_statement "pSVar1->attributes = uVar3 & 0xffffefff;" (assignment_expression "pSVar1->attributes = uVar3 & 0xffffefff" (field_expression "pSVar1->attributes" identifier -> field_identifier) = (binary_expression "uVar3 & 0xffffefff" identifier & number_literal)) ;) (if_statement "if ((uVar3 & 1) != 0) {\n      *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n    }" if (parenthesized_expression "((uVar3 & 1) != 0)" ( (binary_expression "(uVar3 & 1) != 0" (parenthesized_expression "(uVar3 & 1)" ( (binary_expression "uVar3 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n      *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n    }" { (expression_statement "*(undefined4 *)PTR_array_needs_making_00144fb8 = 1;" (assignment_expression "*(undefined4 *)PTR_array_needs_making_00144fb8 = 1" (pointer_expression "*(undefined4 *)PTR_array_needs_making_00144fb8" * (cast_expression "(undefined4 *)PTR_array_needs_making_00144fb8" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) })) (expression_statement "(*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);" (call_expression "(*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8)" (parenthesized_expression "(*(code *)PTR_set_itemlist_dirty_00144fc4)" ( (pointer_expression "*(code *)PTR_set_itemlist_dirty_00144fc4" * (cast_expression "(code *)PTR_set_itemlist_dirty_00144fc4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_it_functions_00144fc8)" ( identifier ))) ;) (return_statement "return pSVar1;" return identifier ;) })) (expression_statement "pSVar1->value = (char *)0x0;" (assignment_expression "pSVar1->value = (char *)0x0" (field_expression "pSVar1->value" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pSVar1 = (SHELL_VAR *)FUN_00057868();" (assignment_expression "pSVar1 = (SHELL_VAR *)FUN_00057868()" identifier = (cast_expression "(SHELL_VAR *)FUN_00057868()" ( (type_descriptor "SHELL_VAR *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00057868()" identifier (argument_list "()" ( ))))) ;) (return_statement "return pSVar1;" return identifier ;) })))
(translation_unit "int bind_function(undefined4 param_1,int param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  \n  iVar1 = find_function();\n  if (iVar1 == 0) {\n    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);\n    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);\n    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    iVar1 = FUN_000531c8(param_1);\n    *(int *)(iVar5 + 8) = iVar1;\n  }\n  else if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }\n  if (*(int *)(iVar1 + 4) != 0) {\n    dispose_command();\n  }\n  if (param_2 == 0) {\n    *(undefined4 *)(iVar1 + 4) = 0;\n  }\n  else {\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }\n  uVar4 = *(uint *)(iVar1 + 0x14);\n  iVar5 = *(int *)PTR_mark_modified_vars_00144fb4;\n  uVar3 = uVar4 | 8;\n  *(uint *)(iVar1 + 0x14) = uVar3;\n  if (iVar5 != 0) {\n    uVar3 = uVar4 | 9;\n  }\n  *(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff;\n  if ((uVar3 & 1) != 0) {\n    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n  }\n  (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);\n  return iVar1;\n}\n\n" (function_definition "int bind_function(undefined4 param_1,int param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  \n  iVar1 = find_function();\n  if (iVar1 == 0) {\n    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);\n    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);\n    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    iVar1 = FUN_000531c8(param_1);\n    *(int *)(iVar5 + 8) = iVar1;\n  }\n  else if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }\n  if (*(int *)(iVar1 + 4) != 0) {\n    dispose_command();\n  }\n  if (param_2 == 0) {\n    *(undefined4 *)(iVar1 + 4) = 0;\n  }\n  else {\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }\n  uVar4 = *(uint *)(iVar1 + 0x14);\n  iVar5 = *(int *)PTR_mark_modified_vars_00144fb4;\n  uVar3 = uVar4 | 8;\n  *(uint *)(iVar1 + 0x14) = uVar3;\n  if (iVar5 != 0) {\n    uVar3 = uVar4 | 9;\n  }\n  *(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff;\n  if ((uVar3 & 1) != 0) {\n    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n  }\n  (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);\n  return iVar1;\n}" primitive_type (function_declarator "bind_function(undefined4 param_1,int param_2)" identifier (parameter_list "(undefined4 param_1,int param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  \n  iVar1 = find_function();\n  if (iVar1 == 0) {\n    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);\n    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);\n    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    iVar1 = FUN_000531c8(param_1);\n    *(int *)(iVar5 + 8) = iVar1;\n  }\n  else if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }\n  if (*(int *)(iVar1 + 4) != 0) {\n    dispose_command();\n  }\n  if (param_2 == 0) {\n    *(undefined4 *)(iVar1 + 4) = 0;\n  }\n  else {\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }\n  uVar4 = *(uint *)(iVar1 + 0x14);\n  iVar5 = *(int *)PTR_mark_modified_vars_00144fb4;\n  uVar3 = uVar4 | 8;\n  *(uint *)(iVar1 + 0x14) = uVar3;\n  if (iVar5 != 0) {\n    uVar3 = uVar4 | 9;\n  }\n  *(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff;\n  if ((uVar3 & 1) != 0) {\n    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n  }\n  (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "iVar1 = find_function();" (assignment_expression "iVar1 = find_function()" identifier = (call_expression "find_function()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 == 0) {\n    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);\n    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);\n    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    iVar1 = FUN_000531c8(param_1);\n    *(int *)(iVar5 + 8) = iVar1;\n  }\n  else if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);\n    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);\n    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    iVar1 = FUN_000531c8(param_1);\n    *(int *)(iVar5 + 8) = iVar1;\n  }" { (expression_statement "iVar1 = (*(code *)PTR_strlen_00146390)(param_1);" (assignment_expression "iVar1 = (*(code *)PTR_strlen_00146390)(param_1)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(param_1)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);" (assignment_expression "uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1)" identifier = (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar1 + 1)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" ( (pointer_expression "*(code *)PTR_xmalloc_001445b0" * (cast_expression "(code *)PTR_xmalloc_001445b0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1 + 1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) )))) ;) (expression_statement "uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);" (assignment_expression "uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1)" identifier = (call_expression "(*(code *)PTR_strcpy_00146418)(uVar2,param_1)" (parenthesized_expression "(*(code *)PTR_strcpy_00146418)" ( (pointer_expression "*(code *)PTR_strcpy_00146418" * (cast_expression "(code *)PTR_strcpy_00146418" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,param_1)" ( identifier , identifier )))) ;) (expression_statement "iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;" (assignment_expression "iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)" identifier = (call_expression "(*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)" (parenthesized_expression "(*(code *)PTR_hash_insert_00144fcc)" ( (pointer_expression "*(code *)PTR_hash_insert_00144fcc" * (cast_expression "(code *)PTR_hash_insert_00144fcc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)" ( identifier , (pointer_expression "*(undefined4 *)PTR_shell_functions_00144700" * (cast_expression "(undefined4 *)PTR_shell_functions_00144700" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) , number_literal )))) ;) (expression_statement "iVar1 = FUN_000531c8(param_1);" (assignment_expression "iVar1 = FUN_000531c8(param_1)" identifier = (call_expression "FUN_000531c8(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "*(int *)(iVar5 + 8) = iVar1;" (assignment_expression "*(int *)(iVar5 + 8) = iVar1" (pointer_expression "*(int *)(iVar5 + 8)" * (cast_expression "(int *)(iVar5 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 8)" ( (binary_expression "iVar5 + 8" identifier + number_literal) )))) = identifier) ;) }) (else_clause "else if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }" else (if_statement "if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }" if (parenthesized_expression "(*(int *)(iVar1 + 8) != 0)" ( (binary_expression "*(int *)(iVar1 + 8) != 0" (pointer_expression "*(int *)(iVar1 + 8)" * (cast_expression "(int *)(iVar1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }" { (expression_statement "(*(code *)PTR_free_001464fc)();" (call_expression "(*(code *)PTR_free_001464fc)()" (parenthesized_expression "(*(code *)PTR_free_001464fc)" ( (pointer_expression "*(code *)PTR_free_001464fc" * (cast_expression "(code *)PTR_free_001464fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "*(undefined4 *)(iVar1 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 8)" * (cast_expression "(undefined4 *)(iVar1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) = number_literal) ;) })))) (if_statement "if (*(int *)(iVar1 + 4) != 0) {\n    dispose_command();\n  }" if (parenthesized_expression "(*(int *)(iVar1 + 4) != 0)" ( (binary_expression "*(int *)(iVar1 + 4) != 0" (pointer_expression "*(int *)(iVar1 + 4)" * (cast_expression "(int *)(iVar1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    dispose_command();\n  }" { (expression_statement "dispose_command();" (call_expression "dispose_command()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (param_2 == 0) {\n    *(undefined4 *)(iVar1 + 4) = 0;\n  }\n  else {\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    *(undefined4 *)(iVar1 + 4) = 0;\n  }" { (expression_statement "*(undefined4 *)(iVar1 + 4) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 4) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 4)" * (cast_expression "(undefined4 *)(iVar1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }" else (compound_statement "{\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }" { (expression_statement "uVar2 = copy_command(param_2);" (assignment_expression "uVar2 = copy_command(param_2)" identifier = (call_expression "copy_command(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "*(undefined4 *)(iVar1 + 4) = uVar2;" (assignment_expression "*(undefined4 *)(iVar1 + 4) = uVar2" (pointer_expression "*(undefined4 *)(iVar1 + 4)" * (cast_expression "(undefined4 *)(iVar1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) = identifier) ;) }))) (expression_statement "uVar4 = *(uint *)(iVar1 + 0x14);" (assignment_expression "uVar4 = *(uint *)(iVar1 + 0x14)" identifier = (pointer_expression "*(uint *)(iVar1 + 0x14)" * (cast_expression "(uint *)(iVar1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar5 = *(int *)PTR_mark_modified_vars_00144fb4;" (assignment_expression "iVar5 = *(int *)PTR_mark_modified_vars_00144fb4" identifier = (pointer_expression "*(int *)PTR_mark_modified_vars_00144fb4" * (cast_expression "(int *)PTR_mark_modified_vars_00144fb4" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar3 = uVar4 | 8;" (assignment_expression "uVar3 = uVar4 | 8" identifier = (binary_expression "uVar4 | 8" identifier | number_literal)) ;) (expression_statement "*(uint *)(iVar1 + 0x14) = uVar3;" (assignment_expression "*(uint *)(iVar1 + 0x14) = uVar3" (pointer_expression "*(uint *)(iVar1 + 0x14)" * (cast_expression "(uint *)(iVar1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar5 != 0) {\n    uVar3 = uVar4 | 9;\n  }" if (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar3 = uVar4 | 9;\n  }" { (expression_statement "uVar3 = uVar4 | 9;" (assignment_expression "uVar3 = uVar4 | 9" identifier = (binary_expression "uVar4 | 9" identifier | number_literal)) ;) })) (expression_statement "*(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff;" (assignment_expression "*(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff" (pointer_expression "*(uint *)(iVar1 + 0x14)" * (cast_expression "(uint *)(iVar1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) = (binary_expression "uVar3 & 0xffffefff" identifier & number_literal)) ;) (if_statement "if ((uVar3 & 1) != 0) {\n    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n  }" if (parenthesized_expression "((uVar3 & 1) != 0)" ( (binary_expression "(uVar3 & 1) != 0" (parenthesized_expression "(uVar3 & 1)" ( (binary_expression "uVar3 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n  }" { (expression_statement "*(undefined4 *)PTR_array_needs_making_00144fb8 = 1;" (assignment_expression "*(undefined4 *)PTR_array_needs_making_00144fb8 = 1" (pointer_expression "*(undefined4 *)PTR_array_needs_making_00144fb8" * (cast_expression "(undefined4 *)PTR_array_needs_making_00144fb8" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) })) (expression_statement "(*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);" (call_expression "(*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8)" (parenthesized_expression "(*(code *)PTR_set_itemlist_dirty_00144fc4)" ( (pointer_expression "*(code *)PTR_set_itemlist_dirty_00144fc4" * (cast_expression "(code *)PTR_set_itemlist_dirty_00144fc4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_it_functions_00144fc8)" ( identifier ))) ;) (return_statement "return iVar1;" 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 ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == 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 )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) }) (else_clause else (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 (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = 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 (call_expression IDENT (argument_list ( ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) }))) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT | LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT | LIT)) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) = LIT) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })))
(function_definition "int bind_function(undefined4 param_1,int param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  \n  iVar1 = find_function();\n  if (iVar1 == 0) {\n    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);\n    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);\n    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    iVar1 = FUN_000531c8(param_1);\n    *(int *)(iVar5 + 8) = iVar1;\n  }\n  else if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }\n  if (*(int *)(iVar1 + 4) != 0) {\n    dispose_command();\n  }\n  if (param_2 == 0) {\n    *(undefined4 *)(iVar1 + 4) = 0;\n  }\n  else {\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }\n  uVar4 = *(uint *)(iVar1 + 0x14);\n  iVar5 = *(int *)PTR_mark_modified_vars_00144fb4;\n  uVar3 = uVar4 | 8;\n  *(uint *)(iVar1 + 0x14) = uVar3;\n  if (iVar5 != 0) {\n    uVar3 = uVar4 | 9;\n  }\n  *(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff;\n  if ((uVar3 & 1) != 0) {\n    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n  }\n  (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);\n  return iVar1;\n}" (primitive_type "int") (function_declarator "bind_function(undefined4 param_1,int param_2)" (identifier "bind_function") (parameter_list "(undefined4 param_1,int param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  \n  iVar1 = find_function();\n  if (iVar1 == 0) {\n    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);\n    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);\n    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    iVar1 = FUN_000531c8(param_1);\n    *(int *)(iVar5 + 8) = iVar1;\n  }\n  else if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }\n  if (*(int *)(iVar1 + 4) != 0) {\n    dispose_command();\n  }\n  if (param_2 == 0) {\n    *(undefined4 *)(iVar1 + 4) = 0;\n  }\n  else {\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }\n  uVar4 = *(uint *)(iVar1 + 0x14);\n  iVar5 = *(int *)PTR_mark_modified_vars_00144fb4;\n  uVar3 = uVar4 | 8;\n  *(uint *)(iVar1 + 0x14) = uVar3;\n  if (iVar5 != 0) {\n    uVar3 = uVar4 | 9;\n  }\n  *(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff;\n  if ((uVar3 & 1) != 0) {\n    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n  }\n  (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (expression_statement "iVar1 = find_function();" (assignment_expression "iVar1 = find_function()" (identifier "iVar1") (= "=") (call_expression "find_function()" (identifier "find_function") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);\n    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);\n    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    iVar1 = FUN_000531c8(param_1);\n    *(int *)(iVar5 + 8) = iVar1;\n  }\n  else if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);\n    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);\n    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);\n    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;\n    iVar1 = FUN_000531c8(param_1);\n    *(int *)(iVar5 + 8) = iVar1;\n  }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_strlen_00146390)(param_1);" (assignment_expression "iVar1 = (*(code *)PTR_strlen_00146390)(param_1)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_strlen_00146390)(param_1)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" (( "(") (pointer_expression "*(code *)PTR_strlen_00146390" (* "*") (cast_expression "(code *)PTR_strlen_00146390" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_00146390"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);" (assignment_expression "uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1)" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR_xmalloc_001445b0)(iVar1 + 1)" (parenthesized_expression "(*(code *)PTR_xmalloc_001445b0)" (( "(") (pointer_expression "*(code *)PTR_xmalloc_001445b0" (* "*") (cast_expression "(code *)PTR_xmalloc_001445b0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_xmalloc_001445b0"))) () ")")) (argument_list "(iVar1 + 1)" (( "(") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);" (assignment_expression "uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1)" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR_strcpy_00146418)(uVar2,param_1)" (parenthesized_expression "(*(code *)PTR_strcpy_00146418)" (( "(") (pointer_expression "*(code *)PTR_strcpy_00146418" (* "*") (cast_expression "(code *)PTR_strcpy_00146418" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strcpy_00146418"))) () ")")) (argument_list "(uVar2,param_1)" (( "(") (identifier "uVar2") (, ",") (identifier "param_1") () ")")))) (; ";")) (expression_statement "iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)\n    ;" (assignment_expression "iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)" (identifier "iVar5") (= "=") (call_expression "(*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)" (parenthesized_expression "(*(code *)PTR_hash_insert_00144fcc)" (( "(") (pointer_expression "*(code *)PTR_hash_insert_00144fcc" (* "*") (cast_expression "(code *)PTR_hash_insert_00144fcc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_hash_insert_00144fcc"))) () ")")) (argument_list "(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)" (( "(") (identifier "uVar2") (, ",") (pointer_expression "*(undefined4 *)PTR_shell_functions_00144700" (* "*") (cast_expression "(undefined4 *)PTR_shell_functions_00144700" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_shell_functions_00144700"))) (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "iVar1 = FUN_000531c8(param_1);" (assignment_expression "iVar1 = FUN_000531c8(param_1)" (identifier "iVar1") (= "=") (call_expression "FUN_000531c8(param_1)" (identifier "FUN_000531c8") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "*(int *)(iVar5 + 8) = iVar1;" (assignment_expression "*(int *)(iVar5 + 8) = iVar1" (pointer_expression "*(int *)(iVar5 + 8)" (* "*") (cast_expression "(int *)(iVar5 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 8)" (( "(") (binary_expression "iVar5 + 8" (identifier "iVar5") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (} "}")) (else_clause "else if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }" (else "else") (if_statement "if (*(int *)(iVar1 + 8) != 0) {\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 8) != 0)" (( "(") (binary_expression "*(int *)(iVar1 + 8) != 0" (pointer_expression "*(int *)(iVar1 + 8)" (* "*") (cast_expression "(int *)(iVar1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 8)" (( "(") (binary_expression "iVar1 + 8" (identifier "iVar1") (+ "+") (number_literal "8")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    (*(code *)PTR_free_001464fc)();\n    *(undefined4 *)(iVar1 + 8) = 0;\n  }" ({ "{") (expression_statement "(*(code *)PTR_free_001464fc)();" (call_expression "(*(code *)PTR_free_001464fc)()" (parenthesized_expression "(*(code *)PTR_free_001464fc)" (( "(") (pointer_expression "*(code *)PTR_free_001464fc" (* "*") (cast_expression "(code *)PTR_free_001464fc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_001464fc"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 8)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 8)" (( "(") (binary_expression "iVar1 + 8" (identifier "iVar1") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))))) (if_statement "if (*(int *)(iVar1 + 4) != 0) {\n    dispose_command();\n  }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 4) != 0)" (( "(") (binary_expression "*(int *)(iVar1 + 4) != 0" (pointer_expression "*(int *)(iVar1 + 4)" (* "*") (cast_expression "(int *)(iVar1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 4)" (( "(") (binary_expression "iVar1 + 4" (identifier "iVar1") (+ "+") (number_literal "4")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    dispose_command();\n  }" ({ "{") (expression_statement "dispose_command();" (call_expression "dispose_command()" (identifier "dispose_command") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_2 == 0) {\n    *(undefined4 *)(iVar1 + 4) = 0;\n  }\n  else {\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *(undefined4 *)(iVar1 + 4) = 0;\n  }" ({ "{") (expression_statement "*(undefined4 *)(iVar1 + 4) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 4) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 4)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 4)" (( "(") (binary_expression "iVar1 + 4" (identifier "iVar1") (+ "+") (number_literal "4")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }" (else "else") (compound_statement "{\n    uVar2 = copy_command(param_2);\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n  }" ({ "{") (expression_statement "uVar2 = copy_command(param_2);" (assignment_expression "uVar2 = copy_command(param_2)" (identifier "uVar2") (= "=") (call_expression "copy_command(param_2)" (identifier "copy_command") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 4) = uVar2;" (assignment_expression "*(undefined4 *)(iVar1 + 4) = uVar2" (pointer_expression "*(undefined4 *)(iVar1 + 4)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 4)" (( "(") (binary_expression "iVar1 + 4" (identifier "iVar1") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (} "}")))) (expression_statement "uVar4 = *(uint *)(iVar1 + 0x14);" (assignment_expression "uVar4 = *(uint *)(iVar1 + 0x14)" (identifier "uVar4") (= "=") (pointer_expression "*(uint *)(iVar1 + 0x14)" (* "*") (cast_expression "(uint *)(iVar1 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x14)" (( "(") (binary_expression "iVar1 + 0x14" (identifier "iVar1") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "iVar5 = *(int *)PTR_mark_modified_vars_00144fb4;" (assignment_expression "iVar5 = *(int *)PTR_mark_modified_vars_00144fb4" (identifier "iVar5") (= "=") (pointer_expression "*(int *)PTR_mark_modified_vars_00144fb4" (* "*") (cast_expression "(int *)PTR_mark_modified_vars_00144fb4" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_mark_modified_vars_00144fb4")))) (; ";")) (expression_statement "uVar3 = uVar4 | 8;" (assignment_expression "uVar3 = uVar4 | 8" (identifier "uVar3") (= "=") (binary_expression "uVar4 | 8" (identifier "uVar4") (| "|") (number_literal "8"))) (; ";")) (expression_statement "*(uint *)(iVar1 + 0x14) = uVar3;" (assignment_expression "*(uint *)(iVar1 + 0x14) = uVar3" (pointer_expression "*(uint *)(iVar1 + 0x14)" (* "*") (cast_expression "(uint *)(iVar1 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x14)" (( "(") (binary_expression "iVar1 + 0x14" (identifier "iVar1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (if_statement "if (iVar5 != 0) {\n    uVar3 = uVar4 | 9;\n  }" (if "if") (parenthesized_expression "(iVar5 != 0)" (( "(") (binary_expression "iVar5 != 0" (identifier "iVar5") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar3 = uVar4 | 9;\n  }" ({ "{") (expression_statement "uVar3 = uVar4 | 9;" (assignment_expression "uVar3 = uVar4 | 9" (identifier "uVar3") (= "=") (binary_expression "uVar4 | 9" (identifier "uVar4") (| "|") (number_literal "9"))) (; ";")) (} "}"))) (expression_statement "*(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff;" (assignment_expression "*(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff" (pointer_expression "*(uint *)(iVar1 + 0x14)" (* "*") (cast_expression "(uint *)(iVar1 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x14)" (( "(") (binary_expression "iVar1 + 0x14" (identifier "iVar1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (binary_expression "uVar3 & 0xffffefff" (identifier "uVar3") (& "&") (number_literal "0xffffefff"))) (; ";")) (if_statement "if ((uVar3 & 1) != 0) {\n    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n  }" (if "if") (parenthesized_expression "((uVar3 & 1) != 0)" (( "(") (binary_expression "(uVar3 & 1) != 0" (parenthesized_expression "(uVar3 & 1)" (( "(") (binary_expression "uVar3 & 1" (identifier "uVar3") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;\n  }" ({ "{") (expression_statement "*(undefined4 *)PTR_array_needs_making_00144fb8 = 1;" (assignment_expression "*(undefined4 *)PTR_array_needs_making_00144fb8 = 1" (pointer_expression "*(undefined4 *)PTR_array_needs_making_00144fb8" (* "*") (cast_expression "(undefined4 *)PTR_array_needs_making_00144fb8" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_array_needs_making_00144fb8"))) (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);" (call_expression "(*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8)" (parenthesized_expression "(*(code *)PTR_set_itemlist_dirty_00144fc4)" (( "(") (pointer_expression "*(code *)PTR_set_itemlist_dirty_00144fc4" (* "*") (cast_expression "(code *)PTR_set_itemlist_dirty_00144fc4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_set_itemlist_dirty_00144fc4"))) () ")")) (argument_list "(PTR_it_functions_00144fc8)" (( "(") (identifier "PTR_it_functions_00144fc8") () ")"))) (; ";")) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

type_1 * function_1(char *name,type_2 *var_6)

{
  type_1 *var_2;
  type_2 *pCVar2;
  type_3 var_9;
  type_4 uVar4;
  type_3 var_8;
  int var_3;
  
  var_2 = var_1(name);
  if (var_2 == (type_1 *)0x0) {
    var_3 = (*(type_5 *)PTR_strlen_00146390)(name);
    uVar4 = (*(type_5 *)PTR_xmalloc_001445b0)(var_3 + 1);
    uVar4 = (*(type_5 *)PTR_strcpy_00146418)(uVar4,name);
    var_3 = (*(type_5 *)PTR_hash_insert_00144fcc)(uVar4,*(type_4 *)PTR_shell_functions_00144700,1)
    ;
    var_2 = var_4(name);
    *(type_1 **)(var_3 + 8) = var_2;
  }
  else if (var_2->exportstr != (char *)0x0) {
    (*(type_5 *)PTR_free_001464fc)();
    var_2->exportstr = (char *)0x0;
  }
  if ((type_2 *)var_2->var_6 != (type_2 *)0x0) {
    var_5((type_2 *)var_2->var_6);
  }
  if (var_6 != (type_2 *)0x0) {
    pCVar2 = var_7(var_6);
    var_2->var_6 = (char *)pCVar2;
    var_8 = var_2->attributes;
    var_3 = *(int *)PTR_mark_modified_vars_00144fb4;
    var_9 = var_8 | 8;
    var_2->attributes = var_9;
    if (var_3 != 0) {
      var_9 = var_8 | 9;
    }
    var_2->attributes = var_9 & 0xffffefff;
    if ((var_9 & 1) != 0) {
      *(type_4 *)PTR_array_needs_making_00144fb8 = 1;
    }
    (*(type_5 *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);
    return var_2;
  }
  var_2->var_6 = (char *)0x0;
  var_2 = (type_1 *)var_10();
  return var_2;
}


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

int MASKED(undefined4 param_1,int param_2)

{
  int iVar1;
  undefined4 uVar2;
  uint uVar3;
  uint uVar4;
  int iVar5;
  
  iVar1 = find_function();
  if (iVar1 == 0) {
    iVar1 = (*(code *)PTR_strlen_00146390)(param_1);
    uVar2 = (*(code *)PTR_xmalloc_001445b0)(iVar1 + 1);
    uVar2 = (*(code *)PTR_strcpy_00146418)(uVar2,param_1);
    iVar5 = (*(code *)PTR_hash_insert_00144fcc)(uVar2,*(undefined4 *)PTR_shell_functions_00144700,1)
    ;
    iVar1 = FUN_000531c8(param_1);
    *(int *)(iVar5 + 8) = iVar1;
  }
  else if (*(int *)(iVar1 + 8) != 0) {
    (*(code *)PTR_free_001464fc)();
    *(undefined4 *)(iVar1 + 8) = 0;
  }
  if (*(int *)(iVar1 + 4) != 0) {
    dispose_command();
  }
  if (param_2 == 0) {
    *(undefined4 *)(iVar1 + 4) = 0;
  }
  else {
    uVar2 = copy_command(param_2);
    *(undefined4 *)(iVar1 + 4) = uVar2;
  }
  uVar4 = *(uint *)(iVar1 + 0x14);
  iVar5 = *(int *)PTR_mark_modified_vars_00144fb4;
  uVar3 = uVar4 | 8;
  *(uint *)(iVar1 + 0x14) = uVar3;
  if (iVar5 != 0) {
    uVar3 = uVar4 | 9;
  }
  *(uint *)(iVar1 + 0x14) = uVar3 & 0xffffefff;
  if ((uVar3 & 1) != 0) {
    *(undefined4 *)PTR_array_needs_making_00144fb8 = 1;
  }
  (*(code *)PTR_set_itemlist_dirty_00144fc4)(PTR_it_functions_00144fc8);
  return iVar1;
}

