// File: /workspace/github_cpp_makefile_star2_O2/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 0x626b(%rip), %rdi      # 0xafc0
callq 0x2120
leaq 0x2788(%rip), %rsi      # 0x74e9
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x339e
testb %al, %al
je 0x4da5
leaq 0xf8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2a82
movq %r14, %rdi
callq 0x6350
leaq 0xf8(%rsp), %rdi
callq 0x2b38
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x1a0(%rsp), %r14
leaq 0x18(%rsp), %r15
leaq 0x38(%rsp), %r12
leaq 0xd8(%rsp), %r13
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2a82
movq %r15, %rdi
movq %r14, %rsi
pushq $-0x1
popq %rdx
callq 0x6265
movq %r12, %rdi
movq %r15, %rsi
callq 0x2250
movq %r15, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2b38
movq %r13, %rdi
movq %r12, %rsi
callq 0x2290
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3a80
movl %eax, %ebp
movq %r13, %rdi
callq 0x2110
testb %bpl, %bpl
je 0x4e46
movq 0x6190(%rip), %rdi      # 0xafc0
leaq 0x2580(%rip), %rsi      # 0x73b7
callq 0x21f0
movq %rax, %rdi
callq 0x2120
jmp 0x4dd0
callq 0x6492
movsd %xmm0, (%rsp)
leaq 0xa8(%rbx), %rdx
leaq 0x26ab(%rip), %rsi      # 0x7509
leaq 0xb8(%rsp), %rdi
callq 0x5927
leaq 0x98(%rsp), %rdi
movsd (%rsp), %xmm0
callq 0x599d
leaq 0x18(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0x58c0
leaq 0xc8(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0x5e0e
leaq 0x18(%rsp), %rdi
callq 0x2110
leaq 0x98(%rsp), %rdi
callq 0x2110
leaq 0xb8(%rsp), %rdi
callq 0x2110
leaq 0x78(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x2290
leaq 0x78(%rsp), %rsi
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x3820
movl %eax, %ebp
leaq 0x78(%rsp), %rdi
callq 0x2110
movq 0x60c0(%rip), %rdi      # 0xafc0
callq 0x2120
leaq 0x2600(%rip), %rsi      # 0x750c
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2120
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x2290
leaq 0x58(%rsp), %rsi
movq %rbx, %rdi
callq 0x37c0
movl %eax, %r14d
leaq 0x58(%rsp), %rdi
callq 0x2110
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x33a6
movslq %r14d, %rax
leaq 0x18(%rsp), %rdi
movq (%rdi), %rcx
imulq $0x30, %rax, %rax
movsd 0x28(%rcx,%rax), %xmm0
movaps %xmm0, (%rsp)
callq 0x2bec
movq 0x6049(%rip), %rdi      # 0xafc0
callq 0x2120
leaq 0x25a3(%rip), %rsi      # 0x7526
movq %rax, %rdi
callq 0x21f0
movapd (%rsp), %xmm0
mulsd 0x2370(%rip), %xmm0     # 0x7308
cvttpd2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
divss 0x2399(%rip), %xmm0     # 0x7340
cvtss2sd %xmm0, %xmm0
movq %rax, %rdi
callq 0x2310
movq %rax, %rdi
callq 0x2120
leaq 0x38(%rsp), %rdi
callq 0x2110
movl %ebp, %eax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x2b38
jmp 0x506f
jmp 0x5062
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
jmp 0x505b
jmp 0x5062
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
jmp 0x505b
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x2110
jmp 0x5018
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x2110
jmp 0x502a
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
jmp 0x505b
jmp 0x5062
jmp 0x5062
jmp 0x5062
jmp 0x5062
jmp 0x5062
movq %rax, %rbx
leaq 0x1a0(%rsp), %rdi
callq 0x2b38
jmp 0x5065
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x2110
jmp 0x5065
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2350
nop