// File: /workspace/github_cpp_makefile_star2_O2/KellerMartins[P]PDS2-Pacman/source/graphics/rendering.cpp
// Function: RenderManager::RenderBloom()
void RenderBloom(){
        //Render vertical pass
        BeginTextureMode(_vBlurRT);
            BeginShaderMode(_blurPass);

                Vector4 pixelSize4 = {0, (1.0f/_blurRT.texture.height)/2.0f, 0, 1.0f/_blurRT.texture.height};
                SetShaderValue(_blurPass, _blurPassPixelSizeLoc, (const float*) &pixelSize4, 4);
                SetShaderValuei(_blurPass, _blurPassBlurQualityLoc, (const int*) &_blurQuality, 1);

                Rectangle src = (Rectangle){ 0, 0, (float)_blurRT.texture.width, (float)-_blurRT.texture.height };
                Rectangle dest = (Rectangle){ 0, 0, (float)_vBlurRT.texture.width, (float)_vBlurRT.texture.height };
                DrawTexturePro(_blurRT.texture, src, dest, (Vector2){ 0, 0 }, 0,  WHITE);

            EndShaderMode();
        EndTextureMode();

        //Render horizontal pass
        BeginTextureMode(_blurRT);
            BeginShaderMode(_blurPass);

                pixelSize4 = (Vector4){(1.0f/_vBlurRT.texture.width)/2.0f, 0, 1.0f/_vBlurRT.texture.width,0};
                SetShaderValue(_blurPass, _blurPassPixelSizeLoc, (const float*) &pixelSize4, 4);
                SetShaderValuei(_blurPass, _blurPassBlurQualityLoc, (const int*) &_blurQuality, 1);

                src = (Rectangle){ 0, 0, (float)_vBlurRT.texture.width, (float)-_vBlurRT.texture.height };
                dest = (Rectangle){ 0, 0, (float)_blurRT.texture.width, (float)_blurRT.texture.height };
                DrawTexturePro(_vBlurRT.texture, src, dest, (Vector2){ 0, 0 }, 0,  WHITE);
            EndShaderMode();
        EndTextureMode();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movups 0x2051ba(%rip), %xmm0   # 0x21451c
movups %xmm0, 0x1c(%rsp)
movups 0x2051a2(%rip), %xmm0   # 0x214510
movups %xmm0, 0x10(%rsp)
movups 0x205186(%rip), %xmm0   # 0x214500
movups %xmm0, (%rsp)
callq 0x2d84e
leaq 0x204dae(%rip), %rbx    # 0x214138
movl $0x84, %ecx
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsb (%rsi), %es:(%rdi)
callq 0x2185b
leaq -0x70(%rbp), %r14
andl $0x0, (%r14)
cvtsi2ssl 0x205130(%rip), %xmm0 # 0x2144dc
movss 0x88d80(%rip), %xmm1    # 0x98134
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
mulss 0x88f01(%rip), %xmm0    # 0x982c4
movss %xmm0, 0x4(%r14)
andl $0x0, 0x8(%r14)
movss %xmm1, 0xc(%r14)
movl 0x20508a(%rip), %eax    # 0x214464
movl $0x84, %ecx
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsb (%rsi), %es:(%rdi)
pushq $0x4
popq %rdx
movl %eax, %edi
movq %r14, %rsi
callq 0x2195f
movl 0x20506e(%rip), %eax    # 0x214468
movl $0x84, %ecx
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsb (%rsi), %es:(%rdi)
leaq 0x204d22(%rip), %r13    # 0x214130
pushq $0x1
popq %r15
movl %eax, %edi
movq %r13, %rsi
movl %r15d, %edx
callq 0x21a22
cvtsi2ssl 0x2050b1(%rip), %xmm1 # 0x2144d8
xorl %eax, %eax
subl 0x2050ad(%rip), %eax    # 0x2144dc
xorl %r12d, %r12d
cvtsi2ss %eax, %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtsi2ssl 0x2050c7(%rip), %xmm3 # 0x214508
cvtsi2ssl 0x2050c3(%rip), %xmm0 # 0x21450c
unpcklps %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
movups 0x205081(%rip), %xmm0   # 0x2144d4
movaps %xmm0, -0x60(%rbp)
movl 0x205087(%rip), %eax    # 0x2144e4
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
movl %eax, 0x10(%rsp)
movaps -0x60(%rbp), %xmm0
movups %xmm0, (%rsp)
pushq $-0x1
popq %rdi
xorps %xmm0, %xmm0
xorps %xmm2, %xmm2
xorps %xmm4, %xmm4
xorps %xmm5, %xmm5
callq 0x7693b
callq 0x2189e
callq 0x2d8ce
movups 0x205058(%rip), %xmm0   # 0x2144ec
movups %xmm0, 0x1c(%rsp)
movups 0x205040(%rip), %xmm0   # 0x2144e0
movups %xmm0, 0x10(%rsp)
movups 0x205024(%rip), %xmm0   # 0x2144d0
movups %xmm0, (%rsp)
callq 0x2d84e
movl $0x84, %ecx
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsb (%rsi), %es:(%rdi)
callq 0x2185b
cvtsi2ssl 0x205039(%rip), %xmm0 # 0x214508
movss 0x88c5d(%rip), %xmm1    # 0x98134
divss %xmm0, %xmm1
movss 0x88de1(%rip), %xmm0    # 0x982c4
mulss %xmm1, %xmm0
movss %xmm0, (%r14)
andl $0x0, 0x4(%r14)
movss %xmm1, 0x8(%r14)
andl $0x0, 0xc(%r14)
movl 0x204f62(%rip), %eax    # 0x214464
movl $0x84, %ecx
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsb (%rsi), %es:(%rdi)
movl %eax, %edi
movq %r14, %rsi
pushq $0x4
popq %rdx
callq 0x2195f
movl 0x204f46(%rip), %eax    # 0x214468
movl $0x84, %ecx
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsb (%rsi), %es:(%rdi)
movl %eax, %edi
movq %r13, %rsi
movl %r15d, %edx
callq 0x21a22
cvtsi2ssl 0x204fc4(%rip), %xmm1 # 0x214508
subl 0x204fc1(%rip), %r12d   # 0x21450c
cvtsi2ss %r12d, %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtsi2ssl 0x204f7d(%rip), %xmm3 # 0x2144d8
cvtsi2ssl 0x204f79(%rip), %xmm0 # 0x2144dc
unpcklps %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
movups 0x204f97(%rip), %xmm0   # 0x214504
movaps %xmm0, -0x40(%rbp)
movl 0x204f9d(%rip), %eax    # 0x214514
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, 0x10(%rsp)
movaps -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
xorps %xmm0, %xmm0
xorps %xmm2, %xmm2
xorps %xmm4, %xmm4
xorps %xmm5, %xmm5
pushq $-0x1
popq %rdi
callq 0x7693b
callq 0x2189e
callq 0x2d8ce
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq