// File: /workspace/github_cpp_makefile_star2_O3/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 0x1d5a(%rip), %rsi      # 0x9531
leaq 0x1d54(%rip), %rdx      # 0x9532
leaq -0x208(%rbp), %rdi
callq 0x33fc
leaq 0x8(%rbx), %rdx
leaq 0x1d0e(%rip), %rsi      # 0x9503
leaq -0x48(%rbp), %rdi
callq 0x32be
leaq 0x1d10(%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 0x7835
movq %rdx, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0x783c
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 0x1ccb(%rip), %rsi      # 0x9531
leaq 0x1cc5(%rip), %rdx      # 0x9532
leaq -0x1e8(%rbp), %rdi
callq 0x33fc
leaq -0x208(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0x1e8(%rbp), %rdx
callq 0x70b2
movq -0x1e8(%rbp), %rdi
cmpq %r12, %rdi
je 0x78ae
movq -0x1d8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x78c6
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x21c0
leaq -0x38(%rbp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x78df
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x208(%rbp), %rdi
cmpq %r14, %rdi
je 0x78fa
movq -0x1f8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x4c70
cmpl $0x7, %eax
jne 0x7918
movq (%rbx), %rax
movq %rbx, %rdi
movq %rbx, %rsi
callq *0x8(%rax)
jmp 0x7dbe
movq (%rbx), %rax
leaq -0x228(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq *(%rax)
leaq 0x1bee(%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 0x7963
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x796a
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 0x1ba7(%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 0x79b6
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x79be
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 0x1b65(%rip), %rsi      # 0x954c
leaq 0x1b84(%rip), %rdx      # 0x9572
leaq -0x1c8(%rbp), %rdi
callq 0x33fc
leaq -0x68(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x72a8
movl %eax, %r14d
movq -0x1c8(%rbp), %rdi
cmpq %r13, %rdi
je 0x7a28
movq -0x1b8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x7a3d
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x7a52
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
leaq -0x218(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7a71
movq -0x218(%rbp), %rsi
incq %rsi
callq 0x21c0
leaq -0x48(%rbp), %rdi
callq 0x7ffa
cmpl $0x3, %r14d
je 0x7c11
cmpl $0x2, %r14d
je 0x7b4a
cmpl $0x1, %r14d
jne 0x7cc6
leaq -0x198(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1a8(%rbp), %rdi
callq 0x335e
leaq -0x178(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x1aa6(%rip), %rsi      # 0x9573
leaq 0x1ac8(%rip), %rdx      # 0x959c
leaq -0x188(%rbp), %rdi
callq 0x33fc
leaq -0x1a8(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x72a8
movl %eax, %r14d
movq -0x188(%rbp), %rdi
cmpq %r13, %rdi
je 0x7b11
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x1a8(%rbp), %rdi
cmpq %r12, %rdi
je 0x7b2c
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x21c0
movslq %r14d, %rax
leaq 0x565a(%rip), %rcx      # 0xd190
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
callq 0x3d7e
jmp 0x7da9
movq %rbx, %rdi
callq 0x4c70
movq %rbx, %rsi
cmpl $0x3, %eax
je 0x7c03
leaq -0x158(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x168(%rbp), %rdi
callq 0x335e
leaq -0x138(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x1a0a(%rip), %rsi      # 0x959d
leaq 0x1a26(%rip), %rdx      # 0x95c0
leaq -0x148(%rbp), %rdi
callq 0x33fc
leaq -0x168(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x72a8
movl %eax, %r14d
movq -0x148(%rbp), %rdi
cmpq %r13, %rdi
je 0x7bd7
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x168(%rbp), %rdi
cmpq %r12, %rdi
je 0x7bf2
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x21c0
movslq %r14d, %rax
leaq 0x5594(%rip), %rcx      # 0xd190
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
jmp 0x7da9
leaq -0x118(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x199d(%rip), %rsi      # 0x95c1
leaq 0x19d1(%rip), %rdx      # 0x95fc
leaq -0x128(%rbp), %rdi
callq 0x33fc
leaq -0xf8(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x19b4(%rip), %rsi      # 0x95fd
leaq 0x19c2(%rip), %rdx      # 0x9612
leaq -0x108(%rbp), %rdi
callq 0x33fc
leaq -0x128(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x72a8
movl %eax, %r14d
movq -0x108(%rbp), %rdi
cmpq %r13, %rdi
je 0x7c8d
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x128(%rbp), %rdi
cmpq %r12, %rdi
je 0x7ca8
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x21c0
movslq %r14d, %rax
leaq 0x54f6(%rip), %rcx      # 0xd1a8
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
callq 0x36ec
jmp 0x7da9
leaq -0xd8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1859(%rip), %rsi      # 0x9531
leaq 0x1853(%rip), %rdx      # 0x9532
leaq -0xe8(%rbp), %rdi
callq 0x33fc
leaq -0xb8(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x1915(%rip), %rsi      # 0x9613
leaq 0x191c(%rip), %rdx      # 0x9621
leaq -0xc8(%rbp), %rdi
callq 0x33fc
leaq -0x98(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x180e(%rip), %rsi      # 0x9531
leaq 0x1808(%rip), %rdx      # 0x9532
leaq -0xa8(%rbp), %rdi
callq 0x33fc
leaq -0xe8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x70b2
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x7d6b
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x7d86
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0xe8(%rbp), %rdi
cmpq %r14, %rdi
je 0x7da1
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x77ae
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x7dbe
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 0x7df3
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7df3
movq %rax, %rbx
movq -0x168(%rbp), %rdi
cmpq %r12, %rdi
je 0x7f69
movq -0x158(%rbp), %rsi
jmp 0x7ee1
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x7e32
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7e32
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x7e92
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7e92
movq %rax, %rbx
movq -0x188(%rbp), %rdi
cmpq %r13, %rdi
je 0x7eae
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7eae
movq %rax, %rbx
movq -0x108(%rbp), %rdi
cmpq %r13, %rdi
je 0x7eca
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7eca
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
cmpq %r14, %rdi
je 0x7f69
movq -0xd8(%rbp), %rsi
jmp 0x7ee1
movq %rax, %rbx
movq -0x1a8(%rbp), %rdi
cmpq %r12, %rdi
je 0x7f69
movq -0x198(%rbp), %rsi
jmp 0x7ee1
movq %rax, %rbx
movq -0x128(%rbp), %rdi
cmpq %r12, %rdi
je 0x7f69
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7f69
jmp 0x7f66
jmp 0x7f66
movq %rax, %rbx
movq -0x1c8(%rbp), %rdi
cmpq %r13, %rdi
je 0x7f12
movq -0x1b8(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7f12
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x7f2c
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7f2c
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x7f46
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7f46
movq %rax, %rbx
leaq -0x218(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7ff1
movq -0x218(%rbp), %rsi
jmp 0x7fe9
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x7ff1
movq -0x38(%rbp), %rsi
jmp 0x7fe9
movq %rax, %rbx
movq -0x1e8(%rbp), %rdi
cmpq %r12, %rdi
je 0x7f9b
movq -0x1d8(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7f9b
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x7fb8
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7fb8
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7fd6
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x7fd6
movq %rax, %rbx
movq -0x208(%rbp), %rdi
cmpq %r14, %rdi
je 0x7ff1
movq -0x1f8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2270
nop