// File: /workspace/github_cpp_makefile_star2_O3/MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<int>::toString[abi:cxx11]()
std::string LinkedList<T>::toString() {
    ListNode<T>* current = head_;
    std::string output = "";
    while(current != nullptr) {
        if(current->next != nullptr) {
            // If type is Student
            if constexpr (std::is_same<T, Student>::value)
                output += current->value.toString(false) + " => ";
            // If type is std::string
            else if constexpr (std::is_same<T, std::string>::value)
                output += current->value + " => ";
            // Otherwise, it's a primitive
            else
                output += std::to_string(current->value) + " => ";
        }
        else {
            // If type is Student
            if constexpr (std::is_same<T, Student>::value)
                output += current->value.toString(false);
            // If type is std::string
            else if constexpr (std::is_same<T, std::string>::value)
                output += current->value;
            // Otherwise, it's a primitive
            else
                output += std::to_string(current->value);
        }

        current = current->next;
    }
    return output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq 0x8(%rsi), %r14
leaq 0x10(%rdi), %rax
movq %rax, -0x58(%rbp)
movq %rax, (%rdi)
leaq 0xa551(%rip), %rdx      # 0x103be
movq %rdi, -0x30(%rbp)
movq %rdx, %rsi
callq 0x5bdc
testq %r14, %r14
je 0x6099
leaq -0x40(%rbp), %rbx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
leaq -0x78(%rbp), %r15
cmpq $0x0, 0x8(%r14)
je 0x5efc
movq %r14, -0x80(%rbp)
movl (%r14), %r13d
movl %r13d, %r14d
negl %r14d
cmovsl %r13d, %r14d
movl $0x1, %r12d
cmpl $0xa, %r14d
jb 0x5f6d
movl $0x4, %r12d
movl %r14d, %eax
cmpl $0x63, %eax
jbe 0x5f64
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x5f6a
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x5f6d
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x5ec0
addl $-0x3, %r12d
jmp 0x5f6d
movq %r14, %r15
movl (%r14), %r13d
movl %r13d, %r14d
negl %r14d
cmovsl %r13d, %r14d
movl $0x1, %r12d
cmpl $0xa, %r14d
jb 0x602e
movl $0x4, %r12d
movl %r14d, %eax
cmpl $0x63, %eax
jbe 0x6025
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x602b
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x602e
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x5f25
addl $-0x3, %r12d
jmp 0x602e
addl $-0x2, %r12d
jmp 0x5f6d
decl %r12d
shrl $0x1f, %r13d
leal (%r12,%r13), %esi
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq %r15, %rdi
movl $0x2d, %edx
callq 0x3170
addq -0x78(%rbp), %r13
movq %r13, %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0x5828
movq %r15, %rdi
leaq 0xa05e(%rip), %rsi      # 0x10004
callq 0x3200
movq %rbx, -0x50(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq -0x80(%rbp), %r14
je 0x5fcf
movq %rdx, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
jmp 0x5fd5
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, -0x48(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x30(%rbp), %rdi
callq 0x3070
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x6012
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3140
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x6083
movq -0x68(%rbp), %rsi
jmp 0x607b
addl $-0x2, %r12d
jmp 0x602e
decl %r12d
shrl $0x1f, %r13d
leal (%r12,%r13), %esi
movq %rbx, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
movl $0x2d, %edx
callq 0x3170
addq -0x50(%rbp), %r13
movq %r13, %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0x5828
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x30(%rbp), %rdi
callq 0x3070
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
movq %r15, %r14
je 0x6083
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3140
movq 0x8(%r14), %r14
testq %r14, %r14
movl $0xd1b71759, %edx       # imm = 0xD1B71759
leaq -0x78(%rbp), %r15
jne 0x5e8f
movq -0x30(%rbp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x60da
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x60fb
movq -0x40(%rbp), %rsi
jmp 0x60f3
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x60e2
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3140
jmp 0x60e2
movq %rax, %r14
jmp 0x60fb
movq %rax, %r14
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x60fb
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x3140
movq -0x30(%rbp), %rax
movq (%rax), %rdi
cmpq -0x58(%rbp), %rdi
je 0x6117
movq -0x58(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3140
movq %r14, %rdi
callq 0x31e0
nop