// File: /workspace/github_cpp_makefile_star2_O3/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
leaq 0x50(%rsp), %r13
movq %r13, %r14
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, %rbp
movl %r13d, 0x18(%r12)
movl %r13d, %r12d
negl %r12d
cmovsl %r13d, %r12d
movl $0x1, %r15d
cmpl $0xa, %r12d
jb 0x3f00
movl $0x2, %r15d
cmpl $0x64, %r12d
jb 0x3f00
movl $0x3, %r15d
cmpl $0x3e8, %r12d           # imm = 0x3E8
jb 0x3f00
cmpl $0x2710, %r12d          # imm = 0x2710
movl $0x5, %r15d
sbbl $0x0, %r15d
shrl $0x1f, %r13d
leal (%r15,%r13), %esi
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movl $0x2d, %edx
callq 0x2280
addq 0x20(%rsp), %r13
movq %r13, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x4d15
movl $0x8, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x61ef(%rip), %rcx      # 0xa13a
callq 0x2260
leaq 0x10(%rsp), %rbx
movq %rbx, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %rbp, %r12
movq %r14, %r13
je 0x3f7c
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x3f82
movups (%rcx), %xmm0
movups %xmm0, (%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 0x619a(%rip), %rsi      # 0xa143
callq 0x23d0
movq %r13, 0x40(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3fd1
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x3fd9
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
leaq 0x40(%rsp), %rsi
movl $0x8, %edx
callq 0x2360
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x401a
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2230
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x4030
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x404c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
movb 0x80(%rsp,%rax), %r15b
movq %r14, %rdi
callq 0x2080
testb $0x5, %r15b
je 0x3e85
movq 0x9f52(%rip), %r14      # 0xdfc8
leaq 0x60cb(%rip), %rsi      # 0xa148
movl $0x12, %edx
movq %r14, %rdi
callq 0x2270
leaq 0x20(%r12), %rsi
movq 0x9f42(%rip), %r15      # 0xdfd8
movq %r15, %rdi
callq 0x22b0
leaq 0x60b6(%rip), %rsi      # 0xa15b
movl $0x13, %edx
movq %r14, %rdi
callq 0x2270
leaq 0x40(%r12), %rsi
movq %r15, %rdi
callq 0x22b0
leaq 0x60a9(%rip), %rsi      # 0xa16f
movl $0x11, %edx
movq %r14, %rdi
callq 0x2270
leaq 0x60(%r12), %rsi
movq %r15, %rdi
callq 0x22b0
leaq 0x609a(%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 0x605f(%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 0x4cb4
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x416e
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 0x41ef
movq 0x78(%rsp), %rsi
jmp 0x41e7
movq %rax, %r15
jmp 0x41d3
movq %rax, %r15
jmp 0x41b8
movq %rax, %r15
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x41b8
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2230
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x41d3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x41ef
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2230
movq %r15, %rdi
callq 0x23b0
nop