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

  // Update pick color buffer
  if (vbo_face_pick_color_buffer == 0) {
    glGenBuffers(1, (GLuint *) &vbo_face_pick_color_buffer);
    if (vbo_face_pick_color_buffer > 0) {
      std::vector<GLubyte> pick_colors;
      for (int i = 0; i < NFaces(); i++) {
        for (int j = 0; j < 3; j++){
          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_face_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_face_pick_color_buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
xorl %eax, %eax
cmpl $0x0, 0x34(%rdi)
je 0x1926d
movq %rdi, %rbx
movl 0x60(%rdi), %eax
testl %eax, %eax
jne 0x1926d
leaq 0x60(%rbx), %r14
movq 0xcbea1(%rip), %rax     # 0xe4f88
movl $0x1, %edi
movq %r14, %rsi
callq *(%rax)
movl (%r14), %esi
movl $0x0, %eax
testl %esi, %esi
je 0x1926d
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpl $0x0, 0x34(%rbx)
jle 0x1921c
movq %rbx, 0x30(%rsp)
movq %r14, 0x28(%rsp)
leaq 0xe(%rsp), %r12
xorl %ebp, %ebp
leaq 0xf(%rsp), %r13
leaq 0xc(%rsp), %rbx
leaq 0x10(%rsp), %r14
movl $0x3, %r15d
movl %ebp, %edi
movl $0xff, %esi
movq %rbx, %rdx
callq 0x6f394
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x19172
movb 0xc(%rsp), %al
movb %al, (%rsi)
movq 0x18(%rsp), %rsi
incq %rsi
movq %rsi, 0x18(%rsp)
jmp 0x19182
movq %r14, %rdi
movq %rbx, %rdx
callq 0x25758
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x1919e
movb 0xd(%rsp), %al
movb %al, (%rsi)
movq 0x18(%rsp), %rsi
incq %rsi
movq %rsi, 0x18(%rsp)
jmp 0x191b0
movq %r14, %rdi
leaq 0xd(%rsp), %rdx
callq 0x25758
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x191cc
movb 0xe(%rsp), %al
movb %al, (%rsi)
movq 0x18(%rsp), %rsi
incq %rsi
movq %rsi, 0x18(%rsp)
jmp 0x191dc
movq %r14, %rdi
movq %r12, %rdx
callq 0x25758
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x191f0
movb 0xf(%rsp), %al
movb %al, (%rsi)
incq 0x18(%rsp)
jmp 0x191fb
movq %r14, %rdi
movq %r13, %rdx
callq 0x25758
decl %r15d
jne 0x19142
incl %ebp
movq 0x30(%rsp), %rax
cmpl 0x34(%rax), %ebp
jl 0x1913c
movq 0x28(%rsp), %r14
movl (%r14), %esi
movq 0xcbd85(%rip), %rbx     # 0xe4fa8
movl $0x8892, %edi           # imm = 0x8892
callq *(%rbx)
movq 0xcbd8f(%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 *(%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1926a
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xe450
movl (%r14), %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1927e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x19298
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xe450
movq %rbx, %rdi
callq 0xe7e0