
int chkexport(char *name)

{
  SHELL_VAR *pSVar1;
  uint uVar2;
  
  pSVar1 = find_variable(name);
  uVar2 = 0;
  if ((pSVar1 != (SHELL_VAR *)0x0) && (uVar2 = pSVar1->attributes & 1, uVar2 != 0)) {
    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;
    maybe_make_export_env();
  }
  return uVar2;
}



uint chkexport(void)

{
  int iVar1;
  uint uVar2;
  
  iVar1 = find_variable();
  uVar2 = 0;
  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)) {
    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;
    maybe_make_export_env();
  }
  return uVar2;
}


lui gp,0x10
addiu gp,gp,-0x5c
addu gp,gp,t9
addiu sp,sp,-0x20
sw ra,0x1c(sp)
sw s0,0x18(sp)
sw gp,0x10(sp)
lw t9,-0x7dac(gp)
bal 0x0005835c
_nop
lw gp,0x10(sp)
beq v0,zero,0x0005e5e0
_or s0,zero,zero
lw s0,0x14(v0)
andi s0,s0,0x1
bne s0,zero,0x0005e5f4
_lw v0,-0x754c(gp)
or v0,s0,zero
lw ra,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x20
li v1,0x1
sw v1,0x0(v0)
lw t9,-0x7828(gp)
bal 0x0005e24c
_nop
lw gp,0x10(sp)
b 0x0005e5e4
_or v0,s0,zero
(translation_unit "uint chkexport(void)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = find_variable();\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)) {\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }\n  return uVar2;\n}\n\n" (function_definition "uint chkexport(void)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = find_variable();\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)) {\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }\n  return uVar2;\n}" type_identifier (function_declarator "chkexport(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = find_variable();\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)) {\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = find_variable();" (assignment_expression "iVar1 = find_variable()" identifier = (call_expression "find_variable()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)) {\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }" if (parenthesized_expression "((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0))" ( (binary_expression "(iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) && (parenthesized_expression "(uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)" ( (comma_expression "uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0" (assignment_expression "uVar2 = *(uint *)(iVar1 + 0x14) & 1" identifier = (binary_expression "*(uint *)(iVar1 + 0x14) & 1" (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) )))) & number_literal)) , (binary_expression "uVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }" { (expression_statement "*(undefined4 *)PTR_array_needs_making_00156ff4 = 1;" (assignment_expression "*(undefined4 *)PTR_array_needs_making_00156ff4 = 1" (pointer_expression "*(undefined4 *)PTR_array_needs_making_00156ff4" * (cast_expression "(undefined4 *)PTR_array_needs_making_00156ff4" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) (expression_statement "maybe_make_export_env();" (call_expression "maybe_make_export_env()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "int chkexport(char *name)\n\n{\n  SHELL_VAR *pSVar1;\n  uint uVar2;\n  \n  pSVar1 = find_variable(name);\n  uVar2 = 0;\n  if ((pSVar1 != (SHELL_VAR *)0x0) && (uVar2 = pSVar1->attributes & 1, uVar2 != 0)) {\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }\n  return uVar2;\n}\n\n" (function_definition "int chkexport(char *name)\n\n{\n  SHELL_VAR *pSVar1;\n  uint uVar2;\n  \n  pSVar1 = find_variable(name);\n  uVar2 = 0;\n  if ((pSVar1 != (SHELL_VAR *)0x0) && (uVar2 = pSVar1->attributes & 1, uVar2 != 0)) {\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }\n  return uVar2;\n}" primitive_type (function_declarator "chkexport(char *name)" identifier (parameter_list "(char *name)" ( (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) ))) (compound_statement "{\n  SHELL_VAR *pSVar1;\n  uint uVar2;\n  \n  pSVar1 = find_variable(name);\n  uVar2 = 0;\n  if ((pSVar1 != (SHELL_VAR *)0x0) && (uVar2 = pSVar1->attributes & 1, uVar2 != 0)) {\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }\n  return uVar2;\n}" { (declaration "SHELL_VAR *pSVar1;" type_identifier (pointer_declarator "*pSVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "pSVar1 = find_variable(name);" (assignment_expression "pSVar1 = find_variable(name)" identifier = (call_expression "find_variable(name)" identifier (argument_list "(name)" ( identifier )))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if ((pSVar1 != (SHELL_VAR *)0x0) && (uVar2 = pSVar1->attributes & 1, uVar2 != 0)) {\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }" if (parenthesized_expression "((pSVar1 != (SHELL_VAR *)0x0) && (uVar2 = pSVar1->attributes & 1, uVar2 != 0))" ( (binary_expression "(pSVar1 != (SHELL_VAR *)0x0) && (uVar2 = pSVar1->attributes & 1, uVar2 != 0)" (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)) )) && (parenthesized_expression "(uVar2 = pSVar1->attributes & 1, uVar2 != 0)" ( (comma_expression "uVar2 = pSVar1->attributes & 1, uVar2 != 0" (assignment_expression "uVar2 = pSVar1->attributes & 1" identifier = (binary_expression "pSVar1->attributes & 1" (field_expression "pSVar1->attributes" identifier -> field_identifier) & number_literal)) , (binary_expression "uVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }" { (expression_statement "*(undefined4 *)PTR_array_needs_making_00156ff4 = 1;" (assignment_expression "*(undefined4 *)PTR_array_needs_making_00156ff4 = 1" (pointer_expression "*(undefined4 *)PTR_array_needs_making_00156ff4" * (cast_expression "(undefined4 *)PTR_array_needs_making_00156ff4" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) (expression_statement "maybe_make_export_env();" (call_expression "maybe_make_export_env()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "uint chkexport(void)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = find_variable();\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)) {\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }\n  return uVar2;\n}\n\n" (function_definition "uint chkexport(void)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = find_variable();\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)) {\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }\n  return uVar2;\n}" type_identifier (function_declarator "chkexport(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = find_variable();\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)) {\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = find_variable();" (assignment_expression "iVar1 = find_variable()" identifier = (call_expression "find_variable()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)) {\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }" if (parenthesized_expression "((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0))" ( (binary_expression "(iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) && (parenthesized_expression "(uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)" ( (comma_expression "uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0" (assignment_expression "uVar2 = *(uint *)(iVar1 + 0x14) & 1" identifier = (binary_expression "*(uint *)(iVar1 + 0x14) & 1" (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) )))) & number_literal)) , (binary_expression "uVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }" { (expression_statement "*(undefined4 *)PTR_array_needs_making_00156ff4 = 1;" (assignment_expression "*(undefined4 *)PTR_array_needs_making_00156ff4 = 1" (pointer_expression "*(undefined4 *)PTR_array_needs_making_00156ff4" * (cast_expression "(undefined4 *)PTR_array_needs_making_00156ff4" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) (expression_statement "maybe_make_export_env();" (call_expression "maybe_make_export_env()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT)) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "uint chkexport(void)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = find_variable();\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)) {\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }\n  return uVar2;\n}" (type_identifier "uint") (function_declarator "chkexport(void)" (identifier "chkexport") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = find_variable();\n  uVar2 = 0;\n  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)) {\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (expression_statement "iVar1 = find_variable();" (assignment_expression "iVar1 = find_variable()" (identifier "iVar1") (= "=") (call_expression "find_variable()" (identifier "find_variable") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)) {\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }" (if "if") (parenthesized_expression "((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0))" (( "(") (binary_expression "(iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)" (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)" (( "(") (comma_expression "uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0" (assignment_expression "uVar2 = *(uint *)(iVar1 + 0x14) & 1" (identifier "uVar2") (= "=") (binary_expression "*(uint *)(iVar1 + 0x14) & 1" (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")) () ")")))) (& "&") (number_literal "1"))) (, ",") (binary_expression "uVar2 != 0" (identifier "uVar2") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;\n    maybe_make_export_env();\n  }" ({ "{") (expression_statement "*(undefined4 *)PTR_array_needs_making_00156ff4 = 1;" (assignment_expression "*(undefined4 *)PTR_array_needs_making_00156ff4 = 1" (pointer_expression "*(undefined4 *)PTR_array_needs_making_00156ff4" (* "*") (cast_expression "(undefined4 *)PTR_array_needs_making_00156ff4" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_array_needs_making_00156ff4"))) (= "=") (number_literal "1")) (; ";")) (expression_statement "maybe_make_export_env();" (call_expression "maybe_make_export_env()" (identifier "maybe_make_export_env") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_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))) right: (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: (identifier))) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement (identifier)))))

uint MASKED(void)

{
  int iVar1;
  uint uVar2;
  
  iVar1 = find_variable();
  uVar2 = 0;
  if ((iVar1 != 0) && (uVar2 = *(uint *)(iVar1 + 0x14) & 1, uVar2 != 0)) {
    *(undefined4 *)PTR_array_needs_making_00156ff4 = 1;
    maybe_make_export_env();
  }
  return uVar2;
}

