#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_MIN;
int /*<<< orphan*/ itoa(int, char *);
int /*<<< orphan*/ printf(char *, int, char *);
int main(void) {
  int n;
  char s[256] = "";
  n = -234;
  itoa(n, s);
  printf("Number %d converted to a string is: \"%s\"\n", n, s);
  n = 1043;
  itoa(n, s);
  printf("Number %d converted to a string is: \"%s\"\n", n, s);
  n = INT_MIN;
  itoa(n, s);
  printf("Number %d converted to a string is: \"%s\"\n", n, s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1040 <memset@plt>
movl   $0xffffff16,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x110(%rbp),%rsi
call   1050 <itoa@plt>
mov    -0x8(%rbp),%esi
lea    -0x110(%rbp),%rdx
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
movl   $0x413,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x110(%rbp),%rsi
call   1050 <itoa@plt>
mov    -0x8(%rbp),%esi
lea    -0x110(%rbp),%rdx
lea    0xe58(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e34(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x110(%rbp),%rsi
call   1050 <itoa@plt>
mov    -0x8(%rbp),%esi
lea    -0x110(%rbp),%rdx
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x100,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    $0xffffff16,%edi
mov    %rbx,%rsi
call   1040 <itoa@plt>
lea    0xe54(%rip),%r14
mov    %r14,%rdi
mov    $0xffffff16,%esi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    $0x413,%edi
mov    %rbx,%rsi
call   1040 <itoa@plt>
mov    %r14,%rdi
mov    $0x413,%esi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <itoa@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Number %d converted to a string is: \22%s\22\0A\00"
@INT_MIN = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [256 x i8]
store i32 0, i32* %1
%4 = bitcast [256 x i8]* %3 to i8*
store i32 -234, i32* %2
%5 = load i32, i32* %2
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%7 = call i32 @itoa(i32 %5, i8* %6)
%8 = load i32, i32* %2
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %9)
store i32 1043, i32* %2
%11 = load i32, i32* %2
%12 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%13 = call i32 @itoa(i32 %11, i8* %12)
%14 = load i32, i32* %2
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%16 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %14, i8* %15)
%17 = load i32, i32* @INT_MIN
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%20 = call i32 @itoa(i32 %18, i8* %19)
%21 = load i32, i32* %2
%22 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%23 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %21, i8* %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [42 x i8] c"Number %d converted to a string is: \22%s\22\0A\00"
@INT_MIN = global i32 0
define i32 @main() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @itoa(i32 -234, i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 -234, i8* %2)
%5 = call i32 @itoa(i32 1043, i8* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 1043, i8* %2)
%7 = load i32, i32* @INT_MIN
%8 = call i32 @itoa(i32 %7, i8* %2)
%9 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %2)
ret i32 0
}