// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x420, %rsp            # imm = 0x420
movl %edi, %ebx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x2310
leaq 0x2a97(%rip), %rsi      # 0x7320
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x2030
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rax
movq $0x15, 0x30(%rsp,%rax)
movslq %ebx, %rax
leaq 0x6948(%rip), %r12      # 0xb1f8
imulq $0x50, %rax, %r13
movq (%r12), %rdi
addq %r13, %rdi
callq 0x3b86
leaq 0x20(%rsp), %rdi
movl %eax, %esi
callq 0x2320
leaq 0x2f13(%rip), %rsi      # 0x77e6
movq %rax, %rdi
callq 0x21d0
movq %rax, %rbx
movq (%r12), %rdi
addq %r13, %rdi
callq 0x3a0e
movq %rbx, %rdi
movl %eax, %esi
callq 0x2320
movq 0x66d5(%rip), %rax      # 0xafd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl $0xfffffefb, %esi       # imm = 0xFFFFFEFB
andl 0x18(%rax,%rdx), %esi
orl $0x4, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x2, 0x8(%rax,%rcx)
movq (%r12), %rdi
addq %r13, %rdi
callq 0x3b86
movl %eax, %ebx
movq (%r12), %rdi
addq %r13, %rdi
callq 0x3a0e
cvtsi2ss %ebx, %xmm0
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
mulss 0x2bf7(%rip), %xmm0     # 0x7544
movq %rsp, %rdi
callq 0x4d5e
leaq 0x2bec(%rip), %rsi      # 0x7548
leaq 0x20(%rsp), %rdi
callq 0x21d0
movq (%rsp), %rcx
movsbl (%rcx), %esi
movq %rax, %rdi
callq 0x2210
movq (%rsp), %rcx
movsbl 0x1(%rcx), %esi
movq %rax, %rdi
callq 0x2210
movq (%rsp), %rcx
movsbl 0x2(%rcx), %esi
movq %rax, %rdi
callq 0x2210
movq (%rsp), %rcx
movsbl 0x3(%rcx), %esi
movq %rax, %rdi
callq 0x2210
movq (%rsp), %rcx
movsbl 0x4(%rcx), %esi
movq %rax, %rdi
callq 0x2210
leaq 0x2b8f(%rip), %rsi      # 0x754b
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
leaq 0x20(%rsp), %rdi
callq 0x2270
leaq 0x220(%rsp), %rdi
callq 0x2310
leaq 0x2966(%rip), %rsi      # 0x7350
leaq 0x220(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x2030
xorl %ebx, %ebx
leaq 0x220(%rsp), %r14
leaq 0x2aa6(%rip), %r15      # 0x74b1
movq (%r12), %rax
movq 0x38(%rax,%r13), %rcx
movl 0x40(%rax,%r13), %edx
subq 0x28(%rax,%r13), %rcx
leaq (%rdx,%rcx,8), %rcx
cmpq %rbx, %rcx
jbe 0x4a58
leaq (%rax,%r13), %rdi
addq $0x28, %rdi
movq %rbx, %rsi
callq 0x3c12
xorl %esi, %esi
testq %rdx, (%rax)
setne %sil
movq %r14, %rdi
callq 0x2300
movq %rax, %rdi
movq %r15, %rsi
callq 0x21d0
incq %rbx
jmp 0x4a0b
leaq 0x220(%rsp), %rdi
callq 0x20f0
leaq 0x220(%rsp), %rdi
callq 0x2270
leaq 0x220(%rsp), %rdi
callq 0x22a0
movq %rsp, %rdi
callq 0x20d0
leaq 0x20(%rsp), %rdi
callq 0x22a0
addq $0x420, %rsp            # imm = 0x420
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x4aad
jmp 0x4ab2
jmp 0x4aa8
movq %rax, %rbx
jmp 0x4aca
movq %rax, %rbx
jmp 0x4ac2
movq %rax, %rbx
leaq 0x220(%rsp), %rdi
callq 0x22a0
movq %rsp, %rdi
callq 0x20d0
leaq 0x20(%rsp), %rdi
callq 0x22a0
movq %rbx, %rdi
callq 0x2330