// File: TasnimAnas[P]Attendance-Management-System/src/fileHandlers.cpp
// Function: writeAttendance(int)
void writeAttendance(int i)
{
    ofstream writeStudent;
    writeStudent.open("Output/Student.txt", ios::app);
    writeStudent << setw(21) << Student[i].getTotalPresentDays() << "/" << Student[i].getTotalDays();
    cout << fixed;
    cout << setprecision(2);
    string parcent = to_string((float(Student[i].getTotalPresentDays()) / (Student[i].getTotalDays())) * 100);
    writeStudent << " (" << parcent[0] << parcent[1] << parcent[2] << parcent[3] << parcent[4] << "%)" << endl;
    writeStudent.close();

    ofstream writeStudentbin;
    writeStudentbin.open(".Data/Attendance.bin", ios::app);
    for (int j = 0; j < Student[i].isPresent.size(); j++)
    {
        writeStudentbin << Student[i].isPresent[j] << " ";
    }
    writeStudentbin << endl;

    writeStudentbin.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x520, %rsp            # imm = 0x520
movl %edi, -0x4(%rbp)
leaq -0x208(%rbp), %rdi
movq %rdi, -0x460(%rbp)
callq 0x3430
movq -0x460(%rbp), %rdi
leaq 0x47a9(%rip), %rsi      # 0xe548
movl $0x1, %edx
callq 0x3040
jmp 0x9dab
movl $0x15, %edi
callq 0x4890
movl %eax, -0x464(%rbp)
jmp 0x9dbd
movl -0x464(%rbp), %eax
movl %eax, -0x218(%rbp)
movl -0x218(%rbp), %esi
leaq -0x208(%rbp), %rdi
callq 0x32f0
movq %rax, -0x470(%rbp)
jmp 0x9de4
movslq -0x4(%rbp), %rsi
leaq 0xa4c1(%rip), %rdi      # 0x142b0
callq 0x48b0
movq %rax, %rdi
callq 0x7930
movl %eax, -0x474(%rbp)
jmp 0x9e04
movl -0x474(%rbp), %esi
movq -0x470(%rbp), %rdi
callq 0x3450
movq %rax, -0x480(%rbp)
jmp 0x9e1f
movq -0x480(%rbp), %rdi
leaq 0x49f1(%rip), %rsi      # 0xe81e
callq 0x3270
movq %rax, -0x488(%rbp)
jmp 0x9e3b
movslq -0x4(%rbp), %rsi
leaq 0xa46a(%rip), %rdi      # 0x142b0
callq 0x48b0
movq %rax, %rdi
callq 0x76d0
movl %eax, -0x48c(%rbp)
jmp 0x9e5b
movl -0x48c(%rbp), %esi
movq -0x488(%rbp), %rdi
callq 0x3450
jmp 0x9e6f
movq 0xa15a(%rip), %rdi      # 0x13fd0
leaq 0x8d3(%rip), %rsi       # 0xa750
callq 0x30c0
jmp 0x9e84
movl $0x2, %edi
callq 0xa780
movl %eax, -0x490(%rbp)
jmp 0x9e96
movl -0x490(%rbp), %eax
movl %eax, -0x21c(%rbp)
movl -0x21c(%rbp), %esi
movq 0xa121(%rip), %rdi      # 0x13fd0
callq 0x33f0
jmp 0x9eb6
movslq -0x4(%rbp), %rsi
leaq 0xa3ef(%rip), %rdi      # 0x142b0
callq 0x48b0
movq %rax, %rdi
callq 0x7930
movl %eax, -0x494(%rbp)
jmp 0x9ed6
movl -0x494(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x49c(%rbp)
movslq -0x4(%rbp), %rsi
leaq 0xa3bd(%rip), %rdi      # 0x142b0
callq 0x48b0
movq %rax, %rdi
callq 0x76d0
movl %eax, -0x498(%rbp)
jmp 0x9f08
movss -0x49c(%rbp), %xmm0
movl -0x498(%rbp), %eax
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
movss 0x461e(%rip), %xmm1     # 0xe544
mulss %xmm1, %xmm0
leaq -0x240(%rbp), %rdi
callq 0xa7a0
jmp 0x9f38
leaq 0x462c(%rip), %rsi      # 0xe56b
leaq -0x208(%rbp), %rdi
callq 0x3270
movq %rax, -0x4a8(%rbp)
jmp 0x9f54
xorl %eax, %eax
movl %eax, %esi
leaq -0x240(%rbp), %rdi
callq 0x3500
movq %rax, -0x4b0(%rbp)
jmp 0x9f6d
movq -0x4a8(%rbp), %rdi
movq -0x4b0(%rbp), %rax
movsbl (%rax), %esi
callq 0x3310
movq %rax, -0x4b8(%rbp)
jmp 0x9f8c
leaq -0x240(%rbp), %rdi
movl $0x1, %esi
callq 0x3500
movq %rax, -0x4c0(%rbp)
jmp 0x9fa6
movq -0x4b8(%rbp), %rdi
movq -0x4c0(%rbp), %rax
movsbl (%rax), %esi
callq 0x3310
movq %rax, -0x4c8(%rbp)
jmp 0x9fc5
leaq -0x240(%rbp), %rdi
movl $0x2, %esi
callq 0x3500
movq %rax, -0x4d0(%rbp)
jmp 0x9fdf
movq -0x4c8(%rbp), %rdi
movq -0x4d0(%rbp), %rax
movsbl (%rax), %esi
callq 0x3310
movq %rax, -0x4d8(%rbp)
jmp 0x9ffe
leaq -0x240(%rbp), %rdi
movl $0x3, %esi
callq 0x3500
movq %rax, -0x4e0(%rbp)
jmp 0xa018
movq -0x4d8(%rbp), %rdi
movq -0x4e0(%rbp), %rax
movsbl (%rax), %esi
callq 0x3310
movq %rax, -0x4e8(%rbp)
jmp 0xa037
leaq -0x240(%rbp), %rdi
movl $0x4, %esi
callq 0x3500
movq %rax, -0x4f0(%rbp)
jmp 0xa051
movq -0x4e8(%rbp), %rdi
movq -0x4f0(%rbp), %rax
movsbl (%rax), %esi
callq 0x3310
movq %rax, -0x4f8(%rbp)
jmp 0xa070
movq -0x4f8(%rbp), %rdi
leaq 0x44f0(%rip), %rsi      # 0xe56e
callq 0x3270
movq %rax, -0x500(%rbp)
jmp 0xa08c
movq -0x500(%rbp), %rdi
movq 0x9f1e(%rip), %rsi      # 0x13fb8
callq 0x32a0
jmp 0xa0a1
leaq -0x208(%rbp), %rdi
callq 0x3390
jmp 0xa0af
leaq -0x440(%rbp), %rdi
callq 0x3430
jmp 0xa0bd
leaq 0x44ad(%rip), %rsi      # 0xe571
leaq -0x440(%rbp), %rdi
movl $0x1, %edx
callq 0x3040
jmp 0xa0d7
movl $0x0, -0x444(%rbp)
movslq -0x444(%rbp), %rax
movq %rax, -0x508(%rbp)
movslq -0x4(%rbp), %rsi
leaq 0xa1b6(%rip), %rdi      # 0x142b0
callq 0x48b0
movq %rax, %rdi
addq $0x28, %rdi
callq 0x5a50
movq %rax, %rcx
movq -0x508(%rbp), %rax
cmpq %rcx, %rax
jae 0xa207
movslq -0x4(%rbp), %rsi
leaq 0xa187(%rip), %rdi      # 0x142b0
callq 0x48b0
movq %rax, %rdi
addq $0x28, %rdi
movslq -0x444(%rbp), %rsi
callq 0x7a90
movq %rdx, -0x518(%rbp)
movq %rax, -0x510(%rbp)
jmp 0xa151
movq -0x518(%rbp), %rax
movq -0x510(%rbp), %rcx
movq %rcx, -0x458(%rbp)
movq %rax, -0x450(%rbp)
leaq -0x458(%rbp), %rdi
callq 0x6740
movzbl %al, %esi
leaq -0x440(%rbp), %rdi
callq 0x3480
movq %rax, -0x520(%rbp)
jmp 0xa191
movq -0x520(%rbp), %rdi
leaq 0x4312(%rip), %rsi      # 0xe4b1
callq 0x3270
jmp 0xa1a6
jmp 0xa1a8
movl -0x444(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x444(%rbp)
jmp 0xa0e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
jmp 0xa263
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
jmp 0xa257
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
leaq -0x440(%rbp), %rdi
callq 0x33c0
jmp 0xa257
movq 0x9daa(%rip), %rsi      # 0x13fb8
leaq -0x440(%rbp), %rdi
callq 0x32a0
jmp 0xa21c
leaq -0x440(%rbp), %rdi
callq 0x3390
jmp 0xa22a
leaq -0x440(%rbp), %rdi
callq 0x33c0
leaq -0x240(%rbp), %rdi
callq 0x3180
leaq -0x208(%rbp), %rdi
callq 0x33c0
addq $0x520, %rsp            # imm = 0x520
popq %rbp
retq
leaq -0x240(%rbp), %rdi
callq 0x3180
leaq -0x208(%rbp), %rdi
callq 0x33c0
movq -0x210(%rbp), %rdi
callq 0x3460
nopl (%rax,%rax)