// File: KellerMartins[P]PDS2-Pacman/source/graphics/rendering.cpp
// Function: RenderManager::SetResolution(int, int)
void SetResolution(int width, int height){

        //Unload rts if they already been created
        if(_isInitialized){
            UnloadRenderTexture(_baseRT);
            UnloadRenderTexture(_tempRT);
            UnloadRenderTexture(_blurRT);
            UnloadRenderTexture(_vBlurRT);
        }

        _screenWidth = width<MIN_WIDTH? MIN_WIDTH : width;
        _screenHeight = height<MIN_HEIGHT? MIN_HEIGHT : height;

        SetWindowSize(_screenWidth, _screenHeight);

        _baseRT = LoadRenderTexture(_screenWidth, _screenHeight);
        _tempRT = LoadRenderTexture(_screenWidth, _screenHeight);

        _blurRT = LoadRenderTexture(_screenWidth/(_blurDownscale), _screenHeight/(_blurDownscale));
        _vBlurRT = LoadRenderTexture(_screenWidth/(_blurDownscale), _screenHeight/(_blurDownscale));

        SetShaderUniforms();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
testb $0x1, 0x20e778(%rip)    # 0x226160
je 0x17ad3
leaq -0x38(%rbp), %rdi
leaq 0x20ea9b(%rip), %rsi    # 0x226494
movl $0x2c, %edx
callq 0x96e0
movups -0x38(%rbp), %xmm0
movups -0x28(%rbp), %xmm1
movups -0x1c(%rbp), %xmm2
movq %rsp, %rax
movups %xmm2, 0x1c(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x7bdae
leaq -0x68(%rbp), %rdi
leaq 0x20ea93(%rip), %rsi    # 0x2264c0
movl $0x2c, %edx
callq 0x96e0
movups -0x68(%rbp), %xmm0
movups -0x58(%rbp), %xmm1
movups -0x4c(%rbp), %xmm2
movq %rsp, %rax
movups %xmm2, 0x1c(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x7bdae
leaq -0x98(%rbp), %rdi
leaq 0x20ea88(%rip), %rsi    # 0x2264ec
movl $0x2c, %edx
callq 0x96e0
movups -0x98(%rbp), %xmm0
movups -0x88(%rbp), %xmm1
movups -0x7c(%rbp), %xmm2
movq %rsp, %rax
movups %xmm2, 0x1c(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x7bdae
leaq -0xc8(%rbp), %rdi
leaq 0x20ea77(%rip), %rsi    # 0x226518
movl $0x2c, %edx
callq 0x96e0
movups -0xc8(%rbp), %xmm0
movups -0xb8(%rbp), %xmm1
movups -0xac(%rbp), %xmm2
movq %rsp, %rax
movups %xmm2, 0x1c(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x7bdae
cmpl $0x320, -0x4(%rbp)      # imm = 0x320
jge 0x17ae9
movl $0x320, %eax            # imm = 0x320
movl %eax, -0x17c(%rbp)
jmp 0x17af2
movl -0x4(%rbp), %eax
movl %eax, -0x17c(%rbp)
movl -0x17c(%rbp), %eax
movl %eax, 0x20e666(%rip)    # 0x226164
cmpl $0x1c2, -0x8(%rbp)      # imm = 0x1C2
jge 0x17b14
movl $0x1c2, %eax            # imm = 0x1C2
movl %eax, -0x180(%rbp)
jmp 0x17b1d
movl -0x8(%rbp), %eax
movl %eax, -0x180(%rbp)
movl -0x180(%rbp), %eax
movl %eax, 0x20e63f(%rip)    # 0x226168
movl 0x20e635(%rip), %edi    # 0x226164
movl 0x20e633(%rip), %esi    # 0x226168
callq 0x39976
movl 0x20e624(%rip), %esi    # 0x226164
movl 0x20e622(%rip), %edx    # 0x226168
leaq -0xf4(%rbp), %rdi
callq 0x7bd04
leaq 0x20e93b(%rip), %rdi    # 0x226494
leaq -0xf4(%rbp), %rsi
movl $0x2c, %edx
callq 0x96e0
movl 0x20e5f4(%rip), %esi    # 0x226164
movl 0x20e5f2(%rip), %edx    # 0x226168
leaq -0x120(%rbp), %rdi
callq 0x7bd04
leaq 0x20e937(%rip), %rdi    # 0x2264c0
leaq -0x120(%rbp), %rsi
movl $0x2c, %edx
callq 0x96e0
movl 0x20e5c4(%rip), %eax    # 0x226164
cltd
idivl 0xd0d15(%rip)           # 0xe88bc
movl %eax, %esi
movl 0x20e5b9(%rip), %eax    # 0x226168
cltd
idivl 0xd0d06(%rip)           # 0xe88bc
movl %eax, %edx
leaq -0x14c(%rbp), %rdi
callq 0x7bd04
leaq 0x20e921(%rip), %rdi    # 0x2264ec
leaq -0x14c(%rbp), %rsi
movl $0x2c, %edx
callq 0x96e0
movl 0x20e582(%rip), %eax    # 0x226164
cltd
idivl 0xd0cd3(%rip)           # 0xe88bc
movl %eax, %esi
movl 0x20e577(%rip), %eax    # 0x226168
cltd
idivl 0xd0cc4(%rip)           # 0xe88bc
movl %eax, %edx
leaq -0x178(%rbp), %rdi
callq 0x7bd04
leaq 0x20e90b(%rip), %rdi    # 0x226518
leaq -0x178(%rbp), %rsi
movl $0x2c, %edx
callq 0x96e0
callq 0x180a0
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
nopl (%rax)