#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_MAX;
int CHAR_MIN;
int INT_MAX;
int INT_MIN;
unsigned long LONG_MAX;
unsigned long LONG_MIN;
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*/ printf(char *, ...);
int main() {
  char baseChar;
  unsigned char uCharPrev, uCharNext;
  baseChar = 0;
  printf("Maxes and Mins from standard headers:\n");
  printf("\nchar\n");
  printf("Max of char: %d\n", CHAR_MAX);
  printf("Min of char: %d\n", CHAR_MIN);
  printf("Max of signed char: %d\n", SCHAR_MAX);
  printf("Min of signed char: %d\n", SCHAR_MIN);
  printf("Max of unsigned char: %u\n", UCHAR_MAX);
  printf("\nshort\n");
  printf("Max of short: %d\n", SHRT_MAX);
  printf("Min of short: %d\n", SHRT_MIN);
  printf("Max of unsigned short: %u\n", USHRT_MAX);
  printf("\nint\n");
  printf("Max of int: %d\n", INT_MAX);
  printf("Min of int: %d\n", INT_MIN);
  printf("Max of unsigned int: %u\n", UINT_MAX);
  printf("\nlong\n");
  printf("Max of long: %ld\n", LONG_MAX);
  printf("Min of long: %ld\n", LONG_MIN);
  printf("Max of unsigned long: %lu\n", ULONG_MAX);
  printf("\ncomputed char\n");
  while ((baseChar + 1) >= 0) {
    ++baseChar;
  }
  printf("Computed min char value: %d\n", baseChar);
  baseChar = 0;
  while ((baseChar - 1) < 0) {
    --baseChar;
  }
  printf("Computed max char value: %d\n", baseChar);
  uCharNext = 1;
  while (uCharNext != 0) {
    uCharPrev = uCharNext;
    ++uCharNext;
  }
  printf("Computed max unsigned char: %u\n", uCharPrev);
  printf("\ncomputed short\n");
  short baseShort;
  baseShort = 0;
  while ((baseShort - 1) < 0) {
    baseShort--;
  }
  printf("Computed max of signed short: %d\n", baseShort);
  baseShort = 0;
  while ((baseShort + 1) > 0) {
    baseShort++;
  }
  printf("Computed min of signed short: %d\n", baseShort);
  unsigned short uShortNext, uShortPrev;
  uShortNext = uShortPrev = 1;
  while (uShortNext != 0) {
    uShortPrev = uShortNext;
    uShortNext++;
  }
  printf("Computed max of unsigned short: %u\n", uShortPrev);
  printf("\ncomputed long\n");
  long baseLongPrev, baseLongNext, addition;
  baseLongPrev = baseLongNext = -1;
  addition = 100000000000000000;
  while (baseLongNext < 0) {
    baseLongNext = baseLongNext - addition;
    if (baseLongNext > 0) {
      if (addition != 1) {
        baseLongNext = baseLongPrev;
        if (addition >= 10) {
          addition = addition / 10;
        }
      }
    } else {
      baseLongPrev = baseLongNext;
    }
  }
  printf("Computed max of signed long: %ld\n", baseLongNext);
  printf("Computed min of signed long: %ld\n", baseLongPrev);
  unsigned long uLongPrev, uLongNext;
  uLongPrev = uLongNext = 1;
  addition = 100000000000000000;
  while (uLongNext != 0) {
    uLongNext = uLongNext + addition;
    if (uLongNext == 0 || uLongNext < uLongPrev) {
      if (addition != 1) {
        uLongNext = uLongPrev;
        if (addition >= 10) {
          addition = addition / 10;
        }
      }
    } else {
      uLongPrev = uLongNext;
    }
  }
  printf("Computed max of unsigned long: %lu\n", uLongPrev);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%esi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e24(%rip),%rax
mov    (%rax),%esi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e15(%rip),%rax
mov    (%rax),%esi
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%esi
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2db9(%rip),%rax
mov    (%rax),%esi
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2daa(%rip),%rax
mov    (%rax),%esi
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2ddb(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dae(%rip),%rax
mov    (%rax),%esi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d7f(%rip),%rax
mov    (%rax),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d78(%rip),%rax
mov    (%rax),%esi
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d23(%rip),%rax
mov    (%rax),%rsi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d33(%rip),%rax
mov    (%rax),%rsi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2cd3(%rip),%rax
mov    (%rax),%rsi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
add    $0x1,%eax
cmp    $0x0,%eax
jl     12d9 <main+0x1c9>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    12bc <main+0x1ac>
movsbl -0x5(%rbp),%esi
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movb   $0x0,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jge    130c <main+0x1fc>
mov    -0x5(%rbp),%al
add    $0xff,%al
mov    %al,-0x5(%rbp)
jmp    12ef <main+0x1df>
movsbl -0x5(%rbp),%esi
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movb   $0x1,-0x7(%rbp)
movzbl -0x7(%rbp),%eax
cmp    $0x0,%eax
je     1342 <main+0x232>
mov    -0x7(%rbp),%al
mov    %al,-0x6(%rbp)
mov    -0x7(%rbp),%al
add    $0x1,%al
mov    %al,-0x7(%rbp)
jmp    1322 <main+0x212>
movzbl -0x6(%rbp),%esi
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movw   $0x0,-0xa(%rbp)
movswl -0xa(%rbp),%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jge    1389 <main+0x279>
mov    -0xa(%rbp),%ax
add    $0xffff,%ax
mov    %ax,-0xa(%rbp)
jmp    1368 <main+0x258>
movswl -0xa(%rbp),%esi
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movw   $0x0,-0xa(%rbp)
movswl -0xa(%rbp),%eax
add    $0x1,%eax
cmp    $0x0,%eax
jle    13c2 <main+0x2b2>
mov    -0xa(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xa(%rbp)
jmp    13a1 <main+0x291>
movswl -0xa(%rbp),%esi
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movw   $0x1,-0xe(%rbp)
movw   $0x1,-0xc(%rbp)
movzwl -0xc(%rbp),%eax
cmp    $0x0,%eax
je     1406 <main+0x2f6>
mov    -0xc(%rbp),%ax
mov    %ax,-0xe(%rbp)
mov    -0xc(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xc(%rbp)
jmp    13e0 <main+0x2d0>
movzwl -0xe(%rbp),%esi
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0xffffffffffffffff,-0x20(%rbp)
ff
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
movabs $0x16345785d8a0000,%rax
45 63 01
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x20(%rbp)
jge    14ad <main+0x39d>
mov    -0x20(%rbp),%rax
sub    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jle    14a0 <main+0x390>
cmpq   $0x1,-0x28(%rbp)
je     149b <main+0x38b>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0xa,-0x28(%rbp)
jl     1496 <main+0x386>
mov    -0x28(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x28(%rbp)
jmp    149b <main+0x38b>
jmp    14a8 <main+0x398>
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1444 <main+0x334>
mov    -0x20(%rbp),%rsi
lea    0xda1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x1,-0x38(%rbp)
movq   $0x1,-0x30(%rbp)
movabs $0x16345785d8a0000,%rax
45 63 01
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     1566 <main+0x456>
mov    -0x38(%rbp),%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     151f <main+0x40f>
mov    -0x38(%rbp),%rax
cmp    -0x30(%rbp),%rax
jae    1559 <main+0x449>
cmpq   $0x1,-0x28(%rbp)
je     1554 <main+0x444>
mov    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
cmpq   $0xa,-0x28(%rbp)
jl     154f <main+0x43f>
mov    -0x28(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x28(%rbp)
jmp    1554 <main+0x444>
jmp    1561 <main+0x451>
mov    -0x38(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    14ef <main+0x3df>
mov    -0x30(%rbp),%rsi
lea    0xd2c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0x1121(%rip),%rdi
call   1030 <puts@plt>
lea    0x113b(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
lea    0xeb3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%esi
lea    0xead(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e26(%rip),%rax
mov    (%rax),%esi
lea    0xea7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e17(%rip),%rax
mov    (%rax),%esi
lea    0xea8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e50(%rip),%rax
mov    (%rax),%esi
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10c2(%rip),%rdi
call   1030 <puts@plt>
mov    0x2dbd(%rip),%rax
mov    (%rax),%esi
lea    0xea0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2dae(%rip),%rax
mov    (%rax),%esi
lea    0xe9b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2ddf(%rip),%rax
mov    (%rax),%esi
lea    0xe96(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1078(%rip),%rdi
call   1030 <puts@plt>
mov    0x2db4(%rip),%rax
mov    (%rax),%esi
lea    0xe8e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d85(%rip),%rax
mov    (%rax),%esi
lea    0xe87(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d7e(%rip),%rax
mov    (%rax),%esi
lea    0xe80(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x102c(%rip),%rdi
call   1030 <puts@plt>
mov    0x2d2b(%rip),%rax
mov    (%rax),%rsi
lea    0xe75(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d3b(%rip),%rax
mov    (%rax),%rsi
lea    0xe6f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2cdb(%rip),%rax
mov    (%rax),%rsi
lea    0xe69(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfde(%rip),%rdi
call   1030 <puts@plt>
lea    0xe6a(%rip),%rdi
mov    $0xffffff80,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%al
nopw   0x0(%rax,%rax,1)
add    $0xff,%al
test   %al,%al
jle    12d0 <main+0x1b0>
movzbl %al,%esi
lea    0xe60(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%esi
nopl   0x0(%rax)
add    $0xfffffff0,%esi
cmp    $0x1,%sil
jne    12f0 <main+0x1d0>
neg    %esi
lea    0xe5b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf8a(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%ax
nopl   0x0(%rax)
add    $0xffffffff,%eax
test   %ax,%ax
jle    1320 <main+0x200>
movzwl %ax,%esi
lea    0xe4b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe5f(%rip),%rdi
mov    $0xffff8000,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0xfffffff0,%esi
cmp    $0x1,%si
jne    1360 <main+0x240>
movabs $0x16345785d8a0000,%r14
45 63 01
neg    %esi
lea    0xe45(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf20(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffffffffffff,%rbx
movabs $0xcccccccccccccccd,%r15
cc cc cc
mov    %r14,%rax
jmp    13bb <main+0x29b>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rsi,%rbx
mov    %rbx,%rsi
test   %rbx,%rbx
jns    13db <main+0x2bb>
mov    %rbx,%rsi
sub    %rax,%rsi
jle    13b0 <main+0x290>
cmp    $0x1,%rax
je     13db <main+0x2bb>
cmp    $0xa,%rax
jl     13b3 <main+0x293>
mul    %r15
mov    %rdx,%rax
shr    $0x3,%rax
jmp    13b3 <main+0x293>
lea    0xe03(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe17(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%eax
mov    $0x1,%esi
jmp    141b <main+0x2fb>
cs nopw 0x0(%rax,%rax,1)
mov    $0x1,%r14d
test   %rax,%rax
je     144e <main+0x32e>
add    %r14,%rax
je     1430 <main+0x310>
cmp    %rsi,%rax
jb     1430 <main+0x310>
mov    %rax,%rsi
jmp    1416 <main+0x2f6>
nopw   0x0(%rax,%rax,1)
cmp    $0x1,%r14
je     1410 <main+0x2f0>
cmp    $0xa,%r14
jl     1449 <main+0x329>
mov    %r14,%rax
mul    %r15
mov    %rdx,%r14
shr    $0x3,%r14
mov    %rsi,%rax
jmp    1416 <main+0x2f6>
lea    0xdd4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Maxes and Mins from standard headers:\0A\00"
@.str.1 = [7 x i8] c"\0Achar\0A\00"
@.str.2 = [17 x i8] c"Max of char: %d\0A\00"
@CHAR_MAX = global i32 0
@.str.3 = [17 x i8] c"Min of char: %d\0A\00"
@CHAR_MIN = global i32 0
@.str.4 = [24 x i8] c"Max of signed char: %d\0A\00"
@SCHAR_MAX = global i32 0
@.str.5 = [24 x i8] c"Min of signed char: %d\0A\00"
@SCHAR_MIN = global i32 0
@.str.6 = [26 x i8] c"Max of unsigned char: %u\0A\00"
@UCHAR_MAX = global i32 0
@.str.7 = [8 x i8] c"\0Ashort\0A\00"
@.str.8 = [18 x i8] c"Max of short: %d\0A\00"
@SHRT_MAX = global i32 0
@.str.9 = [18 x i8] c"Min of short: %d\0A\00"
@SHRT_MIN = global i32 0
@.str.10 = [27 x i8] c"Max of unsigned short: %u\0A\00"
@USHRT_MAX = global i32 0
@.str.11 = [6 x i8] c"\0Aint\0A\00"
@.str.12 = [16 x i8] c"Max of int: %d\0A\00"
@INT_MAX = global i32 0
@.str.13 = [16 x i8] c"Min of int: %d\0A\00"
@INT_MIN = global i32 0
@.str.14 = [25 x i8] c"Max of unsigned int: %u\0A\00"
@UINT_MAX = global i32 0
@.str.15 = [7 x i8] c"\0Along\0A\00"
@.str.16 = [18 x i8] c"Max of long: %ld\0A\00"
@LONG_MAX = global i64 0
@.str.17 = [18 x i8] c"Min of long: %ld\0A\00"
@LONG_MIN = global i64 0
@.str.18 = [27 x i8] c"Max of unsigned long: %lu\0A\00"
@ULONG_MAX = global i64 0
@.str.19 = [16 x i8] c"\0Acomputed char\0A\00"
@.str.20 = [29 x i8] c"Computed min char value: %d\0A\00"
@.str.21 = [29 x i8] c"Computed max char value: %d\0A\00"
@.str.22 = [32 x i8] c"Computed max unsigned char: %u\0A\00"
@.str.23 = [17 x i8] c"\0Acomputed short\0A\00"
@.str.24 = [34 x i8] c"Computed max of signed short: %d\0A\00"
@.str.25 = [34 x i8] c"Computed min of signed short: %d\0A\00"
@.str.26 = [36 x i8] c"Computed max of unsigned short: %u\0A\00"
@.str.27 = [16 x i8] c"\0Acomputed long\0A\00"
@.str.28 = [34 x i8] c"Computed max of signed long: %ld\0A\00"
@.str.29 = [34 x i8] c"Computed min of signed long: %ld\0A\00"
@.str.30 = [36 x i8] c"Computed max of unsigned long: %lu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i16
%6 = alloca i16
%7 = alloca i16
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
store i32 0, i32* %1
store i8 0, i8* %2
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%15 = load i32, i32* @CHAR_MAX
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %15)
%17 = load i32, i32* @CHAR_MIN
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%19 = load i32, i32* @SCHAR_MAX
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %19)
%21 = load i32, i32* @SCHAR_MIN
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %21)
%23 = load i32, i32* @UCHAR_MAX
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), i32 %23)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%26 = load i32, i32* @SHRT_MAX
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %26)
%28 = load i32, i32* @SHRT_MIN
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i32 %28)
%30 = load i32, i32* @USHRT_MAX
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0), i32 %30)
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%33 = load i32, i32* @INT_MAX
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i32 %33)
%35 = load i32, i32* @INT_MIN
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i32 %35)
%37 = load i32, i32* @UINT_MAX
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0), i32 %37)
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
%40 = load i64, i64* @LONG_MAX
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.16, i64 0, i64 0), i64 %40)
%42 = load i64, i64* @LONG_MIN
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0), i64 %42)
%44 = load i64, i64* @ULONG_MAX
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i64 0, i64 0), i64 %44)
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.19, i64 0, i64 0))
br label %47
47: ; preds = %52, %0
%48 = load i8, i8* %2
%49 = sext i8 %48 to i32
%50 = add nsw i32 %49, 1
%51 = icmp sge i32 %50, 0
br i1 %51, label %52, label %55
52: ; preds = %47
%53 = load i8, i8* %2
%54 = add i8 %53, 1
store i8 %54, i8* %2
br label %47
55: ; preds = %47
%56 = load i8, i8* %2
%57 = sext i8 %56 to i32
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.20, i64 0, i64 0), i32 %57)
store i8 0, i8* %2
br label %59
59: ; preds = %64, %55
%60 = load i8, i8* %2
%61 = sext i8 %60 to i32
%62 = sub nsw i32 %61, 1
%63 = icmp slt i32 %62, 0
br i1 %63, label %64, label %67
64: ; preds = %59
%65 = load i8, i8* %2
%66 = add i8 %65, -1
store i8 %66, i8* %2
br label %59
67: ; preds = %59
%68 = load i8, i8* %2
%69 = sext i8 %68 to i32
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.21, i64 0, i64 0), i32 %69)
store i8 1, i8* %4
br label %71
71: ; preds = %75, %67
%72 = load i8, i8* %4
%73 = zext i8 %72 to i32
%74 = icmp ne i32 %73, 0
br i1 %74, label %75, label %79
75: ; preds = %71
%76 = load i8, i8* %4
store i8 %76, i8* %3
%77 = load i8, i8* %4
%78 = add i8 %77, 1
store i8 %78, i8* %4
br label %71
79: ; preds = %71
%80 = load i8, i8* %3
%81 = zext i8 %80 to i32
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.22, i64 0, i64 0), i32 %81)
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.23, i64 0, i64 0))
store i16 0, i16* %5
br label %84
84: ; preds = %89, %79
%85 = load i16, i16* %5
%86 = sext i16 %85 to i32
%87 = sub nsw i32 %86, 1
%88 = icmp slt i32 %87, 0
br i1 %88, label %89, label %92
89: ; preds = %84
%90 = load i16, i16* %5
%91 = add i16 %90, -1
store i16 %91, i16* %5
br label %84
92: ; preds = %84
%93 = load i16, i16* %5
%94 = sext i16 %93 to i32
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.24, i64 0, i64 0), i32 %94)
store i16 0, i16* %5
br label %96
96: ; preds = %101, %92
%97 = load i16, i16* %5
%98 = sext i16 %97 to i32
%99 = add nsw i32 %98, 1
%100 = icmp sgt i32 %99, 0
br i1 %100, label %101, label %104
101: ; preds = %96
%102 = load i16, i16* %5
%103 = add i16 %102, 1
store i16 %103, i16* %5
br label %96
104: ; preds = %96
%105 = load i16, i16* %5
%106 = sext i16 %105 to i32
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.25, i64 0, i64 0), i32 %106)
store i16 1, i16* %7
store i16 1, i16* %6
br label %108
108: ; preds = %112, %104
%109 = load i16, i16* %6
%110 = zext i16 %109 to i32
%111 = icmp ne i32 %110, 0
br i1 %111, label %112, label %116
112: ; preds = %108
%113 = load i16, i16* %6
store i16 %113, i16* %7
%114 = load i16, i16* %6
%115 = add i16 %114, 1
store i16 %115, i16* %6
br label %108
116: ; preds = %108
%117 = load i16, i16* %7
%118 = zext i16 %117 to i32
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.26, i64 0, i64 0), i32 %118)
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.27, i64 0, i64 0))
store i64 -1, i64* %9
store i64 -1, i64* %8
store i64 100000000000000000, i64* %10
br label %121
121: ; preds = %144, %116
%122 = load i64, i64* %9
%123 = icmp slt i64 %122, 0
br i1 %123, label %124, label %145
124: ; preds = %121
%125 = load i64, i64* %9
%126 = load i64, i64* %10
%127 = sub nsw i64 %125, %126
store i64 %127, i64* %9
%128 = load i64, i64* %9
%129 = icmp sgt i64 %128, 0
br i1 %129, label %130, label %142
130: ; preds = %124
%131 = load i64, i64* %10
%132 = icmp ne i64 %131, 1
br i1 %132, label %133, label %141
133: ; preds = %130
%134 = load i64, i64* %8
store i64 %134, i64* %9
%135 = load i64, i64* %10
%136 = icmp sge i64 %135, 10
br i1 %136, label %137, label %140
137: ; preds = %133
%138 = load i64, i64* %10
%139 = sdiv i64 %138, 10
store i64 %139, i64* %10
br label %140
140: ; preds = %137, %133
br label %141
141: ; preds = %140, %130
br label %144
142: ; preds = %124
%143 = load i64, i64* %9
store i64 %143, i64* %8
br label %144
144: ; preds = %142, %141
br label %121
145: ; preds = %121
%146 = load i64, i64* %9
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.28, i64 0, i64 0), i64 %146)
%148 = load i64, i64* %8
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.29, i64 0, i64 0), i64 %148)
store i64 1, i64* %12
store i64 1, i64* %11
store i64 100000000000000000, i64* %10
br label %150
150: ; preds = %177, %145
%151 = load i64, i64* %12
%152 = icmp ne i64 %151, 0
br i1 %152, label %153, label %178
153: ; preds = %150
%154 = load i64, i64* %12
%155 = load i64, i64* %10
%156 = add i64 %154, %155
store i64 %156, i64* %12
%157 = load i64, i64* %12
%158 = icmp eq i64 %157, 0
br i1 %158, label %163, label %159
159: ; preds = %153
%160 = load i64, i64* %12
%161 = load i64, i64* %11
%162 = icmp ult i64 %160, %161
br i1 %162, label %163, label %175
163: ; preds = %159, %153
%164 = load i64, i64* %10
%165 = icmp ne i64 %164, 1
br i1 %165, label %166, label %174
166: ; preds = %163
%167 = load i64, i64* %11
store i64 %167, i64* %12
%168 = load i64, i64* %10
%169 = icmp sge i64 %168, 10
br i1 %169, label %170, label %173
170: ; preds = %166
%171 = load i64, i64* %10
%172 = sdiv i64 %171, 10
store i64 %172, i64* %10
br label %173
173: ; preds = %170, %166
br label %174
174: ; preds = %173, %163
br label %177
175: ; preds = %159
%176 = load i64, i64* %12
store i64 %176, i64* %11
br label %177
177: ; preds = %175, %174
br label %150
178: ; preds = %150
%179 = load i64, i64* %11
%180 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.30, i64 0, i64 0), i64 %179)
%181 = load i32, i32* %1
ret i32 %181
}

