#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 /*<<< orphan*/ abort();
double fn2(int);
double fn3(int);
double fn4(int);
int main() {
  double a = fn2(128);
  if (a != 14080.0)
    abort();
  double b = fn3(128);
  if (a != b)
    abort();
  double c = fn4(256);
  if (c != 28160.0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x80,%edi
call   1060 <fn2@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe95(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1180 <main+0x40>
jp     1180 <main+0x40>
jmp    1187 <main+0x47>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x80,%edi
call   1040 <fn3@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jne    11b1 <main+0x71>
jp     11b1 <main+0x71>
jmp    11b8 <main+0x78>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x100,%edi
call   1050 <fn4@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe34(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11e9 <main+0xa9>
jp     11e9 <main+0xa9>
jmp    11f0 <main+0xb0>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x80,%edi
call   1060 <fn2@plt>
ucomisd 0xead(%rip),%xmm0
jne    1187 <main+0x47>
jp     1187 <main+0x47>
mov    $0x80,%edi
call   1040 <fn3@plt>
ucomisd 0xe97(%rip),%xmm0
jne    1187 <main+0x47>
jp     1187 <main+0x47>
mov    $0x100,%edi
call   1050 <fn4@plt>
ucomisd 0xe89(%rip),%xmm0
jne    1187 <main+0x47>
jp     1187 <main+0x47>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
%5 = call double @fn2(i32 128)
store double %5, double* %2
%6 = load double, double* %2
%7 = fcmp une double %6, 1.408000e+04
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %0
%11 = call double @fn3(i32 128)
store double %11, double* %3
%12 = load double, double* %2
%13 = load double, double* %3
%14 = fcmp une double %12, %13
br i1 %14, label %15, label %17
15: ; preds = %10
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %10
%18 = call double @fn4(i32 256)
store double %18, double* %4
%19 = load double, double* %4
%20 = fcmp une double %19, 2.816000e+04
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 (...) @abort()
unreachable
23: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double @fn2(i32 128)
%2 = fcmp une double %1, 1.408000e+04
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call double @fn3(i32 128)
%7 = fcmp une double %6, 1.408000e+04
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call double @fn4(i32 256)
%12 = fcmp une double %11, 2.816000e+04
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %10
ret i32 0
}