LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/m1c0l[P]TCP/TcpMessage.cpp
// Function: TcpMessage::TcpMessage(unsigned short, unsigned short, unsigned short, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
TcpMessage::TcpMessage(uint16_t seq, uint16_t ack, uint16_t recvWind, string tcpFlags) {
	seqNum = seq;
	ackNum = ack;
	recvWindow = recvWind;
	setFlag(tcpFlags);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r15
movl %ecx, %ebp
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %rbx
movabsq $0x3c00d903d903, %rax   # imm = 0x3C00D903D903
movq %rax, (%rdi)
leaq 0x8(%rdi), %r14
leaq 0x18(%rdi), %rax
movq %rax, (%rsp)
movq %rax, 0x8(%rdi)
leaq 0x2b2d(%rip), %rdx      # 0x5089
movq %r14, %rdi
movq %rdx, %rsi
callq 0x2950
movw %r13w, (%rbx)
movw %r12w, 0x2(%rbx)
movw %bp, 0x4(%rbx)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x28c0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2611
movq 0x8(%rsp), %rcx
movzwl 0x6(%rbx), %r9d
xorl %edx, %edx
movabsq $0x100000001, %rsi      # imm = 0x100000001
movabsq $0x2000000020, %rdi     # imm = 0x2000000020
movabsq $0x4000000040000, %r8   # imm = 0x4000000040000
movzbl (%rcx,%rdx), %r10d
addl $-0x41, %r10d
cmpl $0x32, %r10d
ja 0x2611
btq %r10, %rsi
jb 0x25f5
btq %r10, %rdi
jb 0x25ee
btq %r10, %r8
jae 0x2611
movw $0x2, %r10w
jmp 0x25fa
movw $0x1, %r10w
jmp 0x25fa
movw $0x4, %r10w
movzwl %r10w, %r10d
orl %r9d, %r10d
movw %r10w, 0x6(%rbx)
incq %rdx
movl %r10d, %r9d
cmpq %rdx, %rax
jne 0x25c6
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2628
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21e0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%r14), %rdi
cmpq (%rsp), %rdi
je 0x2652
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O1/m1c0l[P]TCP/TcpMessage.cpp
// Function: TcpMessage::setFlag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool TcpMessage::setFlag(string flag) {
    for (size_t i = 0; i < flag.size(); i++){
        switch (flag[i]) {
            case 'A':
            case 'a':
                flags |= ACK_FLAG;
                break;
            case 'F':
            case 'f':
                flags |= FIN_FLAG;
                break;
            case 'S':
            case 's':
                flags |= SYN_FLAG;
                break;
            default:
                // cerr << "flag parameter must be A, F or S";
                return false;
        }
    }
    return true;
}

// Assembly:
movq 0x8(%rsi), %rcx
testq %rcx, %rcx
sete %al
je 0x26f9
pushq %rbp
pushq %r14
pushq %rbx
movq (%rsi), %rdx
movzwl 0x6(%rdi), %ebx
addq $0x6, %rdi
movq %rcx, %rsi
negq %rsi
movl $0x1, %r8d
movabsq $0x100000001, %r9       # imm = 0x100000001
movabsq $0x2000000020, %r10     # imm = 0x2000000020
movabsq $0x4000000040000, %r11  # imm = 0x4000000040000
movzbl -0x1(%rdx,%r8), %r14d
addl $-0x41, %r14d
cmpl $0x32, %r14d
ja 0x26f5
btq %r14, %r9
jb 0x26d1
btq %r14, %r10
jb 0x26cb
btq %r14, %r11
jae 0x26f5
movw $0x2, %ax
jmp 0x26d5
movw $0x1, %ax
jmp 0x26d5
movw $0x4, %ax
movzwl %ax, %ebp
orl %ebx, %ebp
movw %bp, (%rdi)
cmpq %rcx, %r8
setae %al
leaq (%rsi,%r8), %r14
incq %r14
incq %r8
movl %ebp, %ebx
cmpq $0x1, %r14
jne 0x26a3
popq %rbx
popq %r14
popq %rbp
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/m1c0l[P]TCP/TcpMessage.cpp
// Function: TcpMessage::getFlag(char)
bool TcpMessage::getFlag(char flag) {
    switch (flag) {
        case 'A':
        case 'a':
            return !!(flags & ACK_FLAG);
        case 'F':
        case 'f':
            return !!(flags & FIN_FLAG);
        case 'S':
        case 's':
            return !!(flags & SYN_FLAG);
        default:
            // cerr << "flag parameter must be A, F or S";
            return false;
    }
}

// Assembly:
xorl %eax, %eax
addl $-0x41, %esi
cmpl $0x32, %esi
ja 0x2769
movabsq $0x100000001, %rcx      # imm = 0x100000001
btq %rsi, %rcx
jb 0x2770
movabsq $0x2000000020, %rcx     # imm = 0x2000000020
btq %rsi, %rcx
jb 0x276a
movabsq $0x4000000040000, %rcx  # imm = 0x4000000040000
btq %rsi, %rcx
jae 0x2769
movb 0x6(%rdi), %al
andb $0x2, %al
shrb %al
retq
movb 0x6(%rdi), %al
andb $0x1, %al
retq
movb 0x6(%rdi), %al
andb $0x4, %al
shrb $0x2, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/m1c0l[P]TCP/TcpMessage.cpp
// Function: TcpMessage::bufferToMessage(unsigned char*, unsigned long)
void TcpMessage::bufferToMessage(uint8_t* buf, size_t size) {
    seqNum = ((buf[0] << 8) + buf[1]);
    ackNum = ((buf[2] << 8) + buf[3]);
    recvWindow = ((buf[4] << 8) + buf[5]);
    flags =  buf[7] & 0xff;
    data.assign((char*)buf+8, size-8);
    return;
   
}

