
int shopt_listopt(char *name,int reusable)

{
  int iVar1;
  
  if (name == (char *)0x0) {
    if (reusable != 0) {
      reusable = 0x10;
    }
    iVar1 = list_shopts((WORD_LIST *)0x0,reusable);
  }
  else {
    iVar1 = find_shopt(name);
    if (iVar1 < 0) {
      shopt_error(name);
      iVar1 = 1;
    }
    else {
      if (reusable != 0) {
        reusable = 0x10;
      }
      print_shopt(name,*shopt_vars[iVar1].value,reusable);
      iVar1 = sh_chkwrite(0);
    }
  }
  return iVar1;
}



undefined8 shopt_listopt(long param_1,int param_2)

{
  int iVar1;
  undefined8 uVar2;
  
  if (param_1 == 0) {
    if (param_2 != 0) {
      param_2 = 0x10;
    }
    uVar2 = FUN_0019b7a2(0,param_2);
  }
  else {
    iVar1 = FUN_0019b606();
    if (iVar1 < 0) {
      FUN_0019b4ce(param_1);
      uVar2 = 1;
    }
    else {
      if (param_2 != 0) {
        param_2 = 0x10;
      }
      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);
      uVar2 = sh_chkwrite(0);
    }
  }
  return uVar2;
}


PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV EBX,ESI
TEST RDI,RDI
JZ 0x0019bb7b
MOV RBP,RDI
CALL 0x0019b606
TEST EAX,EAX
JS 0x0019bb93
TEST EBX,EBX
MOV EDX,0x10
CMOVNZ EBX,EDX
CDQE
LEA RDX,[RAX + RAX*0x2]
LEA RAX,[0x208be0]
MOV RAX,qword ptr [RAX + RDX*0x8 + 0x8]
MOV EDX,EBX
MOV ESI,dword ptr [RAX]
MOV RDI,RBP
CALL 0x0019b4fa
MOV EDI,0x0
CALL 0x0018a4f4
ADD RSP,0x8
POP RBX
POP RBP
RET
TEST ESI,ESI
MOV EAX,0x10
CMOVNZ EBX,EAX
MOV ESI,EBX
MOV EDI,0x0
CALL 0x0019b7a2
JMP 0x0019bb74
MOV RDI,RBP
CALL 0x0019b4ce
MOV EAX,0x1
JMP 0x0019bb74
(translation_unit "undefined8 shopt_listopt(long param_1,int param_2)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_1 == 0) {\n    if (param_2 != 0) {\n      param_2 = 0x10;\n    }\n    uVar2 = FUN_0019b7a2(0,param_2);\n  }\n  else {\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined8 shopt_listopt(long param_1,int param_2)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_1 == 0) {\n    if (param_2 != 0) {\n      param_2 = 0x10;\n    }\n    uVar2 = FUN_0019b7a2(0,param_2);\n  }\n  else {\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }\n  return uVar2;\n}" type_identifier (function_declarator "shopt_listopt(long param_1,int param_2)" identifier (parameter_list "(long param_1,int param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_1 == 0) {\n    if (param_2 != 0) {\n      param_2 = 0x10;\n    }\n    uVar2 = FUN_0019b7a2(0,param_2);\n  }\n  else {\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n    if (param_2 != 0) {\n      param_2 = 0x10;\n    }\n    uVar2 = FUN_0019b7a2(0,param_2);\n  }\n  else {\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    if (param_2 != 0) {\n      param_2 = 0x10;\n    }\n    uVar2 = FUN_0019b7a2(0,param_2);\n  }" { (if_statement "if (param_2 != 0) {\n      param_2 = 0x10;\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      param_2 = 0x10;\n    }" { (expression_statement "param_2 = 0x10;" (assignment_expression "param_2 = 0x10" identifier = number_literal) ;) })) (expression_statement "uVar2 = FUN_0019b7a2(0,param_2);" (assignment_expression "uVar2 = FUN_0019b7a2(0,param_2)" identifier = (call_expression "FUN_0019b7a2(0,param_2)" identifier (argument_list "(0,param_2)" ( number_literal , identifier )))) ;) }) (else_clause "else {\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }" else (compound_statement "{\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }" { (expression_statement "iVar1 = FUN_0019b606();" (assignment_expression "iVar1 = FUN_0019b606()" identifier = (call_expression "FUN_0019b606()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }" { (expression_statement "FUN_0019b4ce(param_1);" (call_expression "FUN_0019b4ce(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) }) (else_clause "else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }" else (compound_statement "{\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }" { (if_statement "if (param_2 != 0) {\n        param_2 = 0x10;\n      }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n        param_2 = 0x10;\n      }" { (expression_statement "param_2 = 0x10;" (assignment_expression "param_2 = 0x10" identifier = number_literal) ;) })) (expression_statement "FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);" (call_expression "FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2)" identifier (argument_list "(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2)" ( identifier , (pointer_expression "*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3]" * (cast_expression "(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "(&PTR_autocd_00208be8)[(long)iVar1 * 3]" (parenthesized_expression "(&PTR_autocd_00208be8)" ( (pointer_expression "&PTR_autocd_00208be8" & identifier) )) [ (binary_expression "(long)iVar1 * 3" (cast_expression "(long)iVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal) ]))) , identifier ))) ;) (expression_statement "uVar2 = sh_chkwrite(0);" (assignment_expression "uVar2 = sh_chkwrite(0)" identifier = (call_expression "sh_chkwrite(0)" identifier (argument_list "(0)" ( number_literal )))) ;) }))) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "int shopt_listopt(char *name,int reusable)\n\n{\n  int iVar1;\n  \n  if (name == (char *)0x0) {\n    if (reusable != 0) {\n      reusable = 0x10;\n    }\n    iVar1 = list_shopts((WORD_LIST *)0x0,reusable);\n  }\n  else {\n    iVar1 = find_shopt(name);\n    if (iVar1 < 0) {\n      shopt_error(name);\n      iVar1 = 1;\n    }\n    else {\n      if (reusable != 0) {\n        reusable = 0x10;\n      }\n      print_shopt(name,*shopt_vars[iVar1].value,reusable);\n      iVar1 = sh_chkwrite(0);\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int shopt_listopt(char *name,int reusable)\n\n{\n  int iVar1;\n  \n  if (name == (char *)0x0) {\n    if (reusable != 0) {\n      reusable = 0x10;\n    }\n    iVar1 = list_shopts((WORD_LIST *)0x0,reusable);\n  }\n  else {\n    iVar1 = find_shopt(name);\n    if (iVar1 < 0) {\n      shopt_error(name);\n      iVar1 = 1;\n    }\n    else {\n      if (reusable != 0) {\n        reusable = 0x10;\n      }\n      print_shopt(name,*shopt_vars[iVar1].value,reusable);\n      iVar1 = sh_chkwrite(0);\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "shopt_listopt(char *name,int reusable)" identifier (parameter_list "(char *name,int reusable)" ( (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "int reusable" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if (name == (char *)0x0) {\n    if (reusable != 0) {\n      reusable = 0x10;\n    }\n    iVar1 = list_shopts((WORD_LIST *)0x0,reusable);\n  }\n  else {\n    iVar1 = find_shopt(name);\n    if (iVar1 < 0) {\n      shopt_error(name);\n      iVar1 = 1;\n    }\n    else {\n      if (reusable != 0) {\n        reusable = 0x10;\n      }\n      print_shopt(name,*shopt_vars[iVar1].value,reusable);\n      iVar1 = sh_chkwrite(0);\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (name == (char *)0x0) {\n    if (reusable != 0) {\n      reusable = 0x10;\n    }\n    iVar1 = list_shopts((WORD_LIST *)0x0,reusable);\n  }\n  else {\n    iVar1 = find_shopt(name);\n    if (iVar1 < 0) {\n      shopt_error(name);\n      iVar1 = 1;\n    }\n    else {\n      if (reusable != 0) {\n        reusable = 0x10;\n      }\n      print_shopt(name,*shopt_vars[iVar1].value,reusable);\n      iVar1 = sh_chkwrite(0);\n    }\n  }" if (parenthesized_expression "(name == (char *)0x0)" ( (binary_expression "name == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (reusable != 0) {\n      reusable = 0x10;\n    }\n    iVar1 = list_shopts((WORD_LIST *)0x0,reusable);\n  }" { (if_statement "if (reusable != 0) {\n      reusable = 0x10;\n    }" if (parenthesized_expression "(reusable != 0)" ( (binary_expression "reusable != 0" identifier != number_literal) )) (compound_statement "{\n      reusable = 0x10;\n    }" { (expression_statement "reusable = 0x10;" (assignment_expression "reusable = 0x10" identifier = number_literal) ;) })) (expression_statement "iVar1 = list_shopts((WORD_LIST *)0x0,reusable);" (assignment_expression "iVar1 = list_shopts((WORD_LIST *)0x0,reusable)" identifier = (call_expression "list_shopts((WORD_LIST *)0x0,reusable)" identifier (argument_list "((WORD_LIST *)0x0,reusable)" ( (cast_expression "(WORD_LIST *)0x0" ( (type_descriptor "WORD_LIST *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , identifier )))) ;) }) (else_clause "else {\n    iVar1 = find_shopt(name);\n    if (iVar1 < 0) {\n      shopt_error(name);\n      iVar1 = 1;\n    }\n    else {\n      if (reusable != 0) {\n        reusable = 0x10;\n      }\n      print_shopt(name,*shopt_vars[iVar1].value,reusable);\n      iVar1 = sh_chkwrite(0);\n    }\n  }" else (compound_statement "{\n    iVar1 = find_shopt(name);\n    if (iVar1 < 0) {\n      shopt_error(name);\n      iVar1 = 1;\n    }\n    else {\n      if (reusable != 0) {\n        reusable = 0x10;\n      }\n      print_shopt(name,*shopt_vars[iVar1].value,reusable);\n      iVar1 = sh_chkwrite(0);\n    }\n  }" { (expression_statement "iVar1 = find_shopt(name);" (assignment_expression "iVar1 = find_shopt(name)" identifier = (call_expression "find_shopt(name)" identifier (argument_list "(name)" ( identifier )))) ;) (if_statement "if (iVar1 < 0) {\n      shopt_error(name);\n      iVar1 = 1;\n    }\n    else {\n      if (reusable != 0) {\n        reusable = 0x10;\n      }\n      print_shopt(name,*shopt_vars[iVar1].value,reusable);\n      iVar1 = sh_chkwrite(0);\n    }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n      shopt_error(name);\n      iVar1 = 1;\n    }" { (expression_statement "shopt_error(name);" (call_expression "shopt_error(name)" identifier (argument_list "(name)" ( identifier ))) ;) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) }) (else_clause "else {\n      if (reusable != 0) {\n        reusable = 0x10;\n      }\n      print_shopt(name,*shopt_vars[iVar1].value,reusable);\n      iVar1 = sh_chkwrite(0);\n    }" else (compound_statement "{\n      if (reusable != 0) {\n        reusable = 0x10;\n      }\n      print_shopt(name,*shopt_vars[iVar1].value,reusable);\n      iVar1 = sh_chkwrite(0);\n    }" { (if_statement "if (reusable != 0) {\n        reusable = 0x10;\n      }" if (parenthesized_expression "(reusable != 0)" ( (binary_expression "reusable != 0" identifier != number_literal) )) (compound_statement "{\n        reusable = 0x10;\n      }" { (expression_statement "reusable = 0x10;" (assignment_expression "reusable = 0x10" identifier = number_literal) ;) })) (expression_statement "print_shopt(name,*shopt_vars[iVar1].value,reusable);" (call_expression "print_shopt(name,*shopt_vars[iVar1].value,reusable)" identifier (argument_list "(name,*shopt_vars[iVar1].value,reusable)" ( identifier , (pointer_expression "*shopt_vars[iVar1].value" * (field_expression "shopt_vars[iVar1].value" (subscript_expression "shopt_vars[iVar1]" identifier [ identifier ]) . field_identifier)) , identifier ))) ;) (expression_statement "iVar1 = sh_chkwrite(0);" (assignment_expression "iVar1 = sh_chkwrite(0)" identifier = (call_expression "sh_chkwrite(0)" identifier (argument_list "(0)" ( number_literal )))) ;) }))) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined8 shopt_listopt(long param_1,int param_2)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_1 == 0) {\n    if (param_2 != 0) {\n      param_2 = 0x10;\n    }\n    uVar2 = FUN_0019b7a2(0,param_2);\n  }\n  else {\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined8 shopt_listopt(long param_1,int param_2)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_1 == 0) {\n    if (param_2 != 0) {\n      param_2 = 0x10;\n    }\n    uVar2 = FUN_0019b7a2(0,param_2);\n  }\n  else {\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }\n  return uVar2;\n}" type_identifier (function_declarator "shopt_listopt(long param_1,int param_2)" identifier (parameter_list "(long param_1,int param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_1 == 0) {\n    if (param_2 != 0) {\n      param_2 = 0x10;\n    }\n    uVar2 = FUN_0019b7a2(0,param_2);\n  }\n  else {\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n    if (param_2 != 0) {\n      param_2 = 0x10;\n    }\n    uVar2 = FUN_0019b7a2(0,param_2);\n  }\n  else {\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    if (param_2 != 0) {\n      param_2 = 0x10;\n    }\n    uVar2 = FUN_0019b7a2(0,param_2);\n  }" { (if_statement "if (param_2 != 0) {\n      param_2 = 0x10;\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      param_2 = 0x10;\n    }" { (expression_statement "param_2 = 0x10;" (assignment_expression "param_2 = 0x10" identifier = number_literal) ;) })) (expression_statement "uVar2 = FUN_0019b7a2(0,param_2);" (assignment_expression "uVar2 = FUN_0019b7a2(0,param_2)" identifier = (call_expression "FUN_0019b7a2(0,param_2)" identifier (argument_list "(0,param_2)" ( number_literal , identifier )))) ;) }) (else_clause "else {\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }" else (compound_statement "{\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }" { (expression_statement "iVar1 = FUN_0019b606();" (assignment_expression "iVar1 = FUN_0019b606()" identifier = (call_expression "FUN_0019b606()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }" { (expression_statement "FUN_0019b4ce(param_1);" (call_expression "FUN_0019b4ce(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) }) (else_clause "else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }" else (compound_statement "{\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }" { (if_statement "if (param_2 != 0) {\n        param_2 = 0x10;\n      }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n        param_2 = 0x10;\n      }" { (expression_statement "param_2 = 0x10;" (assignment_expression "param_2 = 0x10" identifier = number_literal) ;) })) (expression_statement "FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);" (call_expression "FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2)" identifier (argument_list "(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2)" ( identifier , (pointer_expression "*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3]" * (cast_expression "(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "(&PTR_autocd_00208be8)[(long)iVar1 * 3]" (parenthesized_expression "(&PTR_autocd_00208be8)" ( (pointer_expression "&PTR_autocd_00208be8" & identifier) )) [ (binary_expression "(long)iVar1 * 3" (cast_expression "(long)iVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal) ]))) , identifier ))) ;) (expression_statement "uVar2 = sh_chkwrite(0);" (assignment_expression "uVar2 = sh_chkwrite(0)" identifier = (call_expression "sh_chkwrite(0)" identifier (argument_list "(0)" ( number_literal )))) ;) }))) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) * LIT) ]))) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) }))) }))) (return_statement return IDENT ;) })))
(function_definition "undefined8 shopt_listopt(long param_1,int param_2)\n\n{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_1 == 0) {\n    if (param_2 != 0) {\n      param_2 = 0x10;\n    }\n    uVar2 = FUN_0019b7a2(0,param_2);\n  }\n  else {\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }\n  return uVar2;\n}" (type_identifier "undefined8") (function_declarator "shopt_listopt(long param_1,int param_2)" (identifier "shopt_listopt") (parameter_list "(long param_1,int param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined8 uVar2;\n  \n  if (param_1 == 0) {\n    if (param_2 != 0) {\n      param_2 = 0x10;\n    }\n    uVar2 = FUN_0019b7a2(0,param_2);\n  }\n  else {\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (if_statement "if (param_1 == 0) {\n    if (param_2 != 0) {\n      param_2 = 0x10;\n    }\n    uVar2 = FUN_0019b7a2(0,param_2);\n  }\n  else {\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_2 != 0) {\n      param_2 = 0x10;\n    }\n    uVar2 = FUN_0019b7a2(0,param_2);\n  }" ({ "{") (if_statement "if (param_2 != 0) {\n      param_2 = 0x10;\n    }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      param_2 = 0x10;\n    }" ({ "{") (expression_statement "param_2 = 0x10;" (assignment_expression "param_2 = 0x10" (identifier "param_2") (= "=") (number_literal "0x10")) (; ";")) (} "}"))) (expression_statement "uVar2 = FUN_0019b7a2(0,param_2);" (assignment_expression "uVar2 = FUN_0019b7a2(0,param_2)" (identifier "uVar2") (= "=") (call_expression "FUN_0019b7a2(0,param_2)" (identifier "FUN_0019b7a2") (argument_list "(0,param_2)" (( "(") (number_literal "0") (, ",") (identifier "param_2") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }" (else "else") (compound_statement "{\n    iVar1 = FUN_0019b606();\n    if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }\n  }" ({ "{") (expression_statement "iVar1 = FUN_0019b606();" (assignment_expression "iVar1 = FUN_0019b606()" (identifier "iVar1") (= "=") (call_expression "FUN_0019b606()" (identifier "FUN_0019b606") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 < 0) {\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }\n    else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }" (if "if") (parenthesized_expression "(iVar1 < 0)" (( "(") (binary_expression "iVar1 < 0" (identifier "iVar1") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_0019b4ce(param_1);\n      uVar2 = 1;\n    }" ({ "{") (expression_statement "FUN_0019b4ce(param_1);" (call_expression "FUN_0019b4ce(param_1)" (identifier "FUN_0019b4ce") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" (identifier "uVar2") (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }" (else "else") (compound_statement "{\n      if (param_2 != 0) {\n        param_2 = 0x10;\n      }\n      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);\n      uVar2 = sh_chkwrite(0);\n    }" ({ "{") (if_statement "if (param_2 != 0) {\n        param_2 = 0x10;\n      }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        param_2 = 0x10;\n      }" ({ "{") (expression_statement "param_2 = 0x10;" (assignment_expression "param_2 = 0x10" (identifier "param_2") (= "=") (number_literal "0x10")) (; ";")) (} "}"))) (expression_statement "FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);" (call_expression "FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2)" (identifier "FUN_0019b4fa") (argument_list "(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2)" (( "(") (identifier "param_1") (, ",") (pointer_expression "*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3]" (* "*") (cast_expression "(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "(&PTR_autocd_00208be8)[(long)iVar1 * 3]" (parenthesized_expression "(&PTR_autocd_00208be8)" (( "(") (pointer_expression "&PTR_autocd_00208be8" (& "&") (identifier "PTR_autocd_00208be8")) () ")")) ([ "[") (binary_expression "(long)iVar1 * 3" (cast_expression "(long)iVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar1")) (* "*") (number_literal "3")) (] "]")))) (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "uVar2 = sh_chkwrite(0);" (assignment_expression "uVar2 = sh_chkwrite(0)" (identifier "uVar2") (= "=") (call_expression "sh_chkwrite(0)" (identifier "sh_chkwrite") (argument_list "(0)" (( "(") (number_literal "0") () ")")))) (; ";")) (} "}")))) (} "}")))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

int function_1(char *var_1,int var_2)

{
  int var_5;
  
  if (var_1 == (char *)0x0) {
    if (var_2 != 0) {
      var_2 = 0x10;
    }
    var_5 = var_3((type_1 *)0x0,var_2);
  }
  else {
    var_5 = var_4(var_1);
    if (var_5 < 0) {
      var_6(var_1);
      var_5 = 1;
    }
    else {
      if (var_2 != 0) {
        var_2 = 0x10;
      }
      var_7(var_1,*shopt_vars[var_5].value,var_2);
      var_5 = var_8(0);
    }
  }
  return var_5;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (identifier)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (parenthesized_expression (pointer_expression argument: (identifier))) index: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal))))) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))))))))) (return_statement (identifier)))))

undefined8 MASKED(long param_1,int param_2)

{
  int iVar1;
  undefined8 uVar2;
  
  if (param_1 == 0) {
    if (param_2 != 0) {
      param_2 = 0x10;
    }
    uVar2 = FUN_0019b7a2(0,param_2);
  }
  else {
    iVar1 = FUN_0019b606();
    if (iVar1 < 0) {
      FUN_0019b4ce(param_1);
      uVar2 = 1;
    }
    else {
      if (param_2 != 0) {
        param_2 = 0x10;
      }
      FUN_0019b4fa(param_1,*(undefined4 *)(&PTR_autocd_00208be8)[(long)iVar1 * 3],param_2);
      uVar2 = sh_chkwrite(0);
    }
  }
  return uVar2;
}

