#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*/ puts(char *);
int revbin(int);
int /*<<< orphan*/ unit_test_checker(char *, int);
void revbin_test(void) {
  puts("revbin_test");
  unit_test_checker("revbin(0) == 0", (revbin(0) == 0));
  unit_test_checker("revbin(0x00000001) == 0x80000000",
                    (revbin(0x00000001) == 0x80000000));
  unit_test_checker("revbin(0x00000002) == 0x40000000",
                    (revbin(0x00000002) == 0x40000000));
  unit_test_checker("revbin(0x00000004) == 0x20000000",
                    (revbin(0x00000004) == 0x20000000));
  unit_test_checker("revbin(0x00000008) == 0x10000000",
                    (revbin(0x00000008) == 0x10000000));
  unit_test_checker("revbin(0x00000010) == 0x08000000",
                    (revbin(0x00000010) == 0x08000000));
  unit_test_checker("revbin(0x00000020) == 0x04000000",
                    (revbin(0x00000020) == 0x04000000));
  unit_test_checker("revbin(0x00000040) == 0x02000000",
                    (revbin(0x00000040) == 0x02000000));
  unit_test_checker("revbin(0x00000080) == 0x01000000",
                    (revbin(0x00000080) == 0x01000000));
  unit_test_checker("revbin(0x00000100) == 0x00800000",
                    (revbin(0x00000100) == 0x00800000));
  unit_test_checker("revbin(0x00000200) == 0x00400000",
                    (revbin(0x00000200) == 0x00400000));
  unit_test_checker("revbin(0x00000400) == 0x00200000",
                    (revbin(0x00000400) == 0x00200000));
  unit_test_checker("revbin(0x00000800) == 0x00100000",
                    (revbin(0x00000800) == 0x00100000));
  unit_test_checker("revbin(0x00001000) == 0x00080000",
                    (revbin(0x00001000) == 0x00080000));
  unit_test_checker("revbin(0x00002000) == 0x00040000",
                    (revbin(0x00002000) == 0x00040000));
  unit_test_checker("revbin(0x00004000) == 0x00020000",
                    (revbin(0x00004000) == 0x00020000));
  unit_test_checker("revbin(0x00008000) == 0x00010000",
                    (revbin(0x00008000) == 0x00010000));
  unit_test_checker("revbin(0x00010000) == 0x00008000",
                    (revbin(0x00010000) == 0x00008000));
  unit_test_checker("revbin(0x00020000) == 0x00004000",
                    (revbin(0x00020000) == 0x00004000));
  unit_test_checker("revbin(0x00040000) == 0x00002000",
                    (revbin(0x00040000) == 0x00002000));
  unit_test_checker("revbin(0x00080000) == 0x00001000",
                    (revbin(0x00080000) == 0x00001000));
  unit_test_checker("revbin(0x00100000) == 0x00000800",
                    (revbin(0x00100000) == 0x00000800));
  unit_test_checker("revbin(0x00200000) == 0x00000400",
                    (revbin(0x00200000) == 0x00000400));
  unit_test_checker("revbin(0x00400000) == 0x00000200",
                    (revbin(0x00400000) == 0x00000200));
  unit_test_checker("revbin(0x00800000) == 0x00000100",
                    (revbin(0x00800000) == 0x00000100));
  unit_test_checker("revbin(0x01000000) == 0x00000080",
                    (revbin(0x01000000) == 0x00000080));
  unit_test_checker("revbin(0x02000000) == 0x00000040",
                    (revbin(0x02000000) == 0x00000040));
  unit_test_checker("revbin(0x04000000) == 0x00000020",
                    (revbin(0x04000000) == 0x00000020));
  unit_test_checker("revbin(0x08000000) == 0x00000010",
                    (revbin(0x08000000) == 0x00000010));
  unit_test_checker("revbin(0x10000000) == 0x00000008",
                    (revbin(0x10000000) == 0x00000008));
  unit_test_checker("revbin(0x20000000) == 0x00000004",
                    (revbin(0x20000000) == 0x00000004));
  unit_test_checker("revbin(0x40000000) == 0x00000002",
                    (revbin(0x40000000) == 0x00000002));
  unit_test_checker("revbin(0x80000000) == 0x00000001",
                    (revbin(0x80000000) == 0x00000001));
  return;
}


