#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 M_PI;
double cos(float);
double sin(float);
void radius_rad(float *calcul_angle, float rotation, double *sin_a,
                double *cos_a) {
  *calcul_angle = rotation * M_PI;
  *calcul_angle = (*calcul_angle) / 180.0;
  *sin_a = sin(*calcul_angle);
  *cos_a = cos(*calcul_angle);
  return;
}


x86 assembly (clang, -O0):
<radius_rad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movss  -0xc(%rbp),%xmm0
mov    0x2ea3(%rip),%rax
mulss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe9b(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <sin@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1040 <cos@plt>
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radius_rad>:
push   %r15
push   %r14
push   %rbx
mov    0x2ebc(%rip),%rax
mulss  (%rax),%xmm0
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
divss  0xebf(%rip),%xmm0
movss  %xmm0,(%rdi)
call   1030 <sin@plt>
movsd  %xmm0,(%r15)
movss  (%rbx),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
define void @radius_rad(float* %0, float %1, double* %2, double* %3) {
%5 = alloca float*
%6 = alloca float
%7 = alloca double*
%8 = alloca double*
store float* %0, float** %5
store float %1, float* %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load float, float* %6
%10 = load float, float* @M_PI
%11 = fmul float %9, %10
%12 = load float*, float** %5
store float %11, float* %12
%13 = load float*, float** %5
%14 = load float, float* %13
%15 = fpext float %14 to double
%16 = fdiv double %15, 1.800000e+02
%17 = fptrunc double %16 to float
%18 = load float*, float** %5
store float %17, float* %18
%19 = load float*, float** %5
%20 = load float, float* %19
%21 = call double @sin(float %20)
%22 = load double*, double** %7
store double %21, double* %22
%23 = load float*, float** %5
%24 = load float, float* %23
%25 = call double @cos(float %24)
%26 = load double*, double** %8
store double %25, double* %26
ret void
}

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define void @radius_rad(float* nocapture %0, float %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = load float, float* @M_PI
%6 = fmul float %5, %1
%7 = fdiv float %6, 1.800000e+02
store float %7, float* %0
%8 = tail call double @sin(float %7)
store double %8, double* %2
%9 = load float, float* %0
%10 = tail call double @cos(float %9)
store double %10, double* %3
ret void
}