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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int CHAR_BIT;
int INT_MAX;
int INT_MIN;
int SCHAR_MAX;
int SCHAR_MIN;
int SHRT_MAX;
int SHRT_MIN;
int UCHAR_MAX;
int UINT_MAX;
int USHRT_MAX;
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  printf("limits on this system:\n");
  printf("number of bits in a char: %d\n", CHAR_BIT);
  printf("Minimum value a \"signed char\" can hold.: %d\n", SCHAR_MIN);
  printf("Maximum value a \"signed char\" can hold.: %d\n", SCHAR_MAX);
  printf("Maximum value an \"unsigned char\" can hold.: %d\n", UCHAR_MAX);
  printf("Minimum value a \"signed short int\" can hold.: %d\n", SHRT_MIN);
  printf("Maximum value a \"signed short int\" can hold.: %d\n", SHRT_MAX);
  printf("Maximum value an \"unsigned short int\" can hold.: %d\n", USHRT_MAX);
  printf("Minimum value a \"signed int\" can hold.: %d\n", INT_MIN);
  printf("Maximum value a \"signed int\" can hold.: %d\n", INT_MAX);
  printf("Maximum value an \"unsigned int\" can hold.: %u\n", UINT_MAX);
  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    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%esi
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%esi
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%esi
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%esi
lea    0xf07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e09(%rip),%rax
mov    (%rax),%esi
lea    0xf20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dea(%rip),%rax
mov    (%rax),%esi
lea    0xf3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e1b(%rip),%rax
mov    (%rax),%esi
lea    0xf56(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dec(%rip),%rax
mov    (%rax),%esi
lea    0xf74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2de5(%rip),%rax
mov    (%rax),%esi
lea    0xf89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dc6(%rip),%rax
mov    (%rax),%esi
lea    0xf9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x10a0(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%esi
lea    0xec3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%esi
lea    0xeca(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%esi
lea    0xef6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e10(%rip),%rax
mov    (%rax),%esi
lea    0xf0f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2df1(%rip),%rax
mov    (%rax),%esi
lea    0xf2a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e22(%rip),%rax
mov    (%rax),%esi
lea    0xf45(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2df3(%rip),%rax
mov    (%rax),%esi
lea    0xf63(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2dec(%rip),%rax
mov    (%rax),%esi
lea    0xf78(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2dcd(%rip),%rax
mov    (%rax),%esi
lea    0xf8d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"limits on this system:\0A\00"
@.str.1 = [30 x i8] c"number of bits in a char: %d\0A\00"
@CHAR_BIT = global i32 0
@.str.2 = [45 x i8] c"Minimum value a \22signed char\22 can hold.: %d\0A\00"
@SCHAR_MIN = global i32 0
@.str.3 = [45 x i8] c"Maximum value a \22signed char\22 can hold.: %d\0A\00"
@SCHAR_MAX = global i32 0
@.str.4 = [48 x i8] c"Maximum value an \22unsigned char\22 can hold.: %d\0A\00"
@UCHAR_MAX = global i32 0
@.str.5 = [50 x i8] c"Minimum value a \22signed short int\22 can hold.: %d\0A\00"
@SHRT_MIN = global i32 0
@.str.6 = [50 x i8] c"Maximum value a \22signed short int\22 can hold.: %d\0A\00"
@SHRT_MAX = global i32 0
@.str.7 = [53 x i8] c"Maximum value an \22unsigned short int\22 can hold.: %d\0A\00"
@USHRT_MAX = global i32 0
@.str.8 = [44 x i8] c"Minimum value a \22signed int\22 can hold.: %d\0A\00"
@INT_MIN = global i32 0
@.str.9 = [44 x i8] c"Maximum value a \22signed int\22 can hold.: %d\0A\00"
@INT_MAX = global i32 0
@.str.10 = [47 x i8] c"Maximum value an \22unsigned int\22 can hold.: %u\0A\00"
@UINT_MAX = global i32 0
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 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @CHAR_BIT
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @SCHAR_MIN
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @SCHAR_MAX
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @UCHAR_MAX
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0), i32 %13)
%15 = load i32, i32* @SHRT_MIN
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0), i32 %15)
%17 = load i32, i32* @SHRT_MAX
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0), i32 %17)
%19 = load i32, i32* @USHRT_MAX
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.7, i64 0, i64 0), i32 %19)
%21 = load i32, i32* @INT_MIN
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0), i32 %21)
%23 = load i32, i32* @INT_MAX
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), i32 %23)
%25 = load i32, i32* @UINT_MAX
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0), i32 %25)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [30 x i8] c"number of bits in a char: %d\0A\00"
@CHAR_BIT = global i32 0
@.str.2 = [45 x i8] c"Minimum value a \22signed char\22 can hold.: %d\0A\00"
@SCHAR_MIN = global i32 0
@.str.3 = [45 x i8] c"Maximum value a \22signed char\22 can hold.: %d\0A\00"
@SCHAR_MAX = global i32 0
@.str.4 = [48 x i8] c"Maximum value an \22unsigned char\22 can hold.: %d\0A\00"
@UCHAR_MAX = global i32 0
@.str.5 = [50 x i8] c"Minimum value a \22signed short int\22 can hold.: %d\0A\00"
@SHRT_MIN = global i32 0
@.str.6 = [50 x i8] c"Maximum value a \22signed short int\22 can hold.: %d\0A\00"
@SHRT_MAX = global i32 0
@.str.7 = [53 x i8] c"Maximum value an \22unsigned short int\22 can hold.: %d\0A\00"
@USHRT_MAX = global i32 0
@.str.8 = [44 x i8] c"Minimum value a \22signed int\22 can hold.: %d\0A\00"
@INT_MIN = global i32 0
@.str.9 = [44 x i8] c"Maximum value a \22signed int\22 can hold.: %d\0A\00"
@INT_MAX = global i32 0
@.str.10 = [47 x i8] c"Maximum value an \22unsigned int\22 can hold.: %u\0A\00"
@UINT_MAX = global i32 0
@str = [23 x i8] c"limits on this system:\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @CHAR_BIT
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @SCHAR_MIN
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @SCHAR_MAX
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @UCHAR_MAX
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0), i32 %10)
%12 = load i32, i32* @SHRT_MIN
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0), i32 %12)
%14 = load i32, i32* @SHRT_MAX
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0), i32 %14)
%16 = load i32, i32* @USHRT_MAX
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.7, i64 0, i64 0), i32 %16)
%18 = load i32, i32* @INT_MIN
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0), i32 %18)
%20 = load i32, i32* @INT_MAX
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), i32 %20)
%22 = load i32, i32* @UINT_MAX
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0), i32 %22)
ret i32 0
}