#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*/ fz_luminosity_rgb(int *, int *, int *, int, int, int, int,
                                     int, int);
int /*<<< orphan*/ fz_saturation_rgb(int *, int *, int *, int, int, int, int,
                                     int, int);
void fz_hue_rgb(int *rr, int *rg, int *rb, int br, int bg, int bb, int sr,
                int sg, int sb) {
  int tr, tg, tb;
  fz_luminosity_rgb(&tr, &tg, &tb, sr, sg, sb, br, bg, bb);
  fz_saturation_rgb(rr, rg, rb, tr, tg, tb, br, bg, bb);
}


x86 assembly (clang, -O0):
<fz_hue_rgb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    0x10(%rbp),%ecx
mov    0x18(%rbp),%r8d
mov    0x20(%rbp),%r9d
mov    -0x1c(%rbp),%r11d
mov    -0x20(%rbp),%r10d
mov    -0x24(%rbp),%eax
lea    -0x28(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
lea    -0x30(%rbp),%rdx
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <fz_luminosity_rgb@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
mov    -0x30(%rbp),%r9d
mov    -0x1c(%rbp),%r11d
mov    -0x20(%rbp),%r10d
mov    -0x24(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1040 <fz_saturation_rgb@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fz_hue_rgb>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9d,%ebx
mov    %r8d,%r15d
mov    %ecx,%r14d
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%rbp
mov    0x50(%rsp),%ecx
mov    0x58(%rsp),%r8d
mov    0x60(%rsp),%r9d
sub    $0x8,%rsp
lea    0x1c(%rsp),%rdi
lea    0x18(%rsp),%rsi
lea    0x14(%rsp),%rdx
push   %rbx
push   %r15
push   %r14
call   1030 <fz_luminosity_rgb@plt>
add    $0x20,%rsp
mov    0x14(%rsp),%ecx
mov    0x10(%rsp),%r8d
mov    0xc(%rsp),%r9d
sub    $0x8,%rsp
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
push   %rbx
push   %r15
push   %r14
call   1040 <fz_saturation_rgb@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @fz_hue_rgb(i32* %0, i32* %1, i32* %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
store i32* %0, i32** %10
store i32* %1, i32** %11
store i32* %2, i32** %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%22 = load i32, i32* %16
%23 = load i32, i32* %17
%24 = load i32, i32* %18
%25 = load i32, i32* %13
%26 = load i32, i32* %14
%27 = load i32, i32* %15
%28 = call i32 @fz_luminosity_rgb(i32* %19, i32* %20, i32* %21, i32 %22, i32 %23, i32 %24, i32 %25, i32 %26, i32 %27)
%29 = load i32*, i32** %10
%30 = load i32*, i32** %11
%31 = load i32*, i32** %12
%32 = load i32, i32* %19
%33 = load i32, i32* %20
%34 = load i32, i32* %21
%35 = load i32, i32* %13
%36 = load i32, i32* %14
%37 = load i32, i32* %15
%38 = call i32 @fz_saturation_rgb(i32* %29, i32* %30, i32* %31, i32 %32, i32 %33, i32 %34, i32 %35, i32 %36, i32 %37)
ret void
}

LLVM IR (-O2):
define void @fz_hue_rgb(i32* %0, i32* %1, i32* %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = bitcast i32* %10 to i8*
%14 = bitcast i32* %11 to i8*
%15 = bitcast i32* %12 to i8*
%16 = call i32 @fz_luminosity_rgb(i32* %10, i32* %11, i32* %12, i32 %6, i32 %7, i32 %8, i32 %3, i32 %4, i32 %5)
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = call i32 @fz_saturation_rgb(i32* %0, i32* %1, i32* %2, i32 %17, i32 %18, i32 %19, i32 %3, i32 %4, i32 %5)
ret void
}