#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ quad_vert;
typedef int /*<<< orphan*/ GLuint;
typedef float GLfloat;

/* Variables and functions */
int /*<<< orphan*/ glad_glBindBuffer(int, int /*<<< orphan*/);
int /*<<< orphan*/ glad_glBindVertexArray(int /*<<< orphan*/);
int /*<<< orphan*/ glad_glBufferData(int, int, float **, int);
int /*<<< orphan*/ glad_glDeleteBuffers(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ glad_glDeleteVertexArrays(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ glad_glDrawArrays(int, int /*<<< orphan*/, int);
int /*<<< orphan*/ glad_glEnableVertexAttribArray(int /*<<< orphan*/);
int /*<<< orphan*/ glad_glGenBuffers(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ glad_glGenVertexArrays(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ glad_glVertexAttribPointer(int /*<<< orphan*/, int, int,
                                              int /*<<< orphan*/, int,
                                              int /*<<< orphan*/);
void render_quad() {
  GLfloat quad_vert[] = {-1.0f, 1.0f, 0.0f, -1.0f, -1.0f, 0.0f,
                         1.0f,  1.0f, 0.0f, 1.0f,  -1.0f, 0.0f};
  GLuint quad_vbo;
  glad_glGenBuffers(1, &quad_vbo);
  glad_glBindBuffer(0x8892, quad_vbo);
  glad_glBufferData(0x8892, sizeof(quad_vert), &quad_vert, 0x88E4);
  GLuint quad_vao;
  glad_glGenVertexArrays(1, &quad_vao);
  glad_glBindVertexArray(quad_vao);
  glad_glVertexAttribPointer(0, 3, 0x1406, 0, 3 * sizeof(GLfloat), 0);
  glad_glEnableVertexAttribArray(0);
  glad_glDrawArrays(0x0005, 0, 4);
  glad_glBindBuffer(0x8892, 0);
  glad_glBindVertexArray(0);
  glad_glDeleteBuffers(1, &quad_vbo);
  glad_glDeleteVertexArrays(1, &quad_vao);
}


x86 assembly (clang, -O0):
<render_quad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rdi
lea    0xe3d(%rip),%rsi
mov    $0x30,%edx
call   1090 <memcpy@plt>
mov    $0x1,%edi
lea    -0x34(%rbp),%rsi
call   10c0 <glad_glGenBuffers@plt>
mov    -0x34(%rbp),%esi
mov    $0x8892,%edi
call   1070 <glad_glBindBuffer@plt>
lea    -0x30(%rbp),%rdx
mov    $0x8892,%edi
mov    $0x30,%esi
mov    $0x88e4,%ecx
call   1060 <glad_glBufferData@plt>
mov    $0x1,%edi
lea    -0x38(%rbp),%rsi
call   1030 <glad_glGenVertexArrays@plt>
mov    -0x38(%rbp),%edi
call   1040 <glad_glBindVertexArray@plt>
xor    %r9d,%r9d
mov    $0x3,%esi
mov    $0x1406,%edx
mov    $0xc,%r8d
mov    %r9d,%edi
mov    %r9d,%ecx
call   10a0 <glad_glVertexAttribPointer@plt>
xor    %edi,%edi
call   1080 <glad_glEnableVertexAttribArray@plt>
mov    $0x5,%edi
xor    %esi,%esi
mov    $0x4,%edx
call   10d0 <glad_glDrawArrays@plt>
mov    $0x8892,%edi
xor    %esi,%esi
call   1070 <glad_glBindBuffer@plt>
xor    %edi,%edi
call   1040 <glad_glBindVertexArray@plt>
mov    $0x1,%edi
lea    -0x34(%rbp),%rsi
call   1050 <glad_glDeleteBuffers@plt>
mov    $0x1,%edi
lea    -0x38(%rbp),%rsi
call   10b0 <glad_glDeleteVertexArrays@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<render_quad>:
push   %r14
push   %rbx
sub    $0x48,%rsp
movaps 0xe72(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe56(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe3a(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xc(%rsp),%r14
mov    $0x1,%edi
mov    %r14,%rsi
call   10b0 <glad_glGenBuffers@plt>
mov    0xc(%rsp),%esi
mov    $0x8892,%edi
call   1070 <glad_glBindBuffer@plt>
lea    0x10(%rsp),%rdx
mov    $0x8892,%edi
mov    $0x30,%esi
mov    $0x88e4,%ecx
call   1060 <glad_glBufferData@plt>
lea    0x8(%rsp),%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
call   1030 <glad_glGenVertexArrays@plt>
mov    0x8(%rsp),%edi
call   1040 <glad_glBindVertexArray@plt>
xor    %edi,%edi
mov    $0x3,%esi
mov    $0x1406,%edx
xor    %ecx,%ecx
mov    $0xc,%r8d
xor    %r9d,%r9d
call   1090 <glad_glVertexAttribPointer@plt>
xor    %edi,%edi
call   1080 <glad_glEnableVertexAttribArray@plt>
mov    $0x5,%edi
xor    %esi,%esi
mov    $0x4,%edx
call   10c0 <glad_glDrawArrays@plt>
mov    $0x8892,%edi
xor    %esi,%esi
call   1070 <glad_glBindBuffer@plt>
xor    %edi,%edi
call   1040 <glad_glBindVertexArray@plt>
mov    $0x1,%edi
mov    %r14,%rsi
call   1050 <glad_glDeleteBuffers@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
call   10a0 <glad_glDeleteVertexArrays@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.render_quad.quad_vert = [12 x float] [float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00]
define void @render_quad() {
%1 = alloca [12 x float]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [12 x float]* %1 to i8*
%5 = call i32 @glad_glGenBuffers(i32 1, i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @glad_glBindBuffer(i32 34962, i32 %6)
%8 = bitcast [12 x float]* %1 to float**
%9 = call i32 @glad_glBufferData(i32 34962, i32 48, float** %8, i32 35044)
%10 = call i32 @glad_glGenVertexArrays(i32 1, i32* %3)
%11 = load i32, i32* %3
%12 = call i32 @glad_glBindVertexArray(i32 %11)
%13 = call i32 @glad_glVertexAttribPointer(i32 0, i32 3, i32 5126, i32 0, i32 12, i32 0)
%14 = call i32 @glad_glEnableVertexAttribArray(i32 0)
%15 = call i32 @glad_glDrawArrays(i32 5, i32 0, i32 4)
%16 = call i32 @glad_glBindBuffer(i32 34962, i32 0)
%17 = call i32 @glad_glBindVertexArray(i32 0)
%18 = call i32 @glad_glDeleteBuffers(i32 1, i32* %2)
%19 = call i32 @glad_glDeleteVertexArrays(i32 1, i32* %3)
ret void
}

LLVM IR (-O2):
@__const.render_quad.quad_vert = [12 x float] [float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00]
define void @render_quad() {
%1 = alloca [12 x float]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [12 x float]* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = call i32 @glad_glGenBuffers(i32 1, i32* %2)
%7 = load i32, i32* %2
%8 = call i32 @glad_glBindBuffer(i32 34962, i32 %7)
%9 = bitcast [12 x float]* %1 to float**
%10 = call i32 @glad_glBufferData(i32 34962, i32 48, float** %9, i32 35044)
%11 = bitcast i32* %3 to i8*
%12 = call i32 @glad_glGenVertexArrays(i32 1, i32* %3)
%13 = load i32, i32* %3
%14 = call i32 @glad_glBindVertexArray(i32 %13)
%15 = call i32 @glad_glVertexAttribPointer(i32 0, i32 3, i32 5126, i32 0, i32 12, i32 0)
%16 = call i32 @glad_glEnableVertexAttribArray(i32 0)
%17 = call i32 @glad_glDrawArrays(i32 5, i32 0, i32 4)
%18 = call i32 @glad_glBindBuffer(i32 34962, i32 0)
%19 = call i32 @glad_glBindVertexArray(i32 0)
%20 = call i32 @glad_glDeleteBuffers(i32 1, i32* %2)
%21 = call i32 @glad_glDeleteVertexArrays(i32 1, i32* %3)
ret void
}