int main(void) {
  printf("Strings:\n");
  const char *s = "Hello";
  printf("\t.%10s.\n\t.%-10s.\n\t.%*s.\n", s, s, 10, s);
  printf("Characters:\t%c %%\n", 65);
  printf("Integers\n");
  printf("Decimal:\t%i %d %.6i %i %.0i %+i %i\n", 1, 2, 3, 0, 0, 4, -4);
  printf("Hexadecimal:\t%x %x %X %#x\n", 5, 10, 10, 6);
  printf("Octal:\t%o %#o %#o\n", 10, 10, 4);
  printf("Floating point\n");
  printf("Rounding:\t%f %.0f %.32f\n", 1.5, 1.5, 1.3);
  printf("Padding:\t%05.2f %.2f %5.2f\n", 1.5, 1.5, 1.5);
  printf("Scientific:\t%E %e\n", 1.5, 1.5);
  printf("Hexadecimal:\t%a %A\n", 1.5, 1.5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeed(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%r8
lea    0xedc(%rip),%rdi
mov    $0xa,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x41,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x4,(%rsp)
movl   $0xfffffffc,0x8(%rsp)
ff
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0x5,%esi
mov    $0xa,%ecx
mov    $0x6,%r8d
mov    %ecx,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0xa,%edx
mov    $0x4,%ecx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
movsd  0xe06(%rip),%xmm1
movsd  0xe06(%rip),%xmm2
movaps %xmm1,%xmm0
mov    $0x3,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
movsd  0xde5(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
mov    $0x3,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
movsd  0xdc9(%rip),%xmm1
movaps %xmm1,%xmm0
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
movsd  0xdb0(%rip),%xmm1
movaps %xmm1,%xmm0
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xfc8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee2(%rip),%rdi
lea    0xed5(%rip),%rdx
mov    %rdx,%rsi
mov    $0xa,%ecx
mov    %rdx,%r8
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedb(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf92(%rip),%rdi
call   1030 <puts@plt>
lea    0xecf(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
push   $0xfffffffffffffffc
push   $0x4
call   1040 <printf@plt>
add    $0x10,%rsp
lea    0xec8(%rip),%rdi
mov    $0x5,%esi
mov    $0xa,%edx
mov    $0xa,%ecx
mov    $0x6,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
mov    $0xa,%esi
mov    $0xa,%edx
mov    $0x4,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf24(%rip),%rdi
call   1030 <puts@plt>
lea    0xeaa(%rip),%rdi
movsd  0xe0e(%rip),%xmm0
movsd  0xe0e(%rip),%xmm2
movaps %xmm0,%xmm1
mov    $0x3,%al
call   1040 <printf@plt>
lea    0xea2(%rip),%rdi
movsd  0xded(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
mov    $0x3,%al
call   1040 <printf@plt>
lea    0xea2(%rip),%rdi
movsd  0xdd1(%rip),%xmm0
movaps %xmm0,%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
lea    0xe9c(%rip),%rdi
movsd  0xdb8(%rip),%xmm0
movaps %xmm0,%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Strings:\0A\00"
@.str.1 = [6 x i8] c"Hello\00"
@.str.2 = [25 x i8] c"\09.%10s.\0A\09.%-10s.\0A\09.%*s.\0A\00"
@.str.3 = [19 x i8] c"Characters:\09%c %%\0A\00"
@.str.4 = [10 x i8] c"Integers\0A\00"
@.str.5 = [36 x i8] c"Decimal:\09%i %d %.6i %i %.0i %+i %i\0A\00"
@.str.6 = [27 x i8] c"Hexadecimal:\09%x %x %X %#x\0A\00"
@.str.7 = [19 x i8] c"Octal:\09%o %#o %#o\0A\00"
@.str.8 = [16 x i8] c"Floating point\0A\00"
@.str.9 = [25 x i8] c"Rounding:\09%f %.0f %.32f\0A\00"
@.str.10 = [28 x i8] c"Padding:\09%05.2f %.2f %5.2f\0A\00"
@.str.11 = [19 x i8] c"Scientific:\09%E %e\0A\00"
@.str.12 = [20 x i8] c"Hexadecimal:\09%a %A\0A\00"
define i32 @main() {
%1 = alloca i8*
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = load i8*, i8** %1
%5 = load i8*, i8** %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* %3, i8* %4, i32 10, i8* %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 65)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), i32 1, i32 2, i32 3, i32 0, i32 0, i32 4, i32 -4)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i32 5, i32 10, i32 10, i32 6)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 10, i32 10, i32 4)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), double 1.500000e+00, double 1.500000e+00, double 1.300000e+00)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), double 1.500000e+00, double 1.500000e+00, double 1.500000e+00)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), double 1.500000e+00, double 1.500000e+00)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), double 1.500000e+00, double 1.500000e+00)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"Hello\00"
@.str.2 = [25 x i8] c"\09.%10s.\0A\09.%-10s.\0A\09.%*s.\0A\00"
@.str.3 = [19 x i8] c"Characters:\09%c %%\0A\00"
@.str.5 = [36 x i8] c"Decimal:\09%i %d %.6i %i %.0i %+i %i\0A\00"
@.str.6 = [27 x i8] c"Hexadecimal:\09%x %x %X %#x\0A\00"
@.str.7 = [19 x i8] c"Octal:\09%o %#o %#o\0A\00"
@.str.9 = [25 x i8] c"Rounding:\09%f %.0f %.32f\0A\00"
@.str.10 = [28 x i8] c"Padding:\09%05.2f %.2f %5.2f\0A\00"
@.str.11 = [19 x i8] c"Scientific:\09%E %e\0A\00"
@.str.12 = [20 x i8] c"Hexadecimal:\09%a %A\0A\00"
@str = [9 x i8] c"Strings:\00"
@str.13 = [9 x i8] c"Integers\00"
@str.14 = [15 x i8] c"Floating point\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 65)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.13, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), i32 1, i32 2, i32 3, i32 0, i32 0, i32 4, i32 -4)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i32 5, i32 10, i32 10, i32 6)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 10, i32 10, i32 4)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.14, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), double 1.500000e+00, double 1.500000e+00, double 1.300000e+00)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), double 1.500000e+00, double 1.500000e+00, double 1.500000e+00)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), double 1.500000e+00, double 1.500000e+00)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), double 1.500000e+00, double 1.500000e+00)
ret i32 0
}