#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*/ iColorRGB2HSI(double, double, double, double *, double *,
                                 double *);
double iColorReconstruct(unsigned char);
void iupColorRGB2HSI(unsigned char r, unsigned char g, unsigned char b,
                     double *h, double *s, double *i) {
  double fr = iColorReconstruct(r);
  double fg = iColorReconstruct(g);
  double fb = iColorReconstruct(b);
  iColorRGB2HSI(fr, fg, fb, h, s, i);
}


x86 assembly (clang, -O0):
<iupColorRGB2HSI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %dl,%al
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    %rcx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <iColorReconstruct@plt>
movsd  %xmm0,-0x28(%rbp)
movzbl -0x2(%rbp),%edi
call   1030 <iColorReconstruct@plt>
movsd  %xmm0,-0x30(%rbp)
movzbl -0x3(%rbp),%edi
call   1030 <iColorReconstruct@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <iColorRGB2HSI@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iupColorRGB2HSI>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%r12
mov    %edx,%ebp
mov    %esi,%ebx
call   1030 <iColorReconstruct@plt>
movsd  %xmm0,0x8(%rsp)
mov    %ebx,%edi
call   1030 <iColorReconstruct@plt>
movsd  %xmm0,(%rsp)
mov    %ebp,%edi
call   1030 <iColorReconstruct@plt>
movaps %xmm0,%xmm2
movsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <iColorRGB2HSI@plt>

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

LLVM IR (-O2):
define void @iupColorRGB2HSI(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, double* %3, double* %4, double* %5) {
%7 = tail call double @iColorReconstruct(i8 zeroext %0)
%8 = tail call double @iColorReconstruct(i8 zeroext %1)
%9 = tail call double @iColorReconstruct(i8 zeroext %2)
%10 = tail call i32 @iColorRGB2HSI(double %7, double %8, double %9, double* %3, double* %4, double* %5)
ret void
}