#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 pow(double, int);
int tan(int);
void fermibubble(double xx, double yy, double zz, int *wfb) {
  double fbnz, fbsz, na, nb, sa, sb, N, S;
  fbnz = 0.5 * 8300 * tan(50 / 57.295779);
  fbsz = -(0.5 * (8300 * tan(50 / 57.295779) - 8300 * tan(0 / 57.295779)) +
           (8300 * tan(0 / 57.295779)));
  na = fbnz;
  nb = 8300 * tan(20 / 57.295779);
  sa = 0.5 * (8300 * tan(50 / 57.295779) - 8300 * tan(0 / 57.295779));
  sb = 8300 * tan(20 / 57.295779);
  N = (pow(xx, 2) / (nb * nb)) + (pow(yy, 2) / (nb * nb)) +
      (pow(zz - fbnz, 2) / (na * na));
  S = (pow(xx, 2) / (sb * sb)) + (pow(yy, 2) / (sb * sb)) +
      (pow(zz - fbsz, 2) / (sa * sa));
  if (N < 1 || S < 1)
    *wfb = 1;
  else
    *wfb = 0;
}


x86 assembly (clang, -O0):
<fermibubble>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
xor    %edi,%edi
call   1030 <tan@plt>
cvtsi2sd %eax,%xmm1
movsd  0xebf(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
xor    %edi,%edi
call   1030 <tan@plt>
imul   $0x206c,%eax,%eax
mov    %eax,-0x94(%rbp)
xor    %edi,%edi
call   1030 <tan@plt>
mov    %eax,%ecx
mov    -0x94(%rbp),%eax
imul   $0x206c,%ecx,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xor    %edi,%edi
call   1030 <tan@plt>
movsd  -0x90(%rbp),%xmm0
ff
imul   $0x206c,%eax,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe57(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
xor    %edi,%edi
call   1030 <tan@plt>
imul   $0x206c,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x40(%rbp)
xor    %edi,%edi
call   1030 <tan@plt>
imul   $0x206c,%eax,%eax
mov    %eax,-0x84(%rbp)
xor    %edi,%edi
call   1030 <tan@plt>
mov    %eax,%ecx
mov    -0x84(%rbp),%eax
imul   $0x206c,%ecx,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm1
movsd  0xddd(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
xor    %edi,%edi
call   1030 <tan@plt>
imul   $0x206c,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  -0x40(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
mulsd  -0x40(%rbp),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
mulsd  -0x38(%rbp),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  -0x50(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  -0x50(%rbp),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  -0x48(%rbp),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xca8(%rip),%xmm0
ucomisd -0x58(%rbp),%xmm0
ja     1376 <fermibubble+0x256>
movsd  0xc95(%rip),%xmm0
ucomisd -0x60(%rbp),%xmm0
jbe    1385 <fermibubble+0x265>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    138f <fermibubble+0x26f>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fermibubble>:
push   %rbp
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%rbx
movsd  %xmm2,0x38(%rsp)
movsd  %xmm1,0x30(%rsp)
movsd  %xmm0,0x40(%rsp)
xor    %edi,%edi
call   1030 <tan@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xeac(%rip),%xmm0
movapd %xmm0,0x70(%rsp)
xor    %edi,%edi
call   1030 <tan@plt>
mov    %eax,%ebp
xor    %edi,%edi
call   1030 <tan@plt>
sub    %eax,%ebp
imul   $0x206c,%ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %edi,%edi
call   1030 <tan@plt>
imul   $0x206c,%eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0xe67(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
xor    %edi,%edi
call   1030 <tan@plt>
imul   $0x206c,%eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd %xmm0,0x10(%rsp)
xor    %edi,%edi
call   1030 <tan@plt>
mov    %eax,%ebp
xor    %edi,%edi
call   1030 <tan@plt>
sub    %eax,%ebp
imul   $0x206c,%ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xe1c(%rip),%xmm0
movapd %xmm0,0x20(%rsp)
xor    %edi,%edi
call   1030 <tan@plt>
imul   $0x206c,%eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
unpcklpd 0x20(%rsp),%xmm0
movapd %xmm0,0x20(%rsp)
movsd  0x40(%rsp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,0x50(%rsp)
movsd  0x30(%rsp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,0x60(%rsp)
movapd 0x70(%rsp),%xmm1
movapd 0x10(%rsp),%xmm0
unpcklpd %xmm1,%xmm0
mulpd  %xmm0,%xmm0
movapd %xmm0,0x10(%rsp)
movsd  0x38(%rsp),%xmm0
subsd  %xmm1,%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movapd 0x50(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
divpd  0x10(%rsp),%xmm1
movapd %xmm1,0x50(%rsp)
movsd  0x40(%rsp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,0x40(%rsp)
movsd  0x30(%rsp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movapd 0x20(%rsp),%xmm2
mulpd  %xmm2,%xmm2
movapd %xmm2,0x20(%rsp)
unpcklpd 0x60(%rsp),%xmm0
unpcklpd 0x10(%rsp),%xmm2
divpd  %xmm2,%xmm0
movapd %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  0x38(%rsp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movapd 0x40(%rsp),%xmm2
unpcklpd %xmm0,%xmm2
divpd  0x20(%rsp),%xmm2
movapd %xmm2,%xmm0
movapd 0x50(%rsp),%xmm1
unpcklpd %xmm1,%xmm0
addpd  0x10(%rsp),%xmm0
unpckhpd %xmm1,%xmm2
addpd  %xmm0,%xmm2
cmpltpd 0xcfa(%rip),%xmm2
movmskpd %xmm2,%eax
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,(%rbx)
add    $0x88,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @fermibubble(double %0, double %1, double %2, i32* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i32*
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store i32* %3, i32** %8
%17 = call i32 @tan(i32 0)
%18 = sitofp i32 %17 to double
%19 = fmul double 4.150000e+03, %18
store double %19, double* %9
%20 = call i32 @tan(i32 0)
%21 = mul nsw i32 8300, %20
%22 = call i32 @tan(i32 0)
%23 = mul nsw i32 8300, %22
%24 = sub nsw i32 %21, %23
%25 = sitofp i32 %24 to double
%26 = call i32 @tan(i32 0)
%27 = mul nsw i32 8300, %26
%28 = sitofp i32 %27 to double
%29 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %25, double %28)
%30 = fneg double %29
store double %30, double* %10
%31 = load double, double* %9
store double %31, double* %11
%32 = call i32 @tan(i32 0)
%33 = mul nsw i32 8300, %32
%34 = sitofp i32 %33 to double
store double %34, double* %12
%35 = call i32 @tan(i32 0)
%36 = mul nsw i32 8300, %35
%37 = call i32 @tan(i32 0)
%38 = mul nsw i32 8300, %37
%39 = sub nsw i32 %36, %38
%40 = sitofp i32 %39 to double
%41 = fmul double 5.000000e-01, %40
store double %41, double* %13
%42 = call i32 @tan(i32 0)
%43 = mul nsw i32 8300, %42
%44 = sitofp i32 %43 to double
store double %44, double* %14
%45 = load double, double* %5
%46 = call double @pow(double %45, i32 2)
%47 = load double, double* %12
%48 = load double, double* %12
%49 = fmul double %47, %48
%50 = fdiv double %46, %49
%51 = load double, double* %6
%52 = call double @pow(double %51, i32 2)
%53 = load double, double* %12
%54 = load double, double* %12
%55 = fmul double %53, %54
%56 = fdiv double %52, %55
%57 = fadd double %50, %56
%58 = load double, double* %7
%59 = load double, double* %9
%60 = fsub double %58, %59
%61 = call double @pow(double %60, i32 2)
%62 = load double, double* %11
%63 = load double, double* %11
%64 = fmul double %62, %63
%65 = fdiv double %61, %64
%66 = fadd double %57, %65
store double %66, double* %15
%67 = load double, double* %5
%68 = call double @pow(double %67, i32 2)
%69 = load double, double* %14
%70 = load double, double* %14
%71 = fmul double %69, %70
%72 = fdiv double %68, %71
%73 = load double, double* %6
%74 = call double @pow(double %73, i32 2)
%75 = load double, double* %14
%76 = load double, double* %14
%77 = fmul double %75, %76
%78 = fdiv double %74, %77
%79 = fadd double %72, %78
%80 = load double, double* %7
%81 = load double, double* %10
%82 = fsub double %80, %81
%83 = call double @pow(double %82, i32 2)
%84 = load double, double* %13
%85 = load double, double* %13
%86 = fmul double %84, %85
%87 = fdiv double %83, %86
%88 = fadd double %79, %87
store double %88, double* %16
%89 = load double, double* %15
%90 = fcmp olt double %89, 1.000000e+00
br i1 %90, label %94, label %91
91: ; preds = %4
%92 = load double, double* %16
%93 = fcmp olt double %92, 1.000000e+00
br i1 %93, label %94, label %96
94: ; preds = %91, %4
%95 = load i32*, i32** %8
store i32 1, i32* %95
br label %98
96: ; preds = %91
%97 = load i32*, i32** %8
store i32 0, i32* %97
br label %98
98: ; preds = %96, %94
ret void
}

LLVM IR (-O2):
define void @fermibubble(double %0, double %1, double %2, i32* nocapture writeonly %3) {
%5 = tail call i32 @tan(i32 0)
%6 = sitofp i32 %5 to double
%7 = fmul double %6, 4.150000e+03
%8 = tail call i32 @tan(i32 0)
%9 = tail call i32 @tan(i32 0)
%10 = sub i32 %8, %9
%11 = mul i32 %10, 8300
%12 = sitofp i32 %11 to double
%13 = tail call i32 @tan(i32 0)
%14 = mul nsw i32 %13, 8300
%15 = sitofp i32 %14 to double
%16 = tail call double @llvm.fmuladd.f64(double %12, double 5.000000e-01, double %15)
%17 = tail call i32 @tan(i32 0)
%18 = mul nsw i32 %17, 8300
%19 = sitofp i32 %18 to double
%20 = tail call i32 @tan(i32 0)
%21 = tail call i32 @tan(i32 0)
%22 = sub i32 %20, %21
%23 = mul i32 %22, 8300
%24 = sitofp i32 %23 to double
%25 = fmul double %24, 5.000000e-01
%26 = tail call i32 @tan(i32 0)
%27 = mul nsw i32 %26, 8300
%28 = sitofp i32 %27 to double
%29 = tail call double @pow(double %0, i32 2)
%30 = tail call double @pow(double %1, i32 2)
%31 = insertelement <2 x double> poison, double %19, i64 0
%32 = insertelement <2 x double> %31, double %7, i64 1
%33 = fmul <2 x double> %32, %32
%34 = fsub double %2, %7
%35 = tail call double @pow(double %34, i32 2)
%36 = insertelement <2 x double> poison, double %29, i64 0
%37 = insertelement <2 x double> %36, double %35, i64 1
%38 = fdiv <2 x double> %37, %33
%39 = tail call double @pow(double %0, i32 2)
%40 = tail call double @pow(double %1, i32 2)
%41 = insertelement <2 x double> poison, double %28, i64 0
%42 = insertelement <2 x double> %41, double %25, i64 1
%43 = fmul <2 x double> %42, %42
%44 = insertelement <2 x double> poison, double %40, i64 0
%45 = insertelement <2 x double> %44, double %30, i64 1
%46 = shufflevector <2 x double> %43, <2 x double> %33, <2 x i32> <i32 0, i32 2>
%47 = fdiv <2 x double> %45, %46
%48 = fadd double %16, %2
%49 = tail call double @pow(double %48, i32 2)
%50 = insertelement <2 x double> poison, double %39, i64 0
%51 = insertelement <2 x double> %50, double %49, i64 1
%52 = fdiv <2 x double> %51, %43
%53 = shufflevector <2 x double> %52, <2 x double> %38, <2 x i32> <i32 0, i32 2>
%54 = fadd <2 x double> %53, %47
%55 = shufflevector <2 x double> %52, <2 x double> %38, <2 x i32> <i32 1, i32 3>
%56 = fadd <2 x double> %54, %55
%57 = fcmp olt <2 x double> %56, <double 1.000000e+00, double 1.000000e+00>
%58 = extractelement <2 x i1> %57, i64 0
%59 = extractelement <2 x i1> %57, i64 1
%60 = select i1 %59, i1 true, i1 %58
%61 = zext i1 %60 to i32
store i32 %61, i32* %3
ret void
}