// File: /workspace/github_cpp_makefile_star2_O3/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, %r13
movq 0x73df(%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 0x38c6(%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 %r13, %rdi
callq 0x3e2c
testb %al, %al
je 0x6d0a
leaq 0x1a0(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x2fe4
movq %r15, %rdi
callq 0x9101
leaq 0x238(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c9a
movq 0x238(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x210(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cbb
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x1f0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cdc
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x1d0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cfd
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x1a0(%rsp), %rdi
callq 0x32d4
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xf8(%rsp), %r15
movq %rsp, %rbx
leaq 0x78(%rsp), %rbp
movq %r15, %rdi
movq %r13, %rsi
callq 0x2fe4
movq %rbx, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x8f9b
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x22a0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6d71
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x180(%rsp), %rdi
leaq 0x190(%rsp), %rax
cmpq %rax, %rdi
je 0x6d96
movq 0x190(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
cmpq %rax, %rdi
je 0x6dbb
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x6de0
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x6e05
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x2230
movq %r15, %rdi
callq 0x32d4
leaq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x3440
movq %r13, %r12
movq %r13, %rdi
movq %rbp, %rsi
callq 0x4abc
movl %eax, %r13d
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x6e62
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x2230
testb %r13b, %r13b
je 0x6eaa
movl $0x18, %edx
movq %r14, %rdi
leaq 0x3538(%rip), %rsi      # 0xa3ae
callq 0x2270
movq %r12, %r13
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
jmp 0x6d2e
callq 0x92f8
movsd %xmm0, 0x40(%rsp)
leaq 0xa8(%r12), %rdx
leaq 0x363c(%rip), %rsi      # 0xa500
leaq 0x98(%rsp), %rdi
callq 0x8553
movq 0x70d8(%rip), %rsi      # 0xdfb0
leaq 0x3802(%rip), %rcx      # 0xa6e1
leaq 0x58(%rsp), %rdi
movl $0x148, %edx            # imm = 0x148
movsd 0x40(%rsp), %xmm0
movb $0x1, %al
callq 0x88f6
leaq 0xa8(%rsp), %rbx
movq -0x10(%rbx), %rcx
movq -0x8(%rbx), %r8
movq 0x60(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %rbx, %rcx
je 0x6f21
movq 0xa8(%rsp), %rdi
movq 0x58(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x6f44
leaq 0x68(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x6f3f
movq 0x68(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x6f53
leaq 0x98(%rsp), %rdi
callq 0x20c0
jmp 0x6f61
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2260
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x6f84
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x6f8a
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
leaq 0xc8(%r12), %rdi
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq %rsp, %rsi
callq 0x89a8
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6fd2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6fed
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x98(%rsp), %rdi
cmpq %rbx, %rdi
je 0x700a
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0xe8(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0xd8(%rsp), %rdi
callq 0x3440
leaq 0xd8(%rsp), %rsi
movq %r12, %rdi
movsd 0x40(%rsp), %xmm0
callq 0x4716
movl %eax, %ebp
movq 0xd8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7065
movq 0xe8(%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 0x6f45(%rip), %r14      # 0xdfc8
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq %rax, %r15
leaq 0x3466(%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 0xc8(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0xb8(%rsp), %rdi
callq 0x3440
leaq 0xb8(%rsp), %rsi
movq %r12, %rdi
callq 0x46a0
movl %eax, %r15d
movq 0xb8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7127
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x2230
movq %rsp, %rdi
movq %r12, %rsi
callq 0x3e34
movslq %r15d, %rax
movq %rsp, %rdi
movq (%rdi), %rcx
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movsd 0x28(%rcx,%rax), %xmm0
movaps %xmm0, 0x40(%rsp)
callq 0x32d4
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq 0x6e57(%rip), %rdi      # 0xdfc8
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq %rax, %rbx
leaq 0x3395(%rip), %rsi      # 0xa51d
movl $0x12, %edx
movq %rax, %rdi
callq 0x2270
movapd 0x40(%rsp), %xmm0
mulsd 0x3165(%rip), %xmm0     # 0xa308
cvttpd2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
divss 0x318e(%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 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x7204
movq 0x30(%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 0x3126
jmp 0x7339
jmp 0x731a
movq %rax, %r14
movq 0xb8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x731d
movq 0xc8(%rsp), %rsi
jmp 0x7310
jmp 0x731a
movq %rax, %r14
movq 0xd8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x731d
movq 0xe8(%rsp), %rsi
jmp 0x7310
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x729c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x729c
movq %rax, %r14
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x72bc
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x72bc
movq %rax, %r14
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x731d
movq 0xa8(%rsp), %rsi
jmp 0x7310
jmp 0x731a
jmp 0x731a
jmp 0x731a
jmp 0x731a
jmp 0x731a
movq %rax, %r14
leaq 0xf8(%rsp), %rdi
callq 0x3126
jmp 0x731d
movq %rax, %r14
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x731d
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x731d
movq %rax, %r14
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x7339
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2230
movq %r14, %rdi
callq 0x23b0
nop