#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 */
typedef int /*<<< orphan*/ i;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
int main() {
  printf("-10 %s == %x\n", "%x", -10);
  int i = 10;
  printf("sizeof(int) %s == %ld\n", "%ld", sizeof(i));
  printf("-7 %s == %x\n", "%x", -7);
  printf("-7 %s == %u\n", "%u", -7);
  printf("-24 %s == %u\n", "%u", -24);
  printf("-24 %s == %x\n", "%x", -24);
  printf("-24 %s == %X\n", "%X", -24);
  printf("-24 %s == %o\n", "%o", -24);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0xfffffff6,%edx
call   1030 <printf@plt>
movl   $0xa,-0x8(%rbp)
lea    0xecc(%rip),%rdi
lea    0xedc(%rip),%rsi
mov    $0x4,%edx
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    0xeaa(%rip),%rsi
mov    $0xfffffff9,%edx
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
lea    0xeca(%rip),%rsi
mov    $0xfffffff9,%edx
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
lea    0xeb2(%rip),%rsi
mov    $0xffffffe8,%edx
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
lea    0xe62(%rip),%rsi
mov    $0xffffffe8,%edx
call   1030 <printf@plt>
lea    0xea8(%rip),%rdi
lea    0xeaf(%rip),%rsi
mov    $0xffffffe8,%edx
call   1030 <printf@plt>
lea    0xea1(%rip),%rdi
lea    0xea8(%rip),%rsi
mov    $0xffffffe8,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%rdi
lea    0xeec(%rip),%r14
mov    %r14,%rsi
mov    $0xfffffff6,%edx
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
lea    0xeeb(%rip),%rsi
mov    $0x4,%edx
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    %r14,%rsi
mov    $0xfffffff9,%edx
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    0xedd(%rip),%rbx
mov    %rbx,%rsi
mov    $0xfffffff9,%edx
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
mov    %rbx,%rsi
mov    $0xffffffe8,%edx
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    %r14,%rsi
mov    $0xffffffe8,%edx
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
lea    0xec7(%rip),%rsi
mov    $0xffffffe8,%edx
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
lea    0xec0(%rip),%rsi
mov    $0xffffffe8,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"-10 %s == %x\0A\00"
@.str.1 = [3 x i8] c"%x\00"
@.str.2 = [23 x i8] c"sizeof(int) %s == %ld\0A\00"
@.str.3 = [4 x i8] c"%ld\00"
@.str.4 = [13 x i8] c"-7 %s == %x\0A\00"
@.str.5 = [13 x i8] c"-7 %s == %u\0A\00"
@.str.6 = [3 x i8] c"%u\00"
@.str.7 = [14 x i8] c"-24 %s == %u\0A\00"
@.str.8 = [14 x i8] c"-24 %s == %x\0A\00"
@.str.9 = [14 x i8] c"-24 %s == %X\0A\00"
@.str.10 = [3 x i8] c"%X\00"
@.str.11 = [14 x i8] c"-24 %s == %o\0A\00"
@.str.12 = [3 x i8] c"%o\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 -10)
store i32 10, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 4)
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 -7)
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 -7)
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 -24)
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 -24)
%9 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32 -24)
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32 -24)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"-10 %s == %x\0A\00"
@.str.1 = [3 x i8] c"%x\00"
@.str.2 = [23 x i8] c"sizeof(int) %s == %ld\0A\00"
@.str.3 = [4 x i8] c"%ld\00"
@.str.4 = [13 x i8] c"-7 %s == %x\0A\00"
@.str.5 = [13 x i8] c"-7 %s == %u\0A\00"
@.str.6 = [3 x i8] c"%u\00"
@.str.7 = [14 x i8] c"-24 %s == %u\0A\00"
@.str.8 = [14 x i8] c"-24 %s == %x\0A\00"
@.str.9 = [14 x i8] c"-24 %s == %X\0A\00"
@.str.10 = [3 x i8] c"%X\00"
@.str.11 = [14 x i8] c"-24 %s == %o\0A\00"
@.str.12 = [3 x i8] c"%o\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 -10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 4)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 -7)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 -7)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 -24)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 -24)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32 -24)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32 -24)
ret i32 0
}