// File: /workspace/github_cpp_makefile_star2_O1/Kyle-Alvares[P]SQA1/session.cpp
// Function: Session::deposit()
bool Session::deposit() {
    cout << endl << "============DEPOSIT============" << endl;
    if(user.isAdmin())
        askNames(user);
    bool valid = false;
    string accountName;
    while(!valid) {
        accountName = askAccountName(user, -1);
        valid = user.isDisabled(accountName) ? false : true;
        if(!valid) cout << "Error: disabled account!" << endl;
    }
    double amount = askAmount();
    transactions.push_back("04" + username + to_string(amount));
    bool deposited = user.deposit(accountName, amount);
    cout << endl << "Successfully added funds!" << endl;
    int index = user.getAccountIndex(accountName);
    double balance = user.getAccounts()[index].balance;
    balance = (int) (balance * 100);
    balance = (float) balance / 100;
    cout << endl << "Account Balance: $" << balance << endl;
    return deposited;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rdi, %rbx
movq 0x738b(%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, %r15
leaq 0x3872(%rip), %rsi      # 0xa4e0
movl $0x1f, %edx
movq %rax, %rdi
callq 0x2270
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq %rbx, 0x20(%rsp)
movq %rbx, %rdi
callq 0x3e2c
testb %al, %al
je 0x6d65
leaq 0x1a0(%rsp), %r15
movq %r15, %rdi
movq 0x20(%rsp), %rsi
callq 0x2ff6
movq %r15, %rdi
callq 0x9149
leaq 0x238(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cf5
movq 0x238(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x210(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d16
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x1f0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d37
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x1d0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d58
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x1a0(%rsp), %rdi
callq 0x32e6
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xe8(%rsp), %rbx
leaq 0xf8(%rsp), %r15
leaq 0x30(%rsp), %r12
leaq 0xd8(%rsp), %rbp
movq %r15, %rdi
movq 0x20(%rsp), %rsi
callq 0x2ff6
movq %r12, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x8fe3
movq %rsp, %rdi
movq %r12, %rsi
callq 0x22a0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x6dda
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x180(%rsp), %rdi
leaq 0x190(%rsp), %rax
cmpq %rax, %rdi
je 0x6dff
movq 0x190(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
cmpq %rax, %rdi
je 0x6e24
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x6e49
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x6e6e
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x2230
movq %r15, %rdi
callq 0x32e6
movq %rbx, 0xd8(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x3450
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x4ac6
movl %eax, %r13d
movq 0xd8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6ebf
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x2230
testb %r13b, %r13b
je 0x6f08
movl $0x18, %edx
movq %r14, %rdi
leaq 0x34db(%rip), %rsi      # 0xa3ae
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
testb %r13b, %r13b
jne 0x6d96
callq 0x9356
movsd %xmm0, 0x50(%rsp)
movq 0x20(%rsp), %rax
leaq 0xa8(%rax), %rdx
leaq 0x35da(%rip), %rsi      # 0xa500
leaq 0x78(%rsp), %rdi
callq 0x85a5
leaq 0x40(%rsp), %r15
movq 0x7074(%rip), %rsi      # 0xdfb0
leaq 0x379e(%rip), %rcx      # 0xa6e1
leaq 0x58(%rsp), %rdi
movl $0x148, %edx            # imm = 0x148
movsd 0x50(%rsp), %xmm0
movb $0x1, %al
callq 0x8946
leaq 0x88(%rsp), %rbx
movq -0x10(%rbx), %rcx
movq -0x8(%rbx), %r8
movq 0x60(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %rbx, %rcx
je 0x6f85
movq 0x88(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x6fa4
leaq 0x68(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x6f9f
movq 0x68(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x6fb5
movq 0x58(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x20c0
jmp 0x6fc3
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2260
movq %r15, 0x30(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x6fe3
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x6fea
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x38(%rsp)
movq %rcx, (%rax)
movq 0x20(%rsp), %rax
leaq 0xc8(%rax), %rdi
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x30(%rsp), %rsi
callq 0x89f8
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x7034
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x704f
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7069
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0xc8(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0xb8(%rsp), %rdi
callq 0x3450
leaq 0xb8(%rsp), %rsi
movq 0x20(%rsp), %rdi
movsd 0x50(%rsp), %xmm0
callq 0x471e
movl %eax, %ebp
movq 0xb8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x70c5
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x2230
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq 0x6ee5(%rip), %r14      # 0xdfc8
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq %rax, %r15
leaq 0x3406(%rip), %rsi      # 0xa503
movl $0x19, %edx
movq %rax, %rdi
callq 0x2270
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
leaq 0xa8(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x98(%rsp), %rdi
callq 0x3450
leaq 0x98(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x46a8
movl %eax, %r15d
movq 0x98(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7188
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x3e34
movslq %r15d, %rax
leaq 0x30(%rsp), %rdi
movq (%rdi), %rcx
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movsd 0x28(%rcx,%rax), %xmm0
movaps %xmm0, 0x20(%rsp)
callq 0x32e6
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq 0x6df0(%rip), %rdi      # 0xdfc8
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq %rax, %rbx
leaq 0x332e(%rip), %rsi      # 0xa51d
movl $0x12, %edx
movq %rax, %rdi
callq 0x2270
movapd 0x20(%rsp), %xmm0
mulsd 0x30fe(%rip), %xmm0     # 0xa308
cvttpd2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
divss 0x3127(%rip), %xmm0     # 0xa340
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2350
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x726a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
movl %ebp, %eax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x1a0(%rsp), %rdi
callq 0x3138
jmp 0x7392
jmp 0x7374
movq %rax, %r14
movq 0x98(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7377
movq 0xa8(%rsp), %rsi
jmp 0x7356
jmp 0x7374
movq %rax, %r14
movq 0xb8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7377
movq 0xc8(%rsp), %rsi
jmp 0x7356
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x72fb
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x72fb
movq %rax, %r14
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x731b
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x731b
movq %rax, %r14
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7377
movq 0x88(%rsp), %rsi
jmp 0x7356
jmp 0x7374
jmp 0x7374
jmp 0x7374
jmp 0x7374
movq %rax, %r14
movq 0xd8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7377
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x7377
jmp 0x7374
movq %rax, %r14
leaq 0xf8(%rsp), %rdi
callq 0x3138
jmp 0x7377
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq (%rsp), %rdi
cmpq %rax, %rdi
je 0x7392
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
movq %r14, %rdi
callq 0x23b0