// File: brandoncanaday[P]1730sh/1730sh.cpp
// Function: help_builtin(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
int help_builtin(const vector<string> & args) {
  if(args.size() != 1) {
    cout << "Usage: help" << endl;
    return -1;
  } else {
    cout << "Here are some useful commands to make navigating the shell a bit easier:" << endl;
    cout << endl;
    cout << "bg JID – Resume the stopped job JID in the background, as if it had been started with &." << endl;
    cout << endl;
    cout << "cd [PATH] – Change the current directory to PATH. The environmental variable HOME is the default PATH." << endl;
    cout << endl;
    cout << "exit [N] – Cause the shell to exit with a status of N. If N is omitted, the exit status is that of the last job executed." << endl;
    cout << endl;
    cout << "export NAME[=WORD] – the variable NAME is automatically included in the environment of subsequently executed jobs." << endl;
    cout << endl;
    cout << "fg JID – Resume job JID in the foreground, and make it the current job." << endl;
    cout << endl;
    cout << "help – Display helpful information about builtin commands." << endl;
    cout << endl;
    cout << "jobs – List current jobs. Here is an example of the desired output:" << endl;
    cout << endl;
    cout << "          "; cout << "JID  STATUS      COMMAND" << endl;
    cout << "          "; cout << "1137 Stopped     less &" << endl;
    cout << "          "; cout << "2245 Running     cat /dev/urandom | less &" << endl;
    cout << "          "; cout << "2343 Running     ./jobcontrol &" << endl;
    cout << endl;
    cout << "kill [-s SIGNAL] PID – The kill utility sends the specified signal to the specified process or process group PID" << endl;
    cout << "(see kill(2)). If no signal is specified, the SIGTERM signal is sent. The SIGTERM signal will kill processes which do" << endl;
    cout << "not catch this signal. For other processes, it may be necessary to use the SIGKILL signal, since this signal cannot" << endl;
    cout << "be caught. If PID is positive, then the signal is sent to the process with the ID specified by PID. If PID equals 0," << endl;
    cout << "then the signal is sent to every process in the current process group. If PID equals -1, then the signal is sent to" << endl;
    cout << "every process for which the utility has permission to send signals to, except for process 1 (init). If PID is less than" << endl;
    cout << "-1, then the signal is sent to every process in the process group whose ID is -PID. When the -s SIGNAL option is" << endl;
    cout << "used, instead of sending SIGTERM, the specified signal is sent instead. SIGNAL can be provided as a signal number" << endl;
    cout << "or a constant (e.g., SIGTERM)." << endl;
    cout << endl;
    cout << "-- End help --" << endl;
    return 0;  
  } // if/else
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xb7a0
cmpq $0x1, %rax
je 0x9209
movq 0x12de6(%rip), %rdi     # 0x1bfc8
leaq 0xbfc3(%rip), %rsi      # 0x151ac
callq 0x32e0
movq %rax, %rdi
movq 0x12db0(%rip), %rsi     # 0x1bfa8
callq 0x3330
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9606
movq 0x12db8(%rip), %rdi     # 0x1bfc8
leaq 0xbfa1(%rip), %rsi      # 0x151b8
callq 0x32e0
movq %rax, %rdi
movq 0x12d82(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12d96(%rip), %rdi     # 0x1bfc8
movq 0x12d6f(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12d83(%rip), %rdi     # 0x1bfc8
leaq 0xbfb5(%rip), %rsi      # 0x15201
callq 0x32e0
movq %rax, %rdi
movq 0x12d4d(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12d61(%rip), %rdi     # 0x1bfc8
movq 0x12d3a(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12d4e(%rip), %rdi     # 0x1bfc8
leaq 0xbfdb(%rip), %rsi      # 0x1525c
callq 0x32e0
movq %rax, %rdi
movq 0x12d18(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12d2c(%rip), %rdi     # 0x1bfc8
movq 0x12d05(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12d19(%rip), %rdi     # 0x1bfc8
leaq 0xc00f(%rip), %rsi      # 0x152c5
callq 0x32e0
movq %rax, %rdi
movq 0x12ce3(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12cf7(%rip), %rdi     # 0x1bfc8
movq 0x12cd0(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12ce4(%rip), %rdi     # 0x1bfc8
leaq 0xc056(%rip), %rsi      # 0x15341
callq 0x32e0
movq %rax, %rdi
movq 0x12cae(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12cc2(%rip), %rdi     # 0x1bfc8
movq 0x12c9b(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12caf(%rip), %rdi     # 0x1bfc8
leaq 0xc096(%rip), %rsi      # 0x153b6
callq 0x32e0
movq %rax, %rdi
movq 0x12c79(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12c8d(%rip), %rdi     # 0x1bfc8
movq 0x12c66(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12c7a(%rip), %rdi     # 0x1bfc8
leaq 0xc0ab(%rip), %rsi      # 0x15400
callq 0x32e0
movq %rax, %rdi
movq 0x12c44(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12c58(%rip), %rdi     # 0x1bfc8
movq 0x12c31(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12c45(%rip), %rdi     # 0x1bfc8
leaq 0xc0b3(%rip), %rsi      # 0x1543d
callq 0x32e0
movq %rax, %rdi
movq 0x12c0f(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12c23(%rip), %rdi     # 0x1bfc8
movq 0x12bfc(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12c10(%rip), %rdi     # 0x1bfc8
leaq 0xb35a(%rip), %rsi      # 0x14719
callq 0x32e0
movq 0x12bfd(%rip), %rdi     # 0x1bfc8
leaq 0xc0b1(%rip), %rsi      # 0x15483
callq 0x32e0
movq %rax, %rdi
movq 0x12bc7(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12bdb(%rip), %rdi     # 0x1bfc8
leaq 0xb325(%rip), %rsi      # 0x14719
callq 0x32e0
movq 0x12bc8(%rip), %rdi     # 0x1bfc8
leaq 0xc095(%rip), %rsi      # 0x1549c
callq 0x32e0
movq %rax, %rdi
movq 0x12b92(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12ba6(%rip), %rdi     # 0x1bfc8
leaq 0xb2f0(%rip), %rsi      # 0x14719
callq 0x32e0
movq 0x12b93(%rip), %rdi     # 0x1bfc8
leaq 0xc078(%rip), %rsi      # 0x154b4
callq 0x32e0
movq %rax, %rdi
movq 0x12b5d(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12b71(%rip), %rdi     # 0x1bfc8
leaq 0xb2bb(%rip), %rsi      # 0x14719
callq 0x32e0
movq 0x12b5e(%rip), %rdi     # 0x1bfc8
leaq 0xc06e(%rip), %rsi      # 0x154df
callq 0x32e0
movq %rax, %rdi
movq 0x12b28(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12b3c(%rip), %rdi     # 0x1bfc8
movq 0x12b15(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12b29(%rip), %rdi     # 0x1bfc8
leaq 0xc059(%rip), %rsi      # 0x154ff
callq 0x32e0
movq %rax, %rdi
movq 0x12af3(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12b07(%rip), %rdi     # 0x1bfc8
leaq 0xc0aa(%rip), %rsi      # 0x15572
callq 0x32e0
movq %rax, %rdi
movq 0x12ad1(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12ae5(%rip), %rdi     # 0x1bfc8
leaq 0xc0fe(%rip), %rsi      # 0x155e8
callq 0x32e0
movq %rax, %rdi
movq 0x12aaf(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12ac3(%rip), %rdi     # 0x1bfc8
leaq 0xc150(%rip), %rsi      # 0x1565c
callq 0x32e0
movq %rax, %rdi
movq 0x12a8d(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12aa1(%rip), %rdi     # 0x1bfc8
leaq 0xc1a3(%rip), %rsi      # 0x156d1
callq 0x32e0
movq %rax, %rdi
movq 0x12a6b(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12a7f(%rip), %rdi     # 0x1bfc8
leaq 0xc1f5(%rip), %rsi      # 0x15745
callq 0x32e0
movq %rax, %rdi
movq 0x12a49(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12a5d(%rip), %rdi     # 0x1bfc8
leaq 0xc24b(%rip), %rsi      # 0x157bd
callq 0x32e0
movq %rax, %rdi
movq 0x12a27(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12a3b(%rip), %rdi     # 0x1bfc8
leaq 0xc29a(%rip), %rsi      # 0x1582e
callq 0x32e0
movq %rax, %rdi
movq 0x12a05(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x12a19(%rip), %rdi     # 0x1bfc8
leaq 0xc2ea(%rip), %rsi      # 0x158a0
callq 0x32e0
movq %rax, %rdi
movq 0x129e3(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x129f7(%rip), %rdi     # 0x1bfc8
movq 0x129d0(%rip), %rsi     # 0x1bfa8
callq 0x3330
movq 0x129e4(%rip), %rdi     # 0x1bfc8
leaq 0xc2d4(%rip), %rsi      # 0x158bf
callq 0x32e0
movq %rax, %rdi
movq 0x129ae(%rip), %rsi     # 0x1bfa8
callq 0x3330
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop