#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ iColorHSI2RGB(double, double, double, double *, double *,
                                 double *);
unsigned char iColorQuantize(double);
void iupColorHSI2RGB(double h, double s, double i, unsigned char *r,
                     unsigned char *g, unsigned char *b) {
  double fr, fg, fb;
  iColorHSI2RGB(h, s, i, &fr, &fg, &fb);
  *r = iColorQuantize(fr);
  *g = iColorQuantize(fg);
  *b = iColorQuantize(fb);
}


x86 assembly (clang, -O0):
<iupColorHSI2RGB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
lea    -0x38(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1030 <iColorHSI2RGB@plt>
movsd  -0x38(%rbp),%xmm0
call   1040 <iColorQuantize@plt>
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
movsd  -0x40(%rbp),%xmm0
call   1040 <iColorQuantize@plt>
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %cl,(%rax)
movsd  -0x48(%rbp),%xmm0
call   1040 <iColorQuantize@plt>
mov    %al,%cl
mov    -0x30(%rbp),%rax
mov    %cl,(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iupColorHSI2RGB>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0x18(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <iColorHSI2RGB@plt>
movsd  0x18(%rsp),%xmm0
call   1040 <iColorQuantize@plt>
mov    %al,(%rbx)
movsd  0x10(%rsp),%xmm0
call   1040 <iColorQuantize@plt>
mov    %al,(%r15)
movsd  0x8(%rsp),%xmm0
call   1040 <iColorQuantize@plt>
mov    %al,(%r14)
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @iupColorHSI2RGB(double %0, double %1, double %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca double
%14 = alloca double
%15 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%16 = load double, double* %7
%17 = load double, double* %8
%18 = load double, double* %9
%19 = call i32 @iColorHSI2RGB(double %16, double %17, double %18, double* %13, double* %14, double* %15)
%20 = load double, double* %13
%21 = call zeroext i8 @iColorQuantize(double %20)
%22 = load i8*, i8** %10
store i8 %21, i8* %22
%23 = load double, double* %14
%24 = call zeroext i8 @iColorQuantize(double %23)
%25 = load i8*, i8** %11
store i8 %24, i8* %25
%26 = load double, double* %15
%27 = call zeroext i8 @iColorQuantize(double %26)
%28 = load i8*, i8** %12
store i8 %27, i8* %28
ret void
}

LLVM IR (-O2):
define void @iupColorHSI2RGB(double %0, double %1, double %2, i8* nocapture writeonly %3, i8* nocapture writeonly %4, i8* nocapture writeonly %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = bitcast double* %7 to i8*
%11 = bitcast double* %8 to i8*
%12 = bitcast double* %9 to i8*
%13 = call i32 @iColorHSI2RGB(double %0, double %1, double %2, double* %7, double* %8, double* %9)
%14 = load double, double* %7
%15 = call zeroext i8 @iColorQuantize(double %14)
store i8 %15, i8* %3
%16 = load double, double* %8
%17 = call zeroext i8 @iColorQuantize(double %16)
store i8 %17, i8* %4
%18 = load double, double* %9
%19 = call zeroext i8 @iColorQuantize(double %18)
store i8 %19, i8* %5
ret void
}