#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 CHAR_MAX;
int CHAR_MIN;
int INT_MAX;
int INT_MIN;
long LONG_MAX;
long LONG_MIN;
int MB_LEN_MAX;
int SCHAR_MAX;
int SCHAR_MIN;
int SHRT_MAX;
int SHRT_MIN;
int UCHAR_MAX;
int UINT_MAX;
unsigned long ULONG_MAX;
int USHRT_MAX;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *, unsigned long, ...);
int /*<<< orphan*/ puts(char *);
int main(void) {
  printf("CHAR_BIT =  %-10i    MB_LEN_MAX = %i\n\n", CHAR_BIT, MB_LEN_MAX);
  printf("CHAR_MAX =  %-10i    CHAR_MIN =   %i\n", CHAR_MAX, CHAR_MIN);
  printf("SCHAR_MAX = %-10i    SCHAR_MIN =  %i\n", SCHAR_MAX, SCHAR_MIN);
  printf("UCHAR_MAX = %-10u\n\n", UCHAR_MAX);
  printf("SHRT_MAX =  %-10i    SHRT_MIN =   %i\n", SHRT_MAX, SHRT_MIN);
  printf("USHRT_MAX = %-10u\n\n", USHRT_MAX);
  printf("INT_MAX =   %-10i    INT_MIN =    %i\n", INT_MAX, INT_MIN);
  printf("UINT_MAX =  %-10u\n\n", UINT_MAX);
  printf("LONG_MAX =  %-10li    LONG_MIN =   %li\n", LONG_MAX, LONG_MIN);
  printf("ULONG_MAX = %-10lu\n\n", ULONG_MAX);
  assert(CHAR_BIT >= 8 && CHAR_MAX >= 127 && CHAR_MIN <= 0);
  assert(SCHAR_MIN <= -127 && SCHAR_MAX >= 127);
  assert(UCHAR_MAX >= 255 && UCHAR_MAX / 2 >= SCHAR_MAX);
  assert(CHAR_MAX == SCHAR_MAX || CHAR_MAX == UCHAR_MAX);
  assert(MB_LEN_MAX >= 1);
  assert(SHRT_MIN <= -32767 && SHRT_MAX >= 32767 && SHRT_MAX >= SCHAR_MAX);
  assert(USHRT_MAX >= 65535 && USHRT_MAX / 2 >= SHRT_MAX &&
         USHRT_MAX >= UCHAR_MAX);
  assert(INT_MIN <= -32767 && INT_MAX >= 32767 && INT_MAX >= SHRT_MAX);
  assert(UINT_MAX >= 65535 && UINT_MAX / 2 >= INT_MAX && UINT_MAX >= USHRT_MAX);
  assert(LONG_MIN <= -2147483647L && LONG_MAX >= 2147483647L &&
         LONG_MAX >= INT_MAX);
  assert(ULONG_MAX >= 4294967295UL && ULONG_MAX / 2 >= LONG_MAX &&
         UINT_MAX <= ULONG_MAX);
  puts("SUCCESS testing <limits.h>");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e4a(%rip),%rax
movslq (%rax),%rsi
mov    0x2e28(%rip),%rax
mov    (%rax),%edx
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2e79(%rip),%rax
movslq (%rax),%rsi
mov    0x2e67(%rip),%rax
mov    (%rax),%edx
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2e10(%rip),%rax
movslq (%rax),%rsi
mov    0x2e0e(%rip),%rax
mov    (%rax),%edx
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2e47(%rip),%rax
movslq (%rax),%rsi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2daf(%rip),%rax
movslq (%rax),%rsi
mov    0x2db5(%rip),%rax
mov    (%rax),%edx
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2dee(%rip),%rax
movslq (%rax),%rsi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2dce(%rip),%rax
movslq (%rax),%rsi
mov    0x2dac(%rip),%rax
mov    (%rax),%edx
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2da5(%rip),%rax
movslq (%rax),%rsi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2d55(%rip),%rax
mov    (%rax),%rsi
mov    0x2d7b(%rip),%rax
mov    (%rax),%rdx
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2d0b(%rip),%rax
mov    (%rax),%rsi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
mov    0x2d21(%rip),%rcx
cmpl   $0x8,(%rcx)
mov    %al,-0x5(%rbp)
jl     12a0 <main+0x170>
xor    %eax,%eax
mov    0x2d5c(%rip),%rcx
cmpl   $0x7f,(%rcx)
mov    %al,-0x5(%rbp)
jl     12a0 <main+0x170>
mov    0x2d41(%rip),%rax
cmpl   $0x0,(%rax)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %eax,%eax
mov    0x2cea(%rip),%rcx
cmpl   $0xffffff81,(%rcx)
mov    %al,-0x6(%rbp)
jg     12d2 <main+0x1a2>
mov    0x2ccf(%rip),%rax
cmpl   $0x7f,(%rax)
setge  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %eax,%eax
mov    0x2d08(%rip),%rcx
cmpl   $0xff,(%rcx)
mov    %al,-0x7(%rbp)
jl     1317 <main+0x1e7>
mov    0x2cf2(%rip),%rax
mov    (%rax),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    0x2c89(%rip),%rcx
cmp    (%rcx),%eax
setge  %al
mov    %al,-0x7(%rbp)
mov    -0x7(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    0x2cb5(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%al
mov    0x2c62(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x8(%rbp)
je     1359 <main+0x229>
mov    0x2c98(%rip),%rax
mov    (%rax),%eax
mov    0x2c9f(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
mov    %al,-0x8(%rbp)
mov    -0x8(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    0x2c0b(%rip),%rax
cmpl   $0x1,(%rax)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %eax,%eax
mov    0x2bfa(%rip),%rcx
cmpl   $0xffff8001,(%rcx)
mov    %al,-0x9(%rbp)
jg     13c5 <main+0x295>
xor    %eax,%eax
mov    0x2bd2(%rip),%rcx
cmpl   $0x7fff,(%rcx)
mov    %al,-0x9(%rbp)
jl     13c5 <main+0x295>
mov    0x2bbc(%rip),%rax
mov    (%rax),%eax
mov    0x2bdb(%rip),%rcx
cmp    (%rcx),%eax
setge  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %eax,%eax
mov    0x2bf5(%rip),%rcx
cmpl   $0xffff,(%rcx)
mov    %al,-0xa(%rbp)
jl     1429 <main+0x2f9>
mov    0x2bdf(%rip),%rax
mov    (%rax),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
mov    0x2b6a(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0xa(%rbp)
jl     1429 <main+0x2f9>
mov    0x2bb8(%rip),%rax
mov    (%rax),%eax
mov    0x2bcf(%rip),%rcx
cmp    (%rcx),%eax
setge  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %eax,%eax
mov    0x2b71(%rip),%rcx
cmpl   $0xffff8001,(%rcx)
mov    %al,-0xb(%rbp)
jg     147e <main+0x34e>
xor    %eax,%eax
mov    0x2b71(%rip),%rcx
cmpl   $0x7fff,(%rcx)
mov    %al,-0xb(%rbp)
jl     147e <main+0x34e>
mov    0x2b5b(%rip),%rax
mov    (%rax),%eax
mov    0x2afa(%rip),%rcx
cmp    (%rcx),%eax
setge  %al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %eax,%eax
mov    0x2b2c(%rip),%rcx
cmpl   $0xffff,(%rcx)
mov    %al,-0xc(%rbp)
jl     14e2 <main+0x3b2>
mov    0x2b16(%rip),%rax
mov    (%rax),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
mov    0x2b09(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0xc(%rbp)
jl     14e2 <main+0x3b2>
mov    0x2aef(%rip),%rax
mov    (%rax),%eax
mov    0x2af6(%rip),%rcx
cmp    (%rcx),%eax
setge  %al
mov    %al,-0xc(%rbp)
mov    -0xc(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %eax,%eax
mov    0x2ac0(%rip),%rcx
cmpq   $0xffffffff80000001,(%rcx)
mov    %al,-0xd(%rbp)
jg     153e <main+0x40e>
xor    %eax,%eax
mov    0x2a77(%rip),%rcx
cmpq   $0x7fffffff,(%rcx)
mov    %al,-0xd(%rbp)
jl     153e <main+0x40e>
mov    0x2a60(%rip),%rax
mov    (%rax),%rax
mov    0x2a96(%rip),%rcx
movslq (%rcx),%rcx
cmp    %rcx,%rax
setge  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %eax,%eax
mov    $0xffffffff,%edx
mov    0x2a07(%rip),%rcx
cmp    %rdx,(%rcx)
mov    %al,-0xe(%rbp)
jb     15a2 <main+0x472>
mov    0x29f4(%rip),%rax
mov    (%rax),%rcx
shr    $0x1,%rcx
xor    %eax,%eax
mov    0x2a0c(%rip),%rdx
cmp    (%rdx),%rcx
mov    %al,-0xe(%rbp)
jb     15a2 <main+0x472>
mov    0x2a31(%rip),%rax
movslq (%rax),%rax
mov    0x29c7(%rip),%rcx
cmp    (%rcx),%rax
setbe  %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xb82(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2e4e(%rip),%rax
movslq (%rax),%rsi
mov    0x2e2c(%rip),%rax
mov    (%rax),%edx
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e7d(%rip),%r15
movslq (%r15),%rsi
mov    0x2e6b(%rip),%rbp
mov    0x0(%rbp),%edx
lea    0xeb0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e13(%rip),%r14
movslq (%r14),%rsi
mov    0x2e11(%rip),%r13
mov    0x0(%r13),%edx
lea    0xeb3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e48(%rip),%r12
movslq (%r12),%rsi
lea    0xec0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2daf(%rip),%rbx
movslq (%rbx),%rsi
mov    0x2db5(%rip),%rax
mov    (%rax),%edx
lea    0xeb3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2dee(%rip),%rax
movslq (%rax),%rsi
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2dce(%rip),%rax
movslq (%rax),%rsi
mov    0x2dac(%rip),%rax
mov    (%rax),%edx
lea    0xeb4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2da5(%rip),%rax
movslq (%rax),%rsi
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d55(%rip),%rax
mov    (%rax),%rsi
mov    0x2d7b(%rip),%rax
mov    (%rax),%rdx
lea    0xeb4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d0b(%rip),%rax
mov    (%rax),%rsi
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d23(%rip),%rax
cmpl   $0x8,(%rax)
setge  %al
cmpl   $0x7f,(%r15)
setge  %cl
and    %al,%cl
cmpl   $0x0,0x0(%rbp)
setle  %al
and    %cl,%al
movzbl %al,%edi
call   1050 <assert@plt>
cmpl   $0xffffff82,0x0(%r13)
setl   %al
cmpl   $0x7f,(%r14)
setge  %cl
and    %al,%cl
movzbl %cl,%edi
call   1050 <assert@plt>
mov    (%r12),%eax
cmp    $0xff,%eax
setge  %cl
shr    %eax
cmp    (%r14),%eax
setge  %al
and    %cl,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    (%r15),%eax
cmp    (%r14),%eax
sete   %cl
cmp    (%r12),%eax
sete   %al
or     %cl,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %edi,%edi
mov    0x2c91(%rip),%rax
cmpl   $0x0,(%rax)
setg   %dil
call   1050 <assert@plt>
mov    0x2c86(%rip),%rax
cmpl   $0xffff8002,(%rax)
setl   %al
mov    (%rbx),%ecx
cmp    $0x7fff,%ecx
setge  %dl
and    %al,%dl
cmp    (%r14),%ecx
mov    0x2cb6(%rip),%r14
setge  %al
and    %dl,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    (%r14),%eax
mov    $0x0,%edi
cmp    $0xffff,%eax
jl     134d <main+0x21d>
mov    %eax,%ecx
shr    %ecx
mov    $0x0,%edi
cmp    (%rbx),%ecx
jl     134d <main+0x21d>
xor    %edi,%edi
cmp    (%r12),%eax
setge  %dil
call   1050 <assert@plt>
mov    0x2c57(%rip),%rax
cmpl   $0xffff8002,(%rax)
setl   %al
mov    0x2c5f(%rip),%rbp
mov    0x0(%rbp),%ecx
cmp    $0x7fff,%ecx
setge  %dl
and    %al,%dl
cmp    (%rbx),%ecx
setge  %al
and    %dl,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    0x2c33(%rip),%rbx
mov    (%rbx),%eax
cmp    $0xffff,%eax
jl     13b6 <main+0x286>
mov    %eax,%ecx
shr    %ecx
cmp    0x0(%rbp),%ecx
mov    $0x0,%edi
mov    0x2bdf(%rip),%rbp
jl     13bf <main+0x28f>
xor    %edi,%edi
cmp    (%r14),%eax
setge  %dil
jmp    13bf <main+0x28f>
xor    %edi,%edi
mov    0x2bc9(%rip),%rbp
call   1050 <assert@plt>
mov    0x2bed(%rip),%rax
cmpq   $0xffffffff80000002,(%rax)
setl   %al
cmpq   $0x7fffffff,0x0(%rbp)
7f
setge  %cl
and    %al,%cl
movzbl %cl,%edi
call   1050 <assert@plt>
mov    0x2b6f(%rip),%rax
mov    (%rax),%rax
xor    %edi,%edi
mov    $0xffffffff,%ecx
cmp    %rcx,%rax
jb     1418 <main+0x2e8>
mov    %rax,%rcx
shr    %rcx
cmp    0x0(%rbp),%rcx
jb     1418 <main+0x2e8>
movslq (%rbx),%rcx
xor    %edi,%edi
cmp    %rcx,%rax
setae  %dil
call   1050 <assert@plt>
lea    0xd14(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [39 x i8] c"CHAR_BIT = %-10i MB_LEN_MAX = %i\0A\0A\00"
@CHAR_BIT = global i32 0
@MB_LEN_MAX = global i32 0
@.str.1 = [38 x i8] c"CHAR_MAX = %-10i CHAR_MIN = %i\0A\00"
@CHAR_MAX = global i32 0
@CHAR_MIN = global i32 0
@.str.2 = [38 x i8] c"SCHAR_MAX = %-10i SCHAR_MIN = %i\0A\00"
@SCHAR_MAX = global i32 0
@SCHAR_MIN = global i32 0
@.str.3 = [20 x i8] c"UCHAR_MAX = %-10u\0A\0A\00"
@UCHAR_MAX = global i32 0
@.str.4 = [38 x i8] c"SHRT_MAX = %-10i SHRT_MIN = %i\0A\00"
@SHRT_MAX = global i32 0
@SHRT_MIN = global i32 0
@.str.5 = [20 x i8] c"USHRT_MAX = %-10u\0A\0A\00"
@USHRT_MAX = global i32 0
@.str.6 = [38 x i8] c"INT_MAX = %-10i INT_MIN = %i\0A\00"
@INT_MAX = global i32 0
@INT_MIN = global i32 0
@.str.7 = [20 x i8] c"UINT_MAX = %-10u\0A\0A\00"
@UINT_MAX = global i32 0
@.str.8 = [40 x i8] c"LONG_MAX = %-10li LONG_MIN = %li\0A\00"
@LONG_MAX = global i64 0
@LONG_MIN = global i64 0
@.str.9 = [21 x i8] c"ULONG_MAX = %-10lu\0A\0A\00"
@ULONG_MAX = global i64 0
@.str.10 = [27 x i8] c"SUCCESS testing <limits.h>\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @CHAR_BIT
%3 = sext i32 %2 to i64
%4 = load i32, i32* @MB_LEN_MAX
%5 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i64 %3, i32 %4)
%6 = load i32, i32* @CHAR_MAX
%7 = sext i32 %6 to i64
%8 = load i32, i32* @CHAR_MIN
%9 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i64 %7, i32 %8)
%10 = load i32, i32* @SCHAR_MAX
%11 = sext i32 %10 to i64
%12 = load i32, i32* @SCHAR_MIN
%13 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i64 %11, i32 %12)
%14 = load i32, i32* @UCHAR_MAX
%15 = sext i32 %14 to i64
%16 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i64 %15)
%17 = load i32, i32* @SHRT_MAX
%18 = sext i32 %17 to i64
%19 = load i32, i32* @SHRT_MIN
%20 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i64 %18, i32 %19)
%21 = load i32, i32* @USHRT_MAX
%22 = sext i32 %21 to i64
%23 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i64 %22)
%24 = load i32, i32* @INT_MAX
%25 = sext i32 %24 to i64
%26 = load i32, i32* @INT_MIN
%27 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i64 %25, i32 %26)
%28 = load i32, i32* @UINT_MAX
%29 = sext i32 %28 to i64
%30 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i64 %29)
%31 = load i64, i64* @LONG_MAX
%32 = load i64, i64* @LONG_MIN
%33 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i64 %31, i64 %32)
%34 = load i64, i64* @ULONG_MAX
%35 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i64 %34)
%36 = load i32, i32* @CHAR_BIT
%37 = icmp sge i32 %36, 8
br i1 %37, label %38, label %44
38: ; preds = %0
%39 = load i32, i32* @CHAR_MAX
%40 = icmp sge i32 %39, 127
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = load i32, i32* @CHAR_MIN
%43 = icmp sle i32 %42, 0
br label %44
44: ; preds = %41, %38, %0
%45 = phi i1 [ false, %38 ], [ false, %0 ], [ %43, %41 ]
%46 = zext i1 %45 to i32
%47 = call i32 @assert(i32 %46)
%48 = load i32, i32* @SCHAR_MIN
%49 = icmp sle i32 %48, -127
br i1 %49, label %50, label %53
50: ; preds = %44
%51 = load i32, i32* @SCHAR_MAX
%52 = icmp sge i32 %51, 127
br label %53
53: ; preds = %50, %44
%54 = phi i1 [ false, %44 ], [ %52, %50 ]
%55 = zext i1 %54 to i32
%56 = call i32 @assert(i32 %55)
%57 = load i32, i32* @UCHAR_MAX
%58 = icmp sge i32 %57, 255
br i1 %58, label %59, label %64
59: ; preds = %53
%60 = load i32, i32* @UCHAR_MAX
%61 = sdiv i32 %60, 2
%62 = load i32, i32* @SCHAR_MAX
%63 = icmp sge i32 %61, %62
br label %64
64: ; preds = %59, %53
%65 = phi i1 [ false, %53 ], [ %63, %59 ]
%66 = zext i1 %65 to i32
%67 = call i32 @assert(i32 %66)
%68 = load i32, i32* @CHAR_MAX
%69 = load i32, i32* @SCHAR_MAX
%70 = icmp eq i32 %68, %69
br i1 %70, label %75, label %71
71: ; preds = %64
%72 = load i32, i32* @CHAR_MAX
%73 = load i32, i32* @UCHAR_MAX
%74 = icmp eq i32 %72, %73
br label %75
75: ; preds = %71, %64
%76 = phi i1 [ true, %64 ], [ %74, %71 ]
%77 = zext i1 %76 to i32
%78 = call i32 @assert(i32 %77)
%79 = load i32, i32* @MB_LEN_MAX
%80 = icmp sge i32 %79, 1
%81 = zext i1 %80 to i32
%82 = call i32 @assert(i32 %81)
%83 = load i32, i32* @SHRT_MIN
%84 = icmp sle i32 %83, -32767
br i1 %84, label %85, label %92
85: ; preds = %75
%86 = load i32, i32* @SHRT_MAX
%87 = icmp sge i32 %86, 32767
br i1 %87, label %88, label %92
88: ; preds = %85
%89 = load i32, i32* @SHRT_MAX
%90 = load i32, i32* @SCHAR_MAX
%91 = icmp sge i32 %89, %90
br label %92
92: ; preds = %88, %85, %75
%93 = phi i1 [ false, %85 ], [ false, %75 ], [ %91, %88 ]
%94 = zext i1 %93 to i32
%95 = call i32 @assert(i32 %94)
%96 = load i32, i32* @USHRT_MAX
%97 = icmp sge i32 %96, 65535
br i1 %97, label %98, label %107
98: ; preds = %92
%99 = load i32, i32* @USHRT_MAX
%100 = sdiv i32 %99, 2
%101 = load i32, i32* @SHRT_MAX
%102 = icmp sge i32 %100, %101
br i1 %102, label %103, label %107
103: ; preds = %98
%104 = load i32, i32* @USHRT_MAX
%105 = load i32, i32* @UCHAR_MAX
%106 = icmp sge i32 %104, %105
br label %107
107: ; preds = %103, %98, %92
%108 = phi i1 [ false, %98 ], [ false, %92 ], [ %106, %103 ]
%109 = zext i1 %108 to i32
%110 = call i32 @assert(i32 %109)
%111 = load i32, i32* @INT_MIN
%112 = icmp sle i32 %111, -32767
br i1 %112, label %113, label %120
113: ; preds = %107
%114 = load i32, i32* @INT_MAX
%115 = icmp sge i32 %114, 32767
br i1 %115, label %116, label %120
116: ; preds = %113
%117 = load i32, i32* @INT_MAX
%118 = load i32, i32* @SHRT_MAX
%119 = icmp sge i32 %117, %118
br label %120
120: ; preds = %116, %113, %107
%121 = phi i1 [ false, %113 ], [ false, %107 ], [ %119, %116 ]
%122 = zext i1 %121 to i32
%123 = call i32 @assert(i32 %122)
%124 = load i32, i32* @UINT_MAX
%125 = icmp sge i32 %124, 65535
br i1 %125, label %126, label %135
126: ; preds = %120
%127 = load i32, i32* @UINT_MAX
%128 = sdiv i32 %127, 2
%129 = load i32, i32* @INT_MAX
%130 = icmp sge i32 %128, %129
br i1 %130, label %131, label %135
131: ; preds = %126
%132 = load i32, i32* @UINT_MAX
%133 = load i32, i32* @USHRT_MAX
%134 = icmp sge i32 %132, %133
br label %135
135: ; preds = %131, %126, %120
%136 = phi i1 [ false, %126 ], [ false, %120 ], [ %134, %131 ]
%137 = zext i1 %136 to i32
%138 = call i32 @assert(i32 %137)
%139 = load i64, i64* @LONG_MIN
%140 = icmp sle i64 %139, -2147483647
br i1 %140, label %141, label %149
141: ; preds = %135
%142 = load i64, i64* @LONG_MAX
%143 = icmp sge i64 %142, 2147483647
br i1 %143, label %144, label %149
144: ; preds = %141
%145 = load i64, i64* @LONG_MAX
%146 = load i32, i32* @INT_MAX
%147 = sext i32 %146 to i64
%148 = icmp sge i64 %145, %147
br label %149
149: ; preds = %144, %141, %135
%150 = phi i1 [ false, %141 ], [ false, %135 ], [ %148, %144 ]
%151 = zext i1 %150 to i32
%152 = call i32 @assert(i32 %151)
%153 = load i64, i64* @ULONG_MAX
%154 = icmp uge i64 %153, 4294967295
br i1 %154, label %155, label %165
155: ; preds = %149
%156 = load i64, i64* @ULONG_MAX
%157 = udiv i64 %156, 2
%158 = load i64, i64* @LONG_MAX
%159 = icmp uge i64 %157, %158
br i1 %159, label %160, label %165
160: ; preds = %155
%161 = load i32, i32* @UINT_MAX
%162 = sext i32 %161 to i64
%163 = load i64, i64* @ULONG_MAX
%164 = icmp ule i64 %162, %163
br label %165
165: ; preds = %160, %155, %149
%166 = phi i1 [ false, %155 ], [ false, %149 ], [ %164, %160 ]
%167 = zext i1 %166 to i32
%168 = call i32 @assert(i32 %167)
%169 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"CHAR_BIT = %-10i MB_LEN_MAX = %i\0A\0A\00"
@CHAR_BIT = global i32 0
@MB_LEN_MAX = global i32 0
@.str.1 = [38 x i8] c"CHAR_MAX = %-10i CHAR_MIN = %i\0A\00"
@CHAR_MAX = global i32 0
@CHAR_MIN = global i32 0
@.str.2 = [38 x i8] c"SCHAR_MAX = %-10i SCHAR_MIN = %i\0A\00"
@SCHAR_MAX = global i32 0
@SCHAR_MIN = global i32 0
@.str.3 = [20 x i8] c"UCHAR_MAX = %-10u\0A\0A\00"
@UCHAR_MAX = global i32 0
@.str.4 = [38 x i8] c"SHRT_MAX = %-10i SHRT_MIN = %i\0A\00"
@SHRT_MAX = global i32 0
@SHRT_MIN = global i32 0
@.str.5 = [20 x i8] c"USHRT_MAX = %-10u\0A\0A\00"
@USHRT_MAX = global i32 0
@.str.6 = [38 x i8] c"INT_MAX = %-10i INT_MIN = %i\0A\00"
@INT_MAX = global i32 0
@INT_MIN = global i32 0
@.str.7 = [20 x i8] c"UINT_MAX = %-10u\0A\0A\00"
@UINT_MAX = global i32 0
@.str.8 = [40 x i8] c"LONG_MAX = %-10li LONG_MIN = %li\0A\00"
@LONG_MAX = global i64 0
@LONG_MIN = global i64 0
@.str.9 = [21 x i8] c"ULONG_MAX = %-10lu\0A\0A\00"
@ULONG_MAX = global i64 0
@.str.10 = [27 x i8] c"SUCCESS testing <limits.h>\00"
define i32 @main() {
%1 = load i32, i32* @CHAR_BIT
%2 = sext i32 %1 to i64
%3 = load i32, i32* @MB_LEN_MAX
%4 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i64 %2, i32 %3)
%5 = load i32, i32* @CHAR_MAX
%6 = sext i32 %5 to i64
%7 = load i32, i32* @CHAR_MIN
%8 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i64 %6, i32 %7)
%9 = load i32, i32* @SCHAR_MAX
%10 = sext i32 %9 to i64
%11 = load i32, i32* @SCHAR_MIN
%12 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i64 %10, i32 %11)
%13 = load i32, i32* @UCHAR_MAX
%14 = sext i32 %13 to i64
%15 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i64 %14)
%16 = load i32, i32* @SHRT_MAX
%17 = sext i32 %16 to i64
%18 = load i32, i32* @SHRT_MIN
%19 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i64 %17, i32 %18)
%20 = load i32, i32* @USHRT_MAX
%21 = sext i32 %20 to i64
%22 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i64 %21)
%23 = load i32, i32* @INT_MAX
%24 = sext i32 %23 to i64
%25 = load i32, i32* @INT_MIN
%26 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i64 %24, i32 %25)
%27 = load i32, i32* @UINT_MAX
%28 = sext i32 %27 to i64
%29 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i64 %28)
%30 = load i64, i64* @LONG_MAX
%31 = load i64, i64* @LONG_MIN
%32 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i64 %30, i64 %31)
%33 = load i64, i64* @ULONG_MAX
%34 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i64 %33)
%35 = load i32, i32* @CHAR_BIT
%36 = icmp sgt i32 %35, 7
%37 = load i32, i32* @CHAR_MAX
%38 = icmp sgt i32 %37, 126
%39 = select i1 %36, i1 %38, i1 false
%40 = load i32, i32* @CHAR_MIN
%41 = icmp slt i32 %40, 1
%42 = select i1 %39, i1 %41, i1 false
%43 = zext i1 %42 to i32
%44 = tail call i32 @assert(i32 %43)
%45 = load i32, i32* @SCHAR_MIN
%46 = icmp slt i32 %45, -126
%47 = load i32, i32* @SCHAR_MAX
%48 = icmp sgt i32 %47, 126
%49 = select i1 %46, i1 %48, i1 false
%50 = zext i1 %49 to i32
%51 = tail call i32 @assert(i32 %50)
%52 = load i32, i32* @UCHAR_MAX
%53 = icmp sgt i32 %52, 254
%54 = lshr i32 %52, 1
%55 = load i32, i32* @SCHAR_MAX
%56 = icmp sge i32 %54, %55
%57 = select i1 %53, i1 %56, i1 false
%58 = zext i1 %57 to i32
%59 = tail call i32 @assert(i32 %58)
%60 = load i32, i32* @CHAR_MAX
%61 = load i32, i32* @SCHAR_MAX
%62 = icmp eq i32 %60, %61
%63 = load i32, i32* @UCHAR_MAX
%64 = icmp eq i32 %60, %63
%65 = select i1 %62, i1 true, i1 %64
%66 = zext i1 %65 to i32
%67 = tail call i32 @assert(i32 %66)
%68 = load i32, i32* @MB_LEN_MAX
%69 = icmp sgt i32 %68, 0
%70 = zext i1 %69 to i32
%71 = tail call i32 @assert(i32 %70)
%72 = load i32, i32* @SHRT_MIN
%73 = icmp slt i32 %72, -32766
%74 = load i32, i32* @SHRT_MAX
%75 = icmp sgt i32 %74, 32766
%76 = select i1 %73, i1 %75, i1 false
%77 = load i32, i32* @SCHAR_MAX
%78 = icmp sge i32 %74, %77
%79 = select i1 %76, i1 %78, i1 false
%80 = zext i1 %79 to i32
%81 = tail call i32 @assert(i32 %80)
%82 = load i32, i32* @USHRT_MAX
%83 = icmp sgt i32 %82, 65534
br i1 %83, label %84, label %92
84: ; preds = %0
%85 = lshr i32 %82, 1
%86 = load i32, i32* @SHRT_MAX
%87 = icmp slt i32 %85, %86
br i1 %87, label %92, label %88
88: ; preds = %84
%89 = load i32, i32* @UCHAR_MAX
%90 = icmp sge i32 %82, %89
%91 = zext i1 %90 to i32
br label %92
92: ; preds = %88, %84, %0
%93 = phi i32 [ 0, %84 ], [ 0, %0 ], [ %91, %88 ]
%94 = tail call i32 @assert(i32 %93)
%95 = load i32, i32* @INT_MIN
%96 = icmp slt i32 %95, -32766
%97 = load i32, i32* @INT_MAX
%98 = icmp sgt i32 %97, 32766
%99 = select i1 %96, i1 %98, i1 false
%100 = load i32, i32* @SHRT_MAX
%101 = icmp sge i32 %97, %100
%102 = select i1 %99, i1 %101, i1 false
%103 = zext i1 %102 to i32
%104 = tail call i32 @assert(i32 %103)
%105 = load i32, i32* @UINT_MAX
%106 = icmp sgt i32 %105, 65534
br i1 %106, label %107, label %115
107: ; preds = %92
%108 = lshr i32 %105, 1
%109 = load i32, i32* @INT_MAX
%110 = icmp slt i32 %108, %109
br i1 %110, label %115, label %111
111: ; preds = %107
%112 = load i32, i32* @USHRT_MAX
%113 = icmp sge i32 %105, %112
%114 = zext i1 %113 to i32
br label %115
115: ; preds = %111, %107, %92
%116 = phi i32 [ 0, %107 ], [ 0, %92 ], [ %114, %111 ]
%117 = tail call i32 @assert(i32 %116)
%118 = load i64, i64* @LONG_MIN
%119 = icmp slt i64 %118, -2147483646
%120 = load i64, i64* @LONG_MAX
%121 = icmp sgt i64 %120, 2147483646
%122 = select i1 %119, i1 %121, i1 false
%123 = zext i1 %122 to i32
%124 = tail call i32 @assert(i32 %123)
%125 = load i64, i64* @ULONG_MAX
%126 = icmp ugt i64 %125, 4294967294
br i1 %126, label %127, label %136
127: ; preds = %115
%128 = lshr i64 %125, 1
%129 = load i64, i64* @LONG_MAX
%130 = icmp ult i64 %128, %129
br i1 %130, label %136, label %131
131: ; preds = %127
%132 = load i32, i32* @UINT_MAX
%133 = sext i32 %132 to i64
%134 = icmp uge i64 %125, %133
%135 = zext i1 %134 to i32
br label %136
136: ; preds = %131, %127, %115
%137 = phi i32 [ 0, %127 ], [ 0, %115 ], [ %135, %131 ]
%138 = tail call i32 @assert(i32 %137)
%139 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
ret i32 0
}