
int top_up(state_t *state,uint n)

{
  int iVar1;
  uint uVar2;
  int iVar3;
  
  iVar1 = 1;
  iVar3 = state->bytebuffer_size - state->bytebuffer_offset;
  if (iVar3 < (int)n) {
    (*(code *)PTR_memmove_0012b174)
              (state->bytebuffer,state->bytebuffer + state->bytebuffer_offset,iVar3);
    state->bytebuffer_offset = 0;
    uVar2 = (*(code *)PTR_full_read_0012a2bc)
                      (state->gunzip_src_fd,state->bytebuffer + iVar3,0x4000 - iVar3);
    state->bytebuffer_size = uVar2;
    if (-1 < (int)uVar2) {
      state->bytebuffer_size = iVar3 + uVar2;
      return iVar3 + uVar2 < n ^ 1;
    }
    (*(code *)PTR_bb_error_msg_0012a1c8)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x4770)
    ;
    iVar1 = 0;
  }
  return iVar1;
}



bool FUN_000a6584(int param_1,uint param_2)

{
  int iVar1;
  bool bVar2;
  int iVar3;
  
  bVar2 = true;
  iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30);
  if (iVar3 < (int)param_2) {
    (*(code *)PTR_memmove_0012b174)
              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);
    *(undefined4 *)(param_1 + 0x30) = 0;
    iVar1 = (*(code *)PTR_FUN_0012a2bc)
                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,
                       0x4000 - iVar3);
    *(int *)(param_1 + 0x34) = iVar1;
    if (-1 < iVar1) {
      *(int *)(param_1 + 0x34) = iVar3 + iVar1;
      return param_2 <= (uint)(iVar3 + iVar1);
    }
    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);
    bVar2 = false;
  }
  return bVar2;
}


