// File: /workspace/github_cpp_makefile_star2_O3/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 0x5ab4
leaq 0x50(%rsp), %rdi
callq 0x2810
movq 0x8(%rbx), %rsi
leaq 0x50(%rsp), %rdi
callq 0x2360
leaq 0xa0(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2950
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x2957
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 0x66a7(%rip), %rsi      # 0x9024
callq 0x2360
leaq 0x10(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x29a8
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x29ae
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 0x29d8
callq 0x21f0
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29eb
callq 0x21f0
movq 0x70(%rsp), %rbx
movq 0x78(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq %rax, %rbx
je 0x2abc
leaq 0x50(%rsp), %r14
leaq 0xe0(%rsp), %r15
leaq 0x90(%rsp), %r13
leaq 0x30(%rsp), %rbp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b7c
movq %r15, %rdi
movq %r14, %rsi
callq 0x2b7c
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x3176
movq %rax, %r12
movq %r15, %rdi
callq 0x2c0e
movl 0x88(%rsp), %esi
movq %r13, %rdi
movq %r12, %rdx
callq 0x273c
movq %r13, %rdi
callq 0x46d2
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x2ca0
movq %r13, %rdi
movq %rbp, %rsi
callq 0x4bc8
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2aa5
callq 0x21f0
movq %r14, %rdi
callq 0x2c0e
addq $0x18, %rbx
cmpq 0x20(%rsp), %rbx
jne 0x2a1d
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2acf
callq 0x21f0
leaq 0x70(%rsp), %rdi
callq 0x2c54
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 0x2b07
callq 0x21f0
jmp 0x2b07
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x2b5f
movq %rax, %rbx
jmp 0x2b69
movq %rax, %rbx
jmp 0x2b56
jmp 0x2b49
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x2c0e
jmp 0x2b4c
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2b4c
callq 0x21f0
jmp 0x2b4c
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x2c0e
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2b69
callq 0x21f0
leaq 0x70(%rsp), %rdi
callq 0x2c54
movq %rbx, %rdi
callq 0x2320
nop