// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::GLVertexPickColorBufferObject() const
unsigned int R3Mesh::
GLVertexPickColorBufferObject(void) const
{
  // Check if nothing to be done
  if (NVertices() == 0) return 0;

  // Update pick color buffer
  if (vbo_vertex_pick_color_buffer == 0) {
    glGenBuffers(1, (GLuint *) &vbo_vertex_pick_color_buffer);
    if (vbo_vertex_pick_color_buffer > 0) {
      std::vector<GLubyte> pick_colors;
      for (int i = 0; i < NVertices(); i++) {
        unsigned char pick_color[4];
        EncodePickColor(i, 255, pick_color);
        pick_colors.push_back(pick_color[0]);
        pick_colors.push_back(pick_color[1]);
        pick_colors.push_back(pick_color[2]);
        pick_colors.push_back(pick_color[3]);
      }
      glBindBuffer(GL_ARRAY_BUFFER, vbo_vertex_pick_color_buffer);
      glBufferData(GL_ARRAY_BUFFER, pick_colors.size() * sizeof(GLubyte), &pick_colors[0], GL_STATIC_DRAW);
      glBindBuffer(GL_ARRAY_BUFFER, 0);
    }
  }

  // Return pick color buffer identifier
  return vbo_vertex_pick_color_buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x0, 0x14(%rdi)
je 0x199d7
movq %rdi, %r14
leaq 0x74(%rdi), %rbx
cmpl $0x0, 0x74(%rdi)
je 0x199e8
movl (%rbx), %eax
jmp 0x199d9
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xcb599(%rip), %rax     # 0xe4f88
movl $0x1, %edi
movq %rbx, %rsi
callq *(%rax)
cmpl $0x0, (%rbx)
je 0x199d3
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpl $0x0, 0x14(%r14)
jle 0x19ada
xorl %ebp, %ebp
leaq 0xf(%rsp), %r13
leaq 0xc(%rsp), %r15
leaq 0x10(%rsp), %r12
movl %ebp, %edi
movl $0xff, %esi
movq %r15, %rdx
callq 0x70174
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x19a53
movb 0xc(%rsp), %al
movb %al, (%rsi)
incq 0x18(%rsp)
jmp 0x19a5e
movq %r12, %rdi
movq %r15, %rdx
callq 0x25916
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x19a77
movb 0xd(%rsp), %al
movb %al, (%rsi)
incq 0x18(%rsp)
jmp 0x19a84
movq %r12, %rdi
leaq 0xd(%rsp), %rdx
callq 0x25916
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x19a9d
movb 0xe(%rsp), %al
movb %al, (%rsi)
incq 0x18(%rsp)
jmp 0x19aaa
movq %r12, %rdi
leaq 0xe(%rsp), %rdx
callq 0x25916
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x19ac3
movb 0xf(%rsp), %al
movb %al, (%rsi)
incq 0x18(%rsp)
jmp 0x19ace
movq %r12, %rdi
movq %r13, %rdx
callq 0x25916
incl %ebp
cmpl 0x14(%r14), %ebp
jl 0x19a2b
movq 0xcb4c7(%rip), %r14     # 0xe4fa8
movl (%rbx), %esi
movl $0x8892, %edi           # imm = 0x8892
callq *(%r14)
movq 0xcb4ce(%rip), %rax     # 0xe4fc0
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rsi
subq %rdx, %rsi
movl $0x8892, %edi           # imm = 0x8892
movl $0x88e4, %ecx           # imm = 0x88E4
callq *(%rax)
movl $0x8892, %edi           # imm = 0x8892
xorl %esi, %esi
callq *(%r14)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x199d3
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xe450
jmp 0x199d3
jmp 0x19b37
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x19b51
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xe450
movq %rbx, %rdi
callq 0xe7e0
nop