// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
callq 0xb6b6
leaq -0x1e0(%rbp), %rbx
movq %rbx, %rdi
callq 0x8a90
leaq 0x8e44f(%rip), %rsi     # 0x993f9
movl $0x6, %edx
movq %rbx, %rdi
callq 0x8980
movq 0xcee7a(%rip), %rdi     # 0xd9e38
callq 0xdd2a
movl %eax, %esi
leaq -0x1e0(%rbp), %rdi
callq 0x8570
leaq -0x1d8(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x8d10
leaq -0x68(%rbp), %rdi
movss 0x8e31b(%rip), %xmm1    # 0x99308
movss 0x8e23f(%rip), %xmm2    # 0x99234
movss 0x8e2f7(%rip), %xmm0    # 0x992f4
movapd %xmm0, %xmm3
movl $0xfff5f5f5, %esi       # imm = 0xFFF5F5F5
callq 0x1055a
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb024
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x8880
xorl %r13d, %r13d
leaq -0x38(%rbp), %r12
leaq 0x8e3ce(%rip), %rbx     # 0x99400
leaq 0x8e3e7(%rip), %r14     # 0x99420
leaq -0x48(%rbp), %r15
movq 0xcedf4(%rip), %rdi     # 0xd9e38
callq 0xdd36
cmpl %eax, %r13d
jae 0xb0b5
movq %r12, -0x48(%rbp)
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xa75c
movl %r13d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd 0x8e2dd(%rip), %xmm1    # 0x99350
mulsd %xmm1, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq %r15, %rdi
movss 0x8e282(%rip), %xmm1    # 0x9930c
movss 0x8e27e(%rip), %xmm2    # 0x99310
movapd %xmm2, %xmm3
callq 0x10386
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0xb0b0
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x8880
incl %r13d
jmp 0xb03d
movq 0xced7c(%rip), %rdi     # 0xd9e38
callq 0xdd1e
testb %al, %al
je 0xb0db
callq 0xc5a6
testl %eax, %eax
jne 0xb15e
leaq 0x11a(%rip), %rax       # 0xb1f3
jmp 0xb14c
xorpd %xmm0, %xmm0
ucomisd 0xced79(%rip), %xmm0    # 0xd9e60
jbe 0xb0f4
movq $0x0, 0xced6c(%rip) # 0xd9e60
callq 0x2f43a
cvtss2sd %xmm0, %xmm0
addsd 0xced5b(%rip), %xmm0    # 0xd9e60
movsd %xmm0, 0xced53(%rip)    # 0xd9e60
ucomisd 0x8e233(%rip), %xmm0    # 0x99348
jb 0xb15e
movq 0xced1a(%rip), %rdi     # 0xd9e38
callq 0xdd36
testl %eax, %eax
je 0xb145
callq 0xb6e4
movq $0x0, 0xced09(%rip) # 0xd9e40
callq 0xadf8
leaq -0x2d8(%rip), %rax      # 0xae6b
jmp 0xb157
leaq 0x271(%rip), %rax       # 0xb3bd
movq $0x0, 0xcece9(%rip) # 0xd9e40
movq %rax, 0xcecfa(%rip)     # 0xd9e58
movq 0xcbe63(%rip), %rsi     # 0xd6fc8
leaq -0x1e0(%rbp), %rdi
callq 0x8440
leaq -0x170(%rbp), %rdi
callq 0x8280
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb1c6
movq -0x58(%rbp), %rsi
jmp 0xb1b7
jmp 0xb1c3
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0xb1c6
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x8880
jmp 0xb1c6
jmp 0xb1c3
movq %rax, %rbx
movq 0xcbdfb(%rip), %rsi     # 0xd6fc8
leaq -0x1e0(%rbp), %rdi
callq 0x8440
leaq -0x170(%rbp), %rdi
callq 0x8280
movq %rbx, %rdi
callq 0x8ea0