// File: /workspace/github_cpp_makefile_star2_O1/Matteo-Grellier[P]RPG/Menu.cpp
// Function: Menu::actions(Character&)
void Menu::actions(Character& character) {


    toScreen(
    " ",
    "c'est au tour de " + character.name + " de jouer",
    " ");

    if (character.getJob() != 7 ){

        int awnser = ask("| 1. attaquer | 2. " + character.getSpecialActionName() + " | 3. boire une potion |", "quel action souhaitez vous effectuer ?");
        int subAwnser;

        string targetList = targetListing();

        if (awnser == 1) {
            subAwnser = ask(
            targetList,
            "quel personnage souhaitez vous attaquer ?");


            character.attack(*Character::charactersList[subAwnser]);

        } else if (awnser == 2) {

            if (character.getJob() != 3) {
                subAwnser = ask(
                targetList,
                "quel personnage voulez vous viser ?");

                character.launchSpecialAction(*Character::charactersList[subAwnser]);
            } else {
                character.launchSpecialAction(character);
            }

        } else if (awnser == 3) {

            subAwnser = ask("| 0. Grande potion | 1. Moyenne potion | 2. Petite potion |", "choisissez une potion");

            character.drink(*Character::potionsList[subAwnser]);

        } else {
            toScreen(
            " ",
            "Action inconnu",
            " ");

            actions(character);

        }


    } else {
        character.launchSpecialAction(character);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
leaq -0x1f8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1d40(%rip), %rsi      # 0x9531
leaq 0x1d3a(%rip), %rdx      # 0x9532
leaq -0x208(%rbp), %rdi
callq 0x340c
leaq 0x8(%rbx), %rdx
leaq 0x1cf4(%rip), %rsi      # 0x9503
leaq -0x48(%rbp), %rdi
callq 0x32d2
leaq 0x1cf6(%rip), %rsi      # 0x9515
leaq -0x48(%rbp), %rdi
callq 0x2290
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x784f
movq %rdx, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0x7856
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0x80(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x1d8(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x1cb1(%rip), %rsi      # 0x9531
leaq 0x1cab(%rip), %rdx      # 0x9532
leaq -0x1e8(%rbp), %rdi
callq 0x340c
leaq -0x208(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0x1e8(%rbp), %rdx
callq 0x70ca
movq -0x1e8(%rbp), %rdi
cmpq %r12, %rdi
je 0x78c8
movq -0x1d8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x78e0
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x21c0
leaq -0x38(%rbp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x78f9
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x208(%rbp), %rdi
cmpq %r14, %rdi
je 0x7914
movq -0x1f8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x4c80
cmpl $0x7, %eax
jne 0x7932
movq (%rbx), %rax
movq %rbx, %rdi
movq %rbx, %rsi
callq *0x8(%rax)
jmp 0x7dd8
movq (%rbx), %rax
leaq -0x228(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq *(%rax)
leaq 0x1bd4(%rip), %rcx      # 0x951f
movl $0x13, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21d0
movq %r15, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x797d
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x7984
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1b8d(%rip), %rsi      # 0x9533
callq 0x2290
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x79d0
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x79d8
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, -0x60(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x1b8(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x1b4b(%rip), %rsi      # 0x954c
leaq 0x1b6a(%rip), %rdx      # 0x9572
leaq -0x1c8(%rbp), %rdi
callq 0x340c
leaq -0x68(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x72c0
movl %eax, %r14d
movq -0x1c8(%rbp), %rdi
cmpq %r13, %rdi
je 0x7a42
movq -0x1b8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x7a57
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x7a6c
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
leaq -0x218(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7a8b
movq -0x218(%rbp), %rsi
incq %rsi
callq 0x21c0
leaq -0x48(%rbp), %rdi
callq 0x8014
cmpl $0x3, %r14d
je 0x7c2b
cmpl $0x2, %r14d
je 0x7b64
cmpl $0x1, %r14d
jne 0x7ce0
leaq -0x198(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1a8(%rbp), %rdi
callq 0x3372
leaq -0x178(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x1a8c(%rip), %rsi      # 0x9573
leaq 0x1aae(%rip), %rdx      # 0x959c
leaq -0x188(%rbp), %rdi
callq 0x340c
leaq -0x1a8(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x72c0
movl %eax, %r14d
movq -0x188(%rbp), %rdi
cmpq %r13, %rdi
je 0x7b2b
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x1a8(%rbp), %rdi
cmpq %r12, %rdi
je 0x7b46
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x21c0
movslq %r14d, %rax
leaq 0x5640(%rip), %rcx      # 0xd190
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
callq 0x3d86
jmp 0x7dc3
movq %rbx, %rdi
callq 0x4c80
movq %rbx, %rsi
cmpl $0x3, %eax
je 0x7c1d
leaq -0x158(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x168(%rbp), %rdi
callq 0x3372
leaq -0x138(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x19f0(%rip), %rsi      # 0x959d
leaq 0x1a0c(%rip), %rdx      # 0x95c0
leaq -0x148(%rbp), %rdi
callq 0x340c
leaq -0x168(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x72c0
movl %eax, %r14d
movq -0x148(%rbp), %rdi
cmpq %r13, %rdi
je 0x7bf1
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x168(%rbp), %rdi
cmpq %r12, %rdi
je 0x7c0c
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x21c0
movslq %r14d, %rax
leaq 0x557a(%rip), %rcx      # 0xd190
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
jmp 0x7dc3
leaq -0x118(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x1983(%rip), %rsi      # 0x95c1
leaq 0x19b7(%rip), %rdx      # 0x95fc
leaq -0x128(%rbp), %rdi
callq 0x340c
leaq -0xf8(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x199a(%rip), %rsi      # 0x95fd
leaq 0x19a8(%rip), %rdx      # 0x9612
leaq -0x108(%rbp), %rdi
callq 0x340c
leaq -0x128(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x72c0
movl %eax, %r14d
movq -0x108(%rbp), %rdi
cmpq %r13, %rdi
je 0x7ca7
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x128(%rbp), %rdi
cmpq %r12, %rdi
je 0x7cc2
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x21c0
movslq %r14d, %rax
leaq 0x54dc(%rip), %rcx      # 0xd1a8
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
callq 0x36f0
jmp 0x7dc3
leaq -0xd8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x183f(%rip), %rsi      # 0x9531
leaq 0x1839(%rip), %rdx      # 0x9532
leaq -0xe8(%rbp), %rdi
callq 0x340c
leaq -0xb8(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x18fb(%rip), %rsi      # 0x9613
leaq 0x1902(%rip), %rdx      # 0x9621
leaq -0xc8(%rbp), %rdi
callq 0x340c
leaq -0x98(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x17f4(%rip), %rsi      # 0x9531
leaq 0x17ee(%rip), %rdx      # 0x9532
leaq -0xa8(%rbp), %rdi
callq 0x340c
leaq -0xe8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x70ca
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x7d85
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x7da0
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0xe8(%rbp), %rdi
cmpq %r14, %rdi
je 0x7dbb
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x77c8
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x7dd8
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x148(%rbp), %rdi
cmpq %r13, %rdi
je 0x7e0d
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7e0d
movq %rax, %rbx
movq -0x168(%rbp), %rdi
cmpq %r12, %rdi
je 0x7f83
movq -0x158(%rbp), %rsi
jmp 0x7efb
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x7e4c
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7e4c
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x7eac
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7eac
movq %rax, %rbx
movq -0x188(%rbp), %rdi
cmpq %r13, %rdi
je 0x7ec8
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7ec8
movq %rax, %rbx
movq -0x108(%rbp), %rdi
cmpq %r13, %rdi
je 0x7ee4
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7ee4
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
cmpq %r14, %rdi
je 0x7f83
movq -0xd8(%rbp), %rsi
jmp 0x7efb
movq %rax, %rbx
movq -0x1a8(%rbp), %rdi
cmpq %r12, %rdi
je 0x7f83
movq -0x198(%rbp), %rsi
jmp 0x7efb
movq %rax, %rbx
movq -0x128(%rbp), %rdi
cmpq %r12, %rdi
je 0x7f83
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7f83
jmp 0x7f80
jmp 0x7f80
movq %rax, %rbx
movq -0x1c8(%rbp), %rdi
cmpq %r13, %rdi
je 0x7f2c
movq -0x1b8(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7f2c
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x7f46
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7f46
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x7f60
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7f60
movq %rax, %rbx
leaq -0x218(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x800b
movq -0x218(%rbp), %rsi
jmp 0x8003
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x800b
movq -0x38(%rbp), %rsi
jmp 0x8003
movq %rax, %rbx
movq -0x1e8(%rbp), %rdi
cmpq %r12, %rdi
je 0x7fb5
movq -0x1d8(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7fb5
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x7fd2
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7fd2
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7ff0
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7ff0
movq %rax, %rbx
movq -0x208(%rbp), %rdi
cmpq %r14, %rdi
je 0x800b
movq -0x1f8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2270
nop