// File: /workspace/github_cpp_makefile_star2_O3/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), %r14
movq %r14, %rdi
callq 0x2170
movq (%r15), %rsi
movq %r14, %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 %r14, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %edx
movq %r14, %rdi
movq %rsp, %rsi
callq 0x2260
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x65bf
movq (%rsp), %r15
movq 0x8(%rsp), %rax
leaq (%r15,%rax), %r12
movq %rax, %r14
sarq $0x2, %r14
movq %r15, %rbp
testq %r14, %r14
jle 0x64e6
andq $-0x4, %rax
movq %rax, %rbp
addq %r15, %rbp
incq %r14
leaq 0x3(%r15), %r13
movsbl -0x3(%r13), %edi
callq 0x2050
testl %eax, %eax
jne 0x6532
movsbl -0x2(%r13), %edi
callq 0x2050
testl %eax, %eax
jne 0x6538
movsbl -0x1(%r13), %edi
callq 0x2050
testl %eax, %eax
jne 0x653e
movsbl (%r13), %edi
callq 0x2050
testl %eax, %eax
jne 0x6541
decq %r14
addq $0x4, %r13
cmpq $0x1, %r14
jg 0x649d
movq %r12, %rax
subq %rbp, %rax
cmpq $0x1, %rax
je 0x651e
cmpq $0x2, %rax
je 0x650e
cmpq $0x3, %rax
jne 0x657a
movsbl (%rbp), %edi
callq 0x2050
testl %eax, %eax
jne 0x652d
incq %rbp
movsbl (%rbp), %edi
callq 0x2050
testl %eax, %eax
jne 0x652d
incq %rbp
movsbl (%rbp), %edi
callq 0x2050
testl %eax, %eax
cmoveq %r12, %rbp
movq %rbp, %r13
jmp 0x6541
addq $-0x3, %r13
jmp 0x6541
addq $-0x2, %r13
jmp 0x6541
decq %r13
cmpq %r12, %r13
sete %al
leaq 0x1(%r13), %r14
cmpq %r12, %r14
sete %cl
orb %al, %cl
jne 0x657d
movb (%r14), %bpl
movsbl %bpl, %edi
callq 0x2050
testl %eax, %eax
jne 0x656c
movb %bpl, (%r13)
incq %r13
incq %r14
cmpq %r12, %r14
jne 0x6555
movq (%rsp), %r15
jmp 0x657d
movq %r12, %r13
leaq 0x20(%rsp), %r14
movq %r13, %rax
subq %r15, %rax
movq %rax, 0x8(%rsp)
movb $0x0, (%r13)
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x643a
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 0x65a6
jmp 0x643a
leaq 0x20(%rsp), %rdi
callq 0x2060
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x65e4
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 0x6607
movq %rax, %rbx
jmp 0x6625
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6625
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x20(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2240