#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*/ journey(char *, char *);
int /*<<< orphan*/ matrixmake(char *, int, int, int, int, int);
main() {
  matrixmake("journeydata/1-1.in", 2, 9, 9, 1, 8);
  journey("journeydata/1-1.in", "journeydata/1-1.out");
  matrixmake("journeydata/1-2.in", 2, 8, 8, 1, 8);
  journey("journeydata/1-2.in", "journeydata/1-2.out");
  matrixmake("journeydata/2-1.in", 133, 18, 8, 1, 9);
  journey("journeydata/2-1.in", "journeydata/2-1.out");
  matrixmake("journeydata/2-2.in", 147, 18, 8, 1, 9);
  journey("journeydata/2-2.in", "journeydata/2-2.out");
  matrixmake("journeydata/3-1.in", 228, 99, 99, 9, 19);
  journey("journeydata/3-1.in", "journeydata/3-1.out");
  matrixmake("journeydata/3-2.in", 328, 99, 99, 9, 19);
  journey("journeydata/3-2.in", "journeydata/3-2.out");
  matrixmake("journeydata/4-1.in", 557, 10000, 25, 10, 25);
  journey("journeydata/4-1.in", "journeydata/4-1.out");
  matrixmake("journeydata/4-2.in", 5557, 6000, 150, 125, 25);
  journey("journeydata/4-2.in", "journeydata/4-2.out");
  matrixmake("journeydata/4-3.in", 257, 800, 400, 100, 25);
  journey("journeydata/4-3.in", "journeydata/4-3.out");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x2,%esi
mov    $0x9,%ecx
mov    $0x1,%r8d
mov    $0x8,%r9d
mov    %ecx,%edx
call   1040 <matrixmake@plt>
lea    0xeb1(%rip),%rdi
lea    0xebd(%rip),%rsi
call   1030 <journey@plt>
lea    0xec5(%rip),%rdi
mov    $0x2,%esi
mov    $0x8,%r9d
mov    $0x1,%r8d
mov    %r9d,%edx
mov    %r9d,%ecx
call   1040 <matrixmake@plt>
lea    0xea2(%rip),%rdi
lea    0xeae(%rip),%rsi
call   1030 <journey@plt>
lea    0xeb6(%rip),%rdi
mov    $0x85,%esi
mov    $0x12,%edx
mov    $0x8,%ecx
mov    $0x1,%r8d
mov    $0x9,%r9d
call   1040 <matrixmake@plt>
lea    0xe8f(%rip),%rdi
lea    0xe9b(%rip),%rsi
call   1030 <journey@plt>
lea    0xea3(%rip),%rdi
mov    $0x93,%esi
mov    $0x12,%edx
mov    $0x8,%ecx
mov    $0x1,%r8d
mov    $0x9,%r9d
call   1040 <matrixmake@plt>
lea    0xe7c(%rip),%rdi
lea    0xe88(%rip),%rsi
call   1030 <journey@plt>
lea    0xe90(%rip),%rdi
mov    $0xe4,%esi
mov    $0x63,%ecx
mov    $0x9,%r8d
mov    $0x13,%r9d
mov    %ecx,%edx
call   1040 <matrixmake@plt>
lea    0xe6c(%rip),%rdi
lea    0xe78(%rip),%rsi
call   1030 <journey@plt>
lea    0xe80(%rip),%rdi
mov    $0x148,%esi
mov    $0x63,%ecx
mov    $0x9,%r8d
mov    $0x13,%r9d
mov    %ecx,%edx
call   1040 <matrixmake@plt>
lea    0xe5c(%rip),%rdi
lea    0xe68(%rip),%rsi
call   1030 <journey@plt>
lea    0xe70(%rip),%rdi
mov    $0x22d,%esi
mov    $0x2710,%edx
mov    $0x19,%r9d
mov    $0xa,%r8d
mov    %r9d,%ecx
call   1040 <matrixmake@plt>
lea    0xe4b(%rip),%rdi
lea    0xe57(%rip),%rsi
call   1030 <journey@plt>
lea    0xe5f(%rip),%rdi
mov    $0x15b5,%esi
mov    $0x1770,%edx
mov    $0x96,%ecx
mov    $0x7d,%r8d
mov    $0x19,%r9d
call   1040 <matrixmake@plt>
lea    0xe38(%rip),%rdi
lea    0xe44(%rip),%rsi
call   1030 <journey@plt>
lea    0xe4c(%rip),%rdi
mov    $0x101,%esi
mov    $0x320,%edx
mov    $0x190,%ecx
mov    $0x64,%r8d
mov    $0x19,%r9d
call   1040 <matrixmake@plt>
lea    0xe25(%rip),%rdi
lea    0xe31(%rip),%rsi
call   1030 <journey@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x9,%edx
mov    $0x9,%ecx
mov    $0x1,%r8d
mov    $0x8,%r9d
call   1040 <matrixmake@plt>
lea    0xec1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <journey@plt>
lea    0xec6(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x8,%edx
mov    $0x8,%ecx
mov    $0x1,%r8d
mov    $0x8,%r9d
call   1040 <matrixmake@plt>
lea    0xeaf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <journey@plt>
lea    0xeb4(%rip),%rbx
mov    %rbx,%rdi
mov    $0x85,%esi
mov    $0x12,%edx
mov    $0x8,%ecx
mov    $0x1,%r8d
mov    $0x9,%r9d
call   1040 <matrixmake@plt>
lea    0xe9d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <journey@plt>
lea    0xea2(%rip),%rbx
mov    %rbx,%rdi
mov    $0x93,%esi
mov    $0x12,%edx
mov    $0x8,%ecx
mov    $0x1,%r8d
mov    $0x9,%r9d
call   1040 <matrixmake@plt>
lea    0xe8b(%rip),%rsi
mov    %rbx,%rdi
call   1030 <journey@plt>
lea    0xe90(%rip),%rbx
mov    %rbx,%rdi
mov    $0xe4,%esi
mov    $0x63,%edx
mov    $0x63,%ecx
mov    $0x9,%r8d
mov    $0x13,%r9d
call   1040 <matrixmake@plt>
lea    0xe79(%rip),%rsi
mov    %rbx,%rdi
call   1030 <journey@plt>
lea    0xe7e(%rip),%rbx
mov    %rbx,%rdi
mov    $0x148,%esi
mov    $0x63,%edx
mov    $0x63,%ecx
mov    $0x9,%r8d
mov    $0x13,%r9d
call   1040 <matrixmake@plt>
lea    0xe67(%rip),%rsi
mov    %rbx,%rdi
call   1030 <journey@plt>
lea    0xe6c(%rip),%rbx
mov    %rbx,%rdi
mov    $0x22d,%esi
mov    $0x2710,%edx
mov    $0x19,%ecx
mov    $0xa,%r8d
mov    $0x19,%r9d
call   1040 <matrixmake@plt>
lea    0xe55(%rip),%rsi
mov    %rbx,%rdi
call   1030 <journey@plt>
lea    0xe5a(%rip),%rbx
mov    %rbx,%rdi
mov    $0x15b5,%esi
mov    $0x1770,%edx
mov    $0x96,%ecx
mov    $0x7d,%r8d
mov    $0x19,%r9d
call   1040 <matrixmake@plt>
lea    0xe43(%rip),%rsi
mov    %rbx,%rdi
call   1030 <journey@plt>
lea    0xe48(%rip),%rbx
mov    %rbx,%rdi
mov    $0x101,%esi
mov    $0x320,%edx
mov    $0x190,%ecx
mov    $0x64,%r8d
mov    $0x19,%r9d
call   1040 <matrixmake@plt>
lea    0xe31(%rip),%rsi
mov    %rbx,%rdi
call   1030 <journey@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"journeydata/1-1.in\00"
@.str.1 = [20 x i8] c"journeydata/1-1.out\00"
@.str.2 = [19 x i8] c"journeydata/1-2.in\00"
@.str.3 = [20 x i8] c"journeydata/1-2.out\00"
@.str.4 = [19 x i8] c"journeydata/2-1.in\00"
@.str.5 = [20 x i8] c"journeydata/2-1.out\00"
@.str.6 = [19 x i8] c"journeydata/2-2.in\00"
@.str.7 = [20 x i8] c"journeydata/2-2.out\00"
@.str.8 = [19 x i8] c"journeydata/3-1.in\00"
@.str.9 = [20 x i8] c"journeydata/3-1.out\00"
@.str.10 = [19 x i8] c"journeydata/3-2.in\00"
@.str.11 = [20 x i8] c"journeydata/3-2.out\00"
@.str.12 = [19 x i8] c"journeydata/4-1.in\00"
@.str.13 = [20 x i8] c"journeydata/4-1.out\00"
@.str.14 = [19 x i8] c"journeydata/4-2.in\00"
@.str.15 = [20 x i8] c"journeydata/4-2.out\00"
@.str.16 = [19 x i8] c"journeydata/4-3.in\00"
@.str.17 = [20 x i8] c"journeydata/4-3.out\00"
define i32 @main() {
%1 = call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 2, i32 9, i32 9, i32 1, i32 8)
%2 = call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 2, i32 8, i32 8, i32 1, i32 8)
%4 = call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 133, i32 18, i32 8, i32 1, i32 9)
%6 = call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 147, i32 18, i32 8, i32 1, i32 9)
%8 = call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i32 228, i32 99, i32 99, i32 9, i32 19)
%10 = call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 328, i32 99, i32 99, i32 9, i32 19)
%12 = call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i32 557, i32 10000, i32 25, i32 10, i32 25)
%14 = call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i32 5557, i32 6000, i32 150, i32 125, i32 25)
%16 = call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.16, i64 0, i64 0), i32 257, i32 800, i32 400, i32 100, i32 25)
%18 = call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.17, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"journeydata/1-1.in\00"
@.str.1 = [20 x i8] c"journeydata/1-1.out\00"
@.str.2 = [19 x i8] c"journeydata/1-2.in\00"
@.str.3 = [20 x i8] c"journeydata/1-2.out\00"
@.str.4 = [19 x i8] c"journeydata/2-1.in\00"
@.str.5 = [20 x i8] c"journeydata/2-1.out\00"
@.str.6 = [19 x i8] c"journeydata/2-2.in\00"
@.str.7 = [20 x i8] c"journeydata/2-2.out\00"
@.str.8 = [19 x i8] c"journeydata/3-1.in\00"
@.str.9 = [20 x i8] c"journeydata/3-1.out\00"
@.str.10 = [19 x i8] c"journeydata/3-2.in\00"
@.str.11 = [20 x i8] c"journeydata/3-2.out\00"
@.str.12 = [19 x i8] c"journeydata/4-1.in\00"
@.str.13 = [20 x i8] c"journeydata/4-1.out\00"
@.str.14 = [19 x i8] c"journeydata/4-2.in\00"
@.str.15 = [20 x i8] c"journeydata/4-2.out\00"
@.str.16 = [19 x i8] c"journeydata/4-3.in\00"
@.str.17 = [20 x i8] c"journeydata/4-3.out\00"
define i32 @main() {
%1 = tail call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 2, i32 9, i32 9, i32 1, i32 8)
%2 = tail call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 2, i32 8, i32 8, i32 1, i32 8)
%4 = tail call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 133, i32 18, i32 8, i32 1, i32 9)
%6 = tail call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 147, i32 18, i32 8, i32 1, i32 9)
%8 = tail call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i32 228, i32 99, i32 99, i32 9, i32 19)
%10 = tail call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%11 = tail call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 328, i32 99, i32 99, i32 9, i32 19)
%12 = tail call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0))
%13 = tail call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i32 557, i32 10000, i32 25, i32 10, i32 25)
%14 = tail call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%15 = tail call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i32 5557, i32 6000, i32 150, i32 125, i32 25)
%16 = tail call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.15, i64 0, i64 0))
%17 = tail call i32 @matrixmake(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.16, i64 0, i64 0), i32 257, i32 800, i32 400, i32 100, i32 25)
%18 = tail call i32 @journey(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.17, i64 0, i64 0))
ret i32 0
}