// File: tbonelaforge[P]gradebook/Gradebook.cpp
// Function: Gradebook::serialize(std::ostream&)
void Gradebook::serialize(ostream& out) {
    out << numPrograms << " ";
    out << numTests << " ";
    out << numFinals << endl;
    out << programsWeight << " ";
    out << testsWeight << " ";
    out << finalExamWeight << endl;
    out << numStudents << endl;
    Student * current = head;
    while (current != NULL) {
        current->serialize(out);
        out << endl;
        current = current->next;
    }
    for (int i = 0; i < numPrograms; i++) {
        out << programRecorded[i] << " ";
    }
    out << endl;
    for (int i = 0; i < numTests; i++) {
        out << testRecorded[i] << " ";
    }
    out << endl;
    out << finalExamRecorded << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl (%rax), %esi
callq 0x33e0
movq %rax, %rdi
leaq 0x3b5a(%rip), %rsi      # 0xa327
callq 0x3220
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdi
movl 0x10(%rax), %esi
callq 0x33e0
movq %rax, %rdi
leaq 0x3b3b(%rip), %rsi      # 0xa327
callq 0x3220
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdi
movl 0x20(%rax), %esi
callq 0x33e0
movq %rax, %rdi
movq 0x779d(%rip), %rsi      # 0xdfa8
callq 0x3250
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdi
movl 0x28(%rax), %esi
callq 0x33e0
movq %rax, %rdi
leaq 0x3afd(%rip), %rsi      # 0xa327
callq 0x3220
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdi
movl 0x2c(%rax), %esi
callq 0x33e0
movq %rax, %rdi
leaq 0x3ade(%rip), %rsi      # 0xa327
callq 0x3220
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdi
movl 0x30(%rax), %esi
callq 0x33e0
movq %rax, %rdi
movq 0x7740(%rip), %rsi      # 0xdfa8
callq 0x3250
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdi
movl 0x48(%rax), %esi
callq 0x33e0
movq %rax, %rdi
movq 0x7721(%rip), %rsi      # 0xdfa8
callq 0x3250
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x68c9
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x7740
movq -0x10(%rbp), %rdi
movq 0x76f1(%rip), %rsi      # 0xdfa8
callq 0x3250
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x6898
movl $0x0, -0x1c(%rbp)
movq -0x28(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl (%rcx), %eax
jge 0x6912
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdi
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movb (%rax,%rcx), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x3410
movq %rax, %rdi
leaq 0x3a25(%rip), %rsi      # 0xa327
callq 0x3220
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x68d0
movq -0x10(%rbp), %rdi
movq 0x768b(%rip), %rsi      # 0xdfa8
callq 0x3250
movl $0x0, -0x20(%rbp)
movq -0x28(%rbp), %rcx
movl -0x20(%rbp), %eax
cmpl 0x10(%rcx), %eax
jge 0x696c
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdi
movq 0x18(%rax), %rax
movslq -0x20(%rbp), %rcx
movb (%rax,%rcx), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x3410
movq %rax, %rdi
leaq 0x39cb(%rip), %rsi      # 0xa327
callq 0x3220
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x6929
movq -0x10(%rbp), %rdi
movq 0x7631(%rip), %rsi      # 0xdfa8
callq 0x3250
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdi
movb 0x24(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x3410
movq %rax, %rdi
movq 0x760d(%rip), %rsi      # 0xdfa8
callq 0x3250
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)