
u32 serialGet(uchar *buf,u32 serial_type,Mem *pMem)

{
  double dVar1;
  double dVar2;
  undefined *puVar3;
  u16 uVar5;
  u32 uVar4;
  int iVar6;
  undefined4 uVar7;
  u64 x;
  
  puVar3 = PTR___stack_chk_guard_00190e24;
  uVar7 = *(undefined4 *)(buf + 4);
  dVar2 = *(double *)buf;
  dVar1 = *(double *)buf;
  iVar6 = *(int *)PTR___stack_chk_guard_00190e24;
  if (serial_type == 6) {
    (pMem->u).nZero = *(int *)buf;
    *(undefined4 *)((int)&pMem->u + 4) = uVar7;
    pMem->flags = 4;
  }
  else {
    (pMem->u).nZero = *(int *)buf;
    *(undefined4 *)((int)&pMem->u + 4) = uVar7;
    uVar5 = 1;
    if (!NAN(dVar1) && !NAN(dVar2)) {
      uVar5 = 8;
    }
    pMem->flags = uVar5;
  }
  if (iVar6 == *(int *)puVar3) {
    return 8;
  }
  uVar4 = (*(code *)PTR___stack_chk_fail_00190df8)();
  return uVar4;
}



uint FUN_000490a4(double *param_1,int param_2,uint *param_3)

