#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 INT_MAX;
int INT_MIN;
int /*<<< orphan*/ itoa(int, char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  char s[100];
  int n;
  printf("%d\n", INT_MAX);
  itoa(INT_MAX, s);
  printf("%d\n", INT_MIN);
  itoa(INT_MIN, s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    -0x80(%rbp),%rsi
call   1040 <itoa@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%esi
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
lea    -0x80(%rbp),%rsi
call   1040 <itoa@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%esi
lea    0xec7(%rip),%r15
mov    %r15,%rdi
call   1030 <printf@plt>
mov    (%rbx),%edi
mov    %rsp,%r14
mov    %r14,%rsi
call   1040 <itoa@plt>
mov    0x2e8b(%rip),%rbx
mov    (%rbx),%esi
mov    %r15,%rdi
call   1030 <printf@plt>
mov    (%rbx),%edi
mov    %r14,%rsi
call   1040 <itoa@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@INT_MAX = global i32 0
@INT_MIN = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x i8]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* @INT_MAX
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @INT_MAX
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%12 = call i32 @itoa(i32 %10, i8* %11)
%13 = load i32, i32* @INT_MIN
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = load i32, i32* @INT_MIN
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%17 = call i32 @itoa(i32 %15, i8* %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@INT_MAX = global i32 0
@INT_MIN = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @INT_MAX
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @INT_MAX
%8 = call i32 @itoa(i32 %7, i8* %4)
%9 = load i32, i32* @INT_MIN
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @INT_MIN
%12 = call i32 @itoa(i32 %11, i8* %4)
ret i32 0
}