
int32_t BZ2_blockSort(EState *state)

{
  int iVar1;
  uint32_t uVar2;
  uint32_t *puVar3;
  uint uVar4;
  uint32_t unaff_s1;
  
  iVar1 = state->nblock;
  if (9999 < iVar1) {
    uVar4 = iVar1 + 0x22;
    if ((uVar4 & 1) != 0) {
      uVar4 = iVar1 + 0x23;
    }
    state->quadrant = (uint16_t *)(state->block + uVar4);
    state->budget = iVar1 * 9;
    mainSort(state);
    if (-1 < state->budget) goto LAB_000a0e08;
  }
  fallbackSort(state);
LAB_000a0e08:
  uVar2 = unaff_s1;
  if (state->nblock != 0) {
    puVar3 = state->ptr;
    uVar2 = *puVar3;
    if (uVar2 != 0) {
      uVar2 = 0;
      do {
        puVar3 = puVar3 + 1;
        uVar2 = uVar2 + 1;
        if (uVar2 == state->nblock) {
          return unaff_s1;
        }
      } while (*puVar3 != 0);
    }
  }
  return uVar2;
}



int FUN_000a0d70(int param_1)

{
  int iVar1;
  int *piVar2;
  uint uVar3;
  int unaff_s1;
  
  iVar1 = *(int *)(param_1 + 0x34);
  if (9999 < iVar1) {
    uVar3 = iVar1 + 0x22;
    if ((uVar3 & 1) != 0) {
      uVar3 = iVar1 + 0x23;
    }
    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;
    *(int *)(param_1 + 0x18) = iVar1 * 9;
    FUN_000a0784(param_1);
    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;
  }
  FUN_0009e148(param_1);
LAB_000a0e08:
  iVar1 = unaff_s1;
  if (*(int *)(param_1 + 0x34) != 0) {
    piVar2 = *(int **)(param_1 + 0x1c);
    iVar1 = *piVar2;
    if (iVar1 != 0) {
      iVar1 = 0;
      do {
        piVar2 = piVar2 + 1;
        iVar1 = iVar1 + 1;
        if (iVar1 == *(int *)(param_1 + 0x34)) {
          return unaff_s1;
        }
      } while (*piVar2 != 0);
    }
  }
  return iVar1;
}


