
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void move(Terminal *term,int x,int y,int marg_clip)

{
  bool bVar1;
  int iVar2;
  int iVar3;
  
  if (x < 0) {
    x = 0;
  }
  if (term->cols <= x) {
    x = term->cols + -1;
  }
  bVar1 = y < 0;
  if (marg_clip != 0) {
    iVar2 = (term->curs).y;
    iVar3 = term->marg_t;
    if (iVar2 < iVar3) {
      if (marg_clip == 2) {
        if (y < iVar3) {
          y = iVar3;
        }
        iVar3 = term->marg_b;
      }
      else {
        iVar3 = term->marg_b;
        if (iVar3 < iVar2) {
          if (y < 0) {
            y = 0;
          }
          goto LAB_0009a108;
        }
      }
      bVar1 = iVar3 < y;
LAB_0009a0fc:
      if (bVar1) {
        y = iVar3;
      }
    }
    else {
      if (y < iVar3) {
        y = iVar3;
      }
      iVar3 = term->marg_b;
      bVar1 = iVar3 < y;
      if (iVar2 <= iVar3) goto LAB_0009a0fc;
      if ((marg_clip == 2) && (iVar3 < y)) {
        y = iVar3;
      }
    }
    bVar1 = y < 0;
  }
  if (bVar1) {
    y = 0;
  }
LAB_0009a108:
  if (term->rows <= y) {
    y = term->rows + -1;
  }
  (term->curs).x = x;
  (term->curs).y = y;
  term->wrapnext = 0;
  return;
}



void FUN_0009a068(int param_1,int param_2,int param_3,int param_4)

{
  bool bVar1;
  int iVar2;
  int iVar3;
  
  if (param_2 < 0) {
    param_2 = 0;
  }
  if (*(int *)(param_1 + 300) <= param_2) {
    param_2 = *(int *)(param_1 + 300) + -1;
  }
  bVar1 = param_3 < 0;
  if (param_4 != 0) {
    iVar2 = *(int *)(param_1 + 0x6c);
    iVar3 = *(int *)(param_1 + 0x7c);
    if (iVar2 < iVar3) {
      if (param_4 == 2) {
        if (param_3 < iVar3) {
          param_3 = iVar3;
        }
        iVar3 = *(int *)(param_1 + 0x80);
      }
      else {
        iVar3 = *(int *)(param_1 + 0x80);
        if (iVar3 < iVar2) {
          if (param_3 < 0) {
            param_3 = 0;
          }
          goto LAB_0009a108;
        }
      }
      bVar1 = iVar3 < param_3;
LAB_0009a0fc:
      if (bVar1) {
        param_3 = iVar3;
      }
    }
    else {
      if (param_3 < iVar3) {
        param_3 = iVar3;
      }
      iVar3 = *(int *)(param_1 + 0x80);
      bVar1 = iVar3 < param_3;
      if (iVar2 <= iVar3) goto LAB_0009a0fc;
      if ((param_4 == 2) && (iVar3 < param_3)) {
        param_3 = iVar3;
      }
    }
    bVar1 = param_3 < 0;
  }
  if (bVar1) {
    param_3 = 0;
  }
LAB_0009a108:
  if (*(int *)(param_1 + 0x128) <= param_3) {
    param_3 = *(int *)(param_1 + 0x128) + -1;
  }
  *(int *)(param_1 + 0x70) = param_2;
  *(int *)(param_1 + 0x6c) = param_3;
  *(undefined4 *)(param_1 + 0x8c) = 0;
  return;
}


