// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::DrawVertices(gaps::RNFlags) const
void R3Mesh::
DrawVertices(const RNFlags draw_flags) const
{
  // Bind position buffer
  if (GLVertexPositionBufferObject() <= 0) return;
  glBindBuffer(GL_ARRAY_BUFFER, vbo_vertex_position_buffer);
  glVertexPointer(3, GL_FLOAT, 0, 0);
  glEnableClientState(GL_VERTEX_ARRAY);
  
  // Bind vertex normal buffer
  if (draw_flags[R3_VERTEX_NORMALS_DRAW_FLAG]) {
    if (GLVertexNormalBufferObject() > 0) {
      glBindBuffer(GL_ARRAY_BUFFER, vbo_vertex_normal_buffer);
      glNormalPointer(GL_FLOAT, 0, 0);
      glEnableClientState(GL_NORMAL_ARRAY);
    }
  }
  
  // Bind vertex texcoord buffer
  if (draw_flags & R3_VERTEX_TEXTURE_COORDS_DRAW_FLAG) {  
    if (GLVertexTextureCoordBufferObject() > 0) {
      glBindBuffer(GL_ARRAY_BUFFER, vbo_vertex_texcoord_buffer);
      glTexCoordPointer(2, GL_FLOAT, 0, 0);
      glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    }
  }
  
  // Bind vertex color buffer
  if (draw_flags[R3_VERTEX_PICK_DRAW_FLAG]) {
    if (GLVertexPickColorBufferObject() > 0) {
      glBindBuffer(GL_ARRAY_BUFFER, vbo_vertex_pick_color_buffer);
      glColorPointer(4, GL_UNSIGNED_BYTE, 0, 0);
      glEnableClientState(GL_COLOR_ARRAY);
    }
  }
  else if (draw_flags[R3_VERTEX_COLORS_DRAW_FLAG]) {
    if (GLVertexRgbColorBufferObject() > 0) {
      glBindBuffer(GL_ARRAY_BUFFER, vbo_vertex_rgb_color_buffer);
      glColorPointer(4, GL_UNSIGNED_BYTE, 0, 0);
      glEnableClientState(GL_COLOR_ARRAY);
    }
  }
  
  // Draw vertices
  glDrawArrays(GL_POINTS, 0, NVertices());

  // Reset everything
  glBindBuffer(GL_ARRAY_BUFFER, 0);
  glDisableClientState(GL_VERTEX_ARRAY);
  glDisableClientState(GL_NORMAL_ARRAY);
  glDisableClientState(GL_TEXTURE_COORD_ARRAY);
  glDisableClientState(GL_COLOR_ARRAY);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x268(%rax)
testl %eax, %eax
je 0x181c5
movq 0xc1eab(%rip), %r15     # 0xd9fb0
movl 0x64(%rbx), %esi
movl $0x8892, %edi           # imm = 0x8892
callq *(%r15)
pushq $0x3
popq %rdi
movl $0x1406, %esi           # imm = 0x1406
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe490
movl $0x8074, %edi           # imm = 0x8074
callq 0xe2d0
btl $0x8, %r14d
jae 0x18165
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x270(%rax)
testl %eax, %eax
je 0x18165
movl 0x68(%rbx), %esi
movl $0x8892, %edi           # imm = 0x8892
callq *(%r15)
movl $0x1406, %edi           # imm = 0x1406
xorl %esi, %esi
xorl %edx, %edx
callq 0xe7f0
movl $0x8075, %edi           # imm = 0x8075
callq 0xe2d0
btl $0x9, %r14d
jae 0x181a2
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x278(%rax)
testl %eax, %eax
je 0x181a2
movl 0x6c(%rbx), %esi
movl $0x8892, %edi           # imm = 0x8892
callq *(%r15)
pushq $0x2
popq %rdi
movl $0x1406, %esi           # imm = 0x1406
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe910
movl $0x8078, %edi           # imm = 0x8078
callq 0xe2d0
btl $0xb, %r14d
jb 0x181cb
btl $0xa, %r14d
jae 0x18201
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x280(%rax)
testl %eax, %eax
je 0x18201
movl 0x70(%rbx), %esi
jmp 0x181de
popq %rbx
popq %r14
popq %r15
retq
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x288(%rax)
testl %eax, %eax
je 0x18201
movl 0x74(%rbx), %esi
movl $0x8892, %edi           # imm = 0x8892
callq *(%r15)
pushq $0x4
popq %rdi
movl $0x1401, %esi           # imm = 0x1401
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe470
movl $0x8076, %edi           # imm = 0x8076
callq 0xe2d0
movl 0x14(%rbx), %edx
xorl %edi, %edi
xorl %esi, %esi
callq 0xe060
movl $0x8892, %edi           # imm = 0x8892
xorl %esi, %esi
callq *(%r15)
movl $0x8074, %edi           # imm = 0x8074
callq 0xe2b0
movl $0x8075, %edi           # imm = 0x8075
callq 0xe2b0
movl $0x8078, %edi           # imm = 0x8078
callq 0xe2b0
movl $0x8076, %edi           # imm = 0x8076
popq %rbx
popq %r14
popq %r15
jmp 0xe2b0