#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 CHAR_BIT;
int INT_MAX;
int INT_MIN;
long LONG_MAX;
long LONG_MIN;
int SCHAR_MAX;
int SCHAR_MIN;
int SHRT_MAX;
int SHRT_MIN;
int UCHAR_MAX;
unsigned int UINT_MAX;
unsigned long ULONG_MAX;
int USHRT_MAX;
scalar_t__ bitval(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int main(void) {
  int result = 0;
  if (8 != CHAR_BIT)
    fprintf(stderr,
            "%-12s expected = %-20"
            "d"
            "  actual = %"
            "d"
            "\n",
            "CHAR_BIT"
            ":",
            8, CHAR_BIT);
  result |= CHAR_BIT != 8;
  if (-128 != SCHAR_MIN)
    fprintf(stderr,
            "%-12s expected = %-20"
            "d"
            "  actual = %"
            "d"
            "\n",
            "SCHAR_MIN"
            ":",
            -128, SCHAR_MIN);
  result |= SCHAR_MIN != -128;
  if (127 != SCHAR_MAX)
    fprintf(stderr,
            "%-12s expected = %-20"
            "d"
            "  actual = %"
            "d"
            "\n",
            "SCHAR_MAX"
            ":",
            127, SCHAR_MAX);
  result |= SCHAR_MAX != 127;
  if (255 != UCHAR_MAX)
    fprintf(stderr,
            "%-12s expected = %-20"
            "d"
            "  actual = %"
            "d"
            "\n",
            "UCHAR_MAX"
            ":",
            255, UCHAR_MAX);
  result |= UCHAR_MAX != 255;
  if (-(1 << (sizeof(short int) * CHAR_BIT - 1)) != SHRT_MIN)
    fprintf(stderr,
            "%-12s expected = %-20"
            "d"
            "  actual = %"
            "d"
            "\n",
            "SHRT_MIN"
            ":",
            -(1 << (sizeof(short int) * CHAR_BIT - 1)), SHRT_MIN);
  result |= SHRT_MIN != -(1 << (sizeof(short int) * CHAR_BIT - 1));
  if ((1 << (sizeof(short int) * CHAR_BIT - 1)) - 1 != SHRT_MAX)
    fprintf(stderr,
            "%-12s expected = %-20"
            "d"
            "  actual = %"
            "d"
            "\n",
            "SHRT_MAX"
            ":",
            (1 << (sizeof(short int) * CHAR_BIT - 1)) - 1, SHRT_MAX);
  result |= SHRT_MAX != (1 << (sizeof(short int) * CHAR_BIT - 1)) - 1;
  if ((1 << sizeof(short int) * CHAR_BIT) - 1 != USHRT_MAX)
    fprintf(stderr,
            "%-12s expected = %-20"
            "d"
            "  actual = %"
            "d"
            "\n",
            "USHRT_MAX"
            ":",
            (1 << sizeof(short int) * CHAR_BIT) - 1, USHRT_MAX);
  result |= USHRT_MAX != (1 << sizeof(short int) * CHAR_BIT) - 1;
  if ((int)-bitval(sizeof(int) * CHAR_BIT - 1) - 1 != INT_MIN)
    fprintf(stderr,
            "%-12s expected = %-20"
            "d"
            "  actual = %"
            "d"
            "\n",
            "INT_MIN"
            ":",
            (int)-bitval(sizeof(int) * CHAR_BIT - 1) - 1, INT_MIN);
  result |= INT_MIN != (int)-bitval(sizeof(int) * CHAR_BIT - 1) - 1;
  if ((int)bitval(sizeof(int) * CHAR_BIT - 1) != INT_MAX)
    fprintf(stderr,
            "%-12s expected = %-20"
            "d"
            "  actual = %"
            "d"
            "\n",
            "INT_MAX"
            ":",
            (int)bitval(sizeof(int) * CHAR_BIT - 1), INT_MAX);
  result |= INT_MAX != (int)bitval(sizeof(int) * CHAR_BIT - 1);
  if ((unsigned int)bitval(sizeof(unsigned int) * CHAR_BIT) != UINT_MAX)
    fprintf(stderr,
            "%-12s expected = %-20"
            "u"
            "  actual = %"
            "u"
            "\n",
            "UINT_MAX"
            ":",
            (unsigned int)bitval(sizeof(unsigned int) * CHAR_BIT), UINT_MAX);
  result |= UINT_MAX != (unsigned int)bitval(sizeof(unsigned int) * CHAR_BIT);
  if ((long int)-bitval(sizeof(long int) * CHAR_BIT - 1) - 1 != LONG_MIN)
    fprintf(stderr,
            "%-12s expected = %-20"
            "ld"
            "  actual = %"
            "ld"
            "\n",
            "LONG_MIN"
            ":",
            (long int)-bitval(sizeof(long int) * CHAR_BIT - 1) - 1, LONG_MIN);
  result |= LONG_MIN != (long int)-bitval(sizeof(long int) * CHAR_BIT - 1) - 1;
  if ((long int)bitval(sizeof(long int) * CHAR_BIT - 1) != LONG_MAX)
    fprintf(stderr,
            "%-12s expected = %-20"
            "ld"
            "  actual = %"
            "ld"
            "\n",
            "LONG_MAX"
            ":",
            (long int)bitval(sizeof(long int) * CHAR_BIT - 1), LONG_MAX);
  result |= LONG_MAX != (long int)bitval(sizeof(long int) * CHAR_BIT - 1);
  if ((unsigned long int)bitval(sizeof(unsigned long int) * CHAR_BIT) !=
      ULONG_MAX)
    fprintf(stderr,
            "%-12s expected = %-20"
            "lu"
            "  actual = %"
            "lu"
            "\n",
            "ULONG_MAX"
            ":",
            (unsigned long int)bitval(sizeof(unsigned long int) * CHAR_BIT),
            ULONG_MAX);
  result |= ULONG_MAX !=
            (unsigned long int)bitval(sizeof(unsigned long int) * CHAR_BIT);
  if (!result)
    fprintf(stdout, "OK\n");
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x8,%eax
mov    0x2e5e(%rip),%rcx
cmp    (%rcx),%eax
je     1177 <main+0x57>
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
mov    0x2e46(%rip),%rax
mov    (%rax),%r8d
lea    0xe9c(%rip),%rsi
lea    0xeba(%rip),%rdx
mov    $0x8,%ecx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e22(%rip),%rax
cmpl   $0x8,(%rax)
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0xffffff80,%eax
mov    0x2e15(%rip),%rcx
cmp    (%rcx),%eax
je     11d0 <main+0xb0>
mov    0x2dee(%rip),%rax
mov    (%rax),%edi
mov    0x2dfd(%rip),%rax
mov    (%rax),%r8d
lea    0xe43(%rip),%rsi
lea    0xe6b(%rip),%rdx
mov    $0xffffff80,%ecx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2dd9(%rip),%rax
cmpl   $0xffffff80,(%rax)
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x7f,%eax
mov    0x2db4(%rip),%rcx
cmp    (%rcx),%eax
je     1229 <main+0x109>
mov    0x2d95(%rip),%rax
mov    (%rax),%edi
mov    0x2d9c(%rip),%rax
mov    (%rax),%r8d
lea    0xdea(%rip),%rsi
lea    0xe1d(%rip),%rdx
mov    $0x7f,%ecx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d78(%rip),%rax
cmpl   $0x7f,(%rax)
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0xff,%eax
mov    0x2da3(%rip),%rcx
cmp    (%rcx),%eax
je     1282 <main+0x162>
mov    0x2d3c(%rip),%rax
mov    (%rax),%edi
mov    0x2d8b(%rip),%rax
mov    (%rax),%r8d
lea    0xd91(%rip),%rsi
lea    0xdcf(%rip),%rdx
mov    $0xff,%ecx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d67(%rip),%rax
cmpl   $0xff,(%rax)
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2cfc(%rip),%rax
movslq (%rax),%rax
shl    $0x1,%rax
sub    $0x1,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    0x2cc3(%rip),%rcx
cmp    (%rcx),%eax
je     1314 <main+0x1f4>
mov    0x2cc4(%rip),%rax
mov    (%rax),%edi
mov    0x2cc3(%rip),%rax
movslq (%rax),%rax
shl    $0x1,%rax
sub    $0x1,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    %ecx,%ecx
sub    %eax,%ecx
mov    0x2c8c(%rip),%rax
mov    (%rax),%r8d
lea    0xcfa(%rip),%rsi
lea    0xd43(%rip),%rdx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2c6d(%rip),%rax
mov    (%rax),%eax
mov    0x2c7c(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x1,%rcx
sub    $0x1,%rcx
mov    $0x1,%edx
shl    %cl,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2c4f(%rip),%rax
movslq (%rax),%rax
shl    $0x1,%rax
sub    $0x1,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    0x2c11(%rip),%rcx
cmp    (%rcx),%eax
je     13bf <main+0x29f>
mov    0x2c1a(%rip),%rax
mov    (%rax),%edi
mov    0x2c19(%rip),%rax
movslq (%rax),%rax
shl    $0x1,%rax
sub    $0x1,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
sub    $0x1,%ecx
mov    0x2bd9(%rip),%rax
mov    (%rax),%r8d
lea    0xc4f(%rip),%rsi
lea    0xca3(%rip),%rdx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2bba(%rip),%rax
mov    (%rax),%eax
mov    0x2bd1(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x1,%rcx
sub    $0x1,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2ba3(%rip),%rax
movslq (%rax),%rax
shl    $0x1,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    0x2bc9(%rip),%rcx
cmp    (%rcx),%eax
je     1463 <main+0x343>
mov    0x2b72(%rip),%rax
mov    (%rax),%edi
mov    0x2b71(%rip),%rax
movslq (%rax),%rax
shl    $0x1,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
sub    $0x1,%ecx
mov    0x2b95(%rip),%rax
mov    (%rax),%r8d
lea    0xbab(%rip),%rsi
lea    0xbfe(%rip),%rdx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2b76(%rip),%rax
mov    (%rax),%eax
mov    0x2b2d(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x1,%rcx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2b03(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
sub    $0x1,%eax
mov    0x2aff(%rip),%rcx
cmp    (%rcx),%eax
je     151d <main+0x3fd>
mov    0x2ac8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    0x2ac4(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
mov    %eax,%ecx
sub    $0x1,%ecx
mov    0x2abb(%rip),%rax
mov    (%rax),%r8d
lea    0xaf1(%rip),%rsi
lea    0xb4f(%rip),%rdx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2a9c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    0x2a70(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    %rax,%rdx
mov    -0x10(%rbp),%eax
xor    %ecx,%ecx
sub    %rdx,%rcx
sub    $0x1,%ecx
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2a39(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    0x2a58(%rip),%rcx
cmp    (%rcx),%eax
je     15d1 <main+0x4b1>
mov    0x2a09(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    0x2a05(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%ecx
mov    0x2a1f(%rip),%rax
mov    (%rax),%r8d
lea    0xa3d(%rip),%rsi
lea    0xaca(%rip),%rdx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2a00(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    0x29bc(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x298d(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    0x29a8(%rip),%rcx
cmp    (%rcx),%eax
je     1675 <main+0x555>
mov    0x2961(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    0x295d(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    -0x1c(%rbp),%edi
mov    %eax,%ecx
mov    0x2973(%rip),%rax
mov    (%rax),%r8d
lea    0xa07(%rip),%rsi
lea    0xa25(%rip),%rdx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2954(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    0x2918(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%eax
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x28ed(%rip),%rax
movslq (%rax),%rax
shl    $0x3,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
sub    $0x1,%rax
mov    0x28f0(%rip),%rcx
cmp    (%rcx),%rax
je     1731 <main+0x611>
mov    0x28b0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    0x28ac(%rip),%rax
movslq (%rax),%rax
shl    $0x3,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    -0x24(%rbp),%edi
xor    %ecx,%ecx
sub    %rax,%rcx
sub    $0x1,%rcx
mov    0x28af(%rip),%rax
mov    (%rax),%r8
lea    0x97a(%rip),%rsi
lea    0x99a(%rip),%rdx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2890(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    0x285a(%rip),%rax
movslq (%rax),%rax
shl    $0x3,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    %rax,%rdx
mov    -0x30(%rbp),%rax
xor    %ecx,%ecx
sub    %rdx,%rcx
sub    $0x1,%rcx
cmp    %rcx,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2820(%rip),%rax
movslq (%rax),%rax
shl    $0x3,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    0x27f7(%rip),%rcx
cmp    (%rcx),%rax
je     17ec <main+0x6cc>
mov    0x27ef(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    0x27eb(%rip),%rax
movslq (%rax),%rax
shl    $0x3,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    -0x34(%rbp),%edi
mov    %rax,%rcx
mov    0x27bc(%rip),%rax
mov    (%rax),%r8
lea    0x8bf(%rip),%rsi
lea    0x911(%rip),%rdx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x279d(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x40(%rbp)
mov    0x279f(%rip),%rax
movslq (%rax),%rax
shl    $0x3,%rax
sub    $0x1,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    %rax,%rcx
mov    -0x40(%rbp),%rax
cmp    %rcx,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x276e(%rip),%rax
movslq (%rax),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    0x2721(%rip),%rcx
cmp    (%rcx),%rax
je     1896 <main+0x776>
mov    0x2741(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    0x273d(%rip),%rax
movslq (%rax),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    -0x44(%rbp),%edi
mov    %rax,%rcx
mov    0x26ea(%rip),%rax
mov    (%rax),%r8
lea    0x846(%rip),%rsi
lea    0x866(%rip),%rdx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x26cb(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x50(%rbp)
mov    0x26f5(%rip),%rax
movslq (%rax),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <bitval@plt>
mov    %rax,%rcx
mov    -0x50(%rbp),%rax
cmp    %rcx,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    18f2 <main+0x7d2>
mov    0x2696(%rip),%rax
mov    (%rax),%edi
lea    0x815(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    0x2e72(%rip),%r14
mov    (%r14),%r8d
cmp    $0x8,%r8d
jne    113b <main+0x1b>
xor    %ebp,%ebp
jmp    1166 <main+0x46>
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
lea    0xed3(%rip),%rdx
mov    $0x8,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmpl   $0x8,(%r14)
setne  %bpl
mov    0x2e43(%rip),%rbx
mov    (%rbx),%r8d
cmp    $0xffffff80,%r8d
jne    117a <main+0x5a>
xor    %eax,%eax
jmp    11a3 <main+0x83>
mov    0x2e17(%rip),%rax
mov    (%rax),%edi
lea    0xe76(%rip),%rsi
lea    0xe9e(%rip),%rdx
mov    $0xffffff80,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmpl   $0xffffff80,(%rbx)
setne  %al
or     %al,%bpl
mov    0x2dfb(%rip),%rbx
mov    (%rbx),%r8d
cmp    $0x7f,%r8d
jne    11ba <main+0x9a>
xor    %eax,%eax
jmp    11e3 <main+0xc3>
mov    0x2dd7(%rip),%rax
mov    (%rax),%edi
lea    0xe36(%rip),%rsi
lea    0xe69(%rip),%rdx
mov    $0x7f,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmpl   $0x7f,(%rbx)
setne  %al
or     %al,%bpl
mov    0x2e03(%rip),%rbx
mov    (%rbx),%r8d
cmp    $0xff,%r8d
jne    11fd <main+0xdd>
xor    %eax,%eax
jmp    1229 <main+0x109>
mov    0x2d94(%rip),%rax
mov    (%rax),%edi
lea    0xdf3(%rip),%rsi
lea    0xe31(%rip),%rdx
mov    $0xff,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmpl   $0xff,(%rbx)
setne  %al
mov    (%r14),%esi
lea    (%rsi,%rsi,1),%ecx
add    $0xffffffff,%ecx
mov    $0xffffffff,%ebx
shl    %cl,%ebx
or     %al,%bpl
mov    0x2d45(%rip),%r15
mov    (%r15),%r8d
cmp    %r8d,%ebx
jne    1250 <main+0x130>
lea    (%rsi,%rsi,1),%edx
jmp    127f <main+0x15f>
mov    0x2d41(%rip),%rax
mov    (%rax),%edi
lea    0xda0(%rip),%rsi
lea    0xde9(%rip),%rdx
mov    %ebx,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r15),%ebx
mov    (%r14),%esi
lea    (%rsi,%rsi,1),%edx
lea    (%rsi,%rsi,1),%ecx
add    $0xffffffff,%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    %eax,%ebx
setne  %bl
or     %bl,%bpl
add    $0xffffffff,%eax
mov    0x2ce8(%rip),%rbx
mov    (%rbx),%r8d
cmp    %r8d,%eax
je     12ce <main+0x1ae>
mov    0x2cf1(%rip),%rcx
mov    (%rcx),%edi
lea    0xd50(%rip),%rsi
lea    0xda4(%rip),%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%rbx),%eax
mov    (%r14),%esi
lea    (%rsi,%rsi,1),%edx
lea    (%rsi,%rsi,1),%ecx
add    $0xffffffff,%ecx
mov    $0xffffffff,%ebx
mov    $0xffffffff,%edi
shl    %cl,%edi
not    %edi
cmp    %edi,%eax
setne  %al
or     %al,%bpl
mov    $0xffffffff,%eax
mov    %edx,%ecx
shl    %cl,%eax
not    %eax
mov    0x2cea(%rip),%r15
mov    (%r15),%r8d
cmp    %eax,%r8d
jne    1302 <main+0x1e2>
mov    %eax,%edx
jmp    1331 <main+0x211>
mov    0x2c8f(%rip),%rcx
mov    (%rcx),%edi
lea    0xcee(%rip),%rsi
lea    0xd41(%rip),%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r15),%edx
mov    (%r14),%esi
lea    (%rsi,%rsi,1),%ecx
shl    %cl,%ebx
not    %ebx
mov    %ebx,%eax
cmp    %eax,%edx
setne  %al
or     %al,%bpl
lea    -0x1(,%rsi,4),%edi
call   1030 <bitval@plt>
mov    %rax,%rbx
not    %ebx
mov    0x2c6f(%rip),%r15
cmp    %ebx,(%r15)
je     138f <main+0x26f>
mov    0x2c3b(%rip),%rax
mov    (%rax),%ebx
mov    (%r14),%eax
lea    -0x1(,%rax,4),%edi
call   1030 <bitval@plt>
not    %eax
mov    (%r15),%r8d
lea    0xc86(%rip),%rsi
lea    0xce4(%rip),%rdx
mov    %ebx,%edi
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r15),%ebx
mov    (%r14),%eax
lea    -0x1(,%rax,4),%edi
call   1030 <bitval@plt>
not    %eax
cmp    %eax,%ebx
setne  %al
or     %al,%bpl
mov    (%r14),%eax
lea    -0x1(,%rax,4),%edi
call   1030 <bitval@plt>
mov    %rax,%rbx
mov    0x2c17(%rip),%r15
cmp    %ebx,(%r15)
je     13fd <main+0x2dd>
mov    0x2bcb(%rip),%rax
mov    (%rax),%ebx
mov    (%r14),%eax
lea    -0x1(,%rax,4),%edi
call   1030 <bitval@plt>
mov    (%r15),%r8d
lea    0xc18(%rip),%rsi
lea    0xca5(%rip),%rdx
mov    %ebx,%edi
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r15),%ebx
mov    (%r14),%eax
lea    -0x1(,%rax,4),%edi
call   1030 <bitval@plt>
cmp    %eax,%ebx
setne  %al
or     %al,%bpl
mov    (%r14),%edi
shl    $0x2,%edi
call   1030 <bitval@plt>
mov    %rax,%rbx
mov    0x2ba7(%rip),%r15
cmp    %ebx,(%r15)
je     1461 <main+0x341>
mov    0x2b63(%rip),%rax
mov    (%rax),%ebx
mov    (%r14),%edi
shl    $0x2,%edi
call   1030 <bitval@plt>
mov    (%r15),%r8d
lea    0xc22(%rip),%rsi
lea    0xc40(%rip),%rdx
mov    %ebx,%edi
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r15),%ebx
mov    (%r14),%edi
shl    $0x2,%edi
call   1030 <bitval@plt>
cmp    %eax,%ebx
setne  %al
or     %al,%bpl
mov    (%r14),%eax
lea    -0x1(,%rax,8),%edi
call   1030 <bitval@plt>
mov    %rax,%rbx
not    %rbx
mov    0x2b38(%rip),%r15
cmp    %rbx,(%r15)
je     14d0 <main+0x3b0>
mov    0x2afc(%rip),%rax
mov    (%rax),%ebx
mov    (%r14),%eax
lea    -0x1(,%rax,8),%edi
call   1030 <bitval@plt>
not    %rax
mov    (%r15),%r8
lea    0xbe3(%rip),%rsi
lea    0xc03(%rip),%rdx
mov    %ebx,%edi
mov    %rax,%rcx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r15),%rbx
mov    (%r14),%eax
lea    -0x1(,%rax,8),%edi
call   1030 <bitval@plt>
not    %rax
cmp    %rax,%rbx
setne  %al
or     %al,%bpl
mov    (%r14),%eax
lea    -0x1(,%rax,8),%edi
call   1030 <bitval@plt>
mov    %rax,%rbx
mov    0x2a8c(%rip),%r15
cmp    (%r15),%rax
je     1541 <main+0x421>
mov    0x2a88(%rip),%rax
mov    (%rax),%ebx
mov    (%r14),%eax
lea    -0x1(,%rax,8),%edi
call   1030 <bitval@plt>
mov    (%r15),%r8
lea    0xb72(%rip),%rsi
lea    0xbc4(%rip),%rdx
mov    %ebx,%edi
mov    %rax,%rcx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r15),%rbx
mov    (%r14),%eax
lea    -0x1(,%rax,8),%edi
call   1030 <bitval@plt>
cmp    %rax,%rbx
setne  %al
or     %al,%bpl
mov    (%r14),%edi
shl    $0x3,%edi
call   1030 <bitval@plt>
mov    %rax,%rbx
mov    0x29fa(%rip),%r15
cmp    (%r15),%rax
je     15a7 <main+0x487>
mov    0x2a1e(%rip),%rax
mov    (%rax),%ebx
mov    (%r14),%edi
shl    $0x3,%edi
call   1030 <bitval@plt>
mov    (%r15),%r8
lea    0xb3d(%rip),%rsi
lea    0xb5d(%rip),%rdx
mov    %ebx,%edi
mov    %rax,%rcx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r15),%rbx
mov    (%r14),%edi
shl    $0x3,%edi
call   1030 <bitval@plt>
cmp    %rax,%rbx
setne  %al
or     %al,%bpl
jne    15d4 <main+0x4b4>
mov    0x29b4(%rip),%rax
mov    (%rax),%edi
lea    0xb33(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
movzbl %bpl,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@CHAR_BIT = global i32 0
@stderr = global i32 0
@.str = [37 x i8] c"%-12s expected = %-20d actual = %d\0A\00"
@.str.1 = [10 x i8] c"CHAR_BIT:\00"
@SCHAR_MIN = global i32 0
@.str.2 = [11 x i8] c"SCHAR_MIN:\00"
@SCHAR_MAX = global i32 0
@.str.3 = [11 x i8] c"SCHAR_MAX:\00"
@UCHAR_MAX = global i32 0
@.str.4 = [11 x i8] c"UCHAR_MAX:\00"
@SHRT_MIN = global i32 0
@.str.5 = [10 x i8] c"SHRT_MIN:\00"
@SHRT_MAX = global i32 0
@.str.6 = [10 x i8] c"SHRT_MAX:\00"
@USHRT_MAX = global i32 0
@.str.7 = [11 x i8] c"USHRT_MAX:\00"
@INT_MIN = global i32 0
@.str.8 = [9 x i8] c"INT_MIN:\00"
@INT_MAX = global i32 0
@.str.9 = [9 x i8] c"INT_MAX:\00"
@UINT_MAX = global i32 0
@.str.10 = [37 x i8] c"%-12s expected = %-20u actual = %u\0A\00"
@.str.11 = [10 x i8] c"UINT_MAX:\00"
@LONG_MIN = global i64 0
@.str.12 = [39 x i8] c"%-12s expected = %-20ld actual = %ld\0A\00"
@.str.13 = [10 x i8] c"LONG_MIN:\00"
@LONG_MAX = global i64 0
@.str.14 = [10 x i8] c"LONG_MAX:\00"
@ULONG_MAX = global i64 0
@.str.15 = [39 x i8] c"%-12s expected = %-20lu actual = %lu\0A\00"
@.str.16 = [11 x i8] c"ULONG_MAX:\00"
@stdout = global i32 0
@.str.17 = [4 x i8] c"OK\0A\00"
define i32 @main() {
%1 = load i32, i32* @CHAR_BIT
%2 = icmp eq i32 %1, 8
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 8, i32 %1)
%6 = load i32, i32* @CHAR_BIT
%7 = icmp ne i32 %6, 8
br label %8
8: ; preds = %3, %0
%9 = phi i1 [ %7, %3 ], [ false, %0 ]
%10 = load i32, i32* @SCHAR_MIN
%11 = icmp eq i32 %10, -128
br i1 %11, label %17, label %12
12: ; preds = %8
%13 = load i32, i32* @stderr
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 -128, i32 %10)
%15 = load i32, i32* @SCHAR_MIN
%16 = icmp ne i32 %15, -128
br label %17
17: ; preds = %12, %8
%18 = phi i1 [ %16, %12 ], [ false, %8 ]
%19 = or i1 %9, %18
%20 = load i32, i32* @SCHAR_MAX
%21 = icmp eq i32 %20, 127
br i1 %21, label %27, label %22
22: ; preds = %17
%23 = load i32, i32* @stderr
%24 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i32 127, i32 %20)
%25 = load i32, i32* @SCHAR_MAX
%26 = icmp ne i32 %25, 127
br label %27
27: ; preds = %22, %17
%28 = phi i1 [ %26, %22 ], [ false, %17 ]
%29 = or i1 %19, %28
%30 = load i32, i32* @UCHAR_MAX
%31 = icmp eq i32 %30, 255
br i1 %31, label %37, label %32
32: ; preds = %27
%33 = load i32, i32* @stderr
%34 = tail call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 255, i32 %30)
%35 = load i32, i32* @UCHAR_MAX
%36 = icmp ne i32 %35, 255
br label %37
37: ; preds = %32, %27
%38 = phi i1 [ %36, %32 ], [ false, %27 ]
%39 = or i1 %29, %38
%40 = load i32, i32* @CHAR_BIT
%41 = shl i32 %40, 1
%42 = add i32 %41, -1
%43 = shl nsw i32 -1, %42
%44 = load i32, i32* @SHRT_MIN
%45 = icmp eq i32 %43, %44
br i1 %45, label %53, label %46
46: ; preds = %37
%47 = load i32, i32* @stderr
%48 = tail call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %43, i32 %44)
%49 = load i32, i32* @SHRT_MIN
%50 = load i32, i32* @CHAR_BIT
%51 = shl i32 %50, 1
%52 = add i32 %51, -1
br label %53
53: ; preds = %46, %37
%54 = phi i32 [ %52, %46 ], [ %42, %37 ]
%55 = phi i32 [ %51, %46 ], [ %41, %37 ]
%56 = phi i32 [ %50, %46 ], [ %40, %37 ]
%57 = phi i32 [ %49, %46 ], [ %43, %37 ]
%58 = shl nuw i32 1, %54
%59 = sub nsw i32 0, %58
%60 = icmp ne i32 %57, %59
%61 = or i1 %39, %60
%62 = add nsw i32 %58, -1
%63 = load i32, i32* @SHRT_MAX
%64 = icmp eq i32 %62, %63
br i1 %64, label %72, label %65
65: ; preds = %53
%66 = load i32, i32* @stderr
%67 = tail call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 %62, i32 %63)
%68 = load i32, i32* @SHRT_MAX
%69 = load i32, i32* @CHAR_BIT
%70 = shl i32 %69, 1
%71 = add i32 %70, -1
br label %72
72: ; preds = %65, %53
%73 = phi i32 [ %71, %65 ], [ %54, %53 ]
%74 = phi i32 [ %70, %65 ], [ %55, %53 ]
%75 = phi i32 [ %69, %65 ], [ %56, %53 ]
%76 = phi i32 [ %68, %65 ], [ %62, %53 ]
%77 = shl nsw i32 -1, %73
%78 = xor i32 %77, -1
%79 = icmp ne i32 %76, %78
%80 = or i1 %61, %79
%81 = shl nsw i32 -1, %74
%82 = xor i32 %81, -1
%83 = load i32, i32* @USHRT_MAX
%84 = icmp eq i32 %83, %82
br i1 %84, label %93, label %85
85: ; preds = %72
%86 = load i32, i32* @stderr
%87 = tail call i32 (i32, i8*, ...) @fprintf(i32 %86, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 %82, i32 %83)
%88 = load i32, i32* @USHRT_MAX
%89 = load i32, i32* @CHAR_BIT
%90 = shl i32 %89, 1
%91 = shl nsw i32 -1, %90
%92 = xor i32 %91, -1
br label %93
93: ; preds = %85, %72
%94 = phi i32 [ %92, %85 ], [ %82, %72 ]
%95 = phi i32 [ %89, %85 ], [ %75, %72 ]
%96 = phi i32 [ %88, %85 ], [ %82, %72 ]
%97 = icmp ne i32 %96, %94
%98 = or i1 %80, %97
%99 = shl i32 %95, 2
%100 = add i32 %99, -1
%101 = tail call i64 @bitval(i32 %100)
%102 = trunc i64 %101 to i32
%103 = xor i32 %102, -1
%104 = load i32, i32* @INT_MIN
%105 = icmp eq i32 %104, %103
br i1 %105, label %117, label %106
106: ; preds = %93
%107 = load i32, i32* @stderr
%108 = load i32, i32* @CHAR_BIT
%109 = shl i32 %108, 2
%110 = add i32 %109, -1
%111 = tail call i64 @bitval(i32 %110)
%112 = trunc i64 %111 to i32
%113 = xor i32 %112, -1
%114 = load i32, i32* @INT_MIN
%115 = tail call i32 (i32, i8*, ...) @fprintf(i32 %107, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %113, i32 %114)
%116 = load i32, i32* @INT_MIN
br label %117
117: ; preds = %106, %93
%118 = phi i32 [ %116, %106 ], [ %103, %93 ]
%119 = load i32, i32* @CHAR_BIT
%120 = shl i32 %119, 2
%121 = add i32 %120, -1
%122 = tail call i64 @bitval(i32 %121)
%123 = trunc i64 %122 to i32
%124 = xor i32 %123, -1
%125 = icmp ne i32 %118, %124
%126 = or i1 %98, %125
%127 = load i32, i32* @CHAR_BIT
%128 = shl i32 %127, 2
%129 = add i32 %128, -1
%130 = tail call i64 @bitval(i32 %129)
%131 = trunc i64 %130 to i32
%132 = load i32, i32* @INT_MAX
%133 = icmp eq i32 %132, %131
br i1 %133, label %144, label %134
134: ; preds = %117
%135 = load i32, i32* @stderr
%136 = load i32, i32* @CHAR_BIT
%137 = shl i32 %136, 2
%138 = add i32 %137, -1
%139 = tail call i64 @bitval(i32 %138)
%140 = trunc i64 %139 to i32
%141 = load i32, i32* @INT_MAX
%142 = tail call i32 (i32, i8*, ...) @fprintf(i32 %135, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 %140, i32 %141)
%143 = load i32, i32* @INT_MAX
br label %144
144: ; preds = %134, %117
%145 = phi i32 [ %143, %134 ], [ %131, %117 ]
%146 = load i32, i32* @CHAR_BIT
%147 = shl i32 %146, 2
%148 = add i32 %147, -1
%149 = tail call i64 @bitval(i32 %148)
%150 = trunc i64 %149 to i32
%151 = icmp ne i32 %145, %150
%152 = or i1 %126, %151
%153 = load i32, i32* @CHAR_BIT
%154 = shl i32 %153, 2
%155 = tail call i64 @bitval(i32 %154)
%156 = trunc i64 %155 to i32
%157 = load i32, i32* @UINT_MAX
%158 = icmp eq i32 %157, %156
br i1 %158, label %168, label %159
159: ; preds = %144
%160 = load i32, i32* @stderr
%161 = load i32, i32* @CHAR_BIT
%162 = shl i32 %161, 2
%163 = tail call i64 @bitval(i32 %162)
%164 = trunc i64 %163 to i32
%165 = load i32, i32* @UINT_MAX
%166 = tail call i32 (i32, i8*, ...) @fprintf(i32 %160, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i32 %164, i32 %165)
%167 = load i32, i32* @UINT_MAX
br label %168
168: ; preds = %159, %144
%169 = phi i32 [ %167, %159 ], [ %156, %144 ]
%170 = load i32, i32* @CHAR_BIT
%171 = shl i32 %170, 2
%172 = tail call i64 @bitval(i32 %171)
%173 = trunc i64 %172 to i32
%174 = icmp ne i32 %169, %173
%175 = or i1 %152, %174
%176 = load i32, i32* @CHAR_BIT
%177 = shl i32 %176, 3
%178 = add i32 %177, -1
%179 = tail call i64 @bitval(i32 %178)
%180 = xor i64 %179, -1
%181 = load i64, i64* @LONG_MIN
%182 = icmp eq i64 %181, %180
br i1 %182, label %193, label %183
183: ; preds = %168
%184 = load i32, i32* @stderr
%185 = load i32, i32* @CHAR_BIT
%186 = shl i32 %185, 3
%187 = add i32 %186, -1
%188 = tail call i64 @bitval(i32 %187)
%189 = xor i64 %188, -1
%190 = load i64, i64* @LONG_MIN
%191 = tail call i32 (i32, i8*, ...) @fprintf(i32 %184, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), i64 %189, i64 %190)
%192 = load i64, i64* @LONG_MIN
br label %193
193: ; preds = %183, %168
%194 = phi i64 [ %192, %183 ], [ %180, %168 ]
%195 = load i32, i32* @CHAR_BIT
%196 = shl i32 %195, 3
%197 = add i32 %196, -1
%198 = tail call i64 @bitval(i32 %197)
%199 = xor i64 %198, -1
%200 = icmp ne i64 %194, %199
%201 = or i1 %175, %200
%202 = load i32, i32* @CHAR_BIT
%203 = shl i32 %202, 3
%204 = add i32 %203, -1
%205 = tail call i64 @bitval(i32 %204)
%206 = load i64, i64* @LONG_MAX
%207 = icmp eq i64 %205, %206
br i1 %207, label %217, label %208
208: ; preds = %193
%209 = load i32, i32* @stderr
%210 = load i32, i32* @CHAR_BIT
%211 = shl i32 %210, 3
%212 = add i32 %211, -1
%213 = tail call i64 @bitval(i32 %212)
%214 = load i64, i64* @LONG_MAX
%215 = tail call i32 (i32, i8*, ...) @fprintf(i32 %209, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i64 %213, i64 %214)
%216 = load i64, i64* @LONG_MAX
br label %217
217: ; preds = %208, %193
%218 = phi i64 [ %216, %208 ], [ %205, %193 ]
%219 = load i32, i32* @CHAR_BIT
%220 = shl i32 %219, 3
%221 = add i32 %220, -1
%222 = tail call i64 @bitval(i32 %221)
%223 = icmp ne i64 %218, %222
%224 = or i1 %201, %223
%225 = load i32, i32* @CHAR_BIT
%226 = shl i32 %225, 3
%227 = tail call i64 @bitval(i32 %226)
%228 = load i64, i64* @ULONG_MAX
%229 = icmp eq i64 %227, %228
br i1 %229, label %238, label %230
230: ; preds = %217
%231 = load i32, i32* @stderr
%232 = load i32, i32* @CHAR_BIT
%233 = shl i32 %232, 3
%234 = tail call i64 @bitval(i32 %233)
%235 = load i64, i64* @ULONG_MAX
%236 = tail call i32 (i32, i8*, ...) @fprintf(i32 %231, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.16, i64 0, i64 0), i64 %234, i64 %235)
%237 = load i64, i64* @ULONG_MAX
br label %238
238: ; preds = %230, %217
%239 = phi i64 [ %237, %230 ], [ %227, %217 ]
%240 = load i32, i32* @CHAR_BIT
%241 = shl i32 %240, 3
%242 = tail call i64 @bitval(i32 %241)
%243 = icmp ne i64 %239, %242
%244 = or i1 %224, %243
br i1 %244, label %248, label %245
245: ; preds = %238
%246 = load i32, i32* @stdout
%247 = tail call i32 (i32, i8*, ...) @fprintf(i32 %246, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0))
br label %248
248: ; preds = %245, %238
%249 = zext i1 %244 to i32
ret i32 %249
}