// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]plasma/src/cube_plasma.c
// Function: DrawFrame
void DrawFrame(double elapsedTimeSecs) {
    float camX = 0.0f;
    float camY = 0.0f;
    float camZ = 1.5f + Min(sinf(elapsedTimeSecs * PI / 4.0) +
                                cosf(elapsedTimeSecs * 0.5f * PI / 4.0) +
                                sinf(elapsedTimeSecs * 0.2f * PI / 6.0),
                            0.5);

    Mat4LookAt((Vec3){camX, camY, camZ}, (Vec3){0.0f, 0.0f, 0.0f},
               (Vec3){0.0f, 1.0f, 0.0f}, gView);

    Mat4 identity = MAT4_IDENTITY_INIT;
    Mat4 transform = MAT4_IDENTITY_INIT;
    float t = elapsedTimeSecs * 0.5;
    Mat4RotateZ(identity, transform, sinf(t * PI / 2.0) + sinf(t * PI / 6.0));

    Mat4 out;
    Mat4RotateX(transform, out, cosf(t * PI / 2.0));

    Mat4 outA;
    Mat4RotateY(out, outA, sinf(t * PI / 4.0) + cosf(t * PI / 2.0));

    glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

    glUseProgram(gProgramId);

    glUniformMatrix4fv(gUniformModelLocation, 1, GL_FALSE, outA);
    glUniformMatrix4fv(gUniformViewLocation, 1, GL_FALSE, gView);
    glUniformMatrix4fv(gUniformProjectionLocation, 1, GL_FALSE, gProj);
    glUniform3f(gUniformViewPositionLocation, camX, camY, camZ);
    glUniform1f(gUniformScaleLocation, 20.0f);
    glUniform1f(gUniformTimeLocation, elapsedTimeSecs);

    glDrawArrays(GL_TRIANGLES, 0, 36);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movsd %xmm0, -0x8(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0xc(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x10(%rbp)
movsd 0x20a8(%rip), %xmm0     # 0x5040
mulsd -0x8(%rbp), %xmm0
movsd 0x20a3(%rip), %xmm1     # 0x5048
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x2030
movss %xmm0, -0x198(%rbp)
movsd 0x2096(%rip), %xmm0     # 0x5058
mulsd -0x8(%rbp), %xmm0
movsd 0x2071(%rip), %xmm1     # 0x5040
mulsd %xmm1, %xmm0
movsd 0x206d(%rip), %xmm1     # 0x5048
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x21b0
movaps %xmm0, %xmm1
movss -0x198(%rbp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x194(%rbp)
movsd 0x2061(%rip), %xmm0     # 0x5068
mulsd -0x8(%rbp), %xmm0
movsd 0x202c(%rip), %xmm1     # 0x5040
mulsd %xmm1, %xmm0
movsd 0x2030(%rip), %xmm1     # 0x5050
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x2030
movaps %xmm0, %xmm1
movss -0x194(%rbp), %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x2010(%rip), %xmm1     # 0x5058
callq 0x23f0
movaps %xmm0, %xmm1
movsd 0x2008(%rip), %xmm0     # 0x5060
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x20(%rbp)
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x1c(%rbp)
movss -0x14(%rbp), %xmm0
movss %xmm0, -0x18(%rbp)
leaq -0x20(%rbp), %rdi
xorps %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x28(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
leaq -0x2c(%rbp), %rsi
xorps %xmm0, %xmm0
movss %xmm0, -0x38(%rbp)
movss 0x1fc9(%rip), %xmm0     # 0x507c
movss %xmm0, -0x34(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
leaq -0x38(%rbp), %rdx
leaq 0x40e5(%rip), %rcx      # 0x71b0
callq 0x3420
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x20e0
movss 0x1f94(%rip), %xmm0     # 0x507c
movss %xmm0, -0x80(%rbp)
movss 0x1f87(%rip), %xmm0     # 0x507c
movss %xmm0, -0x6c(%rbp)
movss 0x1f7a(%rip), %xmm0     # 0x507c
movss %xmm0, -0x58(%rbp)
movss 0x1f6d(%rip), %xmm0     # 0x507c
movss %xmm0, -0x44(%rbp)
leaq -0xc0(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x20e0
movss 0x1f4d(%rip), %xmm0     # 0x507c
movss %xmm0, -0xc0(%rbp)
movss 0x1f3d(%rip), %xmm0     # 0x507c
movss %xmm0, -0xac(%rbp)
movss 0x1f2d(%rip), %xmm0     # 0x507c
movss %xmm0, -0x98(%rbp)
movss 0x1f1d(%rip), %xmm0     # 0x507c
movss %xmm0, -0x84(%rbp)
movsd 0x1ee9(%rip), %xmm0     # 0x5058
mulsd -0x8(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xc4(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x190(%rbp)
leaq -0xc0(%rbp), %rax
movq %rax, -0x188(%rbp)
movss -0xc4(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x1e93(%rip), %xmm1     # 0x5040
mulsd %xmm1, %xmm0
movsd 0x1e7f(%rip), %xmm1     # 0x5038
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x2030
movss %xmm0, -0x17c(%rbp)
movss -0xc4(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x1e5e(%rip), %xmm1     # 0x5040
mulsd %xmm1, %xmm0
movsd 0x1e62(%rip), %xmm1     # 0x5050
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x2030
movq -0x190(%rbp), %rdi
movq -0x188(%rbp), %rsi
movaps %xmm0, %xmm1
movss -0x17c(%rbp), %xmm0
addss %xmm1, %xmm0
callq 0x35b0
leaq -0xc0(%rbp), %rax
movq %rax, -0x178(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x170(%rbp)
movss -0xc4(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x1df3(%rip), %xmm1     # 0x5040
mulsd %xmm1, %xmm0
movsd 0x1ddf(%rip), %xmm1     # 0x5038
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x21b0
movq -0x178(%rbp), %rdi
movq -0x170(%rbp), %rsi
callq 0x3680
leaq -0x110(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0x150(%rbp), %rax
movq %rax, -0x160(%rbp)
movss -0xc4(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x1d97(%rip), %xmm1     # 0x5040
mulsd %xmm1, %xmm0
movsd 0x1d93(%rip), %xmm1     # 0x5048
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x2030
movss %xmm0, -0x154(%rbp)
movss -0xc4(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x1d62(%rip), %xmm1     # 0x5040
mulsd %xmm1, %xmm0
movsd 0x1d4e(%rip), %xmm1     # 0x5038
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x21b0
movq -0x168(%rbp), %rdi
movq -0x160(%rbp), %rsi
movaps %xmm0, %xmm1
movss -0x154(%rbp), %xmm0
addss %xmm1, %xmm0
callq 0x3750
xorps %xmm2, %xmm2
movss 0x1d58(%rip), %xmm3     # 0x507c
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x2070
movl $0x4100, %edi           # imm = 0x4100
callq 0x2190
movq 0x3cb0(%rip), %rax      # 0x6ff0
movq (%rax), %rax
movl 0x3ed7(%rip), %edi      # 0x7220
callq *%rax
movq 0x3bce(%rip), %rax      # 0x6f20
movq (%rax), %rax
movl 0x3e3d(%rip), %edi      # 0x7198
leaq -0x150(%rbp), %rcx
movl $0x1, %esi
xorl %edx, %edx
callq *%rax
movq 0x3bae(%rip), %rax      # 0x6f20
movq (%rax), %rax
movl 0x3e21(%rip), %edi      # 0x719c
movl $0x1, %esi
xorl %edx, %edx
leaq 0x3e27(%rip), %rcx      # 0x71b0
callq *%rax
movq 0x3b8e(%rip), %rax      # 0x6f20
movq (%rax), %rax
movl 0x3e05(%rip), %edi      # 0x71a0
movl $0x1, %esi
xorl %edx, %edx
leaq 0x3e87(%rip), %rcx      # 0x7230
callq *%rax
movq 0x3bd6(%rip), %rax      # 0x6f88
movq (%rax), %rax
movl 0x3de9(%rip), %edi      # 0x71a4
movss -0xc(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
movss -0x14(%rbp), %xmm2
callq *%rax
movq 0x3ba5(%rip), %rax      # 0x6f78
movq (%rax), %rax
movl 0x3db8(%rip), %edi      # 0x7194
movss 0x1cac(%rip), %xmm0     # 0x5090
callq *%rax
movq 0x3b8b(%rip), %rax      # 0x6f78
movq (%rax), %rax
movl 0x3d9a(%rip), %edi      # 0x7190
movsd -0x8(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
callq *%rax
movl $0x4, %edi
xorl %esi, %esi
movl $0x24, %edx
callq 0x2270
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nopl (%rax,%rax)