// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movl %edi, %ebx
leaq 0x228(%rsp), %r14
movq %r14, %rdi
callq 0x2300
leaq 0x3df4(%rip), %rsi      # 0x9320
movq %r14, %rdi
movl $0x1, %edx
callq 0x2040
movq 0x228(%rsp), %rax
movq -0x18(%rax), %rax
movq $0x15, 0x238(%rsp,%rax)
movslq %ebx, %rax
leaq 0x7c95(%rip), %r12      # 0xd1f0
leaq (%rax,%rax,4), %r13
shlq $0x4, %r13
movq (%r12), %rdi
addq %r13, %rdi
callq 0x43c0
leaq 0x228(%rsp), %rdi
movl %eax, %esi
callq 0x2310
movq %rax, %rbx
leaq 0x425e(%rip), %rsi      # 0x97e6
movl $0x1, %edx
movq %rax, %rdi
callq 0x2210
movq (%r12), %rdi
addq %r13, %rdi
callq 0x422c
movq %rbx, %rdi
movl %eax, %esi
callq 0x2310
movq 0x7a1e(%rip), %rax      # 0xcfd0
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 0x43c0
movl %eax, %ebx
movq (%r12), %rdi
addq %r13, %rdi
callq 0x422c
cvtsi2ss %ebx, %xmm0
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
mulss 0x3f40(%rip), %xmm0     # 0x9544
cvtss2sd %xmm0, %xmm0
movq 0x79a9(%rip), %rsi      # 0xcfb8
leaq 0x3f38(%rip), %rcx      # 0x954e
leaq 0x8(%rsp), %rdi
movl $0x3a, %edx
movb $0x1, %al
callq 0x5c59
leaq 0x3f1a(%rip), %rsi      # 0x9548
leaq 0x228(%rsp), %rdi
movl $0x2, %edx
callq 0x2210
movq 0x8(%rsp), %rax
movb (%rax), %al
leaq 0x28(%rsp), %rsi
movb %al, (%rsi)
leaq 0x228(%rsp), %rdi
movl $0x1, %edx
callq 0x2210
movq 0x8(%rsp), %rcx
movb 0x1(%rcx), %cl
leaq 0x28(%rsp), %rsi
movb %cl, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x2210
movq 0x8(%rsp), %rcx
movb 0x2(%rcx), %cl
leaq 0x28(%rsp), %rsi
movb %cl, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x2210
movq 0x8(%rsp), %rcx
movb 0x3(%rcx), %cl
leaq 0x28(%rsp), %rsi
movb %cl, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x2210
movq 0x8(%rsp), %rcx
movb 0x4(%rcx), %cl
leaq 0x28(%rsp), %rsi
movb %cl, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x2210
movq %rax, %rbx
leaq 0x3e71(%rip), %rsi      # 0x954b
movl $0x2, %edx
movq %rax, %rdi
callq 0x2210
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
leaq 0x228(%rsp), %rdi
callq 0x2260
leaq 0x28(%rsp), %rdi
callq 0x2300
leaq 0x3c24(%rip), %rsi      # 0x9350
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movl $0x1, %edx
callq 0x2040
movq (%r12), %rcx
movq 0x28(%rcx,%r13), %rax
movq 0x38(%rcx,%r13), %rdx
movl 0x40(%rcx,%r13), %ecx
subq %rax, %rdx
shlq $0x3, %rdx
addq %rcx, %rdx
je 0x57ba
xorl %ebp, %ebp
leaq 0x28(%rsp), %r14
leaq 0x3d46(%rip), %r15      # 0x94b1
movq %rbp, %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rax
xorl %esi, %esi
btq %rbp, %rax
setb %sil
movq %r14, %rdi
callq 0x22f0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
incq %rbp
movq (%r12), %rcx
movq 0x28(%rcx,%r13), %rax
movq 0x38(%rcx,%r13), %rdx
movl 0x40(%rcx,%r13), %ecx
subq %rax, %rdx
leaq (%rcx,%rdx,8), %rcx
cmpq %rbp, %rcx
ja 0x576b
movq 0x28(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
leaq 0x28(%rsp), %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
leaq 0x28(%rsp), %rdi
callq 0x2260
movq 0x77d2(%rip), %rax      # 0xcfc8
movq (%rax), %rbx
movq 0x18(%rax), %r14
leaq 0x30(%rsp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r14, 0x28(%rsp,%rax)
callq 0x2180
leaq 0x120(%rsp), %rdi
callq 0x20a0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x583c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21e0
leaq 0x230(%rsp), %rdi
movq %rbx, -0x8(%rdi)
movq -0x18(%rbx), %rax
movq %r14, 0x228(%rsp,%rax)
callq 0x2180
leaq 0x320(%rsp), %rdi
callq 0x20a0
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5883
jmp 0x587e
jmp 0x5888
movq %rax, %rbx
jmp 0x58b0
movq %rax, %rbx
jmp 0x5895
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x2290
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x58b0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21e0
leaq 0x228(%rsp), %rdi
callq 0x2290
movq %rbx, %rdi
callq 0x2320