slti v0,a1,0x0
movn a1,zero,v0
lw v0,0x12c(a0)
slt v1,a1,v0
bne v1,zero,0x0009a084
_nop
addiu a1,v0,-0x1
beq a3,zero,0x0009a104
_slti v0,a2,0x0
lw v0,0x6c(a0)
lw v1,0x7c(a0)
slt t0,v0,v1
beq t0,zero,0x0009a0c4
_slt t0,a2,v1
li t0,0x2
beq a3,t0,0x0009a0ec
_nop
lw v1,0x80(a0)
slt v0,v1,v0
beq v0,zero,0x0009a0f8
_slti v0,a2,0x0
b 0x0009a108
_movn a2,zero,v0
movn a2,v1,t0
lw v1,0x80(a0)
slt v0,v1,v0
beq v0,zero,0x0009a0fc
_slt v0,v1,a2
li v0,0x2
bne a3,v0,0x0009a100
_slt v0,v1,a2
b 0x0009a100
_movn a2,v1,v0
slt v0,a2,v1
movn a2,v1,v0
lw v1,0x80(a0)
slt v0,v1,a2
movn a2,v1,v0
slti v0,a2,0x0
movn a2,zero,v0
lw v0,0x128(a0)
slt v1,a2,v0
bne v1,zero,0x0009a11c
_nop
addiu a2,v0,-0x1
sw a1,0x70(a0)
sw a2,0x6c(a0)
jr ra
_sw zero,0x8c(a0)
(translation_unit "void FUN_0009a068(int param_1,int param_2,int param_3,int param_4)\n\n{\n  bool bVar1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_2 < 0) {\n    param_2 = 0;\n  }\n  if (*(int *)(param_1 + 300) <= param_2) {\n    param_2 = *(int *)(param_1 + 300) + -1;\n  }\n  bVar1 = param_3 < 0;\n  if (param_4 != 0) {\n    iVar2 = *(int *)(param_1 + 0x6c);\n    iVar3 = *(int *)(param_1 + 0x7c);\n    if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }\n    bVar1 = param_3 < 0;\n  }\n  if (bVar1) {\n    param_3 = 0;\n  }\nLAB_0009a108:\n  if (*(int *)(param_1 + 0x128) <= param_3) {\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }\n  *(int *)(param_1 + 0x70) = param_2;\n  *(int *)(param_1 + 0x6c) = param_3;\n  *(undefined4 *)(param_1 + 0x8c) = 0;\n  return;\n}\n\n" (function_definition "void FUN_0009a068(int param_1,int param_2,int param_3,int param_4)\n\n{\n  bool bVar1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_2 < 0) {\n    param_2 = 0;\n  }\n  if (*(int *)(param_1 + 300) <= param_2) {\n    param_2 = *(int *)(param_1 + 300) + -1;\n  }\n  bVar1 = param_3 < 0;\n  if (param_4 != 0) {\n    iVar2 = *(int *)(param_1 + 0x6c);\n    iVar3 = *(int *)(param_1 + 0x7c);\n    if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }\n    bVar1 = param_3 < 0;\n  }\n  if (bVar1) {\n    param_3 = 0;\n  }\nLAB_0009a108:\n  if (*(int *)(param_1 + 0x128) <= param_3) {\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }\n  *(int *)(param_1 + 0x70) = param_2;\n  *(int *)(param_1 + 0x6c) = param_3;\n  *(undefined4 *)(param_1 + 0x8c) = 0;\n  return;\n}" primitive_type (function_declarator "FUN_0009a068(int param_1,int param_2,int param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  bool bVar1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_2 < 0) {\n    param_2 = 0;\n  }\n  if (*(int *)(param_1 + 300) <= param_2) {\n    param_2 = *(int *)(param_1 + 300) + -1;\n  }\n  bVar1 = param_3 < 0;\n  if (param_4 != 0) {\n    iVar2 = *(int *)(param_1 + 0x6c);\n    iVar3 = *(int *)(param_1 + 0x7c);\n    if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }\n    bVar1 = param_3 < 0;\n  }\n  if (bVar1) {\n    param_3 = 0;\n  }\nLAB_0009a108:\n  if (*(int *)(param_1 + 0x128) <= param_3) {\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }\n  *(int *)(param_1 + 0x70) = param_2;\n  *(int *)(param_1 + 0x6c) = param_3;\n  *(undefined4 *)(param_1 + 0x8c) = 0;\n  return;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (if_statement "if (param_2 < 0) {\n    param_2 = 0;\n  }" if (parenthesized_expression "(param_2 < 0)" ( (binary_expression "param_2 < 0" identifier < number_literal) )) (compound_statement "{\n    param_2 = 0;\n  }" { (expression_statement "param_2 = 0;" (assignment_expression "param_2 = 0" identifier = number_literal) ;) })) (if_statement "if (*(int *)(param_1 + 300) <= param_2) {\n    param_2 = *(int *)(param_1 + 300) + -1;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 300) <= param_2)" ( (binary_expression "*(int *)(param_1 + 300) <= param_2" (pointer_expression "*(int *)(param_1 + 300)" * (cast_expression "(int *)(param_1 + 300)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) <= identifier) )) (compound_statement "{\n    param_2 = *(int *)(param_1 + 300) + -1;\n  }" { (expression_statement "param_2 = *(int *)(param_1 + 300) + -1;" (assignment_expression "param_2 = *(int *)(param_1 + 300) + -1" identifier = (binary_expression "*(int *)(param_1 + 300) + -1" (pointer_expression "*(int *)(param_1 + 300)" * (cast_expression "(int *)(param_1 + 300)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) + number_literal)) ;) })) (expression_statement "bVar1 = param_3 < 0;" (assignment_expression "bVar1 = param_3 < 0" identifier = (binary_expression "param_3 < 0" identifier < number_literal)) ;) (if_statement "if (param_4 != 0) {\n    iVar2 = *(int *)(param_1 + 0x6c);\n    iVar3 = *(int *)(param_1 + 0x7c);\n    if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }\n    bVar1 = param_3 < 0;\n  }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar2 = *(int *)(param_1 + 0x6c);\n    iVar3 = *(int *)(param_1 + 0x7c);\n    if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }\n    bVar1 = param_3 < 0;\n  }" { (expression_statement "iVar2 = *(int *)(param_1 + 0x6c);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x6c)" identifier = (pointer_expression "*(int *)(param_1 + 0x6c)" * (cast_expression "(int *)(param_1 + 0x6c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x7c);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x7c)" identifier = (pointer_expression "*(int *)(param_1 + 0x7c)" * (cast_expression "(int *)(param_1 + 0x7c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x7c)" ( (binary_expression "param_1 + 0x7c" identifier + number_literal) ))))) ;) (if_statement "if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }" if (parenthesized_expression "(iVar2 < iVar3)" ( (binary_expression "iVar2 < iVar3" identifier < identifier) )) (compound_statement "{\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }" { (if_statement "if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }" if (parenthesized_expression "(param_4 == 2)" ( (binary_expression "param_4 == 2" identifier == number_literal) )) (compound_statement "{\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }" { (if_statement "if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }" if (parenthesized_expression "(param_3 < iVar3)" ( (binary_expression "param_3 < iVar3" identifier < identifier) )) (compound_statement "{\n          param_3 = iVar3;\n        }" { (expression_statement "param_3 = iVar3;" (assignment_expression "param_3 = iVar3" identifier = identifier) ;) })) (expression_statement "iVar3 = *(int *)(param_1 + 0x80);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x80)" identifier = (pointer_expression "*(int *)(param_1 + 0x80)" * (cast_expression "(int *)(param_1 + 0x80)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) ;) }) (else_clause "else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }" else (compound_statement "{\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }" { (expression_statement "iVar3 = *(int *)(param_1 + 0x80);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x80)" identifier = (pointer_expression "*(int *)(param_1 + 0x80)" * (cast_expression "(int *)(param_1 + 0x80)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) ;) (if_statement "if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }" if (parenthesized_expression "(iVar3 < iVar2)" ( (binary_expression "iVar3 < iVar2" identifier < identifier) )) (compound_statement "{\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }" { (if_statement "if (param_3 < 0) {\n            param_3 = 0;\n          }" if (parenthesized_expression "(param_3 < 0)" ( (binary_expression "param_3 < 0" identifier < number_literal) )) (compound_statement "{\n            param_3 = 0;\n          }" { (expression_statement "param_3 = 0;" (assignment_expression "param_3 = 0" identifier = number_literal) ;) })) (goto_statement "goto LAB_0009a108;" goto statement_identifier ;) })) }))) (expression_statement "bVar1 = iVar3 < param_3;" (assignment_expression "bVar1 = iVar3 < param_3" identifier = (binary_expression "iVar3 < param_3" identifier < identifier)) ;) (labeled_statement "LAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }" statement_identifier : (if_statement "if (bVar1) {\n        param_3 = iVar3;\n      }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n        param_3 = iVar3;\n      }" { (expression_statement "param_3 = iVar3;" (assignment_expression "param_3 = iVar3" identifier = identifier) ;) }))) }) (else_clause "else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }" else (compound_statement "{\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }" { (if_statement "if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }" if (parenthesized_expression "(param_3 < iVar3)" ( (binary_expression "param_3 < iVar3" identifier < identifier) )) (compound_statement "{\n        param_3 = iVar3;\n      }" { (expression_statement "param_3 = iVar3;" (assignment_expression "param_3 = iVar3" identifier = identifier) ;) })) (expression_statement "iVar3 = *(int *)(param_1 + 0x80);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x80)" identifier = (pointer_expression "*(int *)(param_1 + 0x80)" * (cast_expression "(int *)(param_1 + 0x80)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) ;) (expression_statement "bVar1 = iVar3 < param_3;" (assignment_expression "bVar1 = iVar3 < param_3" identifier = (binary_expression "iVar3 < param_3" identifier < identifier)) ;) (if_statement "if (iVar2 <= iVar3) goto LAB_0009a0fc;" if (parenthesized_expression "(iVar2 <= iVar3)" ( (binary_expression "iVar2 <= iVar3" identifier <= identifier) )) (goto_statement "goto LAB_0009a0fc;" goto statement_identifier ;)) (if_statement "if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }" if (parenthesized_expression "((param_4 == 2) && (iVar3 < param_3))" ( (binary_expression "(param_4 == 2) && (iVar3 < param_3)" (parenthesized_expression "(param_4 == 2)" ( (binary_expression "param_4 == 2" identifier == number_literal) )) && (parenthesized_expression "(iVar3 < param_3)" ( (binary_expression "iVar3 < param_3" identifier < identifier) ))) )) (compound_statement "{\n        param_3 = iVar3;\n      }" { (expression_statement "param_3 = iVar3;" (assignment_expression "param_3 = iVar3" identifier = identifier) ;) })) }))) (expression_statement "bVar1 = param_3 < 0;" (assignment_expression "bVar1 = param_3 < 0" identifier = (binary_expression "param_3 < 0" identifier < number_literal)) ;) })) (if_statement "if (bVar1) {\n    param_3 = 0;\n  }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n    param_3 = 0;\n  }" { (expression_statement "param_3 = 0;" (assignment_expression "param_3 = 0" identifier = number_literal) ;) })) (labeled_statement "LAB_0009a108:\n  if (*(int *)(param_1 + 0x128) <= param_3) {\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }" statement_identifier : (if_statement "if (*(int *)(param_1 + 0x128) <= param_3) {\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x128) <= param_3)" ( (binary_expression "*(int *)(param_1 + 0x128) <= param_3" (pointer_expression "*(int *)(param_1 + 0x128)" * (cast_expression "(int *)(param_1 + 0x128)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x128)" ( (binary_expression "param_1 + 0x128" identifier + number_literal) )))) <= identifier) )) (compound_statement "{\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }" { (expression_statement "param_3 = *(int *)(param_1 + 0x128) + -1;" (assignment_expression "param_3 = *(int *)(param_1 + 0x128) + -1" identifier = (binary_expression "*(int *)(param_1 + 0x128) + -1" (pointer_expression "*(int *)(param_1 + 0x128)" * (cast_expression "(int *)(param_1 + 0x128)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x128)" ( (binary_expression "param_1 + 0x128" identifier + number_literal) )))) + number_literal)) ;) }))) (expression_statement "*(int *)(param_1 + 0x70) = param_2;" (assignment_expression "*(int *)(param_1 + 0x70) = param_2" (pointer_expression "*(int *)(param_1 + 0x70)" * (cast_expression "(int *)(param_1 + 0x70)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(param_1 + 0x6c) = param_3;" (assignment_expression "*(int *)(param_1 + 0x6c) = param_3" (pointer_expression "*(int *)(param_1 + 0x6c)" * (cast_expression "(int *)(param_1 + 0x6c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 0x8c) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x8c) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x8c)" * (cast_expression "(undefined4 *)(param_1 + 0x8c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x8c)" ( (binary_expression "param_1 + 0x8c" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid move(Terminal *term,int x,int y,int marg_clip)\n\n{\n  bool bVar1;\n  int iVar2;\n  int iVar3;\n  \n  if (x < 0) {\n    x = 0;\n  }\n  if (term->cols <= x) {\n    x = term->cols + -1;\n  }\n  bVar1 = y < 0;\n  if (marg_clip != 0) {\n    iVar2 = (term->curs).y;\n    iVar3 = term->marg_t;\n    if (iVar2 < iVar3) {\n      if (marg_clip == 2) {\n        if (y < iVar3) {\n          y = iVar3;\n        }\n        iVar3 = term->marg_b;\n      }\n      else {\n        iVar3 = term->marg_b;\n        if (iVar3 < iVar2) {\n          if (y < 0) {\n            y = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < y;\nLAB_0009a0fc:\n      if (bVar1) {\n        y = iVar3;\n      }\n    }\n    else {\n      if (y < iVar3) {\n        y = iVar3;\n      }\n      iVar3 = term->marg_b;\n      bVar1 = iVar3 < y;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((marg_clip == 2) && (iVar3 < y)) {\n        y = iVar3;\n      }\n    }\n    bVar1 = y < 0;\n  }\n  if (bVar1) {\n    y = 0;\n  }\nLAB_0009a108:\n  if (term->rows <= y) {\n    y = term->rows + -1;\n  }\n  (term->curs).x = x;\n  (term->curs).y = y;\n  term->wrapnext = 0;\n  return;\n}\n\n" comment (function_definition "void move(Terminal *term,int x,int y,int marg_clip)\n\n{\n  bool bVar1;\n  int iVar2;\n  int iVar3;\n  \n  if (x < 0) {\n    x = 0;\n  }\n  if (term->cols <= x) {\n    x = term->cols + -1;\n  }\n  bVar1 = y < 0;\n  if (marg_clip != 0) {\n    iVar2 = (term->curs).y;\n    iVar3 = term->marg_t;\n    if (iVar2 < iVar3) {\n      if (marg_clip == 2) {\n        if (y < iVar3) {\n          y = iVar3;\n        }\n        iVar3 = term->marg_b;\n      }\n      else {\n        iVar3 = term->marg_b;\n        if (iVar3 < iVar2) {\n          if (y < 0) {\n            y = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < y;\nLAB_0009a0fc:\n      if (bVar1) {\n        y = iVar3;\n      }\n    }\n    else {\n      if (y < iVar3) {\n        y = iVar3;\n      }\n      iVar3 = term->marg_b;\n      bVar1 = iVar3 < y;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((marg_clip == 2) && (iVar3 < y)) {\n        y = iVar3;\n      }\n    }\n    bVar1 = y < 0;\n  }\n  if (bVar1) {\n    y = 0;\n  }\nLAB_0009a108:\n  if (term->rows <= y) {\n    y = term->rows + -1;\n  }\n  (term->curs).x = x;\n  (term->curs).y = y;\n  term->wrapnext = 0;\n  return;\n}" primitive_type (function_declarator "move(Terminal *term,int x,int y,int marg_clip)" identifier (parameter_list "(Terminal *term,int x,int y,int marg_clip)" ( (parameter_declaration "Terminal *term" type_identifier (pointer_declarator "*term" * identifier)) , (parameter_declaration "int x" primitive_type identifier) , (parameter_declaration "int y" primitive_type identifier) , (parameter_declaration "int marg_clip" primitive_type identifier) ))) (compound_statement "{\n  bool bVar1;\n  int iVar2;\n  int iVar3;\n  \n  if (x < 0) {\n    x = 0;\n  }\n  if (term->cols <= x) {\n    x = term->cols + -1;\n  }\n  bVar1 = y < 0;\n  if (marg_clip != 0) {\n    iVar2 = (term->curs).y;\n    iVar3 = term->marg_t;\n    if (iVar2 < iVar3) {\n      if (marg_clip == 2) {\n        if (y < iVar3) {\n          y = iVar3;\n        }\n        iVar3 = term->marg_b;\n      }\n      else {\n        iVar3 = term->marg_b;\n        if (iVar3 < iVar2) {\n          if (y < 0) {\n            y = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < y;\nLAB_0009a0fc:\n      if (bVar1) {\n        y = iVar3;\n      }\n    }\n    else {\n      if (y < iVar3) {\n        y = iVar3;\n      }\n      iVar3 = term->marg_b;\n      bVar1 = iVar3 < y;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((marg_clip == 2) && (iVar3 < y)) {\n        y = iVar3;\n      }\n    }\n    bVar1 = y < 0;\n  }\n  if (bVar1) {\n    y = 0;\n  }\nLAB_0009a108:\n  if (term->rows <= y) {\n    y = term->rows + -1;\n  }\n  (term->curs).x = x;\n  (term->curs).y = y;\n  term->wrapnext = 0;\n  return;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (if_statement "if (x < 0) {\n    x = 0;\n  }" if (parenthesized_expression "(x < 0)" ( (binary_expression "x < 0" identifier < number_literal) )) (compound_statement "{\n    x = 0;\n  }" { (expression_statement "x = 0;" (assignment_expression "x = 0" identifier = number_literal) ;) })) (if_statement "if (term->cols <= x) {\n    x = term->cols + -1;\n  }" if (parenthesized_expression "(term->cols <= x)" ( (binary_expression "term->cols <= x" (field_expression "term->cols" identifier -> field_identifier) <= identifier) )) (compound_statement "{\n    x = term->cols + -1;\n  }" { (expression_statement "x = term->cols + -1;" (assignment_expression "x = term->cols + -1" identifier = (binary_expression "term->cols + -1" (field_expression "term->cols" identifier -> field_identifier) + number_literal)) ;) })) (expression_statement "bVar1 = y < 0;" (assignment_expression "bVar1 = y < 0" identifier = (binary_expression "y < 0" identifier < number_literal)) ;) (if_statement "if (marg_clip != 0) {\n    iVar2 = (term->curs).y;\n    iVar3 = term->marg_t;\n    if (iVar2 < iVar3) {\n      if (marg_clip == 2) {\n        if (y < iVar3) {\n          y = iVar3;\n        }\n        iVar3 = term->marg_b;\n      }\n      else {\n        iVar3 = term->marg_b;\n        if (iVar3 < iVar2) {\n          if (y < 0) {\n            y = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < y;\nLAB_0009a0fc:\n      if (bVar1) {\n        y = iVar3;\n      }\n    }\n    else {\n      if (y < iVar3) {\n        y = iVar3;\n      }\n      iVar3 = term->marg_b;\n      bVar1 = iVar3 < y;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((marg_clip == 2) && (iVar3 < y)) {\n        y = iVar3;\n      }\n    }\n    bVar1 = y < 0;\n  }" if (parenthesized_expression "(marg_clip != 0)" ( (binary_expression "marg_clip != 0" identifier != number_literal) )) (compound_statement "{\n    iVar2 = (term->curs).y;\n    iVar3 = term->marg_t;\n    if (iVar2 < iVar3) {\n      if (marg_clip == 2) {\n        if (y < iVar3) {\n          y = iVar3;\n        }\n        iVar3 = term->marg_b;\n      }\n      else {\n        iVar3 = term->marg_b;\n        if (iVar3 < iVar2) {\n          if (y < 0) {\n            y = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < y;\nLAB_0009a0fc:\n      if (bVar1) {\n        y = iVar3;\n      }\n    }\n    else {\n      if (y < iVar3) {\n        y = iVar3;\n      }\n      iVar3 = term->marg_b;\n      bVar1 = iVar3 < y;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((marg_clip == 2) && (iVar3 < y)) {\n        y = iVar3;\n      }\n    }\n    bVar1 = y < 0;\n  }" { (expression_statement "iVar2 = (term->curs).y;" (assignment_expression "iVar2 = (term->curs).y" identifier = (field_expression "(term->curs).y" (parenthesized_expression "(term->curs)" ( (field_expression "term->curs" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "iVar3 = term->marg_t;" (assignment_expression "iVar3 = term->marg_t" identifier = (field_expression "term->marg_t" identifier -> field_identifier)) ;) (if_statement "if (iVar2 < iVar3) {\n      if (marg_clip == 2) {\n        if (y < iVar3) {\n          y = iVar3;\n        }\n        iVar3 = term->marg_b;\n      }\n      else {\n        iVar3 = term->marg_b;\n        if (iVar3 < iVar2) {\n          if (y < 0) {\n            y = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < y;\nLAB_0009a0fc:\n      if (bVar1) {\n        y = iVar3;\n      }\n    }\n    else {\n      if (y < iVar3) {\n        y = iVar3;\n      }\n      iVar3 = term->marg_b;\n      bVar1 = iVar3 < y;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((marg_clip == 2) && (iVar3 < y)) {\n        y = iVar3;\n      }\n    }" if (parenthesized_expression "(iVar2 < iVar3)" ( (binary_expression "iVar2 < iVar3" identifier < identifier) )) (compound_statement "{\n      if (marg_clip == 2) {\n        if (y < iVar3) {\n          y = iVar3;\n        }\n        iVar3 = term->marg_b;\n      }\n      else {\n        iVar3 = term->marg_b;\n        if (iVar3 < iVar2) {\n          if (y < 0) {\n            y = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < y;\nLAB_0009a0fc:\n      if (bVar1) {\n        y = iVar3;\n      }\n    }" { (if_statement "if (marg_clip == 2) {\n        if (y < iVar3) {\n          y = iVar3;\n        }\n        iVar3 = term->marg_b;\n      }\n      else {\n        iVar3 = term->marg_b;\n        if (iVar3 < iVar2) {\n          if (y < 0) {\n            y = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }" if (parenthesized_expression "(marg_clip == 2)" ( (binary_expression "marg_clip == 2" identifier == number_literal) )) (compound_statement "{\n        if (y < iVar3) {\n          y = iVar3;\n        }\n        iVar3 = term->marg_b;\n      }" { (if_statement "if (y < iVar3) {\n          y = iVar3;\n        }" if (parenthesized_expression "(y < iVar3)" ( (binary_expression "y < iVar3" identifier < identifier) )) (compound_statement "{\n          y = iVar3;\n        }" { (expression_statement "y = iVar3;" (assignment_expression "y = iVar3" identifier = identifier) ;) })) (expression_statement "iVar3 = term->marg_b;" (assignment_expression "iVar3 = term->marg_b" identifier = (field_expression "term->marg_b" identifier -> field_identifier)) ;) }) (else_clause "else {\n        iVar3 = term->marg_b;\n        if (iVar3 < iVar2) {\n          if (y < 0) {\n            y = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }" else (compound_statement "{\n        iVar3 = term->marg_b;\n        if (iVar3 < iVar2) {\n          if (y < 0) {\n            y = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }" { (expression_statement "iVar3 = term->marg_b;" (assignment_expression "iVar3 = term->marg_b" identifier = (field_expression "term->marg_b" identifier -> field_identifier)) ;) (if_statement "if (iVar3 < iVar2) {\n          if (y < 0) {\n            y = 0;\n          }\n          goto LAB_0009a108;\n        }" if (parenthesized_expression "(iVar3 < iVar2)" ( (binary_expression "iVar3 < iVar2" identifier < identifier) )) (compound_statement "{\n          if (y < 0) {\n            y = 0;\n          }\n          goto LAB_0009a108;\n        }" { (if_statement "if (y < 0) {\n            y = 0;\n          }" if (parenthesized_expression "(y < 0)" ( (binary_expression "y < 0" identifier < number_literal) )) (compound_statement "{\n            y = 0;\n          }" { (expression_statement "y = 0;" (assignment_expression "y = 0" identifier = number_literal) ;) })) (goto_statement "goto LAB_0009a108;" goto statement_identifier ;) })) }))) (expression_statement "bVar1 = iVar3 < y;" (assignment_expression "bVar1 = iVar3 < y" identifier = (binary_expression "iVar3 < y" identifier < identifier)) ;) (labeled_statement "LAB_0009a0fc:\n      if (bVar1) {\n        y = iVar3;\n      }" statement_identifier : (if_statement "if (bVar1) {\n        y = iVar3;\n      }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n        y = iVar3;\n      }" { (expression_statement "y = iVar3;" (assignment_expression "y = iVar3" identifier = identifier) ;) }))) }) (else_clause "else {\n      if (y < iVar3) {\n        y = iVar3;\n      }\n      iVar3 = term->marg_b;\n      bVar1 = iVar3 < y;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((marg_clip == 2) && (iVar3 < y)) {\n        y = iVar3;\n      }\n    }" else (compound_statement "{\n      if (y < iVar3) {\n        y = iVar3;\n      }\n      iVar3 = term->marg_b;\n      bVar1 = iVar3 < y;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((marg_clip == 2) && (iVar3 < y)) {\n        y = iVar3;\n      }\n    }" { (if_statement "if (y < iVar3) {\n        y = iVar3;\n      }" if (parenthesized_expression "(y < iVar3)" ( (binary_expression "y < iVar3" identifier < identifier) )) (compound_statement "{\n        y = iVar3;\n      }" { (expression_statement "y = iVar3;" (assignment_expression "y = iVar3" identifier = identifier) ;) })) (expression_statement "iVar3 = term->marg_b;" (assignment_expression "iVar3 = term->marg_b" identifier = (field_expression "term->marg_b" identifier -> field_identifier)) ;) (expression_statement "bVar1 = iVar3 < y;" (assignment_expression "bVar1 = iVar3 < y" identifier = (binary_expression "iVar3 < y" identifier < identifier)) ;) (if_statement "if (iVar2 <= iVar3) goto LAB_0009a0fc;" if (parenthesized_expression "(iVar2 <= iVar3)" ( (binary_expression "iVar2 <= iVar3" identifier <= identifier) )) (goto_statement "goto LAB_0009a0fc;" goto statement_identifier ;)) (if_statement "if ((marg_clip == 2) && (iVar3 < y)) {\n        y = iVar3;\n      }" if (parenthesized_expression "((marg_clip == 2) && (iVar3 < y))" ( (binary_expression "(marg_clip == 2) && (iVar3 < y)" (parenthesized_expression "(marg_clip == 2)" ( (binary_expression "marg_clip == 2" identifier == number_literal) )) && (parenthesized_expression "(iVar3 < y)" ( (binary_expression "iVar3 < y" identifier < identifier) ))) )) (compound_statement "{\n        y = iVar3;\n      }" { (expression_statement "y = iVar3;" (assignment_expression "y = iVar3" identifier = identifier) ;) })) }))) (expression_statement "bVar1 = y < 0;" (assignment_expression "bVar1 = y < 0" identifier = (binary_expression "y < 0" identifier < number_literal)) ;) })) (if_statement "if (bVar1) {\n    y = 0;\n  }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n    y = 0;\n  }" { (expression_statement "y = 0;" (assignment_expression "y = 0" identifier = number_literal) ;) })) (labeled_statement "LAB_0009a108:\n  if (term->rows <= y) {\n    y = term->rows + -1;\n  }" statement_identifier : (if_statement "if (term->rows <= y) {\n    y = term->rows + -1;\n  }" if (parenthesized_expression "(term->rows <= y)" ( (binary_expression "term->rows <= y" (field_expression "term->rows" identifier -> field_identifier) <= identifier) )) (compound_statement "{\n    y = term->rows + -1;\n  }" { (expression_statement "y = term->rows + -1;" (assignment_expression "y = term->rows + -1" identifier = (binary_expression "term->rows + -1" (field_expression "term->rows" identifier -> field_identifier) + number_literal)) ;) }))) (expression_statement "(term->curs).x = x;" (assignment_expression "(term->curs).x = x" (field_expression "(term->curs).x" (parenthesized_expression "(term->curs)" ( (field_expression "term->curs" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(term->curs).y = y;" (assignment_expression "(term->curs).y = y" (field_expression "(term->curs).y" (parenthesized_expression "(term->curs)" ( (field_expression "term->curs" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "term->wrapnext = 0;" (assignment_expression "term->wrapnext = 0" (field_expression "term->wrapnext" identifier -> field_identifier) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0009a068(int param_1,int param_2,int param_3,int param_4)\n\n{\n  bool bVar1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_2 < 0) {\n    param_2 = 0;\n  }\n  if (*(int *)(param_1 + 300) <= param_2) {\n    param_2 = *(int *)(param_1 + 300) + -1;\n  }\n  bVar1 = param_3 < 0;\n  if (param_4 != 0) {\n    iVar2 = *(int *)(param_1 + 0x6c);\n    iVar3 = *(int *)(param_1 + 0x7c);\n    if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }\n    bVar1 = param_3 < 0;\n  }\n  if (bVar1) {\n    param_3 = 0;\n  }\nLAB_0009a108:\n  if (*(int *)(param_1 + 0x128) <= param_3) {\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }\n  *(int *)(param_1 + 0x70) = param_2;\n  *(int *)(param_1 + 0x6c) = param_3;\n  *(undefined4 *)(param_1 + 0x8c) = 0;\n  return;\n}\n\n" (function_definition "void FUN_0009a068(int param_1,int param_2,int param_3,int param_4)\n\n{\n  bool bVar1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_2 < 0) {\n    param_2 = 0;\n  }\n  if (*(int *)(param_1 + 300) <= param_2) {\n    param_2 = *(int *)(param_1 + 300) + -1;\n  }\n  bVar1 = param_3 < 0;\n  if (param_4 != 0) {\n    iVar2 = *(int *)(param_1 + 0x6c);\n    iVar3 = *(int *)(param_1 + 0x7c);\n    if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }\n    bVar1 = param_3 < 0;\n  }\n  if (bVar1) {\n    param_3 = 0;\n  }\nLAB_0009a108:\n  if (*(int *)(param_1 + 0x128) <= param_3) {\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }\n  *(int *)(param_1 + 0x70) = param_2;\n  *(int *)(param_1 + 0x6c) = param_3;\n  *(undefined4 *)(param_1 + 0x8c) = 0;\n  return;\n}" primitive_type (function_declarator "FUN_0009a068(int param_1,int param_2,int param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  bool bVar1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_2 < 0) {\n    param_2 = 0;\n  }\n  if (*(int *)(param_1 + 300) <= param_2) {\n    param_2 = *(int *)(param_1 + 300) + -1;\n  }\n  bVar1 = param_3 < 0;\n  if (param_4 != 0) {\n    iVar2 = *(int *)(param_1 + 0x6c);\n    iVar3 = *(int *)(param_1 + 0x7c);\n    if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }\n    bVar1 = param_3 < 0;\n  }\n  if (bVar1) {\n    param_3 = 0;\n  }\nLAB_0009a108:\n  if (*(int *)(param_1 + 0x128) <= param_3) {\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }\n  *(int *)(param_1 + 0x70) = param_2;\n  *(int *)(param_1 + 0x6c) = param_3;\n  *(undefined4 *)(param_1 + 0x8c) = 0;\n  return;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (if_statement "if (param_2 < 0) {\n    param_2 = 0;\n  }" if (parenthesized_expression "(param_2 < 0)" ( (binary_expression "param_2 < 0" identifier < number_literal) )) (compound_statement "{\n    param_2 = 0;\n  }" { (expression_statement "param_2 = 0;" (assignment_expression "param_2 = 0" identifier = number_literal) ;) })) (if_statement "if (*(int *)(param_1 + 300) <= param_2) {\n    param_2 = *(int *)(param_1 + 300) + -1;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 300) <= param_2)" ( (binary_expression "*(int *)(param_1 + 300) <= param_2" (pointer_expression "*(int *)(param_1 + 300)" * (cast_expression "(int *)(param_1 + 300)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) <= identifier) )) (compound_statement "{\n    param_2 = *(int *)(param_1 + 300) + -1;\n  }" { (expression_statement "param_2 = *(int *)(param_1 + 300) + -1;" (assignment_expression "param_2 = *(int *)(param_1 + 300) + -1" identifier = (binary_expression "*(int *)(param_1 + 300) + -1" (pointer_expression "*(int *)(param_1 + 300)" * (cast_expression "(int *)(param_1 + 300)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) + number_literal)) ;) })) (expression_statement "bVar1 = param_3 < 0;" (assignment_expression "bVar1 = param_3 < 0" identifier = (binary_expression "param_3 < 0" identifier < number_literal)) ;) (if_statement "if (param_4 != 0) {\n    iVar2 = *(int *)(param_1 + 0x6c);\n    iVar3 = *(int *)(param_1 + 0x7c);\n    if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }\n    bVar1 = param_3 < 0;\n  }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar2 = *(int *)(param_1 + 0x6c);\n    iVar3 = *(int *)(param_1 + 0x7c);\n    if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }\n    bVar1 = param_3 < 0;\n  }" { (expression_statement "iVar2 = *(int *)(param_1 + 0x6c);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x6c)" identifier = (pointer_expression "*(int *)(param_1 + 0x6c)" * (cast_expression "(int *)(param_1 + 0x6c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x7c);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x7c)" identifier = (pointer_expression "*(int *)(param_1 + 0x7c)" * (cast_expression "(int *)(param_1 + 0x7c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x7c)" ( (binary_expression "param_1 + 0x7c" identifier + number_literal) ))))) ;) (if_statement "if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }" if (parenthesized_expression "(iVar2 < iVar3)" ( (binary_expression "iVar2 < iVar3" identifier < identifier) )) (compound_statement "{\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }" { (if_statement "if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }" if (parenthesized_expression "(param_4 == 2)" ( (binary_expression "param_4 == 2" identifier == number_literal) )) (compound_statement "{\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }" { (if_statement "if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }" if (parenthesized_expression "(param_3 < iVar3)" ( (binary_expression "param_3 < iVar3" identifier < identifier) )) (compound_statement "{\n          param_3 = iVar3;\n        }" { (expression_statement "param_3 = iVar3;" (assignment_expression "param_3 = iVar3" identifier = identifier) ;) })) (expression_statement "iVar3 = *(int *)(param_1 + 0x80);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x80)" identifier = (pointer_expression "*(int *)(param_1 + 0x80)" * (cast_expression "(int *)(param_1 + 0x80)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) ;) }) (else_clause "else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }" else (compound_statement "{\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }" { (expression_statement "iVar3 = *(int *)(param_1 + 0x80);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x80)" identifier = (pointer_expression "*(int *)(param_1 + 0x80)" * (cast_expression "(int *)(param_1 + 0x80)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) ;) (if_statement "if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }" if (parenthesized_expression "(iVar3 < iVar2)" ( (binary_expression "iVar3 < iVar2" identifier < identifier) )) (compound_statement "{\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }" { (if_statement "if (param_3 < 0) {\n            param_3 = 0;\n          }" if (parenthesized_expression "(param_3 < 0)" ( (binary_expression "param_3 < 0" identifier < number_literal) )) (compound_statement "{\n            param_3 = 0;\n          }" { (expression_statement "param_3 = 0;" (assignment_expression "param_3 = 0" identifier = number_literal) ;) })) (goto_statement "goto LAB_0009a108;" goto statement_identifier ;) })) }))) (expression_statement "bVar1 = iVar3 < param_3;" (assignment_expression "bVar1 = iVar3 < param_3" identifier = (binary_expression "iVar3 < param_3" identifier < identifier)) ;) (labeled_statement "LAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }" statement_identifier : (if_statement "if (bVar1) {\n        param_3 = iVar3;\n      }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n        param_3 = iVar3;\n      }" { (expression_statement "param_3 = iVar3;" (assignment_expression "param_3 = iVar3" identifier = identifier) ;) }))) }) (else_clause "else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }" else (compound_statement "{\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }" { (if_statement "if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }" if (parenthesized_expression "(param_3 < iVar3)" ( (binary_expression "param_3 < iVar3" identifier < identifier) )) (compound_statement "{\n        param_3 = iVar3;\n      }" { (expression_statement "param_3 = iVar3;" (assignment_expression "param_3 = iVar3" identifier = identifier) ;) })) (expression_statement "iVar3 = *(int *)(param_1 + 0x80);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x80)" identifier = (pointer_expression "*(int *)(param_1 + 0x80)" * (cast_expression "(int *)(param_1 + 0x80)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) ;) (expression_statement "bVar1 = iVar3 < param_3;" (assignment_expression "bVar1 = iVar3 < param_3" identifier = (binary_expression "iVar3 < param_3" identifier < identifier)) ;) (if_statement "if (iVar2 <= iVar3) goto LAB_0009a0fc;" if (parenthesized_expression "(iVar2 <= iVar3)" ( (binary_expression "iVar2 <= iVar3" identifier <= identifier) )) (goto_statement "goto LAB_0009a0fc;" goto statement_identifier ;)) (if_statement "if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }" if (parenthesized_expression "((param_4 == 2) && (iVar3 < param_3))" ( (binary_expression "(param_4 == 2) && (iVar3 < param_3)" (parenthesized_expression "(param_4 == 2)" ( (binary_expression "param_4 == 2" identifier == number_literal) )) && (parenthesized_expression "(iVar3 < param_3)" ( (binary_expression "iVar3 < param_3" identifier < identifier) ))) )) (compound_statement "{\n        param_3 = iVar3;\n      }" { (expression_statement "param_3 = iVar3;" (assignment_expression "param_3 = iVar3" identifier = identifier) ;) })) }))) (expression_statement "bVar1 = param_3 < 0;" (assignment_expression "bVar1 = param_3 < 0" identifier = (binary_expression "param_3 < 0" identifier < number_literal)) ;) })) (if_statement "if (bVar1) {\n    param_3 = 0;\n  }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n    param_3 = 0;\n  }" { (expression_statement "param_3 = 0;" (assignment_expression "param_3 = 0" identifier = number_literal) ;) })) (labeled_statement "LAB_0009a108:\n  if (*(int *)(param_1 + 0x128) <= param_3) {\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }" statement_identifier : (if_statement "if (*(int *)(param_1 + 0x128) <= param_3) {\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x128) <= param_3)" ( (binary_expression "*(int *)(param_1 + 0x128) <= param_3" (pointer_expression "*(int *)(param_1 + 0x128)" * (cast_expression "(int *)(param_1 + 0x128)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x128)" ( (binary_expression "param_1 + 0x128" identifier + number_literal) )))) <= identifier) )) (compound_statement "{\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }" { (expression_statement "param_3 = *(int *)(param_1 + 0x128) + -1;" (assignment_expression "param_3 = *(int *)(param_1 + 0x128) + -1" identifier = (binary_expression "*(int *)(param_1 + 0x128) + -1" (pointer_expression "*(int *)(param_1 + 0x128)" * (cast_expression "(int *)(param_1 + 0x128)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x128)" ( (binary_expression "param_1 + 0x128" identifier + number_literal) )))) + number_literal)) ;) }))) (expression_statement "*(int *)(param_1 + 0x70) = param_2;" (assignment_expression "*(int *)(param_1 + 0x70) = param_2" (pointer_expression "*(int *)(param_1 + 0x70)" * (cast_expression "(int *)(param_1 + 0x70)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(param_1 + 0x6c) = param_3;" (assignment_expression "*(int *)(param_1 + 0x6c) = param_3" (pointer_expression "*(int *)(param_1 + 0x6c)" * (cast_expression "(int *)(param_1 + 0x6c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 0x8c) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x8c) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x8c)" * (cast_expression "(undefined4 *)(param_1 + 0x8c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x8c)" ( (binary_expression "param_1 + 0x8c" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT < LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (goto_statement goto statement_identifier ;) })) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT < IDENT)) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) }))) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT < IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (binary_expression IDENT < IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT < LIT)) ;) })) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) }))) (expression_statement (assignment_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) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_0009a068(int param_1,int param_2,int param_3,int param_4)\n\n{\n  bool bVar1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_2 < 0) {\n    param_2 = 0;\n  }\n  if (*(int *)(param_1 + 300) <= param_2) {\n    param_2 = *(int *)(param_1 + 300) + -1;\n  }\n  bVar1 = param_3 < 0;\n  if (param_4 != 0) {\n    iVar2 = *(int *)(param_1 + 0x6c);\n    iVar3 = *(int *)(param_1 + 0x7c);\n    if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }\n    bVar1 = param_3 < 0;\n  }\n  if (bVar1) {\n    param_3 = 0;\n  }\nLAB_0009a108:\n  if (*(int *)(param_1 + 0x128) <= param_3) {\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }\n  *(int *)(param_1 + 0x70) = param_2;\n  *(int *)(param_1 + 0x6c) = param_3;\n  *(undefined4 *)(param_1 + 0x8c) = 0;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0009a068(int param_1,int param_2,int param_3,int param_4)" (identifier "FUN_0009a068") (parameter_list "(int param_1,int param_2,int param_3,int param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  bool bVar1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_2 < 0) {\n    param_2 = 0;\n  }\n  if (*(int *)(param_1 + 300) <= param_2) {\n    param_2 = *(int *)(param_1 + 300) + -1;\n  }\n  bVar1 = param_3 < 0;\n  if (param_4 != 0) {\n    iVar2 = *(int *)(param_1 + 0x6c);\n    iVar3 = *(int *)(param_1 + 0x7c);\n    if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }\n    bVar1 = param_3 < 0;\n  }\n  if (bVar1) {\n    param_3 = 0;\n  }\nLAB_0009a108:\n  if (*(int *)(param_1 + 0x128) <= param_3) {\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }\n  *(int *)(param_1 + 0x70) = param_2;\n  *(int *)(param_1 + 0x6c) = param_3;\n  *(undefined4 *)(param_1 + 0x8c) = 0;\n  return;\n}" ({ "{") (declaration "bool bVar1;" (primitive_type "bool") (identifier "bVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (if_statement "if (param_2 < 0) {\n    param_2 = 0;\n  }" (if "if") (parenthesized_expression "(param_2 < 0)" (( "(") (binary_expression "param_2 < 0" (identifier "param_2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    param_2 = 0;\n  }" ({ "{") (expression_statement "param_2 = 0;" (assignment_expression "param_2 = 0" (identifier "param_2") (= "=") (number_literal "0")) (; ";")) (} "}"))) (if_statement "if (*(int *)(param_1 + 300) <= param_2) {\n    param_2 = *(int *)(param_1 + 300) + -1;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 300) <= param_2)" (( "(") (binary_expression "*(int *)(param_1 + 300) <= param_2" (pointer_expression "*(int *)(param_1 + 300)" (* "*") (cast_expression "(int *)(param_1 + 300)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 300)" (( "(") (binary_expression "param_1 + 300" (identifier "param_1") (+ "+") (number_literal "300")) () ")")))) (<= "<=") (identifier "param_2")) () ")")) (compound_statement "{\n    param_2 = *(int *)(param_1 + 300) + -1;\n  }" ({ "{") (expression_statement "param_2 = *(int *)(param_1 + 300) + -1;" (assignment_expression "param_2 = *(int *)(param_1 + 300) + -1" (identifier "param_2") (= "=") (binary_expression "*(int *)(param_1 + 300) + -1" (pointer_expression "*(int *)(param_1 + 300)" (* "*") (cast_expression "(int *)(param_1 + 300)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 300)" (( "(") (binary_expression "param_1 + 300" (identifier "param_1") (+ "+") (number_literal "300")) () ")")))) (+ "+") (number_literal "-1"))) (; ";")) (} "}"))) (expression_statement "bVar1 = param_3 < 0;" (assignment_expression "bVar1 = param_3 < 0" (identifier "bVar1") (= "=") (binary_expression "param_3 < 0" (identifier "param_3") (< "<") (number_literal "0"))) (; ";")) (if_statement "if (param_4 != 0) {\n    iVar2 = *(int *)(param_1 + 0x6c);\n    iVar3 = *(int *)(param_1 + 0x7c);\n    if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }\n    bVar1 = param_3 < 0;\n  }" (if "if") (parenthesized_expression "(param_4 != 0)" (( "(") (binary_expression "param_4 != 0" (identifier "param_4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar2 = *(int *)(param_1 + 0x6c);\n    iVar3 = *(int *)(param_1 + 0x7c);\n    if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }\n    bVar1 = param_3 < 0;\n  }" ({ "{") (expression_statement "iVar2 = *(int *)(param_1 + 0x6c);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x6c)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0x6c)" (* "*") (cast_expression "(int *)(param_1 + 0x6c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x6c)" (( "(") (binary_expression "param_1 + 0x6c" (identifier "param_1") (+ "+") (number_literal "0x6c")) () ")"))))) (; ";")) (expression_statement "iVar3 = *(int *)(param_1 + 0x7c);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x7c)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x7c)" (* "*") (cast_expression "(int *)(param_1 + 0x7c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x7c)" (( "(") (binary_expression "param_1 + 0x7c" (identifier "param_1") (+ "+") (number_literal "0x7c")) () ")"))))) (; ";")) (if_statement "if (iVar2 < iVar3) {\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }\n    else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }" (if "if") (parenthesized_expression "(iVar2 < iVar3)" (( "(") (binary_expression "iVar2 < iVar3" (identifier "iVar2") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n      if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }\n      bVar1 = iVar3 < param_3;\nLAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }\n    }" ({ "{") (if_statement "if (param_4 == 2) {\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }\n      else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }" (if "if") (parenthesized_expression "(param_4 == 2)" (( "(") (binary_expression "param_4 == 2" (identifier "param_4") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n        if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }\n        iVar3 = *(int *)(param_1 + 0x80);\n      }" ({ "{") (if_statement "if (param_3 < iVar3) {\n          param_3 = iVar3;\n        }" (if "if") (parenthesized_expression "(param_3 < iVar3)" (( "(") (binary_expression "param_3 < iVar3" (identifier "param_3") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n          param_3 = iVar3;\n        }" ({ "{") (expression_statement "param_3 = iVar3;" (assignment_expression "param_3 = iVar3" (identifier "param_3") (= "=") (identifier "iVar3")) (; ";")) (} "}"))) (expression_statement "iVar3 = *(int *)(param_1 + 0x80);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x80)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x80)" (* "*") (cast_expression "(int *)(param_1 + 0x80)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x80)" (( "(") (binary_expression "param_1 + 0x80" (identifier "param_1") (+ "+") (number_literal "0x80")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }" (else "else") (compound_statement "{\n        iVar3 = *(int *)(param_1 + 0x80);\n        if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }\n      }" ({ "{") (expression_statement "iVar3 = *(int *)(param_1 + 0x80);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x80)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x80)" (* "*") (cast_expression "(int *)(param_1 + 0x80)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x80)" (( "(") (binary_expression "param_1 + 0x80" (identifier "param_1") (+ "+") (number_literal "0x80")) () ")"))))) (; ";")) (if_statement "if (iVar3 < iVar2) {\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }" (if "if") (parenthesized_expression "(iVar3 < iVar2)" (( "(") (binary_expression "iVar3 < iVar2" (identifier "iVar3") (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n          if (param_3 < 0) {\n            param_3 = 0;\n          }\n          goto LAB_0009a108;\n        }" ({ "{") (if_statement "if (param_3 < 0) {\n            param_3 = 0;\n          }" (if "if") (parenthesized_expression "(param_3 < 0)" (( "(") (binary_expression "param_3 < 0" (identifier "param_3") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n            param_3 = 0;\n          }" ({ "{") (expression_statement "param_3 = 0;" (assignment_expression "param_3 = 0" (identifier "param_3") (= "=") (number_literal "0")) (; ";")) (} "}"))) (goto_statement "goto LAB_0009a108;" (goto "goto") (statement_identifier "LAB_0009a108") (; ";")) (} "}"))) (} "}")))) (expression_statement "bVar1 = iVar3 < param_3;" (assignment_expression "bVar1 = iVar3 < param_3" (identifier "bVar1") (= "=") (binary_expression "iVar3 < param_3" (identifier "iVar3") (< "<") (identifier "param_3"))) (; ";")) (labeled_statement "LAB_0009a0fc:\n      if (bVar1) {\n        param_3 = iVar3;\n      }" (statement_identifier "LAB_0009a0fc") (: ":") (if_statement "if (bVar1) {\n        param_3 = iVar3;\n      }" (if "if") (parenthesized_expression "(bVar1)" (( "(") (identifier "bVar1") () ")")) (compound_statement "{\n        param_3 = iVar3;\n      }" ({ "{") (expression_statement "param_3 = iVar3;" (assignment_expression "param_3 = iVar3" (identifier "param_3") (= "=") (identifier "iVar3")) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }" (else "else") (compound_statement "{\n      if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }\n      iVar3 = *(int *)(param_1 + 0x80);\n      bVar1 = iVar3 < param_3;\n      if (iVar2 <= iVar3) goto LAB_0009a0fc;\n      if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }\n    }" ({ "{") (if_statement "if (param_3 < iVar3) {\n        param_3 = iVar3;\n      }" (if "if") (parenthesized_expression "(param_3 < iVar3)" (( "(") (binary_expression "param_3 < iVar3" (identifier "param_3") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n        param_3 = iVar3;\n      }" ({ "{") (expression_statement "param_3 = iVar3;" (assignment_expression "param_3 = iVar3" (identifier "param_3") (= "=") (identifier "iVar3")) (; ";")) (} "}"))) (expression_statement "iVar3 = *(int *)(param_1 + 0x80);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x80)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x80)" (* "*") (cast_expression "(int *)(param_1 + 0x80)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x80)" (( "(") (binary_expression "param_1 + 0x80" (identifier "param_1") (+ "+") (number_literal "0x80")) () ")"))))) (; ";")) (expression_statement "bVar1 = iVar3 < param_3;" (assignment_expression "bVar1 = iVar3 < param_3" (identifier "bVar1") (= "=") (binary_expression "iVar3 < param_3" (identifier "iVar3") (< "<") (identifier "param_3"))) (; ";")) (if_statement "if (iVar2 <= iVar3) goto LAB_0009a0fc;" (if "if") (parenthesized_expression "(iVar2 <= iVar3)" (( "(") (binary_expression "iVar2 <= iVar3" (identifier "iVar2") (<= "<=") (identifier "iVar3")) () ")")) (goto_statement "goto LAB_0009a0fc;" (goto "goto") (statement_identifier "LAB_0009a0fc") (; ";"))) (if_statement "if ((param_4 == 2) && (iVar3 < param_3)) {\n        param_3 = iVar3;\n      }" (if "if") (parenthesized_expression "((param_4 == 2) && (iVar3 < param_3))" (( "(") (binary_expression "(param_4 == 2) && (iVar3 < param_3)" (parenthesized_expression "(param_4 == 2)" (( "(") (binary_expression "param_4 == 2" (identifier "param_4") (== "==") (number_literal "2")) () ")")) (&& "&&") (parenthesized_expression "(iVar3 < param_3)" (( "(") (binary_expression "iVar3 < param_3" (identifier "iVar3") (< "<") (identifier "param_3")) () ")"))) () ")")) (compound_statement "{\n        param_3 = iVar3;\n      }" ({ "{") (expression_statement "param_3 = iVar3;" (assignment_expression "param_3 = iVar3" (identifier "param_3") (= "=") (identifier "iVar3")) (; ";")) (} "}"))) (} "}")))) (expression_statement "bVar1 = param_3 < 0;" (assignment_expression "bVar1 = param_3 < 0" (identifier "bVar1") (= "=") (binary_expression "param_3 < 0" (identifier "param_3") (< "<") (number_literal "0"))) (; ";")) (} "}"))) (if_statement "if (bVar1) {\n    param_3 = 0;\n  }" (if "if") (parenthesized_expression "(bVar1)" (( "(") (identifier "bVar1") () ")")) (compound_statement "{\n    param_3 = 0;\n  }" ({ "{") (expression_statement "param_3 = 0;" (assignment_expression "param_3 = 0" (identifier "param_3") (= "=") (number_literal "0")) (; ";")) (} "}"))) (labeled_statement "LAB_0009a108:\n  if (*(int *)(param_1 + 0x128) <= param_3) {\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }" (statement_identifier "LAB_0009a108") (: ":") (if_statement "if (*(int *)(param_1 + 0x128) <= param_3) {\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x128) <= param_3)" (( "(") (binary_expression "*(int *)(param_1 + 0x128) <= param_3" (pointer_expression "*(int *)(param_1 + 0x128)" (* "*") (cast_expression "(int *)(param_1 + 0x128)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x128)" (( "(") (binary_expression "param_1 + 0x128" (identifier "param_1") (+ "+") (number_literal "0x128")) () ")")))) (<= "<=") (identifier "param_3")) () ")")) (compound_statement "{\n    param_3 = *(int *)(param_1 + 0x128) + -1;\n  }" ({ "{") (expression_statement "param_3 = *(int *)(param_1 + 0x128) + -1;" (assignment_expression "param_3 = *(int *)(param_1 + 0x128) + -1" (identifier "param_3") (= "=") (binary_expression "*(int *)(param_1 + 0x128) + -1" (pointer_expression "*(int *)(param_1 + 0x128)" (* "*") (cast_expression "(int *)(param_1 + 0x128)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x128)" (( "(") (binary_expression "param_1 + 0x128" (identifier "param_1") (+ "+") (number_literal "0x128")) () ")")))) (+ "+") (number_literal "-1"))) (; ";")) (} "}")))) (expression_statement "*(int *)(param_1 + 0x70) = param_2;" (assignment_expression "*(int *)(param_1 + 0x70) = param_2" (pointer_expression "*(int *)(param_1 + 0x70)" (* "*") (cast_expression "(int *)(param_1 + 0x70)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x70)" (( "(") (binary_expression "param_1 + 0x70" (identifier "param_1") (+ "+") (number_literal "0x70")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (expression_statement "*(int *)(param_1 + 0x6c) = param_3;" (assignment_expression "*(int *)(param_1 + 0x6c) = param_3" (pointer_expression "*(int *)(param_1 + 0x6c)" (* "*") (cast_expression "(int *)(param_1 + 0x6c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x6c)" (( "(") (binary_expression "param_1 + 0x6c" (identifier "param_1") (+ "+") (number_literal "0x6c")) () ")")))) (= "=") (identifier "param_3")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x8c) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x8c) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x8c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x8c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x8c)" (( "(") (binary_expression "param_1 + 0x8c" (identifier "param_1") (+ "+") (number_literal "0x8c")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))
(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: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (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))))) (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: (identifier))) consequence: (compound_statement (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: (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: (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)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (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: (identifier) right: (identifier))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) alternative: (else_clause (compound_statement (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: (identifier) right: (identifier))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (goto_statement label: (statement_identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier)))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) consequence: (compound_statement (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: (number_literal))))))) (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))) (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))) (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))) (return_statement))))

