// File: /workspace/github_cpp_makefile_star2_O3/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 0x6c6b(%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 0x31a2(%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 0x7704
leaq 0xc8(%rbx), %rax
movq %rax, 0x68(%rsp)
leaq 0xa8(%rbx), %r15
leaq 0x18(%rsp), %r14
leaq 0x90(%rsp), %r12
movq 0x6bf7(%rip), %rbp      # 0xdff0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2fe4
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x8f9b
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x7438
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x745d
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x7482
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x74a7
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x2230
movq %r12, %rdi
callq 0x32d4
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rax
leaq (%rsi,%rax), %rdx
movq %rax, %r8
sarq $0x2, %r8
movq %rsi, %rcx
testq %r8, %r8
jle 0x7529
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 0x7573
movsbl -0x2(%rdi), %r9d
addl $-0x3a, %r9d
cmpl $-0xb, %r9d
ja 0x7579
movsbl -0x1(%rdi), %r9d
addl $-0x3a, %r9d
cmpl $-0xb, %r9d
ja 0x757f
movsbl (%rdi), %r9d
addl $-0x3a, %r9d
cmpl $-0xb, %r9d
ja 0x7582
decq %r8
addq $0x4, %rdi
cmpq $0x1, %r8
jg 0x74dd
movq %rdx, %rdi
subq %rcx, %rdi
cmpq $0x1, %rdi
je 0x7561
cmpq $0x2, %rdi
je 0x7553
cmpq $0x3, %rdi
jne 0x75d7
movsbl (%rcx), %edi
addl $-0x3a, %edi
cmpl $-0xb, %edi
ja 0x756e
incq %rcx
movsbl (%rcx), %edi
addl $-0x3a, %edi
cmpl $-0xb, %edi
ja 0x756e
incq %rcx
movsbl (%rcx), %edi
addl $-0x3a, %edi
cmpl $-0xa, %edi
cmovbq %rdx, %rcx
movq %rcx, %rdi
jmp 0x7582
addq $-0x3, %rdi
jmp 0x7582
addq $-0x2, %rdi
jmp 0x7582
decq %rdi
cmpq %rdx, %rdi
setne %cl
cmpq $0x15, %rax
setae %al
orb %cl, %al
je 0x75dd
movl $0x1c, %edx
movq %rbp, %rdi
leaq 0x2fcc(%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
movb $0x1, %r13b
movq %rax, %rdi
callq 0x2180
jmp 0x76cd
cmpq $0x15, %rax
jae 0x7593
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x3440
movq %rbx, %rdi
leaq 0x28(%rsp), %rsi
callq 0x48a4
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
leaq 0x70(%rsp), %r13
je 0x761f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
movq %r13, %rdi
leaq 0x2f62(%rip), %rsi      # 0xa58b
movq %r15, %rdx
callq 0x8553
movq %r13, %rdi
leaq 0x2f53(%rip), %rsi      # 0xa58e
callq 0x23d0
movq %r14, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7663
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x766a
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x89a8
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x76a8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x76ca
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x2230
xorl %r13d, %r13d
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x76e9
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
testb %r13b, %r13b
jne 0x73f9
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x68e5(%rip), %rbx      # 0xdff0
leaq 0x2e3d(%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 0x77c7
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x7791
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x7791
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x77ca
movq 0x38(%rsp), %rsi
jmp 0x77ab
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x77ca
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x77ca
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x3126
jmp 0x77e6
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x77e6
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x23b0