x86 assembly (clang, -O0):
<revbin_test>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <revbin@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xeb3(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x1,%edi
call   1040 <revbin@plt>
cmp    $0x80000000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe9f(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x2,%edi
call   1040 <revbin@plt>
cmp    $0x40000000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe9d(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x4,%edi
call   1040 <revbin@plt>
cmp    $0x20000000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe9b(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x8,%edi
call   1040 <revbin@plt>
cmp    $0x10000000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe99(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x10,%edi
call   1040 <revbin@plt>
cmp    $0x8000000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe97(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x20,%edi
call   1040 <revbin@plt>
cmp    $0x4000000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe95(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x40,%edi
call   1040 <revbin@plt>
cmp    $0x2000000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe93(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x80,%edi
call   1040 <revbin@plt>
cmp    $0x1000000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe91(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x100,%edi
call   1040 <revbin@plt>
cmp    $0x800000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe8f(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x200,%edi
call   1040 <revbin@plt>
cmp    $0x400000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe8d(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x400,%edi
call   1040 <revbin@plt>
cmp    $0x200000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe8b(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x800,%edi
call   1040 <revbin@plt>
cmp    $0x100000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe89(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x1000,%edi
call   1040 <revbin@plt>
cmp    $0x80000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe87(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x2000,%edi
call   1040 <revbin@plt>
cmp    $0x40000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe85(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x4000,%edi
call   1040 <revbin@plt>
cmp    $0x20000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe83(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x8000,%edi
call   1040 <revbin@plt>
cmp    $0x10000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe81(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x10000,%edi
call   1040 <revbin@plt>
cmp    $0x8000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe7f(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x20000,%edi
call   1040 <revbin@plt>
cmp    $0x4000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe7d(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x40000,%edi
call   1040 <revbin@plt>
cmp    $0x2000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe7b(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x80000,%edi
call   1040 <revbin@plt>
cmp    $0x1000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe79(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x100000,%edi
call   1040 <revbin@plt>
cmp    $0x800,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe77(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x200000,%edi
call   1040 <revbin@plt>
cmp    $0x400,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe75(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x400000,%edi
call   1040 <revbin@plt>
cmp    $0x200,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe73(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x800000,%edi
call   1040 <revbin@plt>
cmp    $0x100,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe71(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x1000000,%edi
call   1040 <revbin@plt>
cmp    $0x80,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe6f(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x2000000,%edi
call   1040 <revbin@plt>
cmp    $0x40,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe6f(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x4000000,%edi
call   1040 <revbin@plt>
cmp    $0x20,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe6f(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x8000000,%edi
call   1040 <revbin@plt>
cmp    $0x10,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe6f(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x10000000,%edi
call   1040 <revbin@plt>
cmp    $0x8,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe6f(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x20000000,%edi
call   1040 <revbin@plt>
cmp    $0x4,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe6f(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x40000000,%edi
call   1040 <revbin@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe6f(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x80000000,%edi
call   1040 <revbin@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe6f(%rip),%rdi
call   1050 <unit_test_checker@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<revbin_test>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
lea    0xeb9(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x1,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x80000000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x2,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x40000000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x4,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x20000000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x8,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x10000000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x10,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x8000000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x20,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x4000000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x40,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x2000000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x80,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x1000000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x100,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x800000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x200,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x400000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x400,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x200000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x800,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x100000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x1000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x80000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x2000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x40000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x4000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x20000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x8000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x10000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x10000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x8000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x20000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x4000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x40000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x2000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x80000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x1000,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x100000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x800,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x200000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x400,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x400000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x200,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x800000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x100,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x1000000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x80,%eax
sete   %sil
lea    0xea7(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x2000000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x40,%eax
sete   %sil
lea    0xea9(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x4000000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x20,%eax
sete   %sil
lea    0xeab(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x8000000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x10,%eax
sete   %sil
lea    0xead(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x10000000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x8,%eax
sete   %sil
lea    0xeaf(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x20000000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x4,%eax
sete   %sil
lea    0xeb1(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x40000000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x2,%eax
sete   %sil
lea    0xeb3(%rip),%rdi
call   1050 <unit_test_checker@plt>
mov    $0x80000000,%edi
call   1040 <revbin@plt>
xor    %esi,%esi
cmp    $0x1,%eax
sete   %sil
lea    0xeb5(%rip),%rdi
pop    %rax
jmp    1050 <unit_test_checker@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"revbin_test\00"
@.str.1 = [15 x i8] c"revbin(0) == 0\00"
@.str.2 = [33 x i8] c"revbin(0x00000001) == 0x80000000\00"
@.str.3 = [33 x i8] c"revbin(0x00000002) == 0x40000000\00"
@.str.4 = [33 x i8] c"revbin(0x00000004) == 0x20000000\00"
@.str.5 = [33 x i8] c"revbin(0x00000008) == 0x10000000\00"
@.str.6 = [33 x i8] c"revbin(0x00000010) == 0x08000000\00"
@.str.7 = [33 x i8] c"revbin(0x00000020) == 0x04000000\00"
@.str.8 = [33 x i8] c"revbin(0x00000040) == 0x02000000\00"
@.str.9 = [33 x i8] c"revbin(0x00000080) == 0x01000000\00"
@.str.10 = [33 x i8] c"revbin(0x00000100) == 0x00800000\00"
@.str.11 = [33 x i8] c"revbin(0x00000200) == 0x00400000\00"
@.str.12 = [33 x i8] c"revbin(0x00000400) == 0x00200000\00"
@.str.13 = [33 x i8] c"revbin(0x00000800) == 0x00100000\00"
@.str.14 = [33 x i8] c"revbin(0x00001000) == 0x00080000\00"
@.str.15 = [33 x i8] c"revbin(0x00002000) == 0x00040000\00"
@.str.16 = [33 x i8] c"revbin(0x00004000) == 0x00020000\00"
@.str.17 = [33 x i8] c"revbin(0x00008000) == 0x00010000\00"
@.str.18 = [33 x i8] c"revbin(0x00010000) == 0x00008000\00"
@.str.19 = [33 x i8] c"revbin(0x00020000) == 0x00004000\00"
@.str.20 = [33 x i8] c"revbin(0x00040000) == 0x00002000\00"
@.str.21 = [33 x i8] c"revbin(0x00080000) == 0x00001000\00"
@.str.22 = [33 x i8] c"revbin(0x00100000) == 0x00000800\00"
@.str.23 = [33 x i8] c"revbin(0x00200000) == 0x00000400\00"
@.str.24 = [33 x i8] c"revbin(0x00400000) == 0x00000200\00"
@.str.25 = [33 x i8] c"revbin(0x00800000) == 0x00000100\00"
@.str.26 = [33 x i8] c"revbin(0x01000000) == 0x00000080\00"
@.str.27 = [33 x i8] c"revbin(0x02000000) == 0x00000040\00"
@.str.28 = [33 x i8] c"revbin(0x04000000) == 0x00000020\00"
@.str.29 = [33 x i8] c"revbin(0x08000000) == 0x00000010\00"
@.str.30 = [33 x i8] c"revbin(0x10000000) == 0x00000008\00"
@.str.31 = [33 x i8] c"revbin(0x20000000) == 0x00000004\00"
@.str.32 = [33 x i8] c"revbin(0x40000000) == 0x00000002\00"
@.str.33 = [33 x i8] c"revbin(0x80000000) == 0x00000001\00"
define void @revbin_test() {
%1 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @revbin(i32 0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
%5 = call i32 @unit_test_checker(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 @revbin(i32 1)
%7 = icmp eq i32 %6, -2147483648
%8 = zext i1 %7 to i32
%9 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = call i32 @revbin(i32 2)
%11 = icmp eq i32 %10, 1073741824
%12 = zext i1 %11 to i32
%13 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%14 = call i32 @revbin(i32 4)
%15 = icmp eq i32 %14, 536870912
%16 = zext i1 %15 to i32
%17 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %16)
%18 = call i32 @revbin(i32 8)
%19 = icmp eq i32 %18, 268435456
%20 = zext i1 %19 to i32
%21 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 %20)
%22 = call i32 @revbin(i32 16)
%23 = icmp eq i32 %22, 134217728
%24 = zext i1 %23 to i32
%25 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i32 %24)
%26 = call i32 @revbin(i32 32)
%27 = icmp eq i32 %26, 67108864
%28 = zext i1 %27 to i32
%29 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), i32 %28)
%30 = call i32 @revbin(i32 64)
%31 = icmp eq i32 %30, 33554432
%32 = zext i1 %31 to i32
%33 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0), i32 %32)
%34 = call i32 @revbin(i32 128)
%35 = icmp eq i32 %34, 16777216
%36 = zext i1 %35 to i32
%37 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0), i32 %36)
%38 = call i32 @revbin(i32 256)
%39 = icmp eq i32 %38, 8388608
%40 = zext i1 %39 to i32
%41 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0), i32 %40)
%42 = call i32 @revbin(i32 512)
%43 = icmp eq i32 %42, 4194304
%44 = zext i1 %43 to i32
%45 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0), i32 %44)
%46 = call i32 @revbin(i32 1024)
%47 = icmp eq i32 %46, 2097152
%48 = zext i1 %47 to i32
%49 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.12, i64 0, i64 0), i32 %48)
%50 = call i32 @revbin(i32 2048)
%51 = icmp eq i32 %50, 1048576
%52 = zext i1 %51 to i32
%53 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.13, i64 0, i64 0), i32 %52)
%54 = call i32 @revbin(i32 4096)
%55 = icmp eq i32 %54, 524288
%56 = zext i1 %55 to i32
%57 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.14, i64 0, i64 0), i32 %56)
%58 = call i32 @revbin(i32 8192)
%59 = icmp eq i32 %58, 262144
%60 = zext i1 %59 to i32
%61 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.15, i64 0, i64 0), i32 %60)
%62 = call i32 @revbin(i32 16384)
%63 = icmp eq i32 %62, 131072
%64 = zext i1 %63 to i32
%65 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.16, i64 0, i64 0), i32 %64)
%66 = call i32 @revbin(i32 32768)
%67 = icmp eq i32 %66, 65536
%68 = zext i1 %67 to i32
%69 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.17, i64 0, i64 0), i32 %68)
%70 = call i32 @revbin(i32 65536)
%71 = icmp eq i32 %70, 32768
%72 = zext i1 %71 to i32
%73 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.18, i64 0, i64 0), i32 %72)
%74 = call i32 @revbin(i32 131072)
%75 = icmp eq i32 %74, 16384
%76 = zext i1 %75 to i32
%77 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.19, i64 0, i64 0), i32 %76)
%78 = call i32 @revbin(i32 262144)
%79 = icmp eq i32 %78, 8192
%80 = zext i1 %79 to i32
%81 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.20, i64 0, i64 0), i32 %80)
%82 = call i32 @revbin(i32 524288)
%83 = icmp eq i32 %82, 4096
%84 = zext i1 %83 to i32
%85 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.21, i64 0, i64 0), i32 %84)
%86 = call i32 @revbin(i32 1048576)
%87 = icmp eq i32 %86, 2048
%88 = zext i1 %87 to i32
%89 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.22, i64 0, i64 0), i32 %88)
%90 = call i32 @revbin(i32 2097152)
%91 = icmp eq i32 %90, 1024
%92 = zext i1 %91 to i32
%93 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.23, i64 0, i64 0), i32 %92)
%94 = call i32 @revbin(i32 4194304)
%95 = icmp eq i32 %94, 512
%96 = zext i1 %95 to i32
%97 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.24, i64 0, i64 0), i32 %96)
%98 = call i32 @revbin(i32 8388608)
%99 = icmp eq i32 %98, 256
%100 = zext i1 %99 to i32
%101 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.25, i64 0, i64 0), i32 %100)
%102 = call i32 @revbin(i32 16777216)
%103 = icmp eq i32 %102, 128
%104 = zext i1 %103 to i32
%105 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.26, i64 0, i64 0), i32 %104)
%106 = call i32 @revbin(i32 33554432)
%107 = icmp eq i32 %106, 64
%108 = zext i1 %107 to i32
%109 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.27, i64 0, i64 0), i32 %108)
%110 = call i32 @revbin(i32 67108864)
%111 = icmp eq i32 %110, 32
%112 = zext i1 %111 to i32
%113 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.28, i64 0, i64 0), i32 %112)
%114 = call i32 @revbin(i32 134217728)
%115 = icmp eq i32 %114, 16
%116 = zext i1 %115 to i32
%117 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.29, i64 0, i64 0), i32 %116)
%118 = call i32 @revbin(i32 268435456)
%119 = icmp eq i32 %118, 8
%120 = zext i1 %119 to i32
%121 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.30, i64 0, i64 0), i32 %120)
%122 = call i32 @revbin(i32 536870912)
%123 = icmp eq i32 %122, 4
%124 = zext i1 %123 to i32
%125 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.31, i64 0, i64 0), i32 %124)
%126 = call i32 @revbin(i32 1073741824)
%127 = icmp eq i32 %126, 2
%128 = zext i1 %127 to i32
%129 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.32, i64 0, i64 0), i32 %128)
%130 = call i32 @revbin(i32 -2147483648)
%131 = icmp eq i32 %130, 1
%132 = zext i1 %131 to i32
%133 = call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.33, i64 0, i64 0), i32 %132)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"revbin_test\00"
@.str.1 = [15 x i8] c"revbin(0) == 0\00"
@.str.2 = [33 x i8] c"revbin(0x00000001) == 0x80000000\00"
@.str.3 = [33 x i8] c"revbin(0x00000002) == 0x40000000\00"
@.str.4 = [33 x i8] c"revbin(0x00000004) == 0x20000000\00"
@.str.5 = [33 x i8] c"revbin(0x00000008) == 0x10000000\00"
@.str.6 = [33 x i8] c"revbin(0x00000010) == 0x08000000\00"
@.str.7 = [33 x i8] c"revbin(0x00000020) == 0x04000000\00"
@.str.8 = [33 x i8] c"revbin(0x00000040) == 0x02000000\00"
@.str.9 = [33 x i8] c"revbin(0x00000080) == 0x01000000\00"
@.str.10 = [33 x i8] c"revbin(0x00000100) == 0x00800000\00"
@.str.11 = [33 x i8] c"revbin(0x00000200) == 0x00400000\00"
@.str.12 = [33 x i8] c"revbin(0x00000400) == 0x00200000\00"
@.str.13 = [33 x i8] c"revbin(0x00000800) == 0x00100000\00"
@.str.14 = [33 x i8] c"revbin(0x00001000) == 0x00080000\00"
@.str.15 = [33 x i8] c"revbin(0x00002000) == 0x00040000\00"
@.str.16 = [33 x i8] c"revbin(0x00004000) == 0x00020000\00"
@.str.17 = [33 x i8] c"revbin(0x00008000) == 0x00010000\00"
@.str.18 = [33 x i8] c"revbin(0x00010000) == 0x00008000\00"
@.str.19 = [33 x i8] c"revbin(0x00020000) == 0x00004000\00"
@.str.20 = [33 x i8] c"revbin(0x00040000) == 0x00002000\00"
@.str.21 = [33 x i8] c"revbin(0x00080000) == 0x00001000\00"
@.str.22 = [33 x i8] c"revbin(0x00100000) == 0x00000800\00"
@.str.23 = [33 x i8] c"revbin(0x00200000) == 0x00000400\00"
@.str.24 = [33 x i8] c"revbin(0x00400000) == 0x00000200\00"
@.str.25 = [33 x i8] c"revbin(0x00800000) == 0x00000100\00"
@.str.26 = [33 x i8] c"revbin(0x01000000) == 0x00000080\00"
@.str.27 = [33 x i8] c"revbin(0x02000000) == 0x00000040\00"
@.str.28 = [33 x i8] c"revbin(0x04000000) == 0x00000020\00"
@.str.29 = [33 x i8] c"revbin(0x08000000) == 0x00000010\00"
@.str.30 = [33 x i8] c"revbin(0x10000000) == 0x00000008\00"
@.str.31 = [33 x i8] c"revbin(0x20000000) == 0x00000004\00"
@.str.32 = [33 x i8] c"revbin(0x40000000) == 0x00000002\00"
@.str.33 = [33 x i8] c"revbin(0x80000000) == 0x00000001\00"
define void @revbin_test() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @revbin(i32 0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = tail call i32 @revbin(i32 1)
%7 = icmp eq i32 %6, -2147483648
%8 = zext i1 %7 to i32
%9 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = tail call i32 @revbin(i32 2)
%11 = icmp eq i32 %10, 1073741824
%12 = zext i1 %11 to i32
%13 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%14 = tail call i32 @revbin(i32 4)
%15 = icmp eq i32 %14, 536870912
%16 = zext i1 %15 to i32
%17 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %16)
%18 = tail call i32 @revbin(i32 8)
%19 = icmp eq i32 %18, 268435456
%20 = zext i1 %19 to i32
%21 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 %20)
%22 = tail call i32 @revbin(i32 16)
%23 = icmp eq i32 %22, 134217728
%24 = zext i1 %23 to i32
%25 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i32 %24)
%26 = tail call i32 @revbin(i32 32)
%27 = icmp eq i32 %26, 67108864
%28 = zext i1 %27 to i32
%29 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0), i32 %28)
%30 = tail call i32 @revbin(i32 64)
%31 = icmp eq i32 %30, 33554432
%32 = zext i1 %31 to i32
%33 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0), i32 %32)
%34 = tail call i32 @revbin(i32 128)
%35 = icmp eq i32 %34, 16777216
%36 = zext i1 %35 to i32
%37 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0), i32 %36)
%38 = tail call i32 @revbin(i32 256)
%39 = icmp eq i32 %38, 8388608
%40 = zext i1 %39 to i32
%41 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0), i32 %40)
%42 = tail call i32 @revbin(i32 512)
%43 = icmp eq i32 %42, 4194304
%44 = zext i1 %43 to i32
%45 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0), i32 %44)
%46 = tail call i32 @revbin(i32 1024)
%47 = icmp eq i32 %46, 2097152
%48 = zext i1 %47 to i32
%49 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.12, i64 0, i64 0), i32 %48)
%50 = tail call i32 @revbin(i32 2048)
%51 = icmp eq i32 %50, 1048576
%52 = zext i1 %51 to i32
%53 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.13, i64 0, i64 0), i32 %52)
%54 = tail call i32 @revbin(i32 4096)
%55 = icmp eq i32 %54, 524288
%56 = zext i1 %55 to i32
%57 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.14, i64 0, i64 0), i32 %56)
%58 = tail call i32 @revbin(i32 8192)
%59 = icmp eq i32 %58, 262144
%60 = zext i1 %59 to i32
%61 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.15, i64 0, i64 0), i32 %60)
%62 = tail call i32 @revbin(i32 16384)
%63 = icmp eq i32 %62, 131072
%64 = zext i1 %63 to i32
%65 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.16, i64 0, i64 0), i32 %64)
%66 = tail call i32 @revbin(i32 32768)
%67 = icmp eq i32 %66, 65536
%68 = zext i1 %67 to i32
%69 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.17, i64 0, i64 0), i32 %68)
%70 = tail call i32 @revbin(i32 65536)
%71 = icmp eq i32 %70, 32768
%72 = zext i1 %71 to i32
%73 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.18, i64 0, i64 0), i32 %72)
%74 = tail call i32 @revbin(i32 131072)
%75 = icmp eq i32 %74, 16384
%76 = zext i1 %75 to i32
%77 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.19, i64 0, i64 0), i32 %76)
%78 = tail call i32 @revbin(i32 262144)
%79 = icmp eq i32 %78, 8192
%80 = zext i1 %79 to i32
%81 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.20, i64 0, i64 0), i32 %80)
%82 = tail call i32 @revbin(i32 524288)
%83 = icmp eq i32 %82, 4096
%84 = zext i1 %83 to i32
%85 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.21, i64 0, i64 0), i32 %84)
%86 = tail call i32 @revbin(i32 1048576)
%87 = icmp eq i32 %86, 2048
%88 = zext i1 %87 to i32
%89 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.22, i64 0, i64 0), i32 %88)
%90 = tail call i32 @revbin(i32 2097152)
%91 = icmp eq i32 %90, 1024
%92 = zext i1 %91 to i32
%93 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.23, i64 0, i64 0), i32 %92)
%94 = tail call i32 @revbin(i32 4194304)
%95 = icmp eq i32 %94, 512
%96 = zext i1 %95 to i32
%97 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.24, i64 0, i64 0), i32 %96)
%98 = tail call i32 @revbin(i32 8388608)
%99 = icmp eq i32 %98, 256
%100 = zext i1 %99 to i32
%101 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.25, i64 0, i64 0), i32 %100)
%102 = tail call i32 @revbin(i32 16777216)
%103 = icmp eq i32 %102, 128
%104 = zext i1 %103 to i32
%105 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.26, i64 0, i64 0), i32 %104)
%106 = tail call i32 @revbin(i32 33554432)
%107 = icmp eq i32 %106, 64
%108 = zext i1 %107 to i32
%109 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.27, i64 0, i64 0), i32 %108)
%110 = tail call i32 @revbin(i32 67108864)
%111 = icmp eq i32 %110, 32
%112 = zext i1 %111 to i32
%113 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.28, i64 0, i64 0), i32 %112)
%114 = tail call i32 @revbin(i32 134217728)
%115 = icmp eq i32 %114, 16
%116 = zext i1 %115 to i32
%117 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.29, i64 0, i64 0), i32 %116)
%118 = tail call i32 @revbin(i32 268435456)
%119 = icmp eq i32 %118, 8
%120 = zext i1 %119 to i32
%121 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.30, i64 0, i64 0), i32 %120)
%122 = tail call i32 @revbin(i32 536870912)
%123 = icmp eq i32 %122, 4
%124 = zext i1 %123 to i32
%125 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.31, i64 0, i64 0), i32 %124)
%126 = tail call i32 @revbin(i32 1073741824)
%127 = icmp eq i32 %126, 2
%128 = zext i1 %127 to i32
%129 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.32, i64 0, i64 0), i32 %128)
%130 = tail call i32 @revbin(i32 -2147483648)
%131 = icmp eq i32 %130, 1
%132 = zext i1 %131 to i32
%133 = tail call i32 @unit_test_checker(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.33, i64 0, i64 0), i32 %132)
ret void
}