#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 */
double sin(double);
double sqrt(int);
double tan(double);
double U_aparam(double Ang1, double Ang2) {
  double Alpha;
  double t2;
  t2 = tan((Ang2 - Ang1) / 2.0);
  t2 *= t2;
  Alpha = sin(Ang2 - Ang1) * (sqrt(4 + 3 * t2) - 1.0) / 3.0;
  return (Alpha);
}


x86 assembly (clang, -O0):
<U_aparam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  0xec4(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <tan@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe6e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe72(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  0xe4d(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe35(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_aparam>:
sub    $0x18,%rsp
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xeba(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <tan@plt>
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  0xe90(%rip),%xmm0
addsd  0xe90(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sqrt@plt>
addsd  0xe87(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
divsd  0xe69(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @U_aparam(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %4
%8 = load double, double* %3
%9 = fsub double %7, %8
%10 = fdiv double %9, 2.000000e+00
%11 = call double @tan(double %10)
store double %11, double* %6
%12 = load double, double* %6
%13 = load double, double* %6
%14 = fmul double %13, %12
store double %14, double* %6
%15 = load double, double* %4
%16 = load double, double* %3
%17 = fsub double %15, %16
%18 = call double @sin(double %17)
%19 = load double, double* %6
%20 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %19, double 4.000000e+00)
%21 = fptosi double %20 to i32
%22 = call double @sqrt(i32 %21)
%23 = fsub double %22, 1.000000e+00
%24 = fmul double %18, %23
%25 = fdiv double %24, 3.000000e+00
store double %25, double* %5
%26 = load double, double* %5
ret double %26
}

LLVM IR (-O2):
define double @U_aparam(double %0, double %1) {
%3 = fsub double %1, %0
%4 = fmul double %3, 5.000000e-01
%5 = tail call double @tan(double %4)
%6 = fmul double %5, %5
%7 = tail call double @sin(double %3)
%8 = tail call double @llvm.fmuladd.f64(double %6, double 3.000000e+00, double 4.000000e+00)
%9 = fptosi double %8 to i32
%10 = tail call double @sqrt(i32 %9)
%11 = fadd double %10, -1.000000e+00
%12 = fmul double %7, %11
%13 = fdiv double %12, 3.000000e+00
ret double %13
}