// File: /workspace/github_cpp_makefile_star2_O1/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 0x8e7b8(%rip), %rsi     # 0x9914b
leaq 0x8e7c5(%rip), %rdx     # 0x9915f
leaq -0x50(%rbp), %r13
movq %r13, %rdi
callq 0xa78c
movl %r12d, %edi
movl %r15d, %esi
movl %r14d, %edx
movq %r13, %rcx
callq 0xebe4
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xa9d0
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x8880
movl %ebx, %edi
callq 0xf1d1
movsd 0x8e8e1(%rip), %xmm0    # 0x992c0
movss 0x8e909(%rip), %xmm1    # 0x992f0
callq 0xf85a
leaq -0x60(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x8e96d(%rip), %rsi     # 0x99368
leaq 0x8e97b(%rip), %rdx     # 0x9937d
leaq -0x70(%rbp), %rbx
movq %rbx, %rdi
callq 0xa78c
movq %rbx, %rdi
callq 0xbb6e
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xaa2b
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x8880
movl $0x380, %edi            # imm = 0x380
callq 0x8850
movq %rax, %r14
callq 0xc62a
movaps %xmm0, -0x80(%rbp)
callq 0xc62a
cvttss2si -0x80(%rbp), %esi
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvttss2si %xmm0, %edx
movq %r14, %rdi
callq 0xd118
movq %r14, 0xcf3d6(%rip)     # 0xd9e38
leaq -0x30(%rbp), %rsi
xorl %edi, %edi
callq 0xc63e
testb %al, %al
je 0xaa98
movl $0x2f8, %edi            # imm = 0x2F8
callq 0x8850
cvttss2si -0x30(%rbp), %esi
movq %rax, %r14
cvttss2si -0x2c(%rbp), %edx
movq %rax, %rdi
callq 0x112f8
movq %r14, %rdi
callq 0xa10a
leaq -0x30(%rbp), %rsi
movl $0x1, %edi
callq 0xc63e
testb %al, %al
je 0xaad1
movl $0x2f8, %edi            # imm = 0x2F8
callq 0x8850
cvttss2si -0x30(%rbp), %esi
movq %rax, %r14
cvttss2si -0x2c(%rbp), %edx
movq %rax, %rdi
callq 0x11618
movq %r14, %rdi
callq 0xa10a
leaq -0x30(%rbp), %rsi
movl $0x2, %edi
callq 0xc63e
testb %al, %al
je 0xab0a
movl $0x2f8, %edi            # imm = 0x2F8
callq 0x8850
cvttss2si -0x30(%rbp), %esi
movq %rax, %r14
cvttss2si -0x2c(%rbp), %edx
movq %rax, %rdi
callq 0x114f0
movq %r14, %rdi
callq 0xa10a
leaq -0x30(%rbp), %rsi
movl $0x3, %edi
callq 0xc63e
testb %al, %al
je 0xab43
movl $0x2f8, %edi            # imm = 0x2F8
callq 0x8850
cvttss2si -0x30(%rbp), %esi
movq %rax, %r14
cvttss2si -0x2c(%rbp), %edx
movq %rax, %rdi
callq 0x113d8
movq %r14, %rdi
callq 0xa10a
movq $0x0, 0xcf2f2(%rip) # 0xd9e40
callq 0xac5b
leaq 0x193(%rip), %rax       # 0xaced
movq %rax, 0xcf2f7(%rip)     # 0xd9e58
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xab76
jmp 0xab76
jmp 0xab76
movq %rax, %rbx
movl $0x2f8, %esi            # imm = 0x2F8
jmp 0xabb5
jmp 0xabad
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0xabbd
movq -0x60(%rbp), %rsi
jmp 0xaba8
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xabbd
movq -0x40(%rbp), %rsi
incq %rsi
jmp 0xabb8
movq %rax, %rbx
movl $0x380, %esi            # imm = 0x380
movq %r14, %rdi
callq 0x8880
movq %rbx, %rdi
callq 0x8ea0