LLVM IR (-O2):
@.str.2 = [17 x i8] c"Max of char: %d\0A\00"
@CHAR_MAX = global i32 0
@.str.3 = [17 x i8] c"Min of char: %d\0A\00"
@CHAR_MIN = global i32 0
@.str.4 = [24 x i8] c"Max of signed char: %d\0A\00"
@SCHAR_MAX = global i32 0
@.str.5 = [24 x i8] c"Min of signed char: %d\0A\00"
@SCHAR_MIN = global i32 0
@.str.6 = [26 x i8] c"Max of unsigned char: %u\0A\00"
@UCHAR_MAX = global i32 0
@.str.8 = [18 x i8] c"Max of short: %d\0A\00"
@SHRT_MAX = global i32 0
@.str.9 = [18 x i8] c"Min of short: %d\0A\00"
@SHRT_MIN = global i32 0
@.str.10 = [27 x i8] c"Max of unsigned short: %u\0A\00"
@USHRT_MAX = global i32 0
@.str.12 = [16 x i8] c"Max of int: %d\0A\00"
@INT_MAX = global i32 0
@.str.13 = [16 x i8] c"Min of int: %d\0A\00"
@INT_MIN = global i32 0
@.str.14 = [25 x i8] c"Max of unsigned int: %u\0A\00"
@UINT_MAX = global i32 0
@.str.16 = [18 x i8] c"Max of long: %ld\0A\00"
@LONG_MAX = global i64 0
@.str.17 = [18 x i8] c"Min of long: %ld\0A\00"
@LONG_MIN = global i64 0
@.str.18 = [27 x i8] c"Max of unsigned long: %lu\0A\00"
@ULONG_MAX = global i64 0
@.str.20 = [29 x i8] c"Computed min char value: %d\0A\00"
@.str.21 = [29 x i8] c"Computed max char value: %d\0A\00"
@.str.22 = [32 x i8] c"Computed max unsigned char: %u\0A\00"
@.str.24 = [34 x i8] c"Computed max of signed short: %d\0A\00"
@.str.25 = [34 x i8] c"Computed min of signed short: %d\0A\00"
@.str.26 = [36 x i8] c"Computed max of unsigned short: %u\0A\00"
@.str.28 = [34 x i8] c"Computed max of signed long: %ld\0A\00"
@.str.29 = [34 x i8] c"Computed min of signed long: %ld\0A\00"
@.str.30 = [36 x i8] c"Computed max of unsigned long: %lu\0A\00"
@str = [38 x i8] c"Maxes and Mins from standard headers:\00"
@str.31 = [6 x i8] c"\0Achar\00"
@str.32 = [7 x i8] c"\0Ashort\00"
@str.33 = [5 x i8] c"\0Aint\00"
@str.34 = [6 x i8] c"\0Along\00"
@str.35 = [15 x i8] c"\0Acomputed char\00"
@str.36 = [16 x i8] c"\0Acomputed short\00"
@str.37 = [15 x i8] c"\0Acomputed long\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.31, i64 0, i64 0))
%3 = load i32, i32* @CHAR_MAX
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @CHAR_MIN
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @SCHAR_MAX
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @SCHAR_MIN
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @UCHAR_MAX
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), i32 %11)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.32, i64 0, i64 0))
%14 = load i32, i32* @SHRT_MAX
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %14)
%16 = load i32, i32* @SHRT_MIN
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i32 %16)
%18 = load i32, i32* @USHRT_MAX
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0), i32 %18)
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.33, i64 0, i64 0))
%21 = load i32, i32* @INT_MAX
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i32 %21)
%23 = load i32, i32* @INT_MIN
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i32 %23)
%25 = load i32, i32* @UINT_MAX
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0), i32 %25)
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.34, i64 0, i64 0))
%28 = load i64, i64* @LONG_MAX
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.16, i64 0, i64 0), i64 %28)
%30 = load i64, i64* @LONG_MIN
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0), i64 %30)
%32 = load i64, i64* @ULONG_MAX
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i64 0, i64 0), i64 %32)
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.35, i64 0, i64 0))
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.20, i64 0, i64 0), i32 -128)
br label %36
36: ; preds = %36, %0
%37 = phi i8 [ 0, %0 ], [ %39, %36 ]
%38 = icmp slt i8 %37, 1
%39 = add i8 %37, -1
br i1 %38, label %36, label %40
40: ; preds = %36
%41 = zext i8 %37 to i32
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.21, i64 0, i64 0), i32 %41)
br label %43
43: ; preds = %43, %40
%44 = phi i8 [ 1, %40 ], [ %46, %43 ]
%45 = icmp eq i8 %44, -15
%46 = add i8 %44, 16
br i1 %45, label %47, label %43
47: ; preds = %43
%48 = add nuw nsw i8 %44, 14
%49 = zext i8 %48 to i32
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.22, i64 0, i64 0), i32 %49)
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.36, i64 0, i64 0))
br label %52
52: ; preds = %52, %47
%53 = phi i16 [ 0, %47 ], [ %55, %52 ]
%54 = icmp slt i16 %53, 1
%55 = add i16 %53, -1
br i1 %54, label %52, label %56
56: ; preds = %52
%57 = zext i16 %53 to i32
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.24, i64 0, i64 0), i32 %57)
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.25, i64 0, i64 0), i32 -32768)
br label %60
60: ; preds = %60, %56
%61 = phi i16 [ 1, %56 ], [ %63, %60 ]
%62 = icmp eq i16 %61, -15
%63 = add i16 %61, 16
br i1 %62, label %64, label %60
64: ; preds = %60
%65 = add nuw nsw i16 %61, 14
%66 = zext i16 %65 to i32
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.26, i64 0, i64 0), i32 %66)
%68 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.37, i64 0, i64 0))
br label %69
69: ; preds = %64, %80
%70 = phi i64 [ 100000000000000000, %64 ], [ %82, %80 ]
%71 = phi i64 [ -1, %64 ], [ %81, %80 ]
%72 = sub nsw i64 %71, %70
%73 = icmp sgt i64 %72, 0
br i1 %73, label %74, label %80
74: ; preds = %69
%75 = icmp eq i64 %70, 1
br i1 %75, label %84, label %76
76: ; preds = %74
%77 = icmp sgt i64 %70, 9
br i1 %77, label %78, label %80
78: ; preds = %76
%79 = udiv i64 %70, 10
br label %80
80: ; preds = %69, %78, %76
%81 = phi i64 [ %71, %78 ], [ %71, %76 ], [ %72, %69 ]
%82 = phi i64 [ %79, %78 ], [ %70, %76 ], [ %70, %69 ]
%83 = icmp slt i64 %81, 0
br i1 %83, label %69, label %84
84: ; preds = %74, %80
%85 = phi i64 [ %81, %80 ], [ %72, %74 ]
%86 = phi i64 [ %81, %80 ], [ %71, %74 ]
%87 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.28, i64 0, i64 0), i64 %85)
%88 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.29, i64 0, i64 0), i64 %86)
br label %89
89: ; preds = %84, %103
%90 = phi i64 [ 1, %84 ], [ %106, %103 ]
%91 = phi i64 [ 1, %84 ], [ %105, %103 ]
%92 = phi i64 [ 100000000000000000, %84 ], [ %104, %103 ]
%93 = add i64 %90, %92
%94 = icmp eq i64 %93, 0
%95 = icmp ult i64 %93, %91
%96 = select i1 %94, i1 true, i1 %95
br i1 %96, label %97, label %103
97: ; preds = %89
%98 = icmp eq i64 %92, 1
br i1 %98, label %103, label %99
99: ; preds = %97
%100 = icmp sgt i64 %92, 9
br i1 %100, label %101, label %103
101: ; preds = %99
%102 = udiv i64 %92, 10
br label %103
103: ; preds = %89, %97, %101, %99
%104 = phi i64 [ %102, %101 ], [ %92, %99 ], [ 1, %97 ], [ %92, %89 ]
%105 = phi i64 [ %91, %101 ], [ %91, %99 ], [ %91, %97 ], [ %93, %89 ]
%106 = phi i64 [ %91, %101 ], [ %91, %99 ], [ %93, %97 ], [ %93, %89 ]
%107 = icmp eq i64 %106, 0
br i1 %107, label %108, label %89
108: ; preds = %103
%109 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.30, i64 0, i64 0), i64 %105)
ret i32 0
}