// File: KellerMartins[P]PDS2-Pacman/source/game/game.cpp
// Function: Game::GameOverStateUpdate()
void GameOverStateUpdate(){
        if(stateTimer < 4){
            std::ostringstream scoreString;
            scoreString << "Score:" << pacman->GetPontuacao();
            UI::DrawTextCentered(scoreString.str(), 0.5, 0.65, 8, 0.5, RAYWHITE);
            UI::DrawTextCentered("Game Over!", 0.5, 0.5, 15, 0.0, PURPLE);
            GameEvents::TriggerMenuUpdate();

            RenderManager::camera.position = Lerp(RenderManager::camera.position, 
                                                  {LARGURA/2, 32.0f, ALTURA/1.9}, 
                                                  stateTimer/32);
            RenderManager::camera.target = Lerp(RenderManager::camera.target,
                                                {LARGURA/2, 0.0f, ALTURA/2}, 
                                                stateTimer/32);
        }else{
            Mapa::CarregaArquivo("assets/maps/mapa1.txt");
            GameEvents::TriggerRestart();
            SetState(Menu);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp            # imm = 0x320
movsd 0x97285(%rip), %xmm0    # 0xa5228
ucomisd 0xdcef5(%rip), %xmm0    # 0xeaea0
jbe 0xe3b1
leaq -0x178(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x9b10
movq -0x2c8(%rbp), %rdi
leaq 0x972f7(%rip), %rsi     # 0xa52c9
callq 0x9890
movq %rax, -0x2c0(%rbp)
jmp 0xdfe0
movq 0xdceb1(%rip), %rdi     # 0xeae98
callq 0x147f0
movl %eax, -0x2cc(%rbp)
jmp 0xdff4
movl -0x2cc(%rbp), %esi
movq -0x2c0(%rbp), %rdi
callq 0x9af0
jmp 0xe008
leaq -0x1a8(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x9900
jmp 0xe01d
movb $-0xb, -0x1ac(%rbp)
movb $-0xb, -0x1ab(%rbp)
movb $-0xb, -0x1aa(%rbp)
movb $-0x1, -0x1a9(%rbp)
movl -0x1ac(%rbp), %esi
leaq -0x1a8(%rbp), %rdi
movss 0x971b6(%rip), %xmm1    # 0xa5204
movss 0x971b2(%rip), %xmm2    # 0xa5208
movss 0x97182(%rip), %xmm3    # 0xa51e0
movaps %xmm3, %xmm0
callq 0x1a750
jmp 0xe068
leaq -0x1a8(%rbp), %rdi
callq 0x9530
leaq -0x1d1(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x9f60
movq -0x2d8(%rbp), %rdx
leaq 0x9726b(%rip), %rsi     # 0xa5300
leaq -0x1d0(%rbp), %rdi
callq 0x9b20
jmp 0xe0a3
movb $-0x38, -0x1d5(%rbp)
movb $0x7a, -0x1d4(%rbp)
movb $-0x1, -0x1d3(%rbp)
movb $-0x1, -0x1d2(%rbp)
movl -0x1d5(%rbp), %esi
leaq -0x1d0(%rbp), %rdi
movss 0x9710c(%rip), %xmm1    # 0xa51e0
movss 0x97124(%rip), %xmm2    # 0xa5200
xorps %xmm3, %xmm3
movaps %xmm1, %xmm0
callq 0x1a750
jmp 0xe0e9
leaq -0x1d0(%rbp), %rdi
callq 0x9530
leaq -0x1d1(%rbp), %rdi
callq 0x9960
callq 0xe4a0
jmp 0xe108
leaq 0xda781(%rip), %rax     # 0xe8890
movl 0x8(%rax), %ecx
movl %ecx, -0x1f0(%rbp)
movq (%rax), %rax
movq %rax, -0x1f8(%rbp)
movl $0x41200000, -0x204(%rbp) # imm = 0x41200000
movl $0x42000000, -0x200(%rbp) # imm = 0x42000000
movl $0x41635e51, -0x1fc(%rbp) # imm = 0x41635E51
movsd 0xdcd58(%rip), %xmm0    # 0xeaea0
movsd 0x970e0(%rip), %xmm1    # 0xa5230
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm4
movl -0x1f0(%rbp), %eax
movl %eax, -0x210(%rbp)
movq -0x1f8(%rbp), %rax
movq %rax, -0x218(%rbp)
movsd -0x218(%rbp), %xmm0
movss -0x210(%rbp), %xmm1
movl -0x1fc(%rbp), %eax
movl %eax, -0x220(%rbp)
movq -0x204(%rbp), %rax
movq %rax, -0x228(%rbp)
movsd -0x228(%rbp), %xmm2
movss -0x220(%rbp), %xmm3
callq 0xb6b0
movss %xmm1, -0x2f4(%rbp)
movaps %xmm0, -0x2f0(%rbp)
jmp 0xe1c2
movss -0x2f4(%rbp), %xmm0
movaps -0x2f0(%rbp), %xmm1
movlpd %xmm1, -0x238(%rbp)
movss %xmm0, -0x230(%rbp)
movl -0x230(%rbp), %eax
movl %eax, -0x1e0(%rbp)
movq -0x238(%rbp), %rax
movq %rax, -0x1e8(%rbp)
leaq 0xda68e(%rip), %rax     # 0xe8890
movl -0x1e0(%rbp), %ecx
movl %ecx, 0x8(%rax)
movq -0x1e8(%rbp), %rcx
movq %rcx, (%rax)
movl 0x14(%rax), %ecx
movl %ecx, -0x248(%rbp)
movq 0xc(%rax), %rax
movq %rax, -0x250(%rbp)
movl $0x41200000, -0x25c(%rbp) # imm = 0x41200000
movl $0x0, -0x258(%rbp)
movl $0x41500000, -0x254(%rbp) # imm = 0x41500000
movsd 0xdcc51(%rip), %xmm0    # 0xeaea0
movsd 0x96fd9(%rip), %xmm1    # 0xa5230
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm4
movl -0x248(%rbp), %eax
movl %eax, -0x268(%rbp)
movq -0x250(%rbp), %rax
movq %rax, -0x270(%rbp)
movsd -0x270(%rbp), %xmm0
movss -0x268(%rbp), %xmm1
movl -0x254(%rbp), %eax
movl %eax, -0x278(%rbp)
movq -0x25c(%rbp), %rax
movq %rax, -0x280(%rbp)
movsd -0x280(%rbp), %xmm2
movss -0x278(%rbp), %xmm3
callq 0xb6b0
movss %xmm1, -0x314(%rbp)
movaps %xmm0, -0x310(%rbp)
jmp 0xe2c9
movss -0x314(%rbp), %xmm0
movaps -0x310(%rbp), %xmm1
movlpd %xmm1, -0x290(%rbp)
movss %xmm0, -0x288(%rbp)
movq -0x290(%rbp), %rax
movq %rax, -0x244(%rbp)
movl -0x288(%rbp), %eax
movl %eax, -0x23c(%rbp)
leaq 0xda587(%rip), %rax     # 0xe8890
movq -0x244(%rbp), %rcx
movq %rcx, 0xc(%rax)
movl -0x23c(%rbp), %ecx
movl %ecx, 0x14(%rax)
leaq -0x178(%rbp), %rdi
callq 0x91c0
jmp 0xe457
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
jmp 0xe3a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x9530
jmp 0xe3a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
jmp 0xe394
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x9530
leaq -0x1d1(%rbp), %rdi
callq 0x9960
leaq -0x178(%rbp), %rdi
callq 0x91c0
jmp 0xe460
leaq -0x2b1(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x9f60
movq -0x320(%rbp), %rdx
leaq 0x96e66(%rip), %rsi     # 0xa5238
leaq -0x2b0(%rbp), %rdi
callq 0x9b20
jmp 0xe3e0
leaq -0x2b0(%rbp), %rdi
callq 0xf500
jmp 0xe3ee
leaq -0x2b0(%rbp), %rdi
callq 0x9530
leaq -0x2b1(%rbp), %rdi
callq 0x9960
callq 0xe5a0
movl $0x1, %edi
callq 0xd4d0
jmp 0xe457
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
jmp 0xe449
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x180(%rbp)
movl %eax, -0x184(%rbp)
leaq -0x2b0(%rbp), %rdi
callq 0x9530
leaq -0x2b1(%rbp), %rdi
callq 0x9960
jmp 0xe460
addq $0x320, %rsp            # imm = 0x320
popq %rbp
retq
movq -0x180(%rbp), %rdi
callq 0x9f50
nopl (%rax)