// File: /workspace/github_cpp_makefile_star2_O3/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 0x5250
leaq -0x54(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2110
cmpl $0x0, (%r15)
jle 0x5dc7
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 0x50a6
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 0x50a6
movq -0x48(%rbp), %rdi
movl %r15d, %esi
leaq -0xb8(%rbp), %rdx
movq %r12, %rcx
callq 0x5330
movq %rax, %r15
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x5cc8
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x5cea
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x21d0
cmpl $0x0, -0x34(%rbp)
jle 0x5d15
xorl %r12d, %r12d
movq %r14, %rdi
movq %r13, %rsi
callq 0x2110
movl -0x38(%rbp), %edx
movq %r15, %rdi
movl %r12d, %esi
callq 0x634a
incl %r12d
cmpl -0x34(%rbp), %r12d
jl 0x5cf3
cmpl $0x0, -0x30(%rbp)
jle 0x5d40
xorl %r12d, %r12d
movq %r14, %rdi
movq %r13, %rsi
callq 0x2110
movl -0x38(%rbp), %edx
movq %r15, %rdi
movl %r12d, %esi
callq 0x636a
incl %r12d
cmpl -0x30(%rbp), %r12d
jl 0x5d1e
cmpl $0x0, -0x3c(%rbp)
jle 0x5d68
xorl %r12d, %r12d
movq %r14, %rdi
movq %r13, %rsi
callq 0x2110
movl -0x38(%rbp), %esi
movq %r15, %rdi
callq 0x6384
incl %r12d
cmpl -0x3c(%rbp), %r12d
jl 0x5d49
movq %r14, %rdi
leaq -0x4c(%rbp), %rsi
callq 0x2360
movss -0x4c(%rbp), %xmm0
movq %r15, %rdi
callq 0x639a
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x5d9a
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x5dbc
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x21d0
incl %ebx
cmpl -0x54(%rbp), %ebx
jl 0x5be3
cmpl $0x0, -0x34(%rbp)
jle 0x5dfc
xorl %ebx, %ebx
leaq -0x29(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2180
cmpb $0x1, -0x29(%rbp)
jne 0x5df0
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movb $0x1, (%rax,%rbx)
incq %rbx
movslq -0x34(%rbp), %rax
cmpq %rax, %rbx
jl 0x5dd3
cmpl $0x0, -0x30(%rbp)
jle 0x5e31
xorl %ebx, %ebx
leaq -0x29(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2180
cmpb $0x1, -0x29(%rbp)
jne 0x5e25
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movb $0x1, (%rax,%rbx)
incq %rbx
movslq -0x30(%rbp), %rax
cmpq %rax, %rbx
jl 0x5e08
leaq -0x29(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2180
cmpb $0x0, (%r15)
je 0x5e4e
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 0x5e8a
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x5e8a
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x5eb9
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x21d0
jmp 0x5eb9
jmp 0x5eb6
jmp 0x5eb6
jmp 0x5eb6
jmp 0x5eb6
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x5ed2
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x5ef4
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x2310