#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 */
float cosf(float);
float sinf(float);
void polarLUV_to_LUV(float l, float c, float h, float *L, float *U, float *V) {
  h = (.01745329251994329576 * (h));
  *L = l;
  *U = c * cosf(h);
  *V = c * sinf(h);
}


x86 assembly (clang, -O0):
<polarLUV_to_LUV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeac(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0xc(%rbp),%xmm0
call   1040 <cosf@plt>
movaps %xmm0,%xmm1
movss  -0x30(%rbp),%xmm0
mulss  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0xc(%rbp),%xmm0
call   1030 <sinf@plt>
movaps %xmm0,%xmm1
movss  -0x2c(%rbp),%xmm0
mulss  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<polarLUV_to_LUV>:
push   %r14
push   %rbx
push   %rax
cvtss2sd %xmm2,%xmm2
mulsd  0xed0(%rip),%xmm2
mov    %rdx,%r14
mov    %rsi,%rbx
movss  %xmm1,(%rsp)
xorps  %xmm1,%xmm1
cvtsd2ss %xmm2,%xmm1
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rdi)
movaps %xmm1,%xmm0
call   1040 <cosf@plt>
mulss  (%rsp),%xmm0
movss  %xmm0,(%rbx)
movss  0x4(%rsp),%xmm0
call   1030 <sinf@plt>
mulss  (%rsp),%xmm0
movss  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @polarLUV_to_LUV(float %0, float %1, float %2, float* %3, float* %4, float* %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float*
%11 = alloca float*
%12 = alloca float*
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float* %3, float** %10
store float* %4, float** %11
store float* %5, float** %12
%13 = load float, float* %9
%14 = fpext float %13 to double
%15 = fmul double 0x3F91DF46A2529D39, %14
%16 = fptrunc double %15 to float
store float %16, float* %9
%17 = load float, float* %7
%18 = load float*, float** %10
store float %17, float* %18
%19 = load float, float* %8
%20 = load float, float* %9
%21 = call float @cosf(float %20)
%22 = fmul float %19, %21
%23 = load float*, float** %11
store float %22, float* %23
%24 = load float, float* %8
%25 = load float, float* %9
%26 = call float @sinf(float %25)
%27 = fmul float %24, %26
%28 = load float*, float** %12
store float %27, float* %28
ret void
}

LLVM IR (-O2):
define void @polarLUV_to_LUV(float %0, float %1, float %2, float* nocapture writeonly %3, float* nocapture writeonly %4, float* nocapture writeonly %5) {
%7 = fpext float %2 to double
%8 = fmul double %7, 0x3F91DF46A2529D39
%9 = fptrunc double %8 to float
store float %0, float* %3
%10 = tail call float @cosf(float %9)
%11 = fmul float %10, %1
store float %11, float* %4
%12 = tail call float @sinf(float %9)
%13 = fmul float %12, %1
store float %13, float* %5
ret void
}