main() {
  char name[14] = "Firefox!";
  printf("... %.14s ...\n", name);
  printf("... %.NAMESIZE ...\n", name);
  printf("... %.*s ...\n", 14, name);
  printf("%*.*s\n", 12, 5, name);
  printf("%*%\n", 12);
  printf("%*%,", -12);
  int n;
  printf("\nhello,%n", &n);
  printf("\n%D,0%O\n", 370, 12);
  printf("%06d,%06d\n", -37, 37);
  printf("%5.6d,%7.6d,%.6d\n", -37, 37, 37);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x12(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xed2(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0x12(%rbp),%rsi
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x12(%rbp),%rsi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x12(%rbp),%rdx
lea    0xec4(%rip),%rdi
mov    $0xe,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x12(%rbp),%rcx
lea    0xebb(%rip),%rdi
mov    $0xc,%esi
mov    $0x5,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaa(%rip),%rdi
mov    $0xc,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9c(%rip),%rdi
mov    $0xfffffff4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8e(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe86(%rip),%rdi
mov    $0x172,%esi
mov    $0xc,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe77(%rip),%rdi
mov    $0xffffffdb,%esi
mov    $0x25,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe6a(%rip),%rdi
mov    $0xffffffdb,%esi
mov    $0x25,%ecx
mov    %ecx,%edx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movabs $0x21786f6665726946,%rax
6f 78 21
mov    %rax,0x10(%rsp)
movq   $0x2178,0x16(%rsp)
lea    0xeda(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
mov    $0xe,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0xc,%esi
mov    $0x5,%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
mov    $0xfffffff4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe9e(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe95(%rip),%rdi
mov    $0x172,%esi
mov    $0xc,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe86(%rip),%rdi
mov    $0xffffffdb,%esi
mov    $0x25,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe79(%rip),%rdi
mov    $0xffffffdb,%esi
mov    $0x25,%edx
mov    $0x25,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.name = [14 x i8] c"Firefox!\00\00\00\00\00\00"
@.str = [15 x i8] c"... %.14s ...\0A\00"
@.str.1 = [20 x i8] c"... %.NAMESIZE ...\0A\00"
@.str.2 = [14 x i8] c"... %.*s ...\0A\00"
@.str.3 = [7 x i8] c"%*.*s\0A\00"
@.str.4 = [5 x i8] c"%*%\0A\00"
@.str.5 = [5 x i8] c"%*%,\00"
@.str.6 = [10 x i8] c"\0Ahello,%n\00"
@.str.7 = [9 x i8] c"\0A%D,0%O\0A\00"
@.str.8 = [11 x i8] c"%06d,%06d\0A\00"
@.str.9 = [18 x i8] c"%5.6d,%7.6d,%.6d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [14 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [14 x i8]* %2 to i8*
%5 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 14, i8* %9)
%11 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 12, i32 5, i8* %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 -12)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32* %3)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 370, i32 12)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i32 -37, i32 37)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i32 -37, i32 37, i32 37)
ret i32 0
}

LLVM IR (-O2):
@__const.main.name = [14 x i8] c"Firefox!\00\00\00\00\00\00"
@.str = [15 x i8] c"... %.14s ...\0A\00"
@.str.1 = [20 x i8] c"... %.NAMESIZE ...\0A\00"
@.str.2 = [14 x i8] c"... %.*s ...\0A\00"
@.str.3 = [7 x i8] c"%*.*s\0A\00"
@.str.4 = [5 x i8] c"%*%\0A\00"
@.str.5 = [5 x i8] c"%*%,\00"
@.str.6 = [10 x i8] c"\0Ahello,%n\00"
@.str.7 = [9 x i8] c"\0A%D,0%O\0A\00"
@.str.8 = [11 x i8] c"%06d,%06d\0A\00"
@.str.9 = [18 x i8] c"%5.6d,%7.6d,%.6d\0A\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 14, i8* %3)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 12, i32 5, i8* %3)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 12)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 -12)
%10 = bitcast i32* %2 to i8*
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32* %2)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 370, i32 12)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i32 -37, i32 37)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i32 -37, i32 37, i32 37)
ret i32 0
}