#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*/ print(int **);
int main(void) {
  int i, j, m, n;
  int multiply[20][10] = {0};
  for (i = 0; i <= 20 - 1; i++) {
    multiply[i][0] = i;
  }
  for (j = 0; j <= 10 - 1; j++) {
    multiply[0][j] = j;
  }
  for (m = 1; m <= 20 - 1; m++) {
    for (n = 1; n <= 10 - 1; n++) {
      multiply[m][n] = m * n;
    }
  }
  print(multiply);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x340,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x340(%rbp),%rdi
xor    %esi,%esi
mov    $0x320,%edx
call   1030 <memset@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x13,-0x8(%rbp)
jg     117b <main+0x5b>
mov    -0x8(%rbp),%ecx
movslq -0x8(%rbp),%rdx
lea    -0x340(%rbp),%rax
imul   $0x28,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114c <main+0x2c>
movl   $0x0,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jg     11a8 <main+0x88>
mov    -0xc(%rbp),%ecx
movslq -0xc(%rbp),%rax
mov    %ecx,-0x340(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1182 <main+0x62>
movl   $0x1,-0x10(%rbp)
cmpl   $0x13,-0x10(%rbp)
jg     120b <main+0xeb>
movl   $0x1,-0x14(%rbp)
cmpl   $0x9,-0x14(%rbp)
jg     11f8 <main+0xd8>
mov    -0x10(%rbp),%edx
imul   -0x14(%rbp),%edx
movslq -0x10(%rbp),%rcx
lea    -0x340(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11c0 <main+0xa0>
jmp    11fd <main+0xdd>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11af <main+0x8f>
lea    -0x340(%rbp),%rdi
call   1040 <print@plt>
xor    %eax,%eax
add    $0x340,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x320,%rsp
lea    0x20(%rsp),%rdi
xor    %ebx,%ebx
mov    $0x300,%edx
xor    %esi,%esi
call   1030 <memset@plt>
movl   $0x1,0x28(%rsp)
movl   $0x2,0x50(%rsp)
movl   $0x3,0x78(%rsp)
movl   $0x4,0xa0(%rsp)
movl   $0x5,0xc8(%rsp)
movl   $0x6,0xf0(%rsp)
movl   $0x7,0x118(%rsp)
movl   $0x8,0x140(%rsp)
movl   $0x9,0x168(%rsp)
movl   $0xa,0x190(%rsp)
movl   $0xb,0x1b8(%rsp)
movl   $0xc,0x1e0(%rsp)
movl   $0xd,0x208(%rsp)
movl   $0xe,0x230(%rsp)
movl   $0xf,0x258(%rsp)
movl   $0x10,0x280(%rsp)
movl   $0x11,0x2a8(%rsp)
movl   $0x12,0x2d0(%rsp)
movl   $0x13,0x2f8(%rsp)
movaps 0xdf6(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xdfb(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0x900000008,%rax
mov    %rax,0x20(%rsp)
mov    $0x9,%r8d
mov    $0x8,%r9d
mov    $0x7,%r10d
mov    $0x6,%esi
mov    $0x4,%edi
mov    $0x3,%eax
mov    $0x2,%ecx
mov    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edx,0x2c(%rsp,%rbx,8)
mov    %ecx,0x30(%rsp,%rbx,8)
mov    %eax,0x34(%rsp,%rbx,8)
mov    %edi,0x38(%rsp,%rbx,8)
lea    0x5(%rbx),%r11
mov    %r11d,0x3c(%rsp,%rbx,8)
mov    %esi,0x40(%rsp,%rbx,8)
mov    %r10d,0x44(%rsp,%rbx,8)
mov    %r9d,0x48(%rsp,%rbx,8)
mov    %r8d,0x4c(%rsp,%rbx,8)
add    $0x9,%r8d
add    $0x8,%r9d
add    $0x7,%r10d
add    $0x6,%esi
add    $0x4,%edi
add    $0x3,%eax
add    $0x2,%ecx
add    $0x1,%edx
mov    %r11,%rbx
cmp    $0x5f,%r11
jne    1260 <main+0x140>
mov    %rsp,%rdi
call   1040 <print@plt>
xor    %eax,%eax
add    $0x320,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [20 x [10 x i32]]
store i32 0, i32* %1
%7 = bitcast [20 x [10 x i32]]* %6 to i8*
store i32 0, i32* %2
br label %8
8: ; preds = %17, %0
%9 = load i32, i32* %2
%10 = icmp sle i32 %9, 19
br i1 %10, label %11, label %20
11: ; preds = %8
%12 = load i32, i32* %2
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %6, i64 0, i64 %14
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %15, i64 0, i64 0
store i32 %12, i32* %16
br label %17
17: ; preds = %11
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %8
20: ; preds = %8
store i32 0, i32* %3
br label %21
21: ; preds = %30, %20
%22 = load i32, i32* %3
%23 = icmp sle i32 %22, 9
br i1 %23, label %24, label %33
24: ; preds = %21
%25 = load i32, i32* %3
%26 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %6, i64 0, i64 0
%27 = load i32, i32* %3
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [10 x i32], [10 x i32]* %26, i64 0, i64 %28
store i32 %25, i32* %29
br label %30
30: ; preds = %24
%31 = load i32, i32* %3
%32 = add nsw i32 %31, 1
store i32 %32, i32* %3
br label %21
33: ; preds = %21
store i32 1, i32* %4
br label %34
34: ; preds = %55, %33
%35 = load i32, i32* %4
%36 = icmp sle i32 %35, 19
br i1 %36, label %37, label %58
37: ; preds = %34
store i32 1, i32* %5
br label %38
38: ; preds = %51, %37
%39 = load i32, i32* %5
%40 = icmp sle i32 %39, 9
br i1 %40, label %41, label %54
41: ; preds = %38
%42 = load i32, i32* %4
%43 = load i32, i32* %5
%44 = mul nsw i32 %42, %43
%45 = load i32, i32* %4
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %6, i64 0, i64 %46
%48 = load i32, i32* %5
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [10 x i32], [10 x i32]* %47, i64 0, i64 %49
store i32 %44, i32* %50
br label %51
51: ; preds = %41
%52 = load i32, i32* %5
%53 = add nsw i32 %52, 1
store i32 %53, i32* %5
br label %38
54: ; preds = %38
br label %55
55: ; preds = %54
%56 = load i32, i32* %4
%57 = add nsw i32 %56, 1
store i32 %57, i32* %4
br label %34
58: ; preds = %34
%59 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %6, i64 0, i64 0
%60 = bitcast [10 x i32]* %59 to i32**
%61 = call i32 @print(i32** %60)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [20 x [10 x i32]]
%2 = bitcast [20 x [10 x i32]]* %1 to i8*
%3 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 1, i64 0
%4 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 0, i64 8
%5 = bitcast i32* %4 to i8*
store i32 1, i32* %3
%6 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 2, i64 0
store i32 2, i32* %6
%7 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 3, i64 0
store i32 3, i32* %7
%8 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 4, i64 0
store i32 4, i32* %8
%9 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 5, i64 0
store i32 5, i32* %9
%10 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 6, i64 0
store i32 6, i32* %10
%11 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 7, i64 0
store i32 7, i32* %11
%12 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 8, i64 0
store i32 8, i32* %12
%13 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 9, i64 0
store i32 9, i32* %13
%14 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 10, i64 0
store i32 10, i32* %14
%15 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 11, i64 0
store i32 11, i32* %15
%16 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 12, i64 0
store i32 12, i32* %16
%17 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 13, i64 0
store i32 13, i32* %17
%18 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 14, i64 0
store i32 14, i32* %18
%19 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 15, i64 0
store i32 15, i32* %19
%20 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 16, i64 0
store i32 16, i32* %20
%21 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 17, i64 0
store i32 17, i32* %21
%22 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 18, i64 0
store i32 18, i32* %22
%23 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 19, i64 0
store i32 19, i32* %23
%24 = bitcast [20 x [10 x i32]]* %1 to <4 x i32>*
store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, <4 x i32>* %24
%25 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 0, i64 4
%26 = bitcast i32* %25 to <4 x i32>*
store <4 x i32> <i32 4, i32 5, i32 6, i32 7>, <4 x i32>* %26
%27 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 0, i64 8
store i32 8, i32* %27
%28 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 0, i64 9
store i32 9, i32* %28
br label %29
29: ; preds = %0, %29
%30 = phi i64 [ 1, %0 ], [ %57, %29 ]
%31 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 %30, i64 1
%32 = trunc i64 %30 to i32
store i32 %32, i32* %31
%33 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 %30, i64 2
%34 = trunc i64 %30 to i32
%35 = shl i32 %34, 1
store i32 %35, i32* %33
%36 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 %30, i64 3
%37 = trunc i64 %30 to i32
%38 = mul i32 %37, 3
store i32 %38, i32* %36
%39 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 %30, i64 4
%40 = trunc i64 %30 to i32
%41 = shl i32 %40, 2
store i32 %41, i32* %39
%42 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 %30, i64 5
%43 = trunc i64 %30 to i32
%44 = mul i32 %43, 5
store i32 %44, i32* %42
%45 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 %30, i64 6
%46 = trunc i64 %30 to i32
%47 = mul i32 %46, 6
store i32 %47, i32* %45
%48 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 %30, i64 7
%49 = trunc i64 %30 to i32
%50 = mul i32 %49, 7
store i32 %50, i32* %48
%51 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 %30, i64 8
%52 = trunc i64 %30 to i32
%53 = shl i32 %52, 3
store i32 %53, i32* %51
%54 = getelementptr inbounds [20 x [10 x i32]], [20 x [10 x i32]]* %1, i64 0, i64 %30, i64 9
%55 = trunc i64 %30 to i32
%56 = mul i32 %55, 9
store i32 %56, i32* %54
%57 = add nuw nsw i64 %30, 1
%58 = icmp eq i64 %57, 20
br i1 %58, label %59, label %29
59: ; preds = %29
%60 = bitcast [20 x [10 x i32]]* %1 to i32**
%61 = call i32 @print(i32** %60)
ret i32 0
}