// File: /workspace/github_cpp_makefile_star2_O1/camargodev[P]n-tile-puzzle/Main.cpp
// Function: main
int main(int argc, char** argv)
{   
    StateManager manager;
    InputReader reader;
    Input input = reader.parseInput(argc, argv);

    string fileName = currentTime() + argv[1] + ".csv";

    for (auto unpackedState : input.states) {
        PackedState state = manager.pack(unpackedState);
        Result result = processAlgorithm(input.algorithm, state);
        result.printResult(); 
        result.writeResult(fileName);
    }
    return 0;
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %rbx
movl %edi, %edx
movw $0x0, 0xc8(%rsp)
movq $0xf, 0xd0(%rsp)
leaq 0x2c(%rsp), %rsi
movl $0x1, (%rsi)
leaq 0x70(%rsp), %rdi
movq %rbx, %rcx
callq 0x5ad2
leaq 0x50(%rsp), %rdi
callq 0x2820
movq 0x8(%rbx), %rsi
leaq 0x50(%rsp), %rdi
callq 0x2370
leaq 0xa0(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2958
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x295f
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x90(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x669f(%rip), %rsi      # 0x9024
callq 0x2370
leaq 0x10(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x29b0
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x29b6
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x29e0
callq 0x2200
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29f3
callq 0x2200
movq 0x70(%rsp), %rbx
movq 0x78(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq %rax, %rbx
je 0x2ac4
leaq 0x50(%rsp), %r14
leaq 0xe0(%rsp), %r15
leaq 0x90(%rsp), %r13
leaq 0x30(%rsp), %rbp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b84
movq %r15, %rdi
movq %r14, %rsi
callq 0x2b84
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x3166
movq %rax, %r12
movq %r15, %rdi
callq 0x2c16
movl 0x88(%rsp), %esi
movq %r13, %rdi
movq %r12, %rdx
callq 0x274c
movq %r13, %rdi
callq 0x46da
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x2c9c
movq %r13, %rdi
movq %rbp, %rsi
callq 0x4bd0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2aad
callq 0x2200
movq %r14, %rdi
callq 0x2c16
addq $0x18, %rbx
cmpq 0x20(%rsp), %rbx
jne 0x2a25
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2ad7
callq 0x2200
leaq 0x70(%rsp), %rdi
callq 0x2c56
xorl %eax, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x2b0f
callq 0x2200
jmp 0x2b0f
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x2b67
movq %rax, %rbx
jmp 0x2b71
movq %rax, %rbx
jmp 0x2b5e
jmp 0x2b51
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x2c16
jmp 0x2b54
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2b54
callq 0x2200
jmp 0x2b54
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x2c16
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2b71
callq 0x2200
leaq 0x70(%rsp), %rdi
callq 0x2c56
movq %rbx, %rdi
callq 0x2330
nop