// File: /workspace/github_cpp_makefile_star2_O3/KellerMartins[P]PDS2-Pacman/source/game/game.cpp
// Function: Game::Init(int, int, bool, RenderManager::BlurQuality)
void Init(int screenWidth, int screenHeight, bool fullscreen, RenderManager::BlurQuality quality){
        RenderManager::Init(screenWidth, screenHeight, fullscreen, "Pacman Remake - PDS2");
        RenderManager::SetBloomQuality(quality);
        RenderManager::SetCameraOffset((Vector3){0.0f, 18.5237f, 7.3416f});

        Mapa::CarregaArquivo("assets/maps/mapa1.txt");

        pacman = new Pacman(Mapa::GetPlayerSpawn().x,Mapa::GetPlayerSpawn().y);

        Vector2 enemyPos;
        if(Mapa::GetEnemySpawn(0, enemyPos))
            Enemy::AdicionaInimigo(new Blinky(enemyPos.x,enemyPos.y));

        if(Mapa::GetEnemySpawn(1, enemyPos))
            Enemy::AdicionaInimigo(new Pinky(enemyPos.x,enemyPos.y));

        if(Mapa::GetEnemySpawn(2, enemyPos))
            Enemy::AdicionaInimigo(new Inky(enemyPos.x,enemyPos.y));

        if(Mapa::GetEnemySpawn(3, enemyPos))
            Enemy::AdicionaInimigo(new Clyde(enemyPos.x,enemyPos.y));

        SetState(Menu);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, %ebx
movl %edx, %r14d
movl %esi, %r15d
movl %edi, %r12d
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x8e7e4(%rip), %rsi     # 0x9914b
leaq 0x8e7f1(%rip), %rdx     # 0x9915f
leaq -0x50(%rbp), %r13
movq %r13, %rdi
callq 0xa75c
movl %r12d, %edi
movl %r15d, %esi
movl %r14d, %edx
movq %r13, %rcx
callq 0xec8c
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xa9a4
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x8880
movl %ebx, %edi
callq 0xf279
movsd 0x8e90d(%rip), %xmm0    # 0x992c0
movss 0x8e935(%rip), %xmm1    # 0x992f0
callq 0xf902
leaq -0x60(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x8e999(%rip), %rsi     # 0x99368
leaq 0x8e9a7(%rip), %rdx     # 0x9937d
leaq -0x70(%rbp), %rbx
movq %rbx, %rdi
callq 0xa75c
movq %rbx, %rdi
callq 0xbb46
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xa9ff
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x8880
movl $0x380, %edi            # imm = 0x380
callq 0x8850
movq %rax, %r14
callq 0xc6f6
movaps %xmm0, -0x80(%rbp)
callq 0xc6f6
cvttss2si -0x80(%rbp), %esi
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvttss2si %xmm0, %edx
movq %r14, %rdi
callq 0xd1c4
movq %r14, 0xcf402(%rip)     # 0xd9e38
leaq -0x30(%rbp), %rsi
xorl %edi, %edi
callq 0xc70a
testb %al, %al
je 0xaa6c
movl $0x2f8, %edi            # imm = 0x2F8
callq 0x8850
cvttss2si -0x30(%rbp), %esi
movq %rax, %r14
cvttss2si -0x2c(%rbp), %edx
movq %rax, %rdi
callq 0x1137c
movq %r14, %rdi
callq 0xa0f6
leaq -0x30(%rbp), %rsi
movl $0x1, %edi
callq 0xc70a
testb %al, %al
je 0xaaa5
movl $0x2f8, %edi            # imm = 0x2F8
callq 0x8850
cvttss2si -0x30(%rbp), %esi
movq %rax, %r14
cvttss2si -0x2c(%rbp), %edx
movq %rax, %rdi
callq 0x1169c
movq %r14, %rdi
callq 0xa0f6
leaq -0x30(%rbp), %rsi
movl $0x2, %edi
callq 0xc70a
testb %al, %al
je 0xaade
movl $0x2f8, %edi            # imm = 0x2F8
callq 0x8850
cvttss2si -0x30(%rbp), %esi
movq %rax, %r14
cvttss2si -0x2c(%rbp), %edx
movq %rax, %rdi
callq 0x11574
movq %r14, %rdi
callq 0xa0f6
leaq -0x30(%rbp), %rsi
movl $0x3, %edi
callq 0xc70a
testb %al, %al
je 0xab17
movl $0x2f8, %edi            # imm = 0x2F8
callq 0x8850
cvttss2si -0x30(%rbp), %esi
movq %rax, %r14
cvttss2si -0x2c(%rbp), %edx
movq %rax, %rdi
callq 0x1145c
movq %r14, %rdi
callq 0xa0f6
movq $0x0, 0xcf31e(%rip) # 0xd9e40
callq 0xac2f
leaq 0x193(%rip), %rax       # 0xacc1
movq %rax, 0xcf323(%rip)     # 0xd9e58
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xab4a
jmp 0xab4a
jmp 0xab4a
movq %rax, %rbx
movl $0x2f8, %esi            # imm = 0x2F8
jmp 0xab89
jmp 0xab81
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xab91
movq -0x60(%rbp), %rsi
jmp 0xab7c
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xab91
movq -0x40(%rbp), %rsi
incq %rsi
jmp 0xab8c
movq %rax, %rbx
movl $0x380, %esi            # imm = 0x380
movq %r14, %rdi
callq 0x8880
movq %rbx, %rdi
callq 0x8ea0