int main(void) {
  printf("i %i\n", 1234);
  printf("s %s\n", "some string here");
  printf("x %x\n", 0xABCD);
  printf("li %li\n", 12345678l);
  printf("lx %lx\n", 0xABCDEFlu);
  printf("p %p\n", &main);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x4d2,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
mov    $0xabcd,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
mov    $0xbc614e,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
mov    $0xabcdef,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
mov    0x2e5a(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4d2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
lea    0xeda(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0xabcd,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0xbc614e,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
mov    $0xabcdef,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
mov    0x2e68(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"i %i\0A\00"
@.str.1 = [6 x i8] c"s %s\0A\00"
@.str.2 = [17 x i8] c"some string here\00"
@.str.3 = [6 x i8] c"x %x\0A\00"
@.str.4 = [8 x i8] c"li %li\0A\00"
@.str.5 = [8 x i8] c"lx %lx\0A\00"
@.str.6 = [6 x i8] c"p %p\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1234)
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 43981)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i64 12345678)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i64 11259375)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 ()* @main)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"i %i\0A\00"
@.str.1 = [6 x i8] c"s %s\0A\00"
@.str.2 = [17 x i8] c"some string here\00"
@.str.3 = [6 x i8] c"x %x\0A\00"
@.str.4 = [8 x i8] c"li %li\0A\00"
@.str.5 = [8 x i8] c"lx %lx\0A\00"
@.str.6 = [6 x i8] c"p %p\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1234)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 43981)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i64 12345678)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i64 11259375)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 ()* @main)
ret i32 0
}