// File: Matteo-Grellier[P]RPG/Priest.cpp
// Function: Priest::healSpell(Character&)
void Priest::healSpell(Character& other){
    if(!tryUsingMp(this->maxMp*0.10f)){
        return;
    }
    int healValue = (rand() % ( magicAttack*2 - magicAttack)+magicAttack );
    other.heal(healValue);

    Menu::toScreen(
        "",
        this->name + " soigne " + other.name,
        other.name + " est à " + to_string(other.getCurrentHp()) + " pv." 
    );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x118(%rbp)
cvtsi2ssl 0x44(%rdi), %xmm0
movss 0x5c21(%rip), %xmm1     # 0xe28c
mulss %xmm1, %xmm0
cvttss2si %xmm0, %esi
callq 0x8600
testb $0x1, %al
jne 0x8681
jmp 0x8800
callq 0x3080
movq -0x118(%rbp), %rcx
movl 0x30(%rcx), %edx
movl %edx, -0x124(%rbp)
movl %edx, %ecx
addl %ecx, %ecx
subl %edx, %ecx
cltd
idivl %ecx
movl -0x124(%rbp), %eax
addl %eax, %edx
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5a60
leaq -0x39(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x33a0
movq -0x120(%rbp), %rdx
leaq 0x5e3e(%rip), %rsi      # 0xe512
leaq -0x38(%rbp), %rdi
callq 0x4500
jmp 0x86df
movq -0x118(%rbp), %rsi
addq $0x8, %rsi
leaq 0x5d2b(%rip), %rdx      # 0xe41c
leaq -0x90(%rbp), %rdi
callq 0x66a0
jmp 0x86ff
movq -0x10(%rbp), %rdx
addq $0x8, %rdx
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x6840
jmp 0x8719
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
leaq 0x5a19(%rip), %rdx      # 0xe141
leaq -0xf0(%rbp), %rdi
callq 0x66a0
jmp 0x8736
movq -0x10(%rbp), %rdi
callq 0x5da0
movl %eax, -0x128(%rbp)
jmp 0x8747
movl -0x128(%rbp), %esi
leaq -0x110(%rbp), %rdi
callq 0x6720
jmp 0x875b
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
leaq -0x110(%rbp), %rdx
callq 0x65d0
jmp 0x8777
leaq 0x59be(%rip), %rdx      # 0xe13c
leaq -0xb0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x4770
jmp 0x8793
leaq -0x38(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x93f0
jmp 0x87a9
leaq -0xb0(%rbp), %rdi
callq 0x3418
leaq -0xd0(%rbp), %rdi
callq 0x3418
leaq -0x110(%rbp), %rdi
callq 0x3418
leaq -0xf0(%rbp), %rdi
callq 0x3418
leaq -0x70(%rbp), %rdi
callq 0x3418
leaq -0x90(%rbp), %rdi
callq 0x3418
leaq -0x38(%rbp), %rdi
callq 0x3418
leaq -0x39(%rbp), %rdi
callq 0x3280
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x88cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x88c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x88b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x88ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x88a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x8895
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x8889
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x3418
leaq -0xd0(%rbp), %rdi
callq 0x3418
leaq -0x110(%rbp), %rdi
callq 0x3418
leaq -0xf0(%rbp), %rdi
callq 0x3418
leaq -0x70(%rbp), %rdi
callq 0x3418
leaq -0x90(%rbp), %rdi
callq 0x3418
leaq -0x38(%rbp), %rdi
callq 0x3418
leaq -0x39(%rbp), %rdi
callq 0x3280
movq -0x48(%rbp), %rdi
callq 0x3390
nopl (%rax)