#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 /*<<< orphan*/ CHAR_MAX;
scalar_t__ CHAR_MIN;
int /*<<< orphan*/ INT_MAX;
scalar_t__ INT_MIN;
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Storage sizes and value ranges of the types char and int\n\n");
  printf("The type char is %s.\n\n", CHAR_MIN < 0 ? "signed" : "unsigned");
  printf(" Type Size (in bytes) Minimum Maximum\n"
         "---------------------------------------------------\n");
  printf(" char %8zu %20d %15d\n", sizeof(char), CHAR_MIN, CHAR_MAX);
  printf(" int  %8zu %20d %15d\n", sizeof(int), INT_MIN, INT_MAX);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%rcx
lea    0xf14(%rip),%rsi
lea    0xf0f(%rip),%rax
cmp    $0x0,%rcx
cmovl  %rax,%rsi
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%rdx
mov    0x2e6e(%rip),%rax
mov    (%rax),%ecx
lea    0xf33(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e3a(%rip),%rax
mov    (%rax),%rdx
mov    0x2e38(%rip),%rax
mov    (%rax),%ecx
lea    0xf23(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf24(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rbx
cmpq   $0x0,(%rbx)
lea    0xeda(%rip),%rax
lea    0xed1(%rip),%rsi
cmovs  %rax,%rsi
lea    0xeaf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf27(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%rdx
mov    0x2e7a(%rip),%rax
mov    (%rax),%ecx
lea    0xea9(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e46(%rip),%rax
mov    (%rax),%rdx
mov    0x2e44(%rip),%rax
mov    (%rax),%ecx
lea    0xe99(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [59 x i8] c"Storage sizes and value ranges of the types char and int\0A\0A\00"
@.str.1 = [23 x i8] c"The type char is %s.\0A\0A\00"
@CHAR_MIN = global i64 0
@.str.2 = [7 x i8] c"signed\00"
@.str.3 = [9 x i8] c"unsigned\00"
@.str.4 = [91 x i8] c" Type Size (in bytes) Minimum Maximum\0A---------------------------------------------------\0A\00"
@.str.5 = [22 x i8] c" char %8zu %20d %15d\0A\00"
@CHAR_MAX = global i32 0
@.str.6 = [22 x i8] c" int %8zu %20d %15d\0A\00"
@INT_MIN = global i64 0
@INT_MAX = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%3 = load i64, i64* @CHAR_MIN
%4 = icmp slt i64 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.4, i64 0, i64 0))
%9 = load i64, i64* @CHAR_MIN
%10 = load i32, i32* @CHAR_MAX
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i64 1, i64 %9, i32 %10)
%12 = load i64, i64* @INT_MIN
%13 = load i32, i32* @INT_MAX
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i64 4, i64 %12, i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [23 x i8] c"The type char is %s.\0A\0A\00"
@CHAR_MIN = global i64 0
@.str.2 = [7 x i8] c"signed\00"
@.str.3 = [9 x i8] c"unsigned\00"
@.str.5 = [22 x i8] c" char %8zu %20d %15d\0A\00"
@CHAR_MAX = global i32 0
@.str.6 = [22 x i8] c" int %8zu %20d %15d\0A\00"
@INT_MIN = global i64 0
@INT_MAX = global i32 0
@str = [58 x i8] c"Storage sizes and value ranges of the types char and int\0A\00"
@str.7 = [90 x i8] c" Type Size (in bytes) Minimum Maximum\0A---------------------------------------------------\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
%2 = load i64, i64* @CHAR_MIN
%3 = icmp slt i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([90 x i8], [90 x i8]* @str.7, i64 0, i64 0))
%7 = load i64, i64* @CHAR_MIN
%8 = load i32, i32* @CHAR_MAX
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i64 1, i64 %7, i32 %8)
%10 = load i64, i64* @INT_MIN
%11 = load i32, i32* @INT_MAX
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i64 4, i64 %10, i32 %11)
ret i32 0
}