// File: /workspace/github_cpp_makefile_star2_O1/JacobLCarter[P]2D-Portal/utils.cpp
// Function: fillArray(int*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void fillArray(int *array, std::string filename)
{
    std::ifstream fins;
    fins.open(filename.c_str());
    
    std::string line;
    
    while (std::getline(fins, line))
    {
        line.erase(std::remove_if(line.begin(), line.end(), isspace), line.end());

        for (unsigned int i = 0; i < line.size(); i++)
        {
            int j = line[i] - '0'; 
            array[i] = j;
        }
    }
    fins.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x2170
movq (%r15), %rsi
movq %r12, %rdi
movl $0x8, %edx
callq 0x20d0
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %edx
movq %r12, %rdi
movq %rsp, %rsi
callq 0x2260
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6540
movq (%rsp), %r12
movq 0x8(%rsp), %r14
leaq (%r12,%r14), %r13
movq %r14, %r15
sarq $0x2, %r15
testq %r15, %r15
jle 0x646a
andq $-0x4, %r14
addq %r12, %r14
incq %r15
addq $0x3, %r12
movq %r12, %rbp
movsbl -0x3(%rbp), %edi
callq 0x2050
testl %eax, %eax
jne 0x64bc
movsbl -0x2(%rbp), %edi
callq 0x2050
testl %eax, %eax
jne 0x64c2
movsbl -0x1(%rbp), %edi
callq 0x2050
testl %eax, %eax
jne 0x64c8
movsbl (%rbp), %edi
callq 0x2050
testl %eax, %eax
jne 0x64cb
decq %r15
addq $0x4, %rbp
cmpq $0x1, %r15
jg 0x641e
movq %r14, %r12
movq %r13, %rax
subq %r12, %rax
cmpq $0x1, %rax
je 0x64a7
cmpq $0x2, %rax
je 0x6496
movq %r13, %rbp
cmpq $0x3, %rax
jne 0x64cb
movsbl (%r12), %edi
callq 0x2050
testl %eax, %eax
jne 0x64b7
incq %r12
movsbl (%r12), %edi
callq 0x2050
testl %eax, %eax
jne 0x64b7
incq %r12
movsbl (%r12), %edi
callq 0x2050
testl %eax, %eax
cmoveq %r13, %r12
movq %r12, %rbp
jmp 0x64cb
addq $-0x3, %rbp
jmp 0x64cb
addq $-0x2, %rbp
jmp 0x64cb
decq %rbp
cmpq %r13, %rbp
sete %al
leaq 0x1(%rbp), %r14
cmpq %r13, %r14
sete %cl
leaq 0x20(%rsp), %r12
orb %al, %cl
jne 0x6503
movb (%r14), %r15b
movsbl %r15b, %edi
callq 0x2050
testl %eax, %eax
jne 0x64fb
movb %r15b, (%rbp)
incq %rbp
incq %r14
cmpq %r13, %r14
jne 0x64e4
movq %rbp, %rax
subq (%rsp), %rax
movq %rax, 0x8(%rsp)
movb $0x0, (%rbp)
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x63be
movq (%rsp), %rcx
xorl %edx, %edx
movsbl (%rcx,%rdx), %esi
addl $-0x30, %esi
movl %esi, (%rbx,%rdx,4)
incq %rdx
movl %edx, %esi
cmpq %rsi, %rax
ja 0x6527
jmp 0x63be
leaq 0x20(%rsp), %rdi
callq 0x2060
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6565
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x20(%rsp), %rdi
callq 0x2070
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6588
movq %rax, %rbx
jmp 0x65a6
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x65a6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x20(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2240