lui gp,0xa
addiu gp,gp,-0x7c20
addu gp,gp,t9
addiu sp,sp,-0x28
sw ra,0x24(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
sw gp,0x10(sp)
lw v0,0x34(a0)
slti v1,v0,0x2710
bne v1,zero,0x000a0df0
_or s0,a0,zero
addiu a0,v0,0x22
andi v1,a0,0x1
beq v1,zero,0x000a0db4
_nop
addiu a0,v0,0x23
lw v1,0x20(s0)
addu v1,v1,a0
sw v1,0x14(s0)
sll v1,v0,0x3
addu v0,v1,v0
sw v0,0x18(s0)
or a0,s0,zero
lw t9,-0x777c(gp)
addiu t9,t9,0x784
bal 0x000a0784
_nop
lw gp,0x10(sp)
lw v0,0x18(s0)
bgez v0,0x000a0e08
_nop
or a0,s0,zero
lw t9,-0x777c(gp)
addiu t9,t9,-0x1eb8
bal 0x0009e148
_nop
lw gp,0x10(sp)
lw a0,0x34(s0)
beq a0,zero,0x000a0e50
_or v0,s1,zero
lw v1,0x1c(s0)
lw v0,0x0(v1)
beq v0,zero,0x000a0e48
_nop
addiu v1,v1,0x4
or v0,zero,zero
addiu v0,v0,0x1
beq v0,a0,0x000a0e4c
_nop
addiu v1,v1,0x4
lw a1,-0x4(v1)
bne a1,zero,0x000a0e2c
_nop
or s1,v0,zero
or v0,s1,zero
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "int FUN_000a0d70(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_s1;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  if (9999 < iVar1) {\n    uVar3 = iVar1 + 0x22;\n    if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }\n    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;\n    *(int *)(param_1 + 0x18) = iVar1 * 9;\n    FUN_000a0784(param_1);\n    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;\n  }\n  FUN_0009e148(param_1);\nLAB_000a0e08:\n  iVar1 = unaff_s1;\n  if (*(int *)(param_1 + 0x34) != 0) {\n    piVar2 = *(int **)(param_1 + 0x1c);\n    iVar1 = *piVar2;\n    if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_000a0d70(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_s1;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  if (9999 < iVar1) {\n    uVar3 = iVar1 + 0x22;\n    if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }\n    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;\n    *(int *)(param_1 + 0x18) = iVar1 * 9;\n    FUN_000a0784(param_1);\n    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;\n  }\n  FUN_0009e148(param_1);\nLAB_000a0e08:\n  iVar1 = unaff_s1;\n  if (*(int *)(param_1 + 0x34) != 0) {\n    piVar2 = *(int **)(param_1 + 0x1c);\n    iVar1 = *piVar2;\n    if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_000a0d70(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_s1;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  if (9999 < iVar1) {\n    uVar3 = iVar1 + 0x22;\n    if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }\n    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;\n    *(int *)(param_1 + 0x18) = iVar1 * 9;\n    FUN_000a0784(param_1);\n    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;\n  }\n  FUN_0009e148(param_1);\nLAB_000a0e08:\n  iVar1 = unaff_s1;\n  if (*(int *)(param_1 + 0x34) != 0) {\n    piVar2 = *(int **)(param_1 + 0x1c);\n    iVar1 = *piVar2;\n    if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int unaff_s1;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(param_1 + 0x34);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x34)" identifier = (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) ))))) ;) (if_statement "if (9999 < iVar1) {\n    uVar3 = iVar1 + 0x22;\n    if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }\n    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;\n    *(int *)(param_1 + 0x18) = iVar1 * 9;\n    FUN_000a0784(param_1);\n    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;\n  }" if (parenthesized_expression "(9999 < iVar1)" ( (binary_expression "9999 < iVar1" number_literal < identifier) )) (compound_statement "{\n    uVar3 = iVar1 + 0x22;\n    if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }\n    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;\n    *(int *)(param_1 + 0x18) = iVar1 * 9;\n    FUN_000a0784(param_1);\n    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;\n  }" { (expression_statement "uVar3 = iVar1 + 0x22;" (assignment_expression "uVar3 = iVar1 + 0x22" identifier = (binary_expression "iVar1 + 0x22" identifier + number_literal)) ;) (if_statement "if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }" if (parenthesized_expression "((uVar3 & 1) != 0)" ( (binary_expression "(uVar3 & 1) != 0" (parenthesized_expression "(uVar3 & 1)" ( (binary_expression "uVar3 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n      uVar3 = iVar1 + 0x23;\n    }" { (expression_statement "uVar3 = iVar1 + 0x23;" (assignment_expression "uVar3 = iVar1 + 0x23" identifier = (binary_expression "iVar1 + 0x23" identifier + number_literal)) ;) })) (expression_statement "*(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;" (assignment_expression "*(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3" (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) )))) = (binary_expression "*(int *)(param_1 + 0x20) + uVar3" (pointer_expression "*(int *)(param_1 + 0x20)" * (cast_expression "(int *)(param_1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) + identifier)) ;) (expression_statement "*(int *)(param_1 + 0x18) = iVar1 * 9;" (assignment_expression "*(int *)(param_1 + 0x18) = iVar1 * 9" (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = (binary_expression "iVar1 * 9" identifier * number_literal)) ;) (expression_statement "FUN_000a0784(param_1);" (call_expression "FUN_000a0784(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (if_statement "if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;" if (parenthesized_expression "(-1 < *(int *)(param_1 + 0x18))" ( (binary_expression "-1 < *(int *)(param_1 + 0x18)" number_literal < (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) )) (goto_statement "goto LAB_000a0e08;" goto statement_identifier ;)) })) (expression_statement "FUN_0009e148(param_1);" (call_expression "FUN_0009e148(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (labeled_statement "LAB_000a0e08:\n  iVar1 = unaff_s1;" statement_identifier : (expression_statement "iVar1 = unaff_s1;" (assignment_expression "iVar1 = unaff_s1" identifier = identifier) ;)) (if_statement "if (*(int *)(param_1 + 0x34) != 0) {\n    piVar2 = *(int **)(param_1 + 0x1c);\n    iVar1 = *piVar2;\n    if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x34) != 0)" ( (binary_expression "*(int *)(param_1 + 0x34) != 0" (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) )))) != number_literal) )) (compound_statement "{\n    piVar2 = *(int **)(param_1 + 0x1c);\n    iVar1 = *piVar2;\n    if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }\n  }" { (expression_statement "piVar2 = *(int **)(param_1 + 0x1c);" (assignment_expression "piVar2 = *(int **)(param_1 + 0x1c)" identifier = (pointer_expression "*(int **)(param_1 + 0x1c)" * (cast_expression "(int **)(param_1 + 0x1c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (if_statement "if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);" do (compound_statement "{\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      }" { (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (if_statement "if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }" if (parenthesized_expression "(iVar1 == *(int *)(param_1 + 0x34))" ( (binary_expression "iVar1 == *(int *)(param_1 + 0x34)" identifier == (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) ))))) )) (compound_statement "{\n          return unaff_s1;\n        }" { (return_statement "return unaff_s1;" return identifier ;) })) }) while (parenthesized_expression "(*piVar2 != 0)" ( (binary_expression "*piVar2 != 0" (pointer_expression "*piVar2" * identifier) != number_literal) )) ;) })) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int32_t BZ2_blockSort(EState *state)\n\n{\n  int iVar1;\n  uint32_t uVar2;\n  uint32_t *puVar3;\n  uint uVar4;\n  uint32_t unaff_s1;\n  \n  iVar1 = state->nblock;\n  if (9999 < iVar1) {\n    uVar4 = iVar1 + 0x22;\n    if ((uVar4 & 1) != 0) {\n      uVar4 = iVar1 + 0x23;\n    }\n    state->quadrant = (uint16_t *)(state->block + uVar4);\n    state->budget = iVar1 * 9;\n    mainSort(state);\n    if (-1 < state->budget) goto LAB_000a0e08;\n  }\n  fallbackSort(state);\nLAB_000a0e08:\n  uVar2 = unaff_s1;\n  if (state->nblock != 0) {\n    puVar3 = state->ptr;\n    uVar2 = *puVar3;\n    if (uVar2 != 0) {\n      uVar2 = 0;\n      do {\n        puVar3 = puVar3 + 1;\n        uVar2 = uVar2 + 1;\n        if (uVar2 == state->nblock) {\n          return unaff_s1;\n        }\n      } while (*puVar3 != 0);\n    }\n  }\n  return uVar2;\n}\n\n" (function_definition "int32_t BZ2_blockSort(EState *state)\n\n{\n  int iVar1;\n  uint32_t uVar2;\n  uint32_t *puVar3;\n  uint uVar4;\n  uint32_t unaff_s1;\n  \n  iVar1 = state->nblock;\n  if (9999 < iVar1) {\n    uVar4 = iVar1 + 0x22;\n    if ((uVar4 & 1) != 0) {\n      uVar4 = iVar1 + 0x23;\n    }\n    state->quadrant = (uint16_t *)(state->block + uVar4);\n    state->budget = iVar1 * 9;\n    mainSort(state);\n    if (-1 < state->budget) goto LAB_000a0e08;\n  }\n  fallbackSort(state);\nLAB_000a0e08:\n  uVar2 = unaff_s1;\n  if (state->nblock != 0) {\n    puVar3 = state->ptr;\n    uVar2 = *puVar3;\n    if (uVar2 != 0) {\n      uVar2 = 0;\n      do {\n        puVar3 = puVar3 + 1;\n        uVar2 = uVar2 + 1;\n        if (uVar2 == state->nblock) {\n          return unaff_s1;\n        }\n      } while (*puVar3 != 0);\n    }\n  }\n  return uVar2;\n}" primitive_type (function_declarator "BZ2_blockSort(EState *state)" identifier (parameter_list "(EState *state)" ( (parameter_declaration "EState *state" type_identifier (pointer_declarator "*state" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint32_t uVar2;\n  uint32_t *puVar3;\n  uint uVar4;\n  uint32_t unaff_s1;\n  \n  iVar1 = state->nblock;\n  if (9999 < iVar1) {\n    uVar4 = iVar1 + 0x22;\n    if ((uVar4 & 1) != 0) {\n      uVar4 = iVar1 + 0x23;\n    }\n    state->quadrant = (uint16_t *)(state->block + uVar4);\n    state->budget = iVar1 * 9;\n    mainSort(state);\n    if (-1 < state->budget) goto LAB_000a0e08;\n  }\n  fallbackSort(state);\nLAB_000a0e08:\n  uVar2 = unaff_s1;\n  if (state->nblock != 0) {\n    puVar3 = state->ptr;\n    uVar2 = *puVar3;\n    if (uVar2 != 0) {\n      uVar2 = 0;\n      do {\n        puVar3 = puVar3 + 1;\n        uVar2 = uVar2 + 1;\n        if (uVar2 == state->nblock) {\n          return unaff_s1;\n        }\n      } while (*puVar3 != 0);\n    }\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint32_t uVar2;" primitive_type identifier ;) (declaration "uint32_t *puVar3;" primitive_type (pointer_declarator "*puVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint32_t unaff_s1;" primitive_type identifier ;) (expression_statement "iVar1 = state->nblock;" (assignment_expression "iVar1 = state->nblock" identifier = (field_expression "state->nblock" identifier -> field_identifier)) ;) (if_statement "if (9999 < iVar1) {\n    uVar4 = iVar1 + 0x22;\n    if ((uVar4 & 1) != 0) {\n      uVar4 = iVar1 + 0x23;\n    }\n    state->quadrant = (uint16_t *)(state->block + uVar4);\n    state->budget = iVar1 * 9;\n    mainSort(state);\n    if (-1 < state->budget) goto LAB_000a0e08;\n  }" if (parenthesized_expression "(9999 < iVar1)" ( (binary_expression "9999 < iVar1" number_literal < identifier) )) (compound_statement "{\n    uVar4 = iVar1 + 0x22;\n    if ((uVar4 & 1) != 0) {\n      uVar4 = iVar1 + 0x23;\n    }\n    state->quadrant = (uint16_t *)(state->block + uVar4);\n    state->budget = iVar1 * 9;\n    mainSort(state);\n    if (-1 < state->budget) goto LAB_000a0e08;\n  }" { (expression_statement "uVar4 = iVar1 + 0x22;" (assignment_expression "uVar4 = iVar1 + 0x22" identifier = (binary_expression "iVar1 + 0x22" identifier + number_literal)) ;) (if_statement "if ((uVar4 & 1) != 0) {\n      uVar4 = iVar1 + 0x23;\n    }" if (parenthesized_expression "((uVar4 & 1) != 0)" ( (binary_expression "(uVar4 & 1) != 0" (parenthesized_expression "(uVar4 & 1)" ( (binary_expression "uVar4 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n      uVar4 = iVar1 + 0x23;\n    }" { (expression_statement "uVar4 = iVar1 + 0x23;" (assignment_expression "uVar4 = iVar1 + 0x23" identifier = (binary_expression "iVar1 + 0x23" identifier + number_literal)) ;) })) (expression_statement "state->quadrant = (uint16_t *)(state->block + uVar4);" (assignment_expression "state->quadrant = (uint16_t *)(state->block + uVar4)" (field_expression "state->quadrant" identifier -> field_identifier) = (cast_expression "(uint16_t *)(state->block + uVar4)" ( (type_descriptor "uint16_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(state->block + uVar4)" ( (binary_expression "state->block + uVar4" (field_expression "state->block" identifier -> field_identifier) + identifier) )))) ;) (expression_statement "state->budget = iVar1 * 9;" (assignment_expression "state->budget = iVar1 * 9" (field_expression "state->budget" identifier -> field_identifier) = (binary_expression "iVar1 * 9" identifier * number_literal)) ;) (expression_statement "mainSort(state);" (call_expression "mainSort(state)" identifier (argument_list "(state)" ( identifier ))) ;) (if_statement "if (-1 < state->budget) goto LAB_000a0e08;" if (parenthesized_expression "(-1 < state->budget)" ( (binary_expression "-1 < state->budget" number_literal < (field_expression "state->budget" identifier -> field_identifier)) )) (goto_statement "goto LAB_000a0e08;" goto statement_identifier ;)) })) (expression_statement "fallbackSort(state);" (call_expression "fallbackSort(state)" identifier (argument_list "(state)" ( identifier ))) ;) (labeled_statement "LAB_000a0e08:\n  uVar2 = unaff_s1;" statement_identifier : (expression_statement "uVar2 = unaff_s1;" (assignment_expression "uVar2 = unaff_s1" identifier = identifier) ;)) (if_statement "if (state->nblock != 0) {\n    puVar3 = state->ptr;\n    uVar2 = *puVar3;\n    if (uVar2 != 0) {\n      uVar2 = 0;\n      do {\n        puVar3 = puVar3 + 1;\n        uVar2 = uVar2 + 1;\n        if (uVar2 == state->nblock) {\n          return unaff_s1;\n        }\n      } while (*puVar3 != 0);\n    }\n  }" if (parenthesized_expression "(state->nblock != 0)" ( (binary_expression "state->nblock != 0" (field_expression "state->nblock" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n    puVar3 = state->ptr;\n    uVar2 = *puVar3;\n    if (uVar2 != 0) {\n      uVar2 = 0;\n      do {\n        puVar3 = puVar3 + 1;\n        uVar2 = uVar2 + 1;\n        if (uVar2 == state->nblock) {\n          return unaff_s1;\n        }\n      } while (*puVar3 != 0);\n    }\n  }" { (expression_statement "puVar3 = state->ptr;" (assignment_expression "puVar3 = state->ptr" identifier = (field_expression "state->ptr" identifier -> field_identifier)) ;) (expression_statement "uVar2 = *puVar3;" (assignment_expression "uVar2 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) (if_statement "if (uVar2 != 0) {\n      uVar2 = 0;\n      do {\n        puVar3 = puVar3 + 1;\n        uVar2 = uVar2 + 1;\n        if (uVar2 == state->nblock) {\n          return unaff_s1;\n        }\n      } while (*puVar3 != 0);\n    }" if (parenthesized_expression "(uVar2 != 0)" ( (binary_expression "uVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar2 = 0;\n      do {\n        puVar3 = puVar3 + 1;\n        uVar2 = uVar2 + 1;\n        if (uVar2 == state->nblock) {\n          return unaff_s1;\n        }\n      } while (*puVar3 != 0);\n    }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n        puVar3 = puVar3 + 1;\n        uVar2 = uVar2 + 1;\n        if (uVar2 == state->nblock) {\n          return unaff_s1;\n        }\n      } while (*puVar3 != 0);" do (compound_statement "{\n        puVar3 = puVar3 + 1;\n        uVar2 = uVar2 + 1;\n        if (uVar2 == state->nblock) {\n          return unaff_s1;\n        }\n      }" { (expression_statement "puVar3 = puVar3 + 1;" (assignment_expression "puVar3 = puVar3 + 1" identifier = (binary_expression "puVar3 + 1" identifier + number_literal)) ;) (expression_statement "uVar2 = uVar2 + 1;" (assignment_expression "uVar2 = uVar2 + 1" identifier = (binary_expression "uVar2 + 1" identifier + number_literal)) ;) (if_statement "if (uVar2 == state->nblock) {\n          return unaff_s1;\n        }" if (parenthesized_expression "(uVar2 == state->nblock)" ( (binary_expression "uVar2 == state->nblock" identifier == (field_expression "state->nblock" identifier -> field_identifier)) )) (compound_statement "{\n          return unaff_s1;\n        }" { (return_statement "return unaff_s1;" return identifier ;) })) }) while (parenthesized_expression "(*puVar3 != 0)" ( (binary_expression "*puVar3 != 0" (pointer_expression "*puVar3" * identifier) != number_literal) )) ;) })) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "int FUN_000a0d70(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_s1;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  if (9999 < iVar1) {\n    uVar3 = iVar1 + 0x22;\n    if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }\n    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;\n    *(int *)(param_1 + 0x18) = iVar1 * 9;\n    FUN_000a0784(param_1);\n    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;\n  }\n  FUN_0009e148(param_1);\nLAB_000a0e08:\n  iVar1 = unaff_s1;\n  if (*(int *)(param_1 + 0x34) != 0) {\n    piVar2 = *(int **)(param_1 + 0x1c);\n    iVar1 = *piVar2;\n    if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_000a0d70(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_s1;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  if (9999 < iVar1) {\n    uVar3 = iVar1 + 0x22;\n    if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }\n    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;\n    *(int *)(param_1 + 0x18) = iVar1 * 9;\n    FUN_000a0784(param_1);\n    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;\n  }\n  FUN_0009e148(param_1);\nLAB_000a0e08:\n  iVar1 = unaff_s1;\n  if (*(int *)(param_1 + 0x34) != 0) {\n    piVar2 = *(int **)(param_1 + 0x1c);\n    iVar1 = *piVar2;\n    if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_000a0d70(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_s1;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  if (9999 < iVar1) {\n    uVar3 = iVar1 + 0x22;\n    if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }\n    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;\n    *(int *)(param_1 + 0x18) = iVar1 * 9;\n    FUN_000a0784(param_1);\n    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;\n  }\n  FUN_0009e148(param_1);\nLAB_000a0e08:\n  iVar1 = unaff_s1;\n  if (*(int *)(param_1 + 0x34) != 0) {\n    piVar2 = *(int **)(param_1 + 0x1c);\n    iVar1 = *piVar2;\n    if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int unaff_s1;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(param_1 + 0x34);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x34)" identifier = (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) ))))) ;) (if_statement "if (9999 < iVar1) {\n    uVar3 = iVar1 + 0x22;\n    if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }\n    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;\n    *(int *)(param_1 + 0x18) = iVar1 * 9;\n    FUN_000a0784(param_1);\n    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;\n  }" if (parenthesized_expression "(9999 < iVar1)" ( (binary_expression "9999 < iVar1" number_literal < identifier) )) (compound_statement "{\n    uVar3 = iVar1 + 0x22;\n    if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }\n    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;\n    *(int *)(param_1 + 0x18) = iVar1 * 9;\n    FUN_000a0784(param_1);\n    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;\n  }" { (expression_statement "uVar3 = iVar1 + 0x22;" (assignment_expression "uVar3 = iVar1 + 0x22" identifier = (binary_expression "iVar1 + 0x22" identifier + number_literal)) ;) (if_statement "if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }" if (parenthesized_expression "((uVar3 & 1) != 0)" ( (binary_expression "(uVar3 & 1) != 0" (parenthesized_expression "(uVar3 & 1)" ( (binary_expression "uVar3 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n      uVar3 = iVar1 + 0x23;\n    }" { (expression_statement "uVar3 = iVar1 + 0x23;" (assignment_expression "uVar3 = iVar1 + 0x23" identifier = (binary_expression "iVar1 + 0x23" identifier + number_literal)) ;) })) (expression_statement "*(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;" (assignment_expression "*(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3" (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) )))) = (binary_expression "*(int *)(param_1 + 0x20) + uVar3" (pointer_expression "*(int *)(param_1 + 0x20)" * (cast_expression "(int *)(param_1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) + identifier)) ;) (expression_statement "*(int *)(param_1 + 0x18) = iVar1 * 9;" (assignment_expression "*(int *)(param_1 + 0x18) = iVar1 * 9" (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = (binary_expression "iVar1 * 9" identifier * number_literal)) ;) (expression_statement "FUN_000a0784(param_1);" (call_expression "FUN_000a0784(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (if_statement "if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;" if (parenthesized_expression "(-1 < *(int *)(param_1 + 0x18))" ( (binary_expression "-1 < *(int *)(param_1 + 0x18)" number_literal < (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) )) (goto_statement "goto LAB_000a0e08;" goto statement_identifier ;)) })) (expression_statement "FUN_0009e148(param_1);" (call_expression "FUN_0009e148(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (labeled_statement "LAB_000a0e08:\n  iVar1 = unaff_s1;" statement_identifier : (expression_statement "iVar1 = unaff_s1;" (assignment_expression "iVar1 = unaff_s1" identifier = identifier) ;)) (if_statement "if (*(int *)(param_1 + 0x34) != 0) {\n    piVar2 = *(int **)(param_1 + 0x1c);\n    iVar1 = *piVar2;\n    if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x34) != 0)" ( (binary_expression "*(int *)(param_1 + 0x34) != 0" (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) )))) != number_literal) )) (compound_statement "{\n    piVar2 = *(int **)(param_1 + 0x1c);\n    iVar1 = *piVar2;\n    if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }\n  }" { (expression_statement "piVar2 = *(int **)(param_1 + 0x1c);" (assignment_expression "piVar2 = *(int **)(param_1 + 0x1c)" identifier = (pointer_expression "*(int **)(param_1 + 0x1c)" * (cast_expression "(int **)(param_1 + 0x1c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (if_statement "if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);" do (compound_statement "{\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      }" { (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (if_statement "if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }" if (parenthesized_expression "(iVar1 == *(int *)(param_1 + 0x34))" ( (binary_expression "iVar1 == *(int *)(param_1 + 0x34)" identifier == (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) ))))) )) (compound_statement "{\n          return unaff_s1;\n        }" { (return_statement "return unaff_s1;" return identifier ;) })) }) while (parenthesized_expression "(*piVar2 != 0)" ( (binary_expression "*piVar2 != 0" (pointer_expression "*piVar2" * identifier) != number_literal) )) ;) })) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * 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 LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression (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)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT * LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (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 { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) }) while (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) ;) })) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_000a0d70(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_s1;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  if (9999 < iVar1) {\n    uVar3 = iVar1 + 0x22;\n    if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }\n    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;\n    *(int *)(param_1 + 0x18) = iVar1 * 9;\n    FUN_000a0784(param_1);\n    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;\n  }\n  FUN_0009e148(param_1);\nLAB_000a0e08:\n  iVar1 = unaff_s1;\n  if (*(int *)(param_1 + 0x34) != 0) {\n    piVar2 = *(int **)(param_1 + 0x1c);\n    iVar1 = *piVar2;\n    if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }\n  }\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_000a0d70(int param_1)" (identifier "FUN_000a0d70") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_s1;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  if (9999 < iVar1) {\n    uVar3 = iVar1 + 0x22;\n    if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }\n    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;\n    *(int *)(param_1 + 0x18) = iVar1 * 9;\n    FUN_000a0784(param_1);\n    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;\n  }\n  FUN_0009e148(param_1);\nLAB_000a0e08:\n  iVar1 = unaff_s1;\n  if (*(int *)(param_1 + 0x34) != 0) {\n    piVar2 = *(int **)(param_1 + 0x1c);\n    iVar1 = *piVar2;\n    if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int unaff_s1;" (primitive_type "int") (identifier "unaff_s1") (; ";")) (expression_statement "iVar1 = *(int *)(param_1 + 0x34);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x34)" (identifier "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")) () ")"))))) (; ";")) (if_statement "if (9999 < iVar1) {\n    uVar3 = iVar1 + 0x22;\n    if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }\n    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;\n    *(int *)(param_1 + 0x18) = iVar1 * 9;\n    FUN_000a0784(param_1);\n    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;\n  }" (if "if") (parenthesized_expression "(9999 < iVar1)" (( "(") (binary_expression "9999 < iVar1" (number_literal "9999") (< "<") (identifier "iVar1")) () ")")) (compound_statement "{\n    uVar3 = iVar1 + 0x22;\n    if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }\n    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;\n    *(int *)(param_1 + 0x18) = iVar1 * 9;\n    FUN_000a0784(param_1);\n    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;\n  }" ({ "{") (expression_statement "uVar3 = iVar1 + 0x22;" (assignment_expression "uVar3 = iVar1 + 0x22" (identifier "uVar3") (= "=") (binary_expression "iVar1 + 0x22" (identifier "iVar1") (+ "+") (number_literal "0x22"))) (; ";")) (if_statement "if ((uVar3 & 1) != 0) {\n      uVar3 = iVar1 + 0x23;\n    }" (if "if") (parenthesized_expression "((uVar3 & 1) != 0)" (( "(") (binary_expression "(uVar3 & 1) != 0" (parenthesized_expression "(uVar3 & 1)" (( "(") (binary_expression "uVar3 & 1" (identifier "uVar3") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar3 = iVar1 + 0x23;\n    }" ({ "{") (expression_statement "uVar3 = iVar1 + 0x23;" (assignment_expression "uVar3 = iVar1 + 0x23" (identifier "uVar3") (= "=") (binary_expression "iVar1 + 0x23" (identifier "iVar1") (+ "+") (number_literal "0x23"))) (; ";")) (} "}"))) (expression_statement "*(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;" (assignment_expression "*(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3" (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")) () ")")))) (= "=") (binary_expression "*(int *)(param_1 + 0x20) + uVar3" (pointer_expression "*(int *)(param_1 + 0x20)" (* "*") (cast_expression "(int *)(param_1 + 0x20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (+ "+") (identifier "uVar3"))) (; ";")) (expression_statement "*(int *)(param_1 + 0x18) = iVar1 * 9;" (assignment_expression "*(int *)(param_1 + 0x18) = iVar1 * 9" (pointer_expression "*(int *)(param_1 + 0x18)" (* "*") (cast_expression "(int *)(param_1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (binary_expression "iVar1 * 9" (identifier "iVar1") (* "*") (number_literal "9"))) (; ";")) (expression_statement "FUN_000a0784(param_1);" (call_expression "FUN_000a0784(param_1)" (identifier "FUN_000a0784") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (if_statement "if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;" (if "if") (parenthesized_expression "(-1 < *(int *)(param_1 + 0x18))" (( "(") (binary_expression "-1 < *(int *)(param_1 + 0x18)" (number_literal "-1") (< "<") (pointer_expression "*(int *)(param_1 + 0x18)" (* "*") (cast_expression "(int *)(param_1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) () ")")) (goto_statement "goto LAB_000a0e08;" (goto "goto") (statement_identifier "LAB_000a0e08") (; ";"))) (} "}"))) (expression_statement "FUN_0009e148(param_1);" (call_expression "FUN_0009e148(param_1)" (identifier "FUN_0009e148") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (labeled_statement "LAB_000a0e08:\n  iVar1 = unaff_s1;" (statement_identifier "LAB_000a0e08") (: ":") (expression_statement "iVar1 = unaff_s1;" (assignment_expression "iVar1 = unaff_s1" (identifier "iVar1") (= "=") (identifier "unaff_s1")) (; ";"))) (if_statement "if (*(int *)(param_1 + 0x34) != 0) {\n    piVar2 = *(int **)(param_1 + 0x1c);\n    iVar1 = *piVar2;\n    if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x34) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x34) != 0" (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")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    piVar2 = *(int **)(param_1 + 0x1c);\n    iVar1 = *piVar2;\n    if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }\n  }" ({ "{") (expression_statement "piVar2 = *(int **)(param_1 + 0x1c);" (assignment_expression "piVar2 = *(int **)(param_1 + 0x1c)" (identifier "piVar2") (= "=") (pointer_expression "*(int **)(param_1 + 0x1c)" (* "*") (cast_expression "(int **)(param_1 + 0x1c)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")"))))) (; ";")) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" (identifier "iVar1") (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (; ";")) (if_statement "if (iVar1 != 0) {\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar1 = 0;\n      do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);\n    }" ({ "{") (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      } while (*piVar2 != 0);" (do "do") (compound_statement "{\n        piVar2 = piVar2 + 1;\n        iVar1 = iVar1 + 1;\n        if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }\n      }" ({ "{") (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" (identifier "piVar2") (= "=") (binary_expression "piVar2 + 1" (identifier "piVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" (identifier "iVar1") (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar1 == *(int *)(param_1 + 0x34)) {\n          return unaff_s1;\n        }" (if "if") (parenthesized_expression "(iVar1 == *(int *)(param_1 + 0x34))" (( "(") (binary_expression "iVar1 == *(int *)(param_1 + 0x34)" (identifier "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")) () ")"))))) () ")")) (compound_statement "{\n          return unaff_s1;\n        }" ({ "{") (return_statement "return unaff_s1;" (return "return") (identifier "unaff_s1") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "(*piVar2 != 0)" (( "(") (binary_expression "*piVar2 != 0" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}"))) (} "}"))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

int32_t function_1(type_1 *state)

{
  int var_1;
  uint32_t var_5;
  uint32_t *var_6;
  type_2 var_2;
  uint32_t unaff_s1;
  
  var_1 = state->nblock;
  if (9999 < var_1) {
    var_2 = var_1 + 0x22;
    if ((var_2 & 1) != 0) {
      var_2 = var_1 + 0x23;
    }
    state->quadrant = (uint16_t *)(state->block + var_2);
    state->budget = var_1 * 9;
    var_3(state);
    if (-1 < state->budget) goto LAB_000a0e08;
  }
  var_4(state);
LAB_000a0e08:
  var_5 = unaff_s1;
  if (state->nblock != 0) {
    var_6 = state->ptr;
    var_5 = *var_6;
    if (var_5 != 0) {
      var_5 = 0;
      do {
        var_6 = var_6 + 1;
        var_5 = var_5 + 1;
        if (var_5 == state->nblock) {
          return unaff_s1;
        }
      } while (*var_6 != 0);
    }
  }
  return var_5;
}


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

int MASKED(int param_1)

{
  int iVar1;
  int *piVar2;
  uint uVar3;
  int unaff_s1;
  
  iVar1 = *(int *)(param_1 + 0x34);
  if (9999 < iVar1) {
    uVar3 = iVar1 + 0x22;
    if ((uVar3 & 1) != 0) {
      uVar3 = iVar1 + 0x23;
    }
    *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x20) + uVar3;
    *(int *)(param_1 + 0x18) = iVar1 * 9;
    FUN_000a0784(param_1);
    if (-1 < *(int *)(param_1 + 0x18)) goto LAB_000a0e08;
  }
  FUN_0009e148(param_1);
LAB_000a0e08:
  iVar1 = unaff_s1;
  if (*(int *)(param_1 + 0x34) != 0) {
    piVar2 = *(int **)(param_1 + 0x1c);
    iVar1 = *piVar2;
    if (iVar1 != 0) {
      iVar1 = 0;
      do {
        piVar2 = piVar2 + 1;
        iVar1 = iVar1 + 1;
        if (iVar1 == *(int *)(param_1 + 0x34)) {
          return unaff_s1;
        }
      } while (*piVar2 != 0);
    }
  }
  return iVar1;
}