{
  double dVar1;
  double dVar2;
  undefined2 uVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  uint uVar7;
  undefined *puVar8;
  
  puVar8 = PTR___stack_chk_guard_00190e24;
  uVar5 = *(uint *)param_1;
  uVar7 = *(uint *)((int)param_1 + 4);
  dVar2 = *param_1;
  dVar1 = *param_1;
  uVar6 = *(uint *)PTR___stack_chk_guard_00190e24;
  if (param_2 == 6) {
    *param_3 = uVar5;
    param_3[1] = uVar7;
    *(undefined2 *)(param_3 + 2) = 4;
  }
  else {
    *param_3 = uVar5;
    param_3[1] = uVar7;
    uVar3 = 1;
    if (!NAN(dVar1) && !NAN(dVar2)) {
      uVar3 = 8;
    }
    *(undefined2 *)(param_3 + 2) = uVar3;
  }
  if (uVar6 == *(uint *)puVar8) {
    return 8;
  }
  puVar8 = PTR___stack_chk_fail_00190df8;
  (*(code *)PTR___stack_chk_fail_00190df8)();
  if (uVar5 < 0xc) {
                    /* WARNING: Could not recover jumptable at 0x00049188. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +
                                0x14f7c4))();
    return uVar6;
  }
  param_3[4] = uVar6;
  iVar4 = *(int *)(puVar8 + 0x147800);
  uVar6 = uVar5 - 0xc >> 1;
  param_3[3] = uVar6;
  *(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c);
  return uVar6;
}


lui gp,0x15
addiu gp,gp,-0x784
addu gp,gp,t9
addiu sp,sp,-0x30
lw a3,-0x7afc(gp)
li t0,0x6
sw gp,0x10(sp)
sw ra,0x2c(sp)
lwl t1,0x0(a0)
lwl t2,0x4(a0)
lwr t1,0x3(a0)
lwr t2,0x7(a0)
or v0,t1,zero
lw t1,0x0(a3)
sw t2,0x1c(sp)
sw v0,0x18(sp)
sw t1,0x24(sp)
bne a1,t0,0x0004911c
_lw a1,0x18(sp)
sw v0,0x0(a2)
li v0,0x4
sw t2,0x4(a2)
sh v0,0x8(a2)
lw a0,0x24(sp)
li v0,0x8
lw v1,0x0(a3)
bne a0,v1,0x00049150
_lw ra,0x2c(sp)
jr ra
_addiu sp,sp,0x30
mtc1 t2,f0
li v1,0x8
lw a0,0x1c(sp)
swl a1,0x0(a2)
swr a1,0x3(a2)
swl a0,0x4(a2)
swr a0,0x7(a2)
mthc1 v0,f0
li v0,0x1
c.un.D f0,f0
movf v0,v1,0x3
b 0x00049100
_sh v0,0x8(a2)
lw t9,-0x7b28(gp)
jalr t9
_nop
(translation_unit "uint FUN_000490a4(double *param_1,int param_2,uint *param_3)\n\n{\n  double dVar1;\n  double dVar2;\n  undefined2 uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  uint uVar7;\n  undefined *puVar8;\n  \n  puVar8 = PTR___stack_chk_guard_00190e24;\n  uVar5 = *(uint *)param_1;\n  uVar7 = *(uint *)((int)param_1 + 4);\n  dVar2 = *param_1;\n  dVar1 = *param_1;\n  uVar6 = *(uint *)PTR___stack_chk_guard_00190e24;\n  if (param_2 == 6) {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    *(undefined2 *)(param_3 + 2) = 4;\n  }\n  else {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }\n  if (uVar6 == *(uint *)puVar8) {\n    return 8;\n  }\n  puVar8 = PTR___stack_chk_fail_00190df8;\n  (*(code *)PTR___stack_chk_fail_00190df8)();\n  if (uVar5 < 0xc) {\n                    /* WARNING: Could not recover jumptable at 0x00049188. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();\n    return uVar6;\n  }\n  param_3[4] = uVar6;\n  iVar4 = *(int *)(puVar8 + 0x147800);\n  uVar6 = uVar5 - 0xc >> 1;\n  param_3[3] = uVar6;\n  *(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c);\n  return uVar6;\n}\n\n" (function_definition "uint FUN_000490a4(double *param_1,int param_2,uint *param_3)\n\n{\n  double dVar1;\n  double dVar2;\n  undefined2 uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  uint uVar7;\n  undefined *puVar8;\n  \n  puVar8 = PTR___stack_chk_guard_00190e24;\n  uVar5 = *(uint *)param_1;\n  uVar7 = *(uint *)((int)param_1 + 4);\n  dVar2 = *param_1;\n  dVar1 = *param_1;\n  uVar6 = *(uint *)PTR___stack_chk_guard_00190e24;\n  if (param_2 == 6) {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    *(undefined2 *)(param_3 + 2) = 4;\n  }\n  else {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }\n  if (uVar6 == *(uint *)puVar8) {\n    return 8;\n  }\n  puVar8 = PTR___stack_chk_fail_00190df8;\n  (*(code *)PTR___stack_chk_fail_00190df8)();\n  if (uVar5 < 0xc) {\n                    /* WARNING: Could not recover jumptable at 0x00049188. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();\n    return uVar6;\n  }\n  param_3[4] = uVar6;\n  iVar4 = *(int *)(puVar8 + 0x147800);\n  uVar6 = uVar5 - 0xc >> 1;\n  param_3[3] = uVar6;\n  *(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c);\n  return uVar6;\n}" type_identifier (function_declarator "FUN_000490a4(double *param_1,int param_2,uint *param_3)" identifier (parameter_list "(double *param_1,int param_2,uint *param_3)" ( (parameter_declaration "double *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  double dVar1;\n  double dVar2;\n  undefined2 uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  uint uVar7;\n  undefined *puVar8;\n  \n  puVar8 = PTR___stack_chk_guard_00190e24;\n  uVar5 = *(uint *)param_1;\n  uVar7 = *(uint *)((int)param_1 + 4);\n  dVar2 = *param_1;\n  dVar1 = *param_1;\n  uVar6 = *(uint *)PTR___stack_chk_guard_00190e24;\n  if (param_2 == 6) {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    *(undefined2 *)(param_3 + 2) = 4;\n  }\n  else {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }\n  if (uVar6 == *(uint *)puVar8) {\n    return 8;\n  }\n  puVar8 = PTR___stack_chk_fail_00190df8;\n  (*(code *)PTR___stack_chk_fail_00190df8)();\n  if (uVar5 < 0xc) {\n                    /* WARNING: Could not recover jumptable at 0x00049188. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();\n    return uVar6;\n  }\n  param_3[4] = uVar6;\n  iVar4 = *(int *)(puVar8 + 0x147800);\n  uVar6 = uVar5 - 0xc >> 1;\n  param_3[3] = uVar6;\n  *(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c);\n  return uVar6;\n}" { (declaration "double dVar1;" primitive_type identifier ;) (declaration "double dVar2;" primitive_type identifier ;) (declaration "undefined2 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "undefined *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (expression_statement "puVar8 = PTR___stack_chk_guard_00190e24;" (assignment_expression "puVar8 = PTR___stack_chk_guard_00190e24" identifier = identifier) ;) (expression_statement "uVar5 = *(uint *)param_1;" (assignment_expression "uVar5 = *(uint *)param_1" identifier = (pointer_expression "*(uint *)param_1" * (cast_expression "(uint *)param_1" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar7 = *(uint *)((int)param_1 + 4);" (assignment_expression "uVar7 = *(uint *)((int)param_1 + 4)" identifier = (pointer_expression "*(uint *)((int)param_1 + 4)" * (cast_expression "(uint *)((int)param_1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 4)" ( (binary_expression "(int)param_1 + 4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "dVar2 = *param_1;" (assignment_expression "dVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "dVar1 = *param_1;" (assignment_expression "dVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar6 = *(uint *)PTR___stack_chk_guard_00190e24;" (assignment_expression "uVar6 = *(uint *)PTR___stack_chk_guard_00190e24" identifier = (pointer_expression "*(uint *)PTR___stack_chk_guard_00190e24" * (cast_expression "(uint *)PTR___stack_chk_guard_00190e24" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (param_2 == 6) {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    *(undefined2 *)(param_3 + 2) = 4;\n  }\n  else {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }" if (parenthesized_expression "(param_2 == 6)" ( (binary_expression "param_2 == 6" identifier == number_literal) )) (compound_statement "{\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    *(undefined2 *)(param_3 + 2) = 4;\n  }" { (expression_statement "*param_3 = uVar5;" (assignment_expression "*param_3 = uVar5" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "param_3[1] = uVar7;" (assignment_expression "param_3[1] = uVar7" (subscript_expression "param_3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined2 *)(param_3 + 2) = 4;" (assignment_expression "*(undefined2 *)(param_3 + 2) = 4" (pointer_expression "*(undefined2 *)(param_3 + 2)" * (cast_expression "(undefined2 *)(param_3 + 2)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 2)" ( (binary_expression "param_3 + 2" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }" else (compound_statement "{\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }" { (expression_statement "*param_3 = uVar5;" (assignment_expression "*param_3 = uVar5" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "param_3[1] = uVar7;" (assignment_expression "param_3[1] = uVar7" (subscript_expression "param_3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (if_statement "if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }" if (parenthesized_expression "(!NAN(dVar1) && !NAN(dVar2))" ( (binary_expression "!NAN(dVar1) && !NAN(dVar2)" (unary_expression "!NAN(dVar1)" ! (call_expression "NAN(dVar1)" identifier (argument_list "(dVar1)" ( identifier )))) && (unary_expression "!NAN(dVar2)" ! (call_expression "NAN(dVar2)" identifier (argument_list "(dVar2)" ( identifier ))))) )) (compound_statement "{\n      uVar3 = 8;\n    }" { (expression_statement "uVar3 = 8;" (assignment_expression "uVar3 = 8" identifier = number_literal) ;) })) (expression_statement "*(undefined2 *)(param_3 + 2) = uVar3;" (assignment_expression "*(undefined2 *)(param_3 + 2) = uVar3" (pointer_expression "*(undefined2 *)(param_3 + 2)" * (cast_expression "(undefined2 *)(param_3 + 2)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 2)" ( (binary_expression "param_3 + 2" identifier + number_literal) )))) = identifier) ;) }))) (if_statement "if (uVar6 == *(uint *)puVar8) {\n    return 8;\n  }" if (parenthesized_expression "(uVar6 == *(uint *)puVar8)" ( (binary_expression "uVar6 == *(uint *)puVar8" identifier == (pointer_expression "*(uint *)puVar8" * (cast_expression "(uint *)puVar8" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return 8;\n  }" { (return_statement "return 8;" return number_literal ;) })) (expression_statement "puVar8 = PTR___stack_chk_fail_00190df8;" (assignment_expression "puVar8 = PTR___stack_chk_fail_00190df8" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00190df8)();" (call_expression "(*(code *)PTR___stack_chk_fail_00190df8)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00190df8)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00190df8" * (cast_expression "(code *)PTR___stack_chk_fail_00190df8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (if_statement "if (uVar5 < 0xc) {\n                    /* WARNING: Could not recover jumptable at 0x00049188. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();\n    return uVar6;\n  }" if (parenthesized_expression "(uVar5 < 0xc)" ( (binary_expression "uVar5 < 0xc" identifier < number_literal) )) (compound_statement "{\n                    /* WARNING: Could not recover jumptable at 0x00049188. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();\n    return uVar6;\n  }" { comment comment (expression_statement "uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();" (assignment_expression "uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))()" identifier = (call_expression "(*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))()" (parenthesized_expression "(*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))" ( (pointer_expression "*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4)" * (cast_expression "(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4)" ( (binary_expression "puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4" (binary_expression "puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4)" identifier + (pointer_expression "*(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4)" * (cast_expression "(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4)" ( (binary_expression "*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4" (binary_expression "*(int *)(puVar8 + 0x147800) + 0x2a78" (pointer_expression "*(int *)(puVar8 + 0x147800)" * (cast_expression "(int *)(puVar8 + 0x147800)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar8 + 0x147800)" ( (binary_expression "puVar8 + 0x147800" identifier + number_literal) )))) + number_literal) + (binary_expression "uVar5 * 4" identifier * number_literal)) ))))) + number_literal) )))) )) (argument_list "()" ( )))) ;) (return_statement "return uVar6;" return identifier ;) })) (expression_statement "param_3[4] = uVar6;" (assignment_expression "param_3[4] = uVar6" (subscript_expression "param_3[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar4 = *(int *)(puVar8 + 0x147800);" (assignment_expression "iVar4 = *(int *)(puVar8 + 0x147800)" identifier = (pointer_expression "*(int *)(puVar8 + 0x147800)" * (cast_expression "(int *)(puVar8 + 0x147800)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar8 + 0x147800)" ( (binary_expression "puVar8 + 0x147800" identifier + number_literal) ))))) ;) (expression_statement "uVar6 = uVar5 - 0xc >> 1;" (assignment_expression "uVar6 = uVar5 - 0xc >> 1" identifier = (binary_expression "uVar5 - 0xc >> 1" (binary_expression "uVar5 - 0xc" identifier - number_literal) >> number_literal)) ;) (expression_statement "param_3[3] = uVar6;" (assignment_expression "param_3[3] = uVar6" (subscript_expression "param_3[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c);" (assignment_expression "*(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c)" (pointer_expression "*(undefined2 *)(param_3 + 2)" * (cast_expression "(undefined2 *)(param_3 + 2)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 2)" ( (binary_expression "param_3 + 2" identifier + number_literal) )))) = (pointer_expression "*(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c)" * (cast_expression "(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uVar5 & 1) * 2 + iVar4 + 0x6a4c)" ( (binary_expression "(uVar5 & 1) * 2 + iVar4 + 0x6a4c" (binary_expression "(uVar5 & 1) * 2 + iVar4" (binary_expression "(uVar5 & 1) * 2" (parenthesized_expression "(uVar5 & 1)" ( (binary_expression "uVar5 & 1" identifier & number_literal) )) * number_literal) + identifier) + number_literal) ))))) ;) (return_statement "return uVar6;" return identifier ;) })))
(translation_unit "u32 serialGet(uchar *buf,u32 serial_type,Mem *pMem)\n\n{\n  double dVar1;\n  double dVar2;\n  undefined *puVar3;\n  u16 uVar5;\n  u32 uVar4;\n  int iVar6;\n  undefined4 uVar7;\n  u64 x;\n  \n  puVar3 = PTR___stack_chk_guard_00190e24;\n  uVar7 = *(undefined4 *)(buf + 4);\n  dVar2 = *(double *)buf;\n  dVar1 = *(double *)buf;\n  iVar6 = *(int *)PTR___stack_chk_guard_00190e24;\n  if (serial_type == 6) {\n    (pMem->u).nZero = *(int *)buf;\n    *(undefined4 *)((int)&pMem->u + 4) = uVar7;\n    pMem->flags = 4;\n  }\n  else {\n    (pMem->u).nZero = *(int *)buf;\n    *(undefined4 *)((int)&pMem->u + 4) = uVar7;\n    uVar5 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar5 = 8;\n    }\n    pMem->flags = uVar5;\n  }\n  if (iVar6 == *(int *)puVar3) {\n    return 8;\n  }\n  uVar4 = (*(code *)PTR___stack_chk_fail_00190df8)();\n  return uVar4;\n}\n\n" (function_definition "u32 serialGet(uchar *buf,u32 serial_type,Mem *pMem)\n\n{\n  double dVar1;\n  double dVar2;\n  undefined *puVar3;\n  u16 uVar5;\n  u32 uVar4;\n  int iVar6;\n  undefined4 uVar7;\n  u64 x;\n  \n  puVar3 = PTR___stack_chk_guard_00190e24;\n  uVar7 = *(undefined4 *)(buf + 4);\n  dVar2 = *(double *)buf;\n  dVar1 = *(double *)buf;\n  iVar6 = *(int *)PTR___stack_chk_guard_00190e24;\n  if (serial_type == 6) {\n    (pMem->u).nZero = *(int *)buf;\n    *(undefined4 *)((int)&pMem->u + 4) = uVar7;\n    pMem->flags = 4;\n  }\n  else {\n    (pMem->u).nZero = *(int *)buf;\n    *(undefined4 *)((int)&pMem->u + 4) = uVar7;\n    uVar5 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar5 = 8;\n    }\n    pMem->flags = uVar5;\n  }\n  if (iVar6 == *(int *)puVar3) {\n    return 8;\n  }\n  uVar4 = (*(code *)PTR___stack_chk_fail_00190df8)();\n  return uVar4;\n}" type_identifier (function_declarator "serialGet(uchar *buf,u32 serial_type,Mem *pMem)" identifier (parameter_list "(uchar *buf,u32 serial_type,Mem *pMem)" ( (parameter_declaration "uchar *buf" type_identifier (pointer_declarator "*buf" * identifier)) , (parameter_declaration "u32 serial_type" type_identifier identifier) , (parameter_declaration "Mem *pMem" type_identifier (pointer_declarator "*pMem" * identifier)) ))) (compound_statement "{\n  double dVar1;\n  double dVar2;\n  undefined *puVar3;\n  u16 uVar5;\n  u32 uVar4;\n  int iVar6;\n  undefined4 uVar7;\n  u64 x;\n  \n  puVar3 = PTR___stack_chk_guard_00190e24;\n  uVar7 = *(undefined4 *)(buf + 4);\n  dVar2 = *(double *)buf;\n  dVar1 = *(double *)buf;\n  iVar6 = *(int *)PTR___stack_chk_guard_00190e24;\n  if (serial_type == 6) {\n    (pMem->u).nZero = *(int *)buf;\n    *(undefined4 *)((int)&pMem->u + 4) = uVar7;\n    pMem->flags = 4;\n  }\n  else {\n    (pMem->u).nZero = *(int *)buf;\n    *(undefined4 *)((int)&pMem->u + 4) = uVar7;\n    uVar5 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar5 = 8;\n    }\n    pMem->flags = uVar5;\n  }\n  if (iVar6 == *(int *)puVar3) {\n    return 8;\n  }\n  uVar4 = (*(code *)PTR___stack_chk_fail_00190df8)();\n  return uVar4;\n}" { (declaration "double dVar1;" primitive_type identifier ;) (declaration "double dVar2;" primitive_type identifier ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "u16 uVar5;" type_identifier identifier ;) (declaration "u32 uVar4;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (declaration "u64 x;" type_identifier identifier ;) (expression_statement "puVar3 = PTR___stack_chk_guard_00190e24;" (assignment_expression "puVar3 = PTR___stack_chk_guard_00190e24" identifier = identifier) ;) (expression_statement "uVar7 = *(undefined4 *)(buf + 4);" (assignment_expression "uVar7 = *(undefined4 *)(buf + 4)" identifier = (pointer_expression "*(undefined4 *)(buf + 4)" * (cast_expression "(undefined4 *)(buf + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(buf + 4)" ( (binary_expression "buf + 4" identifier + number_literal) ))))) ;) (expression_statement "dVar2 = *(double *)buf;" (assignment_expression "dVar2 = *(double *)buf" identifier = (pointer_expression "*(double *)buf" * (cast_expression "(double *)buf" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "dVar1 = *(double *)buf;" (assignment_expression "dVar1 = *(double *)buf" identifier = (pointer_expression "*(double *)buf" * (cast_expression "(double *)buf" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar6 = *(int *)PTR___stack_chk_guard_00190e24;" (assignment_expression "iVar6 = *(int *)PTR___stack_chk_guard_00190e24" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_00190e24" * (cast_expression "(int *)PTR___stack_chk_guard_00190e24" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (serial_type == 6) {\n    (pMem->u).nZero = *(int *)buf;\n    *(undefined4 *)((int)&pMem->u + 4) = uVar7;\n    pMem->flags = 4;\n  }\n  else {\n    (pMem->u).nZero = *(int *)buf;\n    *(undefined4 *)((int)&pMem->u + 4) = uVar7;\n    uVar5 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar5 = 8;\n    }\n    pMem->flags = uVar5;\n  }" if (parenthesized_expression "(serial_type == 6)" ( (binary_expression "serial_type == 6" identifier == number_literal) )) (compound_statement "{\n    (pMem->u).nZero = *(int *)buf;\n    *(undefined4 *)((int)&pMem->u + 4) = uVar7;\n    pMem->flags = 4;\n  }" { (expression_statement "(pMem->u).nZero = *(int *)buf;" (assignment_expression "(pMem->u).nZero = *(int *)buf" (field_expression "(pMem->u).nZero" (parenthesized_expression "(pMem->u)" ( (field_expression "pMem->u" identifier -> field_identifier) )) . field_identifier) = (pointer_expression "*(int *)buf" * (cast_expression "(int *)buf" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(undefined4 *)((int)&pMem->u + 4) = uVar7;" (assignment_expression "*(undefined4 *)((int)&pMem->u + 4) = uVar7" (pointer_expression "*(undefined4 *)((int)&pMem->u + 4)" * (cast_expression "(undefined4 *)((int)&pMem->u + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&pMem->u + 4)" ( (binary_expression "(int)&pMem->u + 4" (cast_expression "(int)&pMem->u" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&pMem->u" & (field_expression "pMem->u" identifier -> field_identifier))) + number_literal) )))) = identifier) ;) (expression_statement "pMem->flags = 4;" (assignment_expression "pMem->flags = 4" (field_expression "pMem->flags" identifier -> field_identifier) = number_literal) ;) }) (else_clause "else {\n    (pMem->u).nZero = *(int *)buf;\n    *(undefined4 *)((int)&pMem->u + 4) = uVar7;\n    uVar5 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar5 = 8;\n    }\n    pMem->flags = uVar5;\n  }" else (compound_statement "{\n    (pMem->u).nZero = *(int *)buf;\n    *(undefined4 *)((int)&pMem->u + 4) = uVar7;\n    uVar5 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar5 = 8;\n    }\n    pMem->flags = uVar5;\n  }" { (expression_statement "(pMem->u).nZero = *(int *)buf;" (assignment_expression "(pMem->u).nZero = *(int *)buf" (field_expression "(pMem->u).nZero" (parenthesized_expression "(pMem->u)" ( (field_expression "pMem->u" identifier -> field_identifier) )) . field_identifier) = (pointer_expression "*(int *)buf" * (cast_expression "(int *)buf" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(undefined4 *)((int)&pMem->u + 4) = uVar7;" (assignment_expression "*(undefined4 *)((int)&pMem->u + 4) = uVar7" (pointer_expression "*(undefined4 *)((int)&pMem->u + 4)" * (cast_expression "(undefined4 *)((int)&pMem->u + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&pMem->u + 4)" ( (binary_expression "(int)&pMem->u + 4" (cast_expression "(int)&pMem->u" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&pMem->u" & (field_expression "pMem->u" identifier -> field_identifier))) + number_literal) )))) = identifier) ;) (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" identifier = number_literal) ;) (if_statement "if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar5 = 8;\n    }" if (parenthesized_expression "(!NAN(dVar1) && !NAN(dVar2))" ( (binary_expression "!NAN(dVar1) && !NAN(dVar2)" (unary_expression "!NAN(dVar1)" ! (call_expression "NAN(dVar1)" identifier (argument_list "(dVar1)" ( identifier )))) && (unary_expression "!NAN(dVar2)" ! (call_expression "NAN(dVar2)" identifier (argument_list "(dVar2)" ( identifier ))))) )) (compound_statement "{\n      uVar5 = 8;\n    }" { (expression_statement "uVar5 = 8;" (assignment_expression "uVar5 = 8" identifier = number_literal) ;) })) (expression_statement "pMem->flags = uVar5;" (assignment_expression "pMem->flags = uVar5" (field_expression "pMem->flags" identifier -> field_identifier) = identifier) ;) }))) (if_statement "if (iVar6 == *(int *)puVar3) {\n    return 8;\n  }" if (parenthesized_expression "(iVar6 == *(int *)puVar3)" ( (binary_expression "iVar6 == *(int *)puVar3" identifier == (pointer_expression "*(int *)puVar3" * (cast_expression "(int *)puVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return 8;\n  }" { (return_statement "return 8;" return number_literal ;) })) (expression_statement "uVar4 = (*(code *)PTR___stack_chk_fail_00190df8)();" (assignment_expression "uVar4 = (*(code *)PTR___stack_chk_fail_00190df8)()" identifier = (call_expression "(*(code *)PTR___stack_chk_fail_00190df8)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00190df8)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00190df8" * (cast_expression "(code *)PTR___stack_chk_fail_00190df8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "uint FUN_000490a4(double *param_1,int param_2,uint *param_3)\n\n{\n  double dVar1;\n  double dVar2;\n  undefined2 uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  uint uVar7;\n  undefined *puVar8;\n  \n  puVar8 = PTR___stack_chk_guard_00190e24;\n  uVar5 = *(uint *)param_1;\n  uVar7 = *(uint *)((int)param_1 + 4);\n  dVar2 = *param_1;\n  dVar1 = *param_1;\n  uVar6 = *(uint *)PTR___stack_chk_guard_00190e24;\n  if (param_2 == 6) {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    *(undefined2 *)(param_3 + 2) = 4;\n  }\n  else {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }\n  if (uVar6 == *(uint *)puVar8) {\n    return 8;\n  }\n  puVar8 = PTR___stack_chk_fail_00190df8;\n  (*(code *)PTR___stack_chk_fail_00190df8)();\n  if (uVar5 < 0xc) {\n                    \n                    \n    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();\n    return uVar6;\n  }\n  param_3[4] = uVar6;\n  iVar4 = *(int *)(puVar8 + 0x147800);\n  uVar6 = uVar5 - 0xc >> 1;\n  param_3[3] = uVar6;\n  *(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c);\n  return uVar6;\n}\n\n" (function_definition "uint FUN_000490a4(double *param_1,int param_2,uint *param_3)\n\n{\n  double dVar1;\n  double dVar2;\n  undefined2 uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  uint uVar7;\n  undefined *puVar8;\n  \n  puVar8 = PTR___stack_chk_guard_00190e24;\n  uVar5 = *(uint *)param_1;\n  uVar7 = *(uint *)((int)param_1 + 4);\n  dVar2 = *param_1;\n  dVar1 = *param_1;\n  uVar6 = *(uint *)PTR___stack_chk_guard_00190e24;\n  if (param_2 == 6) {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    *(undefined2 *)(param_3 + 2) = 4;\n  }\n  else {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }\n  if (uVar6 == *(uint *)puVar8) {\n    return 8;\n  }\n  puVar8 = PTR___stack_chk_fail_00190df8;\n  (*(code *)PTR___stack_chk_fail_00190df8)();\n  if (uVar5 < 0xc) {\n                    \n                    \n    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();\n    return uVar6;\n  }\n  param_3[4] = uVar6;\n  iVar4 = *(int *)(puVar8 + 0x147800);\n  uVar6 = uVar5 - 0xc >> 1;\n  param_3[3] = uVar6;\n  *(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c);\n  return uVar6;\n}" type_identifier (function_declarator "FUN_000490a4(double *param_1,int param_2,uint *param_3)" identifier (parameter_list "(double *param_1,int param_2,uint *param_3)" ( (parameter_declaration "double *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  double dVar1;\n  double dVar2;\n  undefined2 uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  uint uVar7;\n  undefined *puVar8;\n  \n  puVar8 = PTR___stack_chk_guard_00190e24;\n  uVar5 = *(uint *)param_1;\n  uVar7 = *(uint *)((int)param_1 + 4);\n  dVar2 = *param_1;\n  dVar1 = *param_1;\n  uVar6 = *(uint *)PTR___stack_chk_guard_00190e24;\n  if (param_2 == 6) {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    *(undefined2 *)(param_3 + 2) = 4;\n  }\n  else {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }\n  if (uVar6 == *(uint *)puVar8) {\n    return 8;\n  }\n  puVar8 = PTR___stack_chk_fail_00190df8;\n  (*(code *)PTR___stack_chk_fail_00190df8)();\n  if (uVar5 < 0xc) {\n                    \n                    \n    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();\n    return uVar6;\n  }\n  param_3[4] = uVar6;\n  iVar4 = *(int *)(puVar8 + 0x147800);\n  uVar6 = uVar5 - 0xc >> 1;\n  param_3[3] = uVar6;\n  *(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c);\n  return uVar6;\n}" { (declaration "double dVar1;" primitive_type identifier ;) (declaration "double dVar2;" primitive_type identifier ;) (declaration "undefined2 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "undefined *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (expression_statement "puVar8 = PTR___stack_chk_guard_00190e24;" (assignment_expression "puVar8 = PTR___stack_chk_guard_00190e24" identifier = identifier) ;) (expression_statement "uVar5 = *(uint *)param_1;" (assignment_expression "uVar5 = *(uint *)param_1" identifier = (pointer_expression "*(uint *)param_1" * (cast_expression "(uint *)param_1" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar7 = *(uint *)((int)param_1 + 4);" (assignment_expression "uVar7 = *(uint *)((int)param_1 + 4)" identifier = (pointer_expression "*(uint *)((int)param_1 + 4)" * (cast_expression "(uint *)((int)param_1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 4)" ( (binary_expression "(int)param_1 + 4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "dVar2 = *param_1;" (assignment_expression "dVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "dVar1 = *param_1;" (assignment_expression "dVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar6 = *(uint *)PTR___stack_chk_guard_00190e24;" (assignment_expression "uVar6 = *(uint *)PTR___stack_chk_guard_00190e24" identifier = (pointer_expression "*(uint *)PTR___stack_chk_guard_00190e24" * (cast_expression "(uint *)PTR___stack_chk_guard_00190e24" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (param_2 == 6) {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    *(undefined2 *)(param_3 + 2) = 4;\n  }\n  else {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }" if (parenthesized_expression "(param_2 == 6)" ( (binary_expression "param_2 == 6" identifier == number_literal) )) (compound_statement "{\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    *(undefined2 *)(param_3 + 2) = 4;\n  }" { (expression_statement "*param_3 = uVar5;" (assignment_expression "*param_3 = uVar5" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "param_3[1] = uVar7;" (assignment_expression "param_3[1] = uVar7" (subscript_expression "param_3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined2 *)(param_3 + 2) = 4;" (assignment_expression "*(undefined2 *)(param_3 + 2) = 4" (pointer_expression "*(undefined2 *)(param_3 + 2)" * (cast_expression "(undefined2 *)(param_3 + 2)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 2)" ( (binary_expression "param_3 + 2" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }" else (compound_statement "{\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }" { (expression_statement "*param_3 = uVar5;" (assignment_expression "*param_3 = uVar5" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "param_3[1] = uVar7;" (assignment_expression "param_3[1] = uVar7" (subscript_expression "param_3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (if_statement "if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }" if (parenthesized_expression "(!NAN(dVar1) && !NAN(dVar2))" ( (binary_expression "!NAN(dVar1) && !NAN(dVar2)" (unary_expression "!NAN(dVar1)" ! (call_expression "NAN(dVar1)" identifier (argument_list "(dVar1)" ( identifier )))) && (unary_expression "!NAN(dVar2)" ! (call_expression "NAN(dVar2)" identifier (argument_list "(dVar2)" ( identifier ))))) )) (compound_statement "{\n      uVar3 = 8;\n    }" { (expression_statement "uVar3 = 8;" (assignment_expression "uVar3 = 8" identifier = number_literal) ;) })) (expression_statement "*(undefined2 *)(param_3 + 2) = uVar3;" (assignment_expression "*(undefined2 *)(param_3 + 2) = uVar3" (pointer_expression "*(undefined2 *)(param_3 + 2)" * (cast_expression "(undefined2 *)(param_3 + 2)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 2)" ( (binary_expression "param_3 + 2" identifier + number_literal) )))) = identifier) ;) }))) (if_statement "if (uVar6 == *(uint *)puVar8) {\n    return 8;\n  }" if (parenthesized_expression "(uVar6 == *(uint *)puVar8)" ( (binary_expression "uVar6 == *(uint *)puVar8" identifier == (pointer_expression "*(uint *)puVar8" * (cast_expression "(uint *)puVar8" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return 8;\n  }" { (return_statement "return 8;" return number_literal ;) })) (expression_statement "puVar8 = PTR___stack_chk_fail_00190df8;" (assignment_expression "puVar8 = PTR___stack_chk_fail_00190df8" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00190df8)();" (call_expression "(*(code *)PTR___stack_chk_fail_00190df8)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00190df8)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00190df8" * (cast_expression "(code *)PTR___stack_chk_fail_00190df8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (if_statement "if (uVar5 < 0xc) {\n                    \n                    \n    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();\n    return uVar6;\n  }" if (parenthesized_expression "(uVar5 < 0xc)" ( (binary_expression "uVar5 < 0xc" identifier < number_literal) )) (compound_statement "{\n                    \n                    \n    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();\n    return uVar6;\n  }" { (expression_statement "uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();" (assignment_expression "uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))()" identifier = (call_expression "(*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))()" (parenthesized_expression "(*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))" ( (pointer_expression "*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4)" * (cast_expression "(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4)" ( (binary_expression "puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4" (binary_expression "puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4)" identifier + (pointer_expression "*(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4)" * (cast_expression "(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4)" ( (binary_expression "*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4" (binary_expression "*(int *)(puVar8 + 0x147800) + 0x2a78" (pointer_expression "*(int *)(puVar8 + 0x147800)" * (cast_expression "(int *)(puVar8 + 0x147800)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar8 + 0x147800)" ( (binary_expression "puVar8 + 0x147800" identifier + number_literal) )))) + number_literal) + (binary_expression "uVar5 * 4" identifier * number_literal)) ))))) + number_literal) )))) )) (argument_list "()" ( )))) ;) (return_statement "return uVar6;" return identifier ;) })) (expression_statement "param_3[4] = uVar6;" (assignment_expression "param_3[4] = uVar6" (subscript_expression "param_3[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar4 = *(int *)(puVar8 + 0x147800);" (assignment_expression "iVar4 = *(int *)(puVar8 + 0x147800)" identifier = (pointer_expression "*(int *)(puVar8 + 0x147800)" * (cast_expression "(int *)(puVar8 + 0x147800)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar8 + 0x147800)" ( (binary_expression "puVar8 + 0x147800" identifier + number_literal) ))))) ;) (expression_statement "uVar6 = uVar5 - 0xc >> 1;" (assignment_expression "uVar6 = uVar5 - 0xc >> 1" identifier = (binary_expression "uVar5 - 0xc >> 1" (binary_expression "uVar5 - 0xc" identifier - number_literal) >> number_literal)) ;) (expression_statement "param_3[3] = uVar6;" (assignment_expression "param_3[3] = uVar6" (subscript_expression "param_3[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c);" (assignment_expression "*(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c)" (pointer_expression "*(undefined2 *)(param_3 + 2)" * (cast_expression "(undefined2 *)(param_3 + 2)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 2)" ( (binary_expression "param_3 + 2" identifier + number_literal) )))) = (pointer_expression "*(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c)" * (cast_expression "(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uVar5 & 1) * 2 + iVar4 + 0x6a4c)" ( (binary_expression "(uVar5 & 1) * 2 + iVar4 + 0x6a4c" (binary_expression "(uVar5 & 1) * 2 + iVar4" (binary_expression "(uVar5 & 1) * 2" (parenthesized_expression "(uVar5 & 1)" ( (binary_expression "uVar5 & 1" identifier & number_literal) )) * number_literal) + identifier) + number_literal) ))))) ;) (return_statement "return uVar6;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (unary_expression ! (call_expression IDENT (argument_list ( IDENT )))) && (unary_expression ! (call_expression IDENT (argument_list ( IDENT ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) + (binary_expression IDENT * LIT)) ))))) + LIT) )))) )) (argument_list ( )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT - LIT) >> LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) * LIT) + IDENT) + LIT) ))))) ;) (return_statement return IDENT ;) })))
(function_definition "uint FUN_000490a4(double *param_1,int param_2,uint *param_3)\n\n{\n  double dVar1;\n  double dVar2;\n  undefined2 uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  uint uVar7;\n  undefined *puVar8;\n  \n  puVar8 = PTR___stack_chk_guard_00190e24;\n  uVar5 = *(uint *)param_1;\n  uVar7 = *(uint *)((int)param_1 + 4);\n  dVar2 = *param_1;\n  dVar1 = *param_1;\n  uVar6 = *(uint *)PTR___stack_chk_guard_00190e24;\n  if (param_2 == 6) {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    *(undefined2 *)(param_3 + 2) = 4;\n  }\n  else {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }\n  if (uVar6 == *(uint *)puVar8) {\n    return 8;\n  }\n  puVar8 = PTR___stack_chk_fail_00190df8;\n  (*(code *)PTR___stack_chk_fail_00190df8)();\n  if (uVar5 < 0xc) {\n                    \n                    \n    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();\n    return uVar6;\n  }\n  param_3[4] = uVar6;\n  iVar4 = *(int *)(puVar8 + 0x147800);\n  uVar6 = uVar5 - 0xc >> 1;\n  param_3[3] = uVar6;\n  *(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c);\n  return uVar6;\n}" (type_identifier "uint") (function_declarator "FUN_000490a4(double *param_1,int param_2,uint *param_3)" (identifier "FUN_000490a4") (parameter_list "(double *param_1,int param_2,uint *param_3)" (( "(") (parameter_declaration "double *param_1" (primitive_type "double") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "uint *param_3" (type_identifier "uint") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  double dVar1;\n  double dVar2;\n  undefined2 uVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  uint uVar7;\n  undefined *puVar8;\n  \n  puVar8 = PTR___stack_chk_guard_00190e24;\n  uVar5 = *(uint *)param_1;\n  uVar7 = *(uint *)((int)param_1 + 4);\n  dVar2 = *param_1;\n  dVar1 = *param_1;\n  uVar6 = *(uint *)PTR___stack_chk_guard_00190e24;\n  if (param_2 == 6) {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    *(undefined2 *)(param_3 + 2) = 4;\n  }\n  else {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }\n  if (uVar6 == *(uint *)puVar8) {\n    return 8;\n  }\n  puVar8 = PTR___stack_chk_fail_00190df8;\n  (*(code *)PTR___stack_chk_fail_00190df8)();\n  if (uVar5 < 0xc) {\n                    \n                    \n    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();\n    return uVar6;\n  }\n  param_3[4] = uVar6;\n  iVar4 = *(int *)(puVar8 + 0x147800);\n  uVar6 = uVar5 - 0xc >> 1;\n  param_3[3] = uVar6;\n  *(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c);\n  return uVar6;\n}" ({ "{") (declaration "double dVar1;" (primitive_type "double") (identifier "dVar1") (; ";")) (declaration "double dVar2;" (primitive_type "double") (identifier "dVar2") (; ";")) (declaration "undefined2 uVar3;" (type_identifier "undefined2") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "uint uVar7;" (type_identifier "uint") (identifier "uVar7") (; ";")) (declaration "undefined *puVar8;" (type_identifier "undefined") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (expression_statement "puVar8 = PTR___stack_chk_guard_00190e24;" (assignment_expression "puVar8 = PTR___stack_chk_guard_00190e24" (identifier "puVar8") (= "=") (identifier "PTR___stack_chk_guard_00190e24")) (; ";")) (expression_statement "uVar5 = *(uint *)param_1;" (assignment_expression "uVar5 = *(uint *)param_1" (identifier "uVar5") (= "=") (pointer_expression "*(uint *)param_1" (* "*") (cast_expression "(uint *)param_1" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1")))) (; ";")) (expression_statement "uVar7 = *(uint *)((int)param_1 + 4);" (assignment_expression "uVar7 = *(uint *)((int)param_1 + 4)" (identifier "uVar7") (= "=") (pointer_expression "*(uint *)((int)param_1 + 4)" (* "*") (cast_expression "(uint *)((int)param_1 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + 4)" (( "(") (binary_expression "(int)param_1 + 4" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "dVar2 = *param_1;" (assignment_expression "dVar2 = *param_1" (identifier "dVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "dVar1 = *param_1;" (assignment_expression "dVar1 = *param_1" (identifier "dVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar6 = *(uint *)PTR___stack_chk_guard_00190e24;" (assignment_expression "uVar6 = *(uint *)PTR___stack_chk_guard_00190e24" (identifier "uVar6") (= "=") (pointer_expression "*(uint *)PTR___stack_chk_guard_00190e24" (* "*") (cast_expression "(uint *)PTR___stack_chk_guard_00190e24" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_00190e24")))) (; ";")) (if_statement "if (param_2 == 6) {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    *(undefined2 *)(param_3 + 2) = 4;\n  }\n  else {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }" (if "if") (parenthesized_expression "(param_2 == 6)" (( "(") (binary_expression "param_2 == 6" (identifier "param_2") (== "==") (number_literal "6")) () ")")) (compound_statement "{\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    *(undefined2 *)(param_3 + 2) = 4;\n  }" ({ "{") (expression_statement "*param_3 = uVar5;" (assignment_expression "*param_3 = uVar5" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "param_3[1] = uVar7;" (assignment_expression "param_3[1] = uVar7" (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar7")) (; ";")) (expression_statement "*(undefined2 *)(param_3 + 2) = 4;" (assignment_expression "*(undefined2 *)(param_3 + 2) = 4" (pointer_expression "*(undefined2 *)(param_3 + 2)" (* "*") (cast_expression "(undefined2 *)(param_3 + 2)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 2)" (( "(") (binary_expression "param_3 + 2" (identifier "param_3") (+ "+") (number_literal "2")) () ")")))) (= "=") (number_literal "4")) (; ";")) (} "}")) (else_clause "else {\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }" (else "else") (compound_statement "{\n    *param_3 = uVar5;\n    param_3[1] = uVar7;\n    uVar3 = 1;\n    if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }\n    *(undefined2 *)(param_3 + 2) = uVar3;\n  }" ({ "{") (expression_statement "*param_3 = uVar5;" (assignment_expression "*param_3 = uVar5" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "param_3[1] = uVar7;" (assignment_expression "param_3[1] = uVar7" (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar7")) (; ";")) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" (identifier "uVar3") (= "=") (number_literal "1")) (; ";")) (if_statement "if (!NAN(dVar1) && !NAN(dVar2)) {\n      uVar3 = 8;\n    }" (if "if") (parenthesized_expression "(!NAN(dVar1) && !NAN(dVar2))" (( "(") (binary_expression "!NAN(dVar1) && !NAN(dVar2)" (unary_expression "!NAN(dVar1)" (! "!") (call_expression "NAN(dVar1)" (identifier "NAN") (argument_list "(dVar1)" (( "(") (identifier "dVar1") () ")")))) (&& "&&") (unary_expression "!NAN(dVar2)" (! "!") (call_expression "NAN(dVar2)" (identifier "NAN") (argument_list "(dVar2)" (( "(") (identifier "dVar2") () ")"))))) () ")")) (compound_statement "{\n      uVar3 = 8;\n    }" ({ "{") (expression_statement "uVar3 = 8;" (assignment_expression "uVar3 = 8" (identifier "uVar3") (= "=") (number_literal "8")) (; ";")) (} "}"))) (expression_statement "*(undefined2 *)(param_3 + 2) = uVar3;" (assignment_expression "*(undefined2 *)(param_3 + 2) = uVar3" (pointer_expression "*(undefined2 *)(param_3 + 2)" (* "*") (cast_expression "(undefined2 *)(param_3 + 2)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 2)" (( "(") (binary_expression "param_3 + 2" (identifier "param_3") (+ "+") (number_literal "2")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (} "}")))) (if_statement "if (uVar6 == *(uint *)puVar8) {\n    return 8;\n  }" (if "if") (parenthesized_expression "(uVar6 == *(uint *)puVar8)" (( "(") (binary_expression "uVar6 == *(uint *)puVar8" (identifier "uVar6") (== "==") (pointer_expression "*(uint *)puVar8" (* "*") (cast_expression "(uint *)puVar8" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar8")))) () ")")) (compound_statement "{\n    return 8;\n  }" ({ "{") (return_statement "return 8;" (return "return") (number_literal "8") (; ";")) (} "}"))) (expression_statement "puVar8 = PTR___stack_chk_fail_00190df8;" (assignment_expression "puVar8 = PTR___stack_chk_fail_00190df8" (identifier "puVar8") (= "=") (identifier "PTR___stack_chk_fail_00190df8")) (; ";")) (expression_statement "(*(code *)PTR___stack_chk_fail_00190df8)();" (call_expression "(*(code *)PTR___stack_chk_fail_00190df8)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00190df8)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_00190df8" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_00190df8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_00190df8"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (uVar5 < 0xc) {\n                    \n                    \n    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();\n    return uVar6;\n  }" (if "if") (parenthesized_expression "(uVar5 < 0xc)" (( "(") (binary_expression "uVar5 < 0xc" (identifier "uVar5") (< "<") (number_literal "0xc")) () ")")) (compound_statement "{\n                    \n                    \n    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();\n    return uVar6;\n  }" ({ "{") (expression_statement "uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))();" (assignment_expression "uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))()" (identifier "uVar6") (= "=") (call_expression "(*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))()" (parenthesized_expression "(*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4))" (( "(") (pointer_expression "*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4)" (* "*") (cast_expression "(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4)" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4)" (( "(") (binary_expression "puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +\n                                0x14f7c4" (binary_expression "puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4)" (identifier "puVar8") (+ "+") (pointer_expression "*(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4)" (* "*") (cast_expression "(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4)" (( "(") (binary_expression "*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4" (binary_expression "*(int *)(puVar8 + 0x147800) + 0x2a78" (pointer_expression "*(int *)(puVar8 + 0x147800)" (* "*") (cast_expression "(int *)(puVar8 + 0x147800)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar8 + 0x147800)" (( "(") (binary_expression "puVar8 + 0x147800" (identifier "puVar8") (+ "+") (number_literal "0x147800")) () ")")))) (+ "+") (number_literal "0x2a78")) (+ "+") (binary_expression "uVar5 * 4" (identifier "uVar5") (* "*") (number_literal "4"))) () ")"))))) (+ "+") (number_literal "0x14f7c4")) () ")")))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar6;" (return "return") (identifier "uVar6") (; ";")) (} "}"))) (expression_statement "param_3[4] = uVar6;" (assignment_expression "param_3[4] = uVar6" (subscript_expression "param_3[4]" (identifier "param_3") ([ "[") (number_literal "4") (] "]")) (= "=") (identifier "uVar6")) (; ";")) (expression_statement "iVar4 = *(int *)(puVar8 + 0x147800);" (assignment_expression "iVar4 = *(int *)(puVar8 + 0x147800)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(puVar8 + 0x147800)" (* "*") (cast_expression "(int *)(puVar8 + 0x147800)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar8 + 0x147800)" (( "(") (binary_expression "puVar8 + 0x147800" (identifier "puVar8") (+ "+") (number_literal "0x147800")) () ")"))))) (; ";")) (expression_statement "uVar6 = uVar5 - 0xc >> 1;" (assignment_expression "uVar6 = uVar5 - 0xc >> 1" (identifier "uVar6") (= "=") (binary_expression "uVar5 - 0xc >> 1" (binary_expression "uVar5 - 0xc" (identifier "uVar5") (- "-") (number_literal "0xc")) (>> ">>") (number_literal "1"))) (; ";")) (expression_statement "param_3[3] = uVar6;" (assignment_expression "param_3[3] = uVar6" (subscript_expression "param_3[3]" (identifier "param_3") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "uVar6")) (; ";")) (expression_statement "*(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c);" (assignment_expression "*(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c)" (pointer_expression "*(undefined2 *)(param_3 + 2)" (* "*") (cast_expression "(undefined2 *)(param_3 + 2)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 2)" (( "(") (binary_expression "param_3 + 2" (identifier "param_3") (+ "+") (number_literal "2")) () ")")))) (= "=") (pointer_expression "*(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c)" (* "*") (cast_expression "(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((uVar5 & 1) * 2 + iVar4 + 0x6a4c)" (( "(") (binary_expression "(uVar5 & 1) * 2 + iVar4 + 0x6a4c" (binary_expression "(uVar5 & 1) * 2 + iVar4" (binary_expression "(uVar5 & 1) * 2" (parenthesized_expression "(uVar5 & 1)" (( "(") (binary_expression "uVar5 & 1" (identifier "uVar5") (& "&") (number_literal "1")) () ")")) (* "*") (number_literal "2")) (+ "+") (identifier "iVar4")) (+ "+") (number_literal "0x6a4c")) () ")"))))) (; ";")) (return_statement "return uVar6;" (return "return") (identifier "uVar6") (; ";")) (} "}")))

type_1 function_1(type_2 *var_1,type_1 var_2,type_3 *pMem)

{
  double dVar1;
  double dVar2;
  type_4 *puVar3;
  type_5 uVar5;
  type_1 uVar4;
  int var_4;
  type_6 uVar7;
  type_7 x;
  
  puVar3 = PTR___stack_chk_guard_00190e24;
  uVar7 = *(type_6 *)(var_1 + 4);
  dVar2 = *(double *)var_1;
  dVar1 = *(double *)var_1;
  var_4 = *(int *)PTR___stack_chk_guard_00190e24;
  if (var_2 == 6) {
    (pMem->u).nZero = *(int *)var_1;
    *(type_6 *)((int)&pMem->u + 4) = uVar7;
    pMem->flags = 4;
  }
  else {
    (pMem->u).nZero = *(int *)var_1;
    *(type_6 *)((int)&pMem->u + 4) = uVar7;
    uVar5 = 1;
    if (!var_3(dVar1) && !var_3(dVar2)) {
      uVar5 = 8;
    }
    pMem->flags = uVar5;
  }
  if (var_4 == *(int *)puVar3) {
    return 8;
  }
  uVar4 = (*(type_8 *)PTR___stack_chk_fail_00190df8)();
  return uVar4;
}


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

uint MASKED(double *param_1,int param_2,uint *param_3)

{
  double dVar1;
  double dVar2;
  undefined2 uVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  uint uVar7;
  undefined *puVar8;
  
  puVar8 = PTR___stack_chk_guard_00190e24;
  uVar5 = *(uint *)param_1;
  uVar7 = *(uint *)((int)param_1 + 4);
  dVar2 = *param_1;
  dVar1 = *param_1;
  uVar6 = *(uint *)PTR___stack_chk_guard_00190e24;
  if (param_2 == 6) {
    *param_3 = uVar5;
    param_3[1] = uVar7;
    *(undefined2 *)(param_3 + 2) = 4;
  }
  else {
    *param_3 = uVar5;
    param_3[1] = uVar7;
    uVar3 = 1;
    if (!NAN(dVar1) && !NAN(dVar2)) {
      uVar3 = 8;
    }
    *(undefined2 *)(param_3 + 2) = uVar3;
  }
  if (uVar6 == *(uint *)puVar8) {
    return 8;
  }
  puVar8 = PTR___stack_chk_fail_00190df8;
  (*(code *)PTR___stack_chk_fail_00190df8)();
  if (uVar5 < 0xc) {
                    /* WARNING: Could not recover jumptable at 0x00049188. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    uVar6 = (*(code *)(puVar8 + *(int *)(*(int *)(puVar8 + 0x147800) + 0x2a78 + uVar5 * 4) +
                                0x14f7c4))();
    return uVar6;
  }
  param_3[4] = uVar6;
  iVar4 = *(int *)(puVar8 + 0x147800);
  uVar6 = uVar5 - 0xc >> 1;
  param_3[3] = uVar6;
  *(undefined2 *)(param_3 + 2) = *(undefined2 *)((uVar5 & 1) * 2 + iVar4 + 0x6a4c);
  return uVar6;
}

