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

void GravityAdjustGeometry(size_t width,size_t height,GravityType gravity,RectangleInfo *region)

{
  uint uVar1;
  
  if (region->height == 0) {
    region->height = height;
  }
  if (region->width == 0) {
    region->width = width;
  }
  if (gravity < (SouthGravity|NorthGravity)) {
    uVar1 = 1 << ((byte)gravity & 0x1f);
    if ((uVar1 & 0x124) == 0) {
      if ((uVar1 & 0x248) != 0) {
        region->x = (width - region->width) - region->x;
      }
    }
    else {
      region->x = region->x + ((width >> 1) - (region->width >> 1));
    }
    if (NorthEastGravity < gravity) {
      if (gravity < SouthWestGravity) {
        region->y = region->y + ((height >> 1) - (region->height >> 1));
        return;
      }
      if (gravity < (SouthGravity|NorthGravity)) {
        region->y = (height - region->height) - region->y;
      }
    }
  }
  return;
}



void GravityAdjustGeometry(uint param_1,uint param_2,uint param_3,uint *param_4)

{
  uint uVar1;
  
  if (param_4[1] == 0) {
    param_4[1] = param_2;
  }
  if (*param_4 == 0) {
    *param_4 = param_1;
  }
  if (param_3 < 10) {
    uVar1 = 1 << ((byte)param_3 & 0x1f);
    if ((uVar1 & 0x124) == 0) {
      if ((uVar1 & 0x248) != 0) {
        param_4[2] = (param_1 - *param_4) - param_4[2];
      }
    }
    else {
      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));
    }
    if (3 < param_3) {
      if (param_3 < 7) {
        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));
        return;
      }
      if (param_3 < 10) {
        param_4[3] = (param_2 - param_4[1]) - param_4[3];
      }
    }
  }
  return;
}


