int main(void) {
  char days[8][10] = {"",         "Monday", "Tuesday",  "Wednesday",
                      "Thursday", "Friday", "Saturday", "Sunday"};
  int i, j;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 10; j++) {
      printf("days[%d][%d]=%c\n", i, j, days[i][j]);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x50,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x64(%rbp)
cmpl   $0x8,-0x64(%rbp)
jge    11b2 <main+0x92>
movl   $0x0,-0x68(%rbp)
cmpl   $0xa,-0x68(%rbp)
jge    119f <main+0x7f>
mov    -0x64(%rbp),%esi
mov    -0x68(%rbp),%edx
movslq -0x64(%rbp),%rcx
lea    -0x60(%rbp),%rax
imul   $0xa,%rcx,%rcx
add    %rcx,%rax
movslq -0x68(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    115c <main+0x3c>
jmp    11a4 <main+0x84>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    114b <main+0x2b>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xeed(%rip),%r15
lea    0xf2d(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl -0x9(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
movsbl -0x8(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <printf@plt>
movsbl -0x7(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <printf@plt>
movsbl -0x6(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1030 <printf@plt>
movsbl -0x5(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <printf@plt>
movsbl -0x4(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1030 <printf@plt>
movsbl -0x3(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x6,%edx
xor    %eax,%eax
call   1030 <printf@plt>
movsbl -0x2(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x7,%edx
xor    %eax,%eax
call   1030 <printf@plt>
movsbl -0x1(%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x8,%edx
xor    %eax,%eax
call   1030 <printf@plt>
movsbl (%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x9,%edx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%rbx
add    $0xa,%r15
cmp    $0x8,%rbx
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.days = [8 x [10 x i8]] [[10 x i8] zeroinitializer, [10 x i8] c"Monday\00\00\00\00", [10 x i8] c"Tuesday\00\00\00", [10 x i8] c"Wednesday\00", [10 x i8] c"Thursday\00\00", [10 x i8] c"Friday\00\00\00\00", [10 x i8] c"Saturday\00\00", [10 x i8] c"Sunday\00\00\00\00"]
@.str = [17 x i8] c"days[%d][%d]=%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x [10 x i8]]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [8 x [10 x i8]]* %2 to i8*
store i32 0, i32* %3
br label %6
6: ; preds = %29, %0
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 8
br i1 %8, label %9, label %32
9: ; preds = %6
store i32 0, i32* %4
br label %10
10: ; preds = %25, %9
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 10
br i1 %12, label %13, label %28
13: ; preds = %10
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [8 x [10 x i8]], [8 x [10 x i8]]* %2, i64 0, i64 %17
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [10 x i8], [10 x i8]* %18, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %15, i32 %23)
br label %25
25: ; preds = %13
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
br label %10
28: ; preds = %10
br label %29
29: ; preds = %28
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %6
32: ; preds = %6
%33 = load i32, i32* %1
ret i32 %33
}

LLVM IR (-O2):
@__const.main.days = [8 x [10 x i8]] [[10 x i8] zeroinitializer, [10 x i8] c"Monday\00\00\00\00", [10 x i8] c"Tuesday\00\00\00", [10 x i8] c"Wednesday\00", [10 x i8] c"Thursday\00\00", [10 x i8] c"Friday\00\00\00\00", [10 x i8] c"Saturday\00\00", [10 x i8] c"Sunday\00\00\00\00"]
@.str = [17 x i8] c"days[%d][%d]=%c\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 0, %0 ], [ %44, %1 ]
%3 = getelementptr inbounds [8 x [10 x i8]], [8 x [10 x i8]]* @__const.main.days, i64 0, i64 %2, i64 0
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = trunc i64 %2 to i32
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6, i32 0, i32 %5)
%8 = getelementptr inbounds [8 x [10 x i8]], [8 x [10 x i8]]* @__const.main.days, i64 0, i64 %2, i64 1
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6, i32 1, i32 %10)
%12 = getelementptr inbounds [8 x [10 x i8]], [8 x [10 x i8]]* @__const.main.days, i64 0, i64 %2, i64 2
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6, i32 2, i32 %14)
%16 = getelementptr inbounds [8 x [10 x i8]], [8 x [10 x i8]]* @__const.main.days, i64 0, i64 %2, i64 3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6, i32 3, i32 %18)
%20 = getelementptr inbounds [8 x [10 x i8]], [8 x [10 x i8]]* @__const.main.days, i64 0, i64 %2, i64 4
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6, i32 4, i32 %22)
%24 = getelementptr inbounds [8 x [10 x i8]], [8 x [10 x i8]]* @__const.main.days, i64 0, i64 %2, i64 5
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6, i32 5, i32 %26)
%28 = getelementptr inbounds [8 x [10 x i8]], [8 x [10 x i8]]* @__const.main.days, i64 0, i64 %2, i64 6
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6, i32 6, i32 %30)
%32 = getelementptr inbounds [8 x [10 x i8]], [8 x [10 x i8]]* @__const.main.days, i64 0, i64 %2, i64 7
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6, i32 7, i32 %34)
%36 = getelementptr inbounds [8 x [10 x i8]], [8 x [10 x i8]]* @__const.main.days, i64 0, i64 %2, i64 8
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6, i32 8, i32 %38)
%40 = getelementptr inbounds [8 x [10 x i8]], [8 x [10 x i8]]* @__const.main.days, i64 0, i64 %2, i64 9
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6, i32 9, i32 %42)
%44 = add nuw nsw i64 %2, 1
%45 = icmp eq i64 %44, 8
br i1 %45, label %46, label %1
46: ; preds = %1
ret i32 0
}