#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 M_E;
int M_PI;
double M_PI_2;
double M_PI_4;
double cos(double);
double exp(int);
double fmax(double, double);
double fmin(double, double);
int log(int);
double pow(double, double);
double sin(double);
double err_bound(int N, double K, double d, double alpha, double beta) {
  double mu = fmin(alpha, beta);
  double nu = fmax(alpha, beta);
  double val = 4.0 / (M_PI * (1 - exp(-M_PI_2 * mu * M_E)));
  val /= (pow(cos(M_PI_2 * sin(d)), (alpha + beta) * 0.5) * cos(d));
  val += mu * exp(M_PI_4 * nu);
  val *= 2.0 * K / (M_PI * d * mu);
  return val * exp(-M_PI * d * N / log(4 * d * N / mu));
}


x86 assembly (clang, -O0):
<err_bound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm2
movaps %xmm2,%xmm4
movaps %xmm3,%xmm0
cmpunordsd %xmm0,%xmm0
movaps %xmm0,%xmm1
pand   %xmm4,%xmm1
minsd  %xmm3,%xmm2
pandn  %xmm2,%xmm0
por    %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm2
movaps %xmm2,%xmm4
movaps %xmm3,%xmm0
cmpunordsd %xmm0,%xmm0
movaps %xmm0,%xmm1
pand   %xmm4,%xmm1
maxsd  %xmm3,%xmm2
pandn  %xmm2,%xmm0
por    %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    0x2e18(%rip),%rax
cvtsi2sdl (%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    0x2df8(%rip),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    0x2dc1(%rip),%rax
mulsd  (%rax),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <exp@plt>
movsd  -0x70(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  0xdf4(%rip),%xmm0
subsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm1
movsd  0xdcc(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0x2d94(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1050 <cos@plt>
movsd  -0x20(%rbp),%xmm1
addsd  -0x28(%rbp),%xmm1
movsd  0xd96(%rip),%xmm2
mulsd  %xmm2,%xmm1
call   1070 <pow@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1050 <cos@plt>
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x2d26(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x38(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <exp@plt>
movaps %xmm0,%xmm2
movsd  -0x58(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xd1a(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mov    0x2cee(%rip),%rax
cvtsi2sdl (%rax),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
xor    %eax,%eax
mov    0x2cbf(%rip),%rcx
sub    (%rcx),%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x18(%rbp),%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xcb6(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x30(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1060 <log@plt>
movsd  -0x50(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_bound>:
push   %rbp
push   %r14
push   %rbx
sub    $0x60,%rsp
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x10(%rsp)
mov    %edi,%r14d
movapd %xmm2,%xmm4
cmpunordsd %xmm2,%xmm4
movapd %xmm4,%xmm0
andpd  %xmm3,%xmm0
movapd %xmm3,%xmm1
minsd  %xmm2,%xmm1
andnpd %xmm1,%xmm4
orpd   %xmm0,%xmm4
ucomisd %xmm2,%xmm2
movapd %xmm3,%xmm0
jp     119a <err_bound+0x4a>
movapd %xmm3,%xmm0
maxsd  %xmm2,%xmm0
movapd %xmm0,0x50(%rsp)
mov    0x2e41(%rip),%rbx
xorps  %xmm0,%xmm0
cvtsi2sdl (%rbx),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    0x2e1d(%rip),%rbp
movsd  0x0(%rbp),%xmm0
xorpd  0xe38(%rip),%xmm0
mulsd  %xmm4,%xmm0
mov    0x2df5(%rip),%rax
mulsd  (%rax),%xmm0
cvttsd2si %xmm0,%edi
movapd %xmm4,0x40(%rsp)
movsd  %xmm2,0x38(%rsp)
movapd %xmm3,0x20(%rsp)
call   1040 <exp@plt>
movsd  0xe16(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  0x8(%rsp),%xmm1
movsd  0xe0c(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x0(%rbp),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x18(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x30(%rsp),%xmm0
call   1050 <cos@plt>
movsd  0x38(%rsp),%xmm1
addsd  0x20(%rsp),%xmm1
mulsd  0xdd5(%rip),%xmm1
call   1070 <pow@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x18(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  0x20(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
mov    0x2d62(%rip),%rax
movapd 0x50(%rsp),%xmm0
mulsd  (%rax),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <exp@plt>
movapd 0x40(%rsp),%xmm2
mulsd  %xmm2,%xmm0
addsd  0x8(%rsp),%xmm0
movapd %xmm0,%xmm4
movsd  0x10(%rsp),%xmm1
addsd  %xmm1,%xmm1
mov    (%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x18(%rsp),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm4
movsd  %xmm4,0x8(%rsp)
neg    %eax
xorps  %xmm4,%xmm4
cvtsi2sd %eax,%xmm4
movapd %xmm3,%xmm1
mulsd  %xmm3,%xmm4
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
mulsd  %xmm0,%xmm4
movsd  %xmm4,0x10(%rsp)
mulsd  0xd19(%rip),%xmm1
mulsd  %xmm0,%xmm1
divsd  %xmm2,%xmm1
cvttsd2si %xmm1,%edi
call   1060 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1040 <exp@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@M_PI = global i32 0
@M_PI_2 = global double 0.000000e+00
@M_E = global double 0.000000e+00
@M_PI_4 = global double 0.000000e+00
define double @err_bound(i32 %0, double %1, double %2, double %3, double %4) {
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
store i32 %0, i32* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%14 = load double, double* %9
%15 = load double, double* %10
%16 = call double @llvm.minnum.f64(double %14, double %15)
store double %16, double* %11
%17 = load double, double* %9
%18 = load double, double* %10
%19 = call double @llvm.maxnum.f64(double %17, double %18)
store double %19, double* %12
%20 = load i32, i32* @M_PI
%21 = sitofp i32 %20 to double
%22 = load double, double* @M_PI_2
%23 = fneg double %22
%24 = load double, double* %11
%25 = fmul double %23, %24
%26 = load double, double* @M_E
%27 = fmul double %25, %26
%28 = fptosi double %27 to i32
%29 = call double @exp(i32 %28)
%30 = fsub double 1.000000e+00, %29
%31 = fmul double %21, %30
%32 = fdiv double 4.000000e+00, %31
store double %32, double* %13
%33 = load double, double* @M_PI_2
%34 = load double, double* %8
%35 = call double @sin(double %34)
%36 = fmul double %33, %35
%37 = call double @cos(double %36)
%38 = load double, double* %9
%39 = load double, double* %10
%40 = fadd double %38, %39
%41 = fmul double %40, 5.000000e-01
%42 = call double @pow(double %37, double %41)
%43 = load double, double* %8
%44 = call double @cos(double %43)
%45 = fmul double %42, %44
%46 = load double, double* %13
%47 = fdiv double %46, %45
store double %47, double* %13
%48 = load double, double* %11
%49 = load double, double* @M_PI_4
%50 = load double, double* %12
%51 = fmul double %49, %50
%52 = fptosi double %51 to i32
%53 = call double @exp(i32 %52)
%54 = load double, double* %13
%55 = call double @llvm.fmuladd.f64(double %48, double %53, double %54)
store double %55, double* %13
%56 = load double, double* %7
%57 = fmul double 2.000000e+00, %56
%58 = load i32, i32* @M_PI
%59 = sitofp i32 %58 to double
%60 = load double, double* %8
%61 = fmul double %59, %60
%62 = load double, double* %11
%63 = fmul double %61, %62
%64 = fdiv double %57, %63
%65 = load double, double* %13
%66 = fmul double %65, %64
store double %66, double* %13
%67 = load double, double* %13
%68 = load i32, i32* @M_PI
%69 = sub nsw i32 0, %68
%70 = sitofp i32 %69 to double
%71 = load double, double* %8
%72 = fmul double %70, %71
%73 = load i32, i32* %6
%74 = sitofp i32 %73 to double
%75 = fmul double %72, %74
%76 = load double, double* %8
%77 = fmul double 4.000000e+00, %76
%78 = load i32, i32* %6
%79 = sitofp i32 %78 to double
%80 = fmul double %77, %79
%81 = load double, double* %11
%82 = fdiv double %80, %81
%83 = fptosi double %82 to i32
%84 = call i32 @log(i32 %83)
%85 = sitofp i32 %84 to double
%86 = fdiv double %75, %85
%87 = fptosi double %86 to i32
%88 = call double @exp(i32 %87)
%89 = fmul double %67, %88
ret double %89
}

LLVM IR (-O2):
@M_PI = global i32 0
@M_PI_2 = global double 0.000000e+00
@M_E = global double 0.000000e+00
@M_PI_4 = global double 0.000000e+00
define double @err_bound(i32 %0, double %1, double %2, double %3, double %4) {
%6 = tail call double @llvm.minnum.f64(double %3, double %4)
%7 = tail call double @llvm.maxnum.f64(double %3, double %4)
%8 = load i32, i32* @M_PI
%9 = sitofp i32 %8 to double
%10 = load double, double* @M_PI_2
%11 = fneg double %10
%12 = fmul double %6, %11
%13 = load double, double* @M_E
%14 = fmul double %12, %13
%15 = fptosi double %14 to i32
%16 = tail call double @exp(i32 %15)
%17 = fsub double 1.000000e+00, %16
%18 = fmul double %17, %9
%19 = fdiv double 4.000000e+00, %18
%20 = load double, double* @M_PI_2
%21 = tail call double @sin(double %2)
%22 = fmul double %20, %21
%23 = tail call double @cos(double %22)
%24 = fadd double %3, %4
%25 = fmul double %24, 5.000000e-01
%26 = tail call double @pow(double %23, double %25)
%27 = tail call double @cos(double %2)
%28 = fmul double %26, %27
%29 = fdiv double %19, %28
%30 = load double, double* @M_PI_4
%31 = fmul double %7, %30
%32 = fptosi double %31 to i32
%33 = tail call double @exp(i32 %32)
%34 = tail call double @llvm.fmuladd.f64(double %6, double %33, double %29)
%35 = fmul double %1, 2.000000e+00
%36 = load i32, i32* @M_PI
%37 = sitofp i32 %36 to double
%38 = fmul double %37, %2
%39 = fmul double %6, %38
%40 = fdiv double %35, %39
%41 = fmul double %34, %40
%42 = sub nsw i32 0, %36
%43 = sitofp i32 %42 to double
%44 = fmul double %43, %2
%45 = sitofp i32 %0 to double
%46 = fmul double %44, %45
%47 = fmul double %2, 4.000000e+00
%48 = fmul double %47, %45
%49 = fdiv double %48, %6
%50 = fptosi double %49 to i32
%51 = tail call i32 @log(i32 %50)
%52 = sitofp i32 %51 to double
%53 = fdiv double %46, %52
%54 = fptosi double %53 to i32
%55 = tail call double @exp(i32 %54)
%56 = fmul double %55, %41
ret double %56
}