PUSH EBX
MOV EAX,dword ptr [ESP + 0x14]
MOV ECX,dword ptr [ESP + 0x10]
MOV EBX,dword ptr [EAX + 0x4]
TEST EBX,EBX
JNZ 0x000d6407
MOV EBX,dword ptr [ESP + 0xc]
MOV dword ptr [EAX + 0x4],EBX
MOV EDX,dword ptr [EAX]
TEST EDX,EDX
JNZ 0x000d6413
MOV EBX,dword ptr [ESP + 0x8]
MOV dword ptr [EAX],EBX
CMP ECX,0x9
JA 0x000d6452
MOV EDX,0x1
SHL EDX,CL
TEST EDX,0x124
JZ 0x000d6458
MOV EDX,dword ptr [ESP + 0x8]
MOV EBX,dword ptr [EAX]
SHR EDX,0x1
SHR EBX,0x1
SUB EDX,EBX
ADD dword ptr [EAX + 0x8],EDX
CMP ECX,0x4
JC 0x000d6452
CMP ECX,0x6
JBE 0x000d6470
CMP ECX,0x9
JA 0x000d6452
MOV EDX,dword ptr [ESP + 0xc]
SUB EDX,dword ptr [EAX + 0x4]
SUB EDX,dword ptr [EAX + 0xc]
MOV dword ptr [EAX + 0xc],EDX
POP EBX
RET
AND EDX,0x248
JZ 0x000d6436
MOV EDX,dword ptr [ESP + 0x8]
SUB EDX,dword ptr [EAX]
SUB EDX,dword ptr [EAX + 0x8]
MOV dword ptr [EAX + 0x8],EDX
JMP 0x000d6436
MOV EDX,dword ptr [ESP + 0xc]
MOV ECX,dword ptr [EAX + 0x4]
SHR EDX,0x1
SHR ECX,0x1
SUB EDX,ECX
ADD dword ptr [EAX + 0xc],EDX
POP EBX
RET
(translation_unit "void GravityAdjustGeometry(uint param_1,uint param_2,uint param_3,uint *param_4)\n\n{\n  uint uVar1;\n  \n  if (param_4[1] == 0) {\n    param_4[1] = param_2;\n  }\n  if (*param_4 == 0) {\n    *param_4 = param_1;\n  }\n  if (param_3 < 10) {\n    uVar1 = 1 << ((byte)param_3 & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }\n    if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }\n  }\n  return;\n}\n\n" (function_definition "void GravityAdjustGeometry(uint param_1,uint param_2,uint param_3,uint *param_4)\n\n{\n  uint uVar1;\n  \n  if (param_4[1] == 0) {\n    param_4[1] = param_2;\n  }\n  if (*param_4 == 0) {\n    *param_4 = param_1;\n  }\n  if (param_3 < 10) {\n    uVar1 = 1 << ((byte)param_3 & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }\n    if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }\n  }\n  return;\n}" primitive_type (function_declarator "GravityAdjustGeometry(uint param_1,uint param_2,uint param_3,uint *param_4)" identifier (parameter_list "(uint param_1,uint param_2,uint param_3,uint *param_4)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  \n  if (param_4[1] == 0) {\n    param_4[1] = param_2;\n  }\n  if (*param_4 == 0) {\n    *param_4 = param_1;\n  }\n  if (param_3 < 10) {\n    uVar1 = 1 << ((byte)param_3 & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }\n    if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }\n  }\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (if_statement "if (param_4[1] == 0) {\n    param_4[1] = param_2;\n  }" if (parenthesized_expression "(param_4[1] == 0)" ( (binary_expression "param_4[1] == 0" (subscript_expression "param_4[1]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n    param_4[1] = param_2;\n  }" { (expression_statement "param_4[1] = param_2;" (assignment_expression "param_4[1] = param_2" (subscript_expression "param_4[1]" identifier [ number_literal ]) = identifier) ;) })) (if_statement "if (*param_4 == 0) {\n    *param_4 = param_1;\n  }" if (parenthesized_expression "(*param_4 == 0)" ( (binary_expression "*param_4 == 0" (pointer_expression "*param_4" * identifier) == number_literal) )) (compound_statement "{\n    *param_4 = param_1;\n  }" { (expression_statement "*param_4 = param_1;" (assignment_expression "*param_4 = param_1" (pointer_expression "*param_4" * identifier) = identifier) ;) })) (if_statement "if (param_3 < 10) {\n    uVar1 = 1 << ((byte)param_3 & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }\n    if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }\n  }" if (parenthesized_expression "(param_3 < 10)" ( (binary_expression "param_3 < 10" identifier < number_literal) )) (compound_statement "{\n    uVar1 = 1 << ((byte)param_3 & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }\n    if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }\n  }" { (expression_statement "uVar1 = 1 << ((byte)param_3 & 0x1f);" (assignment_expression "uVar1 = 1 << ((byte)param_3 & 0x1f)" identifier = (binary_expression "1 << ((byte)param_3 & 0x1f)" number_literal << (parenthesized_expression "((byte)param_3 & 0x1f)" ( (binary_expression "(byte)param_3 & 0x1f" (cast_expression "(byte)param_3" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )))) ;) (if_statement "if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }" if (parenthesized_expression "((uVar1 & 0x124) == 0)" ( (binary_expression "(uVar1 & 0x124) == 0" (parenthesized_expression "(uVar1 & 0x124)" ( (binary_expression "uVar1 & 0x124" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }" { (if_statement "if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }" if (parenthesized_expression "((uVar1 & 0x248) != 0)" ( (binary_expression "(uVar1 & 0x248) != 0" (parenthesized_expression "(uVar1 & 0x248)" ( (binary_expression "uVar1 & 0x248" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }" { (expression_statement "param_4[2] = (param_1 - *param_4) - param_4[2];" (assignment_expression "param_4[2] = (param_1 - *param_4) - param_4[2]" (subscript_expression "param_4[2]" identifier [ number_literal ]) = (binary_expression "(param_1 - *param_4) - param_4[2]" (parenthesized_expression "(param_1 - *param_4)" ( (binary_expression "param_1 - *param_4" identifier - (pointer_expression "*param_4" * identifier)) )) - (subscript_expression "param_4[2]" identifier [ number_literal ]))) ;) })) }) (else_clause "else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }" else (compound_statement "{\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }" { (expression_statement "param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));" (assignment_expression "param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1))" (subscript_expression "param_4[2]" identifier [ number_literal ]) = (binary_expression "param_4[2] + ((param_1 >> 1) - (*param_4 >> 1))" (subscript_expression "param_4[2]" identifier [ number_literal ]) + (parenthesized_expression "((param_1 >> 1) - (*param_4 >> 1))" ( (binary_expression "(param_1 >> 1) - (*param_4 >> 1)" (parenthesized_expression "(param_1 >> 1)" ( (binary_expression "param_1 >> 1" identifier >> number_literal) )) - (parenthesized_expression "(*param_4 >> 1)" ( (binary_expression "*param_4 >> 1" (pointer_expression "*param_4" * identifier) >> number_literal) ))) )))) ;) }))) (if_statement "if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }" if (parenthesized_expression "(3 < param_3)" ( (binary_expression "3 < param_3" number_literal < identifier) )) (compound_statement "{\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }" { (if_statement "if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }" if (parenthesized_expression "(param_3 < 7)" ( (binary_expression "param_3 < 7" identifier < number_literal) )) (compound_statement "{\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }" { (expression_statement "param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));" (assignment_expression "param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1))" (subscript_expression "param_4[3]" identifier [ number_literal ]) = (binary_expression "param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1))" (subscript_expression "param_4[3]" identifier [ number_literal ]) + (parenthesized_expression "((param_2 >> 1) - (param_4[1] >> 1))" ( (binary_expression "(param_2 >> 1) - (param_4[1] >> 1)" (parenthesized_expression "(param_2 >> 1)" ( (binary_expression "param_2 >> 1" identifier >> number_literal) )) - (parenthesized_expression "(param_4[1] >> 1)" ( (binary_expression "param_4[1] >> 1" (subscript_expression "param_4[1]" identifier [ number_literal ]) >> number_literal) ))) )))) ;) (return_statement "return;" return ;) })) (if_statement "if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }" if (parenthesized_expression "(param_3 < 10)" ( (binary_expression "param_3 < 10" identifier < number_literal) )) (compound_statement "{\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }" { (expression_statement "param_4[3] = (param_2 - param_4[1]) - param_4[3];" (assignment_expression "param_4[3] = (param_2 - param_4[1]) - param_4[3]" (subscript_expression "param_4[3]" identifier [ number_literal ]) = (binary_expression "(param_2 - param_4[1]) - param_4[3]" (parenthesized_expression "(param_2 - param_4[1])" ( (binary_expression "param_2 - param_4[1]" identifier - (subscript_expression "param_4[1]" identifier [ number_literal ])) )) - (subscript_expression "param_4[3]" identifier [ number_literal ]))) ;) })) })) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Enum "GravityType": Some values do not have unique names */\n\nvoid GravityAdjustGeometry(size_t width,size_t height,GravityType gravity,RectangleInfo *region)\n\n{\n  uint uVar1;\n  \n  if (region->height == 0) {\n    region->height = height;\n  }\n  if (region->width == 0) {\n    region->width = width;\n  }\n  if (gravity < (SouthGravity|NorthGravity)) {\n    uVar1 = 1 << ((byte)gravity & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        region->x = (width - region->width) - region->x;\n      }\n    }\n    else {\n      region->x = region->x + ((width >> 1) - (region->width >> 1));\n    }\n    if (NorthEastGravity < gravity) {\n      if (gravity < SouthWestGravity) {\n        region->y = region->y + ((height >> 1) - (region->height >> 1));\n        return;\n      }\n      if (gravity < (SouthGravity|NorthGravity)) {\n        region->y = (height - region->height) - region->y;\n      }\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void GravityAdjustGeometry(size_t width,size_t height,GravityType gravity,RectangleInfo *region)\n\n{\n  uint uVar1;\n  \n  if (region->height == 0) {\n    region->height = height;\n  }\n  if (region->width == 0) {\n    region->width = width;\n  }\n  if (gravity < (SouthGravity|NorthGravity)) {\n    uVar1 = 1 << ((byte)gravity & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        region->x = (width - region->width) - region->x;\n      }\n    }\n    else {\n      region->x = region->x + ((width >> 1) - (region->width >> 1));\n    }\n    if (NorthEastGravity < gravity) {\n      if (gravity < SouthWestGravity) {\n        region->y = region->y + ((height >> 1) - (region->height >> 1));\n        return;\n      }\n      if (gravity < (SouthGravity|NorthGravity)) {\n        region->y = (height - region->height) - region->y;\n      }\n    }\n  }\n  return;\n}" primitive_type (function_declarator "GravityAdjustGeometry(size_t width,size_t height,GravityType gravity,RectangleInfo *region)" identifier (parameter_list "(size_t width,size_t height,GravityType gravity,RectangleInfo *region)" ( (parameter_declaration "size_t width" primitive_type identifier) , (parameter_declaration "size_t height" primitive_type identifier) , (parameter_declaration "GravityType gravity" type_identifier identifier) , (parameter_declaration "RectangleInfo *region" type_identifier (pointer_declarator "*region" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  \n  if (region->height == 0) {\n    region->height = height;\n  }\n  if (region->width == 0) {\n    region->width = width;\n  }\n  if (gravity < (SouthGravity|NorthGravity)) {\n    uVar1 = 1 << ((byte)gravity & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        region->x = (width - region->width) - region->x;\n      }\n    }\n    else {\n      region->x = region->x + ((width >> 1) - (region->width >> 1));\n    }\n    if (NorthEastGravity < gravity) {\n      if (gravity < SouthWestGravity) {\n        region->y = region->y + ((height >> 1) - (region->height >> 1));\n        return;\n      }\n      if (gravity < (SouthGravity|NorthGravity)) {\n        region->y = (height - region->height) - region->y;\n      }\n    }\n  }\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (if_statement "if (region->height == 0) {\n    region->height = height;\n  }" if (parenthesized_expression "(region->height == 0)" ( (binary_expression "region->height == 0" (field_expression "region->height" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    region->height = height;\n  }" { (expression_statement "region->height = height;" (assignment_expression "region->height = height" (field_expression "region->height" identifier -> field_identifier) = identifier) ;) })) (if_statement "if (region->width == 0) {\n    region->width = width;\n  }" if (parenthesized_expression "(region->width == 0)" ( (binary_expression "region->width == 0" (field_expression "region->width" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    region->width = width;\n  }" { (expression_statement "region->width = width;" (assignment_expression "region->width = width" (field_expression "region->width" identifier -> field_identifier) = identifier) ;) })) (if_statement "if (gravity < (SouthGravity|NorthGravity)) {\n    uVar1 = 1 << ((byte)gravity & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        region->x = (width - region->width) - region->x;\n      }\n    }\n    else {\n      region->x = region->x + ((width >> 1) - (region->width >> 1));\n    }\n    if (NorthEastGravity < gravity) {\n      if (gravity < SouthWestGravity) {\n        region->y = region->y + ((height >> 1) - (region->height >> 1));\n        return;\n      }\n      if (gravity < (SouthGravity|NorthGravity)) {\n        region->y = (height - region->height) - region->y;\n      }\n    }\n  }" if (parenthesized_expression "(gravity < (SouthGravity|NorthGravity))" ( (binary_expression "gravity < (SouthGravity|NorthGravity)" identifier < (parenthesized_expression "(SouthGravity|NorthGravity)" ( (binary_expression "SouthGravity|NorthGravity" identifier | identifier) ))) )) (compound_statement "{\n    uVar1 = 1 << ((byte)gravity & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        region->x = (width - region->width) - region->x;\n      }\n    }\n    else {\n      region->x = region->x + ((width >> 1) - (region->width >> 1));\n    }\n    if (NorthEastGravity < gravity) {\n      if (gravity < SouthWestGravity) {\n        region->y = region->y + ((height >> 1) - (region->height >> 1));\n        return;\n      }\n      if (gravity < (SouthGravity|NorthGravity)) {\n        region->y = (height - region->height) - region->y;\n      }\n    }\n  }" { (expression_statement "uVar1 = 1 << ((byte)gravity & 0x1f);" (assignment_expression "uVar1 = 1 << ((byte)gravity & 0x1f)" identifier = (binary_expression "1 << ((byte)gravity & 0x1f)" number_literal << (parenthesized_expression "((byte)gravity & 0x1f)" ( (binary_expression "(byte)gravity & 0x1f" (cast_expression "(byte)gravity" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )))) ;) (if_statement "if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        region->x = (width - region->width) - region->x;\n      }\n    }\n    else {\n      region->x = region->x + ((width >> 1) - (region->width >> 1));\n    }" if (parenthesized_expression "((uVar1 & 0x124) == 0)" ( (binary_expression "(uVar1 & 0x124) == 0" (parenthesized_expression "(uVar1 & 0x124)" ( (binary_expression "uVar1 & 0x124" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      if ((uVar1 & 0x248) != 0) {\n        region->x = (width - region->width) - region->x;\n      }\n    }" { (if_statement "if ((uVar1 & 0x248) != 0) {\n        region->x = (width - region->width) - region->x;\n      }" if (parenthesized_expression "((uVar1 & 0x248) != 0)" ( (binary_expression "(uVar1 & 0x248) != 0" (parenthesized_expression "(uVar1 & 0x248)" ( (binary_expression "uVar1 & 0x248" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n        region->x = (width - region->width) - region->x;\n      }" { (expression_statement "region->x = (width - region->width) - region->x;" (assignment_expression "region->x = (width - region->width) - region->x" (field_expression "region->x" identifier -> field_identifier) = (binary_expression "(width - region->width) - region->x" (parenthesized_expression "(width - region->width)" ( (binary_expression "width - region->width" identifier - (field_expression "region->width" identifier -> field_identifier)) )) - (field_expression "region->x" identifier -> field_identifier))) ;) })) }) (else_clause "else {\n      region->x = region->x + ((width >> 1) - (region->width >> 1));\n    }" else (compound_statement "{\n      region->x = region->x + ((width >> 1) - (region->width >> 1));\n    }" { (expression_statement "region->x = region->x + ((width >> 1) - (region->width >> 1));" (assignment_expression "region->x = region->x + ((width >> 1) - (region->width >> 1))" (field_expression "region->x" identifier -> field_identifier) = (binary_expression "region->x + ((width >> 1) - (region->width >> 1))" (field_expression "region->x" identifier -> field_identifier) + (parenthesized_expression "((width >> 1) - (region->width >> 1))" ( (binary_expression "(width >> 1) - (region->width >> 1)" (parenthesized_expression "(width >> 1)" ( (binary_expression "width >> 1" identifier >> number_literal) )) - (parenthesized_expression "(region->width >> 1)" ( (binary_expression "region->width >> 1" (field_expression "region->width" identifier -> field_identifier) >> number_literal) ))) )))) ;) }))) (if_statement "if (NorthEastGravity < gravity) {\n      if (gravity < SouthWestGravity) {\n        region->y = region->y + ((height >> 1) - (region->height >> 1));\n        return;\n      }\n      if (gravity < (SouthGravity|NorthGravity)) {\n        region->y = (height - region->height) - region->y;\n      }\n    }" if (parenthesized_expression "(NorthEastGravity < gravity)" ( (binary_expression "NorthEastGravity < gravity" identifier < identifier) )) (compound_statement "{\n      if (gravity < SouthWestGravity) {\n        region->y = region->y + ((height >> 1) - (region->height >> 1));\n        return;\n      }\n      if (gravity < (SouthGravity|NorthGravity)) {\n        region->y = (height - region->height) - region->y;\n      }\n    }" { (if_statement "if (gravity < SouthWestGravity) {\n        region->y = region->y + ((height >> 1) - (region->height >> 1));\n        return;\n      }" if (parenthesized_expression "(gravity < SouthWestGravity)" ( (binary_expression "gravity < SouthWestGravity" identifier < identifier) )) (compound_statement "{\n        region->y = region->y + ((height >> 1) - (region->height >> 1));\n        return;\n      }" { (expression_statement "region->y = region->y + ((height >> 1) - (region->height >> 1));" (assignment_expression "region->y = region->y + ((height >> 1) - (region->height >> 1))" (field_expression "region->y" identifier -> field_identifier) = (binary_expression "region->y + ((height >> 1) - (region->height >> 1))" (field_expression "region->y" identifier -> field_identifier) + (parenthesized_expression "((height >> 1) - (region->height >> 1))" ( (binary_expression "(height >> 1) - (region->height >> 1)" (parenthesized_expression "(height >> 1)" ( (binary_expression "height >> 1" identifier >> number_literal) )) - (parenthesized_expression "(region->height >> 1)" ( (binary_expression "region->height >> 1" (field_expression "region->height" identifier -> field_identifier) >> number_literal) ))) )))) ;) (return_statement "return;" return ;) })) (if_statement "if (gravity < (SouthGravity|NorthGravity)) {\n        region->y = (height - region->height) - region->y;\n      }" if (parenthesized_expression "(gravity < (SouthGravity|NorthGravity))" ( (binary_expression "gravity < (SouthGravity|NorthGravity)" identifier < (parenthesized_expression "(SouthGravity|NorthGravity)" ( (binary_expression "SouthGravity|NorthGravity" identifier | identifier) ))) )) (compound_statement "{\n        region->y = (height - region->height) - region->y;\n      }" { (expression_statement "region->y = (height - region->height) - region->y;" (assignment_expression "region->y = (height - region->height) - region->y" (field_expression "region->y" identifier -> field_identifier) = (binary_expression "(height - region->height) - region->y" (parenthesized_expression "(height - region->height)" ( (binary_expression "height - region->height" identifier - (field_expression "region->height" identifier -> field_identifier)) )) - (field_expression "region->y" identifier -> field_identifier))) ;) })) })) })) (return_statement "return;" return ;) })))
(translation_unit "void GravityAdjustGeometry(uint param_1,uint param_2,uint param_3,uint *param_4)\n\n{\n  uint uVar1;\n  \n  if (param_4[1] == 0) {\n    param_4[1] = param_2;\n  }\n  if (*param_4 == 0) {\n    *param_4 = param_1;\n  }\n  if (param_3 < 10) {\n    uVar1 = 1 << ((byte)param_3 & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }\n    if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }\n  }\n  return;\n}\n\n" (function_definition "void GravityAdjustGeometry(uint param_1,uint param_2,uint param_3,uint *param_4)\n\n{\n  uint uVar1;\n  \n  if (param_4[1] == 0) {\n    param_4[1] = param_2;\n  }\n  if (*param_4 == 0) {\n    *param_4 = param_1;\n  }\n  if (param_3 < 10) {\n    uVar1 = 1 << ((byte)param_3 & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }\n    if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }\n  }\n  return;\n}" primitive_type (function_declarator "GravityAdjustGeometry(uint param_1,uint param_2,uint param_3,uint *param_4)" identifier (parameter_list "(uint param_1,uint param_2,uint param_3,uint *param_4)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  \n  if (param_4[1] == 0) {\n    param_4[1] = param_2;\n  }\n  if (*param_4 == 0) {\n    *param_4 = param_1;\n  }\n  if (param_3 < 10) {\n    uVar1 = 1 << ((byte)param_3 & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }\n    if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }\n  }\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (if_statement "if (param_4[1] == 0) {\n    param_4[1] = param_2;\n  }" if (parenthesized_expression "(param_4[1] == 0)" ( (binary_expression "param_4[1] == 0" (subscript_expression "param_4[1]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n    param_4[1] = param_2;\n  }" { (expression_statement "param_4[1] = param_2;" (assignment_expression "param_4[1] = param_2" (subscript_expression "param_4[1]" identifier [ number_literal ]) = identifier) ;) })) (if_statement "if (*param_4 == 0) {\n    *param_4 = param_1;\n  }" if (parenthesized_expression "(*param_4 == 0)" ( (binary_expression "*param_4 == 0" (pointer_expression "*param_4" * identifier) == number_literal) )) (compound_statement "{\n    *param_4 = param_1;\n  }" { (expression_statement "*param_4 = param_1;" (assignment_expression "*param_4 = param_1" (pointer_expression "*param_4" * identifier) = identifier) ;) })) (if_statement "if (param_3 < 10) {\n    uVar1 = 1 << ((byte)param_3 & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }\n    if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }\n  }" if (parenthesized_expression "(param_3 < 10)" ( (binary_expression "param_3 < 10" identifier < number_literal) )) (compound_statement "{\n    uVar1 = 1 << ((byte)param_3 & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }\n    if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }\n  }" { (expression_statement "uVar1 = 1 << ((byte)param_3 & 0x1f);" (assignment_expression "uVar1 = 1 << ((byte)param_3 & 0x1f)" identifier = (binary_expression "1 << ((byte)param_3 & 0x1f)" number_literal << (parenthesized_expression "((byte)param_3 & 0x1f)" ( (binary_expression "(byte)param_3 & 0x1f" (cast_expression "(byte)param_3" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )))) ;) (if_statement "if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }" if (parenthesized_expression "((uVar1 & 0x124) == 0)" ( (binary_expression "(uVar1 & 0x124) == 0" (parenthesized_expression "(uVar1 & 0x124)" ( (binary_expression "uVar1 & 0x124" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }" { (if_statement "if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }" if (parenthesized_expression "((uVar1 & 0x248) != 0)" ( (binary_expression "(uVar1 & 0x248) != 0" (parenthesized_expression "(uVar1 & 0x248)" ( (binary_expression "uVar1 & 0x248" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }" { (expression_statement "param_4[2] = (param_1 - *param_4) - param_4[2];" (assignment_expression "param_4[2] = (param_1 - *param_4) - param_4[2]" (subscript_expression "param_4[2]" identifier [ number_literal ]) = (binary_expression "(param_1 - *param_4) - param_4[2]" (parenthesized_expression "(param_1 - *param_4)" ( (binary_expression "param_1 - *param_4" identifier - (pointer_expression "*param_4" * identifier)) )) - (subscript_expression "param_4[2]" identifier [ number_literal ]))) ;) })) }) (else_clause "else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }" else (compound_statement "{\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }" { (expression_statement "param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));" (assignment_expression "param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1))" (subscript_expression "param_4[2]" identifier [ number_literal ]) = (binary_expression "param_4[2] + ((param_1 >> 1) - (*param_4 >> 1))" (subscript_expression "param_4[2]" identifier [ number_literal ]) + (parenthesized_expression "((param_1 >> 1) - (*param_4 >> 1))" ( (binary_expression "(param_1 >> 1) - (*param_4 >> 1)" (parenthesized_expression "(param_1 >> 1)" ( (binary_expression "param_1 >> 1" identifier >> number_literal) )) - (parenthesized_expression "(*param_4 >> 1)" ( (binary_expression "*param_4 >> 1" (pointer_expression "*param_4" * identifier) >> number_literal) ))) )))) ;) }))) (if_statement "if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }" if (parenthesized_expression "(3 < param_3)" ( (binary_expression "3 < param_3" number_literal < identifier) )) (compound_statement "{\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }" { (if_statement "if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }" if (parenthesized_expression "(param_3 < 7)" ( (binary_expression "param_3 < 7" identifier < number_literal) )) (compound_statement "{\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }" { (expression_statement "param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));" (assignment_expression "param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1))" (subscript_expression "param_4[3]" identifier [ number_literal ]) = (binary_expression "param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1))" (subscript_expression "param_4[3]" identifier [ number_literal ]) + (parenthesized_expression "((param_2 >> 1) - (param_4[1] >> 1))" ( (binary_expression "(param_2 >> 1) - (param_4[1] >> 1)" (parenthesized_expression "(param_2 >> 1)" ( (binary_expression "param_2 >> 1" identifier >> number_literal) )) - (parenthesized_expression "(param_4[1] >> 1)" ( (binary_expression "param_4[1] >> 1" (subscript_expression "param_4[1]" identifier [ number_literal ]) >> number_literal) ))) )))) ;) (return_statement "return;" return ;) })) (if_statement "if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }" if (parenthesized_expression "(param_3 < 10)" ( (binary_expression "param_3 < 10" identifier < number_literal) )) (compound_statement "{\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }" { (expression_statement "param_4[3] = (param_2 - param_4[1]) - param_4[3];" (assignment_expression "param_4[3] = (param_2 - param_4[1]) - param_4[3]" (subscript_expression "param_4[3]" identifier [ number_literal ]) = (binary_expression "(param_2 - param_4[1]) - param_4[3]" (parenthesized_expression "(param_2 - param_4[1])" ( (binary_expression "param_2 - param_4[1]" identifier - (subscript_expression "param_4[1]" identifier [ number_literal ])) )) - (subscript_expression "param_4[3]" identifier [ 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 (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression LIT << (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (parenthesized_expression ( (binary_expression IDENT - (pointer_expression * IDENT)) )) - (subscript_expression IDENT [ LIT ]))) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT >> LIT) )) - (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) >> LIT) ))) )))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT >> LIT) )) - (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) >> LIT) ))) )))) ;) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (parenthesized_expression ( (binary_expression IDENT - (subscript_expression IDENT [ LIT ])) )) - (subscript_expression IDENT [ LIT ]))) ;) })) })) })) (return_statement return ;) })))
(function_definition "void GravityAdjustGeometry(uint param_1,uint param_2,uint param_3,uint *param_4)\n\n{\n  uint uVar1;\n  \n  if (param_4[1] == 0) {\n    param_4[1] = param_2;\n  }\n  if (*param_4 == 0) {\n    *param_4 = param_1;\n  }\n  if (param_3 < 10) {\n    uVar1 = 1 << ((byte)param_3 & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }\n    if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "GravityAdjustGeometry(uint param_1,uint param_2,uint param_3,uint *param_4)" (identifier "GravityAdjustGeometry") (parameter_list "(uint param_1,uint param_2,uint param_3,uint *param_4)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "uint *param_4" (type_identifier "uint") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  \n  if (param_4[1] == 0) {\n    param_4[1] = param_2;\n  }\n  if (*param_4 == 0) {\n    *param_4 = param_1;\n  }\n  if (param_3 < 10) {\n    uVar1 = 1 << ((byte)param_3 & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }\n    if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }\n  }\n  return;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (if_statement "if (param_4[1] == 0) {\n    param_4[1] = param_2;\n  }" (if "if") (parenthesized_expression "(param_4[1] == 0)" (( "(") (binary_expression "param_4[1] == 0" (subscript_expression "param_4[1]" (identifier "param_4") ([ "[") (number_literal "1") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    param_4[1] = param_2;\n  }" ({ "{") (expression_statement "param_4[1] = param_2;" (assignment_expression "param_4[1] = param_2" (subscript_expression "param_4[1]" (identifier "param_4") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_2")) (; ";")) (} "}"))) (if_statement "if (*param_4 == 0) {\n    *param_4 = param_1;\n  }" (if "if") (parenthesized_expression "(*param_4 == 0)" (( "(") (binary_expression "*param_4 == 0" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *param_4 = param_1;\n  }" ({ "{") (expression_statement "*param_4 = param_1;" (assignment_expression "*param_4 = param_1" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (identifier "param_1")) (; ";")) (} "}"))) (if_statement "if (param_3 < 10) {\n    uVar1 = 1 << ((byte)param_3 & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }\n    if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }\n  }" (if "if") (parenthesized_expression "(param_3 < 10)" (( "(") (binary_expression "param_3 < 10" (identifier "param_3") (< "<") (number_literal "10")) () ")")) (compound_statement "{\n    uVar1 = 1 << ((byte)param_3 & 0x1f);\n    if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }\n    if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }\n  }" ({ "{") (expression_statement "uVar1 = 1 << ((byte)param_3 & 0x1f);" (assignment_expression "uVar1 = 1 << ((byte)param_3 & 0x1f)" (identifier "uVar1") (= "=") (binary_expression "1 << ((byte)param_3 & 0x1f)" (number_literal "1") (<< "<<") (parenthesized_expression "((byte)param_3 & 0x1f)" (( "(") (binary_expression "(byte)param_3 & 0x1f" (cast_expression "(byte)param_3" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "param_3")) (& "&") (number_literal "0x1f")) () ")")))) (; ";")) (if_statement "if ((uVar1 & 0x124) == 0) {\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }\n    else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }" (if "if") (parenthesized_expression "((uVar1 & 0x124) == 0)" (( "(") (binary_expression "(uVar1 & 0x124) == 0" (parenthesized_expression "(uVar1 & 0x124)" (( "(") (binary_expression "uVar1 & 0x124" (identifier "uVar1") (& "&") (number_literal "0x124")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }\n    }" ({ "{") (if_statement "if ((uVar1 & 0x248) != 0) {\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }" (if "if") (parenthesized_expression "((uVar1 & 0x248) != 0)" (( "(") (binary_expression "(uVar1 & 0x248) != 0" (parenthesized_expression "(uVar1 & 0x248)" (( "(") (binary_expression "uVar1 & 0x248" (identifier "uVar1") (& "&") (number_literal "0x248")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        param_4[2] = (param_1 - *param_4) - param_4[2];\n      }" ({ "{") (expression_statement "param_4[2] = (param_1 - *param_4) - param_4[2];" (assignment_expression "param_4[2] = (param_1 - *param_4) - param_4[2]" (subscript_expression "param_4[2]" (identifier "param_4") ([ "[") (number_literal "2") (] "]")) (= "=") (binary_expression "(param_1 - *param_4) - param_4[2]" (parenthesized_expression "(param_1 - *param_4)" (( "(") (binary_expression "param_1 - *param_4" (identifier "param_1") (- "-") (pointer_expression "*param_4" (* "*") (identifier "param_4"))) () ")")) (- "-") (subscript_expression "param_4[2]" (identifier "param_4") ([ "[") (number_literal "2") (] "]")))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }" (else "else") (compound_statement "{\n      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));\n    }" ({ "{") (expression_statement "param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));" (assignment_expression "param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1))" (subscript_expression "param_4[2]" (identifier "param_4") ([ "[") (number_literal "2") (] "]")) (= "=") (binary_expression "param_4[2] + ((param_1 >> 1) - (*param_4 >> 1))" (subscript_expression "param_4[2]" (identifier "param_4") ([ "[") (number_literal "2") (] "]")) (+ "+") (parenthesized_expression "((param_1 >> 1) - (*param_4 >> 1))" (( "(") (binary_expression "(param_1 >> 1) - (*param_4 >> 1)" (parenthesized_expression "(param_1 >> 1)" (( "(") (binary_expression "param_1 >> 1" (identifier "param_1") (>> ">>") (number_literal "1")) () ")")) (- "-") (parenthesized_expression "(*param_4 >> 1)" (( "(") (binary_expression "*param_4 >> 1" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (>> ">>") (number_literal "1")) () ")"))) () ")")))) (; ";")) (} "}")))) (if_statement "if (3 < param_3) {\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }" (if "if") (parenthesized_expression "(3 < param_3)" (( "(") (binary_expression "3 < param_3" (number_literal "3") (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n      if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }\n      if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }\n    }" ({ "{") (if_statement "if (param_3 < 7) {\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }" (if "if") (parenthesized_expression "(param_3 < 7)" (( "(") (binary_expression "param_3 < 7" (identifier "param_3") (< "<") (number_literal "7")) () ")")) (compound_statement "{\n        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));\n        return;\n      }" ({ "{") (expression_statement "param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));" (assignment_expression "param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1))" (subscript_expression "param_4[3]" (identifier "param_4") ([ "[") (number_literal "3") (] "]")) (= "=") (binary_expression "param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1))" (subscript_expression "param_4[3]" (identifier "param_4") ([ "[") (number_literal "3") (] "]")) (+ "+") (parenthesized_expression "((param_2 >> 1) - (param_4[1] >> 1))" (( "(") (binary_expression "(param_2 >> 1) - (param_4[1] >> 1)" (parenthesized_expression "(param_2 >> 1)" (( "(") (binary_expression "param_2 >> 1" (identifier "param_2") (>> ">>") (number_literal "1")) () ")")) (- "-") (parenthesized_expression "(param_4[1] >> 1)" (( "(") (binary_expression "param_4[1] >> 1" (subscript_expression "param_4[1]" (identifier "param_4") ([ "[") (number_literal "1") (] "]")) (>> ">>") (number_literal "1")) () ")"))) () ")")))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (param_3 < 10) {\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }" (if "if") (parenthesized_expression "(param_3 < 10)" (( "(") (binary_expression "param_3 < 10" (identifier "param_3") (< "<") (number_literal "10")) () ")")) (compound_statement "{\n        param_4[3] = (param_2 - param_4[1]) - param_4[3];\n      }" ({ "{") (expression_statement "param_4[3] = (param_2 - param_4[1]) - param_4[3];" (assignment_expression "param_4[3] = (param_2 - param_4[1]) - param_4[3]" (subscript_expression "param_4[3]" (identifier "param_4") ([ "[") (number_literal "3") (] "]")) (= "=") (binary_expression "(param_2 - param_4[1]) - param_4[3]" (parenthesized_expression "(param_2 - param_4[1])" (( "(") (binary_expression "param_2 - param_4[1]" (identifier "param_2") (- "-") (subscript_expression "param_4[1]" (identifier "param_4") ([ "[") (number_literal "1") (] "]"))) () ")")) (- "-") (subscript_expression "param_4[3]" (identifier "param_4") ([ "[") (number_literal "3") (] "]")))) (; ";")) (} "}"))) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(size_t var_5,size_t var_8,type_1 var_1,type_2 *region)

{
  type_3 var_4;
  
  if (region->var_8 == 0) {
    region->var_8 = var_8;
  }
  if (region->var_5 == 0) {
    region->var_5 = var_5;
  }
  if (var_1 < (var_2|var_3)) {
    var_4 = 1 << ((type_4)var_1 & 0x1f);
    if ((var_4 & 0x124) == 0) {
      if ((var_4 & 0x248) != 0) {
        region->x = (var_5 - region->var_5) - region->x;
      }
    }
    else {
      region->x = region->x + ((var_5 >> 1) - (region->var_5 >> 1));
    }
    if (var_6 < var_1) {
      if (var_1 < var_7) {
        region->y = region->y + ((var_8 >> 1) - (region->var_8 >> 1));
        return;
      }
      if (var_1 < (var_2|var_3)) {
        region->y = (var_8 - region->var_8) - region->y;
      }
    }
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (number_literal) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (identifier)))) right: (subscript_expression argument: (identifier) index: (number_literal)))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) 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: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))))))) (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) right: (subscript_expression argument: (identifier) index: (number_literal))))))))))) (return_statement))))

void MASKED(uint param_1,uint param_2,uint param_3,uint *param_4)

{
  uint uVar1;
  
  if (param_4[1] == 0) {
    param_4[1] = param_2;
  }
  if (*param_4 == 0) {
    *param_4 = param_1;
  }
  if (param_3 < 10) {
    uVar1 = 1 << ((byte)param_3 & 0x1f);
    if ((uVar1 & 0x124) == 0) {
      if ((uVar1 & 0x248) != 0) {
        param_4[2] = (param_1 - *param_4) - param_4[2];
      }
    }
    else {
      param_4[2] = param_4[2] + ((param_1 >> 1) - (*param_4 >> 1));
    }
    if (3 < param_3) {
      if (param_3 < 7) {
        param_4[3] = param_4[3] + ((param_2 >> 1) - (param_4[1] >> 1));
        return;
      }
      if (param_3 < 10) {
        param_4[3] = (param_2 - param_4[1]) - param_4[3];
      }
    }
  }
  return;
}

