// File: frainfreeze[P]tss/./shell.h
// Function: shell::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int parse(std::string input)
{
    std::string arg = input.substr(0, input.find(" "));
    if(arg=="exit"){
        return 0;
    } 
    else if(arg=="help"){
        return builtins::funcMap["help"]("");
    } 
    else if(arg=="cd"){
        builtins::tss_cd(input.substr(input.find_first_of(" \t")+1));
    } 
    else {
        std::cout << exec(input);   
        return 1; 
    }

    /// \todo Actual input parsing
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x110(%rbp)
movq %rdi, -0x10(%rbp)
leaq 0x42a0(%rip), %rsi      # 0x80dd
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x108(%rbp)
callq 0x3440
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
movq %rax, %rcx
leaq -0x30(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x3270
movq -0x100(%rbp), %rdi
leaq 0x427a(%rip), %rsi      # 0x80f6
callq 0x4ba0
movb %al, -0xf1(%rbp)
jmp 0x3e89
movb -0xf1(%rbp), %al
testb $0x1, %al
jne 0x3e95
jmp 0x3eb9
movl $0x0, -0x4(%rbp)
movl $0x1, -0x40(%rbp)
jmp 0x412b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x4140
leaq 0x4217(%rip), %rsi      # 0x80d7
leaq -0x30(%rbp), %rdi
callq 0x4ba0
movb %al, -0x111(%rbp)
jmp 0x3ed1
movb -0x111(%rbp), %al
testb $0x1, %al
jne 0x3ee0
jmp 0x4010
leaq -0x61(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x3400
movq -0x120(%rbp), %rdx
leaq 0x41d9(%rip), %rsi      # 0x80d7
leaq -0x60(%rbp), %rdi
callq 0x4a40
jmp 0x3f09
leaq 0x8348(%rip), %rdi      # 0xc258
leaq -0x60(%rbp), %rsi
callq 0x4bd0
movq %rax, -0x128(%rbp)
jmp 0x3f22
leaq -0x89(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x3400
movq -0x130(%rbp), %rdx
leaq 0x41ba(%rip), %rsi      # 0x80fd
leaq -0x88(%rbp), %rdi
callq 0x4a40
jmp 0x3f51
movq -0x128(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x4cb0
movl %eax, -0x134(%rbp)
jmp 0x3f6c
movl -0x134(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x3468
leaq -0x89(%rbp), %rdi
callq 0x32b0
leaq -0x60(%rbp), %rdi
callq 0x3468
leaq -0x61(%rbp), %rdi
callq 0x32b0
movl $0x1, -0x40(%rbp)
jmp 0x412b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x4002
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x3ff9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x3fed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x3468
leaq -0x89(%rbp), %rdi
callq 0x32b0
leaq -0x60(%rbp), %rdi
callq 0x3468
leaq -0x61(%rbp), %rdi
callq 0x32b0
jmp 0x4140
leaq 0x40bd(%rip), %rsi      # 0x80d4
leaq -0x30(%rbp), %rdi
callq 0x4ba0
movb %al, -0x135(%rbp)
jmp 0x4028
movb -0x135(%rbp), %al
testb $0x1, %al
jne 0x4034
jmp 0x408a
movq -0x110(%rbp), %rdi
leaq 0x40b9(%rip), %rsi      # 0x80fb
xorl %eax, %eax
movl %eax, %edx
callq 0x3150
movq -0x110(%rbp), %rsi
movq %rax, %rdx
incq %rdx
leaq -0xb0(%rbp), %rdi
movq $-0x1, %rcx
callq 0x3270
jmp 0x406d
leaq -0xb0(%rbp), %rdi
callq 0x3940
leaq -0xb0(%rbp), %rdi
callq 0x3468
jmp 0x4125
movq -0x110(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x3120
jmp 0x409f
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x3c00
jmp 0x40b4
movq 0x7f05(%rip), %rdi      # 0xbfc0
leaq -0xd0(%rbp), %rsi
callq 0x3220
jmp 0x40c9
leaq -0xd0(%rbp), %rdi
callq 0x3468
leaq -0xf0(%rbp), %rdi
callq 0x3468
movl $0x1, -0x4(%rbp)
movl $0x1, -0x40(%rbp)
jmp 0x412b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x4117
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x3468
leaq -0xf0(%rbp), %rdi
callq 0x3468
jmp 0x4140
jmp 0x4127
jmp 0x4129
ud2
leaq -0x30(%rbp), %rdi
callq 0x3468
movl -0x4(%rbp), %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x3468
movq -0x38(%rbp), %rdi
callq 0x33f0
nopw %cs:(%rax,%rax)