// File: /workspace/github_cpp_makefile_star2_O1/Kyle-Alvares[P]SQA1/user.cpp
// Function: User::getUserData(int)
void User::getUserData(int accountNumber) {
    this->accountNumber = accountNumber;
    
    ifstream ifs("./users/" + to_string(accountNumber) + ".txt");
    if(ifs.fail()){
        cerr << "Error. Unable to load user." << endl;
        exit(1);
    }
    string line;
    ifs >> line;
    firstName = line;
    ifs >> line;
    middleName = line;
    ifs >> line;
    lastName = line;
    ifs >> line;
    password = line;
    ifs >> line;
    isAdminAccount = stoi(line);
    while(ifs >> line) {
        account acc;
        int index = line.find("$");
        acc.disabled = line.substr(0,1).compare("0") != 0;
        acc.isStudentPlan = line.substr(1,1).compare("0") != 0;
        acc.accountName = line.substr(2, index-2);
        acc.balance = stoi(line.substr(index+1)); 
        accounts.push_back(acc);
    }
    ifs.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movl %esi, %ebx
movq %rdi, 0x20(%rsp)
movl %esi, 0x18(%rdi)
movl %esi, %ebp
negl %ebp
cmovsl %esi, %ebp
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x3778
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x376f
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x3775
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x3778
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x373c
addl $-0x3, %r14d
jmp 0x3778
addl $-0x2, %r14d
jmp 0x3778
decl %r14d
shrl $0x1f, %ebx
leal (%r14,%rbx), %esi
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movl $0x2d, %edx
callq 0x2280
addq (%r15), %rbx
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x4d25
leaq 0x6989(%rip), %rcx      # 0xa13a
movl $0x8, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2260
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x37ea
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x37f4
movupd (%rcx), %xmm0
movupd %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rsp, %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x692e(%rip), %rsi      # 0xa143
callq 0x23d0
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3841
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x384a
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x80(%rsp), %rdi
movl $0x8, %edx
callq 0x2360
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x388f
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x38a5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x38c1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x80(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xa0(%rsp,%rax)
jne 0x3c44
movq %rsp, %rsi
movq %r12, (%rsi)
movq $0x0, 0x8(%rsi)
movb $0x0, 0x10(%rsi)
leaq 0x80(%rsp), %rdi
callq 0x22b0
movq 0x20(%rsp), %rax
leaq 0x20(%rax), %rdi
movq %rsp, %rsi
callq 0x2140
leaq 0x80(%rsp), %rdi
movq %rsp, %rsi
callq 0x22b0
movq 0x20(%rsp), %rax
leaq 0x40(%rax), %rdi
movq %rsp, %rsi
callq 0x2140
leaq 0x80(%rsp), %rdi
movq %rsp, %rsi
callq 0x22b0
movq 0x20(%rsp), %rax
leaq 0x60(%rax), %rdi
movq %rsp, %rsi
callq 0x2140
leaq 0x80(%rsp), %rdi
movq %rsp, %rsi
callq 0x22b0
movq 0x20(%rsp), %rax
leaq 0x88(%rax), %rdi
movq %rsp, %rsi
callq 0x2140
leaq 0x80(%rsp), %rdi
movq %rsp, %rsi
callq 0x22b0
movq (%rsp), %rbx
callq 0x2050
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x48(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x22d0
cmpq %rbx, (%r15)
je 0x3c72
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x3c7e
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x3c7e
testl %ecx, %ecx
jne 0x39d2
movl %ebp, (%r14)
testl %eax, %eax
movq 0x20(%rsp), %rax
setne 0x80(%rax)
leaq 0x60(%rsp), %rbp
movq %rsp, %r13
leaq 0x28(%rsp), %rbx
leaq 0x38(%rsp), %r12
leaq 0x80(%rsp), %rdi
movq %r13, %rsi
callq 0x22b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3be5
movq %rbp, %r15
movq %rbp, 0x50(%rsp)
movq $0x0, 0x58(%rsp)
movb $0x0, 0x60(%rsp)
movl $0x1, %ecx
movq %r13, %rdi
leaq 0x6af5(%rip), %rsi      # 0xa52e
xorl %edx, %edx
callq 0x23a0
movq %rax, %rbp
movl $0x1, %ecx
movq %rbx, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x2250
movq %rbx, %rdi
leaq 0x6791(%rip), %rsi      # 0xa1f0
callq 0x20b0
testl %eax, %eax
setne 0x48(%rsp)
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3a82
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
movl $0x1, %edx
movl $0x1, %ecx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2250
movq %rbx, %rdi
leaq 0x674f(%rip), %rsi      # 0xa1f0
callq 0x20b0
testl %eax, %eax
setne 0x49(%rsp)
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3ac4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
shlq $0x20, %rbp
movabsq $-0x200000000, %rax     # imm = 0xFFFFFFFE00000000
leaq (%rax,%rbp), %rcx
sarq $0x20, %rcx
movl $0x2, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2250
leaq 0x50(%rsp), %rdi
movq %rbx, %rsi
callq 0x22a0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3b0e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %rbp
sarq $0x20, %rbp
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq $-0x1, %rcx
callq 0x2250
movq 0x28(%rsp), %rbp
movl (%r14), %r12d
movl $0x0, (%r14)
movq %rbp, %rdi
leaq 0x78(%rsp), %rsi
movl $0xa, %edx
callq 0x22d0
cmpq %rbp, 0x78(%rsp)
je 0x3c2c
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x3c38
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x3c38
movq %r15, %rbp
testl %ecx, %ecx
jne 0x3b90
movl %r12d, (%r14)
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x70(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %r12
cmpq %r12, %rdi
je 0x3bb6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x20(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x4cc4
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0x39f2
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x39f2
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %r12
callq 0x2070
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3c0d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x80(%rsp), %rdi
callq 0x2080
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x65bf(%rip), %rdi      # 0xa1f2
callq 0x2150
leaq 0x65b3(%rip), %rdi      # 0xa1f2
callq 0x22f0
movq 0xa3a5(%rip), %rdi      # 0xdff0
leaq 0x654a(%rip), %rsi      # 0xa19c
movl $0x1b, %edx
callq 0x2270
movq 0xa38d(%rip), %rdi      # 0xdff0
callq 0x2120
movl $0x1, %edi
callq 0x2290
leaq 0x6579(%rip), %rdi      # 0xa1f2
callq 0x2150
leaq 0x656d(%rip), %rdi      # 0xa1f2
callq 0x22f0
movq %rax, %rbx
jmp 0x3d53
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x3cb1
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x3cb1
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3ccc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x3ccc
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3d60
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x3d60
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x3d3d
movl %ebp, (%r14)
jmp 0x3d3d
movq %rax, %rbx
jmp 0x3d3d
jmp 0x3d11
jmp 0x3d11
jmp 0x3d11
movq %rax, %rbx
leaq 0x10(%rsp), %r12
jmp 0x3d1c
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r15, %rbp
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3d3d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x3d3d
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3d53
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x80(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x23b0
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x3d74
movl %r12d, (%r14)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3d14
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x3d14