// File: /workspace/github_cpp_makefile_star2_O3/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 0x8f79(%rip), %rbx      # 0xeb12
leaq -0x90(%rbp), %rdi
movq %rbx, %rsi
movq %rbx, %rdx
callq 0x9ff0
leaq -0x60(%rbp), %r12
movq %r12, -0x10(%r12)
leaq -0x70(%rbp), %rdi
movq %rbx, %rsi
movq %rbx, %rdx
callq 0x9ff0
leaq -0x40(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x8f40(%rip), %rdx      # 0xeb12
leaq -0x50(%rbp), %rdi
movq %rdx, %rsi
callq 0x9ff0
leaq 0x745f(%rip), %rdi      # 0xd044
callq 0x3340
testq %rax, %rax
jne 0x5bff
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 0x5c43
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x32c0
leaq -0x10b0(%rbp), %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x3160
testq %rax, %rax
je 0x5d89
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 0x9ff0
leaq -0x90(%rbp), %rdi
movq %rbx, %rsi
callq 0x3350
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x5cab
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 0x5cf1
movq -0x68(%rbp), %rdx
leaq 0x7b87(%rip), %rcx      # 0xd866
leaq -0x50(%rbp), %rdi
movl $0x1, %r8d
movq %rax, %rsi
callq 0x32f0
movq 0xc2d8(%rip), %rdi      # 0x11fd0
leaq 0x7351(%rip), %rsi      # 0xd050
movl $0x7, %edx
callq 0x3300
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0xc2b8(%rip), %rdi      # 0x11fd0
callq 0x3300
leaq 0x7334(%rip), %rsi      # 0xd058
movl $0x2, %edx
movq %rax, %rdi
callq 0x3300
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x5d46
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x32c0
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x5d5b
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x32c0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x5d77
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 0x72af(%rip), %rsi      # 0xd049
leaq 0x72ae(%rip), %rdx      # 0xd04f
callq 0x9ff0
leaq -0xb0(%rbp), %rdi
callq 0x36d2
jmp 0x5dc4
jmp 0x5dc4
jmp 0x5dc4
movq %rax, %rbx
jmp 0x5ddc
movq %rax, %rbx
jmp 0x5df1
jmp 0x5dc4
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x5ddc
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x32c0
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x5df1
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x32c0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x5e0d
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x3530