void MASKED(int param_1,int param_2,int param_3,int param_4)

{
  bool bVar1;
  int iVar2;
  int iVar3;
  
  if (param_2 < 0) {
    param_2 = 0;
  }
  if (*(int *)(param_1 + 300) <= param_2) {
    param_2 = *(int *)(param_1 + 300) + -1;
  }
  bVar1 = param_3 < 0;
  if (param_4 != 0) {
    iVar2 = *(int *)(param_1 + 0x6c);
    iVar3 = *(int *)(param_1 + 0x7c);
    if (iVar2 < iVar3) {
      if (param_4 == 2) {
        if (param_3 < iVar3) {
          param_3 = iVar3;
        }
        iVar3 = *(int *)(param_1 + 0x80);
      }
      else {
        iVar3 = *(int *)(param_1 + 0x80);
        if (iVar3 < iVar2) {
          if (param_3 < 0) {
            param_3 = 0;
          }
          goto LAB_0009a108;
        }
      }
      bVar1 = iVar3 < param_3;
LAB_0009a0fc:
      if (bVar1) {
        param_3 = iVar3;
      }
    }
    else {
      if (param_3 < iVar3) {
        param_3 = iVar3;
      }
      iVar3 = *(int *)(param_1 + 0x80);
      bVar1 = iVar3 < param_3;
      if (iVar2 <= iVar3) goto LAB_0009a0fc;
      if ((param_4 == 2) && (iVar3 < param_3)) {
        param_3 = iVar3;
      }
    }
    bVar1 = param_3 < 0;
  }
  if (bVar1) {
    param_3 = 0;
  }
LAB_0009a108:
  if (*(int *)(param_1 + 0x128) <= param_3) {
    param_3 = *(int *)(param_1 + 0x128) + -1;
  }
  *(int *)(param_1 + 0x70) = param_2;
  *(int *)(param_1 + 0x6c) = param_3;
  *(undefined4 *)(param_1 + 0x8c) = 0;
  return;
}

