int main() {
  int a = 3, b = 5;
  printf(&a["Ya!Hello! how is this? %s\n"], &b["junk/super"]);
  printf(&a["WHAT%c%c%c  %c%c  %c !\n"], 1 ["this"], 2 ["beauty"], 0 ["tool"],
         0 ["is"], 3 ["sensitive"], 4 ["CCCCCC"]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
movslq -0x8(%rbp),%rax
lea    0xec8(%rip),%rdi
add    %rax,%rdi
movslq -0xc(%rbp),%rax
lea    0xed5(%rip),%rsi
add    %rax,%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x8(%rbp),%rax
lea    0xecb(%rip),%rdi
add    %rax,%rdi
movsbl 0xeda(%rip),%esi
movsbl 0xed9(%rip),%edx
movsbl 0xed7(%rip),%ecx
movsbl 0xec5(%rip),%r8d
movsbl 0xecf(%rip),%r9d
movsbl 0xed3(%rip),%eax
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeeb(%rip),%rdi
lea    0xf01(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x43,(%rsp)
lea    0xef5(%rip),%rdi
mov    $0x68,%esi
mov    $0x61,%edx
mov    $0x74,%ecx
mov    $0x69,%r8d
mov    $0x73,%r9d
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Ya!Hello! how is this? %s\0A\00"
@.str.1 = [11 x i8] c"junk/super\00"
@.str.2 = [24 x i8] c"WHAT%c%c%c %c%c %c !\0A\00"
@.str.3 = [5 x i8] c"this\00"
@.str.4 = [7 x i8] c"beauty\00"
@.str.5 = [5 x i8] c"tool\00"
@.str.6 = [3 x i8] c"is\00"
@.str.7 = [10 x i8] c"sensitive\00"
@.str.8 = [7 x i8] c"CCCCCC\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
store i32 5, i32* %3
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds [27 x i8], [27 x i8]* @.str, i64 0, i64 %5
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [11 x i8], [11 x i8]* @.str.1, i64 0, i64 %8
%10 = call i32 (i8*, ...) @printf(i8* %6, i8* %9)
%11 = load i32, i32* %2
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [24 x i8], [24 x i8]* @.str.2, i64 0, i64 %12
%14 = load i8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 1)
%15 = sext i8 %14 to i32
%16 = load i8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 2)
%17 = sext i8 %16 to i32
%18 = load i8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0)
%19 = sext i8 %18 to i32
%20 = load i8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0)
%21 = sext i8 %20 to i32
%22 = load i8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 3)
%23 = sext i8 %22 to i32
%24 = load i8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 4)
%25 = sext i8 %24 to i32
%26 = call i32 (i8*, ...) @printf(i8* %13, i32 %15, i32 %17, i32 %19, i32 %21, i32 %23, i32 %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Ya!Hello! how is this? %s\0A\00"
@.str.1 = [11 x i8] c"junk/super\00"
@.str.2 = [24 x i8] c"WHAT%c%c%c %c%c %c !\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 3), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 5))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 3), i32 104, i32 97, i32 116, i32 105, i32 115, i32 67)
ret i32 0
}