#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 */
typedef int /*<<< orphan*/ seq;

/* Variables and functions */
int /*<<< orphan*/ Prim(int /*<<< orphan*/);
int /*<<< orphan*/ matrix_display();
int /*<<< orphan*/ matrix_init(int **, int);
int main() {
  int seq[][3] = {{0, 1, 10}, {0, 5, 11}, {1, 2, 18}, {1, 8, 12}, {1, 6, 16},
                  {2, 8, 8},  {2, 3, 22}, {3, 6, 24}, {3, 7, 16}, {3, 4, 20},
                  {4, 7, 7},  {4, 5, 26}, {5, 6, 17}, {6, 7, 19}, {8, 3, 21}};
  int num = sizeof(seq) / sizeof(*seq);
  matrix_init(seq, num);
  matrix_display();
  Prim(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xc0(%rbp),%rdi
lea    0xea0(%rip),%rsi
mov    $0xb4,%edx
call   1040 <memcpy@plt>
movl   $0xf,-0xc4(%rbp)
lea    -0xc0(%rbp),%rdi
mov    -0xc4(%rbp),%esi
call   1030 <matrix_init@plt>
mov    $0x0,%al
call   1050 <matrix_display@plt>
xor    %edi,%edi
call   1060 <Prim@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xc0,%rsp
lea    0xeb1(%rip),%rsi
mov    %rsp,%rbx
mov    $0xb4,%edx
mov    %rbx,%rdi
call   1040 <memcpy@plt>
mov    %rbx,%rdi
mov    $0xf,%esi
call   1030 <matrix_init@plt>
xor    %eax,%eax
call   1050 <matrix_display@plt>
xor    %edi,%edi
call   1060 <Prim@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.seq = [15 x [3 x i32]] [[3 x i32] [i32 0, i32 1, i32 10], [3 x i32] [i32 0, i32 5, i32 11], [3 x i32] [i32 1, i32 2, i32 18], [3 x i32] [i32 1, i32 8, i32 12], [3 x i32] [i32 1, i32 6, i32 16], [3 x i32] [i32 2, i32 8, i32 8], [3 x i32] [i32 2, i32 3, i32 22], [3 x i32] [i32 3, i32 6, i32 24], [3 x i32] [i32 3, i32 7, i32 16], [3 x i32] [i32 3, i32 4, i32 20], [3 x i32] [i32 4, i32 7, i32 7], [3 x i32] [i32 4, i32 5, i32 26], [3 x i32] [i32 5, i32 6, i32 17], [3 x i32] [i32 6, i32 7, i32 19], [3 x i32] [i32 8, i32 3, i32 21]]
define i32 @main() {
%1 = alloca i32
%2 = alloca [15 x [3 x i32]]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [15 x [3 x i32]]* %2 to i8*
store i32 15, i32* %3
%5 = getelementptr inbounds [15 x [3 x i32]], [15 x [3 x i32]]* %2, i64 0, i64 0
%6 = bitcast [3 x i32]* %5 to i32**
%7 = load i32, i32* %3
%8 = call i32 @matrix_init(i32** %6, i32 %7)
%9 = call i32 (...) @matrix_display()
%10 = call i32 @Prim(i32 0)
ret i32 0
}

LLVM IR (-O2):
@__const.main.seq = [15 x [3 x i32]] [[3 x i32] [i32 0, i32 1, i32 10], [3 x i32] [i32 0, i32 5, i32 11], [3 x i32] [i32 1, i32 2, i32 18], [3 x i32] [i32 1, i32 8, i32 12], [3 x i32] [i32 1, i32 6, i32 16], [3 x i32] [i32 2, i32 8, i32 8], [3 x i32] [i32 2, i32 3, i32 22], [3 x i32] [i32 3, i32 6, i32 24], [3 x i32] [i32 3, i32 7, i32 16], [3 x i32] [i32 3, i32 4, i32 20], [3 x i32] [i32 4, i32 7, i32 7], [3 x i32] [i32 4, i32 5, i32 26], [3 x i32] [i32 5, i32 6, i32 17], [3 x i32] [i32 6, i32 7, i32 19], [3 x i32] [i32 8, i32 3, i32 21]]
define i32 @main() {
%1 = alloca [15 x [3 x i32]]
%2 = bitcast [15 x [3 x i32]]* %1 to i8*
%3 = bitcast [15 x [3 x i32]]* %1 to i32**
%4 = call i32 @matrix_init(i32** %3, i32 15)
%5 = call i32 (...) @matrix_display()
%6 = call i32 @Prim(i32 0)
ret i32 0
}