#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 LLONG_MAX;
long long LLONG_MIN;
long LONG_MAX;
long LONG_MIN;
int SCHAR_MAX;
int SCHAR_MIN;
int SHRT_MAX;
int SHRT_MIN;
int UCHAR_MAX;
int UINT_MAX;
unsigned long ULLONG_MAX;
unsigned long ULONG_MAX;
int USHRT_MAX;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *, ...);
void limitsTest() {
  printf("limits test\n");
  printf("CHAR_BIT: %d\n", CHAR_BIT);
  printf("CHAR_MAX: %d\n", CHAR_MAX);
  printf("CHAR_MIN: %d\n", CHAR_MIN);
  assert(CHAR_BIT == 8);
  assert(CHAR_MAX == 127);
  assert(CHAR_MIN == -128);
  printf("SCHAR_MAX: %d\n", SCHAR_MAX);
  printf("SCHAR_MIN: %d\n", SCHAR_MIN);
  printf("UCHAR_MAX: %u\n", UCHAR_MAX);
  assert(SCHAR_MAX == 127);
  assert(SCHAR_MIN == -128);
  assert(UCHAR_MAX == 255);
  printf("SHRT_MAX: %d\n", SHRT_MAX);
  printf("SHRT_MIN: %d\n", SHRT_MIN);
  printf("USHRT_MAX: %u\n", USHRT_MAX);
  assert(SHRT_MAX == 32767);
  assert(SHRT_MIN == -32768);
  assert(USHRT_MAX == 65535);
  printf("INT_MAX: %d\n", INT_MAX);
  printf("INT_MIN: %d\n", INT_MIN);
  printf("UINT_MAX: %u\n", UINT_MAX);
  assert(INT_MAX == 2147483647L);
  assert(INT_MIN == -2147483648L);
  assert(UINT_MAX == 4294967295UL);
  printf("LONG_MAX: %ld\n", LONG_MAX);
  printf("LONG_MIN: %ld\n", LONG_MIN);
  printf("ULONG_MAX: %lu\n", ULONG_MAX);
  assert(LONG_MAX == 9223372036854775807L);
  assert(LONG_MIN == -9223372036854775808L);
  assert(ULONG_MAX == 18446744073709551615UL);
  printf("LLONG_MAX: %lld\n", LLONG_MAX);
  printf("LLONG_MIN: %lld\n", LLONG_MIN);
  printf("ULLONG_MAX: %llu\n", ULLONG_MAX);
  assert(LLONG_MAX == 9223372036854775807L);
  assert(LLONG_MIN == -9223372036854775808LL);
  assert(ULLONG_MAX == 18446744073709551615UL);
}


