int main() {
  char arr_1[3][4] = {"123", "qwe", "asd"};
  int i = 0;
  int j = 0;
  printf("\nPrint every string of 2d array:\n\n");
  for (i = 0; i < 3; i++) {
    printf("arr_1 [ %d ]  = %s; ", i, arr_1[i]);
    printf("\n");
  }
  printf("\nAnd now every symbol on its own string:\n\n");
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 4; j++) {
      printf("arr1 [ %d ] [ %d ] = %c;\n", i, j, arr_1[i][j]);
    }
    printf("==============================\n");
  }
  printf("\nAnd now we will pass 2d array in function f1:\n");
  f1(arr_1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    11ac <main+0x8c>
mov    -0x14(%rbp),%esi
movslq -0x14(%rbp),%rax
lea    -0x10(%rbp),%rdx
shl    $0x2,%rax
add    %rax,%rdx
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1166 <main+0x46>
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    1231 <main+0x111>
movl   $0x0,-0x18(%rbp)
cmpl   $0x4,-0x18(%rbp)
jge    1215 <main+0xf5>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
movslq -0x14(%rbp),%rcx
lea    -0x10(%rbp),%rax
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11d2 <main+0xb2>
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11c1 <main+0xa1>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <f1@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    0xeb9(%rip),%eax
mov    %eax,0x8(%rsp)
mov    0xea6(%rip),%rax
mov    %rax,(%rsp)
lea    0x8(%rsp),%r15
lea    0xed1(%rip),%rdi
call   1040 <puts@plt>
lea    0xe96(%rip),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x4(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe8a(%rip),%rdi
call   1040 <puts@plt>
movsbl (%rsp),%ecx
lea    0xe3e(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x1(%rsp),%ecx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x2(%rsp),%ecx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x3(%rsp),%ecx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe7c(%rip),%r15
mov    %r15,%rdi
call   1040 <puts@plt>
movsbl 0x4(%rsp),%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x5(%rsp),%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x6(%rsp),%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x7(%rsp),%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
movsbl 0x8(%rsp),%ecx
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x9(%rsp),%ecx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0xa(%rsp),%ecx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0xb(%rsp),%ecx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
lea    0xd6c(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <f1@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.arr_1 = [3 x [4 x i8]] [[4 x i8] c"123\00", [4 x i8] c"qwe\00", [4 x i8] c"asd\00"]
@.str = [35 x i8] c"\0APrint every string of 2d array:\0A\0A\00"
@.str.1 = [21 x i8] c"arr_1 [ %d ] = %s; \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [43 x i8] c"\0AAnd now every symbol on its own string:\0A\0A\00"
@.str.4 = [26 x i8] c"arr1 [ %d ] [ %d ] = %c;\0A\00"
@.str.5 = [32 x i8] c"==============================\0A\00"
@.str.6 = [48 x i8] c"\0AAnd now we will pass 2d array in function f1:\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [4 x i8]]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [3 x [4 x i8]]* %2 to i8*
store i32 0, i32* %3
store i32 0, i32* %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %7
7: ; preds = %18, %0
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %21
10: ; preds = %7
%11 = load i32, i32* %3
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %2, i64 0, i64 %13
%15 = getelementptr inbounds [4 x i8], [4 x i8]* %14, i64 0, i64 0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %11, i8* %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %18
18: ; preds = %10
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %7
21: ; preds = %7
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %3
br label %23
23: ; preds = %47, %21
%24 = load i32, i32* %3
%25 = icmp slt i32 %24, 3
br i1 %25, label %26, label %50
26: ; preds = %23
store i32 0, i32* %4
br label %27
27: ; preds = %42, %26
%28 = load i32, i32* %4
%29 = icmp slt i32 %28, 4
br i1 %29, label %30, label %45
30: ; preds = %27
%31 = load i32, i32* %3
%32 = load i32, i32* %4
%33 = load i32, i32* %3
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %2, i64 0, i64 %34
%36 = load i32, i32* %4
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [4 x i8], [4 x i8]* %35, i64 0, i64 %37
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %31, i32 %32, i32 %40)
br label %42
42: ; preds = %30
%43 = load i32, i32* %4
%44 = add nsw i32 %43, 1
store i32 %44, i32* %4
br label %27
45: ; preds = %27
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0))
br label %47
47: ; preds = %45
%48 = load i32, i32* %3
%49 = add nsw i32 %48, 1
store i32 %49, i32* %3
br label %23
50: ; preds = %23
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%52 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %2, i64 0, i64 0
%53 = call i32 ([4 x i8]*, ...) bitcast (i32 (...)* @f1 to i32 ([4 x i8]*, ...)*)([4 x i8]* %52)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr_1 = [3 x [4 x i8]] [[4 x i8] c"123\00", [4 x i8] c"qwe\00", [4 x i8] c"asd\00"]
@.str.1 = [21 x i8] c"arr_1 [ %d ] = %s; \00"
@.str.4 = [26 x i8] c"arr1 [ %d ] [ %d ] = %c;\0A\00"
@str = [34 x i8] c"\0APrint every string of 2d array:\0A\00"
@str.7 = [42 x i8] c"\0AAnd now every symbol on its own string:\0A\00"
@str.8 = [47 x i8] c"\0AAnd now we will pass 2d array in function f1:\00"
@str.9 = [31 x i8] c"==============================\00"
define i32 @main() {
%1 = alloca [3 x [4 x i8]]
%2 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 0, i8* %2)
%5 = call i32 @putchar(i32 10)
%6 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 1, i64 0
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 1, i8* %6)
%8 = call i32 @putchar(i32 10)
%9 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 2, i64 0
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 2, i8* %9)
%11 = call i32 @putchar(i32 10)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.7, i64 0, i64 0))
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 0, i32 %14)
%16 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 0, i64 1
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 1, i32 %18)
%20 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 0, i64 2
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 2, i32 %22)
%24 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 0, i64 3
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 3, i32 %26)
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.9, i64 0, i64 0))
%29 = load i8, i8* %6
%30 = sext i8 %29 to i32
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 1, i32 0, i32 %30)
%32 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 1, i64 1
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 1, i32 1, i32 %34)
%36 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 1, i64 2
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 1, i32 2, i32 %38)
%40 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 1, i64 3
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 1, i32 3, i32 %42)
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.9, i64 0, i64 0))
%45 = load i8, i8* %9
%46 = sext i8 %45 to i32
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 2, i32 0, i32 %46)
%48 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 2, i64 1
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 2, i32 1, i32 %50)
%52 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 2, i64 2
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 2, i32 2, i32 %54)
%56 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 2, i64 3
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 2, i32 3, i32 %58)
%60 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.9, i64 0, i64 0))
%61 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.8, i64 0, i64 0))
%62 = getelementptr inbounds [3 x [4 x i8]], [3 x [4 x i8]]* %1, i64 0, i64 0
%63 = call i32 ([4 x i8]*, ...) bitcast (i32 (...)* @f1 to i32 ([4 x i8]*, ...)*)([4 x i8]* %62)
ret i32 0
}