
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

void ConvertHSVToRGB(double hue,double saturation,double value,double *red,double *green,
                    double *blue)

{
  int iVar1;
  double dVar2;
  double dVar3;
  double dVar4;
  float fVar5;
  int in_GS_OFFSET;
  double dVar6;
  ushort __cw;
  ushort __cwtmp;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (red == (double *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");
  }
  if (green == (double *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");
  }
  if (blue == (double *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");
  }
  dVar6 = (double)DAT_002a7ff8;
  dVar3 = saturation * value;
  dVar4 = value - dVar3;
  dVar6 = (hue * dVar6 - ROUND((hue * dVar6) / dVar6) * dVar6) / (double)DAT_002b4dd4;
  dVar2 = (1.0 - ABS((dVar6 - (ROUND(dVar6 * (double)DAT_0029f124) +
                              ROUND(dVar6 * (double)DAT_0029f124))) - 1.0)) * dVar3;
  dVar6 = floor(dVar6);
  fVar5 = DAT_0029f710;
  switch((int)ROUND(dVar6)) {
  case 0:
    dVar6 = (double)DAT_0029f710;
    *red = (dVar3 + dVar4) * dVar6;
    *green = (dVar2 + dVar4) * dVar6;
    *blue = dVar4 * dVar6;
    break;
  case 1:
    dVar6 = (double)DAT_0029f710;
    *red = (dVar2 + dVar4) * dVar6;
    *green = (dVar3 + dVar4) * dVar6;
    *blue = dVar4 * dVar6;
    break;
  case 2:
    dVar6 = (double)DAT_0029f710;
    *red = dVar4 * dVar6;
    *green = (dVar3 + dVar4) * dVar6;
    *blue = (dVar4 + dVar2) * dVar6;
    break;
  case 3:
    *red = dVar4 * (double)DAT_0029f710;
    dVar2 = dVar2 + dVar4;
    goto LAB_000d2ae4;
  case 4:
    *red = (dVar2 + dVar4) * (double)DAT_0029f710;
    dVar2 = dVar4;
LAB_000d2ae4:
    *green = dVar2 * (double)fVar5;
    *blue = (double)fVar5 * (dVar4 + dVar3);
    break;
  case 5:
    dVar6 = (double)DAT_0029f710;
    *red = (dVar3 + dVar4) * dVar6;
    *green = dVar4 * dVar6;
    *blue = (dVar4 + dVar2) * dVar6;
    break;
  default:
    *red = 0.0;
    *green = 0.0;
    *blue = 0.0;
  }
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void FUN_000d2990(double param_1,double param_2,double param_3,double *param_4,double *param_5,
                 double *param_6)

{
  int iVar1;
  double dVar2;
  float fVar3;
  int in_GS_OFFSET;
  double dVar4;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_4 == (double *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");
  }
  if (param_5 == (double *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");
  }
  if (param_6 == (double *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");
  }
  dVar4 = (double)DAT_002a7ff8;
  param_2 = param_2 * param_3;
  param_3 = param_3 - param_2;
  dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4;
  dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +
                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2;
  dVar4 = floor(dVar4);
  fVar3 = DAT_0029f710;
  switch((int)ROUND(dVar4)) {
  case 0:
    dVar4 = (double)DAT_0029f710;
    *param_4 = (param_2 + param_3) * dVar4;
    *param_5 = (dVar2 + param_3) * dVar4;
    *param_6 = param_3 * dVar4;
    break;
  case 1:
    dVar4 = (double)DAT_0029f710;
    *param_4 = (dVar2 + param_3) * dVar4;
    *param_5 = (param_2 + param_3) * dVar4;
    *param_6 = param_3 * dVar4;
    break;
  case 2:
    dVar4 = (double)DAT_0029f710;
    *param_4 = param_3 * dVar4;
    *param_5 = (param_2 + param_3) * dVar4;
    *param_6 = (param_3 + dVar2) * dVar4;
    break;
  case 3:
    *param_4 = param_3 * (double)DAT_0029f710;
    dVar2 = dVar2 + param_3;
    goto code_r0x000d2ae4;
  case 4:
    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;
    dVar2 = param_3;
code_r0x000d2ae4:
    *param_5 = dVar2 * (double)fVar3;
    *param_6 = (double)fVar3 * (param_3 + param_2);
    break;
  case 5:
    dVar4 = (double)DAT_0029f710;
    *param_4 = (param_2 + param_3) * dVar4;
    *param_5 = param_3 * dVar4;
    *param_6 = (param_3 + dVar2) * dVar4;
    break;
  default:
    *param_4 = 0.0;
    *param_5 = 0.0;
    *param_6 = 0.0;
  }
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0029eab0();
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00038830
ADD EBX,0x306667
SUB ESP,0x4c
MOV ESI,dword ptr [ESP + 0x78]
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x3c],EAX
XOR EAX,EAX
FLD qword ptr [ESP + 0x60]
MOV EBP,dword ptr [ESP + 0x7c]
FLD qword ptr [ESP + 0x68]
MOV EDI,dword ptr [ESP + 0x80]
FLD qword ptr [ESP + 0x70]
TEST ESI,ESI
JZ 0x000d2c1d
TEST EBP,EBP
JZ 0x000d2bf8
TEST EDI,EDI
JZ 0x000d2bd3
FLD dword ptr [EBX + 0xffeceff8]
FMUL ST3
FXCH ST2
FMUL ST1
FSUB ST1,ST0
FXCH
FSTP qword ptr [ESP + 0x10]
FLD ST2
FDIV ST0,ST2
FNSTCW word ptr [ESP + 0x38]
MOVZX EAX,word ptr [ESP + 0x38]
AND EAX,0xf3ff
OR EAX,0x400
MOV word ptr [ESP + 0x3a],AX
FLDCW word ptr [ESP + 0x3a]
FRNDINT
FLDCW word ptr [ESP + 0x38]
FSTP qword ptr [ESP + 0x28]
FLD qword ptr [ESP + 0x28]
FMULP ST2
FXCH ST2
FSUBRP
FDIV dword ptr [EBX + 0xffedbdd4]
FLD ST0
FMUL dword ptr [EBX + 0xffec6124]
FNSTCW word ptr [ESP + 0x38]
MOVZX EAX,word ptr [ESP + 0x38]
AND EAX,0xf3ff
OR EAX,0x400
MOV word ptr [ESP + 0x3a],AX
FLDCW word ptr [ESP + 0x3a]
FRNDINT
FLDCW word ptr [ESP + 0x38]
FSTP qword ptr [ESP + 0x28]
FLD qword ptr [ESP + 0x28]
SUB ESP,0x10
FADD ST0,ST0
FSUBR ST0,ST1
FLD1
FSUB ST1,ST0
FXCH
FABS
FSUBP
FMUL ST2
FXCH ST2
FSTP qword ptr [ESP + 0x18]
FXCH
FSTP qword ptr [ESP + 0x28]
FSTP qword ptr [ESP]
CALL 0x00031230
ADD ESP,0x10
FNSTCW word ptr [ESP + 0x26]
MOVZX EAX,word ptr [ESP + 0x26]
OR AH,0xc
MOV word ptr [ESP + 0x24],AX
FLDCW word ptr [ESP + 0x24]
FISTP dword ptr [ESP + 0x20]
FLDCW word ptr [ESP + 0x26]
MOV EAX,dword ptr [ESP + 0x20]
CMP EAX,0x5
JA 0x000d2bc0
MOV EDX,dword ptr [EBX + EAX*0x4 + 0xffedbbb0]
FLD qword ptr [ESP + 0x8]
FLD qword ptr [ESP + 0x10]
ADD EDX,EBX
JMP EDX
MOV EAX,dword ptr [ESP + 0x3c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x000d2bce
ADD ESP,0x4c
POP EBX
POP ESI
POP EDI
POP EBP
RET
FLDZ
FST qword ptr [ESI]
FST qword ptr [EBP]
FSTP qword ptr [EDI]
JMP 0x000d2af1
CALL 0x0029eab0
FSTP ST0
FSTP ST0
FSTP ST0
LEA EAX,[EBX + 0xffedbd44]
PUSH EAX
LEA EAX,[EBX + 0xffedba15]
PUSH 0x244
PUSH EAX
LEA EAX,[EBX + 0xffecf100]
PUSH EAX
CALL 0x000313d0
FSTP ST0
FSTP ST0
FSTP ST0
LEA EAX,[EBX + 0xffedbd44]
PUSH EAX
LEA EAX,[EBX + 0xffedba15]
PUSH 0x243
PUSH EAX
LEA EAX,[EBX + 0xffedba3d]
PUSH EAX
CALL 0x000313d0
FSTP ST0
FSTP ST0
FSTP ST0
LEA EAX,[EBX + 0xffedbd44]
PUSH EAX
LEA EAX,[EBX + 0xffedba15]
PUSH 0x242
PUSH EAX
LEA EAX,[EBX + 0xffedba26]
PUSH EAX
CALL 0x000313d0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_000d2990(double param_1,double param_2,double param_3,double *param_4,double *param_5,\n                 double *param_6)\n\n{\n  int iVar1;\n  double dVar2;\n  float fVar3;\n  int in_GS_OFFSET;\n  double dVar4;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_4 == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }\n  if (param_5 == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }\n  if (param_6 == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }\n  dVar4 = (double)DAT_002a7ff8;\n  param_2 = param_2 * param_3;\n  param_3 = param_3 - param_2;\n  dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4;\n  dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2;\n  dVar4 = floor(dVar4);\n  fVar3 = DAT_0029f710;\n  switch((int)ROUND(dVar4)) {\n  case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;\n  case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;\n  case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_000d2990(double param_1,double param_2,double param_3,double *param_4,double *param_5,\n                 double *param_6)\n\n{\n  int iVar1;\n  double dVar2;\n  float fVar3;\n  int in_GS_OFFSET;\n  double dVar4;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_4 == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }\n  if (param_5 == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }\n  if (param_6 == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }\n  dVar4 = (double)DAT_002a7ff8;\n  param_2 = param_2 * param_3;\n  param_3 = param_3 - param_2;\n  dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4;\n  dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2;\n  dVar4 = floor(dVar4);\n  fVar3 = DAT_0029f710;\n  switch((int)ROUND(dVar4)) {\n  case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;\n  case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;\n  case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000d2990(double param_1,double param_2,double param_3,double *param_4,double *param_5,\n                 double *param_6)" identifier (parameter_list "(double param_1,double param_2,double param_3,double *param_4,double *param_5,\n                 double *param_6)" ( (parameter_declaration "double param_1" primitive_type identifier) , (parameter_declaration "double param_2" primitive_type identifier) , (parameter_declaration "double param_3" primitive_type identifier) , (parameter_declaration "double *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "double *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "double *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  double dVar2;\n  float fVar3;\n  int in_GS_OFFSET;\n  double dVar4;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_4 == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }\n  if (param_5 == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }\n  if (param_6 == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }\n  dVar4 = (double)DAT_002a7ff8;\n  param_2 = param_2 * param_3;\n  param_3 = param_3 - param_2;\n  dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4;\n  dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2;\n  dVar4 = floor(dVar4);\n  fVar3 = DAT_0029f710;\n  switch((int)ROUND(dVar4)) {\n  case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;\n  case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;\n  case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "double dVar2;" primitive_type identifier ;) (declaration "float fVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "double dVar4;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_4 == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }" if (parenthesized_expression "(param_4 == (double *)0x0)" ( (binary_expression "param_4 == (double *)0x0" identifier == (cast_expression "(double *)0x0" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }" { comment (expression_statement "__assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");" (call_expression "__assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB")" identifier (argument_list "("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB")" ( (string_literal ""red != (double *) NULL"" " string_content ") , (string_literal ""MagickCore/gem.c"" " string_content ") , number_literal , (string_literal ""ConvertHSVToRGB"" " string_content ") ))) ;) })) (if_statement "if (param_5 == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }" if (parenthesized_expression "(param_5 == (double *)0x0)" ( (binary_expression "param_5 == (double *)0x0" identifier == (cast_expression "(double *)0x0" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }" { comment (expression_statement "__assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");" (call_expression "__assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB")" identifier (argument_list "("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB")" ( (string_literal ""green != (double *) NULL"" " string_content ") , (string_literal ""MagickCore/gem.c"" " string_content ") , number_literal , (string_literal ""ConvertHSVToRGB"" " string_content ") ))) ;) })) (if_statement "if (param_6 == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }" if (parenthesized_expression "(param_6 == (double *)0x0)" ( (binary_expression "param_6 == (double *)0x0" identifier == (cast_expression "(double *)0x0" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }" { comment (expression_statement "__assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");" (call_expression "__assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB")" identifier (argument_list "("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB")" ( (string_literal ""blue != (double *) NULL"" " string_content ") , (string_literal ""MagickCore/gem.c"" " string_content ") , number_literal , (string_literal ""ConvertHSVToRGB"" " string_content ") ))) ;) })) (expression_statement "dVar4 = (double)DAT_002a7ff8;" (assignment_expression "dVar4 = (double)DAT_002a7ff8" identifier = (cast_expression "(double)DAT_002a7ff8" ( (type_descriptor "double" primitive_type) ) identifier)) ;) (expression_statement "param_2 = param_2 * param_3;" (assignment_expression "param_2 = param_2 * param_3" identifier = (binary_expression "param_2 * param_3" identifier * identifier)) ;) (expression_statement "param_3 = param_3 - param_2;" (assignment_expression "param_3 = param_3 - param_2" identifier = (binary_expression "param_3 - param_2" identifier - identifier)) ;) (expression_statement "dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4;" (assignment_expression "dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4" identifier = (binary_expression "(param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4" (parenthesized_expression "(param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4)" ( (binary_expression "param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4" (binary_expression "param_1 * dVar4" identifier * identifier) - (binary_expression "ROUND((param_1 * dVar4) / dVar4) * dVar4" (call_expression "ROUND((param_1 * dVar4) / dVar4)" identifier (argument_list "((param_1 * dVar4) / dVar4)" ( (binary_expression "(param_1 * dVar4) / dVar4" (parenthesized_expression "(param_1 * dVar4)" ( (binary_expression "param_1 * dVar4" identifier * identifier) )) / identifier) ))) * identifier)) )) / (cast_expression "(double)DAT_002b4dd4" ( (type_descriptor "double" primitive_type) ) identifier))) ;) (expression_statement "dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2;" (assignment_expression "dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2" identifier = (binary_expression "(1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2" (parenthesized_expression "(1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0))" ( (binary_expression "1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)" number_literal - (call_expression "ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)" identifier (argument_list "((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)" ( (binary_expression "(dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0" (parenthesized_expression "(dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124)))" ( (binary_expression "dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))" identifier - (parenthesized_expression "(ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))" ( (binary_expression "ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124)" (call_expression "ROUND(dVar4 * (double)DAT_0029f124)" identifier (argument_list "(dVar4 * (double)DAT_0029f124)" ( (binary_expression "dVar4 * (double)DAT_0029f124" identifier * (cast_expression "(double)DAT_0029f124" ( (type_descriptor "double" primitive_type) ) identifier)) ))) + (call_expression "ROUND(dVar4 * (double)DAT_0029f124)" identifier (argument_list "(dVar4 * (double)DAT_0029f124)" ( (binary_expression "dVar4 * (double)DAT_0029f124" identifier * (cast_expression "(double)DAT_0029f124" ( (type_descriptor "double" primitive_type) ) identifier)) )))) ))) )) - number_literal) )))) )) * identifier)) ;) (expression_statement "dVar4 = floor(dVar4);" (assignment_expression "dVar4 = floor(dVar4)" identifier = (call_expression "floor(dVar4)" identifier (argument_list "(dVar4)" ( identifier )))) ;) (expression_statement "fVar3 = DAT_0029f710;" (assignment_expression "fVar3 = DAT_0029f710" identifier = identifier) ;) (switch_statement "switch((int)ROUND(dVar4)) {\n  case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;\n  case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;\n  case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;\n  }" switch (parenthesized_expression "((int)ROUND(dVar4))" ( (cast_expression "(int)ROUND(dVar4)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND(dVar4)" identifier (argument_list "(dVar4)" ( identifier )))) )) (compound_statement "{\n  case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;\n  case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;\n  case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;\n  }" { (case_statement "case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;" case number_literal : (expression_statement "dVar4 = (double)DAT_0029f710;" (assignment_expression "dVar4 = (double)DAT_0029f710" identifier = (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier)) ;) (expression_statement "*param_4 = (param_2 + param_3) * dVar4;" (assignment_expression "*param_4 = (param_2 + param_3) * dVar4" (pointer_expression "*param_4" * identifier) = (binary_expression "(param_2 + param_3) * dVar4" (parenthesized_expression "(param_2 + param_3)" ( (binary_expression "param_2 + param_3" identifier + identifier) )) * identifier)) ;) (expression_statement "*param_5 = (dVar2 + param_3) * dVar4;" (assignment_expression "*param_5 = (dVar2 + param_3) * dVar4" (pointer_expression "*param_5" * identifier) = (binary_expression "(dVar2 + param_3) * dVar4" (parenthesized_expression "(dVar2 + param_3)" ( (binary_expression "dVar2 + param_3" identifier + identifier) )) * identifier)) ;) (expression_statement "*param_6 = param_3 * dVar4;" (assignment_expression "*param_6 = param_3 * dVar4" (pointer_expression "*param_6" * identifier) = (binary_expression "param_3 * dVar4" identifier * identifier)) ;) (break_statement "break;" break ;)) (case_statement "case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;" case number_literal : (expression_statement "dVar4 = (double)DAT_0029f710;" (assignment_expression "dVar4 = (double)DAT_0029f710" identifier = (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier)) ;) (expression_statement "*param_4 = (dVar2 + param_3) * dVar4;" (assignment_expression "*param_4 = (dVar2 + param_3) * dVar4" (pointer_expression "*param_4" * identifier) = (binary_expression "(dVar2 + param_3) * dVar4" (parenthesized_expression "(dVar2 + param_3)" ( (binary_expression "dVar2 + param_3" identifier + identifier) )) * identifier)) ;) (expression_statement "*param_5 = (param_2 + param_3) * dVar4;" (assignment_expression "*param_5 = (param_2 + param_3) * dVar4" (pointer_expression "*param_5" * identifier) = (binary_expression "(param_2 + param_3) * dVar4" (parenthesized_expression "(param_2 + param_3)" ( (binary_expression "param_2 + param_3" identifier + identifier) )) * identifier)) ;) (expression_statement "*param_6 = param_3 * dVar4;" (assignment_expression "*param_6 = param_3 * dVar4" (pointer_expression "*param_6" * identifier) = (binary_expression "param_3 * dVar4" identifier * identifier)) ;) (break_statement "break;" break ;)) (case_statement "case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;" case number_literal : (expression_statement "dVar4 = (double)DAT_0029f710;" (assignment_expression "dVar4 = (double)DAT_0029f710" identifier = (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier)) ;) (expression_statement "*param_4 = param_3 * dVar4;" (assignment_expression "*param_4 = param_3 * dVar4" (pointer_expression "*param_4" * identifier) = (binary_expression "param_3 * dVar4" identifier * identifier)) ;) (expression_statement "*param_5 = (param_2 + param_3) * dVar4;" (assignment_expression "*param_5 = (param_2 + param_3) * dVar4" (pointer_expression "*param_5" * identifier) = (binary_expression "(param_2 + param_3) * dVar4" (parenthesized_expression "(param_2 + param_3)" ( (binary_expression "param_2 + param_3" identifier + identifier) )) * identifier)) ;) (expression_statement "*param_6 = (param_3 + dVar2) * dVar4;" (assignment_expression "*param_6 = (param_3 + dVar2) * dVar4" (pointer_expression "*param_6" * identifier) = (binary_expression "(param_3 + dVar2) * dVar4" (parenthesized_expression "(param_3 + dVar2)" ( (binary_expression "param_3 + dVar2" identifier + identifier) )) * identifier)) ;) (break_statement "break;" break ;)) (case_statement "case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;" case number_literal : (expression_statement "*param_4 = param_3 * (double)DAT_0029f710;" (assignment_expression "*param_4 = param_3 * (double)DAT_0029f710" (pointer_expression "*param_4" * identifier) = (binary_expression "param_3 * (double)DAT_0029f710" identifier * (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier))) ;) (expression_statement "dVar2 = dVar2 + param_3;" (assignment_expression "dVar2 = dVar2 + param_3" identifier = (binary_expression "dVar2 + param_3" identifier + identifier)) ;) (goto_statement "goto code_r0x000d2ae4;" goto statement_identifier ;)) (case_statement "case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;" case number_literal : (expression_statement "*param_4 = (dVar2 + param_3) * (double)DAT_0029f710;" (assignment_expression "*param_4 = (dVar2 + param_3) * (double)DAT_0029f710" (pointer_expression "*param_4" * identifier) = (binary_expression "(dVar2 + param_3) * (double)DAT_0029f710" (parenthesized_expression "(dVar2 + param_3)" ( (binary_expression "dVar2 + param_3" identifier + identifier) )) * (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier))) ;) (expression_statement "dVar2 = param_3;" (assignment_expression "dVar2 = param_3" identifier = identifier) ;) (labeled_statement "code_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;" statement_identifier : (expression_statement "*param_5 = dVar2 * (double)fVar3;" (assignment_expression "*param_5 = dVar2 * (double)fVar3" (pointer_expression "*param_5" * identifier) = (binary_expression "dVar2 * (double)fVar3" identifier * (cast_expression "(double)fVar3" ( (type_descriptor "double" primitive_type) ) identifier))) ;)) (expression_statement "*param_6 = (double)fVar3 * (param_3 + param_2);" (assignment_expression "*param_6 = (double)fVar3 * (param_3 + param_2)" (pointer_expression "*param_6" * identifier) = (binary_expression "(double)fVar3 * (param_3 + param_2)" (cast_expression "(double)fVar3" ( (type_descriptor "double" primitive_type) ) identifier) * (parenthesized_expression "(param_3 + param_2)" ( (binary_expression "param_3 + param_2" identifier + identifier) )))) ;) (break_statement "break;" break ;)) (case_statement "case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;" case number_literal : (expression_statement "dVar4 = (double)DAT_0029f710;" (assignment_expression "dVar4 = (double)DAT_0029f710" identifier = (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier)) ;) (expression_statement "*param_4 = (param_2 + param_3) * dVar4;" (assignment_expression "*param_4 = (param_2 + param_3) * dVar4" (pointer_expression "*param_4" * identifier) = (binary_expression "(param_2 + param_3) * dVar4" (parenthesized_expression "(param_2 + param_3)" ( (binary_expression "param_2 + param_3" identifier + identifier) )) * identifier)) ;) (expression_statement "*param_5 = param_3 * dVar4;" (assignment_expression "*param_5 = param_3 * dVar4" (pointer_expression "*param_5" * identifier) = (binary_expression "param_3 * dVar4" identifier * identifier)) ;) (expression_statement "*param_6 = (param_3 + dVar2) * dVar4;" (assignment_expression "*param_6 = (param_3 + dVar2) * dVar4" (pointer_expression "*param_6" * identifier) = (binary_expression "(param_3 + dVar2) * dVar4" (parenthesized_expression "(param_3 + dVar2)" ( (binary_expression "param_3 + dVar2" identifier + identifier) )) * identifier)) ;) (break_statement "break;" break ;)) (case_statement "default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;" default : (expression_statement "*param_4 = 0.0;" (assignment_expression "*param_4 = 0.0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (expression_statement "*param_5 = 0.0;" (assignment_expression "*param_5 = 0.0" (pointer_expression "*param_5" * identifier) = number_literal) ;) (expression_statement "*param_6 = 0.0;" (assignment_expression "*param_6 = 0.0" (pointer_expression "*param_6" * identifier) = number_literal) ;)) })) (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }" { comment (expression_statement "FUN_0029eab0();" (call_expression "FUN_0029eab0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid ConvertHSVToRGB(double hue,double saturation,double value,double *red,double *green,\n                    double *blue)\n\n{\n  int iVar1;\n  double dVar2;\n  double dVar3;\n  double dVar4;\n  float fVar5;\n  int in_GS_OFFSET;\n  double dVar6;\n  ushort __cw;\n  ushort __cwtmp;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (red == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }\n  if (green == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }\n  if (blue == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }\n  dVar6 = (double)DAT_002a7ff8;\n  dVar3 = saturation * value;\n  dVar4 = value - dVar3;\n  dVar6 = (hue * dVar6 - ROUND((hue * dVar6) / dVar6) * dVar6) / (double)DAT_002b4dd4;\n  dVar2 = (1.0 - ABS((dVar6 - (ROUND(dVar6 * (double)DAT_0029f124) +\n                              ROUND(dVar6 * (double)DAT_0029f124))) - 1.0)) * dVar3;\n  dVar6 = floor(dVar6);\n  fVar5 = DAT_0029f710;\n  switch((int)ROUND(dVar6)) {\n  case 0:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar3 + dVar4) * dVar6;\n    *green = (dVar2 + dVar4) * dVar6;\n    *blue = dVar4 * dVar6;\n    break;\n  case 1:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar2 + dVar4) * dVar6;\n    *green = (dVar3 + dVar4) * dVar6;\n    *blue = dVar4 * dVar6;\n    break;\n  case 2:\n    dVar6 = (double)DAT_0029f710;\n    *red = dVar4 * dVar6;\n    *green = (dVar3 + dVar4) * dVar6;\n    *blue = (dVar4 + dVar2) * dVar6;\n    break;\n  case 3:\n    *red = dVar4 * (double)DAT_0029f710;\n    dVar2 = dVar2 + dVar4;\n    goto LAB_000d2ae4;\n  case 4:\n    *red = (dVar2 + dVar4) * (double)DAT_0029f710;\n    dVar2 = dVar4;\nLAB_000d2ae4:\n    *green = dVar2 * (double)fVar5;\n    *blue = (double)fVar5 * (dVar4 + dVar3);\n    break;\n  case 5:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar3 + dVar4) * dVar6;\n    *green = dVar4 * dVar6;\n    *blue = (dVar4 + dVar2) * dVar6;\n    break;\n  default:\n    *red = 0.0;\n    *green = 0.0;\n    *blue = 0.0;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}\n\n" comment comment (function_definition "void ConvertHSVToRGB(double hue,double saturation,double value,double *red,double *green,\n                    double *blue)\n\n{\n  int iVar1;\n  double dVar2;\n  double dVar3;\n  double dVar4;\n  float fVar5;\n  int in_GS_OFFSET;\n  double dVar6;\n  ushort __cw;\n  ushort __cwtmp;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (red == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }\n  if (green == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }\n  if (blue == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }\n  dVar6 = (double)DAT_002a7ff8;\n  dVar3 = saturation * value;\n  dVar4 = value - dVar3;\n  dVar6 = (hue * dVar6 - ROUND((hue * dVar6) / dVar6) * dVar6) / (double)DAT_002b4dd4;\n  dVar2 = (1.0 - ABS((dVar6 - (ROUND(dVar6 * (double)DAT_0029f124) +\n                              ROUND(dVar6 * (double)DAT_0029f124))) - 1.0)) * dVar3;\n  dVar6 = floor(dVar6);\n  fVar5 = DAT_0029f710;\n  switch((int)ROUND(dVar6)) {\n  case 0:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar3 + dVar4) * dVar6;\n    *green = (dVar2 + dVar4) * dVar6;\n    *blue = dVar4 * dVar6;\n    break;\n  case 1:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar2 + dVar4) * dVar6;\n    *green = (dVar3 + dVar4) * dVar6;\n    *blue = dVar4 * dVar6;\n    break;\n  case 2:\n    dVar6 = (double)DAT_0029f710;\n    *red = dVar4 * dVar6;\n    *green = (dVar3 + dVar4) * dVar6;\n    *blue = (dVar4 + dVar2) * dVar6;\n    break;\n  case 3:\n    *red = dVar4 * (double)DAT_0029f710;\n    dVar2 = dVar2 + dVar4;\n    goto LAB_000d2ae4;\n  case 4:\n    *red = (dVar2 + dVar4) * (double)DAT_0029f710;\n    dVar2 = dVar4;\nLAB_000d2ae4:\n    *green = dVar2 * (double)fVar5;\n    *blue = (double)fVar5 * (dVar4 + dVar3);\n    break;\n  case 5:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar3 + dVar4) * dVar6;\n    *green = dVar4 * dVar6;\n    *blue = (dVar4 + dVar2) * dVar6;\n    break;\n  default:\n    *red = 0.0;\n    *green = 0.0;\n    *blue = 0.0;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" primitive_type (function_declarator "ConvertHSVToRGB(double hue,double saturation,double value,double *red,double *green,\n                    double *blue)" identifier (parameter_list "(double hue,double saturation,double value,double *red,double *green,\n                    double *blue)" ( (parameter_declaration "double hue" primitive_type identifier) , (parameter_declaration "double saturation" primitive_type identifier) , (parameter_declaration "double value" primitive_type identifier) , (parameter_declaration "double *red" primitive_type (pointer_declarator "*red" * identifier)) , (parameter_declaration "double *green" primitive_type (pointer_declarator "*green" * identifier)) , (parameter_declaration "double *blue" primitive_type (pointer_declarator "*blue" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  double dVar2;\n  double dVar3;\n  double dVar4;\n  float fVar5;\n  int in_GS_OFFSET;\n  double dVar6;\n  ushort __cw;\n  ushort __cwtmp;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (red == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }\n  if (green == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }\n  if (blue == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }\n  dVar6 = (double)DAT_002a7ff8;\n  dVar3 = saturation * value;\n  dVar4 = value - dVar3;\n  dVar6 = (hue * dVar6 - ROUND((hue * dVar6) / dVar6) * dVar6) / (double)DAT_002b4dd4;\n  dVar2 = (1.0 - ABS((dVar6 - (ROUND(dVar6 * (double)DAT_0029f124) +\n                              ROUND(dVar6 * (double)DAT_0029f124))) - 1.0)) * dVar3;\n  dVar6 = floor(dVar6);\n  fVar5 = DAT_0029f710;\n  switch((int)ROUND(dVar6)) {\n  case 0:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar3 + dVar4) * dVar6;\n    *green = (dVar2 + dVar4) * dVar6;\n    *blue = dVar4 * dVar6;\n    break;\n  case 1:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar2 + dVar4) * dVar6;\n    *green = (dVar3 + dVar4) * dVar6;\n    *blue = dVar4 * dVar6;\n    break;\n  case 2:\n    dVar6 = (double)DAT_0029f710;\n    *red = dVar4 * dVar6;\n    *green = (dVar3 + dVar4) * dVar6;\n    *blue = (dVar4 + dVar2) * dVar6;\n    break;\n  case 3:\n    *red = dVar4 * (double)DAT_0029f710;\n    dVar2 = dVar2 + dVar4;\n    goto LAB_000d2ae4;\n  case 4:\n    *red = (dVar2 + dVar4) * (double)DAT_0029f710;\n    dVar2 = dVar4;\nLAB_000d2ae4:\n    *green = dVar2 * (double)fVar5;\n    *blue = (double)fVar5 * (dVar4 + dVar3);\n    break;\n  case 5:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar3 + dVar4) * dVar6;\n    *green = dVar4 * dVar6;\n    *blue = (dVar4 + dVar2) * dVar6;\n    break;\n  default:\n    *red = 0.0;\n    *green = 0.0;\n    *blue = 0.0;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "double dVar2;" primitive_type identifier ;) (declaration "double dVar3;" primitive_type identifier ;) (declaration "double dVar4;" primitive_type identifier ;) (declaration "float fVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "double dVar6;" primitive_type identifier ;) (declaration "ushort __cw;" type_identifier identifier ;) (declaration "ushort __cwtmp;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (red == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }" if (parenthesized_expression "(red == (double *)0x0)" ( (binary_expression "red == (double *)0x0" identifier == (cast_expression "(double *)0x0" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }" { comment (expression_statement "__assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");" (call_expression "__assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB")" identifier (argument_list "("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB")" ( (string_literal ""red != (double *) NULL"" " string_content ") , (string_literal ""MagickCore/gem.c"" " string_content ") , number_literal , (string_literal ""ConvertHSVToRGB"" " string_content ") ))) ;) })) (if_statement "if (green == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }" if (parenthesized_expression "(green == (double *)0x0)" ( (binary_expression "green == (double *)0x0" identifier == (cast_expression "(double *)0x0" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }" { comment (expression_statement "__assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");" (call_expression "__assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB")" identifier (argument_list "("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB")" ( (string_literal ""green != (double *) NULL"" " string_content ") , (string_literal ""MagickCore/gem.c"" " string_content ") , number_literal , (string_literal ""ConvertHSVToRGB"" " string_content ") ))) ;) })) (if_statement "if (blue == (double *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }" if (parenthesized_expression "(blue == (double *)0x0)" ( (binary_expression "blue == (double *)0x0" identifier == (cast_expression "(double *)0x0" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }" { comment (expression_statement "__assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");" (call_expression "__assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB")" identifier (argument_list "("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB")" ( (string_literal ""blue != (double *) NULL"" " string_content ") , (string_literal ""MagickCore/gem.c"" " string_content ") , number_literal , (string_literal ""ConvertHSVToRGB"" " string_content ") ))) ;) })) (expression_statement "dVar6 = (double)DAT_002a7ff8;" (assignment_expression "dVar6 = (double)DAT_002a7ff8" identifier = (cast_expression "(double)DAT_002a7ff8" ( (type_descriptor "double" primitive_type) ) identifier)) ;) (expression_statement "dVar3 = saturation * value;" (assignment_expression "dVar3 = saturation * value" identifier = (binary_expression "saturation * value" identifier * identifier)) ;) (expression_statement "dVar4 = value - dVar3;" (assignment_expression "dVar4 = value - dVar3" identifier = (binary_expression "value - dVar3" identifier - identifier)) ;) (expression_statement "dVar6 = (hue * dVar6 - ROUND((hue * dVar6) / dVar6) * dVar6) / (double)DAT_002b4dd4;" (assignment_expression "dVar6 = (hue * dVar6 - ROUND((hue * dVar6) / dVar6) * dVar6) / (double)DAT_002b4dd4" identifier = (binary_expression "(hue * dVar6 - ROUND((hue * dVar6) / dVar6) * dVar6) / (double)DAT_002b4dd4" (parenthesized_expression "(hue * dVar6 - ROUND((hue * dVar6) / dVar6) * dVar6)" ( (binary_expression "hue * dVar6 - ROUND((hue * dVar6) / dVar6) * dVar6" (binary_expression "hue * dVar6" identifier * identifier) - (binary_expression "ROUND((hue * dVar6) / dVar6) * dVar6" (call_expression "ROUND((hue * dVar6) / dVar6)" identifier (argument_list "((hue * dVar6) / dVar6)" ( (binary_expression "(hue * dVar6) / dVar6" (parenthesized_expression "(hue * dVar6)" ( (binary_expression "hue * dVar6" identifier * identifier) )) / identifier) ))) * identifier)) )) / (cast_expression "(double)DAT_002b4dd4" ( (type_descriptor "double" primitive_type) ) identifier))) ;) (expression_statement "dVar2 = (1.0 - ABS((dVar6 - (ROUND(dVar6 * (double)DAT_0029f124) +\n                              ROUND(dVar6 * (double)DAT_0029f124))) - 1.0)) * dVar3;" (assignment_expression "dVar2 = (1.0 - ABS((dVar6 - (ROUND(dVar6 * (double)DAT_0029f124) +\n                              ROUND(dVar6 * (double)DAT_0029f124))) - 1.0)) * dVar3" identifier = (binary_expression "(1.0 - ABS((dVar6 - (ROUND(dVar6 * (double)DAT_0029f124) +\n                              ROUND(dVar6 * (double)DAT_0029f124))) - 1.0)) * dVar3" (parenthesized_expression "(1.0 - ABS((dVar6 - (ROUND(dVar6 * (double)DAT_0029f124) +\n                              ROUND(dVar6 * (double)DAT_0029f124))) - 1.0))" ( (binary_expression "1.0 - ABS((dVar6 - (ROUND(dVar6 * (double)DAT_0029f124) +\n                              ROUND(dVar6 * (double)DAT_0029f124))) - 1.0)" number_literal - (call_expression "ABS((dVar6 - (ROUND(dVar6 * (double)DAT_0029f124) +\n                              ROUND(dVar6 * (double)DAT_0029f124))) - 1.0)" identifier (argument_list "((dVar6 - (ROUND(dVar6 * (double)DAT_0029f124) +\n                              ROUND(dVar6 * (double)DAT_0029f124))) - 1.0)" ( (binary_expression "(dVar6 - (ROUND(dVar6 * (double)DAT_0029f124) +\n                              ROUND(dVar6 * (double)DAT_0029f124))) - 1.0" (parenthesized_expression "(dVar6 - (ROUND(dVar6 * (double)DAT_0029f124) +\n                              ROUND(dVar6 * (double)DAT_0029f124)))" ( (binary_expression "dVar6 - (ROUND(dVar6 * (double)DAT_0029f124) +\n                              ROUND(dVar6 * (double)DAT_0029f124))" identifier - (parenthesized_expression "(ROUND(dVar6 * (double)DAT_0029f124) +\n                              ROUND(dVar6 * (double)DAT_0029f124))" ( (binary_expression "ROUND(dVar6 * (double)DAT_0029f124) +\n                              ROUND(dVar6 * (double)DAT_0029f124)" (call_expression "ROUND(dVar6 * (double)DAT_0029f124)" identifier (argument_list "(dVar6 * (double)DAT_0029f124)" ( (binary_expression "dVar6 * (double)DAT_0029f124" identifier * (cast_expression "(double)DAT_0029f124" ( (type_descriptor "double" primitive_type) ) identifier)) ))) + (call_expression "ROUND(dVar6 * (double)DAT_0029f124)" identifier (argument_list "(dVar6 * (double)DAT_0029f124)" ( (binary_expression "dVar6 * (double)DAT_0029f124" identifier * (cast_expression "(double)DAT_0029f124" ( (type_descriptor "double" primitive_type) ) identifier)) )))) ))) )) - number_literal) )))) )) * identifier)) ;) (expression_statement "dVar6 = floor(dVar6);" (assignment_expression "dVar6 = floor(dVar6)" identifier = (call_expression "floor(dVar6)" identifier (argument_list "(dVar6)" ( identifier )))) ;) (expression_statement "fVar5 = DAT_0029f710;" (assignment_expression "fVar5 = DAT_0029f710" identifier = identifier) ;) (switch_statement "switch((int)ROUND(dVar6)) {\n  case 0:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar3 + dVar4) * dVar6;\n    *green = (dVar2 + dVar4) * dVar6;\n    *blue = dVar4 * dVar6;\n    break;\n  case 1:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar2 + dVar4) * dVar6;\n    *green = (dVar3 + dVar4) * dVar6;\n    *blue = dVar4 * dVar6;\n    break;\n  case 2:\n    dVar6 = (double)DAT_0029f710;\n    *red = dVar4 * dVar6;\n    *green = (dVar3 + dVar4) * dVar6;\n    *blue = (dVar4 + dVar2) * dVar6;\n    break;\n  case 3:\n    *red = dVar4 * (double)DAT_0029f710;\n    dVar2 = dVar2 + dVar4;\n    goto LAB_000d2ae4;\n  case 4:\n    *red = (dVar2 + dVar4) * (double)DAT_0029f710;\n    dVar2 = dVar4;\nLAB_000d2ae4:\n    *green = dVar2 * (double)fVar5;\n    *blue = (double)fVar5 * (dVar4 + dVar3);\n    break;\n  case 5:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar3 + dVar4) * dVar6;\n    *green = dVar4 * dVar6;\n    *blue = (dVar4 + dVar2) * dVar6;\n    break;\n  default:\n    *red = 0.0;\n    *green = 0.0;\n    *blue = 0.0;\n  }" switch (parenthesized_expression "((int)ROUND(dVar6))" ( (cast_expression "(int)ROUND(dVar6)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND(dVar6)" identifier (argument_list "(dVar6)" ( identifier )))) )) (compound_statement "{\n  case 0:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar3 + dVar4) * dVar6;\n    *green = (dVar2 + dVar4) * dVar6;\n    *blue = dVar4 * dVar6;\n    break;\n  case 1:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar2 + dVar4) * dVar6;\n    *green = (dVar3 + dVar4) * dVar6;\n    *blue = dVar4 * dVar6;\n    break;\n  case 2:\n    dVar6 = (double)DAT_0029f710;\n    *red = dVar4 * dVar6;\n    *green = (dVar3 + dVar4) * dVar6;\n    *blue = (dVar4 + dVar2) * dVar6;\n    break;\n  case 3:\n    *red = dVar4 * (double)DAT_0029f710;\n    dVar2 = dVar2 + dVar4;\n    goto LAB_000d2ae4;\n  case 4:\n    *red = (dVar2 + dVar4) * (double)DAT_0029f710;\n    dVar2 = dVar4;\nLAB_000d2ae4:\n    *green = dVar2 * (double)fVar5;\n    *blue = (double)fVar5 * (dVar4 + dVar3);\n    break;\n  case 5:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar3 + dVar4) * dVar6;\n    *green = dVar4 * dVar6;\n    *blue = (dVar4 + dVar2) * dVar6;\n    break;\n  default:\n    *red = 0.0;\n    *green = 0.0;\n    *blue = 0.0;\n  }" { (case_statement "case 0:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar3 + dVar4) * dVar6;\n    *green = (dVar2 + dVar4) * dVar6;\n    *blue = dVar4 * dVar6;\n    break;" case number_literal : (expression_statement "dVar6 = (double)DAT_0029f710;" (assignment_expression "dVar6 = (double)DAT_0029f710" identifier = (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier)) ;) (expression_statement "*red = (dVar3 + dVar4) * dVar6;" (assignment_expression "*red = (dVar3 + dVar4) * dVar6" (pointer_expression "*red" * identifier) = (binary_expression "(dVar3 + dVar4) * dVar6" (parenthesized_expression "(dVar3 + dVar4)" ( (binary_expression "dVar3 + dVar4" identifier + identifier) )) * identifier)) ;) (expression_statement "*green = (dVar2 + dVar4) * dVar6;" (assignment_expression "*green = (dVar2 + dVar4) * dVar6" (pointer_expression "*green" * identifier) = (binary_expression "(dVar2 + dVar4) * dVar6" (parenthesized_expression "(dVar2 + dVar4)" ( (binary_expression "dVar2 + dVar4" identifier + identifier) )) * identifier)) ;) (expression_statement "*blue = dVar4 * dVar6;" (assignment_expression "*blue = dVar4 * dVar6" (pointer_expression "*blue" * identifier) = (binary_expression "dVar4 * dVar6" identifier * identifier)) ;) (break_statement "break;" break ;)) (case_statement "case 1:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar2 + dVar4) * dVar6;\n    *green = (dVar3 + dVar4) * dVar6;\n    *blue = dVar4 * dVar6;\n    break;" case number_literal : (expression_statement "dVar6 = (double)DAT_0029f710;" (assignment_expression "dVar6 = (double)DAT_0029f710" identifier = (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier)) ;) (expression_statement "*red = (dVar2 + dVar4) * dVar6;" (assignment_expression "*red = (dVar2 + dVar4) * dVar6" (pointer_expression "*red" * identifier) = (binary_expression "(dVar2 + dVar4) * dVar6" (parenthesized_expression "(dVar2 + dVar4)" ( (binary_expression "dVar2 + dVar4" identifier + identifier) )) * identifier)) ;) (expression_statement "*green = (dVar3 + dVar4) * dVar6;" (assignment_expression "*green = (dVar3 + dVar4) * dVar6" (pointer_expression "*green" * identifier) = (binary_expression "(dVar3 + dVar4) * dVar6" (parenthesized_expression "(dVar3 + dVar4)" ( (binary_expression "dVar3 + dVar4" identifier + identifier) )) * identifier)) ;) (expression_statement "*blue = dVar4 * dVar6;" (assignment_expression "*blue = dVar4 * dVar6" (pointer_expression "*blue" * identifier) = (binary_expression "dVar4 * dVar6" identifier * identifier)) ;) (break_statement "break;" break ;)) (case_statement "case 2:\n    dVar6 = (double)DAT_0029f710;\n    *red = dVar4 * dVar6;\n    *green = (dVar3 + dVar4) * dVar6;\n    *blue = (dVar4 + dVar2) * dVar6;\n    break;" case number_literal : (expression_statement "dVar6 = (double)DAT_0029f710;" (assignment_expression "dVar6 = (double)DAT_0029f710" identifier = (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier)) ;) (expression_statement "*red = dVar4 * dVar6;" (assignment_expression "*red = dVar4 * dVar6" (pointer_expression "*red" * identifier) = (binary_expression "dVar4 * dVar6" identifier * identifier)) ;) (expression_statement "*green = (dVar3 + dVar4) * dVar6;" (assignment_expression "*green = (dVar3 + dVar4) * dVar6" (pointer_expression "*green" * identifier) = (binary_expression "(dVar3 + dVar4) * dVar6" (parenthesized_expression "(dVar3 + dVar4)" ( (binary_expression "dVar3 + dVar4" identifier + identifier) )) * identifier)) ;) (expression_statement "*blue = (dVar4 + dVar2) * dVar6;" (assignment_expression "*blue = (dVar4 + dVar2) * dVar6" (pointer_expression "*blue" * identifier) = (binary_expression "(dVar4 + dVar2) * dVar6" (parenthesized_expression "(dVar4 + dVar2)" ( (binary_expression "dVar4 + dVar2" identifier + identifier) )) * identifier)) ;) (break_statement "break;" break ;)) (case_statement "case 3:\n    *red = dVar4 * (double)DAT_0029f710;\n    dVar2 = dVar2 + dVar4;\n    goto LAB_000d2ae4;" case number_literal : (expression_statement "*red = dVar4 * (double)DAT_0029f710;" (assignment_expression "*red = dVar4 * (double)DAT_0029f710" (pointer_expression "*red" * identifier) = (binary_expression "dVar4 * (double)DAT_0029f710" identifier * (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier))) ;) (expression_statement "dVar2 = dVar2 + dVar4;" (assignment_expression "dVar2 = dVar2 + dVar4" identifier = (binary_expression "dVar2 + dVar4" identifier + identifier)) ;) (goto_statement "goto LAB_000d2ae4;" goto statement_identifier ;)) (case_statement "case 4:\n    *red = (dVar2 + dVar4) * (double)DAT_0029f710;\n    dVar2 = dVar4;\nLAB_000d2ae4:\n    *green = dVar2 * (double)fVar5;\n    *blue = (double)fVar5 * (dVar4 + dVar3);\n    break;" case number_literal : (expression_statement "*red = (dVar2 + dVar4) * (double)DAT_0029f710;" (assignment_expression "*red = (dVar2 + dVar4) * (double)DAT_0029f710" (pointer_expression "*red" * identifier) = (binary_expression "(dVar2 + dVar4) * (double)DAT_0029f710" (parenthesized_expression "(dVar2 + dVar4)" ( (binary_expression "dVar2 + dVar4" identifier + identifier) )) * (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier))) ;) (expression_statement "dVar2 = dVar4;" (assignment_expression "dVar2 = dVar4" identifier = identifier) ;) (labeled_statement "LAB_000d2ae4:\n    *green = dVar2 * (double)fVar5;" statement_identifier : (expression_statement "*green = dVar2 * (double)fVar5;" (assignment_expression "*green = dVar2 * (double)fVar5" (pointer_expression "*green" * identifier) = (binary_expression "dVar2 * (double)fVar5" identifier * (cast_expression "(double)fVar5" ( (type_descriptor "double" primitive_type) ) identifier))) ;)) (expression_statement "*blue = (double)fVar5 * (dVar4 + dVar3);" (assignment_expression "*blue = (double)fVar5 * (dVar4 + dVar3)" (pointer_expression "*blue" * identifier) = (binary_expression "(double)fVar5 * (dVar4 + dVar3)" (cast_expression "(double)fVar5" ( (type_descriptor "double" primitive_type) ) identifier) * (parenthesized_expression "(dVar4 + dVar3)" ( (binary_expression "dVar4 + dVar3" identifier + identifier) )))) ;) (break_statement "break;" break ;)) (case_statement "case 5:\n    dVar6 = (double)DAT_0029f710;\n    *red = (dVar3 + dVar4) * dVar6;\n    *green = dVar4 * dVar6;\n    *blue = (dVar4 + dVar2) * dVar6;\n    break;" case number_literal : (expression_statement "dVar6 = (double)DAT_0029f710;" (assignment_expression "dVar6 = (double)DAT_0029f710" identifier = (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier)) ;) (expression_statement "*red = (dVar3 + dVar4) * dVar6;" (assignment_expression "*red = (dVar3 + dVar4) * dVar6" (pointer_expression "*red" * identifier) = (binary_expression "(dVar3 + dVar4) * dVar6" (parenthesized_expression "(dVar3 + dVar4)" ( (binary_expression "dVar3 + dVar4" identifier + identifier) )) * identifier)) ;) (expression_statement "*green = dVar4 * dVar6;" (assignment_expression "*green = dVar4 * dVar6" (pointer_expression "*green" * identifier) = (binary_expression "dVar4 * dVar6" identifier * identifier)) ;) (expression_statement "*blue = (dVar4 + dVar2) * dVar6;" (assignment_expression "*blue = (dVar4 + dVar2) * dVar6" (pointer_expression "*blue" * identifier) = (binary_expression "(dVar4 + dVar2) * dVar6" (parenthesized_expression "(dVar4 + dVar2)" ( (binary_expression "dVar4 + dVar2" identifier + identifier) )) * identifier)) ;) (break_statement "break;" break ;)) (case_statement "default:\n    *red = 0.0;\n    *green = 0.0;\n    *blue = 0.0;" default : (expression_statement "*red = 0.0;" (assignment_expression "*red = 0.0" (pointer_expression "*red" * identifier) = number_literal) ;) (expression_statement "*green = 0.0;" (assignment_expression "*green = 0.0" (pointer_expression "*green" * identifier) = number_literal) ;) (expression_statement "*blue = 0.0;" (assignment_expression "*blue = 0.0" (pointer_expression "*blue" * identifier) = number_literal) ;)) })) (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_000d2990(double param_1,double param_2,double param_3,double *param_4,double *param_5,\n                 double *param_6)\n\n{\n  int iVar1;\n  double dVar2;\n  float fVar3;\n  int in_GS_OFFSET;\n  double dVar4;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_4 == (double *)0x0) {\n                    \n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }\n  if (param_5 == (double *)0x0) {\n                    \n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }\n  if (param_6 == (double *)0x0) {\n                    \n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }\n  dVar4 = (double)DAT_002a7ff8;\n  param_2 = param_2 * param_3;\n  param_3 = param_3 - param_2;\n  dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4;\n  dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2;\n  dVar4 = floor(dVar4);\n  fVar3 = DAT_0029f710;\n  switch((int)ROUND(dVar4)) {\n  case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;\n  case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;\n  case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return;\n}\n\n" (function_definition "void FUN_000d2990(double param_1,double param_2,double param_3,double *param_4,double *param_5,\n                 double *param_6)\n\n{\n  int iVar1;\n  double dVar2;\n  float fVar3;\n  int in_GS_OFFSET;\n  double dVar4;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_4 == (double *)0x0) {\n                    \n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }\n  if (param_5 == (double *)0x0) {\n                    \n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }\n  if (param_6 == (double *)0x0) {\n                    \n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }\n  dVar4 = (double)DAT_002a7ff8;\n  param_2 = param_2 * param_3;\n  param_3 = param_3 - param_2;\n  dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4;\n  dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2;\n  dVar4 = floor(dVar4);\n  fVar3 = DAT_0029f710;\n  switch((int)ROUND(dVar4)) {\n  case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;\n  case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;\n  case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000d2990(double param_1,double param_2,double param_3,double *param_4,double *param_5,\n                 double *param_6)" identifier (parameter_list "(double param_1,double param_2,double param_3,double *param_4,double *param_5,\n                 double *param_6)" ( (parameter_declaration "double param_1" primitive_type identifier) , (parameter_declaration "double param_2" primitive_type identifier) , (parameter_declaration "double param_3" primitive_type identifier) , (parameter_declaration "double *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "double *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "double *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  double dVar2;\n  float fVar3;\n  int in_GS_OFFSET;\n  double dVar4;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_4 == (double *)0x0) {\n                    \n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }\n  if (param_5 == (double *)0x0) {\n                    \n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }\n  if (param_6 == (double *)0x0) {\n                    \n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }\n  dVar4 = (double)DAT_002a7ff8;\n  param_2 = param_2 * param_3;\n  param_3 = param_3 - param_2;\n  dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4;\n  dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2;\n  dVar4 = floor(dVar4);\n  fVar3 = DAT_0029f710;\n  switch((int)ROUND(dVar4)) {\n  case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;\n  case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;\n  case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "double dVar2;" primitive_type identifier ;) (declaration "float fVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "double dVar4;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_4 == (double *)0x0) {\n                    \n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }" if (parenthesized_expression "(param_4 == (double *)0x0)" ( (binary_expression "param_4 == (double *)0x0" identifier == (cast_expression "(double *)0x0" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }" { (expression_statement "__assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");" (call_expression "__assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB")" identifier (argument_list "("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB")" ( (string_literal ""red != (double *) NULL"" " string_content ") , (string_literal ""MagickCore/gem.c"" " string_content ") , number_literal , (string_literal ""ConvertHSVToRGB"" " string_content ") ))) ;) })) (if_statement "if (param_5 == (double *)0x0) {\n                    \n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }" if (parenthesized_expression "(param_5 == (double *)0x0)" ( (binary_expression "param_5 == (double *)0x0" identifier == (cast_expression "(double *)0x0" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }" { (expression_statement "__assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");" (call_expression "__assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB")" identifier (argument_list "("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB")" ( (string_literal ""green != (double *) NULL"" " string_content ") , (string_literal ""MagickCore/gem.c"" " string_content ") , number_literal , (string_literal ""ConvertHSVToRGB"" " string_content ") ))) ;) })) (if_statement "if (param_6 == (double *)0x0) {\n                    \n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }" if (parenthesized_expression "(param_6 == (double *)0x0)" ( (binary_expression "param_6 == (double *)0x0" identifier == (cast_expression "(double *)0x0" ( (type_descriptor "double *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }" { (expression_statement "__assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");" (call_expression "__assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB")" identifier (argument_list "("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB")" ( (string_literal ""blue != (double *) NULL"" " string_content ") , (string_literal ""MagickCore/gem.c"" " string_content ") , number_literal , (string_literal ""ConvertHSVToRGB"" " string_content ") ))) ;) })) (expression_statement "dVar4 = (double)DAT_002a7ff8;" (assignment_expression "dVar4 = (double)DAT_002a7ff8" identifier = (cast_expression "(double)DAT_002a7ff8" ( (type_descriptor "double" primitive_type) ) identifier)) ;) (expression_statement "param_2 = param_2 * param_3;" (assignment_expression "param_2 = param_2 * param_3" identifier = (binary_expression "param_2 * param_3" identifier * identifier)) ;) (expression_statement "param_3 = param_3 - param_2;" (assignment_expression "param_3 = param_3 - param_2" identifier = (binary_expression "param_3 - param_2" identifier - identifier)) ;) (expression_statement "dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4;" (assignment_expression "dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4" identifier = (binary_expression "(param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4" (parenthesized_expression "(param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4)" ( (binary_expression "param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4" (binary_expression "param_1 * dVar4" identifier * identifier) - (binary_expression "ROUND((param_1 * dVar4) / dVar4) * dVar4" (call_expression "ROUND((param_1 * dVar4) / dVar4)" identifier (argument_list "((param_1 * dVar4) / dVar4)" ( (binary_expression "(param_1 * dVar4) / dVar4" (parenthesized_expression "(param_1 * dVar4)" ( (binary_expression "param_1 * dVar4" identifier * identifier) )) / identifier) ))) * identifier)) )) / (cast_expression "(double)DAT_002b4dd4" ( (type_descriptor "double" primitive_type) ) identifier))) ;) (expression_statement "dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2;" (assignment_expression "dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2" identifier = (binary_expression "(1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2" (parenthesized_expression "(1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0))" ( (binary_expression "1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)" number_literal - (call_expression "ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)" identifier (argument_list "((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)" ( (binary_expression "(dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0" (parenthesized_expression "(dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124)))" ( (binary_expression "dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))" identifier - (parenthesized_expression "(ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))" ( (binary_expression "ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124)" (call_expression "ROUND(dVar4 * (double)DAT_0029f124)" identifier (argument_list "(dVar4 * (double)DAT_0029f124)" ( (binary_expression "dVar4 * (double)DAT_0029f124" identifier * (cast_expression "(double)DAT_0029f124" ( (type_descriptor "double" primitive_type) ) identifier)) ))) + (call_expression "ROUND(dVar4 * (double)DAT_0029f124)" identifier (argument_list "(dVar4 * (double)DAT_0029f124)" ( (binary_expression "dVar4 * (double)DAT_0029f124" identifier * (cast_expression "(double)DAT_0029f124" ( (type_descriptor "double" primitive_type) ) identifier)) )))) ))) )) - number_literal) )))) )) * identifier)) ;) (expression_statement "dVar4 = floor(dVar4);" (assignment_expression "dVar4 = floor(dVar4)" identifier = (call_expression "floor(dVar4)" identifier (argument_list "(dVar4)" ( identifier )))) ;) (expression_statement "fVar3 = DAT_0029f710;" (assignment_expression "fVar3 = DAT_0029f710" identifier = identifier) ;) (switch_statement "switch((int)ROUND(dVar4)) {\n  case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;\n  case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;\n  case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;\n  }" switch (parenthesized_expression "((int)ROUND(dVar4))" ( (cast_expression "(int)ROUND(dVar4)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND(dVar4)" identifier (argument_list "(dVar4)" ( identifier )))) )) (compound_statement "{\n  case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;\n  case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;\n  case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;\n  }" { (case_statement "case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;" case number_literal : (expression_statement "dVar4 = (double)DAT_0029f710;" (assignment_expression "dVar4 = (double)DAT_0029f710" identifier = (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier)) ;) (expression_statement "*param_4 = (param_2 + param_3) * dVar4;" (assignment_expression "*param_4 = (param_2 + param_3) * dVar4" (pointer_expression "*param_4" * identifier) = (binary_expression "(param_2 + param_3) * dVar4" (parenthesized_expression "(param_2 + param_3)" ( (binary_expression "param_2 + param_3" identifier + identifier) )) * identifier)) ;) (expression_statement "*param_5 = (dVar2 + param_3) * dVar4;" (assignment_expression "*param_5 = (dVar2 + param_3) * dVar4" (pointer_expression "*param_5" * identifier) = (binary_expression "(dVar2 + param_3) * dVar4" (parenthesized_expression "(dVar2 + param_3)" ( (binary_expression "dVar2 + param_3" identifier + identifier) )) * identifier)) ;) (expression_statement "*param_6 = param_3 * dVar4;" (assignment_expression "*param_6 = param_3 * dVar4" (pointer_expression "*param_6" * identifier) = (binary_expression "param_3 * dVar4" identifier * identifier)) ;) (break_statement "break;" break ;)) (case_statement "case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;" case number_literal : (expression_statement "dVar4 = (double)DAT_0029f710;" (assignment_expression "dVar4 = (double)DAT_0029f710" identifier = (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier)) ;) (expression_statement "*param_4 = (dVar2 + param_3) * dVar4;" (assignment_expression "*param_4 = (dVar2 + param_3) * dVar4" (pointer_expression "*param_4" * identifier) = (binary_expression "(dVar2 + param_3) * dVar4" (parenthesized_expression "(dVar2 + param_3)" ( (binary_expression "dVar2 + param_3" identifier + identifier) )) * identifier)) ;) (expression_statement "*param_5 = (param_2 + param_3) * dVar4;" (assignment_expression "*param_5 = (param_2 + param_3) * dVar4" (pointer_expression "*param_5" * identifier) = (binary_expression "(param_2 + param_3) * dVar4" (parenthesized_expression "(param_2 + param_3)" ( (binary_expression "param_2 + param_3" identifier + identifier) )) * identifier)) ;) (expression_statement "*param_6 = param_3 * dVar4;" (assignment_expression "*param_6 = param_3 * dVar4" (pointer_expression "*param_6" * identifier) = (binary_expression "param_3 * dVar4" identifier * identifier)) ;) (break_statement "break;" break ;)) (case_statement "case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;" case number_literal : (expression_statement "dVar4 = (double)DAT_0029f710;" (assignment_expression "dVar4 = (double)DAT_0029f710" identifier = (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier)) ;) (expression_statement "*param_4 = param_3 * dVar4;" (assignment_expression "*param_4 = param_3 * dVar4" (pointer_expression "*param_4" * identifier) = (binary_expression "param_3 * dVar4" identifier * identifier)) ;) (expression_statement "*param_5 = (param_2 + param_3) * dVar4;" (assignment_expression "*param_5 = (param_2 + param_3) * dVar4" (pointer_expression "*param_5" * identifier) = (binary_expression "(param_2 + param_3) * dVar4" (parenthesized_expression "(param_2 + param_3)" ( (binary_expression "param_2 + param_3" identifier + identifier) )) * identifier)) ;) (expression_statement "*param_6 = (param_3 + dVar2) * dVar4;" (assignment_expression "*param_6 = (param_3 + dVar2) * dVar4" (pointer_expression "*param_6" * identifier) = (binary_expression "(param_3 + dVar2) * dVar4" (parenthesized_expression "(param_3 + dVar2)" ( (binary_expression "param_3 + dVar2" identifier + identifier) )) * identifier)) ;) (break_statement "break;" break ;)) (case_statement "case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;" case number_literal : (expression_statement "*param_4 = param_3 * (double)DAT_0029f710;" (assignment_expression "*param_4 = param_3 * (double)DAT_0029f710" (pointer_expression "*param_4" * identifier) = (binary_expression "param_3 * (double)DAT_0029f710" identifier * (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier))) ;) (expression_statement "dVar2 = dVar2 + param_3;" (assignment_expression "dVar2 = dVar2 + param_3" identifier = (binary_expression "dVar2 + param_3" identifier + identifier)) ;) (goto_statement "goto code_r0x000d2ae4;" goto statement_identifier ;)) (case_statement "case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;" case number_literal : (expression_statement "*param_4 = (dVar2 + param_3) * (double)DAT_0029f710;" (assignment_expression "*param_4 = (dVar2 + param_3) * (double)DAT_0029f710" (pointer_expression "*param_4" * identifier) = (binary_expression "(dVar2 + param_3) * (double)DAT_0029f710" (parenthesized_expression "(dVar2 + param_3)" ( (binary_expression "dVar2 + param_3" identifier + identifier) )) * (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier))) ;) (expression_statement "dVar2 = param_3;" (assignment_expression "dVar2 = param_3" identifier = identifier) ;) (labeled_statement "code_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;" statement_identifier : (expression_statement "*param_5 = dVar2 * (double)fVar3;" (assignment_expression "*param_5 = dVar2 * (double)fVar3" (pointer_expression "*param_5" * identifier) = (binary_expression "dVar2 * (double)fVar3" identifier * (cast_expression "(double)fVar3" ( (type_descriptor "double" primitive_type) ) identifier))) ;)) (expression_statement "*param_6 = (double)fVar3 * (param_3 + param_2);" (assignment_expression "*param_6 = (double)fVar3 * (param_3 + param_2)" (pointer_expression "*param_6" * identifier) = (binary_expression "(double)fVar3 * (param_3 + param_2)" (cast_expression "(double)fVar3" ( (type_descriptor "double" primitive_type) ) identifier) * (parenthesized_expression "(param_3 + param_2)" ( (binary_expression "param_3 + param_2" identifier + identifier) )))) ;) (break_statement "break;" break ;)) (case_statement "case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;" case number_literal : (expression_statement "dVar4 = (double)DAT_0029f710;" (assignment_expression "dVar4 = (double)DAT_0029f710" identifier = (cast_expression "(double)DAT_0029f710" ( (type_descriptor "double" primitive_type) ) identifier)) ;) (expression_statement "*param_4 = (param_2 + param_3) * dVar4;" (assignment_expression "*param_4 = (param_2 + param_3) * dVar4" (pointer_expression "*param_4" * identifier) = (binary_expression "(param_2 + param_3) * dVar4" (parenthesized_expression "(param_2 + param_3)" ( (binary_expression "param_2 + param_3" identifier + identifier) )) * identifier)) ;) (expression_statement "*param_5 = param_3 * dVar4;" (assignment_expression "*param_5 = param_3 * dVar4" (pointer_expression "*param_5" * identifier) = (binary_expression "param_3 * dVar4" identifier * identifier)) ;) (expression_statement "*param_6 = (param_3 + dVar2) * dVar4;" (assignment_expression "*param_6 = (param_3 + dVar2) * dVar4" (pointer_expression "*param_6" * identifier) = (binary_expression "(param_3 + dVar2) * dVar4" (parenthesized_expression "(param_3 + dVar2)" ( (binary_expression "param_3 + dVar2" identifier + identifier) )) * identifier)) ;) (break_statement "break;" break ;)) (case_statement "default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;" default : (expression_statement "*param_4 = 0.0;" (assignment_expression "*param_4 = 0.0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (expression_statement "*param_5 = 0.0;" (assignment_expression "*param_5 = 0.0" (pointer_expression "*param_5" * identifier) = number_literal) ;) (expression_statement "*param_6 = 0.0;" (assignment_expression "*param_6 = 0.0" (pointer_expression "*param_6" * identifier) = number_literal) ;)) })) (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_0029eab0();\n  }" { (expression_statement "FUN_0029eab0();" (call_expression "FUN_0029eab0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT * IDENT) - (binary_expression (call_expression IDENT (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression IDENT * IDENT) )) / IDENT) ))) * IDENT)) )) / (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression LIT - (call_expression IDENT (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression IDENT - (parenthesized_expression ( (binary_expression (call_expression IDENT (argument_list ( (binary_expression IDENT * (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) + (call_expression IDENT (argument_list ( (binary_expression IDENT * (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ))) )) - LIT) )))) )) * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (switch_statement switch (parenthesized_expression ( (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( IDENT )))) )) (compound_statement { (case_statement case LIT : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT * IDENT)) ;) (break_statement break ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT * IDENT)) ;) (break_statement break ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) * IDENT)) ;) (break_statement break ;)) (case_statement case LIT : (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT * (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (goto_statement goto statement_identifier ;)) (case_statement case LIT : (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) * (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT * (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) ;) (break_statement break ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) * IDENT)) ;) (break_statement break ;)) (case_statement default : (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;)) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return ;) })))
(function_definition "void FUN_000d2990(double param_1,double param_2,double param_3,double *param_4,double *param_5,\n                 double *param_6)\n\n{\n  int iVar1;\n  double dVar2;\n  float fVar3;\n  int in_GS_OFFSET;\n  double dVar4;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_4 == (double *)0x0) {\n                    \n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }\n  if (param_5 == (double *)0x0) {\n                    \n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }\n  if (param_6 == (double *)0x0) {\n                    \n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }\n  dVar4 = (double)DAT_002a7ff8;\n  param_2 = param_2 * param_3;\n  param_3 = param_3 - param_2;\n  dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4;\n  dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2;\n  dVar4 = floor(dVar4);\n  fVar3 = DAT_0029f710;\n  switch((int)ROUND(dVar4)) {\n  case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;\n  case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;\n  case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_000d2990(double param_1,double param_2,double param_3,double *param_4,double *param_5,\n                 double *param_6)" (identifier "FUN_000d2990") (parameter_list "(double param_1,double param_2,double param_3,double *param_4,double *param_5,\n                 double *param_6)" (( "(") (parameter_declaration "double param_1" (primitive_type "double") (identifier "param_1")) (, ",") (parameter_declaration "double param_2" (primitive_type "double") (identifier "param_2")) (, ",") (parameter_declaration "double param_3" (primitive_type "double") (identifier "param_3")) (, ",") (parameter_declaration "double *param_4" (primitive_type "double") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "double *param_5" (primitive_type "double") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) (, ",") (parameter_declaration "double *param_6" (primitive_type "double") (pointer_declarator "*param_6" (* "*") (identifier "param_6"))) () ")"))) (compound_statement "{\n  int iVar1;\n  double dVar2;\n  float fVar3;\n  int in_GS_OFFSET;\n  double dVar4;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_4 == (double *)0x0) {\n                    \n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }\n  if (param_5 == (double *)0x0) {\n                    \n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }\n  if (param_6 == (double *)0x0) {\n                    \n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }\n  dVar4 = (double)DAT_002a7ff8;\n  param_2 = param_2 * param_3;\n  param_3 = param_3 - param_2;\n  dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4;\n  dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2;\n  dVar4 = floor(dVar4);\n  fVar3 = DAT_0029f710;\n  switch((int)ROUND(dVar4)) {\n  case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;\n  case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;\n  case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "double dVar2;" (primitive_type "double") (identifier "dVar2") (; ";")) (declaration "float fVar3;" (primitive_type "float") (identifier "fVar3") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "double dVar4;" (primitive_type "double") (identifier "dVar4") (; ";")) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (param_4 == (double *)0x0) {\n                    \n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }" (if "if") (parenthesized_expression "(param_4 == (double *)0x0)" (( "(") (binary_expression "param_4 == (double *)0x0" (identifier "param_4") (== "==") (cast_expression "(double *)0x0" (( "(") (type_descriptor "double *" (primitive_type "double") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");\n  }" ({ "{") (expression_statement "__assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");" (call_expression "__assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB")" (identifier "__assert_fail") (argument_list "("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB")" (( "(") (string_literal ""red != (double *) NULL"" (" """) (string_content "red != (double *) NULL") (" """)) (, ",") (string_literal ""MagickCore/gem.c"" (" """) (string_content "MagickCore/gem.c") (" """)) (, ",") (number_literal "0x242") (, ",") (string_literal ""ConvertHSVToRGB"" (" """) (string_content "ConvertHSVToRGB") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (param_5 == (double *)0x0) {\n                    \n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }" (if "if") (parenthesized_expression "(param_5 == (double *)0x0)" (( "(") (binary_expression "param_5 == (double *)0x0" (identifier "param_5") (== "==") (cast_expression "(double *)0x0" (( "(") (type_descriptor "double *" (primitive_type "double") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");\n  }" ({ "{") (expression_statement "__assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");" (call_expression "__assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB")" (identifier "__assert_fail") (argument_list "("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB")" (( "(") (string_literal ""green != (double *) NULL"" (" """) (string_content "green != (double *) NULL") (" """)) (, ",") (string_literal ""MagickCore/gem.c"" (" """) (string_content "MagickCore/gem.c") (" """)) (, ",") (number_literal "0x243") (, ",") (string_literal ""ConvertHSVToRGB"" (" """) (string_content "ConvertHSVToRGB") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (param_6 == (double *)0x0) {\n                    \n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }" (if "if") (parenthesized_expression "(param_6 == (double *)0x0)" (( "(") (binary_expression "param_6 == (double *)0x0" (identifier "param_6") (== "==") (cast_expression "(double *)0x0" (( "(") (type_descriptor "double *" (primitive_type "double") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");\n  }" ({ "{") (expression_statement "__assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");" (call_expression "__assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB")" (identifier "__assert_fail") (argument_list "("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB")" (( "(") (string_literal ""blue != (double *) NULL"" (" """) (string_content "blue != (double *) NULL") (" """)) (, ",") (string_literal ""MagickCore/gem.c"" (" """) (string_content "MagickCore/gem.c") (" """)) (, ",") (number_literal "0x244") (, ",") (string_literal ""ConvertHSVToRGB"" (" """) (string_content "ConvertHSVToRGB") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "dVar4 = (double)DAT_002a7ff8;" (assignment_expression "dVar4 = (double)DAT_002a7ff8" (identifier "dVar4") (= "=") (cast_expression "(double)DAT_002a7ff8" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "DAT_002a7ff8"))) (; ";")) (expression_statement "param_2 = param_2 * param_3;" (assignment_expression "param_2 = param_2 * param_3" (identifier "param_2") (= "=") (binary_expression "param_2 * param_3" (identifier "param_2") (* "*") (identifier "param_3"))) (; ";")) (expression_statement "param_3 = param_3 - param_2;" (assignment_expression "param_3 = param_3 - param_2" (identifier "param_3") (= "=") (binary_expression "param_3 - param_2" (identifier "param_3") (- "-") (identifier "param_2"))) (; ";")) (expression_statement "dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4;" (assignment_expression "dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4" (identifier "dVar4") (= "=") (binary_expression "(param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4" (parenthesized_expression "(param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4)" (( "(") (binary_expression "param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4" (binary_expression "param_1 * dVar4" (identifier "param_1") (* "*") (identifier "dVar4")) (- "-") (binary_expression "ROUND((param_1 * dVar4) / dVar4) * dVar4" (call_expression "ROUND((param_1 * dVar4) / dVar4)" (identifier "ROUND") (argument_list "((param_1 * dVar4) / dVar4)" (( "(") (binary_expression "(param_1 * dVar4) / dVar4" (parenthesized_expression "(param_1 * dVar4)" (( "(") (binary_expression "param_1 * dVar4" (identifier "param_1") (* "*") (identifier "dVar4")) () ")")) (/ "/") (identifier "dVar4")) () ")"))) (* "*") (identifier "dVar4"))) () ")")) (/ "/") (cast_expression "(double)DAT_002b4dd4" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "DAT_002b4dd4")))) (; ";")) (expression_statement "dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2;" (assignment_expression "dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2" (identifier "dVar2") (= "=") (binary_expression "(1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2" (parenthesized_expression "(1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0))" (( "(") (binary_expression "1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)" (number_literal "1.0") (- "-") (call_expression "ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)" (identifier "ABS") (argument_list "((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)" (( "(") (binary_expression "(dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0" (parenthesized_expression "(dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124)))" (( "(") (binary_expression "dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))" (identifier "dVar4") (- "-") (parenthesized_expression "(ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124))" (( "(") (binary_expression "ROUND(dVar4 * (double)DAT_0029f124) +\n                              ROUND(dVar4 * (double)DAT_0029f124)" (call_expression "ROUND(dVar4 * (double)DAT_0029f124)" (identifier "ROUND") (argument_list "(dVar4 * (double)DAT_0029f124)" (( "(") (binary_expression "dVar4 * (double)DAT_0029f124" (identifier "dVar4") (* "*") (cast_expression "(double)DAT_0029f124" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "DAT_0029f124"))) () ")"))) (+ "+") (call_expression "ROUND(dVar4 * (double)DAT_0029f124)" (identifier "ROUND") (argument_list "(dVar4 * (double)DAT_0029f124)" (( "(") (binary_expression "dVar4 * (double)DAT_0029f124" (identifier "dVar4") (* "*") (cast_expression "(double)DAT_0029f124" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "DAT_0029f124"))) () ")")))) () ")"))) () ")")) (- "-") (number_literal "1.0")) () ")")))) () ")")) (* "*") (identifier "param_2"))) (; ";")) (expression_statement "dVar4 = floor(dVar4);" (assignment_expression "dVar4 = floor(dVar4)" (identifier "dVar4") (= "=") (call_expression "floor(dVar4)" (identifier "floor") (argument_list "(dVar4)" (( "(") (identifier "dVar4") () ")")))) (; ";")) (expression_statement "fVar3 = DAT_0029f710;" (assignment_expression "fVar3 = DAT_0029f710" (identifier "fVar3") (= "=") (identifier "DAT_0029f710")) (; ";")) (switch_statement "switch((int)ROUND(dVar4)) {\n  case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;\n  case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;\n  case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;\n  }" (switch "switch") (parenthesized_expression "((int)ROUND(dVar4))" (( "(") (cast_expression "(int)ROUND(dVar4)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (call_expression "ROUND(dVar4)" (identifier "ROUND") (argument_list "(dVar4)" (( "(") (identifier "dVar4") () ")")))) () ")")) (compound_statement "{\n  case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;\n  case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;\n  case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;\n  case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;\n  default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;\n  }" ({ "{") (case_statement "case 0:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = (dVar2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;" (case "case") (number_literal "0") (: ":") (expression_statement "dVar4 = (double)DAT_0029f710;" (assignment_expression "dVar4 = (double)DAT_0029f710" (identifier "dVar4") (= "=") (cast_expression "(double)DAT_0029f710" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "DAT_0029f710"))) (; ";")) (expression_statement "*param_4 = (param_2 + param_3) * dVar4;" (assignment_expression "*param_4 = (param_2 + param_3) * dVar4" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (binary_expression "(param_2 + param_3) * dVar4" (parenthesized_expression "(param_2 + param_3)" (( "(") (binary_expression "param_2 + param_3" (identifier "param_2") (+ "+") (identifier "param_3")) () ")")) (* "*") (identifier "dVar4"))) (; ";")) (expression_statement "*param_5 = (dVar2 + param_3) * dVar4;" (assignment_expression "*param_5 = (dVar2 + param_3) * dVar4" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (binary_expression "(dVar2 + param_3) * dVar4" (parenthesized_expression "(dVar2 + param_3)" (( "(") (binary_expression "dVar2 + param_3" (identifier "dVar2") (+ "+") (identifier "param_3")) () ")")) (* "*") (identifier "dVar4"))) (; ";")) (expression_statement "*param_6 = param_3 * dVar4;" (assignment_expression "*param_6 = param_3 * dVar4" (pointer_expression "*param_6" (* "*") (identifier "param_6")) (= "=") (binary_expression "param_3 * dVar4" (identifier "param_3") (* "*") (identifier "dVar4"))) (; ";")) (break_statement "break;" (break "break") (; ";"))) (case_statement "case 1:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (dVar2 + param_3) * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = param_3 * dVar4;\n    break;" (case "case") (number_literal "1") (: ":") (expression_statement "dVar4 = (double)DAT_0029f710;" (assignment_expression "dVar4 = (double)DAT_0029f710" (identifier "dVar4") (= "=") (cast_expression "(double)DAT_0029f710" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "DAT_0029f710"))) (; ";")) (expression_statement "*param_4 = (dVar2 + param_3) * dVar4;" (assignment_expression "*param_4 = (dVar2 + param_3) * dVar4" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (binary_expression "(dVar2 + param_3) * dVar4" (parenthesized_expression "(dVar2 + param_3)" (( "(") (binary_expression "dVar2 + param_3" (identifier "dVar2") (+ "+") (identifier "param_3")) () ")")) (* "*") (identifier "dVar4"))) (; ";")) (expression_statement "*param_5 = (param_2 + param_3) * dVar4;" (assignment_expression "*param_5 = (param_2 + param_3) * dVar4" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (binary_expression "(param_2 + param_3) * dVar4" (parenthesized_expression "(param_2 + param_3)" (( "(") (binary_expression "param_2 + param_3" (identifier "param_2") (+ "+") (identifier "param_3")) () ")")) (* "*") (identifier "dVar4"))) (; ";")) (expression_statement "*param_6 = param_3 * dVar4;" (assignment_expression "*param_6 = param_3 * dVar4" (pointer_expression "*param_6" (* "*") (identifier "param_6")) (= "=") (binary_expression "param_3 * dVar4" (identifier "param_3") (* "*") (identifier "dVar4"))) (; ";")) (break_statement "break;" (break "break") (; ";"))) (case_statement "case 2:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = param_3 * dVar4;\n    *param_5 = (param_2 + param_3) * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;" (case "case") (number_literal "2") (: ":") (expression_statement "dVar4 = (double)DAT_0029f710;" (assignment_expression "dVar4 = (double)DAT_0029f710" (identifier "dVar4") (= "=") (cast_expression "(double)DAT_0029f710" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "DAT_0029f710"))) (; ";")) (expression_statement "*param_4 = param_3 * dVar4;" (assignment_expression "*param_4 = param_3 * dVar4" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (binary_expression "param_3 * dVar4" (identifier "param_3") (* "*") (identifier "dVar4"))) (; ";")) (expression_statement "*param_5 = (param_2 + param_3) * dVar4;" (assignment_expression "*param_5 = (param_2 + param_3) * dVar4" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (binary_expression "(param_2 + param_3) * dVar4" (parenthesized_expression "(param_2 + param_3)" (( "(") (binary_expression "param_2 + param_3" (identifier "param_2") (+ "+") (identifier "param_3")) () ")")) (* "*") (identifier "dVar4"))) (; ";")) (expression_statement "*param_6 = (param_3 + dVar2) * dVar4;" (assignment_expression "*param_6 = (param_3 + dVar2) * dVar4" (pointer_expression "*param_6" (* "*") (identifier "param_6")) (= "=") (binary_expression "(param_3 + dVar2) * dVar4" (parenthesized_expression "(param_3 + dVar2)" (( "(") (binary_expression "param_3 + dVar2" (identifier "param_3") (+ "+") (identifier "dVar2")) () ")")) (* "*") (identifier "dVar4"))) (; ";")) (break_statement "break;" (break "break") (; ";"))) (case_statement "case 3:\n    *param_4 = param_3 * (double)DAT_0029f710;\n    dVar2 = dVar2 + param_3;\n    goto code_r0x000d2ae4;" (case "case") (number_literal "3") (: ":") (expression_statement "*param_4 = param_3 * (double)DAT_0029f710;" (assignment_expression "*param_4 = param_3 * (double)DAT_0029f710" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (binary_expression "param_3 * (double)DAT_0029f710" (identifier "param_3") (* "*") (cast_expression "(double)DAT_0029f710" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "DAT_0029f710")))) (; ";")) (expression_statement "dVar2 = dVar2 + param_3;" (assignment_expression "dVar2 = dVar2 + param_3" (identifier "dVar2") (= "=") (binary_expression "dVar2 + param_3" (identifier "dVar2") (+ "+") (identifier "param_3"))) (; ";")) (goto_statement "goto code_r0x000d2ae4;" (goto "goto") (statement_identifier "code_r0x000d2ae4") (; ";"))) (case_statement "case 4:\n    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;\n    dVar2 = param_3;\ncode_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;\n    *param_6 = (double)fVar3 * (param_3 + param_2);\n    break;" (case "case") (number_literal "4") (: ":") (expression_statement "*param_4 = (dVar2 + param_3) * (double)DAT_0029f710;" (assignment_expression "*param_4 = (dVar2 + param_3) * (double)DAT_0029f710" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (binary_expression "(dVar2 + param_3) * (double)DAT_0029f710" (parenthesized_expression "(dVar2 + param_3)" (( "(") (binary_expression "dVar2 + param_3" (identifier "dVar2") (+ "+") (identifier "param_3")) () ")")) (* "*") (cast_expression "(double)DAT_0029f710" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "DAT_0029f710")))) (; ";")) (expression_statement "dVar2 = param_3;" (assignment_expression "dVar2 = param_3" (identifier "dVar2") (= "=") (identifier "param_3")) (; ";")) (labeled_statement "code_r0x000d2ae4:\n    *param_5 = dVar2 * (double)fVar3;" (statement_identifier "code_r0x000d2ae4") (: ":") (expression_statement "*param_5 = dVar2 * (double)fVar3;" (assignment_expression "*param_5 = dVar2 * (double)fVar3" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (binary_expression "dVar2 * (double)fVar3" (identifier "dVar2") (* "*") (cast_expression "(double)fVar3" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "fVar3")))) (; ";"))) (expression_statement "*param_6 = (double)fVar3 * (param_3 + param_2);" (assignment_expression "*param_6 = (double)fVar3 * (param_3 + param_2)" (pointer_expression "*param_6" (* "*") (identifier "param_6")) (= "=") (binary_expression "(double)fVar3 * (param_3 + param_2)" (cast_expression "(double)fVar3" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "fVar3")) (* "*") (parenthesized_expression "(param_3 + param_2)" (( "(") (binary_expression "param_3 + param_2" (identifier "param_3") (+ "+") (identifier "param_2")) () ")")))) (; ";")) (break_statement "break;" (break "break") (; ";"))) (case_statement "case 5:\n    dVar4 = (double)DAT_0029f710;\n    *param_4 = (param_2 + param_3) * dVar4;\n    *param_5 = param_3 * dVar4;\n    *param_6 = (param_3 + dVar2) * dVar4;\n    break;" (case "case") (number_literal "5") (: ":") (expression_statement "dVar4 = (double)DAT_0029f710;" (assignment_expression "dVar4 = (double)DAT_0029f710" (identifier "dVar4") (= "=") (cast_expression "(double)DAT_0029f710" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "DAT_0029f710"))) (; ";")) (expression_statement "*param_4 = (param_2 + param_3) * dVar4;" (assignment_expression "*param_4 = (param_2 + param_3) * dVar4" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (binary_expression "(param_2 + param_3) * dVar4" (parenthesized_expression "(param_2 + param_3)" (( "(") (binary_expression "param_2 + param_3" (identifier "param_2") (+ "+") (identifier "param_3")) () ")")) (* "*") (identifier "dVar4"))) (; ";")) (expression_statement "*param_5 = param_3 * dVar4;" (assignment_expression "*param_5 = param_3 * dVar4" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (binary_expression "param_3 * dVar4" (identifier "param_3") (* "*") (identifier "dVar4"))) (; ";")) (expression_statement "*param_6 = (param_3 + dVar2) * dVar4;" (assignment_expression "*param_6 = (param_3 + dVar2) * dVar4" (pointer_expression "*param_6" (* "*") (identifier "param_6")) (= "=") (binary_expression "(param_3 + dVar2) * dVar4" (parenthesized_expression "(param_3 + dVar2)" (( "(") (binary_expression "param_3 + dVar2" (identifier "param_3") (+ "+") (identifier "dVar2")) () ")")) (* "*") (identifier "dVar4"))) (; ";")) (break_statement "break;" (break "break") (; ";"))) (case_statement "default:\n    *param_4 = 0.0;\n    *param_5 = 0.0;\n    *param_6 = 0.0;" (default "default") (: ":") (expression_statement "*param_4 = 0.0;" (assignment_expression "*param_4 = 0.0" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (number_literal "0.0")) (; ";")) (expression_statement "*param_5 = 0.0;" (assignment_expression "*param_5 = 0.0" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (number_literal "0.0")) (; ";")) (expression_statement "*param_6 = 0.0;" (assignment_expression "*param_6 = 0.0" (pointer_expression "*param_6" (* "*") (identifier "param_6")) (= "=") (number_literal "0.0")) (; ";"))) (} "}"))) (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }" (if "if") (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_0029eab0();\n  }" ({ "{") (expression_statement "FUN_0029eab0();" (call_expression "FUN_0029eab0()" (identifier "FUN_0029eab0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

void function_1(double var_9,double var_6,double var_7,double *var_2,double *var_4,
                    double *var_5)

{
  int var_16;
  double var_15;
  double var_8;
  double var_14;
  float fVar5;
  int var_1;
  double var_10;
  type_1 __cw;
  type_1 __cwtmp;
  
  var_16 = *(int *)(var_1 + 0x14);
  if (var_2 == (double *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");
  }
  if (var_4 == (double *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");
  }
  if (var_5 == (double *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");
  }
  var_10 = (double)DAT_002a7ff8;
  var_8 = var_6 * var_7;
  var_14 = var_7 - var_8;
  var_10 = (var_9 * var_10 - var_11((var_9 * var_10) / var_10) * var_10) / (double)DAT_002b4dd4;
  var_15 = (1.0 - var_12((var_10 - (var_11(var_10 * (double)DAT_0029f124) +
                              var_11(var_10 * (double)DAT_0029f124))) - 1.0)) * var_8;
  var_10 = var_13(var_10);
  fVar5 = DAT_0029f710;
  switch((int)var_11(var_10)) {
  case 0:
    var_10 = (double)DAT_0029f710;
    *var_2 = (var_8 + var_14) * var_10;
    *var_4 = (var_15 + var_14) * var_10;
    *var_5 = var_14 * var_10;
    break;
  case 1:
    var_10 = (double)DAT_0029f710;
    *var_2 = (var_15 + var_14) * var_10;
    *var_4 = (var_8 + var_14) * var_10;
    *var_5 = var_14 * var_10;
    break;
  case 2:
    var_10 = (double)DAT_0029f710;
    *var_2 = var_14 * var_10;
    *var_4 = (var_8 + var_14) * var_10;
    *var_5 = (var_14 + var_15) * var_10;
    break;
  case 3:
    *var_2 = var_14 * (double)DAT_0029f710;
    var_15 = var_15 + var_14;
    goto LAB_000d2ae4;
  case 4:
    *var_2 = (var_15 + var_14) * (double)DAT_0029f710;
    var_15 = var_14;
LAB_000d2ae4:
    *var_4 = var_15 * (double)fVar5;
    *var_5 = (double)fVar5 * (var_14 + var_8);
    break;
  case 5:
    var_10 = (double)DAT_0029f710;
    *var_2 = (var_8 + var_14) * var_10;
    *var_4 = var_14 * var_10;
    *var_5 = (var_14 + var_15) * var_10;
    break;
  default:
    *var_2 = 0.0;
    *var_4 = 0.0;
    *var_5 = 0.0;
  }
  if (var_16 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_17();
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)))) right: (identifier)))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))))))) right: (number_literal)))))) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (switch_statement condition: (parenthesized_expression (cast_expression type: (type_descriptor type: (primitive_type)) value: (call_expression function: (identifier) arguments: (argument_list (identifier))))) body: (compound_statement (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) (break_statement)) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) (break_statement)) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)))) (break_statement)) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (goto_statement label: (statement_identifier))) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) (break_statement)) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)))) (break_statement)) (case_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (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: (identifier) right: (number_literal))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void MASKED(double param_1,double param_2,double param_3,double *param_4,double *param_5,
                 double *param_6)

{
  int iVar1;
  double dVar2;
  float fVar3;
  int in_GS_OFFSET;
  double dVar4;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_4 == (double *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("red != (double *) NULL","MagickCore/gem.c",0x242,"ConvertHSVToRGB");
  }
  if (param_5 == (double *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("green != (double *) NULL","MagickCore/gem.c",0x243,"ConvertHSVToRGB");
  }
  if (param_6 == (double *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("blue != (double *) NULL","MagickCore/gem.c",0x244,"ConvertHSVToRGB");
  }
  dVar4 = (double)DAT_002a7ff8;
  param_2 = param_2 * param_3;
  param_3 = param_3 - param_2;
  dVar4 = (param_1 * dVar4 - ROUND((param_1 * dVar4) / dVar4) * dVar4) / (double)DAT_002b4dd4;
  dVar2 = (1.0 - ABS((dVar4 - (ROUND(dVar4 * (double)DAT_0029f124) +
                              ROUND(dVar4 * (double)DAT_0029f124))) - 1.0)) * param_2;
  dVar4 = floor(dVar4);
  fVar3 = DAT_0029f710;
  switch((int)ROUND(dVar4)) {
  case 0:
    dVar4 = (double)DAT_0029f710;
    *param_4 = (param_2 + param_3) * dVar4;
    *param_5 = (dVar2 + param_3) * dVar4;
    *param_6 = param_3 * dVar4;
    break;
  case 1:
    dVar4 = (double)DAT_0029f710;
    *param_4 = (dVar2 + param_3) * dVar4;
    *param_5 = (param_2 + param_3) * dVar4;
    *param_6 = param_3 * dVar4;
    break;
  case 2:
    dVar4 = (double)DAT_0029f710;
    *param_4 = param_3 * dVar4;
    *param_5 = (param_2 + param_3) * dVar4;
    *param_6 = (param_3 + dVar2) * dVar4;
    break;
  case 3:
    *param_4 = param_3 * (double)DAT_0029f710;
    dVar2 = dVar2 + param_3;
    goto code_r0x000d2ae4;
  case 4:
    *param_4 = (dVar2 + param_3) * (double)DAT_0029f710;
    dVar2 = param_3;
code_r0x000d2ae4:
    *param_5 = dVar2 * (double)fVar3;
    *param_6 = (double)fVar3 * (param_3 + param_2);
    break;
  case 5:
    dVar4 = (double)DAT_0029f710;
    *param_4 = (param_2 + param_3) * dVar4;
    *param_5 = param_3 * dVar4;
    *param_6 = (param_3 + dVar2) * dVar4;
    break;
  default:
    *param_4 = 0.0;
    *param_5 = 0.0;
    *param_6 = 0.0;
  }
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0029eab0();
  }
  return;
}

