// File: /workspace/github_cpp_makefile_star2_O1/MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<int>::toString[abi:cxx11]()
std::string DoubleLinkedList<T>::toString() {
    DoubleListNode<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 0xcd25(%rip), %rdx      # 0x103be
movq %rdi, -0x30(%rbp)
movq %rdx, %rsi
callq 0x5bd8
testq %r14, %r14
je 0x38c5
leaq -0x40(%rbp), %rbx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
leaq -0x78(%rbp), %r15
cmpq $0x0, 0x10(%r14)
je 0x3728
movq %r14, -0x80(%rbp)
movl (%r14), %r13d
movl %r13d, %r14d
negl %r14d
cmovsl %r13d, %r14d
movl $0x1, %r12d
cmpl $0xa, %r14d
jb 0x3799
movl $0x4, %r12d
movl %r14d, %eax
cmpl $0x63, %eax
jbe 0x3790
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x3796
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x3799
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x36ec
addl $-0x3, %r12d
jmp 0x3799
movq %r14, %r15
movl (%r14), %r13d
movl %r13d, %r14d
negl %r14d
cmovsl %r13d, %r14d
movl $0x1, %r12d
cmpl $0xa, %r14d
jb 0x385a
movl $0x4, %r12d
movl %r14d, %eax
cmpl $0x63, %eax
jbe 0x3851
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x3857
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x385a
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x3751
addl $-0x3, %r12d
jmp 0x385a
addl $-0x2, %r12d
jmp 0x3799
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 0x582c
movq %r15, %rdi
leaq 0xc832(%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 0x37fb
movq %rdx, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
jmp 0x3801
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 0x383e
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3140
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x38af
movq -0x68(%rbp), %rsi
jmp 0x38a7
addl $-0x2, %r12d
jmp 0x385a
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 0x582c
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 0x38af
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3140
movq 0x10(%r14), %r14
testq %r14, %r14
movl $0xd1b71759, %edx       # imm = 0xD1B71759
leaq -0x78(%rbp), %r15
jne 0x36bb
movq -0x30(%rbp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3906
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x3927
movq -0x40(%rbp), %rsi
jmp 0x391f
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x390e
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3140
jmp 0x390e
movq %rax, %r14
jmp 0x3927
movq %rax, %r14
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x3927
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x3140
movq -0x30(%rbp), %rax
movq (%rax), %rdi
cmpq -0x58(%rbp), %rdi
je 0x3943
movq -0x58(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3140
movq %r14, %rdi
callq 0x31e0
nop