lui gp,0x9
addiu gp,gp,-0x4434
addu gp,gp,t9
addiu sp,sp,-0x28
lw v1,0x30(a0)
li v0,0x1
sw s1,0x1c(sp)
lw s1,0x34(a0)
sw gp,0x10(sp)
sw ra,0x24(sp)
subu s1,s1,v1
sw s2,0x20(sp)
slt a2,s1,a1
beq a2,zero,0x000a6620
_sw s0,0x18(sp)
or s0,a0,zero
lw a0,0x24(a0)
lw t9,-0x6fdc(gp)
or s2,a1,zero
or a2,s1,zero
jalr t9
_addu a1,a0,v1
li a2,0x4000
lw gp,0x10(sp)
lw a1,0x24(s0)
subu a2,a2,s1
lw a0,0xc(s0)
sw zero,0x30(s0)
lw t9,-0x7e94(gp)
jalr t9
_addu a1,a1,s1
lw gp,0x10(sp)
bgez v0,0x000a6638
_sw v0,0x34(s0)
lw a0,-0x7fa8(gp)
lw t9,-0x7f88(gp)
jalr t9
_addiu a0,a0,-0x4770
or v0,zero,zero
lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
addu s1,s1,v0
lw ra,0x24(sp)
sltu a1,s1,s2
lw s2,0x20(sp)
sw s1,0x34(s0)
xori v0,a1,0x1
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "bool FUN_000a6584(int param_1,uint param_2)\n\n{\n  int iVar1;\n  bool bVar2;\n  int iVar3;\n  \n  bVar2 = true;\n  iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30);\n  if (iVar3 < (int)param_2) {\n    (*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);\n    *(undefined4 *)(param_1 + 0x30) = 0;\n    iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);\n    *(int *)(param_1 + 0x34) = iVar1;\n    if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }\n    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);\n    bVar2 = false;\n  }\n  return bVar2;\n}\n\n" (function_definition "bool FUN_000a6584(int param_1,uint param_2)\n\n{\n  int iVar1;\n  bool bVar2;\n  int iVar3;\n  \n  bVar2 = true;\n  iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30);\n  if (iVar3 < (int)param_2) {\n    (*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);\n    *(undefined4 *)(param_1 + 0x30) = 0;\n    iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);\n    *(int *)(param_1 + 0x34) = iVar1;\n    if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }\n    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);\n    bVar2 = false;\n  }\n  return bVar2;\n}" primitive_type (function_declarator "FUN_000a6584(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  bool bVar2;\n  int iVar3;\n  \n  bVar2 = true;\n  iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30);\n  if (iVar3 < (int)param_2) {\n    (*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);\n    *(undefined4 *)(param_1 + 0x30) = 0;\n    iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);\n    *(int *)(param_1 + 0x34) = iVar1;\n    if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }\n    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);\n    bVar2 = false;\n  }\n  return bVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "bVar2 = true;" (assignment_expression "bVar2 = true" identifier = true) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30)" identifier = (binary_expression "*(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30)" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) - (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))))) ;) (if_statement "if (iVar3 < (int)param_2) {\n    (*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);\n    *(undefined4 *)(param_1 + 0x30) = 0;\n    iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);\n    *(int *)(param_1 + 0x34) = iVar1;\n    if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }\n    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);\n    bVar2 = false;\n  }" if (parenthesized_expression "(iVar3 < (int)param_2)" ( (binary_expression "iVar3 < (int)param_2" identifier < (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    (*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);\n    *(undefined4 *)(param_1 + 0x30) = 0;\n    iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);\n    *(int *)(param_1 + 0x34) = iVar1;\n    if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }\n    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);\n    bVar2 = false;\n  }" { (expression_statement "(*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);" (call_expression "(*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3)" (parenthesized_expression "(*(code *)PTR_memmove_0012b174)" ( (pointer_expression "*(code *)PTR_memmove_0012b174" * (cast_expression "(code *)PTR_memmove_0012b174" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3)" ( (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) , (binary_expression "*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30)" (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) + (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) , identifier ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x30) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x30)" * (cast_expression "(undefined4 *)(param_1 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);" (assignment_expression "iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3)" identifier = (call_expression "(*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3)" (parenthesized_expression "(*(code *)PTR_FUN_0012a2bc)" ( (pointer_expression "*(code *)PTR_FUN_0012a2bc" * (cast_expression "(code *)PTR_FUN_0012a2bc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , (binary_expression "*(int *)(param_1 + 0x24) + iVar3" (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) + identifier) , (binary_expression "0x4000 - iVar3" number_literal - identifier) )))) ;) (expression_statement "*(int *)(param_1 + 0x34) = iVar1;" (assignment_expression "*(int *)(param_1 + 0x34) = iVar1" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) = identifier) ;) (if_statement "if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }" { (expression_statement "*(int *)(param_1 + 0x34) = iVar3 + iVar1;" (assignment_expression "*(int *)(param_1 + 0x34) = iVar3 + iVar1" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) = (binary_expression "iVar3 + iVar1" identifier + identifier)) ;) (return_statement "return param_2 <= (uint)(iVar3 + iVar1);" return (binary_expression "param_2 <= (uint)(iVar3 + iVar1)" identifier <= (call_expression "(uint)(iVar3 + iVar1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar3 + iVar1)" ( (binary_expression "iVar3 + iVar1" identifier + identifier) )))) ;) })) (expression_statement "(*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);" (call_expression "(*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770)" (parenthesized_expression "(*(code *)PTR_FUN_0012a1c8)" ( (pointer_expression "*(code *)PTR_FUN_0012a1c8" * (cast_expression "(code *)PTR_FUN_0012a1c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_FUN_0012a1a8 + -0x4770)" ( (binary_expression "PTR_FUN_0012a1a8 + -0x4770" identifier + number_literal) ))) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) })) (return_statement "return bVar2;" return identifier ;) })))
(translation_unit "int top_up(state_t *state,uint n)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  \n  iVar1 = 1;\n  iVar3 = state->bytebuffer_size - state->bytebuffer_offset;\n  if (iVar3 < (int)n) {\n    (*(code *)PTR_memmove_0012b174)\n              (state->bytebuffer,state->bytebuffer + state->bytebuffer_offset,iVar3);\n    state->bytebuffer_offset = 0;\n    uVar2 = (*(code *)PTR_full_read_0012a2bc)\n                      (state->gunzip_src_fd,state->bytebuffer + iVar3,0x4000 - iVar3);\n    state->bytebuffer_size = uVar2;\n    if (-1 < (int)uVar2) {\n      state->bytebuffer_size = iVar3 + uVar2;\n      return iVar3 + uVar2 < n ^ 1;\n    }\n    (*(code *)PTR_bb_error_msg_0012a1c8)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x4770)\n    ;\n    iVar1 = 0;\n  }\n  return iVar1;\n}\n\n" (function_definition "int top_up(state_t *state,uint n)\n\n{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  \n  iVar1 = 1;\n  iVar3 = state->bytebuffer_size - state->bytebuffer_offset;\n  if (iVar3 < (int)n) {\n    (*(code *)PTR_memmove_0012b174)\n              (state->bytebuffer,state->bytebuffer + state->bytebuffer_offset,iVar3);\n    state->bytebuffer_offset = 0;\n    uVar2 = (*(code *)PTR_full_read_0012a2bc)\n                      (state->gunzip_src_fd,state->bytebuffer + iVar3,0x4000 - iVar3);\n    state->bytebuffer_size = uVar2;\n    if (-1 < (int)uVar2) {\n      state->bytebuffer_size = iVar3 + uVar2;\n      return iVar3 + uVar2 < n ^ 1;\n    }\n    (*(code *)PTR_bb_error_msg_0012a1c8)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x4770)\n    ;\n    iVar1 = 0;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "top_up(state_t *state,uint n)" identifier (parameter_list "(state_t *state,uint n)" ( (parameter_declaration "state_t *state" type_identifier (pointer_declarator "*state" * identifier)) , (parameter_declaration "uint n" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  \n  iVar1 = 1;\n  iVar3 = state->bytebuffer_size - state->bytebuffer_offset;\n  if (iVar3 < (int)n) {\n    (*(code *)PTR_memmove_0012b174)\n              (state->bytebuffer,state->bytebuffer + state->bytebuffer_offset,iVar3);\n    state->bytebuffer_offset = 0;\n    uVar2 = (*(code *)PTR_full_read_0012a2bc)\n                      (state->gunzip_src_fd,state->bytebuffer + iVar3,0x4000 - iVar3);\n    state->bytebuffer_size = uVar2;\n    if (-1 < (int)uVar2) {\n      state->bytebuffer_size = iVar3 + uVar2;\n      return iVar3 + uVar2 < n ^ 1;\n    }\n    (*(code *)PTR_bb_error_msg_0012a1c8)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x4770)\n    ;\n    iVar1 = 0;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (expression_statement "iVar3 = state->bytebuffer_size - state->bytebuffer_offset;" (assignment_expression "iVar3 = state->bytebuffer_size - state->bytebuffer_offset" identifier = (binary_expression "state->bytebuffer_size - state->bytebuffer_offset" (field_expression "state->bytebuffer_size" identifier -> field_identifier) - (field_expression "state->bytebuffer_offset" identifier -> field_identifier))) ;) (if_statement "if (iVar3 < (int)n) {\n    (*(code *)PTR_memmove_0012b174)\n              (state->bytebuffer,state->bytebuffer + state->bytebuffer_offset,iVar3);\n    state->bytebuffer_offset = 0;\n    uVar2 = (*(code *)PTR_full_read_0012a2bc)\n                      (state->gunzip_src_fd,state->bytebuffer + iVar3,0x4000 - iVar3);\n    state->bytebuffer_size = uVar2;\n    if (-1 < (int)uVar2) {\n      state->bytebuffer_size = iVar3 + uVar2;\n      return iVar3 + uVar2 < n ^ 1;\n    }\n    (*(code *)PTR_bb_error_msg_0012a1c8)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x4770)\n    ;\n    iVar1 = 0;\n  }" if (parenthesized_expression "(iVar3 < (int)n)" ( (binary_expression "iVar3 < (int)n" identifier < (cast_expression "(int)n" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    (*(code *)PTR_memmove_0012b174)\n              (state->bytebuffer,state->bytebuffer + state->bytebuffer_offset,iVar3);\n    state->bytebuffer_offset = 0;\n    uVar2 = (*(code *)PTR_full_read_0012a2bc)\n                      (state->gunzip_src_fd,state->bytebuffer + iVar3,0x4000 - iVar3);\n    state->bytebuffer_size = uVar2;\n    if (-1 < (int)uVar2) {\n      state->bytebuffer_size = iVar3 + uVar2;\n      return iVar3 + uVar2 < n ^ 1;\n    }\n    (*(code *)PTR_bb_error_msg_0012a1c8)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x4770)\n    ;\n    iVar1 = 0;\n  }" { (expression_statement "(*(code *)PTR_memmove_0012b174)\n              (state->bytebuffer,state->bytebuffer + state->bytebuffer_offset,iVar3);" (call_expression "(*(code *)PTR_memmove_0012b174)\n              (state->bytebuffer,state->bytebuffer + state->bytebuffer_offset,iVar3)" (parenthesized_expression "(*(code *)PTR_memmove_0012b174)" ( (pointer_expression "*(code *)PTR_memmove_0012b174" * (cast_expression "(code *)PTR_memmove_0012b174" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(state->bytebuffer,state->bytebuffer + state->bytebuffer_offset,iVar3)" ( (field_expression "state->bytebuffer" identifier -> field_identifier) , (binary_expression "state->bytebuffer + state->bytebuffer_offset" (field_expression "state->bytebuffer" identifier -> field_identifier) + (field_expression "state->bytebuffer_offset" identifier -> field_identifier)) , identifier ))) ;) (expression_statement "state->bytebuffer_offset = 0;" (assignment_expression "state->bytebuffer_offset = 0" (field_expression "state->bytebuffer_offset" identifier -> field_identifier) = number_literal) ;) (expression_statement "uVar2 = (*(code *)PTR_full_read_0012a2bc)\n                      (state->gunzip_src_fd,state->bytebuffer + iVar3,0x4000 - iVar3);" (assignment_expression "uVar2 = (*(code *)PTR_full_read_0012a2bc)\n                      (state->gunzip_src_fd,state->bytebuffer + iVar3,0x4000 - iVar3)" identifier = (call_expression "(*(code *)PTR_full_read_0012a2bc)\n                      (state->gunzip_src_fd,state->bytebuffer + iVar3,0x4000 - iVar3)" (parenthesized_expression "(*(code *)PTR_full_read_0012a2bc)" ( (pointer_expression "*(code *)PTR_full_read_0012a2bc" * (cast_expression "(code *)PTR_full_read_0012a2bc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(state->gunzip_src_fd,state->bytebuffer + iVar3,0x4000 - iVar3)" ( (field_expression "state->gunzip_src_fd" identifier -> field_identifier) , (binary_expression "state->bytebuffer + iVar3" (field_expression "state->bytebuffer" identifier -> field_identifier) + identifier) , (binary_expression "0x4000 - iVar3" number_literal - identifier) )))) ;) (expression_statement "state->bytebuffer_size = uVar2;" (assignment_expression "state->bytebuffer_size = uVar2" (field_expression "state->bytebuffer_size" identifier -> field_identifier) = identifier) ;) (if_statement "if (-1 < (int)uVar2) {\n      state->bytebuffer_size = iVar3 + uVar2;\n      return iVar3 + uVar2 < n ^ 1;\n    }" if (parenthesized_expression "(-1 < (int)uVar2)" ( (binary_expression "-1 < (int)uVar2" number_literal < (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      state->bytebuffer_size = iVar3 + uVar2;\n      return iVar3 + uVar2 < n ^ 1;\n    }" { (expression_statement "state->bytebuffer_size = iVar3 + uVar2;" (assignment_expression "state->bytebuffer_size = iVar3 + uVar2" (field_expression "state->bytebuffer_size" identifier -> field_identifier) = (binary_expression "iVar3 + uVar2" identifier + identifier)) ;) (return_statement "return iVar3 + uVar2 < n ^ 1;" return (binary_expression "iVar3 + uVar2 < n ^ 1" (binary_expression "iVar3 + uVar2 < n" (binary_expression "iVar3 + uVar2" identifier + identifier) < identifier) ^ number_literal) ;) })) (expression_statement "(*(code *)PTR_bb_error_msg_0012a1c8)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x4770)\n    ;" (binary_expression "(*(code *)PTR_bb_error_msg_0012a1c8)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)9__f_l_0012a1a8 + -0x4770" (call_expression "(*(code *)PTR_bb_error_msg_0012a1c8)(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)" (parenthesized_expression "(*(code *)PTR_bb_error_msg_0012a1c8)" ( (pointer_expression "*(code *)PTR_bb_error_msg_0012a1c8" * (cast_expression "(code *)PTR_bb_error_msg_0012a1c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P)" ( (binary_expression "PTR_s_<_W_q_v1_HxLJ_&uD_sa_____P" (binary_expression "PTR_s_<_W_q_v1_HxLJ_" identifier < identifier) & identifier) ))) (ERROR "9__f_l_0012a1a8" number_literal identifier) + number_literal) (ERROR ")" )) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "bool FUN_000a6584(int param_1,uint param_2)\n\n{\n  int iVar1;\n  bool bVar2;\n  int iVar3;\n  \n  bVar2 = true;\n  iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30);\n  if (iVar3 < (int)param_2) {\n    (*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);\n    *(undefined4 *)(param_1 + 0x30) = 0;\n    iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);\n    *(int *)(param_1 + 0x34) = iVar1;\n    if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }\n    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);\n    bVar2 = false;\n  }\n  return bVar2;\n}\n\n" (function_definition "bool FUN_000a6584(int param_1,uint param_2)\n\n{\n  int iVar1;\n  bool bVar2;\n  int iVar3;\n  \n  bVar2 = true;\n  iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30);\n  if (iVar3 < (int)param_2) {\n    (*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);\n    *(undefined4 *)(param_1 + 0x30) = 0;\n    iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);\n    *(int *)(param_1 + 0x34) = iVar1;\n    if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }\n    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);\n    bVar2 = false;\n  }\n  return bVar2;\n}" primitive_type (function_declarator "FUN_000a6584(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  bool bVar2;\n  int iVar3;\n  \n  bVar2 = true;\n  iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30);\n  if (iVar3 < (int)param_2) {\n    (*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);\n    *(undefined4 *)(param_1 + 0x30) = 0;\n    iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);\n    *(int *)(param_1 + 0x34) = iVar1;\n    if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }\n    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);\n    bVar2 = false;\n  }\n  return bVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "bVar2 = true;" (assignment_expression "bVar2 = true" identifier = true) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30)" identifier = (binary_expression "*(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30)" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) - (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))))) ;) (if_statement "if (iVar3 < (int)param_2) {\n    (*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);\n    *(undefined4 *)(param_1 + 0x30) = 0;\n    iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);\n    *(int *)(param_1 + 0x34) = iVar1;\n    if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }\n    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);\n    bVar2 = false;\n  }" if (parenthesized_expression "(iVar3 < (int)param_2)" ( (binary_expression "iVar3 < (int)param_2" identifier < (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    (*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);\n    *(undefined4 *)(param_1 + 0x30) = 0;\n    iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);\n    *(int *)(param_1 + 0x34) = iVar1;\n    if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }\n    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);\n    bVar2 = false;\n  }" { (expression_statement "(*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);" (call_expression "(*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3)" (parenthesized_expression "(*(code *)PTR_memmove_0012b174)" ( (pointer_expression "*(code *)PTR_memmove_0012b174" * (cast_expression "(code *)PTR_memmove_0012b174" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3)" ( (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) , (binary_expression "*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30)" (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) + (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) , identifier ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x30) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x30)" * (cast_expression "(undefined4 *)(param_1 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);" (assignment_expression "iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3)" identifier = (call_expression "(*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3)" (parenthesized_expression "(*(code *)PTR_FUN_0012a2bc)" ( (pointer_expression "*(code *)PTR_FUN_0012a2bc" * (cast_expression "(code *)PTR_FUN_0012a2bc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , (binary_expression "*(int *)(param_1 + 0x24) + iVar3" (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) + identifier) , (binary_expression "0x4000 - iVar3" number_literal - identifier) )))) ;) (expression_statement "*(int *)(param_1 + 0x34) = iVar1;" (assignment_expression "*(int *)(param_1 + 0x34) = iVar1" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) = identifier) ;) (if_statement "if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }" { (expression_statement "*(int *)(param_1 + 0x34) = iVar3 + iVar1;" (assignment_expression "*(int *)(param_1 + 0x34) = iVar3 + iVar1" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) = (binary_expression "iVar3 + iVar1" identifier + identifier)) ;) (return_statement "return param_2 <= (uint)(iVar3 + iVar1);" return (binary_expression "param_2 <= (uint)(iVar3 + iVar1)" identifier <= (call_expression "(uint)(iVar3 + iVar1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar3 + iVar1)" ( (binary_expression "iVar3 + iVar1" identifier + identifier) )))) ;) })) (expression_statement "(*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);" (call_expression "(*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770)" (parenthesized_expression "(*(code *)PTR_FUN_0012a1c8)" ( (pointer_expression "*(code *)PTR_FUN_0012a1c8" * (cast_expression "(code *)PTR_FUN_0012a1c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_FUN_0012a1a8 + -0x4770)" ( (binary_expression "PTR_FUN_0012a1a8 + -0x4770" identifier + number_literal) ))) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) })) (return_statement "return bVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT) , (binary_expression LIT - IDENT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + IDENT)) ;) (return_statement return (binary_expression IDENT <= (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + IDENT) )))) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) })) (return_statement return IDENT ;) })))
(function_definition "bool FUN_000a6584(int param_1,uint param_2)\n\n{\n  int iVar1;\n  bool bVar2;\n  int iVar3;\n  \n  bVar2 = true;\n  iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30);\n  if (iVar3 < (int)param_2) {\n    (*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);\n    *(undefined4 *)(param_1 + 0x30) = 0;\n    iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);\n    *(int *)(param_1 + 0x34) = iVar1;\n    if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }\n    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);\n    bVar2 = false;\n  }\n  return bVar2;\n}" (primitive_type "bool") (function_declarator "FUN_000a6584(int param_1,uint param_2)" (identifier "FUN_000a6584") (parameter_list "(int param_1,uint param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  bool bVar2;\n  int iVar3;\n  \n  bVar2 = true;\n  iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30);\n  if (iVar3 < (int)param_2) {\n    (*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);\n    *(undefined4 *)(param_1 + 0x30) = 0;\n    iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);\n    *(int *)(param_1 + 0x34) = iVar1;\n    if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }\n    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);\n    bVar2 = false;\n  }\n  return bVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "bool bVar2;" (primitive_type "bool") (identifier "bVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "bVar2 = true;" (assignment_expression "bVar2 = true" (identifier "bVar2") (= "=") (true "true")) (; ";")) (expression_statement "iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30)" (identifier "iVar3") (= "=") (binary_expression "*(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30)" (pointer_expression "*(int *)(param_1 + 0x34)" (* "*") (cast_expression "(int *)(param_1 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x34)" (( "(") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34")) () ")")))) (- "-") (pointer_expression "*(int *)(param_1 + 0x30)" (* "*") (cast_expression "(int *)(param_1 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))))) (; ";")) (if_statement "if (iVar3 < (int)param_2) {\n    (*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);\n    *(undefined4 *)(param_1 + 0x30) = 0;\n    iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);\n    *(int *)(param_1 + 0x34) = iVar1;\n    if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }\n    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);\n    bVar2 = false;\n  }" (if "if") (parenthesized_expression "(iVar3 < (int)param_2)" (( "(") (binary_expression "iVar3 < (int)param_2" (identifier "iVar3") (< "<") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) () ")")) (compound_statement "{\n    (*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);\n    *(undefined4 *)(param_1 + 0x30) = 0;\n    iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);\n    *(int *)(param_1 + 0x34) = iVar1;\n    if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }\n    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);\n    bVar2 = false;\n  }" ({ "{") (expression_statement "(*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);" (call_expression "(*(code *)PTR_memmove_0012b174)\n              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3)" (parenthesized_expression "(*(code *)PTR_memmove_0012b174)" (( "(") (pointer_expression "*(code *)PTR_memmove_0012b174" (* "*") (cast_expression "(code *)PTR_memmove_0012b174" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memmove_0012b174"))) () ")")) (argument_list "(*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3)" (( "(") (pointer_expression "*(int *)(param_1 + 0x24)" (* "*") (cast_expression "(int *)(param_1 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (, ",") (binary_expression "*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30)" (pointer_expression "*(int *)(param_1 + 0x24)" (* "*") (cast_expression "(int *)(param_1 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (+ "+") (pointer_expression "*(int *)(param_1 + 0x30)" (* "*") (cast_expression "(int *)(param_1 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")"))))) (, ",") (identifier "iVar3") () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x30) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x30)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x30)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3);" (assignment_expression "iVar1 = (*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_FUN_0012a2bc)\n                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3)" (parenthesized_expression "(*(code *)PTR_FUN_0012a2bc)" (( "(") (pointer_expression "*(code *)PTR_FUN_0012a2bc" (* "*") (cast_expression "(code *)PTR_FUN_0012a2bc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0012a2bc"))) () ")")) (argument_list "(*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,\n                       0x4000 - iVar3)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (binary_expression "*(int *)(param_1 + 0x24) + iVar3" (pointer_expression "*(int *)(param_1 + 0x24)" (* "*") (cast_expression "(int *)(param_1 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (+ "+") (identifier "iVar3")) (, ",") (binary_expression "0x4000 - iVar3" (number_literal "0x4000") (- "-") (identifier "iVar3")) () ")")))) (; ";")) (expression_statement "*(int *)(param_1 + 0x34) = iVar1;" (assignment_expression "*(int *)(param_1 + 0x34) = iVar1" (pointer_expression "*(int *)(param_1 + 0x34)" (* "*") (cast_expression "(int *)(param_1 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x34)" (( "(") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (-1 < iVar1) {\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }" (if "if") (parenthesized_expression "(-1 < iVar1)" (( "(") (binary_expression "-1 < iVar1" (number_literal "-1") (< "<") (identifier "iVar1")) () ")")) (compound_statement "{\n      *(int *)(param_1 + 0x34) = iVar3 + iVar1;\n      return param_2 <= (uint)(iVar3 + iVar1);\n    }" ({ "{") (expression_statement "*(int *)(param_1 + 0x34) = iVar3 + iVar1;" (assignment_expression "*(int *)(param_1 + 0x34) = iVar3 + iVar1" (pointer_expression "*(int *)(param_1 + 0x34)" (* "*") (cast_expression "(int *)(param_1 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x34)" (( "(") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34")) () ")")))) (= "=") (binary_expression "iVar3 + iVar1" (identifier "iVar3") (+ "+") (identifier "iVar1"))) (; ";")) (return_statement "return param_2 <= (uint)(iVar3 + iVar1);" (return "return") (binary_expression "param_2 <= (uint)(iVar3 + iVar1)" (identifier "param_2") (<= "<=") (call_expression "(uint)(iVar3 + iVar1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar3 + iVar1)" (( "(") (binary_expression "iVar3 + iVar1" (identifier "iVar3") (+ "+") (identifier "iVar1")) () ")")))) (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);" (call_expression "(*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770)" (parenthesized_expression "(*(code *)PTR_FUN_0012a1c8)" (( "(") (pointer_expression "*(code *)PTR_FUN_0012a1c8" (* "*") (cast_expression "(code *)PTR_FUN_0012a1c8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0012a1c8"))) () ")")) (argument_list "(PTR_FUN_0012a1a8 + -0x4770)" (( "(") (binary_expression "PTR_FUN_0012a1a8 + -0x4770" (identifier "PTR_FUN_0012a1a8") (+ "+") (number_literal "-0x4770")) () ")"))) (; ";")) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" (identifier "bVar2") (= "=") (false "false")) (; ";")) (} "}"))) (return_statement "return bVar2;" (return "return") (identifier "bVar2") (; ";")) (} "}")))

int function_1(type_1 *state,type_2 var_3)

{
  int iVar1;
  type_2 var_2;
  int var_1;
  
  iVar1 = 1;
  var_1 = state->bytebuffer_size - state->bytebuffer_offset;
  if (var_1 < (int)var_3) {
    (*(type_3 *)PTR_memmove_0012b174)
              (state->bytebuffer,state->bytebuffer + state->bytebuffer_offset,var_1);
    state->bytebuffer_offset = 0;
    var_2 = (*(type_3 *)PTR_full_read_0012a2bc)
                      (state->gunzip_src_fd,state->bytebuffer + var_1,0x4000 - var_1);
    state->bytebuffer_size = var_2;
    if (-1 < (int)var_2) {
      state->bytebuffer_size = var_1 + var_2;
      return var_1 + var_2 < var_3 ^ 1;
    }
    (*(type_3 *)PTR_bb_error_msg_0012a1c8)(var_4<var_5&var_6)9__f_l_0012a1a8 + -0x4770)
    ;
    iVar1 = 0;
  }
  return iVar1;
}


(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)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (true))) (expression_statement (assignment_expression left: (identifier) right: (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: (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)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (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 (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))))) (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: (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)))))) (identifier)))) (expression_statement (assignment_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))) (expression_statement (assignment_expression left: (identifier) right: (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 (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))))) (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: (identifier)) (binary_expression left: (number_literal) right: (identifier)))))) (expression_statement (assignment_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: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_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: (identifier)))) (return_statement (binary_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (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 (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (false))))) (return_statement (identifier)))))

bool MASKED(int param_1,uint param_2)

{
  int iVar1;
  bool bVar2;
  int iVar3;
  
  bVar2 = true;
  iVar3 = *(int *)(param_1 + 0x34) - *(int *)(param_1 + 0x30);
  if (iVar3 < (int)param_2) {
    (*(code *)PTR_memmove_0012b174)
              (*(int *)(param_1 + 0x24),*(int *)(param_1 + 0x24) + *(int *)(param_1 + 0x30),iVar3);
    *(undefined4 *)(param_1 + 0x30) = 0;
    iVar1 = (*(code *)PTR_FUN_0012a2bc)
                      (*(undefined4 *)(param_1 + 0xc),*(int *)(param_1 + 0x24) + iVar3,
                       0x4000 - iVar3);
    *(int *)(param_1 + 0x34) = iVar1;
    if (-1 < iVar1) {
      *(int *)(param_1 + 0x34) = iVar3 + iVar1;
      return param_2 <= (uint)(iVar3 + iVar1);
    }
    (*(code *)PTR_FUN_0012a1c8)(PTR_FUN_0012a1a8 + -0x4770);
    bVar2 = false;
  }
  return bVar2;
}

