
/* WARNING: Unknown calling convention */

int getchr(void)

{
  undefined *puVar1;
  undefined *puVar2;
  uint uVar3;
  int iVar4;
  double in_f12_13;
  undefined8 uVar5;
  char c;
  int local_1c;
  
  puVar2 = PTR___stack_chk_guard_0004f374;
  puVar1 = PTR_tty_0004ecf4;
  local_1c = *(int *)PTR___stack_chk_guard_0004f374;
LAB_00034eb4:
  do {
    uVar3 = iread(*(int *)puVar1,&c,1);
    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;
    if ((int)uVar3 < 0) {
      quit(1);
      if (c != '\0') goto LAB_00034eb4;
LAB_00034ee0:
      c = -0x20;
    }
    else if (c == '\0') goto LAB_00034ee0;
    if (uVar3 == 1) {
      uVar3 = (uint)(byte)c;
LAB_00034ef0:
      if (local_1c == *(int *)puVar2) {
        return uVar3;
      }
      (*(code *)PTR___stack_chk_fail_0004f354)();
      if (0.0 <= in_f12_13) {
        iVar4 = __fixunsdfdi();
        return iVar4;
      }
      uVar5 = __fixunsdfdi(-in_f12_13);
      return -(uint)((int)uVar5 != 0) - (int)((ulonglong)uVar5 >> 0x20);
    }
  } while( true );
}



uint getchr(double param_1)

{
  undefined *puVar1;
  undefined *puVar2;
  uint uVar3;
  undefined8 uVar4;
  byte local_1d;
  int local_1c;
  
  puVar2 = PTR___stack_chk_guard_0004f374;
  puVar1 = PTR_tty_0004ecf4;
  local_1c = *(int *)PTR___stack_chk_guard_0004f374;
LAB_00034eb4:
  do {
    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);
    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;
    if ((int)uVar3 < 0) {
      quit(1);
      if (local_1d != 0) goto LAB_00034eb4;
LAB_00034ee0:
      local_1d = 0xe0;
    }
    else if (local_1d == 0) goto LAB_00034ee0;
    if (uVar3 == 1) {
      uVar3 = (uint)local_1d;
LAB_00034ef0:
      if (local_1c == *(int *)puVar2) {
        return uVar3;
      }
      (*(code *)PTR___stack_chk_fail_0004f354)();
      if (0.0 <= param_1) {
        uVar3 = FUN_00034fd0();
        return uVar3;
      }
      uVar4 = FUN_00034fd0(-param_1);
      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);
    }
  } while( true );
}


