#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*/ exit(int /*<<< orphan*/);
long double frexpl(long double, int *);
long double ldexpl(long double, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ prnum(char *, long double *);
void main() {
  long double x, f, y, last, z, z0, y1;
  int i, k, e, e0, errs;
  errs = 0;
  f = 0.1L;
  x = f;
  last = x;
  z0 = frexpl(x, &e0);
  printf("frexpl(%.2Le) = %.5Le, %d\n", x, z0, e0);
  k = 0;
  for (i = 0; i < 16382 + 5; i++) {
    y = ldexpl(f, k);
    if (y != x) {
      printf("ldexpl(%.1Le, %d) = %.5Le, s.b. %.5Le\n", f, k, y, x);
      ++errs;
    }
    z = frexpl(y, &e);
    if ((e != k + e0) || (z != z0)) {
      printf("frexpl(%.1Le) = %.5Le, %d; s.b. %.5Le, %d\n", y, z, e, z0,
             k + e0);
      ++errs;
    }
    x += x;
    if (x == last)
      break;
    last = x;
    k += 1;
  }
  printf("i = %d\n", k);
  prnum("last y =", &y);
  printf("\n");
  f = 0.1L;
  x = f;
  last = x;
  k = 0;
  for (i = 0; i < 16382 + 64; i++) {
    y = ldexpl(f, k);
    if (y != x) {
      printf("ldexpl(%.1Le, %d) = %.5Le, s.b. %.5Le\n", f, k, y, x);
      ++errs;
    }
    z = frexpl(y, &e);
    if ((e > -16382 + 1) && ((e != k + e0) || (z != z0))) {
      printf("frexpl(%.1Le) = %.5Le, %d; s.b. %.5Le, %d\n", y, z, e, z0,
             k + e0);
      ++errs;
    }
    y1 = ldexpl(z, e);
    if (y1 != y) {
      printf("ldexpl(%.1Le, %d) = %.5Le, s.b. %.5Le\n", z, e, y1, y);
      ++errs;
    }
    x *= 0.5L;
    if (x == 0.0L)
      break;
    if (x == last)
      break;
    last = x;
    k -= 1;
  }
  printf("i = %d\n", k);
  prnum("last y =", &y);
  printf("\n%d errors\n", errs);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x84(%rbp)
fldt   0xe95(%rip)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpt  -0x40(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    -0x80(%rbp),%rdi
call   1040 <frexpl@plt>
fstpt  -0x60(%rbp)
fldt   -0x10(%rbp)
fldt   -0x60(%rbp)
mov    -0x80(%rbp),%esi
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
lea    0xe6e(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x0,-0x78(%rbp)
movl   $0x0,-0x74(%rbp)
cmpl   $0x4003,-0x74(%rbp)
jge    12ef <main+0x19f>
fldt   -0x20(%rbp)
mov    -0x78(%rbp),%edi
mov    %rsp,%rax
fstpt  (%rax)
call   1050 <ldexpl@plt>
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
fldt   -0x10(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    11f8 <main+0xa8>
jp     11f8 <main+0xa8>
jmp    122c <main+0xdc>
fldt   -0x20(%rbp)
mov    -0x78(%rbp),%esi
fldt   -0x30(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  0x20(%rax)
fstpt  0x10(%rax)
fstpt  (%rax)
lea    0xe19(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    -0x7c(%rbp),%rdi
call   1040 <frexpl@plt>
fstpt  -0x50(%rbp)
mov    -0x7c(%rbp),%eax
mov    -0x78(%rbp),%ecx
add    -0x80(%rbp),%ecx
cmp    %ecx,%eax
jne    126e <main+0x11e>
fldt   -0x50(%rbp)
fldt   -0x60(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    126e <main+0x11e>
jp     126e <main+0x11e>
jmp    12a8 <main+0x158>
fldt   -0x30(%rbp)
fldt   -0x50(%rbp)
mov    -0x7c(%rbp),%esi
fldt   -0x60(%rbp)
mov    -0x78(%rbp),%edx
add    -0x80(%rbp),%edx
mov    %rsp,%rax
fstpt  0x20(%rax)
fstpt  0x10(%rax)
fstpt  (%rax)
lea    0xdc4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
fldt   -0x10(%rbp)
fadd   %st,%st(0)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x40(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    12d2 <main+0x182>
jp     12d2 <main+0x182>
jmp    12cd <main+0x17d>
jmp    12ef <main+0x19f>
fldt   -0x10(%rbp)
fstpt  -0x40(%rbp)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    11bb <main+0x6b>
mov    -0x78(%rbp),%esi
lea    0xd88(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x85(%rbp)
call   1030 <printf@plt>
lea    0xd7c(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   1060 <prnum@plt>
mov    -0x85(%rbp),%al
lea    0xd5c(%rip),%rdi
call   1030 <printf@plt>
fldt   0xcd2(%rip)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpt  -0x40(%rbp)
movl   $0x0,-0x78(%rbp)
movl   $0x0,-0x74(%rbp)
cmpl   $0x403e,-0x74(%rbp)
jge    1517 <main+0x3c7>
fldt   -0x20(%rbp)
mov    -0x78(%rbp),%edi
mov    %rsp,%rax
fstpt  (%rax)
call   1050 <ldexpl@plt>
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
fldt   -0x10(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1388 <main+0x238>
jp     1388 <main+0x238>
jmp    13bc <main+0x26c>
fldt   -0x20(%rbp)
mov    -0x78(%rbp),%esi
fldt   -0x30(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  0x20(%rax)
fstpt  0x10(%rax)
fstpt  (%rax)
lea    0xc89(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    -0x7c(%rbp),%rdi
call   1040 <frexpl@plt>
fstpt  -0x50(%rbp)
cmpl   $0xffffc003,-0x7c(%rbp)
jle    1445 <main+0x2f5>
mov    -0x7c(%rbp),%eax
mov    -0x78(%rbp),%ecx
add    -0x80(%rbp),%ecx
cmp    %ecx,%eax
jne    140b <main+0x2bb>
fldt   -0x50(%rbp)
fldt   -0x60(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    140b <main+0x2bb>
jp     140b <main+0x2bb>
jmp    1445 <main+0x2f5>
fldt   -0x30(%rbp)
fldt   -0x50(%rbp)
mov    -0x7c(%rbp),%esi
fldt   -0x60(%rbp)
mov    -0x78(%rbp),%edx
add    -0x80(%rbp),%edx
mov    %rsp,%rax
fstpt  0x20(%rax)
fstpt  0x10(%rax)
fstpt  (%rax)
lea    0xc27(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
fldt   -0x50(%rbp)
mov    -0x7c(%rbp),%edi
mov    %rsp,%rax
fstpt  (%rax)
call   1050 <ldexpl@plt>
fstpt  -0x70(%rbp)
fldt   -0x70(%rbp)
fldt   -0x30(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1475 <main+0x325>
jp     1475 <main+0x325>
jmp    14a9 <main+0x359>
fldt   -0x50(%rbp)
mov    -0x7c(%rbp),%esi
fldt   -0x70(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  0x20(%rax)
fstpt  0x10(%rax)
fstpt  (%rax)
lea    0xb9c(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
fldt   -0x10(%rbp)
flds   0xb5e(%rip)
fmulp  %st,%st(1)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldz
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    14d8 <main+0x388>
jp     14d8 <main+0x388>
jmp    14d3 <main+0x383>
jmp    1517 <main+0x3c7>
fldt   -0x10(%rbp)
fldt   -0x40(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    14fa <main+0x3aa>
jp     14fa <main+0x3aa>
jmp    14f5 <main+0x3a5>
jmp    1517 <main+0x3c7>
fldt   -0x10(%rbp)
fstpt  -0x40(%rbp)
mov    -0x78(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x78(%rbp)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    134b <main+0x1fb>
mov    -0x78(%rbp),%esi
lea    0xb60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xb5a(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   1060 <prnum@plt>
mov    -0x84(%rbp),%esi
lea    0xb4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
fldt   0xe89(%rip)
fld    %st(0)
fstpt  0x3c(%rsp)
fstpt  (%rsp)
lea    0x6c(%rsp),%rdi
call   1050 <frexpl@plt>
mov    0x6c(%rsp),%r14d
fld    %st(0)
fstpt  0x60(%rsp)
fstpt  0x10(%rsp)
fldt   0x3c(%rsp)
fstpt  (%rsp)
lea    0xe6d(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
fldt   0x3c(%rsp)
lea    0xe73(%rip),%r15
lea    0x38(%rsp),%r12
lea    0xe8e(%rip),%r13
xor    %ebp,%ebp
xor    %ebx,%ebx
fld    %st(0)
xchg   %ax,%ax
fstpt  0x48(%rsp)
fstpt  (%rsp)
mov    %ebx,%edi
call   1060 <ldexpl@plt>
fldt   0x48(%rsp)
fld    %st(1)
fstpt  0x70(%rsp)
fxch   %st(1)
fucomi %st(1),%st
fld    %st(0)
fstpt  0x54(%rsp)
jne    11f6 <main+0x96>
jnp    1220 <main+0xc0>
fxch   %st(1)
fstpt  0x20(%rsp)
fstpt  0x10(%rsp)
fldt   0x3c(%rsp)
fstpt  (%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
fldt   0x54(%rsp)
add    $0x1,%ebp
jmp    1222 <main+0xc2>
nopl   0x0(%rax)
fstp   %st(1)
fstpt  (%rsp)
mov    %r12,%rdi
call   1050 <frexpl@plt>
mov    0x38(%rsp),%esi
lea    (%r14,%rbx,1),%edx
cmp    %esi,%edx
jne    1250 <main+0xf0>
fldt   0x60(%rsp)
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
jne    1250 <main+0xf0>
jp     1250 <main+0xf0>
fstp   %st(0)
jmp    1270 <main+0x110>
nopl   0x0(%rax,%rax,1)
fldt   0x60(%rsp)
fstpt  0x20(%rsp)
fstpt  0x10(%rsp)
fldt   0x54(%rsp)
fstpt  (%rsp)
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
fldt   0x48(%rsp)
fld    %st(0)
fadd   %st(1),%st
fucomi %st(1),%st
fstp   %st(1)
jne    1280 <main+0x120>
jnp    12a0 <main+0x140>
add    $0x1,%ebx
cmp    $0x4003,%ebx
fldt   0x3c(%rsp)
fxch   %st(1)
jne    11d0 <main+0x70>
fstp   %st(1)
fstp   %st(0)
mov    $0x4003,%ebx
jmp    12a2 <main+0x142>
fstp   %st(0)
lea    0xdd8(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdd0(%rip),%rdi
lea    0x70(%rsp),%rsi
call   1070 <prnum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
fldt   0xd2d(%rip)
lea    0xd55(%rip),%r15
lea    0x38(%rsp),%r12
xor    %ebx,%ebx
fld    %st(0)
fld    %st(1)
fstpt  0x3c(%rsp)
nopl   0x0(%rax)
fstpt  0x48(%rsp)
fstpt  (%rsp)
mov    %ebx,%edi
call   1060 <ldexpl@plt>
fldt   0x48(%rsp)
fld    %st(1)
fstpt  0x70(%rsp)
fxch   %st(1)
fucomi %st(1),%st
jne    1310 <main+0x1b0>
jnp    1340 <main+0x1e0>
fxch   %st(1)
fstpt  0x20(%rsp)
fstpt  0x10(%rsp)
fldt   0x3c(%rsp)
fstpt  (%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
fldt   0x70(%rsp)
jmp    1342 <main+0x1e2>
cs nopw 0x0(%rax,%rax,1)
fstp   %st(1)
fstpt  (%rsp)
mov    %r12,%rdi
call   1050 <frexpl@plt>
fld    %st(0)
mov    0x38(%rsp),%r13d
cmp    $0xffffc004,%r13d
fxch   %st(1)
fstpt  0x54(%rsp)
jl     13a7 <main+0x247>
lea    (%r14,%rbx,1),%edx
cmp    %r13d,%edx
jne    137a <main+0x21a>
fldt   0x60(%rsp)
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
jne    137a <main+0x21a>
jnp    13a7 <main+0x247>
fldt   0x70(%rsp)
fldt   0x60(%rsp)
fstpt  0x20(%rsp)
fxch   %st(1)
fstpt  0x10(%rsp)
fstpt  (%rsp)
lea    0xcc0(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
fldt   0x54(%rsp)
add    $0x1,%ebp
fstpt  (%rsp)
mov    %r13d,%edi
call   1060 <ldexpl@plt>
fldt   0x70(%rsp)
fxch   %st(1)
fucomi %st(1),%st
jne    13be <main+0x25e>
jnp    13f0 <main+0x290>
fxch   %st(1)
fstpt  0x20(%rsp)
fstpt  0x10(%rsp)
fldt   0x54(%rsp)
fstpt  (%rsp)
mov    %r15,%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
jmp    13f4 <main+0x294>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
fstp   %st(0)
fstp   %st(0)
fldt   0x48(%rsp)
fld    %st(0)
fmuls  0xc10(%rip)
fldz
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
jne    140c <main+0x2ac>
jnp    1434 <main+0x2d4>
fucomi %st(1),%st
fstp   %st(1)
jne    1414 <main+0x2b4>
jnp    1436 <main+0x2d6>
add    $0xffffffff,%ebx
cmp    $0xffffbfc2,%ebx
fldt   0x3c(%rsp)
fxch   %st(1)
jne    12f0 <main+0x190>
fstp   %st(1)
fstp   %st(0)
mov    $0xffffbfc2,%ebx
jmp    1438 <main+0x2d8>
fstp   %st(0)
fstp   %st(0)
lea    0xc42(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc3a(%rip),%rdi
lea    0x70(%rsp),%rsi
call   1070 <prnum@plt>
lea    0xc32(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"frexpl(%.2Le) = %.5Le, %d\0A\00"
@.str.1 = [39 x i8] c"ldexpl(%.1Le, %d) = %.5Le, s.b. %.5Le\0A\00"
@.str.2 = [43 x i8] c"frexpl(%.1Le) = %.5Le, %d; s.b. %.5Le, %d\0A\00"
@.str.3 = [8 x i8] c"i = %d\0A\00"
@.str.4 = [9 x i8] c"last y =\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [12 x i8] c"\0A%d errors\0A\00"
define void @main() {
%1 = alloca x86_fp80
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = alloca x86_fp80
%6 = alloca x86_fp80
%7 = alloca x86_fp80
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %12
store x86_fp80 0xK3FFBCCCCCCCCCCCCCCCD, x86_fp80* %2
%13 = load x86_fp80, x86_fp80* %2
store x86_fp80 %13, x86_fp80* %1
%14 = load x86_fp80, x86_fp80* %1
store x86_fp80 %14, x86_fp80* %4
%15 = load x86_fp80, x86_fp80* %1
%16 = call x86_fp80 @frexpl(x86_fp80 %15, i32* %11)
store x86_fp80 %16, x86_fp80* %6
%17 = load x86_fp80, x86_fp80* %1
%18 = load x86_fp80, x86_fp80* %6
%19 = load i32, i32* %11
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), x86_fp80 %17, x86_fp80 %18, i32 %19)
store i32 0, i32* %9
store i32 0, i32* %8
br label %21
21: ; preds = %74, %0
%22 = load i32, i32* %8
%23 = icmp slt i32 %22, 16387
br i1 %23, label %24, label %77
24: ; preds = %21
%25 = load x86_fp80, x86_fp80* %2
%26 = load i32, i32* %9
%27 = call x86_fp80 @ldexpl(x86_fp80 %25, i32 %26)
store x86_fp80 %27, x86_fp80* %3
%28 = load x86_fp80, x86_fp80* %3
%29 = load x86_fp80, x86_fp80* %1
%30 = fcmp une x86_fp80 %28, %29
br i1 %30, label %31, label %39
31: ; preds = %24
%32 = load x86_fp80, x86_fp80* %2
%33 = load i32, i32* %9
%34 = load x86_fp80, x86_fp80* %3
%35 = load x86_fp80, x86_fp80* %1
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %32, i32 %33, x86_fp80 %34, x86_fp80 %35)
%37 = load i32, i32* %12
%38 = add nsw i32 %37, 1
store i32 %38, i32* %12
br label %39
39: ; preds = %31, %24
%40 = load x86_fp80, x86_fp80* %3
%41 = call x86_fp80 @frexpl(x86_fp80 %40, i32* %10)
store x86_fp80 %41, x86_fp80* %5
%42 = load i32, i32* %10
%43 = load i32, i32* %9
%44 = load i32, i32* %11
%45 = add nsw i32 %43, %44
%46 = icmp ne i32 %42, %45
br i1 %46, label %51, label %47
47: ; preds = %39
%48 = load x86_fp80, x86_fp80* %5
%49 = load x86_fp80, x86_fp80* %6
%50 = fcmp une x86_fp80 %48, %49
br i1 %50, label %51, label %62
51: ; preds = %47, %39
%52 = load x86_fp80, x86_fp80* %3
%53 = load x86_fp80, x86_fp80* %5
%54 = load i32, i32* %10
%55 = load x86_fp80, x86_fp80* %6
%56 = load i32, i32* %9
%57 = load i32, i32* %11
%58 = add nsw i32 %56, %57
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), x86_fp80 %52, x86_fp80 %53, i32 %54, x86_fp80 %55, i32 %58)
%60 = load i32, i32* %12
%61 = add nsw i32 %60, 1
store i32 %61, i32* %12
br label %62
62: ; preds = %51, %47
%63 = load x86_fp80, x86_fp80* %1
%64 = load x86_fp80, x86_fp80* %1
%65 = fadd x86_fp80 %64, %63
store x86_fp80 %65, x86_fp80* %1
%66 = load x86_fp80, x86_fp80* %1
%67 = load x86_fp80, x86_fp80* %4
%68 = fcmp oeq x86_fp80 %66, %67
br i1 %68, label %69, label %70
69: ; preds = %62
br label %77
70: ; preds = %62
%71 = load x86_fp80, x86_fp80* %1
store x86_fp80 %71, x86_fp80* %4
%72 = load i32, i32* %9
%73 = add nsw i32 %72, 1
store i32 %73, i32* %9
br label %74
74: ; preds = %70
%75 = load i32, i32* %8
%76 = add nsw i32 %75, 1
store i32 %76, i32* %8
br label %21
77: ; preds = %69, %21
%78 = load i32, i32* %9
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %78)
%80 = call i32 @prnum(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), x86_fp80* %3)
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store x86_fp80 0xK3FFBCCCCCCCCCCCCCCCD, x86_fp80* %2
%82 = load x86_fp80, x86_fp80* %2
store x86_fp80 %82, x86_fp80* %1
%83 = load x86_fp80, x86_fp80* %1
store x86_fp80 %83, x86_fp80* %4
store i32 0, i32* %9
store i32 0, i32* %8
br label %84
84: ; preds = %158, %77
%85 = load i32, i32* %8
%86 = icmp slt i32 %85, 16446
br i1 %86, label %87, label %161
87: ; preds = %84
%88 = load x86_fp80, x86_fp80* %2
%89 = load i32, i32* %9
%90 = call x86_fp80 @ldexpl(x86_fp80 %88, i32 %89)
store x86_fp80 %90, x86_fp80* %3
%91 = load x86_fp80, x86_fp80* %3
%92 = load x86_fp80, x86_fp80* %1
%93 = fcmp une x86_fp80 %91, %92
br i1 %93, label %94, label %102
94: ; preds = %87
%95 = load x86_fp80, x86_fp80* %2
%96 = load i32, i32* %9
%97 = load x86_fp80, x86_fp80* %3
%98 = load x86_fp80, x86_fp80* %1
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %95, i32 %96, x86_fp80 %97, x86_fp80 %98)
%100 = load i32, i32* %12
%101 = add nsw i32 %100, 1
store i32 %101, i32* %12
br label %102
102: ; preds = %94, %87
%103 = load x86_fp80, x86_fp80* %3
%104 = call x86_fp80 @frexpl(x86_fp80 %103, i32* %10)
store x86_fp80 %104, x86_fp80* %5
%105 = load i32, i32* %10
%106 = icmp sgt i32 %105, -16381
br i1 %106, label %107, label %128
107: ; preds = %102
%108 = load i32, i32* %10
%109 = load i32, i32* %9
%110 = load i32, i32* %11
%111 = add nsw i32 %109, %110
%112 = icmp ne i32 %108, %111
br i1 %112, label %117, label %113
113: ; preds = %107
%114 = load x86_fp80, x86_fp80* %5
%115 = load x86_fp80, x86_fp80* %6
%116 = fcmp une x86_fp80 %114, %115
br i1 %116, label %117, label %128
117: ; preds = %113, %107
%118 = load x86_fp80, x86_fp80* %3
%119 = load x86_fp80, x86_fp80* %5
%120 = load i32, i32* %10
%121 = load x86_fp80, x86_fp80* %6
%122 = load i32, i32* %9
%123 = load i32, i32* %11
%124 = add nsw i32 %122, %123
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), x86_fp80 %118, x86_fp80 %119, i32 %120, x86_fp80 %121, i32 %124)
%126 = load i32, i32* %12
%127 = add nsw i32 %126, 1
store i32 %127, i32* %12
br label %128
128: ; preds = %117, %113, %102
%129 = load x86_fp80, x86_fp80* %5
%130 = load i32, i32* %10
%131 = call x86_fp80 @ldexpl(x86_fp80 %129, i32 %130)
store x86_fp80 %131, x86_fp80* %7
%132 = load x86_fp80, x86_fp80* %7
%133 = load x86_fp80, x86_fp80* %3
%134 = fcmp une x86_fp80 %132, %133
br i1 %134, label %135, label %143
135: ; preds = %128
%136 = load x86_fp80, x86_fp80* %5
%137 = load i32, i32* %10
%138 = load x86_fp80, x86_fp80* %7
%139 = load x86_fp80, x86_fp80* %3
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %136, i32 %137, x86_fp80 %138, x86_fp80 %139)
%141 = load i32, i32* %12
%142 = add nsw i32 %141, 1
store i32 %142, i32* %12
br label %143
143: ; preds = %135, %128
%144 = load x86_fp80, x86_fp80* %1
%145 = fmul x86_fp80 %144, 0xK3FFE8000000000000000
store x86_fp80 %145, x86_fp80* %1
%146 = load x86_fp80, x86_fp80* %1
%147 = fcmp oeq x86_fp80 %146, 0xK00000000000000000000
br i1 %147, label %148, label %149
148: ; preds = %143
br label %161
149: ; preds = %143
%150 = load x86_fp80, x86_fp80* %1
%151 = load x86_fp80, x86_fp80* %4
%152 = fcmp oeq x86_fp80 %150, %151
br i1 %152, label %153, label %154
153: ; preds = %149
br label %161
154: ; preds = %149
%155 = load x86_fp80, x86_fp80* %1
store x86_fp80 %155, x86_fp80* %4
%156 = load i32, i32* %9
%157 = sub nsw i32 %156, 1
store i32 %157, i32* %9
br label %158
158: ; preds = %154
%159 = load i32, i32* %8
%160 = add nsw i32 %159, 1
store i32 %160, i32* %8
br label %84
161: ; preds = %153, %148, %84
%162 = load i32, i32* %9
%163 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %162)
%164 = call i32 @prnum(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), x86_fp80* %3)
%165 = load i32, i32* %12
%166 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %165)
%167 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"frexpl(%.2Le) = %.5Le, %d\0A\00"
@.str.1 = [39 x i8] c"ldexpl(%.1Le, %d) = %.5Le, s.b. %.5Le\0A\00"
@.str.2 = [43 x i8] c"frexpl(%.1Le) = %.5Le, %d; s.b. %.5Le, %d\0A\00"
@.str.3 = [8 x i8] c"i = %d\0A\00"
@.str.4 = [9 x i8] c"last y =\00"
@.str.6 = [12 x i8] c"\0A%d errors\0A\00"
define void @main() {
%1 = alloca x86_fp80
%2 = alloca i32
%3 = alloca i32
%4 = bitcast x86_fp80* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call x86_fp80 @frexpl(x86_fp80 0xK3FFBCCCCCCCCCCCCCCCD, i32* %3)
%8 = load i32, i32* %3
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), x86_fp80 0xK3FFBCCCCCCCCCCCCCCCD, x86_fp80 %7, i32 %8)
br label %10
10: ; preds = %0, %34
%11 = phi i32 [ 0, %0 ], [ %31, %34 ]
%12 = phi i32 [ 0, %0 ], [ %35, %34 ]
%13 = phi x86_fp80 [ 0xK3FFBCCCCCCCCCCCCCCCD, %0 ], [ %32, %34 ]
%14 = tail call x86_fp80 @ldexpl(x86_fp80 0xK3FFBCCCCCCCCCCCCCCCD, i32 %12)
store x86_fp80 %14, x86_fp80* %1
%15 = fcmp une x86_fp80 %14, %13
br i1 %15, label %16, label %19
16: ; preds = %10
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), x86_fp80 0xK3FFBCCCCCCCCCCCCCCCD, i32 %12, x86_fp80 %14, x86_fp80 %13)
%18 = add nsw i32 %11, 1
br label %19
19: ; preds = %16, %10
%20 = phi i32 [ %18, %16 ], [ %11, %10 ]
%21 = call x86_fp80 @frexpl(x86_fp80 %14, i32* %2)
%22 = load i32, i32* %2
%23 = add nsw i32 %12, %8
%24 = icmp ne i32 %22, %23
%25 = fcmp une x86_fp80 %21, %7
%26 = select i1 %24, i1 true, i1 %25
br i1 %26, label %27, label %30
27: ; preds = %19
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), x86_fp80 %14, x86_fp80 %21, i32 %22, x86_fp80 %7, i32 %23)
%29 = add nsw i32 %20, 1
br label %30
30: ; preds = %19, %27
%31 = phi i32 [ %29, %27 ], [ %20, %19 ]
%32 = fadd x86_fp80 %13, %13
%33 = fcmp oeq x86_fp80 %32, %13
br i1 %33, label %37, label %34
34: ; preds = %30
%35 = add nuw nsw i32 %12, 1
%36 = icmp eq i32 %35, 16387
br i1 %36, label %37, label %10
37: ; preds = %30, %34
%38 = phi i32 [ %12, %30 ], [ 16387, %34 ]
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %38)
%40 = call i32 @prnum(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), x86_fp80* %1)
%41 = call i32 @putchar(i32 10)
br label %42
42: ; preds = %37, %82
%43 = phi i32 [ %31, %37 ], [ %77, %82 ]
%44 = phi i32 [ 0, %37 ], [ %83, %82 ]
%45 = phi i32 [ 0, %37 ], [ %84, %82 ]
%46 = phi x86_fp80 [ 0xK3FFBCCCCCCCCCCCCCCCD, %37 ], [ %78, %82 ]
%47 = call x86_fp80 @ldexpl(x86_fp80 0xK3FFBCCCCCCCCCCCCCCCD, i32 %44)
store x86_fp80 %47, x86_fp80* %1
%48 = fcmp une x86_fp80 %47, %46
br i1 %48, label %49, label %53
49: ; preds = %42
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), x86_fp80 0xK3FFBCCCCCCCCCCCCCCCD, i32 %44, x86_fp80 %47, x86_fp80 %46)
%51 = add nsw i32 %43, 1
%52 = load x86_fp80, x86_fp80* %1
br label %53
53: ; preds = %49, %42
%54 = phi x86_fp80 [ %52, %49 ], [ %47, %42 ]
%55 = phi i32 [ %51, %49 ], [ %43, %42 ]
%56 = call x86_fp80 @frexpl(x86_fp80 %54, i32* %2)
%57 = load i32, i32* %2
%58 = icmp sgt i32 %57, -16381
br i1 %58, label %59, label %68
59: ; preds = %53
%60 = add nsw i32 %44, %8
%61 = icmp ne i32 %57, %60
%62 = fcmp une x86_fp80 %56, %7
%63 = select i1 %61, i1 true, i1 %62
br i1 %63, label %64, label %68
64: ; preds = %59
%65 = load x86_fp80, x86_fp80* %1
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), x86_fp80 %65, x86_fp80 %56, i32 %57, x86_fp80 %7, i32 %60)
%67 = add nsw i32 %55, 1
br label %68
68: ; preds = %59, %64, %53
%69 = phi i32 [ %67, %64 ], [ %55, %53 ], [ %55, %59 ]
%70 = call x86_fp80 @ldexpl(x86_fp80 %56, i32 %57)
%71 = load x86_fp80, x86_fp80* %1
%72 = fcmp une x86_fp80 %70, %71
br i1 %72, label %73, label %76
73: ; preds = %68
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %56, i32 %57, x86_fp80 %70, x86_fp80 %71)
%75 = add nsw i32 %69, 1
br label %76
76: ; preds = %73, %68
%77 = phi i32 [ %75, %73 ], [ %69, %68 ]
%78 = fmul x86_fp80 %46, 0xK3FFE8000000000000000
%79 = fcmp oeq x86_fp80 %78, 0xK00000000000000000000
%80 = fcmp oeq x86_fp80 %78, %46
%81 = or i1 %79, %80
br i1 %81, label %86, label %82
82: ; preds = %76
%83 = add nsw i32 %44, -1
%84 = add nuw nsw i32 %45, 1
%85 = icmp eq i32 %84, 16446
br i1 %85, label %86, label %42
86: ; preds = %76, %82
%87 = phi i32 [ %44, %76 ], [ -16446, %82 ]
%88 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %87)
%89 = call i32 @prnum(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), x86_fp80* %1)
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %77)
%91 = call i32 @exit(i32 0)
unreachable
}