#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 */
int atan(int /*<<< orphan*/);
int pow(double, int);
int /*<<< orphan*/ sqrt(int);
double second_angle(double x, double y) {
  double angle;
  double i = (pow(x, 2) + pow(y, 2) - 2 * pow(0.36, 2)) / (2 * pow(0.36, 2));
  angle = 2 * atan(sqrt((1 - i) / (1 + i)));
  return angle;
}


x86 assembly (clang, -O0):
<second_angle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %eax,-0x2c(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x28(%rbp)
movsd  0xe93(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
shl    $0x1,%ecx
sub    %ecx,%eax
mov    %eax,-0x24(%rbp)
movsd  0xe74(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
shl    $0x1,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe46(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  0xe39(%rip),%xmm1
addsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sqrt@plt>
mov    %eax,%edi
call   1030 <atan@plt>
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<second_angle>:
push   %rbp
push   %rbx
push   %rax
movsd  %xmm1,(%rsp)
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %eax,%ebp
add    %ebx,%ebp
movsd  0xea1(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
add    %eax,%eax
sub    %eax,%ebp
movsd  0xe8b(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xe71(%rip),%xmm1
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm2
cvttsd2si %xmm2,%edi
call   1050 <sqrt@plt>
mov    %eax,%edi
call   1030 <atan@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @second_angle(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* %3
%8 = call i32 @pow(double %7, i32 2)
%9 = load double, double* %4
%10 = call i32 @pow(double %9, i32 2)
%11 = add nsw i32 %8, %10
%12 = call i32 @pow(double 3.600000e-01, i32 2)
%13 = mul nsw i32 2, %12
%14 = sub nsw i32 %11, %13
%15 = call i32 @pow(double 3.600000e-01, i32 2)
%16 = mul nsw i32 2, %15
%17 = sdiv i32 %14, %16
%18 = sitofp i32 %17 to double
store double %18, double* %6
%19 = load double, double* %6
%20 = fsub double 1.000000e+00, %19
%21 = load double, double* %6
%22 = fadd double 1.000000e+00, %21
%23 = fdiv double %20, %22
%24 = fptosi double %23 to i32
%25 = call i32 @sqrt(i32 %24)
%26 = call i32 @atan(i32 %25)
%27 = mul nsw i32 2, %26
%28 = sitofp i32 %27 to double
store double %28, double* %5
%29 = load double, double* %5
ret double %29
}

LLVM IR (-O2):
define double @second_angle(double %0, double %1) {
%3 = tail call i32 @pow(double %0, i32 2)
%4 = tail call i32 @pow(double %1, i32 2)
%5 = add nsw i32 %4, %3
%6 = tail call i32 @pow(double 3.600000e-01, i32 2)
%7 = mul i32 %6, -2
%8 = add i32 %5, %7
%9 = tail call i32 @pow(double 3.600000e-01, i32 2)
%10 = shl nsw i32 %9, 1
%11 = sdiv i32 %8, %10
%12 = sitofp i32 %11 to double
%13 = fsub double 1.000000e+00, %12
%14 = fadd double %12, 1.000000e+00
%15 = fdiv double %13, %14
%16 = fptosi double %15 to i32
%17 = tail call i32 @sqrt(i32 %16)
%18 = tail call i32 @atan(i32 %17)
%19 = shl nsw i32 %18, 1
%20 = sitofp i32 %19 to double
ret double %20
}