#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*/ itob(int, char *, int);
int /*<<< orphan*/ puts(char *);
int main() {
  char str[100];
  itob(14291, str, 16);
  puts(str);
  itob(255, str, 2);
  puts(str);
  itob(15000, str, 10);
  puts(str);
  itob(25025, str, 32);
  puts(str);
  itob(-215109, str, 16);
  puts(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
mov    $0x37d3,%edi
mov    $0x10,%edx
call   1040 <itob@plt>
lea    -0x70(%rbp),%rdi
call   1030 <puts@plt>
lea    -0x70(%rbp),%rsi
mov    $0xff,%edi
mov    $0x2,%edx
call   1040 <itob@plt>
lea    -0x70(%rbp),%rdi
call   1030 <puts@plt>
lea    -0x70(%rbp),%rsi
mov    $0x3a98,%edi
mov    $0xa,%edx
call   1040 <itob@plt>
lea    -0x70(%rbp),%rdi
call   1030 <puts@plt>
lea    -0x70(%rbp),%rsi
mov    $0x61c1,%edi
mov    $0x20,%edx
call   1040 <itob@plt>
lea    -0x70(%rbp),%rdi
call   1030 <puts@plt>
lea    -0x70(%rbp),%rsi
mov    $0xfffcb7bb,%edi
mov    $0x10,%edx
call   1040 <itob@plt>
lea    -0x70(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    %rsp,%rbx
mov    $0x37d3,%edi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1040 <itob@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0xff,%edi
mov    %rbx,%rsi
mov    $0x2,%edx
call   1040 <itob@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x3a98,%edi
mov    %rbx,%rsi
mov    $0xa,%edx
call   1040 <itob@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x61c1,%edi
mov    %rbx,%rsi
mov    $0x20,%edx
call   1040 <itob@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0xfffcb7bb,%edi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1040 <itob@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @itob(i32 14291, i8* %3, i32 16)
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = call i32 @puts(i8* %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = call i32 @itob(i32 255, i8* %7, i32 2)
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%10 = call i32 @puts(i8* %9)
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%12 = call i32 @itob(i32 15000, i8* %11, i32 10)
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%14 = call i32 @puts(i8* %13)
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%16 = call i32 @itob(i32 25025, i8* %15, i32 32)
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%18 = call i32 @puts(i8* %17)
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%20 = call i32 @itob(i32 -215109, i8* %19, i32 16)
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%22 = call i32 @puts(i8* %21)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @itob(i32 14291, i8* %2, i32 16)
%4 = call i32 @puts(i8* %2)
%5 = call i32 @itob(i32 255, i8* %2, i32 2)
%6 = call i32 @puts(i8* %2)
%7 = call i32 @itob(i32 15000, i8* %2, i32 10)
%8 = call i32 @puts(i8* %2)
%9 = call i32 @itob(i32 25025, i8* %2, i32 32)
%10 = call i32 @puts(i8* %2)
%11 = call i32 @itob(i32 -215109, i8* %2, i32 16)
%12 = call i32 @puts(i8* %2)
ret i32 0
}