#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArray(int **arr) {
  int c, r;
  for (r = 0; r < 10; r++) {
    for (c = 0; c < 32; c++) {
      printf("%d", arr[c][r]);
    }
    printf("\n");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    1189 <printArray+0x79>
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    116d <printArray+0x5d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <printArray+0x24>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1123 <printArray+0x13>
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
lea    0xed1(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rax
mov    (%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    1140 <printArray+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe95(%rip),%r14
xor    %ebx,%ebx
nopl   (%rax)
mov    (%r15,%rbx,8),%rax
mov    0x4(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    1170 <printArray+0x50>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe64(%rip),%r14
xor    %ebx,%ebx
xchg   %ax,%ax
mov    (%r15,%rbx,8),%rax
mov    0x8(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    11a0 <printArray+0x80>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe34(%rip),%r14
xor    %ebx,%ebx
xchg   %ax,%ax
mov    (%r15,%rbx,8),%rax
mov    0xc(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    11d0 <printArray+0xb0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe04(%rip),%r14
xor    %ebx,%ebx
xchg   %ax,%ax
mov    (%r15,%rbx,8),%rax
mov    0x10(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    1200 <printArray+0xe0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xdd4(%rip),%r14
xor    %ebx,%ebx
xchg   %ax,%ax
mov    (%r15,%rbx,8),%rax
mov    0x14(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    1230 <printArray+0x110>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xda4(%rip),%r14
xor    %ebx,%ebx
xchg   %ax,%ax
mov    (%r15,%rbx,8),%rax
mov    0x18(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    1260 <printArray+0x140>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd74(%rip),%r14
xor    %ebx,%ebx
xchg   %ax,%ax
mov    (%r15,%rbx,8),%rax
mov    0x1c(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    1290 <printArray+0x170>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd44(%rip),%r14
xor    %ebx,%ebx
xchg   %ax,%ax
mov    (%r15,%rbx,8),%rax
mov    0x20(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    12c0 <printArray+0x1a0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd14(%rip),%r14
xor    %ebx,%ebx
xchg   %ax,%ax
mov    (%r15,%rbx,8),%rax
mov    0x24(%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    12f0 <printArray+0x1d0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @printArray(i32** nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %8, %2 ]
%4 = getelementptr inbounds i32*, i32** %0, i64 %3
%5 = load i32*, i32** %4
%6 = load i32, i32* %5
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = add nuw nsw i64 %3, 1
%9 = icmp eq i64 %8, 32
br i1 %9, label %10, label %2
10: ; preds = %2
%11 = tail call i32 @putchar(i32 10)
br label %12
12: ; preds = %12, %10
%13 = phi i64 [ 0, %10 ], [ %19, %12 ]
%14 = getelementptr inbounds i32*, i32** %0, i64 %13
%15 = load i32*, i32** %14
%16 = getelementptr inbounds i32, i32* %15, i64 1
%17 = load i32, i32* %16
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = add nuw nsw i64 %13, 1
%20 = icmp eq i64 %19, 32
br i1 %20, label %21, label %12
21: ; preds = %12
%22 = tail call i32 @putchar(i32 10)
br label %23
23: ; preds = %23, %21
%24 = phi i64 [ 0, %21 ], [ %30, %23 ]
%25 = getelementptr inbounds i32*, i32** %0, i64 %24
%26 = load i32*, i32** %25
%27 = getelementptr inbounds i32, i32* %26, i64 2
%28 = load i32, i32* %27
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %28)
%30 = add nuw nsw i64 %24, 1
%31 = icmp eq i64 %30, 32
br i1 %31, label %32, label %23
32: ; preds = %23
%33 = tail call i32 @putchar(i32 10)
br label %34
34: ; preds = %34, %32
%35 = phi i64 [ 0, %32 ], [ %41, %34 ]
%36 = getelementptr inbounds i32*, i32** %0, i64 %35
%37 = load i32*, i32** %36
%38 = getelementptr inbounds i32, i32* %37, i64 3
%39 = load i32, i32* %38
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %39)
%41 = add nuw nsw i64 %35, 1
%42 = icmp eq i64 %41, 32
br i1 %42, label %43, label %34
43: ; preds = %34
%44 = tail call i32 @putchar(i32 10)
br label %45
45: ; preds = %45, %43
%46 = phi i64 [ 0, %43 ], [ %52, %45 ]
%47 = getelementptr inbounds i32*, i32** %0, i64 %46
%48 = load i32*, i32** %47
%49 = getelementptr inbounds i32, i32* %48, i64 4
%50 = load i32, i32* %49
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %50)
%52 = add nuw nsw i64 %46, 1
%53 = icmp eq i64 %52, 32
br i1 %53, label %54, label %45
54: ; preds = %45
%55 = tail call i32 @putchar(i32 10)
br label %56
56: ; preds = %56, %54
%57 = phi i64 [ 0, %54 ], [ %63, %56 ]
%58 = getelementptr inbounds i32*, i32** %0, i64 %57
%59 = load i32*, i32** %58
%60 = getelementptr inbounds i32, i32* %59, i64 5
%61 = load i32, i32* %60
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %61)
%63 = add nuw nsw i64 %57, 1
%64 = icmp eq i64 %63, 32
br i1 %64, label %65, label %56
65: ; preds = %56
%66 = tail call i32 @putchar(i32 10)
br label %67
67: ; preds = %67, %65
%68 = phi i64 [ 0, %65 ], [ %74, %67 ]
%69 = getelementptr inbounds i32*, i32** %0, i64 %68
%70 = load i32*, i32** %69
%71 = getelementptr inbounds i32, i32* %70, i64 6
%72 = load i32, i32* %71
%73 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %72)
%74 = add nuw nsw i64 %68, 1
%75 = icmp eq i64 %74, 32
br i1 %75, label %76, label %67
76: ; preds = %67
%77 = tail call i32 @putchar(i32 10)
br label %78
78: ; preds = %78, %76
%79 = phi i64 [ 0, %76 ], [ %85, %78 ]
%80 = getelementptr inbounds i32*, i32** %0, i64 %79
%81 = load i32*, i32** %80
%82 = getelementptr inbounds i32, i32* %81, i64 7
%83 = load i32, i32* %82
%84 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %83)
%85 = add nuw nsw i64 %79, 1
%86 = icmp eq i64 %85, 32
br i1 %86, label %87, label %78
87: ; preds = %78
%88 = tail call i32 @putchar(i32 10)
br label %89
89: ; preds = %89, %87
%90 = phi i64 [ 0, %87 ], [ %96, %89 ]
%91 = getelementptr inbounds i32*, i32** %0, i64 %90
%92 = load i32*, i32** %91
%93 = getelementptr inbounds i32, i32* %92, i64 8
%94 = load i32, i32* %93
%95 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %94)
%96 = add nuw nsw i64 %90, 1
%97 = icmp eq i64 %96, 32
br i1 %97, label %98, label %89
98: ; preds = %89
%99 = tail call i32 @putchar(i32 10)
br label %100
100: ; preds = %100, %98
%101 = phi i64 [ 0, %98 ], [ %107, %100 ]
%102 = getelementptr inbounds i32*, i32** %0, i64 %101
%103 = load i32*, i32** %102
%104 = getelementptr inbounds i32, i32* %103, i64 9
%105 = load i32, i32* %104
%106 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %105)
%107 = add nuw nsw i64 %101, 1
%108 = icmp eq i64 %107, 32
br i1 %108, label %109, label %100
109: ; preds = %100
%110 = tail call i32 @putchar(i32 10)
%111 = tail call i32 @putchar(i32 10)
ret void
}