
void add_to_result(expressionS *resultP,offsetT amount,int rhs_highbit)

{
  byte bVar1;
  ulong uVar2;
  byte bVar3;
  ulong uVar4;
  
  bVar1 = resultP->field_0x19;
  uVar2 = resultP->X_add_number;
  uVar4 = amount + uVar2;
  resultP->X_add_number = uVar4;
  bVar3 = ((byte)rhs_highbit ^ bVar1 >> 1) & 1;
  if (uVar2 <= uVar4) {
    resultP->field_0x19 = bVar1 & 0xfd | bVar3 * '\x02';
    return;
  }
  resultP->field_0x19 = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;
  return;
}



void FUN_0011d220(long param_1,long param_2,byte param_3)

{
  byte bVar1;
  ulong uVar2;
  byte bVar3;
  ulong uVar4;
  
  bVar1 = *(byte *)(param_1 + 0x19);
  uVar2 = *(ulong *)(param_1 + 0x10);
  uVar4 = param_2 + uVar2;
  *(ulong *)(param_1 + 0x10) = uVar4;
  bVar3 = (param_3 ^ bVar1 >> 1) & 1;
  if (uVar2 <= uVar4) {
    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';
    return;
  }
  *(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;
  return;
}


MOVZX ECX,byte ptr [RDI + 0x19]
MOV R8,qword ptr [RDI + 0x10]
MOV EAX,ECX
ADD RSI,R8
SHR AL,0x1
MOV qword ptr [RDI + 0x10],RSI
XOR EDX,EAX
AND EDX,0x1
CMP RSI,R8
JC 0x0011d250
AND ECX,0xfffffffd
LEA EAX,[RDX + RDX*0x1]
MOV EDX,ECX
OR EDX,EAX
MOV byte ptr [RDI + 0x19],DL
RET
XOR EDX,0x1
AND ECX,0xfffffffd
AND EDX,0x1
ADD EDX,EDX
OR EDX,ECX
MOV byte ptr [RDI + 0x19],DL
RET
(translation_unit "void FUN_0011d220(long param_1,long param_2,byte param_3)\n\n{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  \n  bVar1 = *(byte *)(param_1 + 0x19);\n  uVar2 = *(ulong *)(param_1 + 0x10);\n  uVar4 = param_2 + uVar2;\n  *(ulong *)(param_1 + 0x10) = uVar4;\n  bVar3 = (param_3 ^ bVar1 >> 1) & 1;\n  if (uVar2 <= uVar4) {\n    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }\n  *(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;\n  return;\n}\n\n" (function_definition "void FUN_0011d220(long param_1,long param_2,byte param_3)\n\n{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  \n  bVar1 = *(byte *)(param_1 + 0x19);\n  uVar2 = *(ulong *)(param_1 + 0x10);\n  uVar4 = param_2 + uVar2;\n  *(ulong *)(param_1 + 0x10) = uVar4;\n  bVar3 = (param_3 ^ bVar1 >> 1) & 1;\n  if (uVar2 <= uVar4) {\n    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }\n  *(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;\n  return;\n}" primitive_type (function_declarator "FUN_0011d220(long param_1,long param_2,byte param_3)" identifier (parameter_list "(long param_1,long param_2,byte param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "byte param_3" type_identifier identifier) ))) (compound_statement "{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  \n  bVar1 = *(byte *)(param_1 + 0x19);\n  uVar2 = *(ulong *)(param_1 + 0x10);\n  uVar4 = param_2 + uVar2;\n  *(ulong *)(param_1 + 0x10) = uVar4;\n  bVar3 = (param_3 ^ bVar1 >> 1) & 1;\n  if (uVar2 <= uVar4) {\n    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }\n  *(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "byte bVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (expression_statement "bVar1 = *(byte *)(param_1 + 0x19);" (assignment_expression "bVar1 = *(byte *)(param_1 + 0x19)" identifier = (pointer_expression "*(byte *)(param_1 + 0x19)" * (cast_expression "(byte *)(param_1 + 0x19)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x19)" ( (binary_expression "param_1 + 0x19" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(ulong *)(param_1 + 0x10);" (assignment_expression "uVar2 = *(ulong *)(param_1 + 0x10)" identifier = (pointer_expression "*(ulong *)(param_1 + 0x10)" * (cast_expression "(ulong *)(param_1 + 0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar4 = param_2 + uVar2;" (assignment_expression "uVar4 = param_2 + uVar2" identifier = (binary_expression "param_2 + uVar2" identifier + identifier)) ;) (expression_statement "*(ulong *)(param_1 + 0x10) = uVar4;" (assignment_expression "*(ulong *)(param_1 + 0x10) = uVar4" (pointer_expression "*(ulong *)(param_1 + 0x10)" * (cast_expression "(ulong *)(param_1 + 0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "bVar3 = (param_3 ^ bVar1 >> 1) & 1;" (assignment_expression "bVar3 = (param_3 ^ bVar1 >> 1) & 1" identifier = (binary_expression "(param_3 ^ bVar1 >> 1) & 1" (parenthesized_expression "(param_3 ^ bVar1 >> 1)" ( (binary_expression "param_3 ^ bVar1 >> 1" identifier ^ (binary_expression "bVar1 >> 1" identifier >> number_literal)) )) & number_literal)) ;) (if_statement "if (uVar2 <= uVar4) {\n    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }" if (parenthesized_expression "(uVar2 <= uVar4)" ( (binary_expression "uVar2 <= uVar4" identifier <= identifier) )) (compound_statement "{\n    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }" { (expression_statement "*(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';" (assignment_expression "*(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02'" (pointer_expression "*(byte *)(param_1 + 0x19)" * (cast_expression "(byte *)(param_1 + 0x19)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x19)" ( (binary_expression "param_1 + 0x19" identifier + number_literal) )))) = (binary_expression "bVar1 & 0xfd | bVar3 * '\x02'" (binary_expression "bVar1 & 0xfd" identifier & number_literal) | (binary_expression "bVar3 * '\x02'" identifier * (char_literal "'\x02'" ' escape_sequence ')))) ;) (return_statement "return;" return ;) })) (expression_statement "*(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;" (assignment_expression "*(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd" (pointer_expression "*(byte *)(param_1 + 0x19)" * (cast_expression "(byte *)(param_1 + 0x19)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x19)" ( (binary_expression "param_1 + 0x19" identifier + number_literal) )))) = (binary_expression "(bVar3 ^ 1) * '\x02' | bVar1 & 0xfd" (binary_expression "(bVar3 ^ 1) * '\x02'" (parenthesized_expression "(bVar3 ^ 1)" ( (binary_expression "bVar3 ^ 1" identifier ^ number_literal) )) * (char_literal "'\x02'" ' escape_sequence ')) | (binary_expression "bVar1 & 0xfd" identifier & number_literal))) ;) (return_statement "return;" return ;) })))
(translation_unit "void add_to_result(expressionS *resultP,offsetT amount,int rhs_highbit)\n\n{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  \n  bVar1 = resultP->field_0x19;\n  uVar2 = resultP->X_add_number;\n  uVar4 = amount + uVar2;\n  resultP->X_add_number = uVar4;\n  bVar3 = ((byte)rhs_highbit ^ bVar1 >> 1) & 1;\n  if (uVar2 <= uVar4) {\n    resultP->field_0x19 = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }\n  resultP->field_0x19 = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;\n  return;\n}\n\n" (function_definition "void add_to_result(expressionS *resultP,offsetT amount,int rhs_highbit)\n\n{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  \n  bVar1 = resultP->field_0x19;\n  uVar2 = resultP->X_add_number;\n  uVar4 = amount + uVar2;\n  resultP->X_add_number = uVar4;\n  bVar3 = ((byte)rhs_highbit ^ bVar1 >> 1) & 1;\n  if (uVar2 <= uVar4) {\n    resultP->field_0x19 = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }\n  resultP->field_0x19 = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;\n  return;\n}" primitive_type (function_declarator "add_to_result(expressionS *resultP,offsetT amount,int rhs_highbit)" identifier (parameter_list "(expressionS *resultP,offsetT amount,int rhs_highbit)" ( (parameter_declaration "expressionS *resultP" type_identifier (pointer_declarator "*resultP" * identifier)) , (parameter_declaration "offsetT amount" type_identifier identifier) , (parameter_declaration "int rhs_highbit" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  \n  bVar1 = resultP->field_0x19;\n  uVar2 = resultP->X_add_number;\n  uVar4 = amount + uVar2;\n  resultP->X_add_number = uVar4;\n  bVar3 = ((byte)rhs_highbit ^ bVar1 >> 1) & 1;\n  if (uVar2 <= uVar4) {\n    resultP->field_0x19 = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }\n  resultP->field_0x19 = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "byte bVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (expression_statement "bVar1 = resultP->field_0x19;" (assignment_expression "bVar1 = resultP->field_0x19" identifier = (field_expression "resultP->field_0x19" identifier -> field_identifier)) ;) (expression_statement "uVar2 = resultP->X_add_number;" (assignment_expression "uVar2 = resultP->X_add_number" identifier = (field_expression "resultP->X_add_number" identifier -> field_identifier)) ;) (expression_statement "uVar4 = amount + uVar2;" (assignment_expression "uVar4 = amount + uVar2" identifier = (binary_expression "amount + uVar2" identifier + identifier)) ;) (expression_statement "resultP->X_add_number = uVar4;" (assignment_expression "resultP->X_add_number = uVar4" (field_expression "resultP->X_add_number" identifier -> field_identifier) = identifier) ;) (expression_statement "bVar3 = ((byte)rhs_highbit ^ bVar1 >> 1) & 1;" (assignment_expression "bVar3 = ((byte)rhs_highbit ^ bVar1 >> 1) & 1" identifier = (binary_expression "((byte)rhs_highbit ^ bVar1 >> 1) & 1" (parenthesized_expression "((byte)rhs_highbit ^ bVar1 >> 1)" ( (binary_expression "(byte)rhs_highbit ^ bVar1 >> 1" (cast_expression "(byte)rhs_highbit" ( (type_descriptor "byte" type_identifier) ) identifier) ^ (binary_expression "bVar1 >> 1" identifier >> number_literal)) )) & number_literal)) ;) (if_statement "if (uVar2 <= uVar4) {\n    resultP->field_0x19 = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }" if (parenthesized_expression "(uVar2 <= uVar4)" ( (binary_expression "uVar2 <= uVar4" identifier <= identifier) )) (compound_statement "{\n    resultP->field_0x19 = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }" { (expression_statement "resultP->field_0x19 = bVar1 & 0xfd | bVar3 * '\x02';" (assignment_expression "resultP->field_0x19 = bVar1 & 0xfd | bVar3 * '\x02'" (field_expression "resultP->field_0x19" identifier -> field_identifier) = (binary_expression "bVar1 & 0xfd | bVar3 * '\x02'" (binary_expression "bVar1 & 0xfd" identifier & number_literal) | (binary_expression "bVar3 * '\x02'" identifier * (char_literal "'\x02'" ' escape_sequence ')))) ;) (return_statement "return;" return ;) })) (expression_statement "resultP->field_0x19 = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;" (assignment_expression "resultP->field_0x19 = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd" (field_expression "resultP->field_0x19" identifier -> field_identifier) = (binary_expression "(bVar3 ^ 1) * '\x02' | bVar1 & 0xfd" (binary_expression "(bVar3 ^ 1) * '\x02'" (parenthesized_expression "(bVar3 ^ 1)" ( (binary_expression "bVar3 ^ 1" identifier ^ number_literal) )) * (char_literal "'\x02'" ' escape_sequence ')) | (binary_expression "bVar1 & 0xfd" identifier & number_literal))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0011d220(long param_1,long param_2,byte param_3)\n\n{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  \n  bVar1 = *(byte *)(param_1 + 0x19);\n  uVar2 = *(ulong *)(param_1 + 0x10);\n  uVar4 = param_2 + uVar2;\n  *(ulong *)(param_1 + 0x10) = uVar4;\n  bVar3 = (param_3 ^ bVar1 >> 1) & 1;\n  if (uVar2 <= uVar4) {\n    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }\n  *(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;\n  return;\n}\n\n" (function_definition "void FUN_0011d220(long param_1,long param_2,byte param_3)\n\n{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  \n  bVar1 = *(byte *)(param_1 + 0x19);\n  uVar2 = *(ulong *)(param_1 + 0x10);\n  uVar4 = param_2 + uVar2;\n  *(ulong *)(param_1 + 0x10) = uVar4;\n  bVar3 = (param_3 ^ bVar1 >> 1) & 1;\n  if (uVar2 <= uVar4) {\n    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }\n  *(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;\n  return;\n}" primitive_type (function_declarator "FUN_0011d220(long param_1,long param_2,byte param_3)" identifier (parameter_list "(long param_1,long param_2,byte param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "byte param_3" type_identifier identifier) ))) (compound_statement "{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  \n  bVar1 = *(byte *)(param_1 + 0x19);\n  uVar2 = *(ulong *)(param_1 + 0x10);\n  uVar4 = param_2 + uVar2;\n  *(ulong *)(param_1 + 0x10) = uVar4;\n  bVar3 = (param_3 ^ bVar1 >> 1) & 1;\n  if (uVar2 <= uVar4) {\n    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }\n  *(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "byte bVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (expression_statement "bVar1 = *(byte *)(param_1 + 0x19);" (assignment_expression "bVar1 = *(byte *)(param_1 + 0x19)" identifier = (pointer_expression "*(byte *)(param_1 + 0x19)" * (cast_expression "(byte *)(param_1 + 0x19)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x19)" ( (binary_expression "param_1 + 0x19" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(ulong *)(param_1 + 0x10);" (assignment_expression "uVar2 = *(ulong *)(param_1 + 0x10)" identifier = (pointer_expression "*(ulong *)(param_1 + 0x10)" * (cast_expression "(ulong *)(param_1 + 0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar4 = param_2 + uVar2;" (assignment_expression "uVar4 = param_2 + uVar2" identifier = (binary_expression "param_2 + uVar2" identifier + identifier)) ;) (expression_statement "*(ulong *)(param_1 + 0x10) = uVar4;" (assignment_expression "*(ulong *)(param_1 + 0x10) = uVar4" (pointer_expression "*(ulong *)(param_1 + 0x10)" * (cast_expression "(ulong *)(param_1 + 0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "bVar3 = (param_3 ^ bVar1 >> 1) & 1;" (assignment_expression "bVar3 = (param_3 ^ bVar1 >> 1) & 1" identifier = (binary_expression "(param_3 ^ bVar1 >> 1) & 1" (parenthesized_expression "(param_3 ^ bVar1 >> 1)" ( (binary_expression "param_3 ^ bVar1 >> 1" identifier ^ (binary_expression "bVar1 >> 1" identifier >> number_literal)) )) & number_literal)) ;) (if_statement "if (uVar2 <= uVar4) {\n    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }" if (parenthesized_expression "(uVar2 <= uVar4)" ( (binary_expression "uVar2 <= uVar4" identifier <= identifier) )) (compound_statement "{\n    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }" { (expression_statement "*(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';" (assignment_expression "*(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02'" (pointer_expression "*(byte *)(param_1 + 0x19)" * (cast_expression "(byte *)(param_1 + 0x19)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x19)" ( (binary_expression "param_1 + 0x19" identifier + number_literal) )))) = (binary_expression "bVar1 & 0xfd | bVar3 * '\x02'" (binary_expression "bVar1 & 0xfd" identifier & number_literal) | (binary_expression "bVar3 * '\x02'" identifier * (char_literal "'\x02'" ' escape_sequence ')))) ;) (return_statement "return;" return ;) })) (expression_statement "*(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;" (assignment_expression "*(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd" (pointer_expression "*(byte *)(param_1 + 0x19)" * (cast_expression "(byte *)(param_1 + 0x19)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x19)" ( (binary_expression "param_1 + 0x19" identifier + number_literal) )))) = (binary_expression "(bVar3 ^ 1) * '\x02' | bVar1 & 0xfd" (binary_expression "(bVar3 ^ 1) * '\x02'" (parenthesized_expression "(bVar3 ^ 1)" ( (binary_expression "bVar3 ^ 1" identifier ^ number_literal) )) * (char_literal "'\x02'" ' escape_sequence ')) | (binary_expression "bVar1 & 0xfd" identifier & number_literal))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (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)) ;) (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 IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT ^ (binary_expression IDENT >> LIT)) )) & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (binary_expression IDENT & LIT) | (binary_expression IDENT * (char_literal ' escape_sequence ')))) ;) (return_statement return ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT ^ LIT) )) * (char_literal ' escape_sequence ')) | (binary_expression IDENT & LIT))) ;) (return_statement return ;) })))
(function_definition "void FUN_0011d220(long param_1,long param_2,byte param_3)\n\n{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  \n  bVar1 = *(byte *)(param_1 + 0x19);\n  uVar2 = *(ulong *)(param_1 + 0x10);\n  uVar4 = param_2 + uVar2;\n  *(ulong *)(param_1 + 0x10) = uVar4;\n  bVar3 = (param_3 ^ bVar1 >> 1) & 1;\n  if (uVar2 <= uVar4) {\n    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }\n  *(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0011d220(long param_1,long param_2,byte param_3)" (identifier "FUN_0011d220") (parameter_list "(long param_1,long param_2,byte param_3)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) (, ",") (parameter_declaration "byte param_3" (type_identifier "byte") (identifier "param_3")) () ")"))) (compound_statement "{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  \n  bVar1 = *(byte *)(param_1 + 0x19);\n  uVar2 = *(ulong *)(param_1 + 0x10);\n  uVar4 = param_2 + uVar2;\n  *(ulong *)(param_1 + 0x10) = uVar4;\n  bVar3 = (param_3 ^ bVar1 >> 1) & 1;\n  if (uVar2 <= uVar4) {\n    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }\n  *(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;\n  return;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "ulong uVar2;" (type_identifier "ulong") (identifier "uVar2") (; ";")) (declaration "byte bVar3;" (type_identifier "byte") (identifier "bVar3") (; ";")) (declaration "ulong uVar4;" (type_identifier "ulong") (identifier "uVar4") (; ";")) (expression_statement "bVar1 = *(byte *)(param_1 + 0x19);" (assignment_expression "bVar1 = *(byte *)(param_1 + 0x19)" (identifier "bVar1") (= "=") (pointer_expression "*(byte *)(param_1 + 0x19)" (* "*") (cast_expression "(byte *)(param_1 + 0x19)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x19)" (( "(") (binary_expression "param_1 + 0x19" (identifier "param_1") (+ "+") (number_literal "0x19")) () ")"))))) (; ";")) (expression_statement "uVar2 = *(ulong *)(param_1 + 0x10);" (assignment_expression "uVar2 = *(ulong *)(param_1 + 0x10)" (identifier "uVar2") (= "=") (pointer_expression "*(ulong *)(param_1 + 0x10)" (* "*") (cast_expression "(ulong *)(param_1 + 0x10)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "uVar4 = param_2 + uVar2;" (assignment_expression "uVar4 = param_2 + uVar2" (identifier "uVar4") (= "=") (binary_expression "param_2 + uVar2" (identifier "param_2") (+ "+") (identifier "uVar2"))) (; ";")) (expression_statement "*(ulong *)(param_1 + 0x10) = uVar4;" (assignment_expression "*(ulong *)(param_1 + 0x10) = uVar4" (pointer_expression "*(ulong *)(param_1 + 0x10)" (* "*") (cast_expression "(ulong *)(param_1 + 0x10)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (identifier "uVar4")) (; ";")) (expression_statement "bVar3 = (param_3 ^ bVar1 >> 1) & 1;" (assignment_expression "bVar3 = (param_3 ^ bVar1 >> 1) & 1" (identifier "bVar3") (= "=") (binary_expression "(param_3 ^ bVar1 >> 1) & 1" (parenthesized_expression "(param_3 ^ bVar1 >> 1)" (( "(") (binary_expression "param_3 ^ bVar1 >> 1" (identifier "param_3") (^ "^") (binary_expression "bVar1 >> 1" (identifier "bVar1") (>> ">>") (number_literal "1"))) () ")")) (& "&") (number_literal "1"))) (; ";")) (if_statement "if (uVar2 <= uVar4) {\n    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }" (if "if") (parenthesized_expression "(uVar2 <= uVar4)" (( "(") (binary_expression "uVar2 <= uVar4" (identifier "uVar2") (<= "<=") (identifier "uVar4")) () ")")) (compound_statement "{\n    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';\n    return;\n  }" ({ "{") (expression_statement "*(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';" (assignment_expression "*(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02'" (pointer_expression "*(byte *)(param_1 + 0x19)" (* "*") (cast_expression "(byte *)(param_1 + 0x19)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x19)" (( "(") (binary_expression "param_1 + 0x19" (identifier "param_1") (+ "+") (number_literal "0x19")) () ")")))) (= "=") (binary_expression "bVar1 & 0xfd | bVar3 * '\x02'" (binary_expression "bVar1 & 0xfd" (identifier "bVar1") (& "&") (number_literal "0xfd")) (| "|") (binary_expression "bVar3 * '\x02'" (identifier "bVar3") (* "*") (char_literal "'\x02'" (' "'") (escape_sequence "\x02") (' "'"))))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "*(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;" (assignment_expression "*(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd" (pointer_expression "*(byte *)(param_1 + 0x19)" (* "*") (cast_expression "(byte *)(param_1 + 0x19)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x19)" (( "(") (binary_expression "param_1 + 0x19" (identifier "param_1") (+ "+") (number_literal "0x19")) () ")")))) (= "=") (binary_expression "(bVar3 ^ 1) * '\x02' | bVar1 & 0xfd" (binary_expression "(bVar3 ^ 1) * '\x02'" (parenthesized_expression "(bVar3 ^ 1)" (( "(") (binary_expression "bVar3 ^ 1" (identifier "bVar3") (^ "^") (number_literal "1")) () ")")) (* "*") (char_literal "'\x02'" (' "'") (escape_sequence "\x02") (' "'"))) (| "|") (binary_expression "bVar1 & 0xfd" (identifier "bVar1") (& "&") (number_literal "0xfd")))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *resultP,type_2 var_1,int rhs_highbit)

{
  type_3 var_3;
  type_4 var_2;
  type_3 var_5;
  type_4 var_4;
  
  var_3 = resultP->field_0x19;
  var_2 = resultP->X_add_number;
  var_4 = var_1 + var_2;
  resultP->X_add_number = var_4;
  var_5 = ((type_3)rhs_highbit ^ var_3 >> 1) & 1;
  if (var_2 <= var_4) {
    resultP->field_0x19 = var_3 & 0xfd | var_5 * '\x02';
    return;
  }
  resultP->field_0x19 = (var_5 ^ 1) * '\x02' | var_3 & 0xfd;
  return;
}


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

void MASKED(long param_1,long param_2,byte param_3)

{
  byte bVar1;
  ulong uVar2;
  byte bVar3;
  ulong uVar4;
  
  bVar1 = *(byte *)(param_1 + 0x19);
  uVar2 = *(ulong *)(param_1 + 0x10);
  uVar4 = param_2 + uVar2;
  *(ulong *)(param_1 + 0x10) = uVar4;
  bVar3 = (param_3 ^ bVar1 >> 1) & 1;
  if (uVar2 <= uVar4) {
    *(byte *)(param_1 + 0x19) = bVar1 & 0xfd | bVar3 * '\x02';
    return;
  }
  *(byte *)(param_1 + 0x19) = (bVar3 ^ 1) * '\x02' | bVar1 & 0xfd;
  return;
}

