#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 */
typedef int uint64_t;

/* Variables and functions */
int const FE_TONEAREST;
int /*<<< orphan*/ fesetround(int const);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ test(int const);
int main(int argc, char *argv[]) {
  int i, j, k, l, m;
  const uint64_t one = 1;
  const uint64_t mone = -1;
  const int roundingModes[4] = {FE_TONEAREST};
  const char *modeNames[4] = {"to nearest", "down", "up", "towards zero"};
  for (m = 0; m < 4; ++m) {
    fesetround(roundingModes[0]);
    printf("Testing uint64_t --> float conversions in round %s...\n",
           modeNames[m]);
    test(0);
    for (i = 0; i < 64; ++i) {
      test(one << i);
      test(mone << i);
      for (j = 0; j < i; ++j) {
        test((one << i) + (one << j));
        test((one << i) + (mone << j));
        test((mone << i) + (one << j));
        test((mone << i) + (mone << j));
        for (k = 0; k < j; ++k) {
          test((one << i) + (one << j) + (one << k));
          test((one << i) + (one << j) + (mone << k));
          test((one << i) + (mone << j) + (one << k));
          test((one << i) + (mone << j) + (mone << k));
          test((mone << i) + (one << j) + (one << k));
          test((mone << i) + (one << j) + (mone << k));
          test((mone << i) + (mone << j) + (one << k));
          test((mone << i) + (mone << j) + (mone << k));
          for (l = 0; l < k; ++l) {
            test((one << i) + (one << j) + (one << k) + (one << l));
            test((one << i) + (one << j) + (one << k) + (mone << l));
            test((one << i) + (one << j) + (mone << k) + (one << l));
            test((one << i) + (one << j) + (mone << k) + (mone << l));
            test((one << i) + (mone << j) + (one << k) + (one << l));
            test((one << i) + (mone << j) + (one << k) + (mone << l));
            test((one << i) + (mone << j) + (mone << k) + (one << l));
            test((one << i) + (mone << j) + (mone << k) + (mone << l));
            test((mone << i) + (one << j) + (one << k) + (one << l));
            test((mone << i) + (one << j) + (one << k) + (mone << l));
            test((mone << i) + (one << j) + (mone << k) + (one << l));
            test((mone << i) + (one << j) + (mone << k) + (mone << l));
            test((mone << i) + (mone << j) + (one << k) + (one << l));
            test((mone << i) + (mone << j) + (one << k) + (mone << l));
            test((mone << i) + (mone << j) + (mone << k) + (one << l));
            test((mone << i) + (mone << j) + (mone << k) + (mone << l));
          }
        }
      }
    }
  }
  printf("Finished Testing.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x28(%rbp)
movl   $0xffffffff,-0x2c(%rbp)
lea    -0x40(%rbp),%rcx
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
mov    %rcx,%rax
add    $0x4,%rax
add    $0x10,%rcx
mov    %rcx,-0x70(%rbp)
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
mov    -0x70(%rbp),%rcx
movl   $0x0,(%rax)
add    $0x4,%rax
mov    %rax,-0x78(%rbp)
cmp    %rcx,%rax
mov    %rax,-0x68(%rbp)
jne    117a <main+0x4a>
mov    0x2c4c(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0x2c49(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0x2c46(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0x2c43(%rip),%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x4,-0x24(%rbp)
jge    1796 <main+0x666>
mov    -0x40(%rbp),%edi
call   1030 <fesetround@plt>
movslq -0x24(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rsi
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <test@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x40,-0x14(%rbp)
jge    1783 <main+0x653>
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0xffffffff,%edi
shl    %cl,%edi
call   1050 <test@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1770 <main+0x640>
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0xffffffff,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0xffffffff,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    175d <main+0x62d>
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0xffffffff,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0xffffffff,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0xffffffff,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0xffffffff,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    174a <main+0x61a>
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0xffffffff,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0xffffffff,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0xffffffff,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0xffffffff,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0xffffffff,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0xffffffff,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0xffffffff,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x14(%rbp),%ecx
mov    $0xffffffff,%edi
shl    %cl,%edi
mov    -0x18(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x1c(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
mov    -0x20(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
add    %eax,%edi
call   1050 <test@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1400 <main+0x2d0>
jmp    174f <main+0x61f>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12b5 <main+0x185>
jmp    1762 <main+0x632>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1236 <main+0x106>
jmp    1775 <main+0x645>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1207 <main+0xd7>
jmp    1788 <main+0x658>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11d0 <main+0xa0>
lea    0x8be(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
xor    %ebx,%ebx
jmp    1173 <main+0x33>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x18(%rsp),%rbx
add    $0x1,%rbx
cmp    $0x4,%rbx
je     1409 <main+0x2c9>
xor    %edi,%edi
call   1040 <fesetround@plt>
lea    0xe83(%rip),%rax
mov    %rbx,0x18(%rsp)
movslq (%rax,%rbx,4),%rsi
add    %rax,%rsi
lea    0xea0(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
call   1060 <test@plt>
xor    %ebp,%ebp
jmp    11b8 <main+0x78>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%ebp
cmp    $0x40,%ebp
je     1160 <main+0x20>
mov    $0x1,%edi
mov    %ebp,%ecx
shl    %cl,%edi
mov    %rdi,0x20(%rsp)
call   1060 <test@plt>
mov    $0xffffffff,%edi
mov    %ebp,%ecx
shl    %cl,%edi
mov    %edi,0xc(%rsp)
call   1060 <test@plt>
test   %ebp,%ebp
je     11b0 <main+0x70>
xor    %ebx,%ebx
mov    %ebp,0x8(%rsp)
jmp    11fb <main+0xbb>
nopl   0x0(%rax)
add    $0x1,%ebx
mov    0x8(%rsp),%ebp
cmp    %ebp,%ebx
je     11b0 <main+0x70>
mov    $0x1,%r15d
mov    %ebx,%ecx
shl    %cl,%r15d
mov    0x20(%rsp),%r14
lea    (%r15,%r14,1),%edi
mov    %rdi,0x38(%rsp)
call   1060 <test@plt>
mov    $0xffffffff,%ebp
mov    %ebx,%ecx
shl    %cl,%ebp
lea    (%r14,%rbp,1),%edi
mov    %rdi,0x28(%rsp)
call   1060 <test@plt>
mov    0xc(%rsp),%r14d
add    %r14d,%r15d
mov    %r15,0x40(%rsp)
mov    %r15d,%edi
call   1060 <test@plt>
add    %r14d,%ebp
mov    %rbp,0x30(%rsp)
mov    %ebp,%edi
call   1060 <test@plt>
test   %ebx,%ebx
je     11f0 <main+0xb0>
xor    %ebp,%ebp
mov    %ebx,0x10(%rsp)
jmp    126b <main+0x12b>
add    $0x1,%ebp
mov    0x10(%rsp),%ebx
cmp    %ebx,%ebp
je     11f0 <main+0xb0>
mov    $0x1,%ebx
mov    %ebp,%ecx
shl    %cl,%ebx
mov    0x38(%rsp),%r14
lea    (%rbx,%r14,1),%r12d
mov    %r12d,%edi
call   1060 <test@plt>
mov    $0xffffffff,%r15d
mov    %ebp,%ecx
shl    %cl,%r15d
lea    (%r15,%r14,1),%edi
mov    %rdi,0x68(%rsp)
call   1060 <test@plt>
mov    0x28(%rsp),%r14
lea    (%rbx,%r14,1),%edi
mov    %rdi,0x60(%rsp)
call   1060 <test@plt>
lea    (%r15,%r14,1),%edi
mov    %rdi,0x58(%rsp)
call   1060 <test@plt>
mov    0x40(%rsp),%r14
lea    (%rbx,%r14,1),%edi
mov    %rdi,0x50(%rsp)
call   1060 <test@plt>
lea    (%r15,%r14,1),%edi
mov    %r15,%r14
mov    %rdi,0x48(%rsp)
call   1060 <test@plt>
mov    0x30(%rsp),%r15
add    %r15d,%ebx
mov    %rbx,0x70(%rsp)
mov    %ebx,%edi
call   1060 <test@plt>
add    %r15d,%r14d
mov    %r14d,%edi
call   1060 <test@plt>
test   %ebp,%ebp
je     1260 <main+0x120>
xor    %r15d,%r15d
mov    %ebp,0x14(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%r13d
mov    %r15d,%ecx
shl    %cl,%r13d
lea    (%r12,%r13,1),%edi
call   1060 <test@plt>
mov    $0xffffffff,%ebx
mov    %r15d,%ecx
shl    %cl,%ebx
lea    (%rbx,%r12,1),%edi
call   1060 <test@plt>
mov    0x68(%rsp),%rbp
lea    0x0(%r13,%rbp,1),%edi
call   1060 <test@plt>
lea    (%rbx,%rbp,1),%edi
call   1060 <test@plt>
mov    0x60(%rsp),%rbp
lea    0x0(%r13,%rbp,1),%edi
call   1060 <test@plt>
lea    (%rbx,%rbp,1),%edi
call   1060 <test@plt>
mov    0x58(%rsp),%rbp
lea    0x0(%r13,%rbp,1),%edi
call   1060 <test@plt>
lea    (%rbx,%rbp,1),%edi
call   1060 <test@plt>
mov    0x50(%rsp),%rbp
lea    0x0(%r13,%rbp,1),%edi
call   1060 <test@plt>
lea    (%rbx,%rbp,1),%edi
call   1060 <test@plt>
mov    0x48(%rsp),%rbp
lea    0x0(%r13,%rbp,1),%edi
call   1060 <test@plt>
lea    (%rbx,%rbp,1),%edi
call   1060 <test@plt>
mov    %r14,%rbp
mov    %r12,%r14
mov    0x70(%rsp),%r12
lea    (%r12,%r13,1),%edi
call   1060 <test@plt>
lea    (%rbx,%r12,1),%edi
mov    %r14,%r12
mov    %rbp,%r14
call   1060 <test@plt>
add    %r14d,%r13d
mov    %r13d,%edi
mov    0x14(%rsp),%ebp
call   1060 <test@plt>
add    %r14d,%ebx
mov    %ebx,%edi
call   1060 <test@plt>
add    $0x1,%r15d
cmp    %r15d,%ebp
jne    1320 <main+0x1e0>
jmp    1260 <main+0x120>
lea    0xc5b(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@FE_TONEAREST = constant i32 0
@.str = [11 x i8] c"to nearest\00"
@.str.1 = [5 x i8] c"down\00"
@.str.2 = [3 x i8] c"up\00"
@.str.3 = [13 x i8] c"towards zero\00"
@__const.main.modeNames = [4 x i8*] [i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [55 x i8] c"Testing uint64_t --> float conversions in round %s...\0A\00"
@.str.5 = [19 x i8] c"Finished Testing.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca [4 x i32]
%14 = alloca [4 x i8*]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %11
store i32 -1, i32* %12
%15 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 0
%16 = load i32, i32* @FE_TONEAREST
store i32 %16, i32* %15
%17 = getelementptr inbounds i32, i32* %15, i64 1
%18 = getelementptr inbounds i32, i32* %15, i64 4
br label %19
19: ; preds = %19, %2
%20 = phi i32* [ %17, %2 ], [ %21, %19 ]
store i32 0, i32* %20
%21 = getelementptr inbounds i32, i32* %20, i64 1
%22 = icmp eq i32* %21, %18
br i1 %22, label %23, label %19
23: ; preds = %19
%24 = bitcast [4 x i8*]* %14 to i8*
store i32 0, i32* %10
br label %25
25: ; preds = %367, %23
%26 = load i32, i32* %10
%27 = icmp slt i32 %26, 4
br i1 %27, label %28, label %370
28: ; preds = %25
%29 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 0
%30 = load i32, i32* %29
%31 = call i32 @fesetround(i32 %30)
%32 = load i32, i32* %10
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [4 x i8*], [4 x i8*]* %14, i64 0, i64 %33
%35 = load i8*, i8** %34
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i8* %35)
%37 = call i32 @test(i32 0)
store i32 0, i32* %6
br label %38
38: ; preds = %363, %28
%39 = load i32, i32* %6
%40 = icmp slt i32 %39, 64
br i1 %40, label %41, label %366
41: ; preds = %38
%42 = load i32, i32* %6
%43 = shl i32 1, %42
%44 = call i32 @test(i32 %43)
%45 = load i32, i32* %6
%46 = shl i32 -1, %45
%47 = call i32 @test(i32 %46)
store i32 0, i32* %7
br label %48
48: ; preds = %359, %41
%49 = load i32, i32* %7
%50 = load i32, i32* %6
%51 = icmp slt i32 %49, %50
br i1 %51, label %52, label %362
52: ; preds = %48
%53 = load i32, i32* %6
%54 = shl i32 1, %53
%55 = load i32, i32* %7
%56 = shl i32 1, %55
%57 = add nsw i32 %54, %56
%58 = call i32 @test(i32 %57)
%59 = load i32, i32* %6
%60 = shl i32 1, %59
%61 = load i32, i32* %7
%62 = shl i32 -1, %61
%63 = add nsw i32 %60, %62
%64 = call i32 @test(i32 %63)
%65 = load i32, i32* %6
%66 = shl i32 -1, %65
%67 = load i32, i32* %7
%68 = shl i32 1, %67
%69 = add nsw i32 %66, %68
%70 = call i32 @test(i32 %69)
%71 = load i32, i32* %6
%72 = shl i32 -1, %71
%73 = load i32, i32* %7
%74 = shl i32 -1, %73
%75 = add nsw i32 %72, %74
%76 = call i32 @test(i32 %75)
store i32 0, i32* %8
br label %77
77: ; preds = %355, %52
%78 = load i32, i32* %8
%79 = load i32, i32* %7
%80 = icmp slt i32 %78, %79
br i1 %80, label %81, label %358
81: ; preds = %77
%82 = load i32, i32* %6
%83 = shl i32 1, %82
%84 = load i32, i32* %7
%85 = shl i32 1, %84
%86 = add nsw i32 %83, %85
%87 = load i32, i32* %8
%88 = shl i32 1, %87
%89 = add nsw i32 %86, %88
%90 = call i32 @test(i32 %89)
%91 = load i32, i32* %6
%92 = shl i32 1, %91
%93 = load i32, i32* %7
%94 = shl i32 1, %93
%95 = add nsw i32 %92, %94
%96 = load i32, i32* %8
%97 = shl i32 -1, %96
%98 = add nsw i32 %95, %97
%99 = call i32 @test(i32 %98)
%100 = load i32, i32* %6
%101 = shl i32 1, %100
%102 = load i32, i32* %7
%103 = shl i32 -1, %102
%104 = add nsw i32 %101, %103
%105 = load i32, i32* %8
%106 = shl i32 1, %105
%107 = add nsw i32 %104, %106
%108 = call i32 @test(i32 %107)
%109 = load i32, i32* %6
%110 = shl i32 1, %109
%111 = load i32, i32* %7
%112 = shl i32 -1, %111
%113 = add nsw i32 %110, %112
%114 = load i32, i32* %8
%115 = shl i32 -1, %114
%116 = add nsw i32 %113, %115
%117 = call i32 @test(i32 %116)
%118 = load i32, i32* %6
%119 = shl i32 -1, %118
%120 = load i32, i32* %7
%121 = shl i32 1, %120
%122 = add nsw i32 %119, %121
%123 = load i32, i32* %8
%124 = shl i32 1, %123
%125 = add nsw i32 %122, %124
%126 = call i32 @test(i32 %125)
%127 = load i32, i32* %6
%128 = shl i32 -1, %127
%129 = load i32, i32* %7
%130 = shl i32 1, %129
%131 = add nsw i32 %128, %130
%132 = load i32, i32* %8
%133 = shl i32 -1, %132
%134 = add nsw i32 %131, %133
%135 = call i32 @test(i32 %134)
%136 = load i32, i32* %6
%137 = shl i32 -1, %136
%138 = load i32, i32* %7
%139 = shl i32 -1, %138
%140 = add nsw i32 %137, %139
%141 = load i32, i32* %8
%142 = shl i32 1, %141
%143 = add nsw i32 %140, %142
%144 = call i32 @test(i32 %143)
%145 = load i32, i32* %6
%146 = shl i32 -1, %145
%147 = load i32, i32* %7
%148 = shl i32 -1, %147
%149 = add nsw i32 %146, %148
%150 = load i32, i32* %8
%151 = shl i32 -1, %150
%152 = add nsw i32 %149, %151
%153 = call i32 @test(i32 %152)
store i32 0, i32* %9
br label %154
154: ; preds = %351, %81
%155 = load i32, i32* %9
%156 = load i32, i32* %8
%157 = icmp slt i32 %155, %156
br i1 %157, label %158, label %354
158: ; preds = %154
%159 = load i32, i32* %6
%160 = shl i32 1, %159
%161 = load i32, i32* %7
%162 = shl i32 1, %161
%163 = add nsw i32 %160, %162
%164 = load i32, i32* %8
%165 = shl i32 1, %164
%166 = add nsw i32 %163, %165
%167 = load i32, i32* %9
%168 = shl i32 1, %167
%169 = add nsw i32 %166, %168
%170 = call i32 @test(i32 %169)
%171 = load i32, i32* %6
%172 = shl i32 1, %171
%173 = load i32, i32* %7
%174 = shl i32 1, %173
%175 = add nsw i32 %172, %174
%176 = load i32, i32* %8
%177 = shl i32 1, %176
%178 = add nsw i32 %175, %177
%179 = load i32, i32* %9
%180 = shl i32 -1, %179
%181 = add nsw i32 %178, %180
%182 = call i32 @test(i32 %181)
%183 = load i32, i32* %6
%184 = shl i32 1, %183
%185 = load i32, i32* %7
%186 = shl i32 1, %185
%187 = add nsw i32 %184, %186
%188 = load i32, i32* %8
%189 = shl i32 -1, %188
%190 = add nsw i32 %187, %189
%191 = load i32, i32* %9
%192 = shl i32 1, %191
%193 = add nsw i32 %190, %192
%194 = call i32 @test(i32 %193)
%195 = load i32, i32* %6
%196 = shl i32 1, %195
%197 = load i32, i32* %7
%198 = shl i32 1, %197
%199 = add nsw i32 %196, %198
%200 = load i32, i32* %8
%201 = shl i32 -1, %200
%202 = add nsw i32 %199, %201
%203 = load i32, i32* %9
%204 = shl i32 -1, %203
%205 = add nsw i32 %202, %204
%206 = call i32 @test(i32 %205)
%207 = load i32, i32* %6
%208 = shl i32 1, %207
%209 = load i32, i32* %7
%210 = shl i32 -1, %209
%211 = add nsw i32 %208, %210
%212 = load i32, i32* %8
%213 = shl i32 1, %212
%214 = add nsw i32 %211, %213
%215 = load i32, i32* %9
%216 = shl i32 1, %215
%217 = add nsw i32 %214, %216
%218 = call i32 @test(i32 %217)
%219 = load i32, i32* %6
%220 = shl i32 1, %219
%221 = load i32, i32* %7
%222 = shl i32 -1, %221
%223 = add nsw i32 %220, %222
%224 = load i32, i32* %8
%225 = shl i32 1, %224
%226 = add nsw i32 %223, %225
%227 = load i32, i32* %9
%228 = shl i32 -1, %227
%229 = add nsw i32 %226, %228
%230 = call i32 @test(i32 %229)
%231 = load i32, i32* %6
%232 = shl i32 1, %231
%233 = load i32, i32* %7
%234 = shl i32 -1, %233
%235 = add nsw i32 %232, %234
%236 = load i32, i32* %8
%237 = shl i32 -1, %236
%238 = add nsw i32 %235, %237
%239 = load i32, i32* %9
%240 = shl i32 1, %239
%241 = add nsw i32 %238, %240
%242 = call i32 @test(i32 %241)
%243 = load i32, i32* %6
%244 = shl i32 1, %243
%245 = load i32, i32* %7
%246 = shl i32 -1, %245
%247 = add nsw i32 %244, %246
%248 = load i32, i32* %8
%249 = shl i32 -1, %248
%250 = add nsw i32 %247, %249
%251 = load i32, i32* %9
%252 = shl i32 -1, %251
%253 = add nsw i32 %250, %252
%254 = call i32 @test(i32 %253)
%255 = load i32, i32* %6
%256 = shl i32 -1, %255
%257 = load i32, i32* %7
%258 = shl i32 1, %257
%259 = add nsw i32 %256, %258
%260 = load i32, i32* %8
%261 = shl i32 1, %260
%262 = add nsw i32 %259, %261
%263 = load i32, i32* %9
%264 = shl i32 1, %263
%265 = add nsw i32 %262, %264
%266 = call i32 @test(i32 %265)
%267 = load i32, i32* %6
%268 = shl i32 -1, %267
%269 = load i32, i32* %7
%270 = shl i32 1, %269
%271 = add nsw i32 %268, %270
%272 = load i32, i32* %8
%273 = shl i32 1, %272
%274 = add nsw i32 %271, %273
%275 = load i32, i32* %9
%276 = shl i32 -1, %275
%277 = add nsw i32 %274, %276
%278 = call i32 @test(i32 %277)
%279 = load i32, i32* %6
%280 = shl i32 -1, %279
%281 = load i32, i32* %7
%282 = shl i32 1, %281
%283 = add nsw i32 %280, %282
%284 = load i32, i32* %8
%285 = shl i32 -1, %284
%286 = add nsw i32 %283, %285
%287 = load i32, i32* %9
%288 = shl i32 1, %287
%289 = add nsw i32 %286, %288
%290 = call i32 @test(i32 %289)
%291 = load i32, i32* %6
%292 = shl i32 -1, %291
%293 = load i32, i32* %7
%294 = shl i32 1, %293
%295 = add nsw i32 %292, %294
%296 = load i32, i32* %8
%297 = shl i32 -1, %296
%298 = add nsw i32 %295, %297
%299 = load i32, i32* %9
%300 = shl i32 -1, %299
%301 = add nsw i32 %298, %300
%302 = call i32 @test(i32 %301)
%303 = load i32, i32* %6
%304 = shl i32 -1, %303
%305 = load i32, i32* %7
%306 = shl i32 -1, %305
%307 = add nsw i32 %304, %306
%308 = load i32, i32* %8
%309 = shl i32 1, %308
%310 = add nsw i32 %307, %309
%311 = load i32, i32* %9
%312 = shl i32 1, %311
%313 = add nsw i32 %310, %312
%314 = call i32 @test(i32 %313)
%315 = load i32, i32* %6
%316 = shl i32 -1, %315
%317 = load i32, i32* %7
%318 = shl i32 -1, %317
%319 = add nsw i32 %316, %318
%320 = load i32, i32* %8
%321 = shl i32 1, %320
%322 = add nsw i32 %319, %321
%323 = load i32, i32* %9
%324 = shl i32 -1, %323
%325 = add nsw i32 %322, %324
%326 = call i32 @test(i32 %325)
%327 = load i32, i32* %6
%328 = shl i32 -1, %327
%329 = load i32, i32* %7
%330 = shl i32 -1, %329
%331 = add nsw i32 %328, %330
%332 = load i32, i32* %8
%333 = shl i32 -1, %332
%334 = add nsw i32 %331, %333
%335 = load i32, i32* %9
%336 = shl i32 1, %335
%337 = add nsw i32 %334, %336
%338 = call i32 @test(i32 %337)
%339 = load i32, i32* %6
%340 = shl i32 -1, %339
%341 = load i32, i32* %7
%342 = shl i32 -1, %341
%343 = add nsw i32 %340, %342
%344 = load i32, i32* %8
%345 = shl i32 -1, %344
%346 = add nsw i32 %343, %345
%347 = load i32, i32* %9
%348 = shl i32 -1, %347
%349 = add nsw i32 %346, %348
%350 = call i32 @test(i32 %349)
br label %351
351: ; preds = %158
%352 = load i32, i32* %9
%353 = add nsw i32 %352, 1
store i32 %353, i32* %9
br label %154
354: ; preds = %154
br label %355
355: ; preds = %354
%356 = load i32, i32* %8
%357 = add nsw i32 %356, 1
store i32 %357, i32* %8
br label %77
358: ; preds = %77
br label %359
359: ; preds = %358
%360 = load i32, i32* %7
%361 = add nsw i32 %360, 1
store i32 %361, i32* %7
br label %48
362: ; preds = %48
br label %363
363: ; preds = %362
%364 = load i32, i32* %6
%365 = add nsw i32 %364, 1
store i32 %365, i32* %6
br label %38
366: ; preds = %38
br label %367
367: ; preds = %366
%368 = load i32, i32* %10
%369 = add nsw i32 %368, 1
store i32 %369, i32* %10
br label %25
370: ; preds = %25
%371 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@FE_TONEAREST = constant i32 0
@.str = [11 x i8] c"to nearest\00"
@.str.1 = [5 x i8] c"down\00"
@.str.2 = [3 x i8] c"up\00"
@.str.3 = [13 x i8] c"towards zero\00"
@reltable.main = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str to i64), i64 ptrtoint ([4 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.1 to i64), i64 ptrtoint ([4 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.2 to i64), i64 ptrtoint ([4 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.3 to i64), i64 ptrtoint ([4 x i32]* @reltable.main to i64)) to i32)]
@.str.4 = [55 x i8] c"Testing uint64_t --> float conversions in round %s...\0A\00"
@str = [18 x i8] c"Finished Testing.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %98
%4 = phi i64 [ 0, %2 ], [ %99, %98 ]
%5 = call i32 @fesetround(i32 0)
%6 = shl i64 %4, 2
%7 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.main to i8*), i64 %6)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i8* %7)
%9 = call i32 @test(i32 0)
br label %10
10: ; preds = %3, %95
%11 = phi i32 [ 0, %3 ], [ %96, %95 ]
%12 = shl nuw i32 1, %11
%13 = call i32 @test(i32 %12)
%14 = shl nsw i32 -1, %11
%15 = call i32 @test(i32 %14)
%16 = icmp eq i32 %11, 0
br i1 %16, label %95, label %17
17: ; preds = %10, %92
%18 = phi i32 [ %93, %92 ], [ 0, %10 ]
%19 = shl nuw i32 1, %18
%20 = add nsw i32 %19, %12
%21 = call i32 @test(i32 %20)
%22 = shl nsw i32 -1, %18
%23 = add nsw i32 %22, %12
%24 = call i32 @test(i32 %23)
%25 = add nsw i32 %19, %14
%26 = call i32 @test(i32 %25)
%27 = add nsw i32 %22, %14
%28 = call i32 @test(i32 %27)
%29 = icmp eq i32 %18, 0
br i1 %29, label %92, label %30
30: ; preds = %17, %89
%31 = phi i32 [ %90, %89 ], [ 0, %17 ]
%32 = shl nuw i32 1, %31
%33 = add nsw i32 %32, %20
%34 = call i32 @test(i32 %33)
%35 = shl nsw i32 -1, %31
%36 = add nsw i32 %35, %20
%37 = call i32 @test(i32 %36)
%38 = add nsw i32 %32, %23
%39 = call i32 @test(i32 %38)
%40 = add nsw i32 %35, %23
%41 = call i32 @test(i32 %40)
%42 = add nsw i32 %32, %25
%43 = call i32 @test(i32 %42)
%44 = add nsw i32 %35, %25
%45 = call i32 @test(i32 %44)
%46 = add nsw i32 %32, %27
%47 = call i32 @test(i32 %46)
%48 = add nsw i32 %35, %27
%49 = call i32 @test(i32 %48)
%50 = icmp eq i32 %31, 0
br i1 %50, label %89, label %51
51: ; preds = %30, %51
%52 = phi i32 [ %87, %51 ], [ 0, %30 ]
%53 = shl nuw i32 1, %52
%54 = add nsw i32 %53, %33
%55 = call i32 @test(i32 %54)
%56 = shl nsw i32 -1, %52
%57 = add nsw i32 %56, %33
%58 = call i32 @test(i32 %57)
%59 = add nsw i32 %53, %36
%60 = call i32 @test(i32 %59)
%61 = add nsw i32 %56, %36
%62 = call i32 @test(i32 %61)
%63 = add nsw i32 %53, %38
%64 = call i32 @test(i32 %63)
%65 = add nsw i32 %56, %38
%66 = call i32 @test(i32 %65)
%67 = add nsw i32 %53, %40
%68 = call i32 @test(i32 %67)
%69 = add nsw i32 %56, %40
%70 = call i32 @test(i32 %69)
%71 = add nsw i32 %53, %42
%72 = call i32 @test(i32 %71)
%73 = add nsw i32 %56, %42
%74 = call i32 @test(i32 %73)
%75 = add nsw i32 %53, %44
%76 = call i32 @test(i32 %75)
%77 = add nsw i32 %56, %44
%78 = call i32 @test(i32 %77)
%79 = add nsw i32 %53, %46
%80 = call i32 @test(i32 %79)
%81 = add nsw i32 %56, %46
%82 = call i32 @test(i32 %81)
%83 = add nsw i32 %53, %48
%84 = call i32 @test(i32 %83)
%85 = add nsw i32 %56, %48
%86 = call i32 @test(i32 %85)
%87 = add nuw nsw i32 %52, 1
%88 = icmp eq i32 %87, %31
br i1 %88, label %89, label %51
89: ; preds = %51, %30
%90 = add nuw nsw i32 %31, 1
%91 = icmp eq i32 %90, %18
br i1 %91, label %92, label %30
92: ; preds = %89, %17
%93 = add nuw nsw i32 %18, 1
%94 = icmp eq i32 %93, %11
br i1 %94, label %95, label %17
95: ; preds = %92, %10
%96 = add nuw nsw i32 %11, 1
%97 = icmp eq i32 %96, 64
br i1 %97, label %98, label %10
98: ; preds = %95
%99 = add nuw nsw i64 %4, 1
%100 = icmp eq i64 %99, 4
br i1 %100, label %101, label %3
101: ; preds = %98
%102 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 0
}