lui gp,0x2
addiu gp,gp,0x1d68
addu gp,gp,t9
addiu sp,sp,-0x40
sw s4,0x38(sp)
lw s4,-0x785c(gp)
sw s1,0x2c(sp)
sw s3,0x34(sp)
li s3,-0x20
sw s2,0x30(sp)
addiu s2,sp,0x23
sw s0,0x28(sp)
li s0,-0x2
sw gp,0x10(sp)
sw ra,0x3c(sp)
lw v0,0x0(s4)
lw s1,-0x7edc(gp)
sw v0,0x24(sp)
lw t9,-0x7e30(gp)
li a2,0x1
lw a0,0x0(s1)
bal 0x0002de60
_or a1,s2,zero
beq v0,s0,0x00034ef0
_lw gp,0x10(sp)
bltz v0,0x00034f1c
_lb v1,0x23(sp)
bne v1,zero,0x00034ee4
_li v1,0x1
sb s3,0x23(sp)
li v1,0x1
bne v0,v1,0x00034eb4
_lw t9,-0x7e30(gp)
lbu v0,0x23(sp)
lw a0,0x24(sp)
lw v1,0x0(s4)
bne a0,v1,0x00034f44
_lw ra,0x3c(sp)
lw s4,0x38(sp)
lw s3,0x34(sp)
lw s2,0x30(sp)
lw s1,0x2c(sp)
lw s0,0x28(sp)
jr ra
_addiu sp,sp,0x40
lw t9,-0x7f98(gp)
li a0,0x1
bal 0x000159ac
_sw v0,0x1c(sp)
lb v1,0x23(sp)
lw gp,0x10(sp)
bne v1,zero,0x00034eb0
_lw v0,0x1c(sp)
b 0x00034ee0
_sb s3,0x23(sp)
lw t9,-0x787c(gp)
jalr t9
_nop
(translation_unit "uint getchr(double param_1)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  byte local_1d;\n  int local_1c;\n  \n  puVar2 = PTR___stack_chk_guard_0004f374;\n  puVar1 = PTR_tty_0004ecf4;\n  local_1c = *(int *)PTR___stack_chk_guard_0004f374;\nLAB_00034eb4:\n  do {\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  } while( true );\n}\n\n" (function_definition "uint getchr(double param_1)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  byte local_1d;\n  int local_1c;\n  \n  puVar2 = PTR___stack_chk_guard_0004f374;\n  puVar1 = PTR_tty_0004ecf4;\n  local_1c = *(int *)PTR___stack_chk_guard_0004f374;\nLAB_00034eb4:\n  do {\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  } while( true );\n}" type_identifier (function_declarator "getchr(double param_1)" identifier (parameter_list "(double param_1)" ( (parameter_declaration "double param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  byte local_1d;\n  int local_1c;\n  \n  puVar2 = PTR___stack_chk_guard_0004f374;\n  puVar1 = PTR_tty_0004ecf4;\n  local_1c = *(int *)PTR___stack_chk_guard_0004f374;\nLAB_00034eb4:\n  do {\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  } while( true );\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (declaration "byte local_1d;" type_identifier identifier ;) (declaration "int local_1c;" primitive_type identifier ;) (expression_statement "puVar2 = PTR___stack_chk_guard_0004f374;" (assignment_expression "puVar2 = PTR___stack_chk_guard_0004f374" identifier = identifier) ;) (expression_statement "puVar1 = PTR_tty_0004ecf4;" (assignment_expression "puVar1 = PTR_tty_0004ecf4" identifier = identifier) ;) (expression_statement "local_1c = *(int *)PTR___stack_chk_guard_0004f374;" (assignment_expression "local_1c = *(int *)PTR___stack_chk_guard_0004f374" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_0004f374" * (cast_expression "(int *)PTR___stack_chk_guard_0004f374" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (labeled_statement "LAB_00034eb4:\n  do {\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  } while( true );" statement_identifier : (do_statement "do {\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  } while( true );" do (compound_statement "{\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  }" { (expression_statement "uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);" (assignment_expression "uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1)" identifier = (call_expression "iread(*(undefined4 *)puVar1,&local_1d,1)" identifier (argument_list "(*(undefined4 *)puVar1,&local_1d,1)" ( (pointer_expression "*(undefined4 *)puVar1" * (cast_expression "(undefined4 *)puVar1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) , (pointer_expression "&local_1d" & identifier) , number_literal )))) ;) (if_statement "if (uVar3 == 0xfffffffe) goto LAB_00034ef0;" if (parenthesized_expression "(uVar3 == 0xfffffffe)" ( (binary_expression "uVar3 == 0xfffffffe" identifier == number_literal) )) (goto_statement "goto LAB_00034ef0;" goto statement_identifier ;)) (if_statement "if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;" if (parenthesized_expression "((int)uVar3 < 0)" ( (binary_expression "(int)uVar3 < 0" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }" { (expression_statement "quit(1);" (call_expression "quit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) (if_statement "if (local_1d != 0) goto LAB_00034eb4;" if (parenthesized_expression "(local_1d != 0)" ( (binary_expression "local_1d != 0" identifier != number_literal) )) (goto_statement "goto LAB_00034eb4;" goto statement_identifier ;)) (labeled_statement "LAB_00034ee0:\n      local_1d = 0xe0;" statement_identifier : (expression_statement "local_1d = 0xe0;" (assignment_expression "local_1d = 0xe0" identifier = number_literal) ;)) }) (else_clause "else if (local_1d == 0) goto LAB_00034ee0;" else (if_statement "if (local_1d == 0) goto LAB_00034ee0;" if (parenthesized_expression "(local_1d == 0)" ( (binary_expression "local_1d == 0" identifier == number_literal) )) (goto_statement "goto LAB_00034ee0;" goto statement_identifier ;)))) (if_statement "if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }" if (parenthesized_expression "(uVar3 == 1)" ( (binary_expression "uVar3 == 1" identifier == number_literal) )) (compound_statement "{\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }" { (expression_statement "uVar3 = (uint)local_1d;" (assignment_expression "uVar3 = (uint)local_1d" identifier = (cast_expression "(uint)local_1d" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (labeled_statement "LAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }" statement_identifier : (if_statement "if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }" if (parenthesized_expression "(local_1c == *(int *)puVar2)" ( (binary_expression "local_1c == *(int *)puVar2" identifier == (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n        return uVar3;\n      }" { (return_statement "return uVar3;" return identifier ;) }))) (expression_statement "(*(code *)PTR___stack_chk_fail_0004f354)();" (call_expression "(*(code *)PTR___stack_chk_fail_0004f354)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_0004f354)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_0004f354" * (cast_expression "(code *)PTR___stack_chk_fail_0004f354" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (if_statement "if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }" if (parenthesized_expression "(0.0 <= param_1)" ( (binary_expression "0.0 <= param_1" number_literal <= identifier) )) (compound_statement "{\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }" { (expression_statement "uVar3 = FUN_00034fd0();" (assignment_expression "uVar3 = FUN_00034fd0()" identifier = (call_expression "FUN_00034fd0()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "uVar4 = FUN_00034fd0(-param_1);" (assignment_expression "uVar4 = FUN_00034fd0(-param_1)" identifier = (call_expression "FUN_00034fd0(-param_1)" identifier (argument_list "(-param_1)" ( (unary_expression "-param_1" - identifier) )))) ;) (return_statement "return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);" return (binary_expression "-(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20)" (unary_expression "-(uint)((int)uVar4 != 0)" - (call_expression "(uint)((int)uVar4 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)uVar4 != 0)" ( (binary_expression "(int)uVar4 != 0" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )))) - (cast_expression "(int)((ulonglong)uVar4 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar4 >> 0x20)" ( (binary_expression "(ulonglong)uVar4 >> 0x20" (cast_expression "(ulonglong)uVar4" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) ;) })) }) while (parenthesized_expression "( true )" ( true )) ;)) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint getchr(void)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  uint uVar3;\n  int iVar4;\n  double in_f12_13;\n  undefined8 uVar5;\n  char c;\n  int local_1c;\n  \n  puVar2 = PTR___stack_chk_guard_0004f374;\n  puVar1 = PTR_tty_0004ecf4;\n  local_1c = *(int *)PTR___stack_chk_guard_0004f374;\nLAB_00034eb4:\n  do {\n    uVar3 = iread(*(int *)puVar1,&c,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (c != '\0') goto LAB_00034eb4;\nLAB_00034ee0:\n      c = -0x20;\n    }\n    else if (c == '\0') goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)(byte)c;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= in_f12_13) {\n        iVar4 = __fixunsdfdi();\n        return iVar4;\n      }\n      uVar5 = __fixunsdfdi(-in_f12_13);\n      return -(uint)((int)uVar5 != 0) - (int)((ulonglong)uVar5 >> 0x20);\n    }\n  } while( true );\n}\n\n" comment (function_definition "int getchr(void)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  uint uVar3;\n  int iVar4;\n  double in_f12_13;\n  undefined8 uVar5;\n  char c;\n  int local_1c;\n  \n  puVar2 = PTR___stack_chk_guard_0004f374;\n  puVar1 = PTR_tty_0004ecf4;\n  local_1c = *(int *)PTR___stack_chk_guard_0004f374;\nLAB_00034eb4:\n  do {\n    uVar3 = iread(*(int *)puVar1,&c,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (c != '\0') goto LAB_00034eb4;\nLAB_00034ee0:\n      c = -0x20;\n    }\n    else if (c == '\0') goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)(byte)c;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= in_f12_13) {\n        iVar4 = __fixunsdfdi();\n        return iVar4;\n      }\n      uVar5 = __fixunsdfdi(-in_f12_13);\n      return -(uint)((int)uVar5 != 0) - (int)((ulonglong)uVar5 >> 0x20);\n    }\n  } while( true );\n}" primitive_type (function_declarator "getchr(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  uint uVar3;\n  int iVar4;\n  double in_f12_13;\n  undefined8 uVar5;\n  char c;\n  int local_1c;\n  \n  puVar2 = PTR___stack_chk_guard_0004f374;\n  puVar1 = PTR_tty_0004ecf4;\n  local_1c = *(int *)PTR___stack_chk_guard_0004f374;\nLAB_00034eb4:\n  do {\n    uVar3 = iread(*(int *)puVar1,&c,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (c != '\0') goto LAB_00034eb4;\nLAB_00034ee0:\n      c = -0x20;\n    }\n    else if (c == '\0') goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)(byte)c;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= in_f12_13) {\n        iVar4 = __fixunsdfdi();\n        return iVar4;\n      }\n      uVar5 = __fixunsdfdi(-in_f12_13);\n      return -(uint)((int)uVar5 != 0) - (int)((ulonglong)uVar5 >> 0x20);\n    }\n  } while( true );\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "double in_f12_13;" primitive_type identifier ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (declaration "char c;" primitive_type identifier ;) (declaration "int local_1c;" primitive_type identifier ;) (expression_statement "puVar2 = PTR___stack_chk_guard_0004f374;" (assignment_expression "puVar2 = PTR___stack_chk_guard_0004f374" identifier = identifier) ;) (expression_statement "puVar1 = PTR_tty_0004ecf4;" (assignment_expression "puVar1 = PTR_tty_0004ecf4" identifier = identifier) ;) (expression_statement "local_1c = *(int *)PTR___stack_chk_guard_0004f374;" (assignment_expression "local_1c = *(int *)PTR___stack_chk_guard_0004f374" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_0004f374" * (cast_expression "(int *)PTR___stack_chk_guard_0004f374" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (labeled_statement "LAB_00034eb4:\n  do {\n    uVar3 = iread(*(int *)puVar1,&c,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (c != '\0') goto LAB_00034eb4;\nLAB_00034ee0:\n      c = -0x20;\n    }\n    else if (c == '\0') goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)(byte)c;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= in_f12_13) {\n        iVar4 = __fixunsdfdi();\n        return iVar4;\n      }\n      uVar5 = __fixunsdfdi(-in_f12_13);\n      return -(uint)((int)uVar5 != 0) - (int)((ulonglong)uVar5 >> 0x20);\n    }\n  } while( true );" statement_identifier : (do_statement "do {\n    uVar3 = iread(*(int *)puVar1,&c,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (c != '\0') goto LAB_00034eb4;\nLAB_00034ee0:\n      c = -0x20;\n    }\n    else if (c == '\0') goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)(byte)c;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= in_f12_13) {\n        iVar4 = __fixunsdfdi();\n        return iVar4;\n      }\n      uVar5 = __fixunsdfdi(-in_f12_13);\n      return -(uint)((int)uVar5 != 0) - (int)((ulonglong)uVar5 >> 0x20);\n    }\n  } while( true );" do (compound_statement "{\n    uVar3 = iread(*(int *)puVar1,&c,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (c != '\0') goto LAB_00034eb4;\nLAB_00034ee0:\n      c = -0x20;\n    }\n    else if (c == '\0') goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)(byte)c;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= in_f12_13) {\n        iVar4 = __fixunsdfdi();\n        return iVar4;\n      }\n      uVar5 = __fixunsdfdi(-in_f12_13);\n      return -(uint)((int)uVar5 != 0) - (int)((ulonglong)uVar5 >> 0x20);\n    }\n  }" { (expression_statement "uVar3 = iread(*(int *)puVar1,&c,1);" (assignment_expression "uVar3 = iread(*(int *)puVar1,&c,1)" identifier = (call_expression "iread(*(int *)puVar1,&c,1)" identifier (argument_list "(*(int *)puVar1,&c,1)" ( (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) , (pointer_expression "&c" & identifier) , number_literal )))) ;) (if_statement "if (uVar3 == 0xfffffffe) goto LAB_00034ef0;" if (parenthesized_expression "(uVar3 == 0xfffffffe)" ( (binary_expression "uVar3 == 0xfffffffe" identifier == number_literal) )) (goto_statement "goto LAB_00034ef0;" goto statement_identifier ;)) (if_statement "if ((int)uVar3 < 0) {\n      quit(1);\n      if (c != '\0') goto LAB_00034eb4;\nLAB_00034ee0:\n      c = -0x20;\n    }\n    else if (c == '\0') goto LAB_00034ee0;" if (parenthesized_expression "((int)uVar3 < 0)" ( (binary_expression "(int)uVar3 < 0" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n      quit(1);\n      if (c != '\0') goto LAB_00034eb4;\nLAB_00034ee0:\n      c = -0x20;\n    }" { (expression_statement "quit(1);" (call_expression "quit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) (if_statement "if (c != '\0') goto LAB_00034eb4;" if (parenthesized_expression "(c != '\0')" ( (binary_expression "c != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_00034eb4;" goto statement_identifier ;)) (labeled_statement "LAB_00034ee0:\n      c = -0x20;" statement_identifier : (expression_statement "c = -0x20;" (assignment_expression "c = -0x20" identifier = number_literal) ;)) }) (else_clause "else if (c == '\0') goto LAB_00034ee0;" else (if_statement "if (c == '\0') goto LAB_00034ee0;" if (parenthesized_expression "(c == '\0')" ( (binary_expression "c == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_00034ee0;" goto statement_identifier ;)))) (if_statement "if (uVar3 == 1) {\n      uVar3 = (uint)(byte)c;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= in_f12_13) {\n        iVar4 = __fixunsdfdi();\n        return iVar4;\n      }\n      uVar5 = __fixunsdfdi(-in_f12_13);\n      return -(uint)((int)uVar5 != 0) - (int)((ulonglong)uVar5 >> 0x20);\n    }" if (parenthesized_expression "(uVar3 == 1)" ( (binary_expression "uVar3 == 1" identifier == number_literal) )) (compound_statement "{\n      uVar3 = (uint)(byte)c;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= in_f12_13) {\n        iVar4 = __fixunsdfdi();\n        return iVar4;\n      }\n      uVar5 = __fixunsdfdi(-in_f12_13);\n      return -(uint)((int)uVar5 != 0) - (int)((ulonglong)uVar5 >> 0x20);\n    }" { (expression_statement "uVar3 = (uint)(byte)c;" (assignment_expression "uVar3 = (uint)(byte)c" identifier = (cast_expression "(uint)(byte)c" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)c" ( (type_descriptor "byte" type_identifier) ) identifier))) ;) (labeled_statement "LAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }" statement_identifier : (if_statement "if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }" if (parenthesized_expression "(local_1c == *(int *)puVar2)" ( (binary_expression "local_1c == *(int *)puVar2" identifier == (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n        return uVar3;\n      }" { (return_statement "return uVar3;" return identifier ;) }))) (expression_statement "(*(code *)PTR___stack_chk_fail_0004f354)();" (call_expression "(*(code *)PTR___stack_chk_fail_0004f354)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_0004f354)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_0004f354" * (cast_expression "(code *)PTR___stack_chk_fail_0004f354" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (if_statement "if (0.0 <= in_f12_13) {\n        iVar4 = __fixunsdfdi();\n        return iVar4;\n      }" if (parenthesized_expression "(0.0 <= in_f12_13)" ( (binary_expression "0.0 <= in_f12_13" number_literal <= identifier) )) (compound_statement "{\n        iVar4 = __fixunsdfdi();\n        return iVar4;\n      }" { (expression_statement "iVar4 = __fixunsdfdi();" (assignment_expression "iVar4 = __fixunsdfdi()" identifier = (call_expression "__fixunsdfdi()" identifier (argument_list "()" ( )))) ;) (return_statement "return iVar4;" return identifier ;) })) (expression_statement "uVar5 = __fixunsdfdi(-in_f12_13);" (assignment_expression "uVar5 = __fixunsdfdi(-in_f12_13)" identifier = (call_expression "__fixunsdfdi(-in_f12_13)" identifier (argument_list "(-in_f12_13)" ( (unary_expression "-in_f12_13" - identifier) )))) ;) (return_statement "return -(uint)((int)uVar5 != 0) - (int)((ulonglong)uVar5 >> 0x20);" return (binary_expression "-(uint)((int)uVar5 != 0) - (int)((ulonglong)uVar5 >> 0x20)" (unary_expression "-(uint)((int)uVar5 != 0)" - (call_expression "(uint)((int)uVar5 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)uVar5 != 0)" ( (binary_expression "(int)uVar5 != 0" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )))) - (cast_expression "(int)((ulonglong)uVar5 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar5 >> 0x20)" ( (binary_expression "(ulonglong)uVar5 >> 0x20" (cast_expression "(ulonglong)uVar5" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) ;) })) }) while (parenthesized_expression "( true )" ( true )) ;)) })))
(translation_unit "uint getchr(double param_1)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  byte local_1d;\n  int local_1c;\n  \n  puVar2 = PTR___stack_chk_guard_0004f374;\n  puVar1 = PTR_tty_0004ecf4;\n  local_1c = *(int *)PTR___stack_chk_guard_0004f374;\nLAB_00034eb4:\n  do {\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  } while( true );\n}\n\n" (function_definition "uint getchr(double param_1)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  byte local_1d;\n  int local_1c;\n  \n  puVar2 = PTR___stack_chk_guard_0004f374;\n  puVar1 = PTR_tty_0004ecf4;\n  local_1c = *(int *)PTR___stack_chk_guard_0004f374;\nLAB_00034eb4:\n  do {\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  } while( true );\n}" type_identifier (function_declarator "getchr(double param_1)" identifier (parameter_list "(double param_1)" ( (parameter_declaration "double param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  byte local_1d;\n  int local_1c;\n  \n  puVar2 = PTR___stack_chk_guard_0004f374;\n  puVar1 = PTR_tty_0004ecf4;\n  local_1c = *(int *)PTR___stack_chk_guard_0004f374;\nLAB_00034eb4:\n  do {\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  } while( true );\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (declaration "byte local_1d;" type_identifier identifier ;) (declaration "int local_1c;" primitive_type identifier ;) (expression_statement "puVar2 = PTR___stack_chk_guard_0004f374;" (assignment_expression "puVar2 = PTR___stack_chk_guard_0004f374" identifier = identifier) ;) (expression_statement "puVar1 = PTR_tty_0004ecf4;" (assignment_expression "puVar1 = PTR_tty_0004ecf4" identifier = identifier) ;) (expression_statement "local_1c = *(int *)PTR___stack_chk_guard_0004f374;" (assignment_expression "local_1c = *(int *)PTR___stack_chk_guard_0004f374" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_0004f374" * (cast_expression "(int *)PTR___stack_chk_guard_0004f374" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (labeled_statement "LAB_00034eb4:\n  do {\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  } while( true );" statement_identifier : (do_statement "do {\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  } while( true );" do (compound_statement "{\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  }" { (expression_statement "uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);" (assignment_expression "uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1)" identifier = (call_expression "iread(*(undefined4 *)puVar1,&local_1d,1)" identifier (argument_list "(*(undefined4 *)puVar1,&local_1d,1)" ( (pointer_expression "*(undefined4 *)puVar1" * (cast_expression "(undefined4 *)puVar1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) , (pointer_expression "&local_1d" & identifier) , number_literal )))) ;) (if_statement "if (uVar3 == 0xfffffffe) goto LAB_00034ef0;" if (parenthesized_expression "(uVar3 == 0xfffffffe)" ( (binary_expression "uVar3 == 0xfffffffe" identifier == number_literal) )) (goto_statement "goto LAB_00034ef0;" goto statement_identifier ;)) (if_statement "if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;" if (parenthesized_expression "((int)uVar3 < 0)" ( (binary_expression "(int)uVar3 < 0" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }" { (expression_statement "quit(1);" (call_expression "quit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) (if_statement "if (local_1d != 0) goto LAB_00034eb4;" if (parenthesized_expression "(local_1d != 0)" ( (binary_expression "local_1d != 0" identifier != number_literal) )) (goto_statement "goto LAB_00034eb4;" goto statement_identifier ;)) (labeled_statement "LAB_00034ee0:\n      local_1d = 0xe0;" statement_identifier : (expression_statement "local_1d = 0xe0;" (assignment_expression "local_1d = 0xe0" identifier = number_literal) ;)) }) (else_clause "else if (local_1d == 0) goto LAB_00034ee0;" else (if_statement "if (local_1d == 0) goto LAB_00034ee0;" if (parenthesized_expression "(local_1d == 0)" ( (binary_expression "local_1d == 0" identifier == number_literal) )) (goto_statement "goto LAB_00034ee0;" goto statement_identifier ;)))) (if_statement "if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }" if (parenthesized_expression "(uVar3 == 1)" ( (binary_expression "uVar3 == 1" identifier == number_literal) )) (compound_statement "{\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }" { (expression_statement "uVar3 = (uint)local_1d;" (assignment_expression "uVar3 = (uint)local_1d" identifier = (cast_expression "(uint)local_1d" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (labeled_statement "LAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }" statement_identifier : (if_statement "if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }" if (parenthesized_expression "(local_1c == *(int *)puVar2)" ( (binary_expression "local_1c == *(int *)puVar2" identifier == (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n        return uVar3;\n      }" { (return_statement "return uVar3;" return identifier ;) }))) (expression_statement "(*(code *)PTR___stack_chk_fail_0004f354)();" (call_expression "(*(code *)PTR___stack_chk_fail_0004f354)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_0004f354)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_0004f354" * (cast_expression "(code *)PTR___stack_chk_fail_0004f354" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (if_statement "if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }" if (parenthesized_expression "(0.0 <= param_1)" ( (binary_expression "0.0 <= param_1" number_literal <= identifier) )) (compound_statement "{\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }" { (expression_statement "uVar3 = FUN_00034fd0();" (assignment_expression "uVar3 = FUN_00034fd0()" identifier = (call_expression "FUN_00034fd0()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "uVar4 = FUN_00034fd0(-param_1);" (assignment_expression "uVar4 = FUN_00034fd0(-param_1)" identifier = (call_expression "FUN_00034fd0(-param_1)" identifier (argument_list "(-param_1)" ( (unary_expression "-param_1" - identifier) )))) ;) (return_statement "return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);" return (binary_expression "-(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20)" (unary_expression "-(uint)((int)uVar4 != 0)" - (call_expression "(uint)((int)uVar4 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)uVar4 != 0)" ( (binary_expression "(int)uVar4 != 0" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) != number_literal) )))) - (cast_expression "(int)((ulonglong)uVar4 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar4 >> 0x20)" ( (binary_expression "(ulonglong)uVar4 >> 0x20" (cast_expression "(ulonglong)uVar4" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) ;) })) }) while (parenthesized_expression "( true )" ( true )) ;)) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (labeled_statement statement_identifier : (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) , (pointer_expression & IDENT) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (unary_expression - IDENT) )))) ;) (return_statement return (binary_expression (unary_expression - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) != LIT) )))) - (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) })) }) while (parenthesized_expression ( BOOL )) ;)) })))
(function_definition "uint getchr(double param_1)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  byte local_1d;\n  int local_1c;\n  \n  puVar2 = PTR___stack_chk_guard_0004f374;\n  puVar1 = PTR_tty_0004ecf4;\n  local_1c = *(int *)PTR___stack_chk_guard_0004f374;\nLAB_00034eb4:\n  do {\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  } while( true );\n}" (type_identifier "uint") (function_declarator "getchr(double param_1)" (identifier "getchr") (parameter_list "(double param_1)" (( "(") (parameter_declaration "double param_1" (primitive_type "double") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  uint uVar3;\n  undefined8 uVar4;\n  byte local_1d;\n  int local_1c;\n  \n  puVar2 = PTR___stack_chk_guard_0004f374;\n  puVar1 = PTR_tty_0004ecf4;\n  local_1c = *(int *)PTR___stack_chk_guard_0004f374;\nLAB_00034eb4:\n  do {\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  } while( true );\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "undefined8 uVar4;" (type_identifier "undefined8") (identifier "uVar4") (; ";")) (declaration "byte local_1d;" (type_identifier "byte") (identifier "local_1d") (; ";")) (declaration "int local_1c;" (primitive_type "int") (identifier "local_1c") (; ";")) (expression_statement "puVar2 = PTR___stack_chk_guard_0004f374;" (assignment_expression "puVar2 = PTR___stack_chk_guard_0004f374" (identifier "puVar2") (= "=") (identifier "PTR___stack_chk_guard_0004f374")) (; ";")) (expression_statement "puVar1 = PTR_tty_0004ecf4;" (assignment_expression "puVar1 = PTR_tty_0004ecf4" (identifier "puVar1") (= "=") (identifier "PTR_tty_0004ecf4")) (; ";")) (expression_statement "local_1c = *(int *)PTR___stack_chk_guard_0004f374;" (assignment_expression "local_1c = *(int *)PTR___stack_chk_guard_0004f374" (identifier "local_1c") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_0004f374" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_0004f374" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_0004f374")))) (; ";")) (labeled_statement "LAB_00034eb4:\n  do {\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  } while( true );" (statement_identifier "LAB_00034eb4") (: ":") (do_statement "do {\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  } while( true );" (do "do") (compound_statement "{\n    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);\n    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;\n    if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;\n    if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }\n  }" ({ "{") (expression_statement "uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);" (assignment_expression "uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1)" (identifier "uVar3") (= "=") (call_expression "iread(*(undefined4 *)puVar1,&local_1d,1)" (identifier "iread") (argument_list "(*(undefined4 *)puVar1,&local_1d,1)" (( "(") (pointer_expression "*(undefined4 *)puVar1" (* "*") (cast_expression "(undefined4 *)puVar1" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) (, ",") (pointer_expression "&local_1d" (& "&") (identifier "local_1d")) (, ",") (number_literal "1") () ")")))) (; ";")) (if_statement "if (uVar3 == 0xfffffffe) goto LAB_00034ef0;" (if "if") (parenthesized_expression "(uVar3 == 0xfffffffe)" (( "(") (binary_expression "uVar3 == 0xfffffffe" (identifier "uVar3") (== "==") (number_literal "0xfffffffe")) () ")")) (goto_statement "goto LAB_00034ef0;" (goto "goto") (statement_identifier "LAB_00034ef0") (; ";"))) (if_statement "if ((int)uVar3 < 0) {\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }\n    else if (local_1d == 0) goto LAB_00034ee0;" (if "if") (parenthesized_expression "((int)uVar3 < 0)" (( "(") (binary_expression "(int)uVar3 < 0" (cast_expression "(int)uVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar3")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      quit(1);\n      if (local_1d != 0) goto LAB_00034eb4;\nLAB_00034ee0:\n      local_1d = 0xe0;\n    }" ({ "{") (expression_statement "quit(1);" (call_expression "quit(1)" (identifier "quit") (argument_list "(1)" (( "(") (number_literal "1") () ")"))) (; ";")) (if_statement "if (local_1d != 0) goto LAB_00034eb4;" (if "if") (parenthesized_expression "(local_1d != 0)" (( "(") (binary_expression "local_1d != 0" (identifier "local_1d") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00034eb4;" (goto "goto") (statement_identifier "LAB_00034eb4") (; ";"))) (labeled_statement "LAB_00034ee0:\n      local_1d = 0xe0;" (statement_identifier "LAB_00034ee0") (: ":") (expression_statement "local_1d = 0xe0;" (assignment_expression "local_1d = 0xe0" (identifier "local_1d") (= "=") (number_literal "0xe0")) (; ";"))) (} "}")) (else_clause "else if (local_1d == 0) goto LAB_00034ee0;" (else "else") (if_statement "if (local_1d == 0) goto LAB_00034ee0;" (if "if") (parenthesized_expression "(local_1d == 0)" (( "(") (binary_expression "local_1d == 0" (identifier "local_1d") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00034ee0;" (goto "goto") (statement_identifier "LAB_00034ee0") (; ";"))))) (if_statement "if (uVar3 == 1) {\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }" (if "if") (parenthesized_expression "(uVar3 == 1)" (( "(") (binary_expression "uVar3 == 1" (identifier "uVar3") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      uVar3 = (uint)local_1d;\nLAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }\n      (*(code *)PTR___stack_chk_fail_0004f354)();\n      if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }\n      uVar4 = FUN_00034fd0(-param_1);\n      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);\n    }" ({ "{") (expression_statement "uVar3 = (uint)local_1d;" (assignment_expression "uVar3 = (uint)local_1d" (identifier "uVar3") (= "=") (cast_expression "(uint)local_1d" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "local_1d"))) (; ";")) (labeled_statement "LAB_00034ef0:\n      if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }" (statement_identifier "LAB_00034ef0") (: ":") (if_statement "if (local_1c == *(int *)puVar2) {\n        return uVar3;\n      }" (if "if") (parenthesized_expression "(local_1c == *(int *)puVar2)" (( "(") (binary_expression "local_1c == *(int *)puVar2" (identifier "local_1c") (== "==") (pointer_expression "*(int *)puVar2" (* "*") (cast_expression "(int *)puVar2" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar2")))) () ")")) (compound_statement "{\n        return uVar3;\n      }" ({ "{") (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))) (expression_statement "(*(code *)PTR___stack_chk_fail_0004f354)();" (call_expression "(*(code *)PTR___stack_chk_fail_0004f354)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_0004f354)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_0004f354" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_0004f354" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_0004f354"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (0.0 <= param_1) {\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }" (if "if") (parenthesized_expression "(0.0 <= param_1)" (( "(") (binary_expression "0.0 <= param_1" (number_literal "0.0") (<= "<=") (identifier "param_1")) () ")")) (compound_statement "{\n        uVar3 = FUN_00034fd0();\n        return uVar3;\n      }" ({ "{") (expression_statement "uVar3 = FUN_00034fd0();" (assignment_expression "uVar3 = FUN_00034fd0()" (identifier "uVar3") (= "=") (call_expression "FUN_00034fd0()" (identifier "FUN_00034fd0") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (expression_statement "uVar4 = FUN_00034fd0(-param_1);" (assignment_expression "uVar4 = FUN_00034fd0(-param_1)" (identifier "uVar4") (= "=") (call_expression "FUN_00034fd0(-param_1)" (identifier "FUN_00034fd0") (argument_list "(-param_1)" (( "(") (unary_expression "-param_1" (- "-") (identifier "param_1")) () ")")))) (; ";")) (return_statement "return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);" (return "return") (binary_expression "-(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20)" (unary_expression "-(uint)((int)uVar4 != 0)" (- "-") (call_expression "(uint)((int)uVar4 != 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((int)uVar4 != 0)" (( "(") (binary_expression "(int)uVar4 != 0" (cast_expression "(int)uVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar4")) (!= "!=") (number_literal "0")) () ")")))) (- "-") (cast_expression "(int)((ulonglong)uVar4 >> 0x20)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((ulonglong)uVar4 >> 0x20)" (( "(") (binary_expression "(ulonglong)uVar4 >> 0x20" (cast_expression "(ulonglong)uVar4" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar4")) (>> ">>") (number_literal "0x20")) () ")")))) (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";"))) (} "}")))

/* WARNING: Unknown calling convention */

int function_1(void)

{
  type_1 *puVar1;
  type_1 *puVar2;
  type_2 var_2;
  int iVar4;
  double var_6;
  type_3 uVar5;
  char var_4;
  int var_5;
  
  puVar2 = PTR___stack_chk_guard_0004f374;
  puVar1 = PTR_tty_0004ecf4;
  var_5 = *(int *)PTR___stack_chk_guard_0004f374;
LAB_00034eb4:
  do {
    var_2 = var_1(*(int *)puVar1,&var_4,1);
    if (var_2 == 0xfffffffe) goto LAB_00034ef0;
    if ((int)var_2 < 0) {
      var_3(1);
      if (var_4 != '\0') goto LAB_00034eb4;
LAB_00034ee0:
      var_4 = -0x20;
    }
    else if (var_4 == '\0') goto LAB_00034ee0;
    if (var_2 == 1) {
      var_2 = (type_2)(type_4)var_4;
LAB_00034ef0:
      if (var_5 == *(int *)puVar2) {
        return var_2;
      }
      (*(type_5 *)PTR___stack_chk_fail_0004f354)();
      if (0.0 <= var_6) {
        iVar4 = var_7();
        return iVar4;
      }
      uVar5 = var_7(-var_6);
      return -(type_2)((int)uVar5 != 0) - (int)((type_6)uVar5 >> 0x20);
    }
  } while( true );
}


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

uint MASKED(double param_1)

{
  undefined *puVar1;
  undefined *puVar2;
  uint uVar3;
  undefined8 uVar4;
  byte local_1d;
  int local_1c;
  
  puVar2 = PTR___stack_chk_guard_0004f374;
  puVar1 = PTR_tty_0004ecf4;
  local_1c = *(int *)PTR___stack_chk_guard_0004f374;
LAB_00034eb4:
  do {
    uVar3 = iread(*(undefined4 *)puVar1,&local_1d,1);
    if (uVar3 == 0xfffffffe) goto LAB_00034ef0;
    if ((int)uVar3 < 0) {
      quit(1);
      if (local_1d != 0) goto LAB_00034eb4;
LAB_00034ee0:
      local_1d = 0xe0;
    }
    else if (local_1d == 0) goto LAB_00034ee0;
    if (uVar3 == 1) {
      uVar3 = (uint)local_1d;
LAB_00034ef0:
      if (local_1c == *(int *)puVar2) {
        return uVar3;
      }
      (*(code *)PTR___stack_chk_fail_0004f354)();
      if (0.0 <= param_1) {
        uVar3 = FUN_00034fd0();
        return uVar3;
      }
      uVar4 = FUN_00034fd0(-param_1);
      return -(uint)((int)uVar4 != 0) - (int)((ulonglong)uVar4 >> 0x20);
    }
  } while( true );
}

