// File: /workspace/github_cpp_makefile_star2_O2/KellerMartins[P]PDS2-Pacman/source/game/game.cpp
// Function: Game::GameInProgressStateUpdate()
void GameInProgressStateUpdate(){
        GameEvents::TriggerUpdate();
        std::ostringstream scoreString;
        scoreString << "Score:" << pacman->GetPontuacao();
        UI::DrawTextCentered(scoreString.str(), 0.5, 0.05, 5, 0.5, RAYWHITE);
        for(unsigned i=0; i<pacman->GetVidas(); i++)
            UI::DrawImage("assets/interface/pacman_icon.png", 0.05 + i*0.05, 0.9, 0.1, 0.1);

        if(!pacman->IsAlive()){
            if(restartTimer < 0)
                restartTimer = 0;

            restartTimer += GetFrameTime();

            if(restartTimer >= 3){
                if(pacman->GetVidas() == 0){
                    SetState(GameOver);
                }else{
                    GameEvents::TriggerRestart();
                    SetState(GameStart);
                }
            }
        }
        else if(Mapa::GetPontosRestantes() == 0){
            SetState(LevelCleared);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1c0, %rsp            # imm = 0x1C0
callq 0xb172
leaq -0x1e0(%rbp), %rbx
movq %rbx, %rdi
callq 0x8aa0
leaq 0x8d7b2(%rip), %rsi     # 0x983c9
movq %rbx, %rdi
callq 0x8840
movq %rax, %rbx
movq 0xce22f(%rip), %rdi     # 0xd8e58
callq 0xd548
movl %eax, %esi
movq %rbx, %rdi
callq 0x8570
leaq -0x1d8(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x8d40
leaq -0x48(%rbp), %rdi
movss 0x8d684(%rip), %xmm1    # 0x982d8
movss 0x8d5d8(%rip), %xmm2    # 0x98234
movss 0x8d660(%rip), %xmm0    # 0x982c4
movapd %xmm0, %xmm3
movl $0xfff5f5f5, %esi       # imm = 0xFFF5F5F5
callq 0xfa52
leaq -0x48(%rbp), %rdi
callq 0x83a0
xorl %r12d, %r12d
leaq 0x8d74b(%rip), %rbx     # 0x983d0
leaq -0x68(%rbp), %r14
leaq -0x21(%rbp), %r15
movq 0xce1c4(%rip), %rdi     # 0xd8e58
callq 0xd554
cmpl %eax, %r12d
jae 0xacf1
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x8310
movl %r12d, %eax
cvtsi2sd %rax, %xmm0
movsd 0x8d664(%rip), %xmm1    # 0x98320
mulsd %xmm1, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq %r14, %rdi
movss 0x8d609(%rip), %xmm1    # 0x982dc
movss 0x8d605(%rip), %xmm2    # 0x982e0
movapd %xmm2, %xmm3
callq 0xf91a
movq %r14, %rdi
callq 0x83a0
incl %r12d
jmp 0xac8d
movq 0xce160(%rip), %rdi     # 0xd8e58
callq 0xd53c
testb %al, %al
je 0xad13
callq 0xbeea
testl %eax, %eax
jne 0xad81
leaq 0xc4(%rip), %rax        # 0xadd5
jmp 0xad72
xorpd %xmm0, %xmm0
ucomisd 0xce161(%rip), %xmm0    # 0xd8e80
jbe 0xad29
andq $0x0, 0xce157(%rip)     # 0xd8e80
callq 0x2e7fe
cvtss2sd %xmm0, %xmm0
addsd 0xce146(%rip), %xmm0    # 0xd8e80
movsd %xmm0, 0xce13e(%rip)    # 0xd8e80
ucomisd 0x8d5ce(%rip), %xmm0    # 0x98318
jb 0xad81
movq 0xce105(%rip), %rdi     # 0xd8e58
callq 0xd554
testl %eax, %eax
je 0xad6b
callq 0xb1a0
pushq $0x2
popq %rdi
callq 0xa8db
jmp 0xad81
leaq 0x1ac(%rip), %rax       # 0xaf1e
andq $0x0, 0xce0e6(%rip)     # 0xd8e60
movq %rax, 0xce0f7(%rip)     # 0xd8e78
leaq -0x1e0(%rbp), %rdi
callq 0x81a0
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
jmp 0xadaf
jmp 0xadb8
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x83a0
jmp 0xadbb
jmp 0xadb8
movq %rax, %rbx
leaq -0x1e0(%rbp), %rdi
callq 0x81a0
movq %rbx, %rdi
callq 0x8ed0