// File: /workspace/github_cpp_makefile_star2_O1/brandoncanaday[P]1730sh/1730sh.cpp
// Function: prompt()
void prompt() {
  char cwd[PATH_MAX];
  const char * homedir = nullptr;
  string s_cwd = "";
  string s_homedir = "";
  string prompt = "";
  // home dir stuff
  if((homedir = getenv("HOME")) == NULL) {
    homedir = getpwuid(getuid())->pw_dir;
  } // if
  s_homedir = string(homedir);
  // current dir stuff
  if(getcwd(cwd,sizeof(cwd)) == nullptr) { nope_out("getcwd"); } // if
  s_cwd = string(cwd);
  // prompt stuff
  prompt = s_cwd;
  size_t pos;
  if((pos = prompt.find(s_homedir)) != string::npos) {
    prompt.replace(pos,s_homedir.size(),"~");
  } // if
  cout << "1730sh:" << prompt << "$ ";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1088, %rsp           # imm = 0x1088
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x8f80(%rip), %rbx      # 0xeb12
leaq -0x90(%rbp), %rdi
movq %rbx, %rsi
movq %rbx, %rdx
callq 0xa038
leaq -0x60(%rbp), %r12
movq %r12, -0x10(%r12)
leaq -0x70(%rbp), %rdi
movq %rbx, %rsi
movq %rbx, %rdx
callq 0xa038
leaq -0x40(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x8f47(%rip), %rdx      # 0xeb12
leaq -0x50(%rbp), %rdi
movq %rdx, %rsi
callq 0xa038
leaq 0x7466(%rip), %rdi      # 0xd044
callq 0x3340
testq %rax, %rax
jne 0x5bf8
callq 0x3150
movl %eax, %edi
callq 0x3310
movq 0x20(%rax), %rax
leaq -0xb0(%rbp), %rdi
leaq -0x29(%rbp), %rdx
movq %rax, %rsi
callq 0x3110
leaq -0x70(%rbp), %rdi
leaq -0xb0(%rbp), %rbx
movq %rbx, %rsi
callq 0x3350
movq (%rbx), %rdi
leaq -0xa0(%rbp), %r15
cmpq %r15, %rdi
je 0x5c3c
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x32c0
leaq -0x10b0(%rbp), %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x3160
testq %rax, %rax
je 0x5d82
movq %r15, (%rbx)
leaq -0x10b0(%rbp), %r14
movq %r14, %rdi
callq 0x3130
leaq (%rax,%rbp), %rdx
addq $-0x10b0, %rdx          # imm = 0xEF50
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa038
leaq -0x90(%rbp), %rdi
movq %rbx, %rsi
callq 0x3350
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x5ca4
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x32c0
leaq -0x50(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3180
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rcx
leaq -0x50(%rbp), %rdi
xorl %edx, %edx
callq 0x3520
cmpq $-0x1, %rax
je 0x5cea
movq -0x68(%rbp), %rdx
leaq 0x7b8e(%rip), %rcx      # 0xd866
leaq -0x50(%rbp), %rdi
movl $0x1, %r8d
movq %rax, %rsi
callq 0x32f0
movq 0xc2df(%rip), %rdi      # 0x11fd0
leaq 0x7358(%rip), %rsi      # 0xd050
movl $0x7, %edx
callq 0x3300
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0xc2bf(%rip), %rdi      # 0x11fd0
callq 0x3300
leaq 0x733b(%rip), %rsi      # 0xd058
movl $0x2, %edx
movq %rax, %rdi
callq 0x3300
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x5d3f
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x32c0
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x5d54
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x32c0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x5d70
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x32c0
addq $0x1088, %rsp           # imm = 0x1088
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0xb0(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x72b6(%rip), %rsi      # 0xd049
leaq 0x72b5(%rip), %rdx      # 0xd04f
callq 0xa038
leaq -0xb0(%rbp), %rdi
callq 0x36d2
jmp 0x5dbd
jmp 0x5dbd
jmp 0x5dbd
movq %rax, %rbx
jmp 0x5dd5
movq %rax, %rbx
jmp 0x5dea
jmp 0x5dbd
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x5dd5
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x32c0
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x5dea
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x32c0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x5e06
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x3530