// File: /workspace/github_cpp_makefile_star2_O2/frainfreeze[P]tss/main.cpp
// Function: main_loop()
void main_loop(){
    //clean whoami and hostname strings
    if (!whoami.empty() && whoami[whoami.length()-1] == '\n') { 
        whoami.erase(whoami.length()-1);
    }
    if (!hostname.empty() && hostname[hostname.length()-1] == '\n') { 
        hostname.erase(hostname.length()-1);
    }

    std::string line;
    std::string args;
    int status;

    do {
        std::string pwd = shell::exec("pwd");
        //clean pwd string
        if (!pwd.empty() && pwd[pwd.length()-1] == '\n') { 
            pwd.erase(pwd.length()-1);
        }

        std::cout << Color::FG_RED << whoami << "@" << hostname << ":" << Color::FG_DEFAULT 
                  << Color::FG_BLUE << pwd << Color::FG_DEFAULT << "$ ";

        std::getline(std::cin, line);
        status = shell::parse(line);
        
        line.clear();
        args.clear();
    } while (status);    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq 0x4775(%rip), %rsi      # 0x71e8
testq %rsi, %rsi
je 0x2a98
movq 0x4761(%rip), %rax      # 0x71e0
cmpb $0xa, -0x1(%rax,%rsi)
jne 0x2a98
decq %rsi
leaq 0x4750(%rip), %rdi      # 0x71e0
pushq $-0x1
popq %rdx
callq 0x2070
movq 0x4769(%rip), %rsi      # 0x7208
testq %rsi, %rsi
je 0x2ac4
movq 0x4755(%rip), %rax      # 0x7200
cmpb $0xa, -0x1(%rax,%rsi)
jne 0x2ac4
decq %rsi
leaq 0x4744(%rip), %rdi      # 0x7200
pushq $-0x1
popq %rdx
callq 0x2070
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq -0x60(%rbp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %edx, %edx
movb %dl, (%rax)
movb %dl, (%rcx)
leaq -0xd0(%rbp), %r14
leaq -0x90(%rbp), %r12
leaq -0x50(%rbp), %r15
leaq -0xb0(%rbp), %rbx
movq %r14, %rdi
leaq 0x15f7(%rip), %rsi      # 0x40fe
leaq -0x29(%rbp), %rdx
callq 0x2e4a
movq %r12, %rdi
movq %r14, %rsi
callq 0x2794
movq %r14, %rdi
callq 0x2318
movq -0x88(%rbp), %rsi
testq %rsi, %rsi
je 0x2b4b
movq -0x90(%rbp), %rax
cmpb $0xa, -0x1(%rax,%rsi)
jne 0x2b4b
decq %rsi
movq %r12, %rdi
pushq $-0x1
popq %rdx
callq 0x2070
movq 0x446e(%rip), %rdi      # 0x6fc0
pushq $0x1f
popq %rsi
callq 0x25bc
movq %rax, %rdi
leaq 0x467c(%rip), %rsi      # 0x71e0
callq 0x2190
movq %rax, %rdi
leaq 0x158f(%rip), %rsi      # 0x4102
callq 0x21a0
movq %rax, %rdi
leaq 0x467e(%rip), %rsi      # 0x7200
callq 0x2190
movq %rax, %rdi
leaq 0x1573(%rip), %rsi      # 0x4104
callq 0x21a0
movq %rax, %rdi
pushq $0x27
popq %rsi
callq 0x25bc
movq %rax, %rdi
pushq $0x22
popq %rsi
callq 0x25bc
movq %rax, %rdi
movq %r12, %rsi
callq 0x2190
movq %rax, %rdi
pushq $0x27
popq %rsi
callq 0x25bc
movq %rax, %rdi
leaq 0x153a(%rip), %rsi      # 0x4106
callq 0x21a0
movq 0x4400(%rip), %rdi      # 0x6fd8
movq %r15, %rsi
callq 0x2060
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2893
movl %eax, %r13d
movq %rbx, %rdi
callq 0x2318
andq $0x0, -0x48(%rbp)
movq -0x50(%rbp), %rax
xorl %ecx, %ecx
movb %cl, (%rax)
andq $0x0, -0x68(%rbp)
movq -0x70(%rbp), %rax
movb %cl, (%rax)
movq %r12, %rdi
callq 0x2318
testl %r13d, %r13d
jne 0x2afd
leaq -0x70(%rbp), %rdi
callq 0x2318
leaq -0x50(%rbp), %rdi
callq 0x2318
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2c7c
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
jmp 0x2c77
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x2318
jmp 0x2c70
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x2318
leaq -0x70(%rbp), %rdi
callq 0x2318
leaq -0x50(%rbp), %rdi
callq 0x2318
movq %rbx, %rdi
callq 0x22c0