#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 par_shapes__cylinder(float const *uv, float *xyz, void *userdata) {
  float theta = uv[1] * 2 * (3.14159265359);
  xyz[0] = sinf(theta);
  xyz[1] = cosf(theta);
  xyz[2] = uv[0];
}


x86 assembly (clang, -O0):
<par_shapes__cylinder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  0xec8(%rip),%xmm0
mulss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeaf(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
call   1030 <sinf@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x1c(%rbp),%xmm0
call   1040 <cosf@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x8(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<par_shapes__cylinder>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movss  0x4(%rdi),%xmm0
addss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xec1(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
call   1030 <sinf@plt>
movss  %xmm0,(%rbx)
movss  0x4(%rsp),%xmm0
call   1040 <cosf@plt>
movss  %xmm0,0x4(%rbx)
movss  (%r14),%xmm0
movss  %xmm0,0x8(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @par_shapes__cylinder(float* %0, float* %1, i8* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca i8*
%7 = alloca float
store float* %0, float** %4
store float* %1, float** %5
store i8* %2, i8** %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 1
%10 = load float, float* %9
%11 = fmul float %10, 2.000000e+00
%12 = fpext float %11 to double
%13 = fmul double %12, 0x400921FB54442EEA
%14 = fptrunc double %13 to float
store float %14, float* %7
%15 = load float, float* %7
%16 = call float @sinf(float %15)
%17 = load float*, float** %5
%18 = getelementptr inbounds float, float* %17, i64 0
store float %16, float* %18
%19 = load float, float* %7
%20 = call float @cosf(float %19)
%21 = load float*, float** %5
%22 = getelementptr inbounds float, float* %21, i64 1
store float %20, float* %22
%23 = load float*, float** %4
%24 = getelementptr inbounds float, float* %23, i64 0
%25 = load float, float* %24
%26 = load float*, float** %5
%27 = getelementptr inbounds float, float* %26, i64 2
store float %25, float* %27
ret void
}

LLVM IR (-O2):
define void @par_shapes__cylinder(float* nocapture %0, float* nocapture writeonly %1, i8* nocapture readnone %2) {
%4 = getelementptr inbounds float, float* %0, i64 1
%5 = load float, float* %4
%6 = fmul float %5, 2.000000e+00
%7 = fpext float %6 to double
%8 = fmul double %7, 0x400921FB54442EEA
%9 = fptrunc double %8 to float
%10 = tail call float @sinf(float %9)
store float %10, float* %1
%11 = tail call float @cosf(float %9)
%12 = getelementptr inbounds float, float* %1, i64 1
store float %11, float* %12
%13 = load float, float* %0
%14 = getelementptr inbounds float, float* %1, i64 2
store float %13, float* %14
ret void
}