
/* WARNING: Unknown calling convention */

int keysym_to_unicode(int keysym)

{
  int iVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  
  iVar3 = -1;
  iVar1 = 0x3c0;
  while( true ) {
    iVar4 = iVar1;
    if (iVar4 - iVar3 < 2) {
      return -1;
    }
    iVar1 = (iVar4 + iVar3) / 2;
    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);
    if (uVar2 == keysym) break;
    if ((int)uVar2 < keysym) {
      iVar3 = iVar1;
      iVar1 = iVar4;
    }
  }
  return (uint)*(ushort *)
                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);
}



uint keysym_to_unicode(uint param_1)

{
  int iVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  
  iVar3 = -1;
  iVar1 = 0x3c0;
  while( true ) {
    iVar4 = iVar1;
    if (iVar4 - iVar3 < 2) {
      return 0xffffffff;
    }
    iVar1 = (iVar4 + iVar3) / 2;
    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);
    if (uVar2 == param_1) break;
    if ((int)uVar2 < (int)param_1) {
      iVar3 = iVar1;
      iVar1 = iVar4;
    }
  }
  return (uint)*(ushort *)
                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);
}


lui gp,0x4
addiu gp,gp,-0x26d0
addu gp,gp,t9
lw t1,-0x7fb8(gp)
li a3,0x3c0
li a2,-0x1
b 0x000717a0
_addiu t1,t1,0x1a00
sra v0,v0,0x1
sll v1,v0,0x2
addu v1,v1,t1
lhu a1,0x0(v1)
beq a1,a0,0x000717c4
_slt t0,a1,a0
movz a3,v0,t0
movn a2,v0,t0
addu v0,a3,a2
subu v1,a3,a2
or a1,v0,zero
srl v0,v0,0x1f
slti v1,v1,0x2
beq v1,zero,0x00071780
_addu v0,v0,a1
jr ra
_li v0,-0x1
jr ra
_lhu v0,0x2(v1)
(translation_unit "uint keysym_to_unicode(uint param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = -1;\n  iVar1 = 0x3c0;\n  while( true ) {\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == param_1) break;\n    if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }\n  return (uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);\n}\n\n" (function_definition "uint keysym_to_unicode(uint param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = -1;\n  iVar1 = 0x3c0;\n  while( true ) {\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == param_1) break;\n    if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }\n  return (uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);\n}" type_identifier (function_declarator "keysym_to_unicode(uint param_1)" identifier (parameter_list "(uint param_1)" ( (parameter_declaration "uint param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = -1;\n  iVar1 = 0x3c0;\n  while( true ) {\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == param_1) break;\n    if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }\n  return (uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" identifier = number_literal) ;) (expression_statement "iVar1 = 0x3c0;" (assignment_expression "iVar1 = 0x3c0" identifier = number_literal) ;) (while_statement "while( true ) {\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == param_1) break;\n    if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == param_1) break;\n    if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }" { (expression_statement "iVar4 = iVar1;" (assignment_expression "iVar4 = iVar1" identifier = identifier) ;) (if_statement "if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "(iVar4 - iVar3 < 2)" ( (binary_expression "iVar4 - iVar3 < 2" (binary_expression "iVar4 - iVar3" identifier - identifier) < number_literal) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "iVar1 = (iVar4 + iVar3) / 2;" (assignment_expression "iVar1 = (iVar4 + iVar3) / 2" identifier = (binary_expression "(iVar4 + iVar3) / 2" (parenthesized_expression "(iVar4 + iVar3)" ( (binary_expression "iVar4 + iVar3" identifier + identifier) )) / number_literal)) ;) (expression_statement "uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);" (assignment_expression "uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" identifier = (binary_expression "(uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" ( (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00" (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4" identifier + (binary_expression "iVar1 * 4" identifier * number_literal)) + number_literal) ))))) ;) (if_statement "if (uVar2 == param_1) break;" if (parenthesized_expression "(uVar2 == param_1)" ( (binary_expression "uVar2 == param_1" identifier == identifier) )) (break_statement "break;" break ;)) (if_statement "if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }" if (parenthesized_expression "((int)uVar2 < (int)param_1)" ( (binary_expression "(int)uVar2 < (int)param_1" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) < (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }" { (expression_statement "iVar3 = iVar1;" (assignment_expression "iVar3 = iVar1" identifier = identifier) ;) (expression_statement "iVar1 = iVar4;" (assignment_expression "iVar1 = iVar4" identifier = identifier) ;) })) })) (return_statement "return (uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);" return (binary_expression "(uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2)" ( (binary_expression "(int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2" (cast_expression "(int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" ( (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00" (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4" identifier + (binary_expression "iVar1 * 4" identifier * number_literal)) + number_literal) ))) + number_literal) )))) ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint keysym_to_unicode(int keysym)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = -1;\n  iVar1 = 0x3c0;\n  while( true ) {\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return -1;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == keysym) break;\n    if ((int)uVar2 < keysym) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }\n  return (uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);\n}\n\n" comment (function_definition "int keysym_to_unicode(int keysym)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = -1;\n  iVar1 = 0x3c0;\n  while( true ) {\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return -1;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == keysym) break;\n    if ((int)uVar2 < keysym) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }\n  return (uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);\n}" primitive_type (function_declarator "keysym_to_unicode(int keysym)" identifier (parameter_list "(int keysym)" ( (parameter_declaration "int keysym" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = -1;\n  iVar1 = 0x3c0;\n  while( true ) {\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return -1;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == keysym) break;\n    if ((int)uVar2 < keysym) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }\n  return (uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" identifier = number_literal) ;) (expression_statement "iVar1 = 0x3c0;" (assignment_expression "iVar1 = 0x3c0" identifier = number_literal) ;) (while_statement "while( true ) {\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return -1;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == keysym) break;\n    if ((int)uVar2 < keysym) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return -1;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == keysym) break;\n    if ((int)uVar2 < keysym) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }" { (expression_statement "iVar4 = iVar1;" (assignment_expression "iVar4 = iVar1" identifier = identifier) ;) (if_statement "if (iVar4 - iVar3 < 2) {\n      return -1;\n    }" if (parenthesized_expression "(iVar4 - iVar3 < 2)" ( (binary_expression "iVar4 - iVar3 < 2" (binary_expression "iVar4 - iVar3" identifier - identifier) < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "iVar1 = (iVar4 + iVar3) / 2;" (assignment_expression "iVar1 = (iVar4 + iVar3) / 2" identifier = (binary_expression "(iVar4 + iVar3) / 2" (parenthesized_expression "(iVar4 + iVar3)" ( (binary_expression "iVar4 + iVar3" identifier + identifier) )) / number_literal)) ;) (expression_statement "uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);" (assignment_expression "uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" identifier = (binary_expression "(uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" ( (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00" (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4" identifier + (binary_expression "iVar1 * 4" identifier * number_literal)) + number_literal) ))))) ;) (if_statement "if (uVar2 == keysym) break;" if (parenthesized_expression "(uVar2 == keysym)" ( (binary_expression "uVar2 == keysym" identifier == identifier) )) (break_statement "break;" break ;)) (if_statement "if ((int)uVar2 < keysym) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }" if (parenthesized_expression "((int)uVar2 < keysym)" ( (binary_expression "(int)uVar2 < keysym" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) (compound_statement "{\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }" { (expression_statement "iVar3 = iVar1;" (assignment_expression "iVar3 = iVar1" identifier = identifier) ;) (expression_statement "iVar1 = iVar4;" (assignment_expression "iVar1 = iVar4" identifier = identifier) ;) })) })) (return_statement "return (uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);" return (binary_expression "(uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2)" ( (binary_expression "(int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2" (cast_expression "(int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" ( (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00" (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4" identifier + (binary_expression "iVar1 * 4" identifier * number_literal)) + number_literal) ))) + number_literal) )))) ;) })))
(translation_unit "uint keysym_to_unicode(uint param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = -1;\n  iVar1 = 0x3c0;\n  while( true ) {\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == param_1) break;\n    if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }\n  return (uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);\n}\n\n" (function_definition "uint keysym_to_unicode(uint param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = -1;\n  iVar1 = 0x3c0;\n  while( true ) {\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == param_1) break;\n    if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }\n  return (uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);\n}" type_identifier (function_declarator "keysym_to_unicode(uint param_1)" identifier (parameter_list "(uint param_1)" ( (parameter_declaration "uint param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = -1;\n  iVar1 = 0x3c0;\n  while( true ) {\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == param_1) break;\n    if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }\n  return (uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" identifier = number_literal) ;) (expression_statement "iVar1 = 0x3c0;" (assignment_expression "iVar1 = 0x3c0" identifier = number_literal) ;) (while_statement "while( true ) {\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == param_1) break;\n    if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == param_1) break;\n    if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }" { (expression_statement "iVar4 = iVar1;" (assignment_expression "iVar4 = iVar1" identifier = identifier) ;) (if_statement "if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "(iVar4 - iVar3 < 2)" ( (binary_expression "iVar4 - iVar3 < 2" (binary_expression "iVar4 - iVar3" identifier - identifier) < number_literal) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "iVar1 = (iVar4 + iVar3) / 2;" (assignment_expression "iVar1 = (iVar4 + iVar3) / 2" identifier = (binary_expression "(iVar4 + iVar3) / 2" (parenthesized_expression "(iVar4 + iVar3)" ( (binary_expression "iVar4 + iVar3" identifier + identifier) )) / number_literal)) ;) (expression_statement "uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);" (assignment_expression "uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" identifier = (binary_expression "(uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" ( (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00" (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4" identifier + (binary_expression "iVar1 * 4" identifier * number_literal)) + number_literal) ))))) ;) (if_statement "if (uVar2 == param_1) break;" if (parenthesized_expression "(uVar2 == param_1)" ( (binary_expression "uVar2 == param_1" identifier == identifier) )) (break_statement "break;" break ;)) (if_statement "if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }" if (parenthesized_expression "((int)uVar2 < (int)param_1)" ( (binary_expression "(int)uVar2 < (int)param_1" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) < (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }" { (expression_statement "iVar3 = iVar1;" (assignment_expression "iVar3 = iVar1" identifier = identifier) ;) (expression_statement "iVar1 = iVar4;" (assignment_expression "iVar1 = iVar4" identifier = identifier) ;) })) })) (return_statement "return (uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);" return (binary_expression "(uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2)" ( (binary_expression "(int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2" (cast_expression "(int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" ( (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00" (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4" identifier + (binary_expression "iVar1 * 4" identifier * number_literal)) + number_literal) ))) + number_literal) )))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - IDENT) < LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) / LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + (binary_expression IDENT * LIT)) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (break_statement break ;)) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) })) (return_statement return (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + (binary_expression IDENT * LIT)) + LIT) ))) + LIT) )))) ;) })))
(function_definition "uint keysym_to_unicode(uint param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = -1;\n  iVar1 = 0x3c0;\n  while( true ) {\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == param_1) break;\n    if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }\n  return (uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);\n}" (type_identifier "uint") (function_declarator "keysym_to_unicode(uint param_1)" (identifier "keysym_to_unicode") (parameter_list "(uint param_1)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar3 = -1;\n  iVar1 = 0x3c0;\n  while( true ) {\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == param_1) break;\n    if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }\n  return (uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" (identifier "iVar3") (= "=") (number_literal "-1")) (; ";")) (expression_statement "iVar1 = 0x3c0;" (assignment_expression "iVar1 = 0x3c0" (identifier "iVar1") (= "=") (number_literal "0x3c0")) (; ";")) (while_statement "while( true ) {\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == param_1) break;\n    if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    iVar4 = iVar1;\n    if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }\n    iVar1 = (iVar4 + iVar3) / 2;\n    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);\n    if (uVar2 == param_1) break;\n    if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }\n  }" ({ "{") (expression_statement "iVar4 = iVar1;" (assignment_expression "iVar4 = iVar1" (identifier "iVar4") (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (iVar4 - iVar3 < 2) {\n      return 0xffffffff;\n    }" (if "if") (parenthesized_expression "(iVar4 - iVar3 < 2)" (( "(") (binary_expression "iVar4 - iVar3 < 2" (binary_expression "iVar4 - iVar3" (identifier "iVar4") (- "-") (identifier "iVar3")) (< "<") (number_literal "2")) () ")")) (compound_statement "{\n      return 0xffffffff;\n    }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (expression_statement "iVar1 = (iVar4 + iVar3) / 2;" (assignment_expression "iVar1 = (iVar4 + iVar3) / 2" (identifier "iVar1") (= "=") (binary_expression "(iVar4 + iVar3) / 2" (parenthesized_expression "(iVar4 + iVar3)" (( "(") (binary_expression "iVar4 + iVar3" (identifier "iVar4") (+ "+") (identifier "iVar3")) () ")")) (/ "/") (number_literal "2"))) (; ";")) (expression_statement "uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);" (assignment_expression "uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" (identifier "uVar2") (= "=") (binary_expression "(uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" (( "(") (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00" (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4" (identifier "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8") (+ "+") (binary_expression "iVar1 * 4" (identifier "iVar1") (* "*") (number_literal "4"))) (+ "+") (number_literal "0x1a00")) () ")"))))) (; ";")) (if_statement "if (uVar2 == param_1) break;" (if "if") (parenthesized_expression "(uVar2 == param_1)" (( "(") (binary_expression "uVar2 == param_1" (identifier "uVar2") (== "==") (identifier "param_1")) () ")")) (break_statement "break;" (break "break") (; ";"))) (if_statement "if ((int)uVar2 < (int)param_1) {\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }" (if "if") (parenthesized_expression "((int)uVar2 < (int)param_1)" (( "(") (binary_expression "(int)uVar2 < (int)param_1" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (< "<") (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1"))) () ")")) (compound_statement "{\n      iVar3 = iVar1;\n      iVar1 = iVar4;\n    }" ({ "{") (expression_statement "iVar3 = iVar1;" (assignment_expression "iVar3 = iVar1" (identifier "iVar3") (= "=") (identifier "iVar1")) (; ";")) (expression_statement "iVar1 = iVar4;" (assignment_expression "iVar1 = iVar4" (identifier "iVar1") (= "=") (identifier "iVar4")) (; ";")) (} "}"))) (} "}"))) (return_statement "return (uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);" (return "return") (binary_expression "(uint)*(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(ushort *)\n                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2)" (( "(") (binary_expression "(int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2" (cast_expression "(int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00)" (( "(") (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00" (binary_expression "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4" (identifier "PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8") (+ "+") (binary_expression "iVar1 * 4" (identifier "iVar1") (* "*") (number_literal "4"))) (+ "+") (number_literal "0x1a00")) () ")"))) (+ "+") (number_literal "2")) () ")")))) (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (break_statement)) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))))) (return_statement (binary_expression left: (parenthesized_expression (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)))) right: (number_literal)))))))))

uint MASKED(uint param_1)

{
  int iVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  
  iVar3 = -1;
  iVar1 = 0x3c0;
  while( true ) {
    iVar4 = iVar1;
    if (iVar4 - iVar3 < 2) {
      return 0xffffffff;
    }
    iVar1 = (iVar4 + iVar3) / 2;
    uVar2 = (uint)*(ushort *)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00);
    if (uVar2 == param_1) break;
    if ((int)uVar2 < (int)param_1) {
      iVar3 = iVar1;
      iVar1 = iVar4;
    }
  }
  return (uint)*(ushort *)
                ((int)(PTR_s_ed_EOF_in_Duplicate_Session_data_000a70d8 + iVar1 * 4 + 0x1a00) + 2);
}

