// File: /workspace/github_cpp_makefile_star2_O1/Kyle-Alvares[P]SQA1/user.cpp
// Function: User::createUser()
void User::createUser() {
    bool accountExists = true;
    while(accountExists) {
        int min = 10000, max = 99999;
        accountNumber = min + rand() % (max - min + 1); 
        ifstream ifs("./users/" + to_string(accountNumber) + ".txt");
        if(ifs.fail()){
            accountExists = false;
        }
    }
    cout << "Enter first name: ";
    cin >> firstName;
    cout << "Enter middle name: ";
    cin >> middleName;
    cout << "Enter last name: ";
    cin >> lastName;
    cout << "Enter password: ";
    cin >> password;
    isAdminAccount = false;
    account acc;
    acc.disabled = false;
    acc.isStudentPlan = false;
    acc.accountName = "chequings";
    acc.balance = 0;
    accounts.push_back(acc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rdi, %r12
movb $0x1, %bpl
callq 0x2090
cltq
imulq $0x5d34edef, %rax, %rcx # imm = 0x5D34EDEF
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x2f, %rcx
addl %edx, %ecx
imull $0x15f90, %ecx, %ecx    # imm = 0x15F90
negl %ecx
leal (%rax,%rcx), %r13d
addl $0x2710, %r13d          # imm = 0x2710
movq %r12, %rbx
movl %r13d, 0x18(%r12)
movl %r13d, %r12d
negl %r12d
cmovsl %r13d, %r12d
movl $0x1, %r15d
cmpl $0xa, %r12d
jb 0x3efb
movl $0x2, %r15d
cmpl $0x64, %r12d
jb 0x3efb
movl $0x3, %r15d
cmpl $0x3e8, %r12d           # imm = 0x3E8
jb 0x3efb
cmpl $0x2710, %r12d          # imm = 0x2710
movl $0x5, %r15d
sbbl $0x0, %r15d
shrl $0x1f, %r13d
leal (%r15,%r13), %esi
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl $0x2d, %edx
callq 0x2280
addq 0x40(%rsp), %r13
movq %r13, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x4d25
movl $0x8, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x61f4(%rip), %rcx      # 0xa13a
callq 0x2260
leaq 0x10(%rsp), %r15
movq %r15, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %rbx, %r12
je 0x3f74
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x3f7b
movups (%rcx), %xmm0
movups %xmm0, (%r15)
leaq 0x30(%rsp), %rbx
leaq 0x60(%rsp), %r14
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rsp, %rdi
leaq 0x619c(%rip), %rsi      # 0xa143
callq 0x23d0
movq %rbx, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3fcf
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x3fd5
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
leaq 0x20(%rsp), %rsi
movl $0x8, %edx
callq 0x2360
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4016
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2230
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x402c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x4048
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x80(%rsp,%rax)
movzbl %bpl, %ebp
movl $0x0, %eax
cmovnel %eax, %ebp
movq %r14, %rdi
callq 0x2080
testb $0x1, %bpl
jne 0x3e83
movq 0x9f4a(%rip), %r14      # 0xdfc8
leaq 0x60c3(%rip), %rsi      # 0xa148
movl $0x12, %edx
movq %r14, %rdi
callq 0x2270
leaq 0x20(%r12), %rsi
movq 0x9f3a(%rip), %r15      # 0xdfd8
movq %r15, %rdi
callq 0x22b0
leaq 0x60ae(%rip), %rsi      # 0xa15b
movl $0x13, %edx
movq %r14, %rdi
callq 0x2270
leaq 0x40(%r12), %rsi
movq %r15, %rdi
callq 0x22b0
leaq 0x60a1(%rip), %rsi      # 0xa16f
movl $0x11, %edx
movq %r14, %rdi
callq 0x2270
leaq 0x60(%r12), %rsi
movq %r15, %rdi
callq 0x22b0
leaq 0x6092(%rip), %rsi      # 0xa181
movl $0x10, %edx
movq %r14, %rdi
callq 0x2270
leaq 0x88(%r12), %rsi
movq %r15, %rdi
callq 0x22b0
xorl %eax, %eax
movb %al, 0x80(%r12)
leaq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq $0x0, -0x8(%rbx)
movb %al, (%rbx)
movw $0x0, -0x18(%rbx)
leaq 0x6057(%rip), %rcx      # 0xa192
movl $0x9, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2330
leaq 0x60(%rsp), %rsi
movq $0x0, 0x28(%rsi)
movq %r12, %rdi
callq 0x4cc4
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4176
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2230
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x41f7
movq 0x78(%rsp), %rsi
jmp 0x41ef
movq %rax, %r15
jmp 0x41db
movq %rax, %r15
jmp 0x41c0
movq %rax, %r15
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x41c0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2230
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x41db
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x41f7
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2230
movq %r15, %rdi
callq 0x23b0
nop