// File: sagardoshi[P]NegotiationsEncounter/src/Negotiator.cpp
// Function: Negotiator::acceptTerms()
void Negotiator::acceptTerms() {

    string acceptance = "You think over the encounter you just had.\n\n";

    // Try to give somewhat customised feedback after each rejected offer
    if (generosityOfOffer > 1.5) {
        acceptance += "Your offer was far too generous! " + name + " ";
        acceptance += "would have accepted a much\n";
        acceptance += "lower offer, if you had a way to give it. ";
        acceptance += "You have progressed ";
        acceptance += "onward in your\njourney, but you may find ";
        acceptance += "yourself short of inventory in the future, having\n";
        acceptance += "given away what you have here.\n\n";
        acceptance += "Nevertheless, you survive to fight ";
        acceptance += "another day. Well done!\n";
    } else if (generosityOfOffer >= 1 && generosityOfOffer <= 1.5) {
        acceptance += "Your offer was generous. A little more, even, ";
        acceptance += "than what may have sufficed.\n";
        acceptance += "Manage your inventory carefully in future ";
        acceptance += "encounters.\n\n";
        acceptance += "Still, you survive to fight ";
        acceptance += "another day. Well done!\n";
    }
     else if (generosityOfOffer >= 0.5 && generosityOfOffer < 0.75) {
        acceptance += "Wow, you drove an extremely hard bargain and won! ";
        acceptance += "Very, very impressive. You've\nmoved along efficiently ";
        acceptance += "and set yourself up well for the future. Well done!\n";
    } else if (generosityOfOffer >= 0.75 && generosityOfOffer < 1.0) {
        acceptance += "You made a solid offer and won the day. ";
        acceptance += "It's up to you now to continue to manage\nyour stock ";
        acceptance += "efficiently and get out of here safely. Well done!\n";
    } else {
        acceptance += "It's impossible to win the way you did, so you must ";
        acceptance += "be a superuser. All hail\n";
        acceptance += "the superuser. Happy supering.\n";
    }

    std::cout << acceptance << endl;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x3520
movq -0x88(%rbp), %rdx
leaq 0x5fa8(%rip), %rsi      # 0x1ce40
leaq -0x28(%rbp), %rdi
callq 0x3b80
jmp 0x16ea3
leaq -0x29(%rbp), %rdi
callq 0x3350
movq -0x90(%rbp), %rax
movss 0x8c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x5f61(%rip), %xmm1     # 0x1ce28
ucomisd %xmm1, %xmm0
jbe 0x17016
movq -0x90(%rbp), %rdx
addq $0x68, %rdx
leaq 0x5f8a(%rip), %rsi      # 0x1ce6d
leaq -0x80(%rbp), %rdi
callq 0x8970
jmp 0x16eee
leaq 0x5bd9(%rip), %rdx      # 0x1cace
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x8440
jmp 0x16f04
leaq -0x28(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x33e0
jmp 0x16f13
leaq -0x60(%rbp), %rdi
callq 0x3200
leaq -0x80(%rbp), %rdi
callq 0x3200
leaq 0x5f63(%rip), %rsi      # 0x1ce8f
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x16f37
leaq 0x5f6d(%rip), %rsi      # 0x1ceab
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x16f49
leaq 0x5f86(%rip), %rsi      # 0x1ced6
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x16f5b
leaq 0x5f89(%rip), %rsi      # 0x1ceeb
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x16f6d
leaq 0x5fa1(%rip), %rsi      # 0x1cf15
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x16f7f
leaq 0x5fc2(%rip), %rsi      # 0x1cf48
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x16f91
leaq 0x5fd1(%rip), %rsi      # 0x1cf69
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x16fa3
leaq 0x5fe3(%rip), %rsi      # 0x1cf8d
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x16fb5
jmp 0x171fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x3350
jmp 0x17246
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1723d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x17008
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3200
leaq -0x80(%rbp), %rdi
callq 0x3200
jmp 0x1723d
movq -0x90(%rbp), %rax
movss 0x8c(%rax), %xmm0
movss 0x5de7(%rip), %xmm1     # 0x1ce14
ucomiss %xmm1, %xmm0
jb 0x170c8
movq -0x90(%rbp), %rax
movss 0x8c(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x5dd7(%rip), %xmm0     # 0x1ce28
ucomisd %xmm1, %xmm0
jb 0x170c8
leaq 0x5f48(%rip), %rsi      # 0x1cfa6
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x17069
leaq 0x5f65(%rip), %rsi      # 0x1cfd5
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x1707b
leaq 0x5f71(%rip), %rsi      # 0x1cff3
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x1708d
leaq 0x5f8a(%rip), %rsi      # 0x1d01e
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x1709f
leaq 0x5f86(%rip), %rsi      # 0x1d02c
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x170b1
leaq 0x5ed5(%rip), %rsi      # 0x1cf8d
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x170c3
jmp 0x171fb
movq -0x90(%rbp), %rax
movss 0x8c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x5d3d(%rip), %xmm1     # 0x1ce20
ucomisd %xmm1, %xmm0
jb 0x17145
movq -0x90(%rbp), %rax
movss 0x8c(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x5d2c(%rip), %xmm0     # 0x1ce30
ucomisd %xmm1, %xmm0
jbe 0x17145
leaq 0x5f38(%rip), %rsi      # 0x1d049
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x1711c
leaq 0x5f59(%rip), %rsi      # 0x1d07c
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x1712e
leaq 0x5f7e(%rip), %rsi      # 0x1d0b3
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x17140
jmp 0x171f9
movq -0x90(%rbp), %rax
movss 0x8c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x5cd0(%rip), %xmm1     # 0x1ce30
ucomisd %xmm1, %xmm0
jb 0x171bf
movq -0x90(%rbp), %rax
movss 0x8c(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x5cb7(%rip), %xmm0     # 0x1ce38
ucomisd %xmm1, %xmm0
jbe 0x171bf
leaq 0x5f5a(%rip), %rsi      # 0x1d0e8
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x17199
leaq 0x5f71(%rip), %rsi      # 0x1d111
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x171ab
leaq 0x5f94(%rip), %rsi      # 0x1d146
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x171bd
jmp 0x171f7
leaq 0x5fb4(%rip), %rsi      # 0x1d17a
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x171d1
leaq 0x5fd7(%rip), %rsi      # 0x1d1af
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x171e3
leaq 0x5fdf(%rip), %rsi      # 0x1d1c9
leaq -0x28(%rbp), %rdi
callq 0x32d0
jmp 0x171f5
jmp 0x171f7
jmp 0x171f9
jmp 0x171fb
jmp 0x171fd
movq 0xfdbc(%rip), %rdi      # 0x26fc0
leaq -0x28(%rbp), %rsi
callq 0x32b0
movq %rax, -0x98(%rbp)
jmp 0x17216
movq -0x98(%rbp), %rdi
movq 0xfd84(%rip), %rsi      # 0x26fa8
callq 0x3330
jmp 0x1722b
leaq -0x28(%rbp), %rdi
callq 0x3200
addq $0xa0, %rsp
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x3200
movq -0x38(%rbp), %rdi
callq 0x3510
nop