#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 atan(double);
scalar_t__ pow(double, double);
double sqrt(scalar_t__);
double Beta(double Rt, double x, double y, int n) {
  return atan(
      2.0 * Rt * y /
      (sqrt(pow(2.0 * Rt * x, 2.0) + pow(((double)n - 1.0) * 1.5e8, 2.0))));
}


x86 assembly (clang, -O0):
<Beta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
movsd  0xeae(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe97(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xe85(%rip),%xmm1
call   1040 <pow@plt>
mov    %rax,-0x30(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm0
movsd  0xe7f(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe6b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe57(%rip),%xmm1
call   1040 <pow@plt>
mov    -0x30(%rbp),%rdi
add    %rax,%rdi
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
divsd  %xmm1,%xmm0
call   1030 <atan@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Beta>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
addsd  %xmm0,%xmm0
mulsd  %xmm0,%xmm2
movsd  %xmm2,(%rsp)
mulsd  %xmm1,%xmm0
movsd  0xeb2(%rip),%xmm1
call   1040 <pow@plt>
mov    %rax,%rbx
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
addsd  0xea3(%rip),%xmm0
mulsd  0xea3(%rip),%xmm0
movsd  0xe8b(%rip),%xmm1
call   1040 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
call   1050 <sqrt@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <atan@plt>

LLVM IR (-O0):
define double @Beta(double %0, double %1, double %2, i32 %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i32
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store i32 %3, i32* %8
%9 = load double, double* %5
%10 = fmul double 2.000000e+00, %9
%11 = load double, double* %7
%12 = fmul double %10, %11
%13 = load double, double* %5
%14 = fmul double 2.000000e+00, %13
%15 = load double, double* %6
%16 = fmul double %14, %15
%17 = call i64 @pow(double %16, double 2.000000e+00)
%18 = load i32, i32* %8
%19 = sitofp i32 %18 to double
%20 = fsub double %19, 1.000000e+00
%21 = fmul double %20, 1.500000e+08
%22 = call i64 @pow(double %21, double 2.000000e+00)
%23 = add nsw i64 %17, %22
%24 = call double @sqrt(i64 %23)
%25 = fdiv double %12, %24
%26 = call double @atan(double %25)
ret double %26
}

LLVM IR (-O2):
define double @Beta(double %0, double %1, double %2, i32 %3) {
%5 = fmul double %0, 2.000000e+00
%6 = fmul double %5, %2
%7 = fmul double %5, %1
%8 = tail call i64 @pow(double %7, double 2.000000e+00)
%9 = sitofp i32 %3 to double
%10 = fadd double %9, -1.000000e+00
%11 = fmul double %10, 1.500000e+08
%12 = tail call i64 @pow(double %11, double 2.000000e+00)
%13 = add nsw i64 %12, %8
%14 = tail call double @sqrt(i64 %13)
%15 = fdiv double %6, %14
%16 = tail call double @atan(double %15)
ret double %16
}