// File: /workspace/github_cpp_makefile_star2_O1/Kyle-Alvares[P]SQA1/session.cpp
// Function: Session::createAccount()
void Session::createAccount() {
    cout << endl << "========CREATE ACCOUNT========" << endl;
    if(!user.isAdmin()) { 
        cerr << "Error: privileged transaction!" << endl; 
    } else {
        int session = 0;
        while(session == 0) {
            string accountName = askAccountName(user, 0);
            if (std::any_of(accountName.begin(), accountName.end(), ::isdigit) == true){
                cerr << "Error: Invalid account name!" << endl;
            } else if (accountName.size() > 20) {
                cerr << "Error: Invalid account name!" << endl;
            } else {
                session += 1;
                user.createAccount(accountName);
                transactions.push_back("05" + username + "00000000");
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rdi, %rbx
movq 0x6c13(%rip), %r14      # 0xdfc8
movq (%r14), %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 %rax, %r14
leaq 0x314a(%rip), %rsi      # 0xa530
movl $0x1e, %edx
movq %rax, %rdi
callq 0x2270
movq (%r14), %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, %rdi
callq 0x3e2c
testb %al, %al
je 0x7753
leaq 0xc8(%rbx), %rax
movq %rax, 0x60(%rsp)
leaq 0xa8(%rbx), %rax
movq %rax, 0x68(%rsp)
leaq 0x10(%rsp), %r14
leaq 0x90(%rsp), %r12
movq 0x6b9a(%rip), %rbp      # 0xdff0
leaq 0x70(%rsp), %r13
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2ff6
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x8fe3
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x749a
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x74bf
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x74e4
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x7509
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x2230
movq %r12, %rdi
callq 0x32e6
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rax
leaq (%rsi,%rax), %rdx
movq %rax, %r8
sarq $0x2, %r8
movq %rsi, %rcx
testq %r8, %r8
jle 0x758b
movq %rax, %rcx
andq $-0x4, %rcx
addq %rsi, %rcx
incq %r8
leaq 0x3(%rsi), %rdi
movsbl -0x3(%rdi), %r9d
addl $-0x3a, %r9d
cmpl $-0xb, %r9d
ja 0x75d4
movsbl -0x2(%rdi), %r9d
addl $-0x3a, %r9d
cmpl $-0xb, %r9d
ja 0x75da
movsbl -0x1(%rdi), %r9d
addl $-0x3a, %r9d
cmpl $-0xb, %r9d
ja 0x75e0
movsbl (%rdi), %r9d
addl $-0x3a, %r9d
cmpl $-0xb, %r9d
ja 0x75e3
decq %r8
addq $0x4, %rdi
cmpq $0x1, %r8
jg 0x753f
movq %rdx, %r8
subq %rcx, %r8
cmpq $0x1, %r8
je 0x75c2
cmpq $0x2, %r8
je 0x75b4
movq %rdx, %rdi
cmpq $0x3, %r8
jne 0x75e3
movsbl (%rcx), %edi
addl $-0x3a, %edi
cmpl $-0xb, %edi
ja 0x75cf
incq %rcx
movsbl (%rcx), %edi
addl $-0x3a, %edi
cmpl $-0xb, %edi
ja 0x75cf
incq %rcx
movsbl (%rcx), %edi
addl $-0x3a, %edi
cmpl $-0xa, %edi
cmovbq %rdx, %rcx
movq %rcx, %rdi
jmp 0x75e3
addq $-0x3, %rdi
jmp 0x75e3
addq $-0x2, %rdi
jmp 0x75e3
decq %rdi
cmpq %rdx, %rdi
setne %cl
cmpq $0x15, %rax
setae %r15b
orb %cl, %r15b
je 0x7637
movl $0x1c, %edx
movq %rbp, %rdi
leaq 0x2f69(%rip), %rsi      # 0xa56e
callq 0x2270
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
jmp 0x771c
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x3450
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
callq 0x48ac
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x7674
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2230
movq %r13, %rdi
leaq 0x2f0d(%rip), %rsi      # 0xa58b
movq 0x68(%rsp), %rdx
callq 0x85a5
movq %r13, %rdi
leaq 0x2efc(%rip), %rsi      # 0xa58e
callq 0x23d0
movq %r14, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x76b8
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x76bf
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x60(%rsp), %rdi
movq %rsp, %rsi
callq 0x89f8
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x76fa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x771c
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x7738
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2230
testb %r15b, %r15b
jne 0x745b
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x6896(%rip), %rbx      # 0xdff0
leaq 0x2dee(%rip), %rsi      # 0xa54f
movl $0x1e, %edx
movq %rbx, %rdi
callq 0x2270
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2180
jmp 0x7815
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x77df
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x77df
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x7818
movq 0x30(%rsp), %rsi
jmp 0x77f9
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x7818
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x7818
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x3138
jmp 0x7834
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x7834
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x23b0