LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x1090, %rsp           # imm = 0x1090
leaq 0x70fa(%rip), %rbx      # 0xbae2
leaq -0x98(%rbp), %rdi
leaq -0x78(%rbp), %rdx
movq %rbx, %rsi
callq 0x3100
leaq -0x78(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0x3100
leaq 0x70d0(%rip), %rsi      # 0xbae2
leaq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x3100
leaq 0x561e(%rip), %rdi      # 0xa044
callq 0x3300
testq %rax, %rax
jne 0x4a40
callq 0x3140
movl %eax, %edi
callq 0x32d0
movq 0x20(%rax), %rax
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
movq %rax, %rsi
callq 0x3100
leaq -0x78(%rbp), %rdi
leaq -0x38(%rbp), %rbx
movq %rbx, %rsi
callq 0x3310
movq %rbx, %rdi
callq 0x3120
leaq -0x10a0(%rbp), %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x3150
testq %rax, %rax
jne 0x4aa4
leaq 0x55c4(%rip), %rsi      # 0xa049
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x3100
leaq -0x38(%rbp), %rdi
callq 0x76be
leaq -0x38(%rbp), %rdi
callq 0x3120
leaq -0x38(%rbp), %rdi
leaq -0x10a0(%rbp), %rsi
leaq -0x11(%rbp), %rdx
callq 0x3100
leaq -0x98(%rbp), %rbx
leaq -0x38(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3310
movq %r14, %rdi
callq 0x3120
leaq -0x58(%rbp), %rdi
movq %rbx, %rsi
callq 0x3170
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rsi
xorl %edx, %edx
callq 0x3530
cmpq $-0x1, %rax
je 0x4b0e
movq -0x70(%rbp), %rdx
leaq 0x5d64(%rip), %rcx      # 0xa866
leaq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x3190
movq 0xb4b3(%rip), %rdi      # 0xffc8
leaq 0x5534(%rip), %rsi      # 0xa050
callq 0x3280
leaq -0x58(%rbp), %rsi
movq %rax, %rdi
callq 0x3250
leaq 0x5524(%rip), %rsi      # 0xa058
movq %rax, %rdi
callq 0x3280
leaq -0x58(%rbp), %rdi
callq 0x3120
leaq -0x78(%rbp), %rdi
callq 0x3120
leaq -0x98(%rbp), %rdi
callq 0x3120
addq $0x1090, %rsp           # imm = 0x1090
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3120
jmp 0x4b89
jmp 0x4b86
jmp 0x4b86
jmp 0x4b86
movq %rax, %rbx
jmp 0x4b92
movq %rax, %rbx
jmp 0x4b9b
jmp 0x4b86
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x3120
leaq -0x78(%rbp), %rdi
callq 0x3120
leaq -0x98(%rbp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: hasEvenQuotes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool hasEvenQuotes(string input) {
  int count = 0;
  for(unsigned int i = 0; i < input.length(); i++) {
    if(i == 0) {
      if(input[i] == '"') count++;
    } else {
      if(input[i] == '"' && input[i-1] != '\\') count++;
    } // if/else
  } // for
  if(count % 2 == 0) { 
    return true;
  } else {
    return false;
  } // if/else
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rcx
xorl %eax, %eax
xorl %edx, %edx
movl %edx, %edx
cmpq %rdx, %rcx
jbe 0x4dd6
movq (%rdi), %rsi
movb (%rsi,%rdx), %r8b
testq %rdx, %rdx
je 0x4dc6
cmpb $0x22, %r8b
jne 0x4dd2
leal -0x1(%rdx), %r8d
xorl %r9d, %r9d
cmpb $0x5c, (%rsi,%r8)
setne %r9b
addl %r9d, %eax
jmp 0x4dd2
xorl %esi, %esi
cmpb $0x22, %r8b
sete %sil
addl %esi, %eax
incl %edx
jmp 0x4d98
testb $0x1, %al
sete %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: makePipes(int)
int** makePipes(int numPipes) {
  int** pipes = nullptr;
  if(numPipes != 0) {
    pipes = new int * [numPipes];
    for(int i = 0; i < numPipes; i++) {
      pipes[i] = new int[2];
    } // for
  } // if
  return pipes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %r12d, %r12d
testl %edi, %edi
je 0x4e26
movl %edi, %ebx
movl %edi, %eax
shlq $0x3, %rax
testl %edi, %edi
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
cmovlel %r12d, %ebx
callq 0x3030
movq %rax, %r14
pushq $0x8
popq %r15
cmpq %r12, %rbx
je 0x4e29
movq %r15, %rdi
callq 0x3030
movq %rax, (%r14,%r12,8)
incq %r12
jmp 0x4e10
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: isBuiltIn(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool isBuiltIn(string & command) {
  bool isBuiltIn = false;
  if(command == "cd") {
    isBuiltIn = true;
  } else if(command == "exit") {
    isBuiltIn = true;
  } else if(command == "help") {
    isBuiltIn = true;
  } else if(command == "bg") {
    isBuiltIn = true;
  } else if(command == "fg") {
    isBuiltIn = true;
  } else if(command == "export") {
    isBuiltIn = true;
  } else if(command == "jobs") {
    isBuiltIn = true;
  } else if(command == "kill") {
    isBuiltIn = true;
  } // if/else
  return isBuiltIn;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x5f08(%rip), %rsi      # 0xb144
callq 0x7653
testb %al, %al
jne 0x52b7
leaq 0x5efb(%rip), %rsi      # 0xb147
movq %rbx, %rdi
callq 0x7653
testb %al, %al
jne 0x52b7
leaq 0x5f54(%rip), %rsi      # 0xb1b3
movq %rbx, %rdi
callq 0x7653
testb %al, %al
jne 0x52b7
leaq 0x5eda(%rip), %rsi      # 0xb14c
movq %rbx, %rdi
callq 0x7653
testb %al, %al
jne 0x52b7
leaq 0x5eca(%rip), %rsi      # 0xb14f
movq %rbx, %rdi
callq 0x7653
testb %al, %al
jne 0x52b7
leaq 0x5eba(%rip), %rsi      # 0xb152
movq %rbx, %rdi
callq 0x7653
testb %al, %al
jne 0x52b7
leaq 0x66e9(%rip), %rsi      # 0xb994
movq %rbx, %rdi
callq 0x7653
testb %al, %al
je 0x52c0
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x5e92(%rip), %rsi      # 0xb159
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7653
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: do_redirects(int, int, int)
void do_redirects(int STDIN, int STDOUT, int STDERR) {
  if(STDIN >= 0) {
    if(dup2(STDIN, STDIN_FILENO) == -1) nope_out("dup2");
  } // if
  if(STDOUT >= 0) {
    if(dup2(STDOUT, STDOUT_FILENO) == -1) nope_out("dup2");
  } // if
  if(STDERR >= 0) {
    if(dup2(STDERR, STDERR_FILENO) == -1) nope_out("dup2");
  } // if
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %edx, %ebx
movl %esi, %r14d
testl %edi, %edi
js 0x531b
xorl %esi, %esi
callq 0x3260
cmpl $-0x1, %eax
jne 0x531b
leaq 0x4def(%rip), %rsi      # 0xa0eb
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x3100
leaq -0x38(%rbp), %rdi
callq 0x76be
leaq -0x38(%rbp), %rdi
callq 0x3120
testl %r14d, %r14d
js 0x5356
pushq $0x1
popq %rsi
movl %r14d, %edi
callq 0x3260
cmpl $-0x1, %eax
jne 0x5356
leaq 0x4db4(%rip), %rsi      # 0xa0eb
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x3100
leaq -0x38(%rbp), %rdi
callq 0x76be
leaq -0x38(%rbp), %rdi
callq 0x3120
testl %ebx, %ebx
js 0x538f
pushq $0x2
popq %rsi
movl %ebx, %edi
callq 0x3260
cmpl $-0x1, %eax
jne 0x538f
leaq 0x4d7b(%rip), %rsi      # 0xa0eb
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x3100
leaq -0x38(%rbp), %rdi
callq 0x76be
leaq -0x38(%rbp), %rdi
callq 0x3120
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x539c
jmp 0x539c
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3120
jmp 0x53b1
jmp 0x53ae
jmp 0x53ae
movq %rax, %rbx
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: close_redirects(int, int, int)
void close_redirects(int STDIN, int STDOUT, int STDERR) {
  if(STDIN != STDIN_FILENO) {
    if(close(STDIN) == -1) nope_out("close");
  } // if
  if(STDOUT != STDOUT_FILENO) {
    if(close(STDOUT) == -1) nope_out("close");
  } // if
  if(STDERR != STDERR_FILENO) {
    if(close(STDERR) == -1) nope_out("close");
  } // if
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %edx, %ebx
movl %esi, %r14d
testl %edi, %edi
je 0x53fd
callq 0x3510
cmpl $-0x1, %eax
jne 0x53fd
leaq 0x4ca5(%rip), %rsi      # 0xa083
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x3100
leaq -0x38(%rbp), %rdi
callq 0x76be
leaq -0x38(%rbp), %rdi
callq 0x3120
cmpl $0x1, %r14d
je 0x5436
movl %r14d, %edi
callq 0x3510
cmpl $-0x1, %eax
jne 0x5436
leaq 0x4c6c(%rip), %rsi      # 0xa083
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x3100
leaq -0x38(%rbp), %rdi
callq 0x76be
leaq -0x38(%rbp), %rdi
callq 0x3120
cmpl $0x2, %ebx
je 0x546d
movl %ebx, %edi
callq 0x3510
cmpl $-0x1, %eax
jne 0x546d
leaq 0x4c35(%rip), %rsi      # 0xa083
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x3100
leaq -0x38(%rbp), %rdi
callq 0x76be
leaq -0x38(%rbp), %rdi
callq 0x3120
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x547e
jmp 0x547e
jmp 0x548c
jmp 0x548c
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3120
jmp 0x548f
movq %rax, %rbx
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: child_signals()
void child_signals() {
  if(signal(SIGINT, SIG_DFL) == SIG_ERR) nope_out("signal");
  if(signal(SIGQUIT, SIG_DFL) == SIG_ERR) nope_out("signal");
  if(signal(SIGTSTP, SIG_DFL) == SIG_ERR) nope_out("signal");
  if(signal(SIGTTIN, SIG_DFL) == SIG_ERR) nope_out("signal");
  if(signal(SIGTTOU, SIG_DFL) == SIG_ERR) nope_out("signal");
  if(signal(SIGCHLD, SIG_DFL) == SIG_ERR) nope_out("signal");
  if(signal(SIGPIPE, SIG_DFL) == SIG_ERR) nope_out("signal");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
pushq $0x2
popq %rdi
xorl %esi, %esi
callq 0x32e0
cmpq $-0x1, %rax
jne 0x56a5
leaq 0x63bf(%rip), %rsi      # 0xba45
leaq -0x30(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0x3100
leaq -0x30(%rbp), %rdi
callq 0x76be
leaq -0x30(%rbp), %rdi
callq 0x3120
pushq $0x3
popq %rdi
xorl %esi, %esi
callq 0x32e0
cmpq $-0x1, %rax
jne 0x56db
leaq 0x6389(%rip), %rsi      # 0xba45
leaq -0x30(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0x3100
leaq -0x30(%rbp), %rdi
callq 0x76be
leaq -0x30(%rbp), %rdi
callq 0x3120
pushq $0x14
popq %rdi
xorl %esi, %esi
callq 0x32e0
cmpq $-0x1, %rax
jne 0x5711
leaq 0x6353(%rip), %rsi      # 0xba45
leaq -0x30(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0x3100
leaq -0x30(%rbp), %rdi
callq 0x76be
leaq -0x30(%rbp), %rdi
callq 0x3120
pushq $0x15
popq %rdi
xorl %esi, %esi
callq 0x32e0
cmpq $-0x1, %rax
jne 0x5747
leaq 0x631d(%rip), %rsi      # 0xba45
leaq -0x30(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0x3100
leaq -0x30(%rbp), %rdi
callq 0x76be
leaq -0x30(%rbp), %rdi
callq 0x3120
pushq $0x16
popq %rdi
xorl %esi, %esi
callq 0x32e0
cmpq $-0x1, %rax
jne 0x577d
leaq 0x62e7(%rip), %rsi      # 0xba45
leaq -0x30(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0x3100
leaq -0x30(%rbp), %rdi
callq 0x76be
leaq -0x30(%rbp), %rdi
callq 0x3120
pushq $0x11
popq %rdi
xorl %esi, %esi
callq 0x32e0
cmpq $-0x1, %rax
jne 0x57b3
leaq 0x62b1(%rip), %rsi      # 0xba45
leaq -0x30(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0x3100
leaq -0x30(%rbp), %rdi
callq 0x76be
leaq -0x30(%rbp), %rdi
callq 0x3120
pushq $0xd
popq %rdi
xorl %esi, %esi
callq 0x32e0
cmpq $-0x1, %rax
jne 0x57e9
leaq 0x627b(%rip), %rsi      # 0xba45
leaq -0x30(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0x3100
leaq -0x30(%rbp), %rdi
callq 0x76be
leaq -0x30(%rbp), %rdi
callq 0x3120
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
jmp 0x5806
jmp 0x5806
jmp 0x5816
jmp 0x5806
jmp 0x5816
jmp 0x5806
jmp 0x5816
jmp 0x5806
jmp 0x5816
jmp 0x5806
jmp 0x5816
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x3120
jmp 0x5819
jmp 0x5816
movq %rax, %rbx
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: nice_exec(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>>>>, int**, int)
void nice_exec(vector<string> strargs, int** pipes, int numPipes) {
  vector<char *> cstrargs = mk_cstrvec(strargs);
  execvp(cstrargs.at(0), &cstrargs.at(0));
  // only makes it here if execvp fails
  cout << "1730sh: " << cstrargs.at(0) << ": command not found" << endl;
  // close pipes
  for(int i = 0; i < numPipes; i++) {
    close_pipe(pipes[i],false);
  } // for
  // delete dynamically-allocated members of current_jobs vector<Input*>
  for(unsigned int i = 0, s = current_jobs.size(); i < s; i++) {
    if(current_jobs[i] != nullptr) { delete current_jobs[i]; current_jobs[i] = nullptr; } // if
  } // for
  // delete dynamically-allocated pipes
  deletePipes(pipes,numPipes);
  dl_cstrvec(cstrargs);
  exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %rsi
leaq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x5bae
movq %r15, %rdi
xorl %esi, %esi
callq 0x77d4
movq (%rax), %r15
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x77d4
movq %r15, %rdi
movq %rax, %rsi
callq 0x31f0
movq 0xa758(%rip), %rdi      # 0xffc8
leaq 0x47ef(%rip), %rsi      # 0xa066
callq 0x3280
movq %rax, %r15
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x77d4
movq (%rax), %rsi
movq %r15, %rdi
callq 0x3280
leaq 0x47d3(%rip), %rsi      # 0xa06f
movq %rax, %rdi
callq 0x3280
movq %rax, %rdi
callq 0x3130
xorl %r15d, %r15d
testl %ebx, %ebx
movl $0x0, %r12d
cmovgl %ebx, %r12d
cmpq %r15, %r12
je 0x58d0
movq (%r14,%r15,8), %rdi
xorl %esi, %esi
callq 0x5954
incq %r15
jmp 0x58bb
movq 0xaa19(%rip), %rax      # 0x102f0
subq 0xaa0a(%rip), %rax      # 0x102e8
shrq $0x3, %rax
movl %eax, %r12d
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x5923
movq 0xa9f4(%rip), %rax      # 0x102e8
movq (%rax,%r13,8), %r15
testq %r15, %r15
je 0x591e
movq %r15, %rdi
callq 0x7664
movl $0xe8, %esi
movq %r15, %rdi
callq 0x32a0
movq 0xa9cf(%rip), %rax      # 0x102e8
andq $0x0, (%rax,%r13,8)
incq %r13
jmp 0x58e8
movq %r14, %rdi
movl %ebx, %esi
callq 0x59fd
leaq -0x40(%rbp), %rdi
callq 0x5c6c
pushq $0x1
popq %rdi
callq 0x32f0
jmp 0x5940
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x7fda
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: close_pipe(int*, bool)
void close_pipe(int pipefd[2], bool exit_on_failure) {
  if(close(pipefd[0]) == -1) {
    if(exit_on_failure) { nope_out("close"); } // if
  } // if
  if(close(pipefd[1]) == -1) {
    if(exit_on_failure) { nope_out("close"); } // if
  } // if
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebx
movq %rdi, %r14
xorb $0x1, %bl
movl (%rdi), %edi
callq 0x3510
cmpl $-0x1, %eax
setne %al
orb %bl, %al
jne 0x599e
leaq 0x4704(%rip), %rsi      # 0xa083
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x3100
leaq -0x38(%rbp), %rdi
callq 0x76be
leaq -0x38(%rbp), %rdi
callq 0x3120
movl 0x4(%r14), %edi
callq 0x3510
cmpl $-0x1, %eax
setne %al
orb %bl, %al
jne 0x59d7
leaq 0x46cb(%rip), %rsi      # 0xa083
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x3100
leaq -0x38(%rbp), %rdi
callq 0x76be
leaq -0x38(%rbp), %rdi
callq 0x3120
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x59e4
jmp 0x59f2
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3120
jmp 0x59f5
movq %rax, %rbx
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: deletePipes(int**, int)
void deletePipes(int** pipes, int numPipes) {
  if(pipes != nullptr) {
    for(int i = 0; i < numPipes; i++) {
      delete[] pipes[i];
    } // for
    delete[] pipes;
  } // if
}

// Assembly:
testq %rdi, %rdi
je 0x5a45
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
xorl %r15d, %r15d
testl %esi, %esi
cmovlel %r15d, %r14d
cmpq %r15, %r14
je 0x5a33
movq (%rbx,%r15,8), %rdi
testq %rdi, %rdi
je 0x5a2e
callq 0x3340
incq %r15
jmp 0x5a1b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3340
retq
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: put_job_in_foreground(Input*, bool)
void put_job_in_foreground(Input * job, bool cont) {
  if(job != nullptr) {
    // makes JID the foreground pgrp of the terminal
    if(tcsetpgrp(shell_terminal, job->getJID()) == -1) { nope_out("tcsetpgrp"); } 
    // Send the job a continue signal, if necessary
    if(cont) {
      if(kill(-job->getJID(), SIGCONT) < 0) {
	nope_out("kill(SIGCONT)");
      } // if
    } // if
    // wait for job to finish
    wait_for_job(job); 
    // makes the shell the foreground pgrp again
    if(tcsetpgrp(shell_terminal, shell_pgid) == -1) { nope_out("tcsetpgrp"); }
  } // if
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
testq %rdi, %rdi
je 0x5b17
movl %esi, %r14d
movq %rdi, %rbx
movl 0xa87a(%rip), %edi      # 0x102e0
movl (%rbx), %esi
callq 0x3390
cmpl $-0x1, %eax
jne 0x5a98
leaq 0x459b(%rip), %rsi      # 0xa014
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x3100
leaq -0x38(%rbp), %rdi
callq 0x76be
leaq -0x38(%rbp), %rdi
callq 0x3120
testb %r14b, %r14b
je 0x5ad3
xorl %edi, %edi
subl (%rbx), %edi
pushq $0x12
popq %rsi
callq 0x33a0
testl %eax, %eax
jns 0x5ad3
leaq 0x465f(%rip), %rsi      # 0xa113
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x3100
leaq -0x38(%rbp), %rdi
callq 0x76be
leaq -0x38(%rbp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x5d56
movl 0xa7ff(%rip), %edi      # 0x102e0
movl 0xa7fd(%rip), %esi      # 0x102e4
callq 0x3390
cmpl $-0x1, %eax
jne 0x5b17
leaq 0x451c(%rip), %rsi      # 0xa014
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x3100
leaq -0x38(%rbp), %rdi
callq 0x76be
leaq -0x38(%rbp), %rdi
callq 0x3120
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x5b28
jmp 0x5b36
jmp 0x5b28
jmp 0x5b36
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3120
jmp 0x5b39
movq %rax, %rbx
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: put_job_in_background(Input*, bool)
void put_job_in_background(Input * job, bool cont) {
  if(job != nullptr) {
    if(cont) {
      if(kill(-job->getJID(), SIGCONT) < 0) {
	nope_out("kill(SIGCONT)");  
      } // if
    } // if
  } // if
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
xorb $0x1, %sil
testq %rdi, %rdi
sete %al
orb %sil, %al
jne 0x5b93
xorl %eax, %eax
subl (%rdi), %eax
pushq $0x12
popq %rsi
movl %eax, %edi
callq 0x33a0
testl %eax, %eax
jns 0x5b93
leaq 0x45a1(%rip), %rsi      # 0xa113
leaq -0x30(%rbp), %rbx
leaq -0x9(%rbp), %rdx
movq %rbx, %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x76be
leaq -0x30(%rbp), %rdi
callq 0x3120
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: mk_cstrvec(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>>>>&)
vector<char *> mk_cstrvec(vector<string> & strvec) {
  vector<char *> cstrvec;
  for (unsigned int i = 0, s = strvec.size(); i < s; i++) {
    cstrvec.push_back(new char [strvec.at(i).size() + 1]);
    strcpy(cstrvec.at(i), strvec.at(i).c_str());
  } // for
  cstrvec.push_back(nullptr);
  return cstrvec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq 0x8(%rsi), %rax
subq (%rsi), %rax
shrq $0x5, %rax
movl %eax, %r12d
xorl %r15d, %r15d
cmpq %r15, %r12
je 0x5c33
movq %r14, %rdi
movq %r15, %rsi
callq 0x77b2
movq 0x8(%rax), %rdi
incq %rdi
callq 0x3030
movq %rax, -0x30(%rbp)
movq %rbx, %rdi
leaq -0x30(%rbp), %rsi
callq 0x803c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x77d4
movq (%rax), %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x77b2
movq (%rax), %rsi
movq %r13, %rdi
callq 0x3270
incq %r15
jmp 0x5bde
leaq -0x30(%rbp), %rsi
andq $0x0, (%rsi)
movq %rbx, %rdi
callq 0x803c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5c59
jmp 0x5c59
movq %rax, %r14
movq %rbx, %rdi
callq 0x7fda
movq %r14, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: wait_for_job(Input*)
void wait_for_job(Input * job) { 
  if(job != nullptr) {
    int wpid, pstatus;
    if((wpid = waitpid(job->getProcesses().back().PID, &pstatus, WUNTRACED)) > 0) {
      if(WIFEXITED(pstatus)) {
	cout << job->getJID() << " " 
	     << "Exited (" << WEXITSTATUS(pstatus) << ")" << " " 
	     << job->getShellInput() << endl;
	delete_from_current_jobs(job);	
	last_exit_status = WEXITSTATUS(pstatus);
      } else if(WIFSIGNALED(pstatus)) {
	cout << job->getJID() << " " 
	     << "Exited (" << strsignal(WTERMSIG(pstatus)) << ")" << " " 
	     << job->getShellInput() << endl;
	delete_from_current_jobs(job);
	last_exit_status = WTERMSIG(pstatus);
      } else if(WIFSTOPPED(pstatus)) {
	job->setStatus("Stopped");
	format_job_info(job,"Stopped");
      } else if(WIFCONTINUED(pstatus)) {
	job->setStatus("Running");
	format_job_info(job,"Continued");
      } // if/else
    } // if
  } // if
}

// Assembly:
testq %rdi, %rdi
je 0x5efa
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rax
movl -0x28(%rax), %edi
leaq -0x1c(%rbp), %rsi
pushq $0x2
popq %rdx
callq 0x3210
testl %eax, %eax
jle 0x5ef0
movl -0x1c(%rbp), %eax
movl %eax, %ecx
andl $0x7f, %ecx
je 0x5e30
shll $0x18, %ecx
addl $0x1000000, %ecx        # imm = 0x1000000
cmpl $0x2000000, %ecx        # imm = 0x2000000
jl 0x5ead
movl (%rbx), %esi
movq 0xa215(%rip), %rdi      # 0xffc8
callq 0x34a0
leaq 0x4963(%rip), %r14      # 0xa722
movq %rax, %rdi
movq %r14, %rsi
callq 0x3280
leaq 0x431f(%rip), %rsi      # 0xa0f0
movq %rax, %rdi
callq 0x3280
movq %rax, %r15
movl -0x1c(%rbp), %edi
andl $0x7f, %edi
callq 0x34c0
movq %r15, %rdi
movq %rax, %rsi
callq 0x3280
leaq 0x4326(%rip), %rsi      # 0xa11f
movq %rax, %rdi
callq 0x3280
movq %rax, %rdi
movq %r14, %rsi
callq 0x3280
leaq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x3250
movq %rax, %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x5efb
movl -0x1c(%rbp), %eax
andl $0x7f, %eax
jmp 0x5ea5
movl (%rbx), %esi
movq 0xa18f(%rip), %rdi      # 0xffc8
callq 0x34a0
leaq 0x48dd(%rip), %r14      # 0xa722
movq %rax, %rdi
movq %r14, %rsi
callq 0x3280
leaq 0x4299(%rip), %rsi      # 0xa0f0
movq %rax, %rdi
callq 0x3280
movzbl -0x1b(%rbp), %esi
movq %rax, %rdi
callq 0x34a0
leaq 0x42ad(%rip), %rsi      # 0xa11f
movq %rax, %rdi
callq 0x3280
movq %rax, %rdi
movq %r14, %rsi
callq 0x3280
leaq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x3250
movq %rax, %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x5efb
movzbl -0x1b(%rbp), %eax
movl %eax, 0xa431(%rip)      # 0x102dc
jmp 0x5ef0
cmpb $0x7f, %al
jne 0x5ecb
leaq 0x4241(%rip), %r14      # 0xa0f9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x927c
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x5eeb
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x5ef0
leaq 0x4228(%rip), %rsi      # 0xa101
movq %rbx, %rdi
callq 0x927c
leaq 0x4221(%rip), %rsi      # 0xa109
movq %rbx, %rdi
callq 0x5cae
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: delete_from_current_jobs(Input*)
void delete_from_current_jobs(Input * job) {
  if(job != nullptr) {
    for(unsigned int i = 0, s = current_jobs.size(); i < s; i++) {
      if(current_jobs[i] != nullptr) {
	if(job->getJID() == current_jobs[i]->getJID()) { 
	  delete job; 
	  current_jobs[i] = nullptr; 
	  break;
	} // if
      } // if
    } // for
  } // if
}

// Assembly:
testq %rdi, %rdi
je 0x5f62
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0xa3df(%rip), %rcx      # 0x102f0
movq 0xa3d0(%rip), %rax      # 0x102e8
subq %rax, %rcx
shrq $0x3, %rcx
movl %ecx, %ecx
xorl %r14d, %r14d
cmpq %r14, %rcx
je 0x5f5e
movq (%rax,%r14,8), %rdx
testq %rdx, %rdx
je 0x5f38
movl (%rbx), %esi
cmpl (%rdx), %esi
je 0x5f3d
incq %r14
jmp 0x5f24
movq %rbx, %rdi
callq 0x7664
movl $0xe8, %esi
movq %rbx, %rdi
callq 0x32a0
movq 0xa38f(%rip), %rax      # 0x102e8
andq $0x0, (%rax,%r14,8)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: bg_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 bg_builtin(const vector<string> & args) {
  if(args.size() != 2) {
    cout << "1730sh: Usage: bg JID" << endl;
  } else {
    pid_t JID;
    bool isNumber = true;
    for(int i = 0, size = args[1].size(); i < size; i++) {
      if(!isdigit(args[1][i])) { // if (number[i] > '9' || number[i] < '0')
	isNumber = false;
	break;
      } // if
    } // for
    if(isNumber) {
      try {
	JID = stoi(args[1],0,10);
	for(unsigned int i = 0, s = current_jobs.size(); i < s; i++) {
	  if(current_jobs[i] != nullptr) {
	    if(current_jobs[i]->getJID() == JID) {
	      put_job_in_background(current_jobs[i],true);
	      return 0;
	    } // if
	  } // if
	} // for	
      } catch(invalid_argument invalidargument) {
	cout << "1730sh: bg: Invalid JID" << endl;
      } catch(out_of_range outofrange) {
	cout << "1730sh: bg: Invalid JID" << endl;
      } // try/catch
    } else {
      cout << "1730sh: bg: Invalid JID" << endl;
    } // if/else
  } // if/else
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rax
movq (%rdi), %rdi
movq 0x8(%rax), %rax
subq %rdi, %rax
cmpq $0x40, %rax
jne 0x67f7
movl 0x28(%rdi), %eax
addq $0x20, %rdi
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
cmpq %rcx, %rax
je 0x681e
movq (%rdi), %rdx
movsbl (%rdx,%rcx), %edx
addl $-0x30, %edx
incq %rcx
cmpl $0xa, %edx
jb 0x67d0
movq 0x97da(%rip), %rdi      # 0xffc8
leaq 0x5178(%rip), %rsi      # 0xb96d
jmp 0x6805
movq 0x97ca(%rip), %rdi      # 0xffc8
leaq 0x5152(%rip), %rsi      # 0xb957
callq 0x3280
movq %rax, %rdi
callq 0x3130
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x7802
movq 0x9ac1(%rip), %rdx      # 0x102f0
movq 0x9ab2(%rip), %rcx      # 0x102e8
subq %rcx, %rdx
shrq $0x3, %rdx
movl %edx, %edx
xorl %esi, %esi
pushq $-0x1
popq %rbx
cmpq %rsi, %rdx
je 0x6815
movq (%rcx,%rsi,8), %rdi
testq %rdi, %rdi
je 0x6856
cmpl %eax, (%rdi)
je 0x685b
incq %rsi
jmp 0x6844
xorl %ebx, %ebx
pushq $0x1
popq %rsi
callq 0x5b41
jmp 0x6815
jmp 0x6869
movq %rax, %rbx
cmpl $0x2, %edx
jne 0x68b3
movq %rbx, %rdi
callq 0x3320
leaq -0x18(%rbp), %rdi
movq %rax, %rsi
callq 0x7856
movq %rbx, %rdi
callq 0x3110
movq 0x9734(%rip), %rdi      # 0xffc8
leaq 0x50d2(%rip), %rsi      # 0xb96d
callq 0x3280
movq %rax, %rdi
callq 0x3130
leaq -0x18(%rbp), %rdi
callq 0x3480
jmp 0x68f8
cmpl $0x1, %edx
jne 0x6926
movq %rbx, %rdi
callq 0x3320
leaq -0x18(%rbp), %rdi
movq %rax, %rsi
callq 0x7824
movq %rbx, %rdi
callq 0x3110
movq 0x96ed(%rip), %rdi      # 0xffc8
leaq 0x508b(%rip), %rsi      # 0xb96d
callq 0x3280
movq %rax, %rdi
callq 0x3130
leaq -0x18(%rbp), %rdi
callq 0x33b0
callq 0x3450
jmp 0x6812
movq %rax, %rbx
leaq -0x18(%rbp), %rdi
callq 0x33b0
callq 0x3450
jmp 0x6926
movq %rax, %rbx
leaq -0x18(%rbp), %rdi
callq 0x3480
callq 0x3450
movq %rbx, %rdi
callq 0x34b0
movq %rax, %rdi
callq 0x7847
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: fg_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 fg_builtin(const vector<string> & args) {
  if(args.size() != 2) {
    cout << "1730sh: Usage: fg JID" << endl;
  } else {
    pid_t JID;
    bool isNumber = true;
    for(int i = 0, size = args[1].size(); i < size; i++) {
      if(!isdigit(args[1][i])) { // if (number[i] > '9' || number[i] < '0')
	isNumber = false;
	break;
      } // if
    } // for
    if(isNumber) {
      try {
	JID = stoi(args[1],0,10);
	for(unsigned int i = 0, s = current_jobs.size(); i < s; i++) {
	  if(current_jobs[i] != nullptr) {
	    if(current_jobs[i]->getJID() == JID) {
	      put_job_in_foreground(current_jobs[i],true);
	      return 0;
	    } // if
	  } // if
	} // for	
      } catch(invalid_argument invalidargument) {
	cout << "1730sh: fg: Invalid JID" << endl;
      } catch(out_of_range outofrange) {
	cout << "1730sh: fg: Invalid JID" << endl;
      } // try/catch
    } else {
      cout << "1730sh: fg: Invalid JID" << endl;
    } // if/else
  } // if/else
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rax
movq (%rdi), %rdi
movq 0x8(%rax), %rax
subq %rdi, %rax
cmpq $0x40, %rax
jne 0x6987
movl 0x28(%rdi), %eax
addq $0x20, %rdi
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
cmpq %rcx, %rax
je 0x69ae
movq (%rdi), %rdx
movsbl (%rdx,%rcx), %edx
addl $-0x30, %edx
incq %rcx
cmpl $0xa, %edx
jb 0x6960
movq 0x964a(%rip), %rdi      # 0xffc8
leaq 0x4fba(%rip), %rsi      # 0xb93f
jmp 0x6995
movq 0x963a(%rip), %rdi      # 0xffc8
leaq 0x4f94(%rip), %rsi      # 0xb929
callq 0x3280
movq %rax, %rdi
callq 0x3130
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x7802
movq 0x9931(%rip), %rdx      # 0x102f0
movq 0x9922(%rip), %rcx      # 0x102e8
subq %rcx, %rdx
shrq $0x3, %rdx
movl %edx, %edx
xorl %esi, %esi
pushq $-0x1
popq %rbx
cmpq %rsi, %rdx
je 0x69a5
movq (%rcx,%rsi,8), %rdi
testq %rdi, %rdi
je 0x69e6
cmpl %eax, (%rdi)
je 0x69eb
incq %rsi
jmp 0x69d4
xorl %ebx, %ebx
pushq $0x1
popq %rsi
callq 0x5a46
jmp 0x69a5
jmp 0x69f9
movq %rax, %rbx
cmpl $0x2, %edx
jne 0x6a43
movq %rbx, %rdi
callq 0x3320
leaq -0x18(%rbp), %rdi
movq %rax, %rsi
callq 0x7856
movq %rbx, %rdi
callq 0x3110
movq 0x95a4(%rip), %rdi      # 0xffc8
leaq 0x4f14(%rip), %rsi      # 0xb93f
callq 0x3280
movq %rax, %rdi
callq 0x3130
leaq -0x18(%rbp), %rdi
callq 0x3480
jmp 0x6a88
cmpl $0x1, %edx
jne 0x6ab6
movq %rbx, %rdi
callq 0x3320
leaq -0x18(%rbp), %rdi
movq %rax, %rsi
callq 0x7824
movq %rbx, %rdi
callq 0x3110
movq 0x955d(%rip), %rdi      # 0xffc8
leaq 0x4ecd(%rip), %rsi      # 0xb93f
callq 0x3280
movq %rax, %rdi
callq 0x3130
leaq -0x18(%rbp), %rdi
callq 0x33b0
callq 0x3450
jmp 0x69a2
movq %rax, %rbx
leaq -0x18(%rbp), %rdi
callq 0x33b0
callq 0x3450
jmp 0x6ab6
movq %rax, %rbx
leaq -0x18(%rbp), %rdi
callq 0x3480
callq 0x3450
movq %rbx, %rdi
callq 0x34b0
movq %rax, %rdi
callq 0x7847
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/1730sh.cpp
// Function: jobs_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 jobs_builtin(const vector<string> & args) {
  if(args.size() != 1) {
    cout << "1730sh: Usage: jobs" << endl;
  } else {
    cout << std::left << setw(8) << "JID" << setw(13) << "STATUS" << "COMMAND" << endl;
    for(unsigned int i = 0, s = current_jobs.size(); i < s; i++) {
      if(current_jobs[i] != nullptr) {
	pid_t JID = current_jobs[i]->getJID();
	string status = current_jobs[i]->getStatus();
	string command = current_jobs[i]->getShellInput();
	cout << std::left << setw(8) << JID << setw(13) << status << command << endl;
      } // if
    } // for
    return 0;
  } // if/else
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x8(%rdi), %rax
subq (%rdi), %rax
cmpq $0x20, %rax
jne 0x6e84
movq 0x928b(%rip), %rbx      # 0xffc8
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl $0xffffff4f, %esi       # imm = 0xFFFFFF4F
movl 0x18(%rbx,%rcx), %edx
andl %esi, %edx
orl $0x20, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
movq $0x8, 0x10(%rbx,%rax)
leaq 0x4c17(%rip), %rsi      # 0xb981
movq %rbx, %rdi
callq 0x3280
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xd, 0x10(%rax,%rcx)
leaq 0x4c10(%rip), %rsi      # 0xb999
movq %rax, %rdi
callq 0x3280
leaq 0x46fc(%rip), %rsi      # 0xb494
movq %rax, %rdi
callq 0x3280
movq %rax, %rdi
callq 0x3130
movq 0x9541(%rip), %rax      # 0x102f0
subq 0x9532(%rip), %rax      # 0x102e8
shrq $0x3, %rax
movl %eax, %r14d
leaq -0x68(%rbp), %r12
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x6ea4
movq 0x9514(%rip), %rax      # 0x102e8
movq (%rax,%r15,8), %rax
testq %rax, %rax
je 0x6e7c
movl (%rax), %r13d
movq 0x8(%rax), %rsi
leaq -0x48(%rbp), %rdi
movq %r12, %rdx
callq 0x3100
movq 0x94ed(%rip), %rax      # 0x102e8
movq (%rax,%r15,8), %rsi
addq $0x10, %rsi
movq %r12, %rdi
callq 0x3380
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl 0x18(%rbx,%rcx), %edx
movl $0xffffff4f, %esi       # imm = 0xFFFFFF4F
andl %esi, %edx
orl $0x20, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
movq $0x8, 0x10(%rbx,%rax)
movq %rbx, %rdi
movl %r13d, %esi
callq 0x34a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xd, 0x10(%rax,%rcx)
movq %rax, %rdi
leaq -0x48(%rbp), %rsi
callq 0x3250
movq %rax, %rdi
movq %r12, %rsi
callq 0x3250
movq %rax, %rdi
callq 0x3130
movq %r12, %rdi
callq 0x3120
leaq -0x48(%rbp), %rdi
callq 0x3120
incq %r15
jmp 0x6dc4
movq 0x913d(%rip), %rdi      # 0xffc8
leaq 0x4af3(%rip), %rsi      # 0xb985
callq 0x3280
movq %rax, %rdi
callq 0x3130
pushq $-0x1
popq %rax
jmp 0x6ea6
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x6ec6
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x3120
leaq -0x48(%rbp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/Input.cpp
// Function: Input::Input(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Input::Input(string input) {
  setShellInput(input); 
  set_foreground();
  setSTDIN();
  setSTDOUT();
  setSTDERR();
  this->processes = inputToProcesses();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
orl $-0x1, (%rdi)
leaq 0x1aff(%rip), %rax      # 0xa101
movq %rax, 0x8(%rdi)
leaq 0x20(%rdi), %rax
movq %rax, 0x10(%rdi)
andq $0x0, 0x18(%rdi)
xorl %eax, %eax
movb %al, 0x20(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
andq $0x0, 0x40(%rdi)
leaq 0x58(%rdi), %rcx
movq %rcx, 0x48(%rdi)
andq $0x0, 0x50(%rdi)
movb %al, 0x58(%rdi)
leaq 0x78(%rdi), %rcx
movq %rcx, 0x68(%rdi)
andq $0x0, 0x70(%rdi)
movb %al, 0x78(%rdi)
leaq 0x98(%rdi), %rcx
movq %rcx, 0x88(%rdi)
andq $0x0, 0x90(%rdi)
movb %al, 0x98(%rdi)
leaq 0xb8(%rdi), %rcx
movq %rcx, 0xa8(%rdi)
andq $0x0, 0xb0(%rdi)
leaq 0x30(%rdi), %r14
movb %al, 0xb8(%rdi)
leaq 0xd8(%rdi), %rcx
movq %rcx, 0xc8(%rdi)
andq $0x0, 0xd0(%rdi)
movb %al, 0xd8(%rdi)
leaq -0x60(%rbp), %rdi
callq 0x3380
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x8796
leaq -0x60(%rbp), %rdi
callq 0x3120
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
cmpb $0x26, -0x1(%rax,%rcx)
setne 0x4(%rbx)
movq %rbx, %rdi
callq 0x882e
movq %rbx, %rdi
callq 0x89f4
movq %rbx, %rdi
callq 0x8c36
leaq -0x78(%rbp), %rdi
movq %rbx, %rsi
callq 0x8e7a
leaq -0x78(%rbp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9b76
movq %rbx, %rdi
callq 0x7966
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8726
movq %rax, -0x30(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3120
jmp 0x872a
movq %rax, -0x30(%rbp)
leaq 0x10(%rbx), %rax
movq %rax, -0x40(%rbp)
leaq 0x48(%rbx), %rax
movq %rax, -0x38(%rbp)
leaq 0x68(%rbx), %r15
leaq 0x88(%rbx), %r12
leaq 0xa8(%rbx), %r13
addq $0xc8, %rbx
movq %rbx, %rdi
callq 0x3120
movq %r13, %rdi
callq 0x3120
movq %r12, %rdi
callq 0x3120
movq %r15, %rdi
callq 0x3120
movq -0x38(%rbp), %rdi
callq 0x3120
movq %r14, %rdi
callq 0x7966
movq -0x40(%rbp), %rdi
callq 0x3120
movq -0x30(%rbp), %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/Input.cpp
// Function: Input::setShellInput(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Input::setShellInput(string input) {
  const char * ws = " \t"; // chars to trim
  input = input.erase(input.find_last_not_of(ws) + 1); // trims end 
  input = input.erase(0, input.find_first_not_of(ws)); // trims beginning  
  this->shellInput = input;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x3332(%rip), %r15      # 0xbae0
pushq $-0x1
popq %r12
movq %rsi, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x34d0
leaq 0x1(%rax), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x3080
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3170
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3180
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x3080
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3170
addq $0x10, %r14
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3170
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/Input.cpp
// Function: Input::setSTDIN()
void Input::setSTDIN() {
  string fd = "STDIN_FILENO";
  stringstream ss(this->shellInput);
  vector<string> argv;
  string arg;
  while(ss >> arg) {
    argv.push_back(arg);
  } // while
  vector<string> processed_argv = processArgv(argv);
  for(unsigned int i = 0; i < processed_argv.size(); i++) {
    if(i > 0) {
      if(processed_argv[i-1] == "<") {
	fd = processed_argv[i];
	break;
      } // if
    } // if 
  } // for
  this->fd_STDIN = fd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdi, %rbx
leaq 0x183f(%rip), %rsi      # 0xa089
leaq -0x88(%rbp), %rdi
leaq -0x230(%rbp), %rdx
callq 0x3100
leaq 0x10(%rbx), %rsi
leaq -0x230(%rbp), %rdi
pushq $0x18
popq %rdx
callq 0x3430
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %r14
andq $0x0, 0x10(%r14)
leaq -0x98(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movaps %xmm0, (%r14)
movb $0x0, (%rax)
leaq -0x230(%rbp), %r15
leaq -0xa8(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3330
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x88c7
movq %r14, %rdi
movq %r12, %rsi
callq 0x7776
jmp 0x88a1
leaq -0x68(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x76d2
leaq -0x38(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x928b
leaq -0x68(%rbp), %rdi
callq 0x7726
xorl %r14d, %r14d
leaq 0x1769(%rip), %r15      # 0xa05d
movl %r14d, %r14d
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r14, %rax
jbe 0x8943
testq %r14, %r14
je 0x8927
leal -0x1(%r14), %eax
shlq $0x5, %rax
addq %rax, %rdi
movq %r15, %rsi
callq 0x7653
testb %al, %al
jne 0x892c
incl %r14d
jmp 0x88f4
shlq $0x5, %r14
addq -0x38(%rbp), %r14
leaq -0x88(%rbp), %rdi
movq %r14, %rsi
callq 0x3170
addq $0x48, %rbx
leaq -0x88(%rbp), %rsi
movq %rbx, %rdi
callq 0x3170
leaq -0x38(%rbp), %rdi
callq 0x7726
leaq -0xa8(%rbp), %rdi
callq 0x3120
leaq -0x50(%rbp), %rdi
callq 0x7726
leaq -0x230(%rbp), %rdi
callq 0x31e0
leaq -0x88(%rbp), %rdi
callq 0x3120
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x899e
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
jmp 0x89ae
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x7726
jmp 0x89bf
jmp 0x89bc
movq %rax, %rbx
jmp 0x89e0
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x3120
leaq -0x50(%rbp), %rdi
callq 0x7726
leaq -0x230(%rbp), %rdi
callq 0x31e0
leaq -0x88(%rbp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/Input.cpp
// Function: Input::setSTDOUT()
void Input::setSTDOUT() {
  string fd = "STDOUT_FILENO";
  string type = "";
  stringstream ss(this->shellInput);
  vector<string> argv;
  string arg;
  while(ss >> arg) {
    argv.push_back(arg);
  } // while
  vector<string> processed_argv = processArgv(argv);
  for(unsigned int i = 0; i < processed_argv.size(); i++) {
    if(i > 0) {
      if(processed_argv[i-1] == ">>" || processed_argv[i-1] == ">") {
	fd = processed_argv[i];
	type = processed_argv[i-1];
	break;
      } // if
    } // if
  } // for
  this->fd_STDOUT = fd;
  this->type_STDOUT = type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rdi, %rbx
leaq 0x16a0(%rip), %rsi      # 0xa0b2
leaq -0xb8(%rbp), %rdi
leaq -0x260(%rbp), %rdx
callq 0x3100
leaq 0x30b6(%rip), %rsi      # 0xbae2
leaq -0x98(%rbp), %rdi
leaq -0x260(%rbp), %rdx
callq 0x3100
leaq 0x10(%rbx), %rsi
leaq -0x260(%rbp), %rdi
pushq $0x18
popq %rdx
callq 0x3430
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %r14
andq $0x0, 0x10(%r14)
leaq -0xc8(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movaps %xmm0, (%r14)
movb $0x0, (%rax)
leaq -0x260(%rbp), %r15
leaq -0xd8(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3330
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x8aa9
movq %r14, %rdi
movq %r12, %rsi
callq 0x7776
jmp 0x8a83
leaq -0x78(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x76d2
leaq -0x40(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x928b
leaq -0x78(%rbp), %rdi
callq 0x7726
xorl %r14d, %r14d
leaq 0x158d(%rip), %r15      # 0xa063
leaq 0x1587(%rip), %r12      # 0xa064
movl %r14d, %r14d
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r14, %rax
jbe 0x8b52
testq %r14, %r14
je 0x8b23
leal -0x1(%r14), %r13d
shlq $0x5, %r13
addq %r13, %rdi
movq %r15, %rsi
callq 0x7653
testb %al, %al
jne 0x8b28
movq -0x40(%rbp), %rdi
addq %r13, %rdi
movq %r12, %rsi
callq 0x7653
testb %al, %al
jne 0x8b28
incl %r14d
jmp 0x8add
shlq $0x5, %r14
addq -0x40(%rbp), %r14
leaq -0xb8(%rbp), %rdi
movq %r14, %rsi
callq 0x3170
addq -0x40(%rbp), %r13
leaq -0x98(%rbp), %rdi
movq %r13, %rsi
callq 0x3170
leaq 0x68(%rbx), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x3170
addq $0x88, %rbx
leaq -0x98(%rbp), %rsi
movq %rbx, %rdi
callq 0x3170
leaq -0x40(%rbp), %rdi
callq 0x7726
leaq -0xd8(%rbp), %rdi
callq 0x3120
leaq -0x60(%rbp), %rdi
callq 0x7726
leaq -0x260(%rbp), %rdi
callq 0x31e0
leaq -0x98(%rbp), %rdi
callq 0x3120
leaq -0xb8(%rbp), %rdi
callq 0x3120
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
jmp 0x8bea
jmp 0x8bf1
movq %rax, %rbx
jmp 0x8c15
movq %rax, %rbx
jmp 0x8c21
jmp 0x8be3
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x7726
jmp 0x8bf4
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x3120
leaq -0x60(%rbp), %rdi
callq 0x7726
leaq -0x260(%rbp), %rdi
callq 0x31e0
leaq -0x98(%rbp), %rdi
callq 0x3120
leaq -0xb8(%rbp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/Input.cpp
// Function: Input::setSTDERR()
void Input::setSTDERR() {
  string fd = "STDERR_FILENO";
  string type = "";
  stringstream ss(this->shellInput);
  vector<string> argv;
  string arg;
  while(ss >> arg) {
    argv.push_back(arg);
  } // while
  vector<string> processed_argv = processArgv(argv);
  for(unsigned int i = 0; i < processed_argv.size(); i++) {
    if(i > 0) {
      if(processed_argv[i-1] == "e>" || processed_argv[i-1] == "e>>") {
	fd = processed_argv[i];
	type = processed_argv[i-1];
	break;
      } // if
    } // if
  } // for
  this->fd_STDERR = fd;
  this->type_STDERR = type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rdi, %rbx
leaq 0x1489(%rip), %rsi      # 0xa0dd
leaq -0xb8(%rbp), %rdi
leaq -0x260(%rbp), %rdx
callq 0x3100
leaq 0x2e74(%rip), %rsi      # 0xbae2
leaq -0x98(%rbp), %rdi
leaq -0x260(%rbp), %rdx
callq 0x3100
leaq 0x10(%rbx), %rsi
leaq -0x260(%rbp), %rdi
pushq $0x18
popq %rdx
callq 0x3430
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %r14
andq $0x0, 0x10(%r14)
leaq -0xc8(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movaps %xmm0, (%r14)
movb $0x0, (%rax)
leaq -0x260(%rbp), %r15
leaq -0xd8(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3330
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x8ceb
movq %r14, %rdi
movq %r12, %rsi
callq 0x7776
jmp 0x8cc5
leaq -0x78(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x76d2
leaq -0x40(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x928b
leaq -0x78(%rbp), %rdi
callq 0x7726
xorl %r14d, %r14d
leaq 0x1347(%rip), %r15      # 0xa05f
leaq 0x1343(%rip), %r12      # 0xa062
movl %r14d, %r14d
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r14, %rax
jbe 0x8d94
testq %r14, %r14
je 0x8d65
leal -0x1(%r14), %r13d
shlq $0x5, %r13
addq %r13, %rdi
movq %r15, %rsi
callq 0x7653
testb %al, %al
jne 0x8d6a
movq -0x40(%rbp), %rdi
addq %r13, %rdi
movq %r12, %rsi
callq 0x7653
testb %al, %al
jne 0x8d6a
incl %r14d
jmp 0x8d1f
shlq $0x5, %r14
addq -0x40(%rbp), %r14
leaq -0xb8(%rbp), %rdi
movq %r14, %rsi
callq 0x3170
addq -0x40(%rbp), %r13
leaq -0x98(%rbp), %rdi
movq %r13, %rsi
callq 0x3170
leaq 0xa8(%rbx), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x3170
addq $0xc8, %rbx
leaq -0x98(%rbp), %rsi
movq %rbx, %rdi
callq 0x3170
leaq -0x40(%rbp), %rdi
callq 0x7726
leaq -0xd8(%rbp), %rdi
callq 0x3120
leaq -0x60(%rbp), %rdi
callq 0x7726
leaq -0x260(%rbp), %rdi
callq 0x31e0
leaq -0x98(%rbp), %rdi
callq 0x3120
leaq -0xb8(%rbp), %rdi
callq 0x3120
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
jmp 0x8e2f
jmp 0x8e36
movq %rax, %rbx
jmp 0x8e5a
movq %rax, %rbx
jmp 0x8e66
jmp 0x8e28
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x7726
jmp 0x8e39
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x3120
leaq -0x60(%rbp), %rdi
callq 0x7726
leaq -0x260(%rbp), %rdi
callq 0x31e0
leaq -0x98(%rbp), %rdi
callq 0x3120
leaq -0xb8(%rbp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/Input.cpp
// Function: Input::setJID(int)
void Input::setJID(pid_t pgid) {
  this->JID = pgid;
  for(int i = 0, s = processes.size(); i < s; i++) {
    processes[i].PGID = pgid;
  } // for
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, (%rdi)
movq 0x30(%rdi), %rcx
movq 0x38(%rdi), %rax
subq %rcx, %rax
movabsq $0x28, %rdi
cqto
idivq %rdi
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
imulq $0x28, %rax, %rax
cmpq %rdx, %rax
je 0x96a0
movl %esi, 0x4(%rcx,%rdx)
addq $0x28, %rdx
jmp 0x9691
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/Input.cpp
// Function: Input::getNumPipes() const
const int Input::getNumPipes() const {
  int pipes = 0;
  for(unsigned int i = 0; i < processes.size(); i++) {
    if(processes[i].hasPipe) { // if not the last process in input
      pipes++;
    } // if
  } // for
  return pipes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x30(%rdi), %rsi
movq 0x38(%rdi), %rax
subq %rsi, %rax
movabsq $0x28, %rcx
cqto
idivq %rcx
xorl %ecx, %ecx
xorl %edx, %edx
movl %edx, %edx
cmpq %rdx, %rax
jbe 0x96da
imulq $0x28, %rdx, %rdi
movzbl 0xa(%rsi,%rdi), %edi
addl %edi, %ecx
incl %edx
jmp 0x96c4
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/brandoncanaday[P]1730sh/Input.cpp
// Function: Input::isStopped() const
const bool Input::isStopped() const {
  for(unsigned int i = 0, s = processes.size(); i < s; i++) {
    if(!processes[i].stopped && !processes[i].completed) {
      return false;
    } // if
  } // for
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x30(%rdi), %rcx
movq 0x38(%rdi), %rax
subq %rcx, %rax
movabsq $0x28, %rsi
cqto
idivq %rsi
movl %eax, %eax
addq $0x9, %rcx
xorl %edx, %edx
cmpq %rdx, %rax
je 0x973b
cmpb $0x0, -0x1(%rcx)
jne 0x9732
cmpb $0x1, (%rcx)
jne 0x973b
incq %rdx
addq $0x28, %rcx
jmp 0x9722
cmpq %rax, %rdx
setae %al
popq %rbp
retq
nop