// Assembly:
movzwl (%rsi), %eax
rolw $0x8, %ax
movw %ax, (%rdi)
movzwl 0x2(%rsi), %eax
rolw $0x8, %ax
movw %ax, 0x2(%rdi)
movzwl 0x4(%rsi), %eax
rolw $0x8, %ax
movw %ax, 0x4(%rdi)
movzbl 0x7(%rsi), %eax
movw %ax, 0x6(%rdi)
leaq 0x8(%rsi), %rcx
leaq -0x8(%rdx), %r8
movq 0x10(%rdi), %rdx
addq $0x8, %rdi
xorl %esi, %esi
jmp 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/m1c0l[P]TCP/TcpMessage.cpp
// Function: TcpMessage::messageToBuffer(unsigned char*)
size_t TcpMessage::messageToBuffer(uint8_t* b) {
    
    //Probably a better way to do this...
    b[0] = (seqNum >> 8) & 0xff;
    b[1] = seqNum & 0xff;
    b[2] = (ackNum >> 8) & 0xff;
    b[3] = ackNum & 0xff;
    b[4] = recvWindow >> 8;
    b[5] = recvWindow & 0xff;
    b[6] = 0x0;
    b[7] = flags;
    
	data.copy((char*)b + 8, data.size(), 0);

	// 8 byte header + body
	return HEADER_SIZE + data.size();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb 0x1(%rdi), %al
movb %al, (%rsi)
movb (%rdi), %al
movb %al, 0x1(%rsi)
movb 0x3(%rdi), %al
movb %al, 0x2(%rsi)
movb 0x2(%rdi), %al
movb %al, 0x3(%rsi)
movb 0x5(%rdi), %al
movb %al, 0x4(%rsi)
movb 0x4(%rdi), %al
movb %al, 0x5(%rsi)
movb $0x0, 0x6(%rsi)
movb 0x6(%rdi), %al
movb %al, 0x7(%rsi)
addq $0x8, %rdi
addq $0x8, %rsi
movq 0x10(%rbx), %rdx
xorl %ecx, %ecx
callq 0x2050
movq 0x10(%rbx), %rax
addq $0x8, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/m1c0l[P]TCP/TcpMessage.cpp
// Function: TcpMessage::sendto(int, sockaddr_in*, unsigned int)
void TcpMessage::sendto(int sockfd, sockaddr_in *si_other, socklen_t len) {
	uint8_t buf[BUFFER_SIZE];
	size_t msgLen = messageToBuffer(buf);
	if (::sendto(sockfd, buf, msgLen, 0, (sockaddr*)si_other, len) == -1) {
		perror("sendto");
		exit(1);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %ebp
movq %rsp, %r15
movq %r15, %rsi
callq 0x27bc
movl %ebp, %edi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
movq %r14, %r8
movl %ebx, %r9d
callq 0x2040
cmpq $-0x1, %rax
je 0x2852
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2360
nop
// File: /workspace/github_cpp_makefile_star2_O1/m1c0l[P]TCP/TcpMessage.cpp
// Function: TcpMessage::recvfrom(int, sockaddr_in*, unsigned int)
int TcpMessage::recvfrom(int sockfd, sockaddr_in *si_other, socklen_t len) {
	uint8_t buf[BUFFER_SIZE];
	int recv_len = ::recvfrom(sockfd, buf, BUFFER_SIZE, 0, (sockaddr*)si_other, &len);
	if (recv_len == -1) {
		if (errno == EWOULDBLOCK) {
			// cerr << "timeout\n";
			return RECV_TIMEOUT;
		}	
		perror("recvfrom");
		exit(1);
	}
	bufferToMessage(buf, recv_len);
	return RECV_SUCCESS;
}

// Assembly:
pushq %rbx
subq $0x420, %rsp            # imm = 0x420
movq %rdx, %r8
movl %esi, %eax
movq %rdi, %rbx
leaq 0xc(%rsp), %r9
movl %ecx, (%r9)
leaq 0x10(%rsp), %rsi
movl $0x408, %edx            # imm = 0x408
movl %eax, %edi
xorl %ecx, %ecx
callq 0x2140
cmpl $-0x1, %eax
jne 0x289f
callq 0x2030
movq %rax, %rcx
movl $0x2, %eax
cmpl $0xb, (%rcx)
je 0x28b4
callq 0x2375
movslq %eax, %rdx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x277a
movl $0x1, %eax
addq $0x420, %rsp            # imm = 0x420
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/m1c0l[P]TCP/Utils.cpp
// Function: timeval_subtract(timeval*, timeval*, timeval*)
int
timeval_subtract (struct timeval *result, struct timeval *x, struct timeval *y)
{
  /* Perform the carry for the later subtraction by updating y. */
  if (x->tv_usec < y->tv_usec) {
    int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1;
    y->tv_usec -= 1000000 * nsec;
    y->tv_sec += nsec;
  }
  if (x->tv_usec - y->tv_usec > 1000000) {
    int nsec = (x->tv_usec - y->tv_usec) / 1000000;
    y->tv_usec += 1000000 * nsec;
    y->tv_sec -= nsec;
  }

  /* Compute the time remaining to wait.
     tv_usec is certainly positive. */
  result->tv_sec = x->tv_sec - y->tv_sec;
  result->tv_usec = x->tv_usec - y->tv_usec;

  /* Return 1 if result is negative. */
  return x->tv_sec < y->tv_sec;
}

// Assembly:
movq %rdx, %rcx
movq 0x8(%rdx), %r9
movq %r9, %rax
movabsq $0x431bde82d7b634db, %r8 # imm = 0x431BDE82D7B634DB
subq 0x8(%rsi), %rax
jle 0x2a5b
imulq %r8
movq %rdx, %rax
shrq $0x12, %rax
shrq $0x3f, %rdx
addl %edx, %eax
incl %eax
imull $0xf4240, %eax, %edx    # imm = 0xF4240
movslq %edx, %rdx
subq %rdx, %r9
movq %r9, 0x8(%rcx)
cltq
addq %rax, (%rcx)
movq 0x8(%rsi), %rax
movq 0x8(%rcx), %r9
subq %r9, %rax
cmpq $0xf4241, %rax          # imm = 0xF4241
jl 0x2a94
mulq %r8
shrq $0x12, %rdx
movabsq $0xf424000000000, %rax  # imm = 0xF424000000000
imulq %rdx, %rax
sarq $0x20, %rax
addq %r9, %rax
movq %rax, 0x8(%rcx)
movslq %edx, %rax
subq %rax, (%rcx)
movq (%rsi), %rax
subq (%rcx), %rax
movq %rax, (%rdi)
movq 0x8(%rsi), %rax
subq 0x8(%rcx), %rax
movq %rax, 0x8(%rdi)
movq (%rsi), %rdx
xorl %eax, %eax
cmpq (%rcx), %rdx
setl %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/m1c0l[P]TCP/Utils.cpp
// Function: setSocketTimeout(int, timeval)
void setSocketTimeout(int sockfd, timeval tv) {
	int r = setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, (void*)&tv, sizeof(tv));
	if (r == -1) {
		perror("setsockopt");
		exit(1);
	}
}

// Assembly:
subq $0x18, %rsp
leaq 0x8(%rsp), %rcx
movq %rsi, (%rcx)
movq %rdx, 0x8(%rcx)
movl $0x1, %esi
movl $0x14, %edx
movl $0x10, %r8d
callq 0x2320
cmpl $-0x1, %eax
je 0x2ae4
addq $0x18, %rsp
retq
callq 0x238a
// File: /workspace/github_cpp_makefile_star2_O1/m1c0l[P]TCP/Utils.cpp
// Function: timeRemaining(timeval)
timeval timeRemaining(timeval start) {
	timeval end = start;
	end.tv_usec += TIMEOUT * 1000;
	if (end.tv_usec >= 1000000) { // carry over
		end.tv_sec += 1;
		end.tv_usec -= 1000000;
	}
	timeval n = now();

	timeval result;
	int r = timeval_subtract(&result, &end, &n);

	// make result zero if negative
	if (r == 1) {
		result.tv_sec = 0;
		result.tv_usec = 0;
	}
	return result;
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, (%rsp)
movl $0x7a120, %eax          # imm = 0x7A120
leaq (%rsi,%rax), %rcx
movq %rcx, 0x8(%rsp)
cmpq %rax, %rsi
jl 0x2b37
incq %rdi
movq %rdi, (%rsp)
addq $-0x7a120, %rsi         # imm = 0xFFF85EE0
movq %rsi, 0x8(%rsp)
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x22f0
movups (%rbx), %xmm0
movups %xmm0, (%rbx)
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
callq 0x2a1a
testl %eax, %eax
je 0x2b6a
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/m1c0l[P]TCP/client.cpp
// Function: printSend(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned short, bool)
void printSend(string pktType, uint16_t ack, bool isRetransmit) {
	cout << "Sending packet";
	if (pktType != "SYN") {
   		cout << " " << ack;
	}
	if (isRetransmit) {
		cout << " Retransmission";
	}
	if (pktType != "ACK") {
		// SYN or FIN
		cout << " " << pktType;
	}
	cout << '\n';
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movq 0x43e2(%rip), %rdi      # 0x6fd0
leaq 0x2466(%rip), %rsi      # 0x505b
movl $0xe, %edx
callq 0x2210
leaq 0x2464(%rip), %rsi      # 0x506a
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x2c39
movq 0x43b7(%rip), %r15      # 0x6fd0
leaq 0x2468(%rip), %rsi      # 0x5088
movl $0x1, %edx
movq %r15, %rdi
callq 0x2210
movzwl %r14w, %esi
movq %r15, %rdi
callq 0x2110
testb %bpl, %bpl
je 0x2c56
movq 0x438b(%rip), %rdi      # 0x6fd0
leaq 0x2422(%rip), %rsi      # 0x506e
movl $0xf, %edx
callq 0x2210
leaq 0x2421(%rip), %rsi      # 0x507e
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x2c93
movq 0x4360(%rip), %r14      # 0x6fd0
leaq 0x2411(%rip), %rsi      # 0x5088
movl $0x1, %edx
movq %r14, %rdi
callq 0x2210
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x2210
leaq 0x7(%rsp), %rsi
movb $0xa, (%rsi)
movq 0x432e(%rip), %rdi      # 0x6fd0
movl $0x1, %edx
callq 0x2210
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/eschwabe[P]interview-practice/src/reversewords.cpp
// Function: ReverseWords(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string ReverseWords(const string& str) {
    string rstr = str;
    reverse(rstr.begin(), rstr.end());

    auto word_start = rstr.begin();
    auto word_end = word_start;

    while(word_start != rstr.end() && word_end != rstr.end()) {

        while(word_start != rstr.end() && (*word_start) == ' ') {
            word_start++;
        }

        word_end = word_start;
        while(word_end != rstr.end() && (*word_end) != ' ') {
            word_end++;
        }

        reverse(word_start, word_end);

        word_start = word_end;
    }

    return rstr;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x1494
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
setne %dl
addq %rax, %rcx
decq %rcx
cmpq %rax, %rcx
seta %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x126a
incq %rax
movb -0x1(%rax), %dl
movb (%rcx), %sil
movb %sil, -0x1(%rax)
movb %dl, (%rcx)
decq %rcx
leaq 0x1(%rax), %rdx
cmpq %rcx, %rax
movq %rdx, %rax
jb 0x124f
movq 0x8(%rbx), %rdx
testq %rdx, %rdx
je 0x12ee
movq (%rbx), %rcx
addq %rcx, %rdx
movq %rcx, %rax
cmpb $0x20, (%rax)
jne 0x128c
incq %rax
cmpq %rdx, %rax
jne 0x127c
movq %rdx, %rax
movq %rax, %rcx
cmpq %rdx, %rax
je 0x12a7
movq %rax, %rcx
cmpb $0x20, (%rcx)
je 0x12a7
incq %rcx
cmpq %rdx, %rcx
jne 0x1297
movq %rdx, %rcx
cmpq %rcx, %rax
setne %sil
leaq -0x1(%rcx), %rdx
cmpq %rax, %rdx
seta %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x12e2
incq %rax
movb -0x1(%rax), %sil
movb (%rdx), %dil
movb %dil, -0x1(%rax)
movb %sil, (%rdx)
decq %rdx
leaq 0x1(%rax), %rsi
cmpq %rdx, %rax
movq %rsi, %rax
jb 0x12c5
movq (%rbx), %rdx
addq 0x8(%rbx), %rdx
cmpq %rdx, %rcx
jne 0x1279
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<Student>::add(Student)
void DoubleLinkedList<T>::add(T value) {
    if(head_ == nullptr)
        head_ = new DoubleListNode<T>{ value, nullptr, tail_ };
        // tail = nullptr in this case
    else if(size_ == 1) {
        // Set tail to new value
        tail_ = new DoubleListNode<T>{ value, head_, nullptr };
        // Make head => tail (forward link)
        head_->next = tail_;
    }
    else {
        // Make a new node with the passed value that is backward linked to tail and forward linked to nullptr
        DoubleListNode<T>* neo = new DoubleListNode<T>{ value, tail_, nullptr };
        // Make tail => neo
        tail_->next = neo;
        // Make neo the new tail
        tail_ = neo;
    }

    size_++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
cmpq $0x0, 0x8(%rdi)
je 0x53e6
movl 0x18(%r14), %r12d
movl $0x68, %edi
callq 0x3130
movq %rax, %rbx
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
cmpl $0x1, %r12d
jne 0x5458
movq %rbx, %rdi
callq 0x5950
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r13, 0x20(%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5950
movq %rbx, %rdi
addq $0x40, %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x59f8
movq 0x8(%r14), %rax
movq %rax, 0x58(%rbx)
movq $0x0, 0x60(%rbx)
movq %rbx, 0x10(%r14)
movq %rbx, 0x60(%rax)
jmp 0x54aa
movl $0x68, %edi
callq 0x3130
movq %rax, %rbx
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x5950
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r13, 0x20(%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5950
movq %rbx, %rdi
addq $0x40, %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x59f8
movq $0x0, 0x58(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x60(%rbx)
movq %rbx, 0x8(%r14)
jmp 0x54aa
movq %rbx, %rdi
callq 0x5950
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r13, 0x20(%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5950
movq %rbx, %rdi
addq $0x40, %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x59f8
movq 0x10(%r14), %rax
movq %rax, 0x58(%rbx)
movq $0x0, 0x60(%rbx)
movq %rbx, 0x60(%rax)
movq %rbx, 0x10(%r14)
incl 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x54c9
jmp 0x54c9
jmp 0x54e3
jmp 0x54e3
jmp 0x5500
jmp 0x5500
movq %rax, %r14
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x54e6
movq (%r13), %rsi
incq %rsi
callq 0x3140
jmp 0x54e6
movq %rax, %r14
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x5503
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3140
jmp 0x5503
movq %rax, %r14
movl $0x68, %esi
movq %rbx, %rdi
callq 0x3140
movq %r14, %rdi
callq 0x31e0
// File: /workspace/github_cpp_makefile_star2_O1/MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<Student>::remove()
void DoubleLinkedList<T>::remove() {
    DoubleListNode<T>* oldTail = tail_;
    // Make tail the previous value
    tail_ = tail_->previous;
    // Forward link it to nullptr
    tail_->next = nullptr;
    // decrement size
    size_--;

    delete oldTail;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rbx
movq 0x58(%rbx), %rax
movq %rax, 0x10(%rdi)
movq $0x0, 0x60(%rax)
decl 0x18(%rdi)
testq %rbx, %rbx
je 0x5585
leaq 0x40(%rbx), %rdi
callq 0x5b6e
movq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
cmpq %rax, %rdi
je 0x555b
movq (%rax), %rsi
incq %rsi
callq 0x3140
movq (%rbx), %rdi
leaq 0x10(%rbx), %rax
cmpq %rax, %rdi
je 0x5572
movq (%rax), %rsi
incq %rsi
callq 0x3140
movl $0x68, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3140
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<Student>::remove(Student)
void DoubleLinkedList<T>::remove(T value) {
    if(head_->value == value) {
        DoubleListNode<T>* oldHead = head_;
        head_ = head_->next;
        head_->previous = nullptr;
        delete oldHead;
        size_--;
        return;
    }

    DoubleListNode<T>* current = head_;
    while(current != nullptr) {
        if(current->value == value) {
            // If there is are values 1, 2, 3 that are linked to each other,
            // 1 => 3
            current->previous->next = current->next;
            // 1 <=  3 (backward link)
            current->next->previous = current->previous;

            // Delete the removed node
            delete current;
            size_--;
        }
        current = current->next;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0xbf90
movq 0x8(%rbx), %r14
testb %al, %al
je 0x5615
movq 0x60(%r14), %rax
movq %rax, 0x8(%rbx)
movq $0x0, 0x58(%rax)
testq %r14, %r14
je 0x5607
leaq 0x40(%r14), %rdi
callq 0x5b6e
movq 0x20(%r14), %rdi
leaq 0x30(%r14), %rax
cmpq %rax, %rdi
je 0x55e3
movq (%rax), %rsi
incq %rsi
callq 0x3140
movq (%r14), %rdi
leaq 0x10(%r14), %rax
cmpq %rax, %rdi
je 0x55fa
movq (%rax), %rsi
incq %rsi
callq 0x3140
movl $0x68, %esi
movq %r14, %rdi
callq 0x3140
decl 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testq %r14, %r14
je 0x560a
movq %r14, %rdi
movq %r15, %rsi
callq 0xbf90
testb %al, %al
je 0x5685
movq 0x58(%r14), %rax
movq 0x60(%r14), %rcx
movq %rcx, 0x60(%rax)
movq 0x60(%r14), %rcx
movq %rax, 0x58(%rcx)
leaq 0x40(%r14), %rdi
callq 0x5b6e
movq 0x20(%r14), %rdi
leaq 0x30(%r14), %rax
cmpq %rax, %rdi
je 0x565e
movq (%rax), %rsi
incq %rsi
callq 0x3140
movq (%r14), %rdi
leaq 0x10(%r14), %rax
cmpq %rax, %rdi
je 0x5675
movq (%rax), %rsi
incq %rsi
callq 0x3140
movl $0x68, %esi
movq %r14, %rdi
callq 0x3140
decl 0x18(%rbx)
movq 0x60(%r14), %r14
jmp 0x5615
nop
// File: /workspace/github_cpp_makefile_star2_O1/MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::exists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool DoubleLinkedList<T>::exists(T value) {
    DoubleListNode<T>* current = head_;
    while(current != nullptr) {
        if(current->value == value)
            return true;

        current = current->next;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8(%rdi), %r15
testq %r15, %r15
setne %bl
je 0x4e91
movq %rsi, %r14
movq 0x8(%rsi), %r12
movq 0x8(%r15), %rdx
cmpq %r12, %rdx
jne 0x4e85
testq %rdx, %rdx
je 0x4e91
movq (%r14), %rsi
movq (%r15), %rdi
callq 0x3150
testl %eax, %eax
je 0x4e91
movq 0x28(%r15), %r15
testq %r15, %r15
setne %bl
jne 0x4e68
andb $0x1, %bl
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::exists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool LinkedList<T>::exists(T value) {
    ListNode<T>* current = head_;
    while(current != nullptr) {
        if(current->value == value)
            return true;

        current = current->next;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8(%rdi), %r15
testq %r15, %r15
setne %bl
je 0x75b7
movq %rsi, %r14
movq 0x8(%rsi), %r12
movq 0x8(%r15), %rdx
cmpq %r12, %rdx
jne 0x75ab
testq %rdx, %rdx
je 0x75b7
movq (%r14), %rsi
movq (%r15), %rdi
callq 0x3150
testl %eax, %eax
je 0x75b7
movq 0x20(%r15), %r15
testq %r15, %r15
setne %bl
jne 0x758e
andb $0x1, %bl
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<Student>::add(Student)
void LinkedList<T>::add(T value) {
    if(head_ == nullptr)
        head_ = new ListNode<T>{ value, tail_ };
        // tail = nullptr in this case
    else if(size_ == 1) {
        // Set tail to new value
        tail_ = new ListNode<T>{ value, nullptr };
        // Make head => tail (forward link)
        head_->next = tail_;
    }
    else {
        // Make a new node with the passed value that is forward linked to nullptr
        ListNode<T>* neo = new ListNode<T>{ value, nullptr };
        // Make tail => neo
        tail_->next = neo;
        // Make neo the new tail
        tail_ = neo;
    }

    size_++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
cmpq $0x0, 0x8(%rdi)
je 0x7ae4
movl 0x18(%r14), %r12d
movl $0x60, %edi
callq 0x3130
movq %rax, %rbx
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
cmpl $0x1, %r12d
jne 0x7b4e
movq %rbx, %rdi
callq 0x5950
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r13, 0x20(%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5950
movq %rbx, %rdi
addq $0x40, %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x59f8
movq $0x0, 0x58(%rbx)
movq %rbx, 0x10(%r14)
movq 0x8(%r14), %rax
movq %rbx, 0x58(%rax)
jmp 0x7b9c
movl $0x60, %edi
callq 0x3130
movq %rax, %rbx
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x5950
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r13, 0x20(%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5950
movq %rbx, %rdi
addq $0x40, %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x59f8
movq 0x10(%r14), %rax
movq %rax, 0x58(%rbx)
movq %rbx, 0x8(%r14)
jmp 0x7b9c
movq %rbx, %rdi
callq 0x5950
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r13, 0x20(%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5950
movq %rbx, %rdi
addq $0x40, %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x59f8
movq $0x0, 0x58(%rbx)
movq 0x10(%r14), %rax
movq %rbx, 0x58(%rax)
movq %rbx, 0x10(%r14)
incl 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7bbb
jmp 0x7bbb
jmp 0x7bd5
jmp 0x7bd5
jmp 0x7bf2
jmp 0x7bf2
movq %rax, %r14
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x7bd8
movq (%r13), %rsi
incq %rsi
callq 0x3140
jmp 0x7bd8
movq %rax, %r14
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x7bf5
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3140
jmp 0x7bf5
movq %rax, %r14
movl $0x60, %esi
movq %rbx, %rdi
callq 0x3140
movq %r14, %rdi
callq 0x31e0
// File: /workspace/github_cpp_makefile_star2_O1/MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<Student>::remove()
void LinkedList<T>::remove() {
    ListNode<T>* oldTail = tail_;
    ListNode<T>* previous = head_;

    while(previous->next != tail_)
        previous = previous->next;

    previous->next = nullptr;
    delete oldTail;

    size_--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %r14
movq %rax, %rcx
movq 0x58(%rax), %rax
cmpq %r14, %rax
jne 0x7c1c
movq $0x0, 0x58(%rcx)
testq %r14, %r14
je 0x7c7a
leaq 0x40(%r14), %rdi
callq 0x5b6e
movq 0x20(%r14), %rdi
leaq 0x30(%r14), %rax
cmpq %rax, %rdi
je 0x7c56
movq (%rax), %rsi
incq %rsi
callq 0x3140
movq (%r14), %rdi
leaq 0x10(%r14), %rax
cmpq %rax, %rdi
je 0x7c6d
movq (%rax), %rsi
incq %rsi
callq 0x3140
movl $0x60, %esi
movq %r14, %rdi
callq 0x3140
decl 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<Student>::remove(Student)
void LinkedList<T>::remove(T value) {
    if(head_->value == value) {
        ListNode<T>* oldHead = head_;
        head_ = head_->next;
        delete oldHead;
        size_--;
        return;
    }

    ListNode<T>* previous = head_;
    ListNode<T>* current = head_->next;
    while(current != nullptr) {
        if(current->value == value) {
            // Make previous's next, current's next
            previous->next = current->next;
            // Delete the removed node
            delete current;
            size_--;
        }
        current = current->next;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0xbf90
movq 0x8(%rbx), %r14
movq 0x58(%r14), %r12
testb %al, %al
je 0x7d02
movq %r12, 0x8(%rbx)
testq %r14, %r14
je 0x7cf6
leaq 0x40(%r14), %rdi
callq 0x5b6e
movq 0x20(%r14), %rdi
leaq 0x30(%r14), %rax
cmpq %rax, %rdi
je 0x7cd2
movq (%rax), %rsi
incq %rsi
callq 0x3140
movq (%r14), %rdi
leaq 0x10(%r14), %rax
cmpq %rax, %rdi
je 0x7ce9
movq (%rax), %rsi
incq %rsi
callq 0x3140
movl $0x60, %esi
movq %r14, %rdi
callq 0x3140
decl 0x18(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testq %r12, %r12
je 0x7cf9
movq %r12, %rdi
movq %r15, %rsi
callq 0xbf90
testb %al, %al
je 0x7d6c
movq 0x58(%r12), %rax
movq %rax, 0x58(%r14)
leaq 0x40(%r12), %rdi
callq 0x5b6e
movq 0x20(%r12), %rdi
leaq 0x30(%r12), %rax
cmpq %rax, %rdi
je 0x7d43
movq (%rax), %rsi
incq %rsi
callq 0x3140
movq (%r12), %rdi
leaq 0x10(%r12), %rax
cmpq %rax, %rdi
je 0x7d5c
movq (%rax), %rsi
incq %rsi
callq 0x3140
movl $0x60, %esi
movq %r12, %rdi
callq 0x3140
decl 0x18(%rbx)
movq 0x58(%r12), %r12
jmp 0x7d02
nop
// File: /workspace/github_cpp_makefile_star2_O1/MechaDragonX[P]CPPCollections/queue.cpp
// Function: Queue<Student>::add(Student)
void Queue<T>::add(T value) {
    if(head_ == nullptr)
        head_ = new DoubleListNode<T>{ value, nullptr, tail_ };
        // tail = nullptr in this case
    else if(size_ == 1) {
        // Set tail to new value
        tail_ = new DoubleListNode<T>{ value, head_, nullptr };
        // Make head => tail (forward link)
        head_->next = tail_;
    }
    else {
        // Make a new node with the passed value that is forward linked to nullptr
        DoubleListNode<T>* neo = new DoubleListNode<T>{ value, tail_, nullptr };
        // Make tail => neo
        tail_->next = neo;
        // Make neo the new tail
        tail_ = neo;
    }

    size_++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
cmpq $0x0, 0x8(%rdi)
je 0x99e2
movl 0x18(%r14), %r12d
movl $0x68, %edi
callq 0x3130
movq %rax, %rbx
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
cmpl $0x1, %r12d
jne 0x9a54
movq %rbx, %rdi
callq 0x5950
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r13, 0x20(%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5950
movq %rbx, %rdi
addq $0x40, %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x59f8
movq 0x8(%r14), %rax
movq %rax, 0x58(%rbx)
movq $0x0, 0x60(%rbx)
movq %rbx, 0x10(%r14)
movq %rbx, 0x60(%rax)
jmp 0x9aa6
movl $0x68, %edi
callq 0x3130
movq %rax, %rbx
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x5950
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r13, 0x20(%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5950
movq %rbx, %rdi
addq $0x40, %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x59f8
movq $0x0, 0x58(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x60(%rbx)
movq %rbx, 0x8(%r14)
jmp 0x9aa6
movq %rbx, %rdi
callq 0x5950
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r13, 0x20(%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5950
movq %rbx, %rdi
addq $0x40, %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x59f8
movq 0x10(%r14), %rax
movq %rax, 0x58(%rbx)
movq $0x0, 0x60(%rbx)
movq %rbx, 0x60(%rax)
movq %rbx, 0x10(%r14)
incl 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9ac5
jmp 0x9ac5
jmp 0x9adf
jmp 0x9adf
jmp 0x9afc
jmp 0x9afc
movq %rax, %r14
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x9ae2
movq (%r13), %rsi
incq %rsi
callq 0x3140
jmp 0x9ae2
movq %rax, %r14
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x9aff
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3140
jmp 0x9aff
movq %rax, %r14
movl $0x68, %esi
movq %rbx, %rdi
callq 0x3140
movq %r14, %rdi
callq 0x31e0
// File: /workspace/github_cpp_makefile_star2_O1/MechaDragonX[P]CPPCollections/queue.cpp
// Function: Queue<Student>::remove()
void Queue<T>::remove() {
    DoubleListNode<T>* oldHead = head_;
    // Make value after head point back to nullptr
    head_->next->previous = nullptr;
    delete oldHead;

    size_--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq 0x60(%r14), %rax
movq $0x0, 0x58(%rax)
testq %r14, %r14
je 0x9b78
leaq 0x40(%r14), %rdi
callq 0x5b6e
movq 0x20(%r14), %rdi
leaq 0x30(%r14), %rax
cmpq %rax, %rdi
je 0x9b54
movq (%rax), %rsi
incq %rsi
callq 0x3140
movq (%r14), %rdi
leaq 0x10(%r14), %rax
cmpq %rax, %rdi
je 0x9b6b
movq (%rax), %rsi
incq %rsi
callq 0x3140
movl $0x68, %esi
movq %r14, %rdi
callq 0x3140
decl 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/MechaDragonX[P]CPPCollections/student.cpp
// Function: Student::Student()
Student::Student() {
    // Initialize RNG with current time as seed
    // srand(time(nullptr));

    // id_ = rand() % 10000 + 1;
    givenName_ = "";
    surname_ = "";
    coursesTaken_ = {};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x10(%rdi), %rbx
movq %rbx, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movb %al, 0x10(%rdi)
leaq 0x20(%rdi), %r15
leaq 0x30(%rdi), %r13
movq %r13, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movb %al, 0x30(%rdi)
leaq 0x40(%rdi), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movq %rax, 0x50(%rdi)
leaq 0x4c28(%rip), %rcx      # 0x103be
xorl %esi, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x31b0
movq 0x28(%r14), %rdx
leaq 0x4c11(%rip), %rcx      # 0x103be
movq %r15, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x31b0
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xc1ae
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, -0x30(%rbp)
movq %r12, %rdi
callq 0x5b6e
movq (%r15), %rdi
cmpq %r13, %rdi
je 0xb7f5
movq (%r13), %rsi
incq %rsi
callq 0x3140
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3270
movq -0x30(%rbp), %rdi
callq 0x31e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/MechaDragonX[P]CPPCollections/student.cpp
// Function: Student::removeCourse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool Student::removeCourse(std::string courseId) {
    if(std::find(coursesTaken_.begin(), coursesTaken_.end(), courseId) != coursesTaken_.end()) {
        coursesTaken_.erase(std::find(coursesTaken_.begin(), coursesTaken_.end(), courseId));
        return true;
    }

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
movq 0x48(%rbx), %rsi
movq %r14, %rdx
callq 0xc469
movq %rax, %r15
movq 0x48(%rbx), %r12
cmpq %r12, %rax
je 0xba22
addq $0x40, %rbx
movq (%rbx), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xc469
movq %rbx, %rdi
movq %rax, %rsi
callq 0xc7c6
cmpq %r12, %r15
setne %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Sweet-john[P]Linux_bash/OS.cpp
// Function: checkSpecialOrder(char* const*)
bool checkSpecialOrder(char *const argv[])
{
 bool check = false;
 if (strcmp(argv[0],"go")==0)
	 {check = true ; go(argv);}
 else if
	 (strcmp(argv[0],"history")==0) {check = true ; printHistory();}
 else if
	 (strcmp(argv[0],"pid")==0) {check = true ; printPid();}
 else if 
	 (strcmp(argv[0],"continue")==0) {check = true ; cont(argv[1]);}
 else if 
	 (strcmp(argv[0],"jobs")==0) {check = true ; printJobs();}
 else if 
	 (strcmp(argv[0],"status")==0) {check = true ; printStatus();}
 return check;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movq (%rdi), %rbx
leaq 0x1b30(%rip), %rsi      # 0x4020
movq %rbx, %rdi
callq 0x21d0
testl %eax, %eax
je 0x255f
leaq 0x1b20(%rip), %rsi      # 0x4023
movq %rbx, %rdi
callq 0x21d0
testl %eax, %eax
je 0x2569
leaq 0x1b15(%rip), %rsi      # 0x402b
movq %rbx, %rdi
callq 0x21d0
testl %eax, %eax
je 0x2570
leaq 0x1b06(%rip), %rsi      # 0x402f
movq %rbx, %rdi
callq 0x21d0
testl %eax, %eax
je 0x2577
leaq 0x1afc(%rip), %rsi      # 0x4038
movq %rbx, %rdi
callq 0x21d0
testl %eax, %eax
je 0x2582
leaq 0x1aee(%rip), %rsi      # 0x403d
movq %rbx, %rdi
callq 0x21d0
testl %eax, %eax
je 0x2589
xorl %eax, %eax
jmp 0x2590
movq %r14, %rdi
callq 0x2595
jmp 0x258e
callq 0x25cc
jmp 0x258e
callq 0x2669
jmp 0x258e
movq 0x8(%r14), %rdi
callq 0x33b2
jmp 0x258e
callq 0x3461
jmp 0x258e
callq 0x34c4
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Sweet-john[P]Linux_bash/OS.cpp
// Function: printPid()
void printPid()
{
 int i = 0;
 int size = pidList.size();
 int j = 1;
 if (i<size-5)
  i = size - 5; 
  while(i<size)
  {
   cout<<"["<<size-i<<"] "<<pidList[size-j]<<"\n";
   i++;
   j++;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0xd772(%rip), %r12      # 0xfdf0
subq 0xd763(%rip), %r12      # 0xfde8
shrq $0x2, %r12
leal -0x5(%r12), %eax
xorl %r13d, %r13d
cmpl $0x6, %r12d
cmovgel %eax, %r13d
cmpl %r12d, %r13d
jge 0x272e
movslq %r12d, %r14
decq %r14
cmpl $0x6, %r12d
movl $0x5, %eax
cmovgel %r12d, %eax
negl %eax
leal (%r12,%rax), %ebx
addl $0x5, %ebx
movl $0x1, %edx
movq 0x3906(%rip), %r15      # 0x5fd0
movq %r15, %rdi
leaq 0x19a0(%rip), %rsi      # 0x4074
callq 0x2160
movq %r15, %rdi
movl %ebx, %esi
callq 0x2280
movq %rax, %r15
movl $0x2, %edx
movq %rax, %rdi
leaq 0x1981(%rip), %rsi      # 0x4076
callq 0x2160
movq 0xd6e7(%rip), %rax      # 0xfde8
movl (%rax,%r14,4), %esi
movq %r15, %rdi
callq 0x2280
movl $0x1, %edx
movq %rax, %rdi
leaq 0x19e2(%rip), %rsi      # 0x40fe
callq 0x2160
incl %r13d
decq %r14
decl %ebx
cmpl %r12d, %r13d
jl 0x26be
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Sweet-john[P]Linux_bash/OS.cpp
// Function: setHistory()
void setHistory()
{
 historyCommand[historyCount]=(char *)malloc(50*sizeof(char));
 memset(historyCommand[historyCount],0,50*sizeof(char));
 strcpy(historyCommand[historyCount],Command);
 historyCount++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x32, %edi
callq 0x21b0
movslq 0xd68c(%rip), %rbx      # 0xfde0
leaq 0x3a45(%rip), %rcx      # 0x61a0
movq %rax, (%rcx,%rbx,8)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movw $0x0, 0x30(%rax)
leaq 0xd686(%rip), %rsi      # 0xfe00
movq %rax, %rdi
callq 0x2120
leal 0x1(%rbx), %eax
movl %eax, 0xd655(%rip)      # 0xfde0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Sweet-john[P]Linux_bash/OS.cpp
// Function: execute(char* const*)
void execute(char *const argv[])
{ 
 pid=fork();
 int success;
 if (pid!=0)
 { /*waitpid(pid,&success,0);
   if (WEXITSTATUS(success)==0)
	{
	setPid(pid);
	}*/
	waitid(P_PID,pid,&info,WEXITED|WSTOPPED);
	setPid(pid);
 }
 else
 {
	if (execvp(argv[0],argv)<0)
        {
		perror("Exec error ");
		exit(-1);
	}
 }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2040
movl %eax, 0xd66a(%rip)      # 0xfe50
testl %eax, %eax
je 0x2813
leaq 0xd667(%rip), %rdx      # 0xfe58
movl $0x1, %edi
movl %eax, %esi
movl $0x6, %ecx
callq 0x2050
movl 0xd648(%rip), %edi      # 0xfe50
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2792
movq (%rbx), %rdi
movq %rbx, %rsi
callq 0x20c0
testl %eax, %eax
js 0x2829
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/Sweet-john[P]Linux_bash/OS.cpp
// Function: prompt()
void prompt()
{
 char host[50];
 char cwd[50];
 gethostname(host,sizeof(host));
 getcwd(cwd,sizeof(cwd));
 cout<<"["<<host<<":"<<cwd<<"] $ ";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
leaq -0x90(%rbp), %r15
movl $0x32, %esi
movq %r15, %rdi
callq 0x2200
leaq -0x50(%rbp), %r14
movl $0x32, %esi
movq %r14, %rdi
callq 0x2090
movq 0x3769(%rip), %rbx      # 0x5fd0
leaq 0x1806(%rip), %rsi      # 0x4074
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2160
movq %r15, %rdi
callq 0x2080
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x2160
leaq 0x17ed(%rip), %rsi      # 0x4085
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2160
movq %r14, %rdi
callq 0x2080
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2160
leaq 0x17c5(%rip), %rsi      # 0x4087
movl $0x4, %edx
movq %rbx, %rdi
callq 0x2160
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Sweet-john[P]Linux_bash/OS.cpp
// Function: main
int main()
{

 signal(SIGINT,kill_sig_handler);
 signal(SIGTSTP,stp_sig_handler);

 while(1)
 {
 prompt();
 cin.getline(Command,80);

 if (strcmp(Command,"exit")==0)
	{
	freeMemory();
	exit(0);
	}
 else if (Command == NULL)
 continue;
 
 setHistory();
 //check space
 char *temp = strtok(Command," ");
 vector<char*>obj;
 while (temp)
 	{
  	obj.push_back(temp);
  	temp = strtok(NULL," ");
 	}
 
 //obj to char
 char* a[obj.size()];
 int s;
 for (s = 0; s < obj.size() ;s++ )
	{
	  a[s]=obj[s];
 	}
 a[s]=NULL;

 multiple(a,obj.size());
 }
return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x940(%rip), %rsi       # 0x326c
movl $0x2, %edi
callq 0x2170
leaq 0x992(%rip), %rsi       # 0x32cf
movl $0x14, %edi
callq 0x2170
leaq 0xd4b2(%rip), %r14      # 0xfe00
leaq 0x1735(%rip), %r15      # 0x408a
leaq -0x40(%rbp), %r12
leaq -0x48(%rbp), %r13
callq 0x282e
movq 0x3677(%rip), %rbx      # 0x5fe0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %ecx
movl $0x50, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22a0
movl 0xd46a(%rip), %eax      # 0xfe00
movl $0x74697865, %ecx       # imm = 0x74697865
xorl %ecx, %eax
movzbl 0xd460(%rip), %ecx      # 0xfe04
orl %eax, %ecx
je 0x2a87
callq 0x273d
movq %r14, %rdi
movq %r15, %rsi
callq 0x2250
movq %rax, -0x48(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
testq %rax, %rax
je 0x2a03
movq -0x38(%rbp), %rsi
cmpq -0x30(%rbp), %rsi
je 0x29e8
movq %rax, (%rsi)
addq $0x8, -0x38(%rbp)
jmp 0x29f3
movq %r12, %rdi
movq %r13, %rdx
callq 0x2c14
xorl %edi, %edi
movq %r15, %rsi
callq 0x2250
movq %rax, -0x48(%rbp)
jmp 0x29cf
movq %r14, %rbx
movq %rsp, %r14
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
movq %rsp, %rdi
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %rdi
movq %rdi, %rsp
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, %rsi
subq %rax, %rsi
sarq $0x3, %rsi
cmpq %rax, %rcx
je 0x2a58
cmpq $0x1, %rsi
movq %rsi, %rdx
adcq $0x0, %rdx
xorl %ecx, %ecx
movq (%rax,%rcx,8), %r8
movq %r8, (%rdi,%rcx,8)
incq %rcx
cmpq %rcx, %rdx
jne 0x2a46
jmp 0x2a5a
xorl %ecx, %ecx
movq $0x0, (%rdi,%rcx,8)
callq 0x2d54
movq %r14, %rsp
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x2a7f
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x2150
movq %rbx, %r14
jmp 0x295d
callq 0x28da
xorl %edi, %edi
callq 0x2190
jmp 0x2a95
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x2aad
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x2150
movq %rbx, %rdi
callq 0x2290
nop
// File: /workspace/github_cpp_makefile_star2_O1/Sweet-john[P]Linux_bash/OS2.cpp
// Function: multiple(char**, int)
bool multiple(char*argv[],int size)
{
 int n = 1;
 bool check = false;
	for (int i = 0; i<size; i++)
	{
	 	if (strchr(argv[i],';')!=NULL||i==size-1)
		{
		check = true;
		char* temp[20];
		int j;
		char *out;
		if (strcmp(argv[i],";")!=0)
		out = strtok(argv[i],";");
		for (j = 0; j < n; j++)
			{
			if (j == n-1 && strcmp(argv[i],";")!=0)
			temp[j] = out;
			else if (j == n-1 && strcmp(argv[i],";")==0)
			temp[j] = NULL;
			else
			temp[j] = argv[i+j-n+1];
			}
		temp[j]=NULL;
		if (Redirection(temp,n)) 
			{
			n = 1;
			continue;
			}
		n = 0;
		bool isSpecial = checkSpecialOrder(temp);
		if (!isSpecial)
		execute(temp);
		}
	 n++;
	}
 return check;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, -0x38(%rbp)
xorl %ebx, %ebx
testl %esi, %esi
jle 0x2ed0
leal -0x1(%rsi), %r14d
movl %esi, %r13d
movl $0x1, %ecx
xorl %r12d, %r12d
movq $0x0, -0x40(%rbp)
movq %r14, -0x50(%rbp)
movq %r13, -0x48(%rbp)
movq %rcx, -0x30(%rbp)
movq -0x38(%rbp), %rax
movq (%rax,%r12,8), %r15
movq %r15, %rdi
movl $0x3b, %esi
callq 0x2070
testq %rax, %rax
setne %al
cmpq %r14, %r12
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x2e54
movq %r15, %rdi
leaq 0x12dc(%rip), %r14      # 0x40ab
movq %r14, %rsi
callq 0x21d0
testl %eax, %eax
je 0x2dea
movq %r15, %rdi
movq %r14, %rsi
callq 0x2250
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
testl %eax, %eax
movq %rbx, -0x58(%rbp)
jle 0x2e5a
leal -0x1(%rax), %r15d
movl %eax, %r13d
subl %eax, %ebx
xorl %r14d, %r14d
cmpq %r14, %r15
jne 0x2e25
movq -0x38(%rbp), %rax
movq (%rax,%r12,8), %rdi
leaq 0x1295(%rip), %rsi      # 0x40ab
callq 0x21d0
testl %eax, %eax
je 0x2e46
movq -0x60(%rbp), %rax
jmp 0x2e34
leal (%rbx,%r14), %eax
cltq
movq -0x38(%rbp), %rcx
movq 0x8(%rcx,%rax,8), %rax
movq %rax, -0x100(%rbp,%r14,8)
incq %r14
cmpq %r14, %r13
jne 0x2e02
jmp 0x2e5d
movq $0x0, -0x100(%rbp,%r14,8)
jmp 0x2e3c
movq -0x30(%rbp), %rcx
jmp 0x2ebc
xorl %r14d, %r14d
movq $0x0, -0x100(%rbp,%r14,8)
leaq -0x100(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x2ee7
movl %eax, %r15d
movl $0x1, %ecx
testb %al, %al
movq -0x58(%rbp), %rbx
movq -0x50(%rbp), %r14
movq -0x48(%rbp), %r13
jne 0x2eb1
leaq -0x100(%rbp), %rdi
callq 0x24dc
xorl %ecx, %ecx
testb %al, %al
jne 0x2eb1
leaq -0x100(%rbp), %rdi
callq 0x27d2
xorl %ecx, %ecx
movb $0x1, %al
movq %rax, -0x40(%rbp)
testb %r15b, %r15b
jne 0x2ebe
incl %ecx
incq %r12
incl %ebx
cmpq %r13, %r12
jne 0x2d95
movq -0x40(%rbp), %rbx
andb $0x1, %bl
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Sweet-john[P]Linux_bash/OS2.cpp
// Function: pipe(char**, char**)
void pipe(char* input[], char* output[])
{
int fd[2];
 pipe(fd);
 if (fork()!=0)
 {
  close(fd[0]);
  int fdo = dup(STDOUT_FILENO);
  close(1);
  dup(fd[1]);
  close(fd[1]);
  bool isSpecial = checkSpecialOrder(input);
  if (!isSpecial)
  execute(input);
  dup2(fdo,STDOUT_FILENO);
  wait(NULL);
 }
else
 {
  close(fd[1]);
  close(0);
  dup(fd[0]);
  close(fd[0]);
  bool isSpecial = checkSpecialOrder(output);
  if (!isSpecial)
  execute(output);
  exit(0); 
 }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x18(%rbp), %rdi
callq 0x21c0
callq 0x2040
testl %eax, %eax
je 0x3231
movl -0x18(%rbp), %edi
callq 0x22b0
movl $0x1, %edi
callq 0x2210
movl %eax, %r14d
movl $0x1, %edi
callq 0x22b0
movl -0x14(%rbp), %edi
callq 0x2210
movl -0x14(%rbp), %edi
callq 0x22b0
movq %rbx, %rdi
callq 0x24dc
testb %al, %al
jne 0x3214
movq %rbx, %rdi
callq 0x27d2
movl %r14d, %edi
movl $0x1, %esi
callq 0x2110
xorl %edi, %edi
callq 0x21a0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl -0x14(%rbp), %edi
callq 0x22b0
xorl %edi, %edi
callq 0x22b0
movl -0x18(%rbp), %edi
callq 0x2210
movl -0x18(%rbp), %edi
callq 0x22b0
movq %r14, %rdi
callq 0x24dc
testb %al, %al
jne 0x3264
movq %r14, %rdi
callq 0x27d2
xorl %edi, %edi
callq 0x2190
nop
// File: /workspace/github_cpp_makefile_star2_O1/Sweet-john[P]Linux_bash/OS3.cpp
// Function: kill_sig_handler(int)
void kill_sig_handler(int sig)
{
	kill(pid,SIGINT);
	
	for (int i=0; i<jobList.size();i++)
	{
		if (pid==jobList[i].id)
			jobList[i].status = TERMINATE;
	}
	printf("\nThe current process has been killed\n");	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xcbd7(%rip), %rbx      # 0xfe50
movl (%rbx), %edi
movl $0x2, %esi
callq 0x21e0
movq 0xcc5c(%rip), %rax      # 0xfee8
movq 0xcc4d(%rip), %rcx      # 0xfee0
subq %rcx, %rax
je 0x32bd
sarq $0x3, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
xorl %edx, %edx
movl (%rbx), %esi
cmpl (%rcx,%rdx,8), %esi
jne 0x32b5
movl $0x3, 0x4(%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x32a6
leaq 0xe3c(%rip), %rdi       # 0x4100
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2230