x86 assembly (clang, -O0):
<limitsTest>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e3f(%rip),%rax
mov    (%rax),%esi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dfa(%rip),%rax
cmpl   $0x8,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2e4b(%rip),%rax
cmpl   $0x7f,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2e2c(%rip),%rax
cmpl   $0xffffff80,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2dc5(%rip),%rax
mov    (%rax),%esi
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2db6(%rip),%rax
mov    (%rax),%esi
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dff(%rip),%rax
mov    (%rax),%esi
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d80(%rip),%rax
cmpl   $0x7f,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2d71(%rip),%rax
cmpl   $0xffffff80,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2dba(%rip),%rax
cmpl   $0xff,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2d10(%rip),%rax
mov    (%rax),%esi
lea    0xdef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d01(%rip),%rax
mov    (%rax),%esi
lea    0xde6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d4a(%rip),%rax
mov    (%rax),%esi
lea    0xddd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2ccb(%rip),%rax
cmpl   $0x7fff,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2cb9(%rip),%rax
cmpl   $0xffff8000,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2cff(%rip),%rax
cmpl   $0xffff,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2cdd(%rip),%rax
mov    (%rax),%esi
lea    0xd87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2cae(%rip),%rax
mov    (%rax),%esi
lea    0xd7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2ca7(%rip),%rax
mov    (%rax),%esi
lea    0xd73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2c98(%rip),%rax
movslq (%rax),%rax
cmp    $0x7fffffff,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2c63(%rip),%rax
movslq (%rax),%rax
cmp    $0xffffffff80000000,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2c56(%rip),%rax
movslq (%rax),%rax
mov    $0xffffffff,%ecx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2bef(%rip),%rax
mov    (%rax),%rsi
lea    0xd10(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2c17(%rip),%rax
mov    (%rax),%rsi
lea    0xd07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2b9f(%rip),%rax
mov    (%rax),%rsi
lea    0xcfe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movabs $0x7fffffffffffffff,%rcx
ff ff 7f
mov    0x2b9d(%rip),%rax
cmp    %rcx,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movabs $0x8000000000000000,%rcx
mov    0x2bbc(%rip),%rax
cmp    %rcx,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2b45(%rip),%rax
cmpq   $0xffffffffffffffff,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2b7d(%rip),%rax
mov    (%rax),%rsi
lea    0xc9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2b45(%rip),%rax
mov    (%rax),%rsi
lea    0xc95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2b7d(%rip),%rax
mov    (%rax),%rsi
lea    0xc8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movabs $0x7fffffffffffffff,%rcx
ff ff 7f
mov    0x2b2b(%rip),%rax
cmp    %rcx,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movabs $0x8000000000000000,%rcx
mov    0x2aea(%rip),%rax
cmp    %rcx,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2b23(%rip),%rax
cmpq   $0xffffffffffffffff,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<limitsTest>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
lea    0xfb0(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e2c(%rip),%r14
mov    (%r14),%esi
lea    0xeaa(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e7c(%rip),%rbx
mov    (%rbx),%esi
lea    0xea2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e5d(%rip),%r15
mov    (%r15),%esi
lea    0xe99(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
cmpl   $0x8,(%r14)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpl   $0x7f,(%rbx)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpl   $0xffffff80,(%r15)
sete   %dil
call   1050 <assert@plt>
mov    0x2dc9(%rip),%rbx
mov    (%rbx),%esi
lea    0xe46(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2dba(%rip),%r14
mov    (%r14),%esi
lea    0xe3d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e02(%rip),%r15
mov    (%r15),%esi
lea    0xe34(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
cmpl   $0x7f,(%rbx)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpl   $0xffffff80,(%r14)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpl   $0xff,(%r15)
sete   %dil
call   1050 <assert@plt>
mov    0x2d2b(%rip),%rbx
mov    (%rbx),%esi
lea    0xdfd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d1c(%rip),%r14
mov    (%r14),%esi
lea    0xdf3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d64(%rip),%r15
mov    (%r15),%esi
lea    0xde9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
cmpl   $0x7fff,(%rbx)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpl   $0xffff8000,(%r14)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpl   $0xffff,(%r15)
sete   %dil
call   1050 <assert@plt>
mov    0x2d0f(%rip),%rbx
mov    (%rbx),%esi
lea    0xdac(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2ce0(%rip),%r14
mov    (%r14),%esi
lea    0xda1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2cd8(%rip),%rax
mov    (%rax),%esi
lea    0xd97(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
cmpl   $0x7fffffff,(%rbx)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpl   $0x80000000,(%r14)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
call   1050 <assert@plt>
mov    0x2c4f(%rip),%rbx
mov    (%rbx),%rsi
lea    0xd63(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2c77(%rip),%r15
mov    (%r15),%rsi
lea    0xd5a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2bff(%rip),%r12
mov    (%r12),%rsi
lea    0xd50(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movabs $0x7fffffffffffffff,%r14
ff ff 7f
xor    %edi,%edi
cmp    %r14,(%rbx)
sete   %dil
call   1050 <assert@plt>
lea    0x1(%r14),%rbx
xor    %edi,%edi
cmp    %rbx,(%r15)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpq   $0xffffffffffffffff,(%r12)
sete   %dil
call   1050 <assert@plt>
mov    0x2bfc(%rip),%r15
mov    (%r15),%rsi
lea    0xd0e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2bc4(%rip),%r12
mov    (%r12),%rsi
lea    0xd06(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2bfb(%rip),%r13
mov    0x0(%r13),%rsi
lea    0xcfe(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
cmp    %r14,(%r15)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmp    %rbx,(%r12)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpq   $0xffffffffffffffff,0x0(%r13)
sete   %dil
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1050 <assert@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"limits test\0A\00"
@.str.1 = [14 x i8] c"CHAR_BIT: %d\0A\00"
@CHAR_BIT = global i32 0
@.str.2 = [14 x i8] c"CHAR_MAX: %d\0A\00"
@CHAR_MAX = global i32 0
@.str.3 = [14 x i8] c"CHAR_MIN: %d\0A\00"
@CHAR_MIN = global i32 0
@.str.4 = [15 x i8] c"SCHAR_MAX: %d\0A\00"
@SCHAR_MAX = global i32 0
@.str.5 = [15 x i8] c"SCHAR_MIN: %d\0A\00"
@SCHAR_MIN = global i32 0
@.str.6 = [15 x i8] c"UCHAR_MAX: %u\0A\00"
@UCHAR_MAX = global i32 0
@.str.7 = [14 x i8] c"SHRT_MAX: %d\0A\00"
@SHRT_MAX = global i32 0
@.str.8 = [14 x i8] c"SHRT_MIN: %d\0A\00"
@SHRT_MIN = global i32 0
@.str.9 = [15 x i8] c"USHRT_MAX: %u\0A\00"
@USHRT_MAX = global i32 0
@.str.10 = [13 x i8] c"INT_MAX: %d\0A\00"
@INT_MAX = global i32 0
@.str.11 = [13 x i8] c"INT_MIN: %d\0A\00"
@INT_MIN = global i32 0
@.str.12 = [14 x i8] c"UINT_MAX: %u\0A\00"
@UINT_MAX = global i32 0
@.str.13 = [15 x i8] c"LONG_MAX: %ld\0A\00"
@LONG_MAX = global i64 0
@.str.14 = [15 x i8] c"LONG_MIN: %ld\0A\00"
@LONG_MIN = global i64 0
@.str.15 = [16 x i8] c"ULONG_MAX: %lu\0A\00"
@ULONG_MAX = global i64 0
@.str.16 = [17 x i8] c"LLONG_MAX: %lld\0A\00"
@LLONG_MAX = global i64 0
@.str.17 = [17 x i8] c"LLONG_MIN: %lld\0A\00"
@LLONG_MIN = global i64 0
@.str.18 = [18 x i8] c"ULLONG_MAX: %llu\0A\00"
@ULLONG_MAX = global i64 0
define void @limitsTest() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @CHAR_BIT
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @CHAR_MAX
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @CHAR_MIN
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @CHAR_BIT
%9 = icmp eq i32 %8, 8
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i32, i32* @CHAR_MAX
%13 = icmp eq i32 %12, 127
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load i32, i32* @CHAR_MIN
%17 = icmp eq i32 %16, -128
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = load i32, i32* @SCHAR_MAX
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %20)
%22 = load i32, i32* @SCHAR_MIN
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 %22)
%24 = load i32, i32* @UCHAR_MAX
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %24)
%26 = load i32, i32* @SCHAR_MAX
%27 = icmp eq i32 %26, 127
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
%30 = load i32, i32* @SCHAR_MIN
%31 = icmp eq i32 %30, -128
%32 = zext i1 %31 to i32
%33 = call i32 @assert(i32 %32)
%34 = load i32, i32* @UCHAR_MAX
%35 = icmp eq i32 %34, 255
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
%38 = load i32, i32* @SHRT_MAX
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %38)
%40 = load i32, i32* @SHRT_MIN
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %40)
%42 = load i32, i32* @USHRT_MAX
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 %42)
%44 = load i32, i32* @SHRT_MAX
%45 = icmp eq i32 %44, 32767
%46 = zext i1 %45 to i32
%47 = call i32 @assert(i32 %46)
%48 = load i32, i32* @SHRT_MIN
%49 = icmp eq i32 %48, -32768
%50 = zext i1 %49 to i32
%51 = call i32 @assert(i32 %50)
%52 = load i32, i32* @USHRT_MAX
%53 = icmp eq i32 %52, 65535
%54 = zext i1 %53 to i32
%55 = call i32 @assert(i32 %54)
%56 = load i32, i32* @INT_MAX
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i32 %56)
%58 = load i32, i32* @INT_MIN
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 %58)
%60 = load i32, i32* @UINT_MAX
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i32 %60)
%62 = load i32, i32* @INT_MAX
%63 = sext i32 %62 to i64
%64 = icmp eq i64 %63, 2147483647
%65 = zext i1 %64 to i32
%66 = call i32 @assert(i32 %65)
%67 = load i32, i32* @INT_MIN
%68 = sext i32 %67 to i64
%69 = icmp eq i64 %68, -2147483648
%70 = zext i1 %69 to i32
%71 = call i32 @assert(i32 %70)
%72 = load i32, i32* @UINT_MAX
%73 = sext i32 %72 to i64
%74 = icmp eq i64 %73, 4294967295
%75 = zext i1 %74 to i32
%76 = call i32 @assert(i32 %75)
%77 = load i64, i64* @LONG_MAX
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0), i64 %77)
%79 = load i64, i64* @LONG_MIN
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), i64 %79)
%81 = load i64, i64* @ULONG_MAX
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i64 %81)
%83 = load i64, i64* @LONG_MAX
%84 = icmp eq i64 %83, 9223372036854775807
%85 = zext i1 %84 to i32
%86 = call i32 @assert(i32 %85)
%87 = load i64, i64* @LONG_MIN
%88 = icmp eq i64 %87, -9223372036854775808
%89 = zext i1 %88 to i32
%90 = call i32 @assert(i32 %89)
%91 = load i64, i64* @ULONG_MAX
%92 = icmp eq i64 %91, -1
%93 = zext i1 %92 to i32
%94 = call i32 @assert(i32 %93)
%95 = load i64, i64* @LLONG_MAX
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.16, i64 0, i64 0), i64 %95)
%97 = load i64, i64* @LLONG_MIN
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.17, i64 0, i64 0), i64 %97)
%99 = load i64, i64* @ULLONG_MAX
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0), i64 %99)
%101 = load i64, i64* @LLONG_MAX
%102 = icmp eq i64 %101, 9223372036854775807
%103 = zext i1 %102 to i32
%104 = call i32 @assert(i32 %103)
%105 = load i64, i64* @LLONG_MIN
%106 = icmp eq i64 %105, -9223372036854775808
%107 = zext i1 %106 to i32
%108 = call i32 @assert(i32 %107)
%109 = load i64, i64* @ULLONG_MAX
%110 = icmp eq i64 %109, -1
%111 = zext i1 %110 to i32
%112 = call i32 @assert(i32 %111)
ret void
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"CHAR_BIT: %d\0A\00"
@CHAR_BIT = global i32 0
@.str.2 = [14 x i8] c"CHAR_MAX: %d\0A\00"
@CHAR_MAX = global i32 0
@.str.3 = [14 x i8] c"CHAR_MIN: %d\0A\00"
@CHAR_MIN = global i32 0
@.str.4 = [15 x i8] c"SCHAR_MAX: %d\0A\00"
@SCHAR_MAX = global i32 0
@.str.5 = [15 x i8] c"SCHAR_MIN: %d\0A\00"
@SCHAR_MIN = global i32 0
@.str.6 = [15 x i8] c"UCHAR_MAX: %u\0A\00"
@UCHAR_MAX = global i32 0
@.str.7 = [14 x i8] c"SHRT_MAX: %d\0A\00"
@SHRT_MAX = global i32 0
@.str.8 = [14 x i8] c"SHRT_MIN: %d\0A\00"
@SHRT_MIN = global i32 0
@.str.9 = [15 x i8] c"USHRT_MAX: %u\0A\00"
@USHRT_MAX = global i32 0
@.str.10 = [13 x i8] c"INT_MAX: %d\0A\00"
@INT_MAX = global i32 0
@.str.11 = [13 x i8] c"INT_MIN: %d\0A\00"
@INT_MIN = global i32 0
@.str.12 = [14 x i8] c"UINT_MAX: %u\0A\00"
@UINT_MAX = global i32 0
@.str.13 = [15 x i8] c"LONG_MAX: %ld\0A\00"
@LONG_MAX = global i64 0
@.str.14 = [15 x i8] c"LONG_MIN: %ld\0A\00"
@LONG_MIN = global i64 0
@.str.15 = [16 x i8] c"ULONG_MAX: %lu\0A\00"
@ULONG_MAX = global i64 0
@.str.16 = [17 x i8] c"LLONG_MAX: %lld\0A\00"
@LLONG_MAX = global i64 0
@.str.17 = [17 x i8] c"LLONG_MIN: %lld\0A\00"
@LLONG_MIN = global i64 0
@.str.18 = [18 x i8] c"ULLONG_MAX: %llu\0A\00"
@ULLONG_MAX = global i64 0
@str = [12 x i8] c"limits test\00"
define void @limitsTest() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @CHAR_BIT
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @CHAR_MAX
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @CHAR_MIN
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @CHAR_BIT
%9 = icmp eq i32 %8, 8
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = load i32, i32* @CHAR_MAX
%13 = icmp eq i32 %12, 127
%14 = zext i1 %13 to i32
%15 = tail call i32 @assert(i32 %14)
%16 = load i32, i32* @CHAR_MIN
%17 = icmp eq i32 %16, -128
%18 = zext i1 %17 to i32
%19 = tail call i32 @assert(i32 %18)
%20 = load i32, i32* @SCHAR_MAX
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %20)
%22 = load i32, i32* @SCHAR_MIN
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 %22)
%24 = load i32, i32* @UCHAR_MAX
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %24)
%26 = load i32, i32* @SCHAR_MAX
%27 = icmp eq i32 %26, 127
%28 = zext i1 %27 to i32
%29 = tail call i32 @assert(i32 %28)
%30 = load i32, i32* @SCHAR_MIN
%31 = icmp eq i32 %30, -128
%32 = zext i1 %31 to i32
%33 = tail call i32 @assert(i32 %32)
%34 = load i32, i32* @UCHAR_MAX
%35 = icmp eq i32 %34, 255
%36 = zext i1 %35 to i32
%37 = tail call i32 @assert(i32 %36)
%38 = load i32, i32* @SHRT_MAX
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %38)
%40 = load i32, i32* @SHRT_MIN
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %40)
%42 = load i32, i32* @USHRT_MAX
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 %42)
%44 = load i32, i32* @SHRT_MAX
%45 = icmp eq i32 %44, 32767
%46 = zext i1 %45 to i32
%47 = tail call i32 @assert(i32 %46)
%48 = load i32, i32* @SHRT_MIN
%49 = icmp eq i32 %48, -32768
%50 = zext i1 %49 to i32
%51 = tail call i32 @assert(i32 %50)
%52 = load i32, i32* @USHRT_MAX
%53 = icmp eq i32 %52, 65535
%54 = zext i1 %53 to i32
%55 = tail call i32 @assert(i32 %54)
%56 = load i32, i32* @INT_MAX
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i32 %56)
%58 = load i32, i32* @INT_MIN
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 %58)
%60 = load i32, i32* @UINT_MAX
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i32 %60)
%62 = load i32, i32* @INT_MAX
%63 = icmp eq i32 %62, 2147483647
%64 = zext i1 %63 to i32
%65 = tail call i32 @assert(i32 %64)
%66 = load i32, i32* @INT_MIN
%67 = icmp eq i32 %66, -2147483648
%68 = zext i1 %67 to i32
%69 = tail call i32 @assert(i32 %68)
%70 = tail call i32 @assert(i32 0)
%71 = load i64, i64* @LONG_MAX
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0), i64 %71)
%73 = load i64, i64* @LONG_MIN
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), i64 %73)
%75 = load i64, i64* @ULONG_MAX
%76 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i64 %75)
%77 = load i64, i64* @LONG_MAX
%78 = icmp eq i64 %77, 9223372036854775807
%79 = zext i1 %78 to i32
%80 = tail call i32 @assert(i32 %79)
%81 = load i64, i64* @LONG_MIN
%82 = icmp eq i64 %81, -9223372036854775808
%83 = zext i1 %82 to i32
%84 = tail call i32 @assert(i32 %83)
%85 = load i64, i64* @ULONG_MAX
%86 = icmp eq i64 %85, -1
%87 = zext i1 %86 to i32
%88 = tail call i32 @assert(i32 %87)
%89 = load i64, i64* @LLONG_MAX
%90 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.16, i64 0, i64 0), i64 %89)
%91 = load i64, i64* @LLONG_MIN
%92 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.17, i64 0, i64 0), i64 %91)
%93 = load i64, i64* @ULLONG_MAX
%94 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0), i64 %93)
%95 = load i64, i64* @LLONG_MAX
%96 = icmp eq i64 %95, 9223372036854775807
%97 = zext i1 %96 to i32
%98 = tail call i32 @assert(i32 %97)
%99 = load i64, i64* @LLONG_MIN
%100 = icmp eq i64 %99, -9223372036854775808
%101 = zext i1 %100 to i32
%102 = tail call i32 @assert(i32 %101)
%103 = load i64, i64* @ULLONG_MAX
%104 = icmp eq i64 %103, -1
%105 = zext i1 %104 to i32
%106 = tail call i32 @assert(i32 %105)
ret void
}