
expressionS * symbol_get_value_expression(symbolS *s)

{
  symbolS *psVar1;
  
  if (((uint)s->sy_flags & 1) == 0) {
    return &s->sy_value;
  }
  if ((segT)s->bsym != reg_section) {
    psVar1 = local_symbol_convert((local_symbol *)s);
    return &psVar1->sy_value;
  }
  return &((s->sy_value).X_op_symbol)->sy_value;
}



byte * FUN_00129e10(byte *param_1)

{
  long lVar1;
  
  if ((*param_1 & 1) == 0) {
    return param_1 + 0x10;
  }
  if (*(long *)(param_1 + 8) != DAT_0016eee0) {
    lVar1 = FUN_00127af0();
    return (byte *)(lVar1 + 0x10);
  }
  return (byte *)(*(long *)(param_1 + 0x18) + 0x10);
}


TEST byte ptr [RDI],0x1
JNZ 0x00129e20
LEA RAX,[RDI + 0x10]
RET
MOV RAX,qword ptr [0x0016eee0]
CMP qword ptr [RDI + 0x8],RAX
JZ 0x00129e40
SUB RSP,0x8
CALL 0x00127af0
ADD RSP,0x8
LEA RAX,[RAX + 0x10]
RET
MOV RDI,qword ptr [RDI + 0x18]
LEA RAX,[RDI + 0x10]
RET
(translation_unit "byte * FUN_00129e10(byte *param_1)\n\n{\n  long lVar1;\n  \n  if ((*param_1 & 1) == 0) {\n    return param_1 + 0x10;\n  }\n  if (*(long *)(param_1 + 8) != DAT_0016eee0) {\n    lVar1 = FUN_00127af0();\n    return (byte *)(lVar1 + 0x10);\n  }\n  return (byte *)(*(long *)(param_1 + 0x18) + 0x10);\n}\n\n" (function_definition "byte * FUN_00129e10(byte *param_1)\n\n{\n  long lVar1;\n  \n  if ((*param_1 & 1) == 0) {\n    return param_1 + 0x10;\n  }\n  if (*(long *)(param_1 + 8) != DAT_0016eee0) {\n    lVar1 = FUN_00127af0();\n    return (byte *)(lVar1 + 0x10);\n  }\n  return (byte *)(*(long *)(param_1 + 0x18) + 0x10);\n}" type_identifier (pointer_declarator "* FUN_00129e10(byte *param_1)" * (function_declarator "FUN_00129e10(byte *param_1)" identifier (parameter_list "(byte *param_1)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  long lVar1;\n  \n  if ((*param_1 & 1) == 0) {\n    return param_1 + 0x10;\n  }\n  if (*(long *)(param_1 + 8) != DAT_0016eee0) {\n    lVar1 = FUN_00127af0();\n    return (byte *)(lVar1 + 0x10);\n  }\n  return (byte *)(*(long *)(param_1 + 0x18) + 0x10);\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (if_statement "if ((*param_1 & 1) == 0) {\n    return param_1 + 0x10;\n  }" if (parenthesized_expression "((*param_1 & 1) == 0)" ( (binary_expression "(*param_1 & 1) == 0" (parenthesized_expression "(*param_1 & 1)" ( (binary_expression "*param_1 & 1" (pointer_expression "*param_1" * identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    return param_1 + 0x10;\n  }" { (return_statement "return param_1 + 0x10;" return (binary_expression "param_1 + 0x10" identifier + number_literal) ;) })) (if_statement "if (*(long *)(param_1 + 8) != DAT_0016eee0) {\n    lVar1 = FUN_00127af0();\n    return (byte *)(lVar1 + 0x10);\n  }" if (parenthesized_expression "(*(long *)(param_1 + 8) != DAT_0016eee0)" ( (binary_expression "*(long *)(param_1 + 8) != DAT_0016eee0" (pointer_expression "*(long *)(param_1 + 8)" * (cast_expression "(long *)(param_1 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) != identifier) )) (compound_statement "{\n    lVar1 = FUN_00127af0();\n    return (byte *)(lVar1 + 0x10);\n  }" { (expression_statement "lVar1 = FUN_00127af0();" (assignment_expression "lVar1 = FUN_00127af0()" identifier = (call_expression "FUN_00127af0()" identifier (argument_list "()" ( )))) ;) (return_statement "return (byte *)(lVar1 + 0x10);" return (cast_expression "(byte *)(lVar1 + 0x10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x10)" ( (binary_expression "lVar1 + 0x10" identifier + number_literal) ))) ;) })) (return_statement "return (byte *)(*(long *)(param_1 + 0x18) + 0x10);" return (cast_expression "(byte *)(*(long *)(param_1 + 0x18) + 0x10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_1 + 0x18) + 0x10)" ( (binary_expression "*(long *)(param_1 + 0x18) + 0x10" (pointer_expression "*(long *)(param_1 + 0x18)" * (cast_expression "(long *)(param_1 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) + number_literal) ))) ;) })))
(translation_unit "expressionS * symbol_get_value_expression(symbolS *s)\n\n{\n  symbolS *psVar1;\n  \n  if (((uint)s->sy_flags & 1) == 0) {\n    return &s->sy_value;\n  }\n  if ((segT)s->bsym != reg_section) {\n    psVar1 = local_symbol_convert((local_symbol *)s);\n    return &psVar1->sy_value;\n  }\n  return &((s->sy_value).X_op_symbol)->sy_value;\n}\n\n" (function_definition "expressionS * symbol_get_value_expression(symbolS *s)\n\n{\n  symbolS *psVar1;\n  \n  if (((uint)s->sy_flags & 1) == 0) {\n    return &s->sy_value;\n  }\n  if ((segT)s->bsym != reg_section) {\n    psVar1 = local_symbol_convert((local_symbol *)s);\n    return &psVar1->sy_value;\n  }\n  return &((s->sy_value).X_op_symbol)->sy_value;\n}" type_identifier (pointer_declarator "* symbol_get_value_expression(symbolS *s)" * (function_declarator "symbol_get_value_expression(symbolS *s)" identifier (parameter_list "(symbolS *s)" ( (parameter_declaration "symbolS *s" type_identifier (pointer_declarator "*s" * identifier)) )))) (compound_statement "{\n  symbolS *psVar1;\n  \n  if (((uint)s->sy_flags & 1) == 0) {\n    return &s->sy_value;\n  }\n  if ((segT)s->bsym != reg_section) {\n    psVar1 = local_symbol_convert((local_symbol *)s);\n    return &psVar1->sy_value;\n  }\n  return &((s->sy_value).X_op_symbol)->sy_value;\n}" { (declaration "symbolS *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (if_statement "if (((uint)s->sy_flags & 1) == 0) {\n    return &s->sy_value;\n  }" if (parenthesized_expression "(((uint)s->sy_flags & 1) == 0)" ( (binary_expression "((uint)s->sy_flags & 1) == 0" (parenthesized_expression "((uint)s->sy_flags & 1)" ( (binary_expression "(uint)s->sy_flags & 1" (cast_expression "(uint)s->sy_flags" ( (type_descriptor "uint" type_identifier) ) (field_expression "s->sy_flags" identifier -> field_identifier)) & number_literal) )) == number_literal) )) (compound_statement "{\n    return &s->sy_value;\n  }" { (return_statement "return &s->sy_value;" return (pointer_expression "&s->sy_value" & (field_expression "s->sy_value" identifier -> field_identifier)) ;) })) (if_statement "if ((segT)s->bsym != reg_section) {\n    psVar1 = local_symbol_convert((local_symbol *)s);\n    return &psVar1->sy_value;\n  }" if (parenthesized_expression "((segT)s->bsym != reg_section)" ( (binary_expression "(segT)s->bsym != reg_section" (cast_expression "(segT)s->bsym" ( (type_descriptor "segT" type_identifier) ) (field_expression "s->bsym" identifier -> field_identifier)) != identifier) )) (compound_statement "{\n    psVar1 = local_symbol_convert((local_symbol *)s);\n    return &psVar1->sy_value;\n  }" { (expression_statement "psVar1 = local_symbol_convert((local_symbol *)s);" (assignment_expression "psVar1 = local_symbol_convert((local_symbol *)s)" identifier = (call_expression "local_symbol_convert((local_symbol *)s)" identifier (argument_list "((local_symbol *)s)" ( (cast_expression "(local_symbol *)s" ( (type_descriptor "local_symbol *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (return_statement "return &psVar1->sy_value;" return (pointer_expression "&psVar1->sy_value" & (field_expression "psVar1->sy_value" identifier -> field_identifier)) ;) })) (return_statement "return &((s->sy_value).X_op_symbol)->sy_value;" return (pointer_expression "&((s->sy_value).X_op_symbol)->sy_value" & (field_expression "((s->sy_value).X_op_symbol)->sy_value" (parenthesized_expression "((s->sy_value).X_op_symbol)" ( (field_expression "(s->sy_value).X_op_symbol" (parenthesized_expression "(s->sy_value)" ( (field_expression "s->sy_value" identifier -> field_identifier) )) . field_identifier) )) -> field_identifier)) ;) })))
(translation_unit "byte * FUN_00129e10(byte *param_1)\n\n{\n  long lVar1;\n  \n  if ((*param_1 & 1) == 0) {\n    return param_1 + 0x10;\n  }\n  if (*(long *)(param_1 + 8) != DAT_0016eee0) {\n    lVar1 = FUN_00127af0();\n    return (byte *)(lVar1 + 0x10);\n  }\n  return (byte *)(*(long *)(param_1 + 0x18) + 0x10);\n}\n\n" (function_definition "byte * FUN_00129e10(byte *param_1)\n\n{\n  long lVar1;\n  \n  if ((*param_1 & 1) == 0) {\n    return param_1 + 0x10;\n  }\n  if (*(long *)(param_1 + 8) != DAT_0016eee0) {\n    lVar1 = FUN_00127af0();\n    return (byte *)(lVar1 + 0x10);\n  }\n  return (byte *)(*(long *)(param_1 + 0x18) + 0x10);\n}" type_identifier (pointer_declarator "* FUN_00129e10(byte *param_1)" * (function_declarator "FUN_00129e10(byte *param_1)" identifier (parameter_list "(byte *param_1)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  long lVar1;\n  \n  if ((*param_1 & 1) == 0) {\n    return param_1 + 0x10;\n  }\n  if (*(long *)(param_1 + 8) != DAT_0016eee0) {\n    lVar1 = FUN_00127af0();\n    return (byte *)(lVar1 + 0x10);\n  }\n  return (byte *)(*(long *)(param_1 + 0x18) + 0x10);\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (if_statement "if ((*param_1 & 1) == 0) {\n    return param_1 + 0x10;\n  }" if (parenthesized_expression "((*param_1 & 1) == 0)" ( (binary_expression "(*param_1 & 1) == 0" (parenthesized_expression "(*param_1 & 1)" ( (binary_expression "*param_1 & 1" (pointer_expression "*param_1" * identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    return param_1 + 0x10;\n  }" { (return_statement "return param_1 + 0x10;" return (binary_expression "param_1 + 0x10" identifier + number_literal) ;) })) (if_statement "if (*(long *)(param_1 + 8) != DAT_0016eee0) {\n    lVar1 = FUN_00127af0();\n    return (byte *)(lVar1 + 0x10);\n  }" if (parenthesized_expression "(*(long *)(param_1 + 8) != DAT_0016eee0)" ( (binary_expression "*(long *)(param_1 + 8) != DAT_0016eee0" (pointer_expression "*(long *)(param_1 + 8)" * (cast_expression "(long *)(param_1 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) != identifier) )) (compound_statement "{\n    lVar1 = FUN_00127af0();\n    return (byte *)(lVar1 + 0x10);\n  }" { (expression_statement "lVar1 = FUN_00127af0();" (assignment_expression "lVar1 = FUN_00127af0()" identifier = (call_expression "FUN_00127af0()" identifier (argument_list "()" ( )))) ;) (return_statement "return (byte *)(lVar1 + 0x10);" return (cast_expression "(byte *)(lVar1 + 0x10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + 0x10)" ( (binary_expression "lVar1 + 0x10" identifier + number_literal) ))) ;) })) (return_statement "return (byte *)(*(long *)(param_1 + 0x18) + 0x10);" return (cast_expression "(byte *)(*(long *)(param_1 + 0x18) + 0x10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_1 + 0x18) + 0x10)" ( (binary_expression "*(long *)(param_1 + 0x18) + 0x10" (pointer_expression "*(long *)(param_1 + 0x18)" * (cast_expression "(long *)(param_1 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) + number_literal) ))) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) & LIT) )) == LIT) )) (compound_statement { (return_statement return (binary_expression IDENT + LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) ;) })) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))) ;) })))
(function_definition "byte * FUN_00129e10(byte *param_1)\n\n{\n  long lVar1;\n  \n  if ((*param_1 & 1) == 0) {\n    return param_1 + 0x10;\n  }\n  if (*(long *)(param_1 + 8) != DAT_0016eee0) {\n    lVar1 = FUN_00127af0();\n    return (byte *)(lVar1 + 0x10);\n  }\n  return (byte *)(*(long *)(param_1 + 0x18) + 0x10);\n}" (type_identifier "byte") (pointer_declarator "* FUN_00129e10(byte *param_1)" (* "*") (function_declarator "FUN_00129e10(byte *param_1)" (identifier "FUN_00129e10") (parameter_list "(byte *param_1)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")")))) (compound_statement "{\n  long lVar1;\n  \n  if ((*param_1 & 1) == 0) {\n    return param_1 + 0x10;\n  }\n  if (*(long *)(param_1 + 8) != DAT_0016eee0) {\n    lVar1 = FUN_00127af0();\n    return (byte *)(lVar1 + 0x10);\n  }\n  return (byte *)(*(long *)(param_1 + 0x18) + 0x10);\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (if_statement "if ((*param_1 & 1) == 0) {\n    return param_1 + 0x10;\n  }" (if "if") (parenthesized_expression "((*param_1 & 1) == 0)" (( "(") (binary_expression "(*param_1 & 1) == 0" (parenthesized_expression "(*param_1 & 1)" (( "(") (binary_expression "*param_1 & 1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return param_1 + 0x10;\n  }" ({ "{") (return_statement "return param_1 + 0x10;" (return "return") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) (; ";")) (} "}"))) (if_statement "if (*(long *)(param_1 + 8) != DAT_0016eee0) {\n    lVar1 = FUN_00127af0();\n    return (byte *)(lVar1 + 0x10);\n  }" (if "if") (parenthesized_expression "(*(long *)(param_1 + 8) != DAT_0016eee0)" (( "(") (binary_expression "*(long *)(param_1 + 8) != DAT_0016eee0" (pointer_expression "*(long *)(param_1 + 8)" (* "*") (cast_expression "(long *)(param_1 + 8)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (!= "!=") (identifier "DAT_0016eee0")) () ")")) (compound_statement "{\n    lVar1 = FUN_00127af0();\n    return (byte *)(lVar1 + 0x10);\n  }" ({ "{") (expression_statement "lVar1 = FUN_00127af0();" (assignment_expression "lVar1 = FUN_00127af0()" (identifier "lVar1") (= "=") (call_expression "FUN_00127af0()" (identifier "FUN_00127af0") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return (byte *)(lVar1 + 0x10);" (return "return") (cast_expression "(byte *)(lVar1 + 0x10)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + 0x10)" (( "(") (binary_expression "lVar1 + 0x10" (identifier "lVar1") (+ "+") (number_literal "0x10")) () ")"))) (; ";")) (} "}"))) (return_statement "return (byte *)(*(long *)(param_1 + 0x18) + 0x10);" (return "return") (cast_expression "(byte *)(*(long *)(param_1 + 0x18) + 0x10)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(long *)(param_1 + 0x18) + 0x10)" (( "(") (binary_expression "*(long *)(param_1 + 0x18) + 0x10" (pointer_expression "*(long *)(param_1 + 0x18)" (* "*") (cast_expression "(long *)(param_1 + 0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (+ "+") (number_literal "0x10")) () ")"))) (; ";")) (} "}")))

type_1 * function_1(type_2 *s)

{
  type_2 *psVar1;
  
  if (((type_3)s->sy_flags & 1) == 0) {
    return &s->sy_value;
  }
  if ((type_4)s->bsym != var_1) {
    psVar1 = var_2((type_5 *)s);
    return &psVar1->sy_value;
  }
  return &((s->sy_value).X_op_symbol)->sy_value;
}


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

byte * MASKED(byte *param_1)

{
  long lVar1;
  
  if ((*param_1 & 1) == 0) {
    return param_1 + 0x10;
  }
  if (*(long *)(param_1 + 8) != DAT_0016eee0) {
    lVar1 = FUN_00127af0();
    return (byte *)(lVar1 + 0x10);
  }
  return (byte *)(*(long *)(param_1 + 0x18) + 0x10);
}

