#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 DBL_EPSILON;
long double DBL_MAX;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
long double pow(int, long double);
long double powl(long double, long double);
int /*<<< orphan*/ printf(char *, ...);
int rand();
long double remainder(long double, int);
long double remainderl(long double, long double);
int /*<<< orphan*/ scanf(char *, long double *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ time(int /*<<< orphan*/);
int main() {
  long double n = 0, a = 0, s = 1, k = 0, q = 0;
  srand(time(0));
  printf("Enter the number to test: ");
  scanf("%LF", &n);
  printf("Enter the witness OR 0 to specify random witnesses: ");
  scanf("%LF", &a);
  if (a == 0) {
    printf("Enter the number of random witnesses: ");
    scanf("%LF", &s);
  } else {
    if (a <= 1 || a >= (n - 1)) {
      fprintf(stderr, "Invalid witness provided!\n");
      return 1;
    }
  }
  long double n_rem = remainder(n, 2);
  if (n_rem >= 0.0 - DBL_EPSILON && n_rem <= 0.0 + DBL_EPSILON) {
    fprintf(stderr, "Invalid number provided, it's even!\n");
    return 1;
  }
  for (long double i = 0; i < s; ++i) {
    if (a == 0) {
      a = (long double)(rand() % (int)(n - 2)) + 1;
    }
    for (k = 1; k < DBL_MAX; ++k) {
      long double rem = remainder(n - 1, pow(2, k));
      if (rem >= 0.0 - DBL_EPSILON && rem <= 0.0 + DBL_EPSILON) {
        q = (n - 1) / pow(2, k);
        long double q_rem = remainder(q, 2);
        if (!(q_rem >= 0.0 - DBL_EPSILON && q_rem <= 0.0 + DBL_EPSILON)) {
          break;
        }
      }
    }
    long double rem = remainderl(powl(a, q), n);
    if (rem >= 1.0 - DBL_EPSILON && rem <= 1.0 + DBL_EPSILON) {
      printf("Inconclusive for n: %LF, witness: %LF, q: %LF\n", n, a, q);
      return 0;
    }
    for (long double j = 0; j < k - 1; ++j) {
      rem = remainderl(powl(a, powl(2, j) * q), n);
      if (rem >= (n - 1) - DBL_EPSILON && rem <= (n - 1) + DBL_EPSILON) {
        printf("Inconclusive for n: %LF, witness: %LF, j: %LF, q: %LF\n", n, a,
               j, q);
        return 0;
      }
    }
    a = 0;
  }
  printf("Composite!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
movl   $0x0,-0x4(%rbp)
fldz
fld    %st(0)
fstpt  -0x124(%rbp)
fld    %st(0)
fstpt  -0x20(%rbp)
fld    %st(0)
fstpt  -0x30(%rbp)
fld1
fstpt  -0x40(%rbp)
fld    %st(0)
fstpt  -0x50(%rbp)
fstpt  -0x60(%rbp)
xor    %edi,%edi
mov    %edi,-0x138(%rbp)
call   1070 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    -0x138(%rbp),%eax
lea    0xe1c(%rip),%rdi
mov    %al,-0x131(%rbp)
call   1040 <printf@plt>
lea    0xe25(%rip),%rdi
mov    %rdi,-0x130(%rbp)
lea    -0x20(%rbp),%rsi
call   10a0 <scanf@plt>
mov    -0x131(%rbp),%al
lea    0xe0c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x130(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   10a0 <scanf@plt>
fldt   -0x124(%rbp)
fldt   -0x30(%rbp)
fucomip %st(1),%st
fstp   %st(0)
jne    1279 <main+0xd9>
jp     1279 <main+0xd9>
jmp    1256 <main+0xb6>
lea    0xe07(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdc0(%rip),%rdi
lea    -0x40(%rbp),%rsi
call   10a0 <scanf@plt>
jmp    12d0 <main+0x130>
fldt   -0x30(%rbp)
fld1
fucomip %st(1),%st
fstp   %st(0)
jae    12aa <main+0x10a>
jmp    128d <main+0xed>
fldt   -0x30(%rbp)
fldt   -0x20(%rbp)
fld1
fchs
faddp  %st,%st(1)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jb     12cb <main+0x12b>
jmp    12aa <main+0x10a>
mov    0x2d27(%rip),%rax
mov    (%rax),%edi
lea    0xdd1(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    17da <main+0x63a>
jmp    12d0 <main+0x130>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
mov    $0x2,%edi
call   1080 <remainder@plt>
fstpt  -0x70(%rbp)
fldt   -0x70(%rbp)
mov    0x2cf9(%rip),%rax
movsd  (%rax),%xmm1
xorps  %xmm0,%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
fldl   -0xc8(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jb     136c <main+0x1cc>
jmp    1319 <main+0x179>
fldt   -0x70(%rbp)
mov    0x2cc5(%rip),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
fldl   -0xd0(%rbp)
fucomip %st(1),%st
fstp   %st(0)
jb     136c <main+0x1cc>
jmp    134b <main+0x1ab>
mov    0x2c86(%rip),%rax
mov    (%rax),%edi
lea    0xd4b(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    17da <main+0x63a>
fldz
fstpt  -0x80(%rbp)
fldt   -0x80(%rbp)
fldt   -0x40(%rbp)
fucomip %st(1),%st
fstp   %st(0)
jbe    17c5 <main+0x625>
jmp    1386 <main+0x1e6>
fldt   -0x30(%rbp)
fldz
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    13fc <main+0x25c>
jp     13fc <main+0x25c>
jmp    13a2 <main+0x202>
xor    %eax,%eax
call   10c0 <rand@plt>
fldt   -0x20(%rbp)
flds   0xc4e(%rip)
faddp  %st,%st(1)
fnstcw -0x112(%rbp)
movzwl -0x112(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0x114(%rbp)
fldcw  -0x114(%rbp)
fistpl -0xd8(%rbp)
fldcw  -0x112(%rbp)
mov    -0xd8(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,-0xd4(%rbp)
fildl  -0xd4(%rbp)
fld1
faddp  %st,%st(1)
fstpt  -0x30(%rbp)
fld1
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
mov    0x2bc5(%rip),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
jbe    15c7 <main+0x427>
jmp    141c <main+0x27c>
fldt   -0x20(%rbp)
fld1
fchs
faddp  %st,%st(1)
fstpt  -0x144(%rbp)
fldt   -0x50(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
mov    $0x2,%edi
call   10b0 <pow@plt>
fldt   -0x144(%rbp)
fnstcw -0x116(%rbp)
movzwl -0x116(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x118(%rbp)
fldcw  -0x118(%rbp)
fxch   %st(1)
fistpl -0xdc(%rbp)
fldcw  -0x116(%rbp)
mov    -0xdc(%rbp),%edi
mov    %rsp,%rax
fstpt  (%rax)
call   1080 <remainder@plt>
fstpt  -0x90(%rbp)
fldt   -0x90(%rbp)
mov    0x2b55(%rip),%rax
movsd  (%rax),%xmm1
xorps  %xmm0,%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
fldl   -0xe8(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jb     15b3 <main+0x413>
jmp    14bd <main+0x31d>
fldt   -0x90(%rbp)
mov    0x2b1e(%rip),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
fldl   -0xf0(%rbp)
fucomip %st(1),%st
fstp   %st(0)
jb     15b3 <main+0x413>
jmp    14f2 <main+0x352>
fldt   -0x20(%rbp)
fld1
fchs
faddp  %st,%st(1)
fstpt  -0x150(%rbp)
fldt   -0x50(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
mov    $0x2,%edi
mov    %edi,-0x154(%rbp)
call   10b0 <pow@plt>
mov    -0x154(%rbp),%edi
fldt   -0x150(%rbp)
fdivp  %st,%st(1)
fstpt  -0x60(%rbp)
fldt   -0x60(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1080 <remainder@plt>
fstpt  -0xa0(%rbp)
fldt   -0xa0(%rbp)
mov    0x2a9e(%rip),%rax
movsd  (%rax),%xmm1
xorps  %xmm0,%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
fldl   -0xf8(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jb     15a9 <main+0x409>
jmp    1574 <main+0x3d4>
fldt   -0xa0(%rbp)
mov    0x2a67(%rip),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
fldl   -0x100(%rbp)
fucomip %st(1),%st
fstp   %st(0)
jae    15ae <main+0x40e>
jmp    15a9 <main+0x409>
jmp    15c7 <main+0x427>
jmp    15b3 <main+0x413>
jmp    15b8 <main+0x418>
fldt   -0x50(%rbp)
fld1
faddp  %st,%st(1)
fstpt  -0x50(%rbp)
jmp    1401 <main+0x261>
fldt   -0x30(%rbp)
fldt   -0x60(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <powl@plt>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1090 <remainderl@plt>
fstpt  -0xb0(%rbp)
fldt   -0xb0(%rbp)
mov    0x29eb(%rip),%rax
movsd  (%rax),%xmm1
movsd  0x9ff(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
fldl   -0x108(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jb     1694 <main+0x4f4>
jmp    162c <main+0x48c>
fldt   -0xb0(%rbp)
mov    0x29af(%rip),%rax
movsd  (%rax),%xmm0
movsd  0x9c3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
fldl   -0x110(%rbp)
fucomip %st(1),%st
fstp   %st(0)
jb     1694 <main+0x4f4>
jmp    1666 <main+0x4c6>
fldt   -0x20(%rbp)
fldt   -0x30(%rbp)
fldt   -0x60(%rbp)
mov    %rsp,%rax
fstpt  0x20(%rax)
fstpt  0x10(%rax)
fstpt  (%rax)
lea    0xa4a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    17da <main+0x63a>
fldz
fstpt  -0xc0(%rbp)
fldt   -0xc0(%rbp)
fldt   -0x50(%rbp)
fld1
fchs
faddp  %st,%st(1)
fucomip %st(1),%st
fstp   %st(0)
jbe    17b1 <main+0x611>
jmp    16ba <main+0x51a>
fldt   -0x30(%rbp)
fstpt  -0x160(%rbp)
fldt   -0xc0(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
flds   0x92f(%rip)
fstpt  (%rax)
call   1030 <powl@plt>
fldt   -0x160(%rbp)
fldt   -0x60(%rbp)
fmulp  %st,%st(2)
mov    %rsp,%rax
fxch   %st(1)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <powl@plt>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1090 <remainderl@plt>
fstpt  -0xb0(%rbp)
fldt   -0xb0(%rbp)
fldt   -0x20(%rbp)
fld1
fchs
faddp  %st,%st(1)
mov    0x28c6(%rip),%rax
fldl   (%rax)
fsubrp %st,%st(1)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jb     1797 <main+0x5f7>
jmp    1737 <main+0x597>
fldt   -0xb0(%rbp)
fldt   -0x20(%rbp)
fld1
fchs
faddp  %st,%st(1)
mov    0x289b(%rip),%rax
fldl   (%rax)
faddp  %st,%st(1)
fucomip %st(1),%st
fstp   %st(0)
jb     1797 <main+0x5f7>
jmp    1760 <main+0x5c0>
fldt   -0x20(%rbp)
fldt   -0x30(%rbp)
fldt   -0xc0(%rbp)
fldt   -0x60(%rbp)
mov    %rsp,%rax
fstpt  0x30(%rax)
fstpt  0x20(%rax)
fstpt  0x10(%rax)
fstpt  (%rax)
lea    0x976(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    17da <main+0x63a>
jmp    179c <main+0x5fc>
fldt   -0xc0(%rbp)
fld1
faddp  %st,%st(1)
fstpt  -0xc0(%rbp)
jmp    169c <main+0x4fc>
fldz
fstpt  -0x30(%rbp)
fldt   -0x80(%rbp)
fld1
faddp  %st,%st(1)
fstpt  -0x80(%rbp)
jmp    1371 <main+0x1d1>
lea    0x965(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x108,%rsp
fldz
fld    %st(0)
fstpt  0x44(%rsp)
fld    %st(0)
fstpt  0x60(%rsp)
fstpt  0x70(%rsp)
fld1
fstpt  0xa0(%rsp)
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
lea    0xe1e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe2b(%rip),%rbx
lea    0x60(%rsp),%rsi
mov    %rbx,%rdi
call   10c0 <scanf@plt>
lea    0xe1b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x70(%rsp),%rsi
mov    %rbx,%rdi
call   10c0 <scanf@plt>
fldt   0x70(%rsp)
fldt   0x44(%rsp)
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
jne    166e <main+0x4ae>
jp     166e <main+0x4ae>
fstp   %st(0)
lea    0xe19(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdd2(%rip),%rdi
lea    0xa0(%rsp),%rsi
call   10c0 <scanf@plt>
fldt   0x60(%rsp)
fldz
fldz
fstp   %st(1)
fstp   %st(0)
fstpt  (%rsp)
mov    $0x2,%edi
call   10a0 <remainder@plt>
mov    0x2d5a(%rip),%rbx
movsd  (%rbx),%xmm0
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
subsd  %xmm0,%xmm2
movsd  %xmm2,0xe8(%rsp)
fldl   0xe8(%rsp)
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
jb     12d6 <main+0x116>
addsd  %xmm1,%xmm0
movsd  %xmm0,0xe0(%rsp)
fldl   0xe0(%rsp)
fucomip %st(1),%st
fstp   %st(0)
fldz
jae    16c2 <main+0x502>
fstp   %st(0)
fldt   0xa0(%rsp)
fldz
fld    %st(0)
fstpt  0x54(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
fldz
fldz
jbe    16ae <main+0x4ee>
fstp   %st(1)
fstp   %st(0)
fldt   0x70(%rsp)
mov    0x2cca(%rip),%r14
fldt   0x54(%rsp)
jmp    1334 <main+0x174>
nopl   0x0(%rax)
fstp   %st(0)
fldz
fld    %st(0)
fstpt  0x70(%rsp)
fld1
fldt   0xf0(%rsp)
faddp  %st,%st(1)
fldt   0xa0(%rsp)
fucomip %st(1),%st
jbe    16ae <main+0x4ee>
fstpt  0xf0(%rsp)
fldz
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
jne    139b <main+0x1db>
jp     139b <main+0x1db>
fstp   %st(0)
xor    %eax,%eax
call   10e0 <rand@plt>
fldt   0x60(%rsp)
fadds  0xca6(%rip)
fnstcw 0x42(%rsp)
movzwl 0x42(%rsp),%ecx
or     $0xc00,%ecx
mov    %cx,0x52(%rsp)
fldcw  0x52(%rsp)
fistpl 0x98(%rsp)
fldcw  0x42(%rsp)
cltd
idivl  0x98(%rsp)
mov    %edx,0x9c(%rsp)
fld1
fiaddl 0x9c(%rsp)
fld    %st(0)
fstpt  0x70(%rsp)
fldt   (%r14)
fld1
fxch   %st(1)
fucomip %st(1),%st
jbe    1510 <main+0x350>
fstp   %st(1)
fstp   %st(0)
fld1
jmp    13d5 <main+0x215>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
fstp   %st(0)
fldt   0x44(%rsp)
fld1
faddp  %st,%st(1)
fldt   (%r14)
fucomip %st(1),%st
jbe    1520 <main+0x360>
fldt   0x60(%rsp)
fld1
fchs
faddp  %st,%st(1)
fstpt  0x88(%rsp)
fld    %st(0)
fstpt  0x44(%rsp)
fstpt  (%rsp)
mov    $0x2,%edi
call   10d0 <pow@plt>
fnstcw 0x40(%rsp)
movzwl 0x40(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x50(%rsp)
fldcw  0x50(%rsp)
fistpl 0x94(%rsp)
fldcw  0x40(%rsp)
mov    0x94(%rsp),%edi
fldt   0x88(%rsp)
fstpt  (%rsp)
call   10a0 <remainder@plt>
movsd  (%rbx),%xmm0
xorpd  %xmm1,%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0xd8(%rsp)
fldl   0xd8(%rsp)
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
jb     13c0 <main+0x200>
addsd  0xbaf(%rip),%xmm0
movsd  %xmm0,0xd0(%rsp)
fldl   0xd0(%rsp)
fucomip %st(1),%st
fstp   %st(0)
fldt   0x44(%rsp)
jb     13c6 <main+0x206>
fldt   0x60(%rsp)
fld1
fchs
faddp  %st,%st(1)
fstpt  0x88(%rsp)
fstpt  (%rsp)
mov    $0x2,%edi
call   10d0 <pow@plt>
fldt   0x88(%rsp)
fdivp  %st,%st(1)
fld    %st(0)
fstpt  0x54(%rsp)
fstpt  (%rsp)
mov    $0x2,%edi
call   10a0 <remainder@plt>
movsd  (%rbx),%xmm0
xorpd  %xmm1,%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0xc8(%rsp)
fldl   0xc8(%rsp)
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
jb     1516 <main+0x356>
addsd  0xb2b(%rip),%xmm0
movsd  %xmm0,0xc0(%rsp)
fldl   0xc0(%rsp)
fucomip %st(1),%st
fstp   %st(0)
fldt   0x44(%rsp)
jae    13c6 <main+0x206>
jmp    1520 <main+0x360>
cs nopw 0x0(%rax,%rax,1)
nop
fstpt  0x44(%rsp)
jmp    1528 <main+0x368>
fstp   %st(0)
fldt   0x44(%rsp)
nopl   0x0(%rax)
fstpt  0x44(%rsp)
fldt   0x70(%rsp)
fldt   0x54(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1040 <powl@plt>
fldt   0x60(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   10b0 <remainderl@plt>
movsd  (%rbx),%xmm0
movsd  0xab4(%rip),%xmm2
movapd %xmm2,%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0xb8(%rsp)
fldl   0xb8(%rsp)
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
jb     1594 <main+0x3d4>
addsd  %xmm2,%xmm0
movsd  %xmm0,0xb0(%rsp)
fldl   0xb0(%rsp)
fucomip %st(1),%st
fstp   %st(0)
fldz
jae    16eb <main+0x52b>
fstp   %st(0)
fld1
fchs
fldt   0x44(%rsp)
faddp  %st,%st(1)
fldz
fld    %st(1)
fstpt  0xfc(%rsp)
fxch   %st(1)
jmp    15c5 <main+0x405>
nop
fstp   %st(2)
fstp   %st(0)
fstp   %st(0)
fld1
fldt   0x44(%rsp)
faddp  %st,%st(1)
fldt   0xfc(%rsp)
fucomip %st(1),%st
jbe    1310 <main+0x150>
fldt   0x70(%rsp)
fstpt  0x88(%rsp)
fld    %st(0)
fstpt  0x44(%rsp)
fstpt  (%rsp)
call   1060 <exp2l@plt>
fldt   0x54(%rsp)
fmulp  %st,%st(1)
fstpt  0x10(%rsp)
fldt   0x88(%rsp)
fstpt  (%rsp)
call   1040 <powl@plt>
fldt   0x60(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   10b0 <remainderl@plt>
fldt   0x60(%rsp)
fld1
fchs
fadd   %st(1),%st
fldl   (%rbx)
fld    %st(1)
fsub   %st(1),%st
fxch   %st(4)
fucomi %st(4),%st
fstp   %st(4)
faddp  %st,%st(1)
jb     15b0 <main+0x3f0>
fucomip %st(2),%st
fstp   %st(1)
fldz
fldz
fxch   %st(1)
fxch   %st(2)
fxch   %st(1)
jb     15b0 <main+0x3f0>
fstp   %st(2)
fstp   %st(1)
fldt   0x70(%rsp)
fldt   0x54(%rsp)
fstpt  0x30(%rsp)
fldt   0x44(%rsp)
fstpt  0x20(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
lea    0xa9f(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    16de <main+0x51e>
fld1
fucomi %st(1),%st
fldz
fxch   %st(2)
fxch   %st(1)
jae    1696 <main+0x4d6>
fstp   %st(2)
fldt   0x60(%rsp)
fxch   %st(2)
fchs
fadd   %st(2),%st
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
fldz
fldz
jb     1276 <main+0xb6>
fstp   %st(1)
fstp   %st(1)
fstp   %st(0)
mov    0x2935(%rip),%rax
mov    (%rax),%edi
lea    0x9e7(%rip),%rsi
jmp    16d4 <main+0x514>
fstp   %st(1)
fstp   %st(0)
lea    0xa80(%rip),%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
jmp    16de <main+0x51e>
fstp   %st(0)
mov    0x290d(%rip),%rax
mov    (%rax),%edi
lea    0x9da(%rip),%rsi
call   1080 <fprintf@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret
fstp   %st(0)
fldt   0x60(%rsp)
fldt   0x70(%rsp)
fldt   0x54(%rsp)
fstpt  0x20(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
lea    0x9c8(%rip),%rdi
jmp    1663 <main+0x4a3>

LLVM IR (-O0):
@.str = [27 x i8] c"Enter the number to test: \00"
@.str.1 = [4 x i8] c"%LF\00"
@.str.2 = [53 x i8] c"Enter the witness OR 0 to specify random witnesses: \00"
@.str.3 = [39 x i8] c"Enter the number of random witnesses: \00"
@stderr = global i32 0
@.str.4 = [27 x i8] c"Invalid witness provided!\0A\00"
@DBL_EPSILON = global double 0.000000e+00
@.str.5 = [37 x i8] c"Invalid number provided, it's even!\0A\00"
@DBL_MAX = global x86_fp80 0xK00000000000000000000
@.str.6 = [47 x i8] c"Inconclusive for n: %LF, witness: %LF, q: %LF\0A\00"
@.str.7 = [55 x i8] c"Inconclusive for n: %LF, witness: %LF, j: %LF, q: %LF\0A\00"
@.str.8 = [12 x i8] c"Composite!\0A\00"
define i32 @main() {
%1 = alloca i32
%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 x86_fp80
%9 = alloca x86_fp80
%10 = alloca x86_fp80
%11 = alloca x86_fp80
%12 = alloca x86_fp80
store i32 0, i32* %1
store x86_fp80 0xK00000000000000000000, x86_fp80* %2
store x86_fp80 0xK00000000000000000000, x86_fp80* %3
store x86_fp80 0xK3FFF8000000000000000, x86_fp80* %4
store x86_fp80 0xK00000000000000000000, x86_fp80* %5
store x86_fp80 0xK00000000000000000000, x86_fp80* %6
%13 = call i32 @time(i32 0)
%14 = call i32 @srand(i32 %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), x86_fp80* %2)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%18 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), x86_fp80* %3)
%19 = load x86_fp80, x86_fp80* %3
%20 = fcmp oeq x86_fp80 %19, 0xK00000000000000000000
br i1 %20, label %21, label %24
21: ; preds = %0
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
%23 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), x86_fp80* %4)
br label %36
24: ; preds = %0
%25 = load x86_fp80, x86_fp80* %3
%26 = fcmp ole x86_fp80 %25, 0xK3FFF8000000000000000
br i1 %26, label %32, label %27
27: ; preds = %24
%28 = load x86_fp80, x86_fp80* %3
%29 = load x86_fp80, x86_fp80* %2
%30 = fsub x86_fp80 %29, 0xK3FFF8000000000000000
%31 = fcmp oge x86_fp80 %28, %30
br i1 %31, label %32, label %35
32: ; preds = %27, %24
%33 = load i32, i32* @stderr
%34 = call i32 @fprintf(i32 %33, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %1
br label %185
35: ; preds = %27
br label %36
36: ; preds = %35, %21
%37 = load x86_fp80, x86_fp80* %2
%38 = call x86_fp80 @remainder(x86_fp80 %37, i32 2)
store x86_fp80 %38, x86_fp80* %7
%39 = load x86_fp80, x86_fp80* %7
%40 = load double, double* @DBL_EPSILON
%41 = fsub double 0.000000e+00, %40
%42 = fpext double %41 to x86_fp80
%43 = fcmp oge x86_fp80 %39, %42
br i1 %43, label %44, label %53
44: ; preds = %36
%45 = load x86_fp80, x86_fp80* %7
%46 = load double, double* @DBL_EPSILON
%47 = fadd double 0.000000e+00, %46
%48 = fpext double %47 to x86_fp80
%49 = fcmp ole x86_fp80 %45, %48
br i1 %49, label %50, label %53
50: ; preds = %44
%51 = load i32, i32* @stderr
%52 = call i32 @fprintf(i32 %51, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %1
br label %185
53: ; preds = %44, %36
store x86_fp80 0xK00000000000000000000, x86_fp80* %8
br label %54
54: ; preds = %180, %53
%55 = load x86_fp80, x86_fp80* %8
%56 = load x86_fp80, x86_fp80* %4
%57 = fcmp olt x86_fp80 %55, %56
br i1 %57, label %58, label %183
58: ; preds = %54
%59 = load x86_fp80, x86_fp80* %3
%60 = fcmp oeq x86_fp80 %59, 0xK00000000000000000000
br i1 %60, label %61, label %69
61: ; preds = %58
%62 = call i32 (...) @rand()
%63 = load x86_fp80, x86_fp80* %2
%64 = fsub x86_fp80 %63, 0xK40008000000000000000
%65 = fptosi x86_fp80 %64 to i32
%66 = srem i32 %62, %65
%67 = sitofp i32 %66 to x86_fp80
%68 = fadd x86_fp80 %67, 0xK3FFF8000000000000000
store x86_fp80 %68, x86_fp80* %3
br label %69
69: ; preds = %61, %58
store x86_fp80 0xK3FFF8000000000000000, x86_fp80* %5
br label %70
70: ; preds = %114, %69
%71 = load x86_fp80, x86_fp80* %5
%72 = load x86_fp80, x86_fp80* @DBL_MAX
%73 = fcmp olt x86_fp80 %71, %72
br i1 %73, label %74, label %117
74: ; preds = %70
%75 = load x86_fp80, x86_fp80* %2
%76 = fsub x86_fp80 %75, 0xK3FFF8000000000000000
%77 = load x86_fp80, x86_fp80* %5
%78 = call x86_fp80 @pow(i32 2, x86_fp80 %77)
%79 = fptosi x86_fp80 %78 to i32
%80 = call x86_fp80 @remainder(x86_fp80 %76, i32 %79)
store x86_fp80 %80, x86_fp80* %9
%81 = load x86_fp80, x86_fp80* %9
%82 = load double, double* @DBL_EPSILON
%83 = fsub double 0.000000e+00, %82
%84 = fpext double %83 to x86_fp80
%85 = fcmp oge x86_fp80 %81, %84
br i1 %85, label %86, label %113
86: ; preds = %74
%87 = load x86_fp80, x86_fp80* %9
%88 = load double, double* @DBL_EPSILON
%89 = fadd double 0.000000e+00, %88
%90 = fpext double %89 to x86_fp80
%91 = fcmp ole x86_fp80 %87, %90
br i1 %91, label %92, label %113
92: ; preds = %86
%93 = load x86_fp80, x86_fp80* %2
%94 = fsub x86_fp80 %93, 0xK3FFF8000000000000000
%95 = load x86_fp80, x86_fp80* %5
%96 = call x86_fp80 @pow(i32 2, x86_fp80 %95)
%97 = fdiv x86_fp80 %94, %96
store x86_fp80 %97, x86_fp80* %6
%98 = load x86_fp80, x86_fp80* %6
%99 = call x86_fp80 @remainder(x86_fp80 %98, i32 2)
store x86_fp80 %99, x86_fp80* %10
%100 = load x86_fp80, x86_fp80* %10
%101 = load double, double* @DBL_EPSILON
%102 = fsub double 0.000000e+00, %101
%103 = fpext double %102 to x86_fp80
%104 = fcmp oge x86_fp80 %100, %103
br i1 %104, label %105, label %111
105: ; preds = %92
%106 = load x86_fp80, x86_fp80* %10
%107 = load double, double* @DBL_EPSILON
%108 = fadd double 0.000000e+00, %107
%109 = fpext double %108 to x86_fp80
%110 = fcmp ole x86_fp80 %106, %109
br i1 %110, label %112, label %111
111: ; preds = %105, %92
br label %117
112: ; preds = %105
br label %113
113: ; preds = %112, %86, %74
br label %114
114: ; preds = %113
%115 = load x86_fp80, x86_fp80* %5
%116 = fadd x86_fp80 %115, 0xK3FFF8000000000000000
store x86_fp80 %116, x86_fp80* %5
br label %70
117: ; preds = %111, %70
%118 = load x86_fp80, x86_fp80* %3
%119 = load x86_fp80, x86_fp80* %6
%120 = call x86_fp80 @powl(x86_fp80 %118, x86_fp80 %119)
%121 = load x86_fp80, x86_fp80* %2
%122 = call x86_fp80 @remainderl(x86_fp80 %120, x86_fp80 %121)
store x86_fp80 %122, x86_fp80* %11
%123 = load x86_fp80, x86_fp80* %11
%124 = load double, double* @DBL_EPSILON
%125 = fsub double 1.000000e+00, %124
%126 = fpext double %125 to x86_fp80
%127 = fcmp oge x86_fp80 %123, %126
br i1 %127, label %128, label %139
128: ; preds = %117
%129 = load x86_fp80, x86_fp80* %11
%130 = load double, double* @DBL_EPSILON
%131 = fadd double 1.000000e+00, %130
%132 = fpext double %131 to x86_fp80
%133 = fcmp ole x86_fp80 %129, %132
br i1 %133, label %134, label %139
134: ; preds = %128
%135 = load x86_fp80, x86_fp80* %2
%136 = load x86_fp80, x86_fp80* %3
%137 = load x86_fp80, x86_fp80* %6
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0), x86_fp80 %135, x86_fp80 %136, x86_fp80 %137)
store i32 0, i32* %1
br label %185
139: ; preds = %128, %117
store x86_fp80 0xK00000000000000000000, x86_fp80* %12
br label %140
140: ; preds = %176, %139
%141 = load x86_fp80, x86_fp80* %12
%142 = load x86_fp80, x86_fp80* %5
%143 = fsub x86_fp80 %142, 0xK3FFF8000000000000000
%144 = fcmp olt x86_fp80 %141, %143
br i1 %144, label %145, label %179
145: ; preds = %140
%146 = load x86_fp80, x86_fp80* %3
%147 = load x86_fp80, x86_fp80* %12
%148 = call x86_fp80 @powl(x86_fp80 0xK40008000000000000000, x86_fp80 %147)
%149 = load x86_fp80, x86_fp80* %6
%150 = fmul x86_fp80 %148, %149
%151 = call x86_fp80 @powl(x86_fp80 %146, x86_fp80 %150)
%152 = load x86_fp80, x86_fp80* %2
%153 = call x86_fp80 @remainderl(x86_fp80 %151, x86_fp80 %152)
store x86_fp80 %153, x86_fp80* %11
%154 = load x86_fp80, x86_fp80* %11
%155 = load x86_fp80, x86_fp80* %2
%156 = fsub x86_fp80 %155, 0xK3FFF8000000000000000
%157 = load double, double* @DBL_EPSILON
%158 = fpext double %157 to x86_fp80
%159 = fsub x86_fp80 %156, %158
%160 = fcmp oge x86_fp80 %154, %159
br i1 %160, label %161, label %175
161: ; preds = %145
%162 = load x86_fp80, x86_fp80* %11
%163 = load x86_fp80, x86_fp80* %2
%164 = fsub x86_fp80 %163, 0xK3FFF8000000000000000
%165 = load double, double* @DBL_EPSILON
%166 = fpext double %165 to x86_fp80
%167 = fadd x86_fp80 %164, %166
%168 = fcmp ole x86_fp80 %162, %167
br i1 %168, label %169, label %175
169: ; preds = %161
%170 = load x86_fp80, x86_fp80* %2
%171 = load x86_fp80, x86_fp80* %3
%172 = load x86_fp80, x86_fp80* %12
%173 = load x86_fp80, x86_fp80* %6
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0), x86_fp80 %170, x86_fp80 %171, x86_fp80 %172, x86_fp80 %173)
store i32 0, i32* %1
br label %185
175: ; preds = %161, %145
br label %176
176: ; preds = %175
%177 = load x86_fp80, x86_fp80* %12
%178 = fadd x86_fp80 %177, 0xK3FFF8000000000000000
store x86_fp80 %178, x86_fp80* %12
br label %140
179: ; preds = %140
store x86_fp80 0xK00000000000000000000, x86_fp80* %3
br label %180
180: ; preds = %179
%181 = load x86_fp80, x86_fp80* %8
%182 = fadd x86_fp80 %181, 0xK3FFF8000000000000000
store x86_fp80 %182, x86_fp80* %8
br label %54
183: ; preds = %54
%184 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %1
br label %185
185: ; preds = %183, %169, %134, %50, %32
%186 = load i32, i32* %1
ret i32 %186
}

LLVM IR (-O2):
@.str = [27 x i8] c"Enter the number to test: \00"
@.str.1 = [4 x i8] c"%LF\00"
@.str.2 = [53 x i8] c"Enter the witness OR 0 to specify random witnesses: \00"
@.str.3 = [39 x i8] c"Enter the number of random witnesses: \00"
@stderr = global i32 0
@.str.4 = [27 x i8] c"Invalid witness provided!\0A\00"
@DBL_EPSILON = global double 0.000000e+00
@.str.5 = [37 x i8] c"Invalid number provided, it's even!\0A\00"
@DBL_MAX = global x86_fp80 0xK00000000000000000000
@.str.6 = [47 x i8] c"Inconclusive for n: %LF, witness: %LF, q: %LF\0A\00"
@.str.7 = [55 x i8] c"Inconclusive for n: %LF, witness: %LF, j: %LF, q: %LF\0A\00"
@str = [11 x i8] c"Composite!\00"
define i32 @main() {
%1 = alloca x86_fp80
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = bitcast x86_fp80* %1 to i8*
store x86_fp80 0xK00000000000000000000, x86_fp80* %1
%5 = bitcast x86_fp80* %2 to i8*
store x86_fp80 0xK00000000000000000000, x86_fp80* %2
%6 = bitcast x86_fp80* %3 to i8*
store x86_fp80 0xK3FFF8000000000000000, x86_fp80* %3
%7 = tail call i32 @time(i32 0)
%8 = tail call i32 @srand(i32 %7)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), x86_fp80* %1)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), x86_fp80* %2)
%13 = load x86_fp80, x86_fp80* %2
%14 = fcmp oeq x86_fp80 %13, 0xK00000000000000000000
br i1 %14, label %15, label %19
15: ; preds = %0
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), x86_fp80* %3)
%18 = load x86_fp80, x86_fp80* %1
br label %28
19: ; preds = %0
%20 = fcmp ugt x86_fp80 %13, 0xK3FFF8000000000000000
br i1 %20, label %21, label %25
21: ; preds = %19
%22 = load x86_fp80, x86_fp80* %1
%23 = fadd x86_fp80 %22, 0xKBFFF8000000000000000
%24 = fcmp ult x86_fp80 %13, %23
br i1 %24, label %28, label %25
25: ; preds = %21, %19
%26 = load i32, i32* @stderr
%27 = call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
br label %154
28: ; preds = %21, %15
%29 = phi x86_fp80 [ %22, %21 ], [ %18, %15 ]
%30 = call x86_fp80 @remainder(x86_fp80 %29, i32 2)
%31 = load double, double* @DBL_EPSILON
%32 = fsub double 0.000000e+00, %31
%33 = fpext double %32 to x86_fp80
%34 = fcmp ult x86_fp80 %30, %33
br i1 %34, label %42, label %35
35: ; preds = %28
%36 = fadd double %31, 0.000000e+00
%37 = fpext double %36 to x86_fp80
%38 = fcmp ugt x86_fp80 %30, %37
br i1 %38, label %42, label %39
39: ; preds = %35
%40 = load i32, i32* @stderr
%41 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0))
br label %154
42: ; preds = %35, %28
%43 = load x86_fp80, x86_fp80* %3
%44 = fcmp ogt x86_fp80 %43, 0xK00000000000000000000
br i1 %44, label %45, label %152
45: ; preds = %42
%46 = load x86_fp80, x86_fp80* %2
br label %47
47: ; preds = %45, %148
%48 = phi x86_fp80 [ 0xK00000000000000000000, %148 ], [ %46, %45 ]
%49 = phi x86_fp80 [ %106, %148 ], [ 0xK00000000000000000000, %45 ]
%50 = phi x86_fp80 [ %149, %148 ], [ 0xK00000000000000000000, %45 ]
%51 = fcmp oeq x86_fp80 %48, 0xK00000000000000000000
br i1 %51, label %52, label %60
52: ; preds = %47
%53 = call i32 (...) @rand()
%54 = load x86_fp80, x86_fp80* %1
%55 = fadd x86_fp80 %54, 0xKC0008000000000000000
%56 = fptosi x86_fp80 %55 to i32
%57 = srem i32 %53, %56
%58 = sitofp i32 %57 to x86_fp80
%59 = fadd x86_fp80 %58, 0xK3FFF8000000000000000
store x86_fp80 %59, x86_fp80* %2
br label %60
60: ; preds = %52, %47
%61 = phi x86_fp80 [ %59, %52 ], [ %48, %47 ]
%62 = load x86_fp80, x86_fp80* @DBL_MAX
%63 = fcmp ogt x86_fp80 %62, 0xK3FFF8000000000000000
br i1 %63, label %64, label %103
64: ; preds = %60, %94
%65 = phi x86_fp80 [ %96, %94 ], [ 0xK3FFF8000000000000000, %60 ]
%66 = phi x86_fp80 [ %95, %94 ], [ %49, %60 ]
%67 = load x86_fp80, x86_fp80* %1
%68 = fadd x86_fp80 %67, 0xKBFFF8000000000000000
%69 = call x86_fp80 @pow(i32 2, x86_fp80 %65)
%70 = fptosi x86_fp80 %69 to i32
%71 = call x86_fp80 @remainder(x86_fp80 %68, i32 %70)
%72 = load double, double* @DBL_EPSILON
%73 = fsub double 0.000000e+00, %72
%74 = fpext double %73 to x86_fp80
%75 = fcmp ult x86_fp80 %71, %74
br i1 %75, label %94, label %76
76: ; preds = %64
%77 = fadd double %72, 0.000000e+00
%78 = fpext double %77 to x86_fp80
%79 = fcmp ugt x86_fp80 %71, %78
br i1 %79, label %94, label %80
80: ; preds = %76
%81 = load x86_fp80, x86_fp80* %1
%82 = fadd x86_fp80 %81, 0xKBFFF8000000000000000
%83 = call x86_fp80 @pow(i32 2, x86_fp80 %65)
%84 = fdiv x86_fp80 %82, %83
%85 = call x86_fp80 @remainder(x86_fp80 %84, i32 2)
%86 = load double, double* @DBL_EPSILON
%87 = fsub double 0.000000e+00, %86
%88 = fpext double %87 to x86_fp80
%89 = fcmp ult x86_fp80 %85, %88
br i1 %89, label %99, label %90
90: ; preds = %80
%91 = fadd double %86, 0.000000e+00
%92 = fpext double %91 to x86_fp80
%93 = fcmp ugt x86_fp80 %85, %92
br i1 %93, label %99, label %94
94: ; preds = %90, %76, %64
%95 = phi x86_fp80 [ %84, %90 ], [ %66, %64 ], [ %66, %76 ]
%96 = fadd x86_fp80 %65, 0xK3FFF8000000000000000
%97 = load x86_fp80, x86_fp80* @DBL_MAX
%98 = fcmp olt x86_fp80 %96, %97
br i1 %98, label %64, label %99
99: ; preds = %80, %90, %94
%100 = phi x86_fp80 [ %96, %94 ], [ %65, %90 ], [ %65, %80 ]
%101 = phi x86_fp80 [ %95, %94 ], [ %84, %90 ], [ %84, %80 ]
%102 = load x86_fp80, x86_fp80* %2
br label %103
103: ; preds = %99, %60
%104 = phi x86_fp80 [ %61, %60 ], [ %102, %99 ]
%105 = phi x86_fp80 [ 0xK3FFF8000000000000000, %60 ], [ %100, %99 ]
%106 = phi x86_fp80 [ %49, %60 ], [ %101, %99 ]
%107 = call x86_fp80 @powl(x86_fp80 %104, x86_fp80 %106)
%108 = load x86_fp80, x86_fp80* %1
%109 = call x86_fp80 @remainderl(x86_fp80 %107, x86_fp80 %108)
%110 = load double, double* @DBL_EPSILON
%111 = fsub double 1.000000e+00, %110
%112 = fpext double %111 to x86_fp80
%113 = fcmp ult x86_fp80 %109, %112
br i1 %113, label %122, label %114
114: ; preds = %103
%115 = fadd double %110, 1.000000e+00
%116 = fpext double %115 to x86_fp80
%117 = fcmp ugt x86_fp80 %109, %116
br i1 %117, label %122, label %118
118: ; preds = %114
%119 = load x86_fp80, x86_fp80* %1
%120 = load x86_fp80, x86_fp80* %2
%121 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0), x86_fp80 %119, x86_fp80 %120, x86_fp80 %106)
br label %154
122: ; preds = %114, %103
%123 = fadd x86_fp80 %105, 0xKBFFF8000000000000000
%124 = fcmp ogt x86_fp80 %123, 0xK00000000000000000000
br i1 %124, label %125, label %148
125: ; preds = %122, %145
%126 = phi x86_fp80 [ %146, %145 ], [ 0xK00000000000000000000, %122 ]
%127 = load x86_fp80, x86_fp80* %2
%128 = call x86_fp80 @exp2l(x86_fp80 %126)
%129 = fmul x86_fp80 %106, %128
%130 = call x86_fp80 @powl(x86_fp80 %127, x86_fp80 %129)
%131 = load x86_fp80, x86_fp80* %1
%132 = call x86_fp80 @remainderl(x86_fp80 %130, x86_fp80 %131)
%133 = load x86_fp80, x86_fp80* %1
%134 = fadd x86_fp80 %133, 0xKBFFF8000000000000000
%135 = load double, double* @DBL_EPSILON
%136 = fpext double %135 to x86_fp80
%137 = fsub x86_fp80 %134, %136
%138 = fcmp ult x86_fp80 %132, %137
%139 = fadd x86_fp80 %134, %136
%140 = fcmp ugt x86_fp80 %132, %139
%141 = or i1 %138, %140
br i1 %141, label %145, label %142
142: ; preds = %125
%143 = load x86_fp80, x86_fp80* %2
%144 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0), x86_fp80 %133, x86_fp80 %143, x86_fp80 %126, x86_fp80 %106)
br label %154
145: ; preds = %125
%146 = fadd x86_fp80 %126, 0xK3FFF8000000000000000
%147 = fcmp olt x86_fp80 %146, %123
br i1 %147, label %125, label %148
148: ; preds = %145, %122
store x86_fp80 0xK00000000000000000000, x86_fp80* %2
%149 = fadd x86_fp80 %50, 0xK3FFF8000000000000000
%150 = load x86_fp80, x86_fp80* %3
%151 = fcmp olt x86_fp80 %149, %150
br i1 %151, label %47, label %152
152: ; preds = %148, %42
%153 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %154
154: ; preds = %142, %118, %39, %152, %25
%155 = phi i32 [ 1, %25 ], [ 1, %39 ], [ 0, %152 ], [ 0, %118 ], [ 0, %142 ]
ret i32 %155
}