main() {
  printf("1%s\n", "\021\012");
  printf("2%s\n", "\051\052");
  printf("3%c\n", (1)["have"]);
  printf("4%s\n", (1)["have"] + "fun" - 0x60);
  printf(&1 ["\021%six\012\0"], (1)["have"] + "fun" - 0x60);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    0xed6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl 0xed1(%rip),%esi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl 0xebc(%rip),%eax
cltq
lea    0xebc(%rip),%rsi
add    %rax,%rsi
add    $0xffffffffffffffa0,%rsi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl 0xe97(%rip),%eax
cltq
lea    0xe97(%rip),%rsi
add    %rax,%rsi
add    $0xffffffffffffffa0,%rsi
lea    0xe8d(%rip),%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rdi
lea    0xee6(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
lea    0xed9(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x61,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
lea    0xebf(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"1%s\0A\00"
@.str.1 = [3 x i8] c"\11\0A\00"
@.str.2 = [5 x i8] c"2%s\0A\00"
@.str.3 = [3 x i8] c")*\00"
@.str.4 = [5 x i8] c"3%c\0A\00"
@.str.5 = [5 x i8] c"have\00"
@.str.6 = [5 x i8] c"4%s\0A\00"
@.str.7 = [4 x i8] c"fun\00"
@.str.8 = [8 x i8] c"\11%six\0A\00\00"
define i32 @main() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%3 = load i8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 1)
%4 = sext i8 %3 to i32
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %4)
%6 = load i8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 1)
%7 = sext i8 %6 to i32
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i64 %8
%10 = getelementptr inbounds i8, i8* %9, i64 -96
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* %10)
%12 = load i8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 1)
%13 = sext i8 %12 to i32
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i64 %14
%16 = getelementptr inbounds i8, i8* %15, i64 -96
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 1), i8* %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"1%s\0A\00"
@.str.1 = [3 x i8] c"\11\0A\00"
@.str.2 = [5 x i8] c"2%s\0A\00"
@.str.3 = [3 x i8] c")*\00"
@.str.4 = [5 x i8] c"3%c\0A\00"
@.str.6 = [5 x i8] c"4%s\0A\00"
@.str.7 = [4 x i8] c"fun\00"
@.str.8 = [8 x i8] c"\11%six\0A\00\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 97)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 1))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 1), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 1))
ret i32 0
}