#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 */
scalar_t__ ajCvtDegToRad(float);
scalar_t__ cos(double);
scalar_t__ sin(double);
void ajCvtPolToRec(float radius, float angle, float *x, float *y) {
  *x = radius * (float)cos((double)ajCvtDegToRad(angle));
  *y = radius * (float)sin((double)ajCvtDegToRad(angle));
  return;
}


x86 assembly (clang, -O0):
<ajCvtPolToRec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x8(%rbp),%xmm0
call   1050 <ajCvtDegToRad@plt>
cvtsi2sd %rax,%xmm0
call   1040 <cos@plt>
movss  -0x20(%rbp),%xmm0
cvtsi2ss %rax,%xmm1
mulss  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
call   1050 <ajCvtDegToRad@plt>
cvtsi2sd %rax,%xmm0
call   1030 <sin@plt>
movss  -0x1c(%rbp),%xmm0
cvtsi2ss %rax,%xmm1
mulss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ajCvtPolToRec>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
movaps %xmm1,%xmm0
call   1050 <ajCvtDegToRad@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
call   1040 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
mulss  (%rsp),%xmm0
movss  %xmm0,(%rbx)
movss  0x4(%rsp),%xmm0
call   1050 <ajCvtDegToRad@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
call   1030 <sin@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
mulss  (%rsp),%xmm0
movss  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ajCvtPolToRec(float %0, float %1, float* %2, float* %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float*
%8 = alloca float*
store float %0, float* %5
store float %1, float* %6
store float* %2, float** %7
store float* %3, float** %8
%9 = load float, float* %5
%10 = load float, float* %6
%11 = call i64 @ajCvtDegToRad(float %10)
%12 = sitofp i64 %11 to double
%13 = call i64 @cos(double %12)
%14 = sitofp i64 %13 to float
%15 = fmul float %9, %14
%16 = load float*, float** %7
store float %15, float* %16
%17 = load float, float* %5
%18 = load float, float* %6
%19 = call i64 @ajCvtDegToRad(float %18)
%20 = sitofp i64 %19 to double
%21 = call i64 @sin(double %20)
%22 = sitofp i64 %21 to float
%23 = fmul float %17, %22
%24 = load float*, float** %8
store float %23, float* %24
ret void
}

LLVM IR (-O2):
define void @ajCvtPolToRec(float %0, float %1, float* nocapture writeonly %2, float* nocapture writeonly %3) {
%5 = tail call i64 @ajCvtDegToRad(float %1)
%6 = sitofp i64 %5 to double
%7 = tail call i64 @cos(double %6)
%8 = sitofp i64 %7 to float
%9 = fmul float %8, %0
store float %9, float* %2
%10 = tail call i64 @ajCvtDegToRad(float %1)
%11 = sitofp i64 %10 to double
%12 = tail call i64 @sin(double %11)
%13 = sitofp i64 %12 to float
%14 = fmul float %13, %0
store float %14, float* %3
ret void
}