
XCharStruct * x11_char_struct(XFontStruct *xfs,uchar byte1,uchar byte2)

{
  uint uVar1;
  undefined3 in_register_00000014;
  uint uVar2;
  undefined3 in_register_00000018;
  uint uVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  
  uVar3 = CONCAT31(in_register_00000018,byte2);
  uVar2 = CONCAT31(in_register_00000014,byte1);
  uVar1 = xfs->min_char_or_byte2;
  if ((uVar3 < uVar1) || (xfs->max_char_or_byte2 < uVar3)) {
    return (XCharStruct *)0x0;
  }
  uVar6 = xfs->min_byte1;
  if (uVar6 == 0) {
    uVar5 = xfs->max_byte1;
    if (uVar5 == 0) {
      iVar4 = uVar3 - uVar1;
      goto LAB_00058678;
    }
  }
  else {
    if (uVar2 < uVar6) {
      return (XCharStruct *)0x0;
    }
    uVar5 = xfs->max_byte1;
  }
  if (uVar5 < uVar2) {
    return (XCharStruct *)0x0;
  }
  iVar4 = ((xfs->max_char_or_byte2 + 1) - uVar1) * (uVar2 - uVar6) + (uVar3 - uVar1);
LAB_00058678:
  if (xfs->per_char == (XCharStruct *)0x0) {
    return &xfs->max_bounds;
  }
  return xfs->per_char + iVar4;
}



int FUN_00058620(int param_1,uint param_2,uint param_3)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  
  uVar1 = *(uint *)(param_1 + 0xc);
  if ((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)) {
    return 0;
  }
  uVar4 = *(uint *)(param_1 + 0x14);
  if (uVar4 == 0) {
    uVar3 = *(uint *)(param_1 + 0x18);
    if (uVar3 == 0) {
      iVar2 = param_3 - uVar1;
      goto LAB_00058678;
    }
  }
  else {
    if (param_2 < uVar4) {
      return 0;
    }
    uVar3 = *(uint *)(param_1 + 0x18);
  }
  if (uVar3 < param_2) {
    return 0;
  }
  iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1);
LAB_00058678:
  if (*(int *)(param_1 + 0x44) == 0) {
    return param_1 + 0x38;
  }
  return *(int *)(param_1 + 0x44) + iVar2 * 0xc;
}


lw v0,0xc(a0)
sltu v1,a2,v0
bne v1,zero,0x000586ac
_nop
lw v1,0x10(a0)
sltu a3,v1,a2
bne a3,zero,0x000586ac
_nop
lw t0,0x14(a0)
beq t0,zero,0x00058698
_sltu a3,a1,t0
bne a3,zero,0x000586ac
_nop
lw a3,0x18(a0)
sltu a3,a3,a1
bne a3,zero,0x000586bc
_addiu v1,v1,0x1
subu a1,a1,t0
subu v1,v1,v0
subu a2,a2,v0
mul v0,v1,a1
addu a2,v0,a2
lw v0,0x44(a0)
beq v0,zero,0x000586b4
_nop
sll a0,a2,0x1
addu a0,a0,a2
sll a0,a0,0x2
jr ra
_addu v0,v0,a0
lw a3,0x18(a0)
bne a3,zero,0x00058658
_nop
b 0x00058678
_subu a2,a2,v0
jr ra
_or v0,zero,zero
jr ra
_addiu v0,a0,0x38
jr ra
_or v0,zero,zero
(translation_unit "int FUN_00058620(int param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  if ((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)) {\n    return 0;\n  }\n  uVar4 = *(uint *)(param_1 + 0x14);\n  if (uVar4 == 0) {\n    uVar3 = *(uint *)(param_1 + 0x18);\n    if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }\n  }\n  else {\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }\n  if (uVar3 < param_2) {\n    return 0;\n  }\n  iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1);\nLAB_00058678:\n  if (*(int *)(param_1 + 0x44) == 0) {\n    return param_1 + 0x38;\n  }\n  return *(int *)(param_1 + 0x44) + iVar2 * 0xc;\n}\n\n" (function_definition "int FUN_00058620(int param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  if ((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)) {\n    return 0;\n  }\n  uVar4 = *(uint *)(param_1 + 0x14);\n  if (uVar4 == 0) {\n    uVar3 = *(uint *)(param_1 + 0x18);\n    if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }\n  }\n  else {\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }\n  if (uVar3 < param_2) {\n    return 0;\n  }\n  iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1);\nLAB_00058678:\n  if (*(int *)(param_1 + 0x44) == 0) {\n    return param_1 + 0x38;\n  }\n  return *(int *)(param_1 + 0x44) + iVar2 * 0xc;\n}" primitive_type (function_declarator "FUN_00058620(int param_1,uint param_2,uint param_3)" identifier (parameter_list "(int param_1,uint param_2,uint param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  if ((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)) {\n    return 0;\n  }\n  uVar4 = *(uint *)(param_1 + 0x14);\n  if (uVar4 == 0) {\n    uVar3 = *(uint *)(param_1 + 0x18);\n    if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }\n  }\n  else {\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }\n  if (uVar3 < param_2) {\n    return 0;\n  }\n  iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1);\nLAB_00058678:\n  if (*(int *)(param_1 + 0x44) == 0) {\n    return param_1 + 0x38;\n  }\n  return *(int *)(param_1 + 0x44) + iVar2 * 0xc;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "uVar1 = *(uint *)(param_1 + 0xc);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0xc)" identifier = (pointer_expression "*(uint *)(param_1 + 0xc)" * (cast_expression "(uint *)(param_1 + 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if ((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)) {\n    return 0;\n  }" if (parenthesized_expression "((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3))" ( (binary_expression "(param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)" (parenthesized_expression "(param_3 < uVar1)" ( (binary_expression "param_3 < uVar1" identifier < identifier) )) || (parenthesized_expression "(*(uint *)(param_1 + 0x10) < param_3)" ( (binary_expression "*(uint *)(param_1 + 0x10) < param_3" (pointer_expression "*(uint *)(param_1 + 0x10)" * (cast_expression "(uint *)(param_1 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) < identifier) ))) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar4 = *(uint *)(param_1 + 0x14);" (assignment_expression "uVar4 = *(uint *)(param_1 + 0x14)" identifier = (pointer_expression "*(uint *)(param_1 + 0x14)" * (cast_expression "(uint *)(param_1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (uVar4 == 0) {\n    uVar3 = *(uint *)(param_1 + 0x18);\n    if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }\n  }\n  else {\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar3 = *(uint *)(param_1 + 0x18);\n    if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }\n  }" { (expression_statement "uVar3 = *(uint *)(param_1 + 0x18);" (assignment_expression "uVar3 = *(uint *)(param_1 + 0x18)" identifier = (pointer_expression "*(uint *)(param_1 + 0x18)" * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (if_statement "if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }" { (expression_statement "iVar2 = param_3 - uVar1;" (assignment_expression "iVar2 = param_3 - uVar1" identifier = (binary_expression "param_3 - uVar1" identifier - identifier)) ;) (goto_statement "goto LAB_00058678;" goto statement_identifier ;) })) }) (else_clause "else {\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }" else (compound_statement "{\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }" { (if_statement "if (param_2 < uVar4) {\n      return 0;\n    }" if (parenthesized_expression "(param_2 < uVar4)" ( (binary_expression "param_2 < uVar4" identifier < identifier) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar3 = *(uint *)(param_1 + 0x18);" (assignment_expression "uVar3 = *(uint *)(param_1 + 0x18)" identifier = (pointer_expression "*(uint *)(param_1 + 0x18)" * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) }))) (if_statement "if (uVar3 < param_2) {\n    return 0;\n  }" if (parenthesized_expression "(uVar3 < param_2)" ( (binary_expression "uVar3 < param_2" identifier < identifier) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1);" (assignment_expression "iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1)" identifier = (binary_expression "((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1)" (binary_expression "((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4)" (parenthesized_expression "((*(uint *)(param_1 + 0x10) + 1) - uVar1)" ( (binary_expression "(*(uint *)(param_1 + 0x10) + 1) - uVar1" (parenthesized_expression "(*(uint *)(param_1 + 0x10) + 1)" ( (binary_expression "*(uint *)(param_1 + 0x10) + 1" (pointer_expression "*(uint *)(param_1 + 0x10)" * (cast_expression "(uint *)(param_1 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) + number_literal) )) - identifier) )) * (parenthesized_expression "(param_2 - uVar4)" ( (binary_expression "param_2 - uVar4" identifier - identifier) ))) + (parenthesized_expression "(param_3 - uVar1)" ( (binary_expression "param_3 - uVar1" identifier - identifier) )))) ;) (labeled_statement "LAB_00058678:\n  if (*(int *)(param_1 + 0x44) == 0) {\n    return param_1 + 0x38;\n  }" statement_identifier : (if_statement "if (*(int *)(param_1 + 0x44) == 0) {\n    return param_1 + 0x38;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x44) == 0)" ( (binary_expression "*(int *)(param_1 + 0x44) == 0" (pointer_expression "*(int *)(param_1 + 0x44)" * (cast_expression "(int *)(param_1 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    return param_1 + 0x38;\n  }" { (return_statement "return param_1 + 0x38;" return (binary_expression "param_1 + 0x38" identifier + number_literal) ;) }))) (return_statement "return *(int *)(param_1 + 0x44) + iVar2 * 0xc;" return (binary_expression "*(int *)(param_1 + 0x44) + iVar2 * 0xc" (pointer_expression "*(int *)(param_1 + 0x44)" * (cast_expression "(int *)(param_1 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) + (binary_expression "iVar2 * 0xc" identifier * number_literal)) ;) })))
(translation_unit "XCharStruct * x11_char_struct(XFontStruct *xfs,uchar byte1,uchar byte2)\n\n{\n  uint uVar1;\n  undefined3 in_register_00000014;\n  uint uVar2;\n  undefined3 in_register_00000018;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  \n  uVar3 = CONCAT31(in_register_00000018,byte2);\n  uVar2 = CONCAT31(in_register_00000014,byte1);\n  uVar1 = xfs->min_char_or_byte2;\n  if ((uVar3 < uVar1) || (xfs->max_char_or_byte2 < uVar3)) {\n    return (XCharStruct *)0x0;\n  }\n  uVar6 = xfs->min_byte1;\n  if (uVar6 == 0) {\n    uVar5 = xfs->max_byte1;\n    if (uVar5 == 0) {\n      iVar4 = uVar3 - uVar1;\n      goto LAB_00058678;\n    }\n  }\n  else {\n    if (uVar2 < uVar6) {\n      return (XCharStruct *)0x0;\n    }\n    uVar5 = xfs->max_byte1;\n  }\n  if (uVar5 < uVar2) {\n    return (XCharStruct *)0x0;\n  }\n  iVar4 = ((xfs->max_char_or_byte2 + 1) - uVar1) * (uVar2 - uVar6) + (uVar3 - uVar1);\nLAB_00058678:\n  if (xfs->per_char == (XCharStruct *)0x0) {\n    return &xfs->max_bounds;\n  }\n  return xfs->per_char + iVar4;\n}\n\n" (function_definition "XCharStruct * x11_char_struct(XFontStruct *xfs,uchar byte1,uchar byte2)\n\n{\n  uint uVar1;\n  undefined3 in_register_00000014;\n  uint uVar2;\n  undefined3 in_register_00000018;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  \n  uVar3 = CONCAT31(in_register_00000018,byte2);\n  uVar2 = CONCAT31(in_register_00000014,byte1);\n  uVar1 = xfs->min_char_or_byte2;\n  if ((uVar3 < uVar1) || (xfs->max_char_or_byte2 < uVar3)) {\n    return (XCharStruct *)0x0;\n  }\n  uVar6 = xfs->min_byte1;\n  if (uVar6 == 0) {\n    uVar5 = xfs->max_byte1;\n    if (uVar5 == 0) {\n      iVar4 = uVar3 - uVar1;\n      goto LAB_00058678;\n    }\n  }\n  else {\n    if (uVar2 < uVar6) {\n      return (XCharStruct *)0x0;\n    }\n    uVar5 = xfs->max_byte1;\n  }\n  if (uVar5 < uVar2) {\n    return (XCharStruct *)0x0;\n  }\n  iVar4 = ((xfs->max_char_or_byte2 + 1) - uVar1) * (uVar2 - uVar6) + (uVar3 - uVar1);\nLAB_00058678:\n  if (xfs->per_char == (XCharStruct *)0x0) {\n    return &xfs->max_bounds;\n  }\n  return xfs->per_char + iVar4;\n}" type_identifier (pointer_declarator "* x11_char_struct(XFontStruct *xfs,uchar byte1,uchar byte2)" * (function_declarator "x11_char_struct(XFontStruct *xfs,uchar byte1,uchar byte2)" identifier (parameter_list "(XFontStruct *xfs,uchar byte1,uchar byte2)" ( (parameter_declaration "XFontStruct *xfs" type_identifier (pointer_declarator "*xfs" * identifier)) , (parameter_declaration "uchar byte1" type_identifier identifier) , (parameter_declaration "uchar byte2" type_identifier identifier) )))) (compound_statement "{\n  uint uVar1;\n  undefined3 in_register_00000014;\n  uint uVar2;\n  undefined3 in_register_00000018;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  \n  uVar3 = CONCAT31(in_register_00000018,byte2);\n  uVar2 = CONCAT31(in_register_00000014,byte1);\n  uVar1 = xfs->min_char_or_byte2;\n  if ((uVar3 < uVar1) || (xfs->max_char_or_byte2 < uVar3)) {\n    return (XCharStruct *)0x0;\n  }\n  uVar6 = xfs->min_byte1;\n  if (uVar6 == 0) {\n    uVar5 = xfs->max_byte1;\n    if (uVar5 == 0) {\n      iVar4 = uVar3 - uVar1;\n      goto LAB_00058678;\n    }\n  }\n  else {\n    if (uVar2 < uVar6) {\n      return (XCharStruct *)0x0;\n    }\n    uVar5 = xfs->max_byte1;\n  }\n  if (uVar5 < uVar2) {\n    return (XCharStruct *)0x0;\n  }\n  iVar4 = ((xfs->max_char_or_byte2 + 1) - uVar1) * (uVar2 - uVar6) + (uVar3 - uVar1);\nLAB_00058678:\n  if (xfs->per_char == (XCharStruct *)0x0) {\n    return &xfs->max_bounds;\n  }\n  return xfs->per_char + iVar4;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined3 in_register_00000014;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "undefined3 in_register_00000018;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (expression_statement "uVar3 = CONCAT31(in_register_00000018,byte2);" (assignment_expression "uVar3 = CONCAT31(in_register_00000018,byte2)" identifier = (call_expression "CONCAT31(in_register_00000018,byte2)" identifier (argument_list "(in_register_00000018,byte2)" ( identifier , identifier )))) ;) (expression_statement "uVar2 = CONCAT31(in_register_00000014,byte1);" (assignment_expression "uVar2 = CONCAT31(in_register_00000014,byte1)" identifier = (call_expression "CONCAT31(in_register_00000014,byte1)" identifier (argument_list "(in_register_00000014,byte1)" ( identifier , identifier )))) ;) (expression_statement "uVar1 = xfs->min_char_or_byte2;" (assignment_expression "uVar1 = xfs->min_char_or_byte2" identifier = (field_expression "xfs->min_char_or_byte2" identifier -> field_identifier)) ;) (if_statement "if ((uVar3 < uVar1) || (xfs->max_char_or_byte2 < uVar3)) {\n    return (XCharStruct *)0x0;\n  }" if (parenthesized_expression "((uVar3 < uVar1) || (xfs->max_char_or_byte2 < uVar3))" ( (binary_expression "(uVar3 < uVar1) || (xfs->max_char_or_byte2 < uVar3)" (parenthesized_expression "(uVar3 < uVar1)" ( (binary_expression "uVar3 < uVar1" identifier < identifier) )) || (parenthesized_expression "(xfs->max_char_or_byte2 < uVar3)" ( (binary_expression "xfs->max_char_or_byte2 < uVar3" (field_expression "xfs->max_char_or_byte2" identifier -> field_identifier) < identifier) ))) )) (compound_statement "{\n    return (XCharStruct *)0x0;\n  }" { (return_statement "return (XCharStruct *)0x0;" return (cast_expression "(XCharStruct *)0x0" ( (type_descriptor "XCharStruct *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "uVar6 = xfs->min_byte1;" (assignment_expression "uVar6 = xfs->min_byte1" identifier = (field_expression "xfs->min_byte1" identifier -> field_identifier)) ;) (if_statement "if (uVar6 == 0) {\n    uVar5 = xfs->max_byte1;\n    if (uVar5 == 0) {\n      iVar4 = uVar3 - uVar1;\n      goto LAB_00058678;\n    }\n  }\n  else {\n    if (uVar2 < uVar6) {\n      return (XCharStruct *)0x0;\n    }\n    uVar5 = xfs->max_byte1;\n  }" if (parenthesized_expression "(uVar6 == 0)" ( (binary_expression "uVar6 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar5 = xfs->max_byte1;\n    if (uVar5 == 0) {\n      iVar4 = uVar3 - uVar1;\n      goto LAB_00058678;\n    }\n  }" { (expression_statement "uVar5 = xfs->max_byte1;" (assignment_expression "uVar5 = xfs->max_byte1" identifier = (field_expression "xfs->max_byte1" identifier -> field_identifier)) ;) (if_statement "if (uVar5 == 0) {\n      iVar4 = uVar3 - uVar1;\n      goto LAB_00058678;\n    }" if (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar4 = uVar3 - uVar1;\n      goto LAB_00058678;\n    }" { (expression_statement "iVar4 = uVar3 - uVar1;" (assignment_expression "iVar4 = uVar3 - uVar1" identifier = (binary_expression "uVar3 - uVar1" identifier - identifier)) ;) (goto_statement "goto LAB_00058678;" goto statement_identifier ;) })) }) (else_clause "else {\n    if (uVar2 < uVar6) {\n      return (XCharStruct *)0x0;\n    }\n    uVar5 = xfs->max_byte1;\n  }" else (compound_statement "{\n    if (uVar2 < uVar6) {\n      return (XCharStruct *)0x0;\n    }\n    uVar5 = xfs->max_byte1;\n  }" { (if_statement "if (uVar2 < uVar6) {\n      return (XCharStruct *)0x0;\n    }" if (parenthesized_expression "(uVar2 < uVar6)" ( (binary_expression "uVar2 < uVar6" identifier < identifier) )) (compound_statement "{\n      return (XCharStruct *)0x0;\n    }" { (return_statement "return (XCharStruct *)0x0;" return (cast_expression "(XCharStruct *)0x0" ( (type_descriptor "XCharStruct *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "uVar5 = xfs->max_byte1;" (assignment_expression "uVar5 = xfs->max_byte1" identifier = (field_expression "xfs->max_byte1" identifier -> field_identifier)) ;) }))) (if_statement "if (uVar5 < uVar2) {\n    return (XCharStruct *)0x0;\n  }" if (parenthesized_expression "(uVar5 < uVar2)" ( (binary_expression "uVar5 < uVar2" identifier < identifier) )) (compound_statement "{\n    return (XCharStruct *)0x0;\n  }" { (return_statement "return (XCharStruct *)0x0;" return (cast_expression "(XCharStruct *)0x0" ( (type_descriptor "XCharStruct *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "iVar4 = ((xfs->max_char_or_byte2 + 1) - uVar1) * (uVar2 - uVar6) + (uVar3 - uVar1);" (assignment_expression "iVar4 = ((xfs->max_char_or_byte2 + 1) - uVar1) * (uVar2 - uVar6) + (uVar3 - uVar1)" identifier = (binary_expression "((xfs->max_char_or_byte2 + 1) - uVar1) * (uVar2 - uVar6) + (uVar3 - uVar1)" (binary_expression "((xfs->max_char_or_byte2 + 1) - uVar1) * (uVar2 - uVar6)" (parenthesized_expression "((xfs->max_char_or_byte2 + 1) - uVar1)" ( (binary_expression "(xfs->max_char_or_byte2 + 1) - uVar1" (parenthesized_expression "(xfs->max_char_or_byte2 + 1)" ( (binary_expression "xfs->max_char_or_byte2 + 1" (field_expression "xfs->max_char_or_byte2" identifier -> field_identifier) + number_literal) )) - identifier) )) * (parenthesized_expression "(uVar2 - uVar6)" ( (binary_expression "uVar2 - uVar6" identifier - identifier) ))) + (parenthesized_expression "(uVar3 - uVar1)" ( (binary_expression "uVar3 - uVar1" identifier - identifier) )))) ;) (labeled_statement "LAB_00058678:\n  if (xfs->per_char == (XCharStruct *)0x0) {\n    return &xfs->max_bounds;\n  }" statement_identifier : (if_statement "if (xfs->per_char == (XCharStruct *)0x0) {\n    return &xfs->max_bounds;\n  }" if (parenthesized_expression "(xfs->per_char == (XCharStruct *)0x0)" ( (binary_expression "xfs->per_char == (XCharStruct *)0x0" (field_expression "xfs->per_char" identifier -> field_identifier) == (cast_expression "(XCharStruct *)0x0" ( (type_descriptor "XCharStruct *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return &xfs->max_bounds;\n  }" { (return_statement "return &xfs->max_bounds;" return (pointer_expression "&xfs->max_bounds" & (field_expression "xfs->max_bounds" identifier -> field_identifier)) ;) }))) (return_statement "return xfs->per_char + iVar4;" return (binary_expression "xfs->per_char + iVar4" (field_expression "xfs->per_char" identifier -> field_identifier) + identifier) ;) })))
(translation_unit "int FUN_00058620(int param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  if ((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)) {\n    return 0;\n  }\n  uVar4 = *(uint *)(param_1 + 0x14);\n  if (uVar4 == 0) {\n    uVar3 = *(uint *)(param_1 + 0x18);\n    if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }\n  }\n  else {\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }\n  if (uVar3 < param_2) {\n    return 0;\n  }\n  iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1);\nLAB_00058678:\n  if (*(int *)(param_1 + 0x44) == 0) {\n    return param_1 + 0x38;\n  }\n  return *(int *)(param_1 + 0x44) + iVar2 * 0xc;\n}\n\n" (function_definition "int FUN_00058620(int param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  if ((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)) {\n    return 0;\n  }\n  uVar4 = *(uint *)(param_1 + 0x14);\n  if (uVar4 == 0) {\n    uVar3 = *(uint *)(param_1 + 0x18);\n    if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }\n  }\n  else {\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }\n  if (uVar3 < param_2) {\n    return 0;\n  }\n  iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1);\nLAB_00058678:\n  if (*(int *)(param_1 + 0x44) == 0) {\n    return param_1 + 0x38;\n  }\n  return *(int *)(param_1 + 0x44) + iVar2 * 0xc;\n}" primitive_type (function_declarator "FUN_00058620(int param_1,uint param_2,uint param_3)" identifier (parameter_list "(int param_1,uint param_2,uint param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  if ((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)) {\n    return 0;\n  }\n  uVar4 = *(uint *)(param_1 + 0x14);\n  if (uVar4 == 0) {\n    uVar3 = *(uint *)(param_1 + 0x18);\n    if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }\n  }\n  else {\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }\n  if (uVar3 < param_2) {\n    return 0;\n  }\n  iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1);\nLAB_00058678:\n  if (*(int *)(param_1 + 0x44) == 0) {\n    return param_1 + 0x38;\n  }\n  return *(int *)(param_1 + 0x44) + iVar2 * 0xc;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "uVar1 = *(uint *)(param_1 + 0xc);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0xc)" identifier = (pointer_expression "*(uint *)(param_1 + 0xc)" * (cast_expression "(uint *)(param_1 + 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if ((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)) {\n    return 0;\n  }" if (parenthesized_expression "((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3))" ( (binary_expression "(param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)" (parenthesized_expression "(param_3 < uVar1)" ( (binary_expression "param_3 < uVar1" identifier < identifier) )) || (parenthesized_expression "(*(uint *)(param_1 + 0x10) < param_3)" ( (binary_expression "*(uint *)(param_1 + 0x10) < param_3" (pointer_expression "*(uint *)(param_1 + 0x10)" * (cast_expression "(uint *)(param_1 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) < identifier) ))) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar4 = *(uint *)(param_1 + 0x14);" (assignment_expression "uVar4 = *(uint *)(param_1 + 0x14)" identifier = (pointer_expression "*(uint *)(param_1 + 0x14)" * (cast_expression "(uint *)(param_1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (uVar4 == 0) {\n    uVar3 = *(uint *)(param_1 + 0x18);\n    if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }\n  }\n  else {\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar3 = *(uint *)(param_1 + 0x18);\n    if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }\n  }" { (expression_statement "uVar3 = *(uint *)(param_1 + 0x18);" (assignment_expression "uVar3 = *(uint *)(param_1 + 0x18)" identifier = (pointer_expression "*(uint *)(param_1 + 0x18)" * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (if_statement "if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }" { (expression_statement "iVar2 = param_3 - uVar1;" (assignment_expression "iVar2 = param_3 - uVar1" identifier = (binary_expression "param_3 - uVar1" identifier - identifier)) ;) (goto_statement "goto LAB_00058678;" goto statement_identifier ;) })) }) (else_clause "else {\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }" else (compound_statement "{\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }" { (if_statement "if (param_2 < uVar4) {\n      return 0;\n    }" if (parenthesized_expression "(param_2 < uVar4)" ( (binary_expression "param_2 < uVar4" identifier < identifier) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar3 = *(uint *)(param_1 + 0x18);" (assignment_expression "uVar3 = *(uint *)(param_1 + 0x18)" identifier = (pointer_expression "*(uint *)(param_1 + 0x18)" * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) }))) (if_statement "if (uVar3 < param_2) {\n    return 0;\n  }" if (parenthesized_expression "(uVar3 < param_2)" ( (binary_expression "uVar3 < param_2" identifier < identifier) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1);" (assignment_expression "iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1)" identifier = (binary_expression "((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1)" (binary_expression "((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4)" (parenthesized_expression "((*(uint *)(param_1 + 0x10) + 1) - uVar1)" ( (binary_expression "(*(uint *)(param_1 + 0x10) + 1) - uVar1" (parenthesized_expression "(*(uint *)(param_1 + 0x10) + 1)" ( (binary_expression "*(uint *)(param_1 + 0x10) + 1" (pointer_expression "*(uint *)(param_1 + 0x10)" * (cast_expression "(uint *)(param_1 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) + number_literal) )) - identifier) )) * (parenthesized_expression "(param_2 - uVar4)" ( (binary_expression "param_2 - uVar4" identifier - identifier) ))) + (parenthesized_expression "(param_3 - uVar1)" ( (binary_expression "param_3 - uVar1" identifier - identifier) )))) ;) (labeled_statement "LAB_00058678:\n  if (*(int *)(param_1 + 0x44) == 0) {\n    return param_1 + 0x38;\n  }" statement_identifier : (if_statement "if (*(int *)(param_1 + 0x44) == 0) {\n    return param_1 + 0x38;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x44) == 0)" ( (binary_expression "*(int *)(param_1 + 0x44) == 0" (pointer_expression "*(int *)(param_1 + 0x44)" * (cast_expression "(int *)(param_1 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    return param_1 + 0x38;\n  }" { (return_statement "return param_1 + 0x38;" return (binary_expression "param_1 + 0x38" identifier + number_literal) ;) }))) (return_statement "return *(int *)(param_1 + 0x44) + iVar2 * 0xc;" return (binary_expression "*(int *)(param_1 + 0x44) + iVar2 * 0xc" (pointer_expression "*(int *)(param_1 + 0x44)" * (cast_expression "(int *)(param_1 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) + (binary_expression "iVar2 * 0xc" identifier * number_literal)) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < IDENT) ))) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )) - IDENT) )) * (parenthesized_expression ( (binary_expression IDENT - IDENT) ))) + (parenthesized_expression ( (binary_expression IDENT - IDENT) )))) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (return_statement return (binary_expression IDENT + LIT) ;) }))) (return_statement return (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT)) ;) })))
(function_definition "int FUN_00058620(int param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  if ((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)) {\n    return 0;\n  }\n  uVar4 = *(uint *)(param_1 + 0x14);\n  if (uVar4 == 0) {\n    uVar3 = *(uint *)(param_1 + 0x18);\n    if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }\n  }\n  else {\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }\n  if (uVar3 < param_2) {\n    return 0;\n  }\n  iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1);\nLAB_00058678:\n  if (*(int *)(param_1 + 0x44) == 0) {\n    return param_1 + 0x38;\n  }\n  return *(int *)(param_1 + 0x44) + iVar2 * 0xc;\n}" (primitive_type "int") (function_declarator "FUN_00058620(int param_1,uint param_2,uint param_3)" (identifier "FUN_00058620") (parameter_list "(int param_1,uint param_2,uint param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")"))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  if ((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)) {\n    return 0;\n  }\n  uVar4 = *(uint *)(param_1 + 0x14);\n  if (uVar4 == 0) {\n    uVar3 = *(uint *)(param_1 + 0x18);\n    if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }\n  }\n  else {\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }\n  if (uVar3 < param_2) {\n    return 0;\n  }\n  iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1);\nLAB_00058678:\n  if (*(int *)(param_1 + 0x44) == 0) {\n    return param_1 + 0x38;\n  }\n  return *(int *)(param_1 + 0x44) + iVar2 * 0xc;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (expression_statement "uVar1 = *(uint *)(param_1 + 0xc);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0xc)" (identifier "uVar1") (= "=") (pointer_expression "*(uint *)(param_1 + 0xc)" (* "*") (cast_expression "(uint *)(param_1 + 0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (if_statement "if ((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)) {\n    return 0;\n  }" (if "if") (parenthesized_expression "((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3))" (( "(") (binary_expression "(param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)" (parenthesized_expression "(param_3 < uVar1)" (( "(") (binary_expression "param_3 < uVar1" (identifier "param_3") (< "<") (identifier "uVar1")) () ")")) (|| "||") (parenthesized_expression "(*(uint *)(param_1 + 0x10) < param_3)" (( "(") (binary_expression "*(uint *)(param_1 + 0x10) < param_3" (pointer_expression "*(uint *)(param_1 + 0x10)" (* "*") (cast_expression "(uint *)(param_1 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (< "<") (identifier "param_3")) () ")"))) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar4 = *(uint *)(param_1 + 0x14);" (assignment_expression "uVar4 = *(uint *)(param_1 + 0x14)" (identifier "uVar4") (= "=") (pointer_expression "*(uint *)(param_1 + 0x14)" (* "*") (cast_expression "(uint *)(param_1 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (uVar4 == 0) {\n    uVar3 = *(uint *)(param_1 + 0x18);\n    if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }\n  }\n  else {\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }" (if "if") (parenthesized_expression "(uVar4 == 0)" (( "(") (binary_expression "uVar4 == 0" (identifier "uVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar3 = *(uint *)(param_1 + 0x18);\n    if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }\n  }" ({ "{") (expression_statement "uVar3 = *(uint *)(param_1 + 0x18);" (assignment_expression "uVar3 = *(uint *)(param_1 + 0x18)" (identifier "uVar3") (= "=") (pointer_expression "*(uint *)(param_1 + 0x18)" (* "*") (cast_expression "(uint *)(param_1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (if_statement "if (uVar3 == 0) {\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }" (if "if") (parenthesized_expression "(uVar3 == 0)" (( "(") (binary_expression "uVar3 == 0" (identifier "uVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar2 = param_3 - uVar1;\n      goto LAB_00058678;\n    }" ({ "{") (expression_statement "iVar2 = param_3 - uVar1;" (assignment_expression "iVar2 = param_3 - uVar1" (identifier "iVar2") (= "=") (binary_expression "param_3 - uVar1" (identifier "param_3") (- "-") (identifier "uVar1"))) (; ";")) (goto_statement "goto LAB_00058678;" (goto "goto") (statement_identifier "LAB_00058678") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }" (else "else") (compound_statement "{\n    if (param_2 < uVar4) {\n      return 0;\n    }\n    uVar3 = *(uint *)(param_1 + 0x18);\n  }" ({ "{") (if_statement "if (param_2 < uVar4) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(param_2 < uVar4)" (( "(") (binary_expression "param_2 < uVar4" (identifier "param_2") (< "<") (identifier "uVar4")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar3 = *(uint *)(param_1 + 0x18);" (assignment_expression "uVar3 = *(uint *)(param_1 + 0x18)" (identifier "uVar3") (= "=") (pointer_expression "*(uint *)(param_1 + 0x18)" (* "*") (cast_expression "(uint *)(param_1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (} "}")))) (if_statement "if (uVar3 < param_2) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(uVar3 < param_2)" (( "(") (binary_expression "uVar3 < param_2" (identifier "uVar3") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1);" (assignment_expression "iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1)" (identifier "iVar2") (= "=") (binary_expression "((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1)" (binary_expression "((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4)" (parenthesized_expression "((*(uint *)(param_1 + 0x10) + 1) - uVar1)" (( "(") (binary_expression "(*(uint *)(param_1 + 0x10) + 1) - uVar1" (parenthesized_expression "(*(uint *)(param_1 + 0x10) + 1)" (( "(") (binary_expression "*(uint *)(param_1 + 0x10) + 1" (pointer_expression "*(uint *)(param_1 + 0x10)" (* "*") (cast_expression "(uint *)(param_1 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (+ "+") (number_literal "1")) () ")")) (- "-") (identifier "uVar1")) () ")")) (* "*") (parenthesized_expression "(param_2 - uVar4)" (( "(") (binary_expression "param_2 - uVar4" (identifier "param_2") (- "-") (identifier "uVar4")) () ")"))) (+ "+") (parenthesized_expression "(param_3 - uVar1)" (( "(") (binary_expression "param_3 - uVar1" (identifier "param_3") (- "-") (identifier "uVar1")) () ")")))) (; ";")) (labeled_statement "LAB_00058678:\n  if (*(int *)(param_1 + 0x44) == 0) {\n    return param_1 + 0x38;\n  }" (statement_identifier "LAB_00058678") (: ":") (if_statement "if (*(int *)(param_1 + 0x44) == 0) {\n    return param_1 + 0x38;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x44) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x44) == 0" (pointer_expression "*(int *)(param_1 + 0x44)" (* "*") (cast_expression "(int *)(param_1 + 0x44)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x44)" (( "(") (binary_expression "param_1 + 0x44" (identifier "param_1") (+ "+") (number_literal "0x44")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return param_1 + 0x38;\n  }" ({ "{") (return_statement "return param_1 + 0x38;" (return "return") (binary_expression "param_1 + 0x38" (identifier "param_1") (+ "+") (number_literal "0x38")) (; ";")) (} "}")))) (return_statement "return *(int *)(param_1 + 0x44) + iVar2 * 0xc;" (return "return") (binary_expression "*(int *)(param_1 + 0x44) + iVar2 * 0xc" (pointer_expression "*(int *)(param_1 + 0x44)" (* "*") (cast_expression "(int *)(param_1 + 0x44)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x44)" (( "(") (binary_expression "param_1 + 0x44" (identifier "param_1") (+ "+") (number_literal "0x44")) () ")")))) (+ "+") (binary_expression "iVar2 * 0xc" (identifier "iVar2") (* "*") (number_literal "0xc"))) (; ";")) (} "}")))

type_1 * function_1(type_2 *xfs,type_3 byte1,type_3 byte2)

{
  type_4 var_3;
  type_5 in_register_00000014;
  type_4 var_6;
  type_5 in_register_00000018;
  type_4 var_2;
  int var_7;
  type_4 var_5;
  type_4 var_4;
  
  var_2 = var_1(in_register_00000018,byte2);
  var_6 = var_1(in_register_00000014,byte1);
  var_3 = xfs->min_char_or_byte2;
  if ((var_2 < var_3) || (xfs->max_char_or_byte2 < var_2)) {
    return (type_1 *)0x0;
  }
  var_4 = xfs->min_byte1;
  if (var_4 == 0) {
    var_5 = xfs->max_byte1;
    if (var_5 == 0) {
      var_7 = var_2 - var_3;
      goto LAB_00058678;
    }
  }
  else {
    if (var_6 < var_4) {
      return (type_1 *)0x0;
    }
    var_5 = xfs->max_byte1;
  }
  if (var_5 < var_6) {
    return (type_1 *)0x0;
  }
  var_7 = ((xfs->max_char_or_byte2 + 1) - var_3) * (var_6 - var_4) + (var_2 - var_3);
LAB_00058678:
  if (xfs->per_char == (type_1 *)0x0) {
    return &xfs->max_bounds;
  }
  return xfs->per_char + var_7;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (goto_statement label: (statement_identifier))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (return_statement (binary_expression left: (identifier) right: (number_literal)))))) (return_statement (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))))))

int MASKED(int param_1,uint param_2,uint param_3)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  
  uVar1 = *(uint *)(param_1 + 0xc);
  if ((param_3 < uVar1) || (*(uint *)(param_1 + 0x10) < param_3)) {
    return 0;
  }
  uVar4 = *(uint *)(param_1 + 0x14);
  if (uVar4 == 0) {
    uVar3 = *(uint *)(param_1 + 0x18);
    if (uVar3 == 0) {
      iVar2 = param_3 - uVar1;
      goto LAB_00058678;
    }
  }
  else {
    if (param_2 < uVar4) {
      return 0;
    }
    uVar3 = *(uint *)(param_1 + 0x18);
  }
  if (uVar3 < param_2) {
    return 0;
  }
  iVar2 = ((*(uint *)(param_1 + 0x10) + 1) - uVar1) * (param_2 - uVar4) + (param_3 - uVar1);
LAB_00058678:
  if (*(int *)(param_1 + 0x44) == 0) {
    return param_1 + 0x38;
  }
  return *(int *)(param_1 + 0x44) + iVar2 * 0xc;
}

