#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*/ dijkstra(int **, int /*<<< orphan*/, int *);
int /*<<< orphan*/ printSolution(int *);
int main() {
  int graph[10][10] = {
      {0, 6, 0, 0, 0, 0, 6, 0, 0, 0},  {5, 0, 0, 0, 100, 0, 43, 0, 0, 0},
      {74, 0, 0, 0, 8, 2, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 4, 0, 6},
      {0, 0, 7, 0, 0, 0, 64, 1, 0, 0}, {0, 0, 5, 0, 0, 0, 0, 0, 0, 0},
      {9, 96, 0, 0, 0, 0, 0, 0, 5, 0}, {0, 0, 0, 10, 3, 0, 0, 0, 0, 0},
      {0, 0, 0, 0, 0, 74, 7, 0, 0, 4}, {0, 0, 0, 6, 0, 0, 0, 0, 5, 0}};
  int d[10];
  dijkstra(graph, 0, d);
  printSolution(d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1a0(%rbp),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x190,%edx
call   1030 <memcpy@plt>
lea    -0x1a0(%rbp),%rdi
lea    -0x1d0(%rbp),%rdx
xor    %esi,%esi
call   1040 <dijkstra@plt>
lea    -0x1d0(%rbp),%rdi
call   1050 <printSolution@plt>
xor    %eax,%eax
add    $0x1d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x1c8,%rsp
lea    0xebf(%rip),%rsi
lea    0x30(%rsp),%r14
mov    $0x190,%edx
mov    %r14,%rdi
call   1030 <memcpy@plt>
mov    %rsp,%rbx
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1040 <dijkstra@plt>
mov    %rbx,%rdi
call   1050 <printSolution@plt>
xor    %eax,%eax
add    $0x1c8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.graph = [10 x [10 x i32]] [[10 x i32] [i32 0, i32 6, i32 0, i32 0, i32 0, i32 0, i32 6, i32 0, i32 0, i32 0], [10 x i32] [i32 5, i32 0, i32 0, i32 0, i32 100, i32 0, i32 43, i32 0, i32 0, i32 0], [10 x i32] [i32 74, i32 0, i32 0, i32 0, i32 8, i32 2, i32 0, i32 0, i32 0, i32 0], [10 x i32] [i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 4, i32 0, i32 6], [10 x i32] [i32 0, i32 0, i32 7, i32 0, i32 0, i32 0, i32 64, i32 1, i32 0, i32 0], [10 x i32] [i32 0, i32 0, i32 5, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0], [10 x i32] [i32 9, i32 96, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 5, i32 0], [10 x i32] [i32 0, i32 0, i32 0, i32 10, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0], [10 x i32] [i32 0, i32 0, i32 0, i32 0, i32 0, i32 74, i32 7, i32 0, i32 0, i32 4], [10 x i32] [i32 0, i32 0, i32 0, i32 6, i32 0, i32 0, i32 0, i32 0, i32 5, i32 0]]
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x [10 x i32]]
%3 = alloca [10 x i32]
store i32 0, i32* %1
%4 = bitcast [10 x [10 x i32]]* %2 to i8*
%5 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %2, i64 0, i64 0
%6 = bitcast [10 x i32]* %5 to i32**
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%8 = call i32 @dijkstra(i32** %6, i32 0, i32* %7)
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%10 = call i32 @printSolution(i32* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.graph = [10 x [10 x i32]] [[10 x i32] [i32 0, i32 6, i32 0, i32 0, i32 0, i32 0, i32 6, i32 0, i32 0, i32 0], [10 x i32] [i32 5, i32 0, i32 0, i32 0, i32 100, i32 0, i32 43, i32 0, i32 0, i32 0], [10 x i32] [i32 74, i32 0, i32 0, i32 0, i32 8, i32 2, i32 0, i32 0, i32 0, i32 0], [10 x i32] [i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 4, i32 0, i32 6], [10 x i32] [i32 0, i32 0, i32 7, i32 0, i32 0, i32 0, i32 64, i32 1, i32 0, i32 0], [10 x i32] [i32 0, i32 0, i32 5, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0], [10 x i32] [i32 9, i32 96, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 5, i32 0], [10 x i32] [i32 0, i32 0, i32 0, i32 10, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0], [10 x i32] [i32 0, i32 0, i32 0, i32 0, i32 0, i32 74, i32 7, i32 0, i32 0, i32 4], [10 x i32] [i32 0, i32 0, i32 0, i32 6, i32 0, i32 0, i32 0, i32 0, i32 5, i32 0]]
define i32 @main() {
%1 = alloca [10 x [10 x i32]]
%2 = alloca [10 x i32]
%3 = bitcast [10 x [10 x i32]]* %1 to i8*
%4 = bitcast [10 x i32]* %2 to i8*
%5 = bitcast [10 x [10 x i32]]* %1 to i32**
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%7 = call i32 @dijkstra(i32** %5, i32 0, i32* %6)
%8 = call i32 @printSolution(i32* %6)
ret i32 0
}