#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 */
typedef double v;
typedef double u;

/* Variables and functions */
int cbrt(double);
void(libclut_model_cie_1960_ucs_to_cieuvw)(double u, double v, double Y,
                                           double u0, double v0, double *U,
                                           double *V, double *W) {
  do {
    double w__ = 25 * cbrt(Y) - 17;
    *(W) = w__;
    w__ *= 13;
    *(U) = w__ * ((u) - (u0));
    *(V) = w__ * ((v) - (v0));
  } while (0);
}


x86 assembly (clang, -O0):
<libclut_model_cie_1960_ucs_to_cieuvw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <cbrt@plt>
imul   $0x19,%eax,%eax
sub    $0x11,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xe95(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libclut_model_cie_1960_ucs_to_cieuvw>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
movsd  %xmm4,0x18(%rsp)
movsd  %xmm3,0x8(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,(%rsp)
movaps %xmm2,%xmm0
call   1030 <cbrt@plt>
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,4),%eax
add    $0xffffffef,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rbx)
mulsd  0xea3(%rip),%xmm0
movsd  (%rsp),%xmm1
subsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r15)
movsd  0x10(%rsp),%xmm1
subsd  0x18(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @libclut_model_cie_1960_ucs_to_cieuvw(double %0, double %1, double %2, double %3, double %4, double* %5, double* %6, double* %7) {
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double
store double %0, double* %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store double %4, double* %13
store double* %5, double** %14
store double* %6, double** %15
store double* %7, double** %16
br label %18
18: ; preds = %8
%19 = load double, double* %11
%20 = call i32 @cbrt(double %19)
%21 = mul nsw i32 25, %20
%22 = sub nsw i32 %21, 17
%23 = sitofp i32 %22 to double
store double %23, double* %17
%24 = load double, double* %17
%25 = load double*, double** %16
store double %24, double* %25
%26 = load double, double* %17
%27 = fmul double %26, 1.300000e+01
store double %27, double* %17
%28 = load double, double* %17
%29 = load double, double* %9
%30 = load double, double* %12
%31 = fsub double %29, %30
%32 = fmul double %28, %31
%33 = load double*, double** %14
store double %32, double* %33
%34 = load double, double* %17
%35 = load double, double* %10
%36 = load double, double* %13
%37 = fsub double %35, %36
%38 = fmul double %34, %37
%39 = load double*, double** %15
store double %38, double* %39
br label %40
40: ; preds = %18
ret void
}

LLVM IR (-O2):
define void @libclut_model_cie_1960_ucs_to_cieuvw(double %0, double %1, double %2, double %3, double %4, double* nocapture writeonly %5, double* nocapture writeonly %6, double* nocapture writeonly %7) {
%9 = tail call i32 @cbrt(double %2)
%10 = mul nsw i32 %9, 25
%11 = add nsw i32 %10, -17
%12 = sitofp i32 %11 to double
store double %12, double* %7
%13 = fmul double %12, 1.300000e+01
%14 = fsub double %0, %3
%15 = fmul double %14, %13
store double %15, double* %5
%16 = fsub double %1, %4
%17 = fmul double %16, %13
store double %17, double* %6
ret void
}