// File: /workspace/github_cpp_makefile_star2_O1/tbonelaforge[P]gradebook/Gradebook.cpp
// Function: Gradebook::deserialize(std::istream&)
void Gradebook::deserialize(istream& in) {
    int numPrograms, numTests, numFinals;
    int programsWeight, testsWeight, finalExamWeight;
    int numStudents;
    bool recorded;
    in >> numPrograms >> numTests >> numFinals;
    in >> programsWeight >> testsWeight >> finalExamWeight;
    initialize(
               numPrograms,
               numTests,
               numFinals,
               programsWeight,
               testsWeight,
               finalExamWeight
               );
    in >> numStudents;
    for (int n = 0; n < numStudents; n++) {
        int i, j, k, grade, id;
        string firstName, lastName;
        float finalAverage;
        in >> id >> firstName >> lastName;
        Student * student = addStudent(id, firstName, lastName);
        for (int i = 0; i < numPrograms; i++) {
            in >> grade;
            student->setProgramGrade(i, grade);
        }
        for (int i = 0; i < numTests; i++) {
            in >> grade;
            student->setTestGrade(i, grade);
        }
        for (int i = 0; i < numFinals; i++) {
            in >> grade;
            student->setFinalExamGrade(grade);
        }
        in >> finalAverage;
        student->setFinalAverage(finalAverage);
    }
    for (int i = 0; i < numPrograms; i++) {
        in >> recorded;
        if (recorded) {
            setProgramRecorded(i);
        }
    }
    for (int i = 0; i < numTests; i++) {
        in >> recorded;
        if (recorded) {
            setTestRecorded(i);
        }
    }
    in >> recorded;
    if (recorded) {
        setFinalExamRecorded();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x34(%rbp), %rsi
movq %r14, %rdi
callq 0x2110
leaq -0x30(%rbp), %rsi
movq %rax, %rdi
callq 0x2110
leaq -0x3c(%rbp), %rsi
movq %rax, %rdi
callq 0x2110
leaq -0xe4(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2110
leaq -0xe0(%rbp), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x2110
leaq -0xdc(%rbp), %r13
movq %rax, %rdi
movq %r13, %rsi
callq 0x2110
leaq -0x34(%rbp), %rax
movl (%rax), %esi
leaq -0x30(%rbp), %rax
movl (%rax), %edx
leaq -0x3c(%rbp), %rax
movl (%rax), %ecx
movl (%r15), %r8d
movl (%r12), %r9d
movl (%r13), %eax
movl %eax, (%rsp)
movq %rbx, -0x48(%rbp)
movq %rbx, %rdi
callq 0x5234
leaq -0x54(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2110
cmpl $0x0, (%r15)
jle 0x5d89
leaq -0x38(%rbp), %r13
xorl %ebx, %ebx
leaq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x90(%rbp)
movb %cl, -0x88(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq %rcx, -0x70(%rbp)
movb %cl, -0x68(%rbp)
movq %r14, %rdi
leaq -0x50(%rbp), %rsi
callq 0x2110
movq %rax, %rdi
leaq -0x98(%rbp), %rsi
callq 0x2250
movq %rax, %rdi
leaq -0x78(%rbp), %rsi
callq 0x2250
movl -0x50(%rbp), %r15d
leaq -0xa8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
addq %rsi, %rdx
leaq -0xb8(%rbp), %rdi
callq 0x508c
leaq -0xc8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
addq %rsi, %rdx
leaq -0xd8(%rbp), %r12
movq %r12, %rdi
callq 0x508c
movq -0x48(%rbp), %rdi
movl %r15d, %esi
leaq -0xb8(%rbp), %rdx
movq %r12, %rcx
callq 0x5314
movq %rax, %r15
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x5c8a
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x5cac
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x21d0
cmpl $0x0, -0x34(%rbp)
jle 0x5cd7
xorl %r12d, %r12d
movq %r14, %rdi
movq %r13, %rsi
callq 0x2110
movl -0x38(%rbp), %edx
movq %r15, %rdi
movl %r12d, %esi
callq 0x6330
incl %r12d
cmpl -0x34(%rbp), %r12d
jl 0x5cb5
cmpl $0x0, -0x30(%rbp)
jle 0x5d02
xorl %r12d, %r12d
movq %r14, %rdi
movq %r13, %rsi
callq 0x2110
movl -0x38(%rbp), %edx
movq %r15, %rdi
movl %r12d, %esi
callq 0x6350
incl %r12d
cmpl -0x30(%rbp), %r12d
jl 0x5ce0
cmpl $0x0, -0x3c(%rbp)
jle 0x5d2a
xorl %r12d, %r12d
movq %r14, %rdi
movq %r13, %rsi
callq 0x2110
movl -0x38(%rbp), %esi
movq %r15, %rdi
callq 0x636a
incl %r12d
cmpl -0x3c(%rbp), %r12d
jl 0x5d0b
movq %r14, %rdi
leaq -0x4c(%rbp), %rsi
callq 0x2360
movss -0x4c(%rbp), %xmm0
movq %r15, %rdi
callq 0x6380
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x5d5c
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x5d7e
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x21d0
incl %ebx
cmpl -0x54(%rbp), %ebx
jl 0x5ba5
cmpl $0x0, -0x34(%rbp)
jle 0x5dbe
xorl %ebx, %ebx
leaq -0x29(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2180
cmpb $0x1, -0x29(%rbp)
jne 0x5db2
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movb $0x1, (%rax,%rbx)
incq %rbx
movslq -0x34(%rbp), %rax
cmpq %rax, %rbx
jl 0x5d95
cmpl $0x0, -0x30(%rbp)
jle 0x5df3
xorl %ebx, %ebx
leaq -0x29(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2180
cmpb $0x1, -0x29(%rbp)
jne 0x5de7
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movb $0x1, (%rax,%rbx)
incq %rbx
movslq -0x30(%rbp), %rax
cmpq %rax, %rbx
jl 0x5dca
leaq -0x29(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2180
cmpb $0x0, (%r15)
je 0x5e10
movq -0x48(%rbp), %rax
movb $0x1, 0x24(%rax)
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x5e4c
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x5e4c
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x5e7b
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x21d0
jmp 0x5e7b
jmp 0x5e78
jmp 0x5e78
jmp 0x5e78
jmp 0x5e78
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x5e94
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x5eb6
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x2310