#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 acos(float);
float cos(char);
float sin(char);
float Azimuth(char lDEC, char lALT, char lLAT) {
  float x = (sin(lDEC) - sin(lALT) * sin(lLAT)) / (cos(lALT) * cos(lLAT));
  return acos(x);
}


x86 assembly (clang, -O0):
<Azimuth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x1(%rbp),%al
movsbl %al,%edi
call   1040 <sin@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x2(%rbp),%al
movsbl %al,%edi
call   1040 <sin@plt>
movss  %xmm0,-0x14(%rbp)
mov    -0x3(%rbp),%al
movsbl %al,%edi
call   1040 <sin@plt>
movss  -0x18(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0x14(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x2(%rbp),%al
movsbl %al,%edi
call   1050 <cos@plt>
movss  %xmm0,-0x10(%rbp)
mov    -0x3(%rbp),%al
movsbl %al,%edi
call   1050 <cos@plt>
movss  -0x10(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0xc(%rbp),%xmm0
mulss  %xmm2,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <acos@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Azimuth>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1040 <sin@plt>
movss  %xmm0,0x4(%rsp)
mov    %ebp,%edi
call   1040 <sin@plt>
movss  %xmm0,(%rsp)
mov    %ebx,%edi
call   1040 <sin@plt>
mulss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
subss  %xmm0,%xmm1
movss  %xmm1,0x4(%rsp)
mov    %ebp,%edi
call   1050 <cos@plt>
movss  %xmm0,(%rsp)
mov    %ebx,%edi
call   1050 <cos@plt>
mulss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <acos@plt>

LLVM IR (-O0):
define float @Azimuth(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca float
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %4
%9 = call float @sin(i8 signext %8)
%10 = load i8, i8* %5
%11 = call float @sin(i8 signext %10)
%12 = load i8, i8* %6
%13 = call float @sin(i8 signext %12)
%14 = fneg float %11
%15 = call float @llvm.fmuladd.f32(float %14, float %13, float %9)
%16 = load i8, i8* %5
%17 = call float @cos(i8 signext %16)
%18 = load i8, i8* %6
%19 = call float @cos(i8 signext %18)
%20 = fmul float %17, %19
%21 = fdiv float %15, %20
store float %21, float* %7
%22 = load float, float* %7
%23 = call float @acos(float %22)
ret float %23
}

LLVM IR (-O2):
define float @Azimuth(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = tail call float @sin(i8 signext %0)
%5 = tail call float @sin(i8 signext %1)
%6 = tail call float @sin(i8 signext %2)
%7 = fneg float %5
%8 = tail call float @llvm.fmuladd.f32(float %7, float %6, float %4)
%9 = tail call float @cos(i8 signext %1)
%10 = tail call float @cos(i8 signext %2)
%11 = fmul float %9, %10
%12 = fdiv float %8, %11
%13 = tail call float @acos(float %12)
ret float %13
}