// File: Kyle-Alvares[P]SQA1/session.cpp
// Function: Session::transfer()
void Session::transfer() {
    string mssg = "Enter depositee account number: ";
    cout << endl << "============TRANSFER===========" << endl;
    cout << mssg;
    
    int accountNumber = askAccountNumber(mssg);
    User other(accountNumber);

    bool valid = other.isDisabled("chequings") ? false : true;
    if(valid) {
        double amount = withdraw(1000, false);
        other.deposit("chequings", amount);
        transactions.push_back("02" + username + to_string(amount));
    }
    else cout << "Error: This user has a disabled chequing account!" << endl;
    other.saveUserData();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1d8(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x34d0
movq -0x1d0(%rbp), %rdx
leaq 0x4bcb(%rip), %rsi      # 0xd3b3
leaq -0x28(%rbp), %rdi
callq 0x4160
jmp 0x87f3
leaq -0x29(%rbp), %rdi
callq 0x3330
movq 0xa7bd(%rip), %rdi      # 0x12fc0
movq 0xa796(%rip), %rsi      # 0x12fa0
callq 0x3310
movq %rax, -0x1e0(%rbp)
jmp 0x8818
movq -0x1e0(%rbp), %rdi
leaq 0x4bae(%rip), %rsi      # 0xd3d4
callq 0x32d0
movq %rax, -0x1e8(%rbp)
jmp 0x8834
movq -0x1e8(%rbp), %rdi
movq 0xa75e(%rip), %rsi      # 0x12fa0
callq 0x3310
jmp 0x8849
movq 0xa770(%rip), %rdi      # 0x12fc0
leaq -0x28(%rbp), %rsi
callq 0x32a0
jmp 0x885b
leaq -0x60(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3160
jmp 0x886a
leaq -0x60(%rbp), %rdi
callq 0xc500
movl %eax, -0x1ec(%rbp)
jmp 0x887b
leaq -0x60(%rbp), %rdi
callq 0x31f0
movl -0x1ec(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %esi
leaq -0x108(%rbp), %rdi
callq 0x5280
jmp 0x889e
leaq -0x131(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x34d0
movq -0x1f8(%rbp), %rdx
leaq 0x48d3(%rip), %rsi      # 0xd192
leaq -0x130(%rbp), %rdi
callq 0x4160
jmp 0x88cd
leaq -0x108(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x6600
movb %al, -0x1f9(%rbp)
jmp 0x88e8
movb -0x1f9(%rbp), %al
andb $0x1, %al
decb %al
movb %al, -0x1fa(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x31f0
leaq -0x131(%rbp), %rdi
callq 0x3330
movb -0x1fa(%rbp), %al
andb $0x1, %al
movb %al, -0x109(%rbp)
testb $0x1, -0x109(%rbp)
je 0x8b74
movq -0x1d8(%rbp), %rdi
movsd 0x49be(%rip), %xmm0     # 0xd2f8
xorl %esi, %esi
callq 0x8250
movsd %xmm0, -0x208(%rbp)
jmp 0x894b
movsd -0x208(%rbp), %xmm0
movsd %xmm0, -0x140(%rbp)
leaq -0x161(%rbp), %rdi
movq %rdi, -0x210(%rbp)
callq 0x34d0
movq -0x210(%rbp), %rdx
leaq 0x4816(%rip), %rsi      # 0xd192
leaq -0x160(%rbp), %rdi
callq 0x4160
jmp 0x898a
movsd -0x140(%rbp), %xmm0
leaq -0x108(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x6240
jmp 0x89a7
leaq -0x160(%rbp), %rdi
callq 0x31f0
leaq -0x161(%rbp), %rdi
callq 0x3330
movq -0x1d8(%rbp), %rdx
movq %rdx, %rax
addq $0xc8, %rax
movq %rax, -0x218(%rbp)
addq $0xa8, %rdx
leaq 0x4a10(%rip), %rsi      # 0xd3f4
leaq -0x1a8(%rbp), %rdi
callq 0xa5e0
jmp 0x89f2
movsd -0x140(%rbp), %xmm0
leaq -0x1c8(%rbp), %rdi
callq 0xa6f0
jmp 0x8a08
leaq -0x188(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
leaq -0x1c8(%rbp), %rdx
callq 0xa4a0
jmp 0x8a24
movq -0x218(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0xa5b0
jmp 0x8a39
leaq -0x188(%rbp), %rdi
callq 0x31f0
leaq -0x1c8(%rbp), %rdi
callq 0x31f0
leaq -0x1a8(%rbp), %rdi
callq 0x31f0
jmp 0x8ba7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x3330
jmp 0x8be8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x8bdf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x31f0
jmp 0x8bdf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x8acd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x31f0
leaq -0x131(%rbp), %rdi
callq 0x3330
jmp 0x8bd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x8bd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x8b15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x31f0
leaq -0x161(%rbp), %rdi
callq 0x3330
jmp 0x8bd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x8b66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x8b5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x31f0
leaq -0x1c8(%rbp), %rdi
callq 0x31f0
leaq -0x1a8(%rbp), %rdi
callq 0x31f0
jmp 0x8bd3
movq 0xa445(%rip), %rdi      # 0x12fc0
leaq 0x4875(%rip), %rsi      # 0xd3f7
callq 0x32d0
movq %rax, -0x220(%rbp)
jmp 0x8b90
movq -0x220(%rbp), %rdi
movq 0xa402(%rip), %rsi      # 0x12fa0
callq 0x3310
jmp 0x8ba5
jmp 0x8ba7
leaq -0x108(%rbp), %rdi
callq 0x5db0
jmp 0x8bb5
leaq -0x108(%rbp), %rdi
callq 0x4330
leaq -0x28(%rbp), %rdi
callq 0x31f0
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
leaq -0x108(%rbp), %rdi
callq 0x4330
leaq -0x28(%rbp), %rdi
callq 0x31f0
movq -0x38(%rbp), %rdi
callq 0x34c0
nopw %cs:(%rax,%rax)