// File: camargodev[P]n-tile-puzzle/src/InputReader.cpp
// Function: InputReader::parseStates(int, char**, bool)
vector<UnpackedState> InputReader :: parseStates(int argc, char** argv, bool isTxt) {
    string input = parseStatesToString(argc, argv, isTxt);
    vector<string> strStates;
    if(isTxt){
        strStates = split(input, '\n');
    }
    else{
        strStates = split(input, ',');
    }
    vector<UnpackedState> states;
    for (auto state : strStates) 
        states.push_back(getStateFromString(state));
    return states;
}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, (%rsp)
movb %r8b, %al
movq %rdi, %r8
movq %r8, 0x8(%rsp)
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movl %edx, 0x124(%rsp)
movq %rcx, 0x118(%rsp)
andb $0x1, %al
movb %al, 0x117(%rsp)
movq 0x128(%rsp), %rsi
movq %rsi, 0x10(%rsp)
movl 0x124(%rsp), %edx
movq 0x118(%rsp), %rcx
movb 0x117(%rsp), %al
leaq 0xf0(%rsp), %rdi
andb $0x1, %al
movzbl %al, %r8d
callq 0xe220
leaq 0xd8(%rsp), %rdi
callq 0xecf0
testb $0x1, 0x117(%rsp)
je 0xe813
movq 0x10(%rsp), %rsi
movb $0xa, 0xbf(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0xf0(%rsp), %rdx
leaq 0xbf(%rsp), %rcx
callq 0xdf40
jmp 0xe7ab
leaq 0xd8(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0xf240
jmp 0xe7c2
leaq 0xc0(%rsp), %rdi
callq 0xee10
jmp 0xe88b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0xea29
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0xee10
jmp 0xea29
movq 0x10(%rsp), %rsi
movb $0x2c, 0x8f(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0xf0(%rsp), %rdx
leaq 0x8f(%rsp), %rcx
callq 0xdf40
jmp 0xe83f
leaq 0xd8(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xf240
jmp 0xe856
leaq 0x90(%rsp), %rdi
callq 0xee10
jmp 0xe88b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x90(%rsp), %rdi
callq 0xee10
jmp 0xea29
movq (%rsp), %rdi
movb $0x0, 0x8e(%rsp)
callq 0xf500
leaq 0xd8(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
callq 0xf060
movq %rax, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0xf090
movq %rax, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xf0c0
testb $0x1, %al
jne 0xe8e8
jmp 0xe9de
leaq 0x78(%rsp), %rdi
callq 0xf100
movq %rax, %rsi
leaq 0x50(%rsp), %rdi
callq 0x30f0
jmp 0xe901
leaq 0x18(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x30f0
jmp 0xe912
movq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0xe4b0
jmp 0xe928
movq (%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0xf510
jmp 0xe938
leaq 0x38(%rsp), %rdi
callq 0x40f0
leaq 0x18(%rsp), %rdi
callq 0x3180
leaq 0x50(%rsp), %rdi
callq 0x3180
leaq 0x78(%rsp), %rdi
callq 0xf220
jmp 0xe8d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0xea20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0xe9d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0xe9c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x40f0
leaq 0x18(%rsp), %rdi
callq 0x3180
leaq 0x50(%rsp), %rdi
callq 0x3180
jmp 0xea20
movb $0x1, 0x8e(%rsp)
testb $0x1, 0x8e(%rsp)
jne 0xe9f9
movq (%rsp), %rdi
callq 0x4180
leaq 0xd8(%rsp), %rdi
callq 0xee10
leaq 0xf0(%rsp), %rdi
callq 0x3180
movq 0x8(%rsp), %rax
addq $0x138, %rsp            # imm = 0x138
retq
movq (%rsp), %rdi
callq 0x4180
leaq 0xd8(%rsp), %rdi
callq 0xee10
leaq 0xf0(%rsp), %rdi
callq 0x3180
movq 0xb0(%rsp), %rdi
callq 0x34a0