#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int ssize_t;
typedef int ptrdiff_t;
typedef int intmax_t;

/* Variables and functions */
int INTMAX_MIN;
int INT_MIN;
int /*<<< orphan*/ LC_NUMERIC;
int SIZE_MAX;
int UCHAR_MAX;
int UINT32_MAX;
int UINT64_MAX;
int UINTMAX_MAX;
int UINT_MAX;
int ULLONG_MAX;
int ULONG_MAX;
int USHRT_MAX;
int /*<<< orphan*/ _testfmt(char *, int, char *, char *, int);
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *);
int setlocale(int /*<<< orphan*/, char *);
int main(int argc, char *argv[]) {
  printf("1..2\n");
  assert(setlocale(LC_NUMERIC, "C"));
  assert(UINTMAX_MAX == UINT64_MAX);
  assert(UINT_MAX == UINT32_MAX);
  assert(USHRT_MAX == 0xffff);
  assert(UCHAR_MAX == 0xff);
  _testfmt(("-1"), 76, "(intmax_t)-1", "%jd", (intmax_t)-1);
  _testfmt(("18446744073709551615"), 77, "UINT64_MAX", "%ju", UINT64_MAX);
  _testfmt(("-1"), 79, "(ptrdiff_t)-1", "%td", (ptrdiff_t)-1);
  _testfmt(((SIZE_MAX == UINT64_MAX ? "18446744073709551615" : "4294967295")),
           80, "(size_t)-1", "%tu", (size_t)-1);
  _testfmt(("-1"), 82, "(ssize_t)-1", "%zd", (ssize_t)-1);
  _testfmt(((SIZE_MAX == UINT64_MAX ? "18446744073709551615" : "4294967295")),
           83, "(ssize_t)-1", "%zu", (ssize_t)-1);
  _testfmt(("-1"), 85, "(long)-1", "%ld", (long)-1);
  _testfmt(((ULONG_MAX == UINT64_MAX ? "18446744073709551615" : "4294967295")),
           86, "ULONG_MAX", "%lu", ULONG_MAX);
  _testfmt(("-1"), 88, "(long long)-1", "%lld", (long long)-1);
  _testfmt(((ULONG_MAX == UINT64_MAX ? "18446744073709551615" : "4294967295")),
           89, "ULLONG_MAX", "%lu", ULLONG_MAX);
  _testfmt(("-1"), 91, "-1", "%d", -1);
  _testfmt(("4294967295"), 92, "UINT32_MAX", "%lu", UINT32_MAX);
  _testfmt(("-1"), 94, "-1", "%hd", -1);
  _testfmt(("65535"), 95, "USHRT_MAX", "%hu", USHRT_MAX);
  _testfmt(("-1"), 97, "-1", "%hhd", -1);
  _testfmt(("255"), 98, "UCHAR_MAX", "%hhu", UCHAR_MAX);
  printf("ok 1 - printbasic signed/unsigned\n");
  _testfmt(("-2147483648"), 106, "INT_MIN", "%d", INT_MIN);
  _testfmt(("-9223372036854775808"), 107, "INTMAX_MIN", "%jd", INTMAX_MIN);
  printf("ok 2 - printbasic INT_MIN\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e3f(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1050 <setlocale@plt>
mov    %eax,%edi
call   1040 <assert@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%eax
mov    0x2df2(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2e14(%rip),%rax
mov    (%rax),%eax
mov    0x2e4b(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2dfd(%rip),%rax
cmpl   $0xffff,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2e0b(%rip),%rax
cmpl   $0xff,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xeac(%rip),%rdi
mov    $0x4c,%esi
lea    0xe05(%rip),%rdx
lea    0xe0b(%rip),%rcx
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
mov    0x2d64(%rip),%rax
mov    (%rax),%r8d
lea    0xdf3(%rip),%rdi
mov    $0x4d,%esi
lea    0xdfc(%rip),%rdx
lea    0xe00(%rip),%rcx
call   1060 <_testfmt@plt>
lea    0xe5e(%rip),%rdi
mov    $0x4f,%esi
lea    0xdec(%rip),%rdx
lea    0xdf3(%rip),%rcx
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
mov    0x2d26(%rip),%rax
mov    (%rax),%ecx
mov    0x2d0d(%rip),%rax
mov    (%rax),%edx
lea    0xdd3(%rip),%rdi
lea    0xd96(%rip),%rax
cmp    %edx,%ecx
cmove  %rax,%rdi
mov    $0x50,%esi
lea    0xdc5(%rip),%rdx
lea    0xdc9(%rip),%rcx
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
lea    0xdf5(%rip),%rdi
mov    $0x52,%esi
lea    0xdaf(%rip),%rdx
lea    0xdb4(%rip),%rcx
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
mov    0x2cbd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ca4(%rip),%rax
mov    (%rax),%edx
lea    0xd6a(%rip),%rdi
lea    0xd2d(%rip),%rax
cmp    %edx,%ecx
cmove  %rax,%rdi
mov    $0x53,%esi
lea    0xd6b(%rip),%rdx
lea    0xd74(%rip),%rcx
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
lea    0xd8c(%rip),%rdi
mov    $0x55,%esi
lea    0xd5a(%rip),%rdx
lea    0xd5c(%rip),%rcx
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
mov    0x2c4c(%rip),%rax
mov    (%rax),%ecx
mov    0x2c3b(%rip),%rax
mov    (%rax),%edx
lea    0xd01(%rip),%rdi
lea    0xcc4(%rip),%rax
cmp    %edx,%ecx
cmove  %rax,%rdi
mov    0x2c26(%rip),%rax
mov    (%rax),%r8d
mov    $0x56,%esi
lea    0xd19(%rip),%rdx
lea    0xd1c(%rip),%rcx
call   1060 <_testfmt@plt>
lea    0xd1f(%rip),%rdi
mov    $0x58,%esi
lea    0xd08(%rip),%rdx
lea    0xd0f(%rip),%rcx
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
mov    0x2bdf(%rip),%rax
mov    (%rax),%ecx
mov    0x2bce(%rip),%rax
mov    (%rax),%edx
lea    0xc94(%rip),%rdi
lea    0xc57(%rip),%rax
cmp    %edx,%ecx
cmove  %rax,%rdi
mov    0x2bf9(%rip),%rax
mov    (%rax),%r8d
mov    $0x59,%esi
lea    0xccd(%rip),%rdx
lea    0xcaf(%rip),%rcx
call   1060 <_testfmt@plt>
lea    0xcb2(%rip),%rdx
mov    $0x5b,%esi
lea    0xcb9(%rip),%rcx
mov    $0xffffffff,%r8d
mov    %rdx,%rdi
call   1060 <_testfmt@plt>
mov    0x2be6(%rip),%rax
mov    (%rax),%r8d
lea    0xc33(%rip),%rdi
mov    $0x5c,%esi
lea    0xc91(%rip),%rdx
lea    0xc65(%rip),%rcx
call   1060 <_testfmt@plt>
lea    0xc68(%rip),%rdx
mov    $0x5e,%esi
lea    0xc7d(%rip),%rcx
mov    $0xffffffff,%r8d
mov    %rdx,%rdi
call   1060 <_testfmt@plt>
mov    0x2b64(%rip),%rax
mov    (%rax),%r8d
lea    0xc62(%rip),%rdi
mov    $0x5f,%esi
lea    0xc5c(%rip),%rdx
lea    0xc5f(%rip),%rcx
call   1060 <_testfmt@plt>
lea    0xc1e(%rip),%rdx
mov    $0x61,%esi
lea    0xc4b(%rip),%rcx
mov    $0xffffffff,%r8d
mov    %rdx,%rdi
call   1060 <_testfmt@plt>
mov    0x2b42(%rip),%rax
mov    (%rax),%r8d
lea    0xc31(%rip),%rdi
mov    $0x62,%esi
lea    0xc29(%rip),%rdx
lea    0xc2c(%rip),%rcx
call   1060 <_testfmt@plt>
lea    0xc25(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ad5(%rip),%rax
mov    (%rax),%r8d
lea    0xc32(%rip),%rdi
mov    $0x6a,%esi
lea    0xc32(%rip),%rdx
lea    0xbbe(%rip),%rcx
call   1060 <_testfmt@plt>
mov    0x2acc(%rip),%rax
mov    (%rax),%r8d
lea    0xc1d(%rip),%rdi
mov    $0x6b,%esi
lea    0xc26(%rip),%rdx
lea    0xaf4(%rip),%rcx
call   1060 <_testfmt@plt>
lea    0xc1e(%rip),%rdi
call   1030 <printf@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
lea    0xfc8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e4a(%rip),%rax
mov    (%rax),%edi
lea    0xe99(%rip),%rsi
call   1050 <setlocale@plt>
mov    %eax,%edi
call   1040 <assert@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%eax
mov    0x2dfd(%rip),%r14
xor    %edi,%edi
cmp    (%r14),%eax
sete   %dil
call   1040 <assert@plt>
mov    0x2e20(%rip),%rax
mov    (%rax),%eax
mov    0x2e57(%rip),%rcx
xor    %edi,%edi
cmp    (%rcx),%eax
sete   %dil
call   1040 <assert@plt>
mov    0x2e0b(%rip),%rax
xor    %edi,%edi
cmpl   $0xffff,(%rax)
sete   %dil
call   1040 <assert@plt>
mov    0x2e1b(%rip),%rax
xor    %edi,%edi
cmpl   $0xff,(%rax)
sete   %dil
call   1040 <assert@plt>
lea    0xeb8(%rip),%r15
lea    0xe16(%rip),%rdx
lea    0xe1c(%rip),%rcx
mov    %r15,%rdi
mov    $0x4c,%esi
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
mov    (%r14),%r8d
lea    0xe03(%rip),%rbx
lea    0xe11(%rip),%rdx
lea    0xe15(%rip),%rcx
mov    %rbx,%rdi
mov    $0x4d,%esi
call   1060 <_testfmt@plt>
lea    0xe05(%rip),%rdx
lea    0xe0c(%rip),%rcx
mov    %r15,%rdi
mov    $0x4f,%esi
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
mov    0x2d3d(%rip),%rbp
mov    0x0(%rbp),%eax
cmp    (%r14),%eax
lea    0xde9(%rip),%r12
mov    %r12,%rdi
cmove  %rbx,%rdi
lea    0xde6(%rip),%rdx
lea    0xdea(%rip),%rcx
mov    $0x50,%esi
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
lea    0xdd7(%rip),%r13
lea    0xddc(%rip),%rcx
mov    %r15,%rdi
mov    $0x52,%esi
mov    %r13,%rdx
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
mov    0x0(%rbp),%eax
cmp    (%r14),%eax
mov    %r12,%rdi
cmove  %rbx,%rdi
lea    0xdb6(%rip),%rcx
mov    $0x53,%esi
mov    %r13,%rdx
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
lea    0xda0(%rip),%rdx
lea    0xda2(%rip),%rcx
mov    %r15,%rdi
mov    $0x55,%esi
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
mov    0x2c90(%rip),%rbp
mov    0x0(%rbp),%r8d
cmp    (%r14),%r8d
mov    %r12,%rdi
cmove  %rbx,%rdi
lea    0xd77(%rip),%rdx
lea    0xd7a(%rip),%r13
mov    $0x56,%esi
mov    %r13,%rcx
call   1060 <_testfmt@plt>
lea    0xd6a(%rip),%rdx
lea    0xd71(%rip),%rcx
mov    %r15,%rdi
mov    $0x58,%esi
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
mov    0x0(%rbp),%eax
cmp    (%r14),%eax
cmovne %r12,%rbx
mov    0x2c75(%rip),%rax
mov    (%rax),%r8d
lea    0xd48(%rip),%rdx
mov    %rbx,%rdi
mov    $0x59,%esi
mov    %r13,%rcx
call   1060 <_testfmt@plt>
lea    0xd3c(%rip),%rbx
mov    %r15,%rdi
mov    $0x5b,%esi
mov    %r15,%rdx
mov    %rbx,%rcx
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
mov    0x2c64(%rip),%rax
mov    (%rax),%r8d
lea    0xd15(%rip),%rdx
mov    %r12,%rdi
mov    $0x5c,%esi
mov    %r13,%rcx
call   1060 <_testfmt@plt>
lea    0xd09(%rip),%rcx
mov    %r15,%rdi
mov    $0x5e,%esi
mov    %r15,%rdx
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
mov    0x2bee(%rip),%rax
mov    (%rax),%r8d
lea    0xce6(%rip),%rdi
lea    0xce5(%rip),%rdx
lea    0xce8(%rip),%rcx
mov    $0x5f,%esi
call   1060 <_testfmt@plt>
lea    0xcdb(%rip),%rcx
mov    %r15,%rdi
mov    $0x61,%esi
mov    %r15,%rdx
mov    $0xffffffff,%r8d
call   1060 <_testfmt@plt>
mov    0x2bd0(%rip),%rax
mov    (%rax),%r8d
lea    0xcb9(%rip),%rdi
lea    0xcb6(%rip),%rdx
lea    0xcb9(%rip),%rcx
mov    $0x62,%esi
call   1060 <_testfmt@plt>
lea    0xcde(%rip),%rdi
call   1030 <puts@plt>
mov    0x2b63(%rip),%rax
mov    (%rax),%r8d
lea    0xc97(%rip),%rdi
lea    0xcf5(%rip),%rdx
mov    $0x6a,%esi
mov    %rbx,%rcx
call   1060 <_testfmt@plt>
mov    0x2b5e(%rip),%rax
mov    (%rax),%r8d
lea    0xc7e(%rip),%rdi
lea    0xc8c(%rip),%rdx
mov    $0x6b,%esi
lea    0xb80(%rip),%rcx
call   1060 <_testfmt@plt>
lea    0xca6(%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 = [6 x i8] c"1..2\0A\00"
@LC_NUMERIC = global i32 0
@.str.1 = [2 x i8] c"C\00"
@UINTMAX_MAX = global i32 0
@UINT64_MAX = global i32 0
@UINT_MAX = global i32 0
@UINT32_MAX = global i32 0
@USHRT_MAX = global i32 0
@UCHAR_MAX = global i32 0
@.str.2 = [3 x i8] c"-1\00"
@.str.3 = [13 x i8] c"(intmax_t)-1\00"
@.str.4 = [4 x i8] c"%jd\00"
@.str.5 = [21 x i8] c"18446744073709551615\00"
@.str.6 = [11 x i8] c"UINT64_MAX\00"
@.str.7 = [4 x i8] c"%ju\00"
@.str.8 = [14 x i8] c"(ptrdiff_t)-1\00"
@.str.9 = [4 x i8] c"%td\00"
@SIZE_MAX = global i32 0
@.str.10 = [11 x i8] c"4294967295\00"
@.str.11 = [11 x i8] c"(size_t)-1\00"
@.str.12 = [4 x i8] c"%tu\00"
@.str.13 = [12 x i8] c"(ssize_t)-1\00"
@.str.14 = [4 x i8] c"%zd\00"
@.str.15 = [4 x i8] c"%zu\00"
@.str.16 = [9 x i8] c"(long)-1\00"
@.str.17 = [4 x i8] c"%ld\00"
@ULONG_MAX = global i32 0
@.str.18 = [10 x i8] c"ULONG_MAX\00"
@.str.19 = [4 x i8] c"%lu\00"
@.str.20 = [14 x i8] c"(long long)-1\00"
@.str.21 = [5 x i8] c"%lld\00"
@.str.22 = [11 x i8] c"ULLONG_MAX\00"
@ULLONG_MAX = global i32 0
@.str.23 = [3 x i8] c"%d\00"
@.str.24 = [11 x i8] c"UINT32_MAX\00"
@.str.25 = [4 x i8] c"%hd\00"
@.str.26 = [6 x i8] c"65535\00"
@.str.27 = [10 x i8] c"USHRT_MAX\00"
@.str.28 = [4 x i8] c"%hu\00"
@.str.29 = [5 x i8] c"%hhd\00"
@.str.30 = [4 x i8] c"255\00"
@.str.31 = [10 x i8] c"UCHAR_MAX\00"
@.str.32 = [5 x i8] c"%hhu\00"
@.str.33 = [35 x i8] c"ok 1 - printbasic signed/unsigned\0A\00"
@.str.34 = [12 x i8] c"-2147483648\00"
@.str.35 = [8 x i8] c"INT_MIN\00"
@INT_MIN = global i32 0
@.str.36 = [21 x i8] c"-9223372036854775808\00"
@.str.37 = [11 x i8] c"INTMAX_MIN\00"
@INTMAX_MIN = global i32 0
@.str.38 = [27 x i8] c"ok 2 - printbasic INT_MIN\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @LC_NUMERIC
%8 = call i32 @setlocale(i32 %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @assert(i32 %8)
%10 = load i32, i32* @UINTMAX_MAX
%11 = load i32, i32* @UINT64_MAX
%12 = icmp eq i32 %10, %11
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i32, i32* @UINT_MAX
%16 = load i32, i32* @UINT32_MAX
%17 = icmp eq i32 %15, %16
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = load i32, i32* @USHRT_MAX
%21 = icmp eq i32 %20, 65535
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
%24 = load i32, i32* @UCHAR_MAX
%25 = icmp eq i32 %24, 255
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
%28 = call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 76, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 -1)
%29 = load i32, i32* @UINT64_MAX
%30 = call i32 @_testfmt(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32 77, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 %29)
%31 = call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 79, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 -1)
%32 = load i32, i32* @SIZE_MAX
%33 = load i32, i32* @UINT64_MAX
%34 = icmp eq i32 %32, %33
%35 = zext i1 %34 to i64
%36 = select i1 %34, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0)
%37 = call i32 @_testfmt(i8* %36, i32 80, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i32 -1)
%38 = call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 82, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 -1)
%39 = load i32, i32* @SIZE_MAX
%40 = load i32, i32* @UINT64_MAX
%41 = icmp eq i32 %39, %40
%42 = zext i1 %41 to i64
%43 = select i1 %41, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0)
%44 = call i32 @_testfmt(i8* %43, i32 83, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i32 -1)
%45 = call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 85, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0), i32 -1)
%46 = load i32, i32* @ULONG_MAX
%47 = load i32, i32* @UINT64_MAX
%48 = icmp eq i32 %46, %47
%49 = zext i1 %48 to i64
%50 = select i1 %48, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0)
%51 = load i32, i32* @ULONG_MAX
%52 = call i32 @_testfmt(i8* %50, i32 86, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i32 %51)
%53 = call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 88, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i32 -1)
%54 = load i32, i32* @ULONG_MAX
%55 = load i32, i32* @UINT64_MAX
%56 = icmp eq i32 %54, %55
%57 = zext i1 %56 to i64
%58 = select i1 %56, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0)
%59 = load i32, i32* @ULLONG_MAX
%60 = call i32 @_testfmt(i8* %58, i32 89, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i32 %59)
%61 = call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 91, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0), i32 -1)
%62 = load i32, i32* @UINT32_MAX
%63 = call i32 @_testfmt(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 92, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i32 %62)
%64 = call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 94, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.25, i64 0, i64 0), i32 -1)
%65 = load i32, i32* @USHRT_MAX
%66 = call i32 @_testfmt(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.26, i64 0, i64 0), i32 95, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.27, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0), i32 %65)
%67 = call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 97, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.29, i64 0, i64 0), i32 -1)
%68 = load i32, i32* @UCHAR_MAX
%69 = call i32 @_testfmt(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.30, i64 0, i64 0), i32 98, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.31, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.32, i64 0, i64 0), i32 %68)
%70 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.33, i64 0, i64 0))
%71 = load i32, i32* @INT_MIN
%72 = call i32 @_testfmt(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.34, i64 0, i64 0), i32 106, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.35, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0), i32 %71)
%73 = load i32, i32* @INTMAX_MIN
%74 = call i32 @_testfmt(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.36, i64 0, i64 0), i32 107, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.37, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %73)
%75 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.38, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@LC_NUMERIC = global i32 0
@.str.1 = [2 x i8] c"C\00"
@UINTMAX_MAX = global i32 0
@UINT64_MAX = global i32 0
@UINT_MAX = global i32 0
@UINT32_MAX = global i32 0
@USHRT_MAX = global i32 0
@UCHAR_MAX = global i32 0
@.str.2 = [3 x i8] c"-1\00"
@.str.3 = [13 x i8] c"(intmax_t)-1\00"
@.str.4 = [4 x i8] c"%jd\00"
@.str.5 = [21 x i8] c"18446744073709551615\00"
@.str.6 = [11 x i8] c"UINT64_MAX\00"
@.str.7 = [4 x i8] c"%ju\00"
@.str.8 = [14 x i8] c"(ptrdiff_t)-1\00"
@.str.9 = [4 x i8] c"%td\00"
@SIZE_MAX = global i32 0
@.str.10 = [11 x i8] c"4294967295\00"
@.str.11 = [11 x i8] c"(size_t)-1\00"
@.str.12 = [4 x i8] c"%tu\00"
@.str.13 = [12 x i8] c"(ssize_t)-1\00"
@.str.14 = [4 x i8] c"%zd\00"
@.str.15 = [4 x i8] c"%zu\00"
@.str.16 = [9 x i8] c"(long)-1\00"
@.str.17 = [4 x i8] c"%ld\00"
@ULONG_MAX = global i32 0
@.str.18 = [10 x i8] c"ULONG_MAX\00"
@.str.19 = [4 x i8] c"%lu\00"
@.str.20 = [14 x i8] c"(long long)-1\00"
@.str.21 = [5 x i8] c"%lld\00"
@.str.22 = [11 x i8] c"ULLONG_MAX\00"
@ULLONG_MAX = global i32 0
@.str.23 = [3 x i8] c"%d\00"
@.str.24 = [11 x i8] c"UINT32_MAX\00"
@.str.25 = [4 x i8] c"%hd\00"
@.str.26 = [6 x i8] c"65535\00"
@.str.27 = [10 x i8] c"USHRT_MAX\00"
@.str.28 = [4 x i8] c"%hu\00"
@.str.29 = [5 x i8] c"%hhd\00"
@.str.30 = [4 x i8] c"255\00"
@.str.31 = [10 x i8] c"UCHAR_MAX\00"
@.str.32 = [5 x i8] c"%hhu\00"
@.str.34 = [12 x i8] c"-2147483648\00"
@.str.35 = [8 x i8] c"INT_MIN\00"
@INT_MIN = global i32 0
@.str.36 = [21 x i8] c"-9223372036854775808\00"
@.str.37 = [11 x i8] c"INTMAX_MIN\00"
@INTMAX_MIN = global i32 0
@str = [5 x i8] c"1..2\00"
@str.39 = [34 x i8] c"ok 1 - printbasic signed/unsigned\00"
@str.40 = [26 x i8] c"ok 2 - printbasic INT_MIN\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @LC_NUMERIC
%5 = tail call i32 @setlocale(i32 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @assert(i32 %5)
%7 = load i32, i32* @UINTMAX_MAX
%8 = load i32, i32* @UINT64_MAX
%9 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = load i32, i32* @UINT_MAX
%13 = load i32, i32* @UINT32_MAX
%14 = icmp eq i32 %12, %13
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = load i32, i32* @USHRT_MAX
%18 = icmp eq i32 %17, 65535
%19 = zext i1 %18 to i32
%20 = tail call i32 @assert(i32 %19)
%21 = load i32, i32* @UCHAR_MAX
%22 = icmp eq i32 %21, 255
%23 = zext i1 %22 to i32
%24 = tail call i32 @assert(i32 %23)
%25 = tail call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 76, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 -1)
%26 = load i32, i32* @UINT64_MAX
%27 = tail call i32 @_testfmt(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32 77, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 %26)
%28 = tail call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 79, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 -1)
%29 = load i32, i32* @SIZE_MAX
%30 = load i32, i32* @UINT64_MAX
%31 = icmp eq i32 %29, %30
%32 = select i1 %31, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0)
%33 = tail call i32 @_testfmt(i8* %32, i32 80, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i32 -1)
%34 = tail call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 82, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 -1)
%35 = load i32, i32* @SIZE_MAX
%36 = load i32, i32* @UINT64_MAX
%37 = icmp eq i32 %35, %36
%38 = select i1 %37, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0)
%39 = tail call i32 @_testfmt(i8* %38, i32 83, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i32 -1)
%40 = tail call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 85, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0), i32 -1)
%41 = load i32, i32* @ULONG_MAX
%42 = load i32, i32* @UINT64_MAX
%43 = icmp eq i32 %41, %42
%44 = select i1 %43, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0)
%45 = tail call i32 @_testfmt(i8* %44, i32 86, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i32 %41)
%46 = tail call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 88, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i32 -1)
%47 = load i32, i32* @ULONG_MAX
%48 = load i32, i32* @UINT64_MAX
%49 = icmp eq i32 %47, %48
%50 = select i1 %49, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0)
%51 = load i32, i32* @ULLONG_MAX
%52 = tail call i32 @_testfmt(i8* %50, i32 89, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i32 %51)
%53 = tail call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 91, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0), i32 -1)
%54 = load i32, i32* @UINT32_MAX
%55 = tail call i32 @_testfmt(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 92, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i32 %54)
%56 = tail call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 94, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.25, i64 0, i64 0), i32 -1)
%57 = load i32, i32* @USHRT_MAX
%58 = tail call i32 @_testfmt(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.26, i64 0, i64 0), i32 95, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.27, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0), i32 %57)
%59 = tail call i32 @_testfmt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 97, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.29, i64 0, i64 0), i32 -1)
%60 = load i32, i32* @UCHAR_MAX
%61 = tail call i32 @_testfmt(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.30, i64 0, i64 0), i32 98, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.31, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.32, i64 0, i64 0), i32 %60)
%62 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.39, i64 0, i64 0))
%63 = load i32, i32* @INT_MIN
%64 = tail call i32 @_testfmt(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.34, i64 0, i64 0), i32 106, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.35, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0), i32 %63)
%65 = load i32, i32* @INTMAX_MIN
%66 = tail call i32 @_testfmt(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.36, i64 0, i64 0), i32 107, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.37, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %65)
%67 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.40, i64 0, i64 0))
ret i32 0
}