// File: /workspace/github_cpp_makefile_star2_O1/Kyle-Alvares[P]SQA1/user.cpp
// Function: User::saveUserData()
void User::saveUserData() {
    ofstream ofs("./users/" + to_string(accountNumber) + ".txt");
    if(ofs.fail()) {
        cerr << "Error! Unable to save user data!";
        exit(1);
    }
    ofs << firstName << endl;
    ofs << middleName << endl;
    ofs << lastName << endl;
    ofs << password << endl;
    ofs << isAdminAccount << endl;
    for(int i = 0; i < accounts.size(); i++) {
        ofs << accounts[i].disabled << accounts[i].isStudentPlan << accounts[i].accountName 
            << "$" << accounts[i].balance << endl;
    }
    accounts.clear();
    ofs.close(); 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rdi, %rbx
movl 0x18(%rdi), %r13d
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x4275
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x426c
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x4272
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x4275
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x4239
addl $-0x3, %r14d
jmp 0x4275
addl $-0x2, %r14d
jmp 0x4275
decl %r14d
shrl $0x1f, %r13d
movl %r13d, %esi
addl %r14d, %esi
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movl $0x2d, %edx
callq 0x2280
movq (%r15), %rdi
addq %r13, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x4d25
leaq 0x5e88(%rip), %rcx      # 0xa13a
movl $0x8, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2260
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x42eb
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x42f2
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x5e2e(%rip), %rsi      # 0xa143
callq 0x23d0
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4341
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x4348
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x68(%rsp), %rdi
movl $0x10, %edx
callq 0x23e0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x438a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x43a1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x43b8
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x68(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x88(%rsp,%rax)
jne 0x4620
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
leaq 0x68(%rsp), %rdi
callq 0x2270
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq 0x40(%rbx), %rsi
movq 0x48(%rbx), %rdx
leaq 0x68(%rsp), %rdi
callq 0x2270
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq 0x60(%rbx), %rsi
movq 0x68(%rbx), %rdx
leaq 0x68(%rsp), %rdi
callq 0x2270
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq 0x88(%rbx), %rsi
movq 0x90(%rbx), %rdx
leaq 0x68(%rsp), %rdi
callq 0x2270
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movzbl 0x80(%rbx), %esi
leaq 0x68(%rsp), %rdi
callq 0x2380
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq (%rbx), %rsi
cmpq %rsi, 0x8(%rbx)
je 0x45ca
xorl %r13d, %r13d
leaq 0x6017(%rip), %r15      # 0xa52e
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
xorl %r14d, %r14d
movzbl (%rsi,%r13), %esi
leaq 0x68(%rsp), %rdi
callq 0x2380
movq (%rbx), %rcx
movzbl 0x1(%rcx,%r13), %esi
movq %rax, %rdi
callq 0x2380
movq (%rbx), %rcx
movq 0x8(%rcx,%r13), %rsi
movq 0x10(%rcx,%r13), %rdx
movq %rax, %rdi
callq 0x2270
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2270
movq (%rbx), %rax
movsd 0x28(%rax,%r13), %xmm0
movq %r12, %rdi
callq 0x2350
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
incq %r14
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
sarq $0x4, %rax
imulq %rbp, %rax
addq $0x30, %r13
cmpq %r14, %rax
ja 0x4524
movq %rbx, %rdi
callq 0x4fd4
leaq 0x68(%rsp), %rdi
callq 0x22e0
movq 0x99dd(%rip), %rax      # 0xdfc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x70(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x68(%rsp,%rcx)
callq 0x21c0
leaq 0x160(%rsp), %rdi
callq 0x20d0
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x99c9(%rip), %rdi      # 0xdff0
leaq 0x5b8a(%rip), %rsi      # 0xa1b8
callq 0x2210
movl $0x1, %edi
callq 0x2290
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x465c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x465c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4678
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x4678
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x46a0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x46a0
jmp 0x4693
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x2310
movq %rbx, %rdi
callq 0x23b0