// File: tomfunkhouser[P]gaps/apps/gapsview/gapsview.cpp
// Function: LoadColorIdentifier(int)
static void
LoadColorIdentifier(int k)
{
  // Make array of colors
  const int ncolors = 72;
  const RNRgb colors[ncolors] = {
    RNRgb(0.5, 0.5, 0.5), RNRgb(1, 0, 0), RNRgb(0, 0, 1), 
    RNRgb(0, 1, 0), RNRgb(0, 1, 1), RNRgb(1, 0, 1), 
    RNRgb(1, 0.5, 0), RNRgb(0, 1, 0.5), RNRgb(0.5, 0, 1), 
    RNRgb(0.5, 1, 0), RNRgb(0, 0.5, 1), RNRgb(1, 0, 0.5), 
    RNRgb(0.5, 0, 0), RNRgb(0, 0.5, 0), RNRgb(0, 0, 0.5), 
    RNRgb(0.5, 0.5, 0), RNRgb(0, 0.5, 0.5), RNRgb(0.5, 0, 0.5),
    RNRgb(0.7, 0, 0), RNRgb(0, 0.7, 0), RNRgb(0, 0, 0.7), 
    RNRgb(0.7, 0.7, 0), RNRgb(0, 0.7, 0.7), RNRgb(0.7, 0, 0.7), 
    RNRgb(0.7, 0.3, 0), RNRgb(0, 0.7, 0.3), RNRgb(0.3, 0, 0.7), 
    RNRgb(0.3, 0.7, 0), RNRgb(0, 0.3, 0.7), RNRgb(0.7, 0, 0.3), 
    RNRgb(0.3, 0, 0), RNRgb(0, 0.3, 0), RNRgb(0, 0, 0.3), 
    RNRgb(0.3, 0.3, 0), RNRgb(0, 0.3, 0.3), RNRgb(0.3, 0, 0.3),
    RNRgb(1, 0.3, 0.3), RNRgb(0.3, 1, 0.3), RNRgb(0.3, 0.3, 1), 
    RNRgb(1, 1, 0.3), RNRgb(0.3, 1, 1), RNRgb(1, 0.3, 1), 
    RNRgb(1, 0.5, 0.3), RNRgb(0.3, 1, 0.5), RNRgb(0.5, 0.3, 1), 
    RNRgb(0.5, 1, 0.3), RNRgb(0.3, 0.5, 1), RNRgb(1, 0.3, 0.5), 
    RNRgb(0.5, 0.3, 0.3), RNRgb(0.3, 0.5, 0.3), RNRgb(0.3, 0.3, 0.5), 
    RNRgb(0.5, 0.5, 0.3), RNRgb(0.3, 0.5, 0.5), RNRgb(0.5, 0.3, 0.5),
    RNRgb(0.3, 0.5, 0.5), RNRgb(0.5, 0.3, 0.5), RNRgb(0.5, 0.5, 0.3), 
    RNRgb(0.3, 0.3, 0.5), RNRgb(0.5, 0.3, 0.3), RNRgb(0.3, 0.5, 0.3), 
    RNRgb(0.3, 0.8, 0.5), RNRgb(0.5, 0.3, 0.8), RNRgb(0.8, 0.5, 0.3), 
    RNRgb(0.8, 0.3, 0.5), RNRgb(0.5, 0.8, 0.3), RNRgb(0.3, 0.5, 0.8), 
    RNRgb(0.8, 0.5, 0.5), RNRgb(0.5, 0.8, 0.5), RNRgb(0.5, 0.5, 0.8), 
    RNRgb(0.8, 0.8, 0.5), RNRgb(0.5, 0.8, 0.8), RNRgb(0.8, 0.5, 0.8)
  };

  // Load color
  if (k == -1) RNLoadRgb(0.8, 0.8, 0.8);
  else if (k == 0) RNLoadRgb(colors[0]);
  else RNLoadRgb(colors[1 + (k % (ncolors-1))]);
}

// Assembly:
subq $0x6c8, %rsp            # imm = 0x6C8
movl %edi, 0x6c4(%rsp)
movl $0x48, 0x6c0(%rsp)
movq %rsp, %rdi
movsd 0x231efc(%rip), %xmm2   # 0x266050
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x18, %rdi
movsd 0x231ea2(%rip), %xmm0   # 0x266010
xorps %xmm2, %xmm2
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x30, %rdi
xorps %xmm1, %xmm1
movsd 0x231e85(%rip), %xmm2   # 0x266010
movaps %xmm1, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x48, %rdi
xorps %xmm2, %xmm2
movsd 0x231e6b(%rip), %xmm1   # 0x266010
movaps %xmm2, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x60, %rdi
xorps %xmm0, %xmm0
movsd 0x231e51(%rip), %xmm2   # 0x266010
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x78, %rdi
movsd 0x231e3a(%rip), %xmm2   # 0x266010
xorps %xmm1, %xmm1
movaps %xmm2, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x90, %rdi
movsd 0x231e1d(%rip), %xmm0   # 0x266010
movsd 0x231e55(%rip), %xmm1   # 0x266050
xorps %xmm2, %xmm2
callq 0x1c7830
movq %rsp, %rdi
addq $0xa8, %rdi
xorps %xmm0, %xmm0
movsd 0x231df8(%rip), %xmm1   # 0x266010
movsd 0x231e30(%rip), %xmm2   # 0x266050
callq 0x1c7830
movq %rsp, %rdi
addq $0xc0, %rdi
movsd 0x231e19(%rip), %xmm0   # 0x266050
xorps %xmm1, %xmm1
movsd 0x231dce(%rip), %xmm2   # 0x266010
callq 0x1c7830
movq %rsp, %rdi
addq $0xd8, %rdi
movsd 0x231df7(%rip), %xmm0   # 0x266050
movsd 0x231daf(%rip), %xmm1   # 0x266010
xorps %xmm2, %xmm2
callq 0x1c7830
movq %rsp, %rdi
addq $0xf0, %rdi
xorps %xmm0, %xmm0
movsd 0x231dd2(%rip), %xmm1   # 0x266050
movsd 0x231d8a(%rip), %xmm2   # 0x266010
callq 0x1c7830
movq %rsp, %rdi
addq $0x108, %rdi            # imm = 0x108
movsd 0x231d73(%rip), %xmm0   # 0x266010
xorps %xmm1, %xmm1
movsd 0x231da8(%rip), %xmm2   # 0x266050
callq 0x1c7830
movq %rsp, %rdi
addq $0x120, %rdi            # imm = 0x120
movsd 0x231d91(%rip), %xmm0   # 0x266050
xorps %xmm2, %xmm2
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x138, %rdi            # imm = 0x138
xorps %xmm2, %xmm2
movsd 0x231d71(%rip), %xmm1   # 0x266050
movaps %xmm2, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x150, %rdi            # imm = 0x150
xorps %xmm1, %xmm1
movsd 0x231d54(%rip), %xmm2   # 0x266050
movaps %xmm1, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x168, %rdi            # imm = 0x168
movsd 0x231d3a(%rip), %xmm1   # 0x266050
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x180, %rdi            # imm = 0x180
xorps %xmm0, %xmm0
movsd 0x231d1a(%rip), %xmm2   # 0x266050
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x198, %rdi            # imm = 0x198
movsd 0x231d00(%rip), %xmm2   # 0x266050
xorps %xmm1, %xmm1
movaps %xmm2, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x1b0, %rdi            # imm = 0x1B0
movsd 0x231d53(%rip), %xmm0   # 0x2660c0
xorps %xmm2, %xmm2
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x1c8, %rdi            # imm = 0x1C8
xorps %xmm2, %xmm2
movsd 0x231d33(%rip), %xmm1   # 0x2660c0
movaps %xmm2, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x1e0, %rdi            # imm = 0x1E0
xorps %xmm1, %xmm1
movsd 0x231d16(%rip), %xmm2   # 0x2660c0
movaps %xmm1, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x1f8, %rdi            # imm = 0x1F8
movsd 0x231cfc(%rip), %xmm1   # 0x2660c0
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x210, %rdi            # imm = 0x210
xorps %xmm0, %xmm0
movsd 0x231cdc(%rip), %xmm2   # 0x2660c0
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x228, %rdi            # imm = 0x228
movsd 0x231cc2(%rip), %xmm2   # 0x2660c0
xorps %xmm1, %xmm1
movaps %xmm2, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x240, %rdi            # imm = 0x240
movsd 0x231ca5(%rip), %xmm0   # 0x2660c0
movsd 0x231c95(%rip), %xmm1   # 0x2660b8
xorps %xmm2, %xmm2
callq 0x1c7830
movq %rsp, %rdi
addq $0x258, %rdi            # imm = 0x258
xorps %xmm0, %xmm0
movsd 0x231c80(%rip), %xmm1   # 0x2660c0
movsd 0x231c70(%rip), %xmm2   # 0x2660b8
callq 0x1c7830
movq %rsp, %rdi
addq $0x270, %rdi            # imm = 0x270
movsd 0x231c59(%rip), %xmm0   # 0x2660b8
xorps %xmm1, %xmm1
movsd 0x231c56(%rip), %xmm2   # 0x2660c0
callq 0x1c7830
movq %rsp, %rdi
addq $0x288, %rdi            # imm = 0x288
movsd 0x231c37(%rip), %xmm0   # 0x2660b8
movsd 0x231c37(%rip), %xmm1   # 0x2660c0
xorps %xmm2, %xmm2
callq 0x1c7830
movq %rsp, %rdi
addq $0x2a0, %rdi            # imm = 0x2A0
xorps %xmm0, %xmm0
movsd 0x231c12(%rip), %xmm1   # 0x2660b8
movsd 0x231c12(%rip), %xmm2   # 0x2660c0
callq 0x1c7830
movq %rsp, %rdi
addq $0x2b8, %rdi            # imm = 0x2B8
movsd 0x231bfb(%rip), %xmm0   # 0x2660c0
xorps %xmm1, %xmm1
movsd 0x231be8(%rip), %xmm2   # 0x2660b8
callq 0x1c7830
movq %rsp, %rdi
addq $0x2d0, %rdi            # imm = 0x2D0
movsd 0x231bd1(%rip), %xmm0   # 0x2660b8
xorps %xmm2, %xmm2
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x2e8, %rdi            # imm = 0x2E8
xorps %xmm2, %xmm2
movsd 0x231bb1(%rip), %xmm1   # 0x2660b8
movaps %xmm2, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x300, %rdi            # imm = 0x300
xorps %xmm1, %xmm1
movsd 0x231b94(%rip), %xmm2   # 0x2660b8
movaps %xmm1, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x318, %rdi            # imm = 0x318
movsd 0x231b7a(%rip), %xmm1   # 0x2660b8
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x330, %rdi            # imm = 0x330
xorps %xmm0, %xmm0
movsd 0x231b5a(%rip), %xmm2   # 0x2660b8
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x348, %rdi            # imm = 0x348
movsd 0x231b40(%rip), %xmm2   # 0x2660b8
xorps %xmm1, %xmm1
movaps %xmm2, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x360, %rdi            # imm = 0x360
movsd 0x231a7b(%rip), %xmm0   # 0x266010
movsd 0x231b1b(%rip), %xmm2   # 0x2660b8
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x378, %rdi            # imm = 0x378
movsd 0x231b01(%rip), %xmm2   # 0x2660b8
movsd 0x231a51(%rip), %xmm1   # 0x266010
movaps %xmm2, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x390, %rdi            # imm = 0x390
movsd 0x231adf(%rip), %xmm1   # 0x2660b8
movsd 0x231a2f(%rip), %xmm2   # 0x266010
movaps %xmm1, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x3a8, %rdi            # imm = 0x3A8
movsd 0x231a15(%rip), %xmm1   # 0x266010
movsd 0x231ab5(%rip), %xmm2   # 0x2660b8
movaps %xmm1, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x3c0, %rdi            # imm = 0x3C0
movsd 0x231a9b(%rip), %xmm0   # 0x2660b8
movsd 0x2319eb(%rip), %xmm2   # 0x266010
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x3d8, %rdi            # imm = 0x3D8
movsd 0x2319d1(%rip), %xmm2   # 0x266010
movsd 0x231a71(%rip), %xmm1   # 0x2660b8
movaps %xmm2, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x3f0, %rdi            # imm = 0x3F0
movsd 0x2319af(%rip), %xmm0   # 0x266010
movsd 0x2319e7(%rip), %xmm1   # 0x266050
movsd 0x231a47(%rip), %xmm2   # 0x2660b8
callq 0x1c7830
movq %rsp, %rdi
addq $0x408, %rdi            # imm = 0x408
movsd 0x231a30(%rip), %xmm0   # 0x2660b8
movsd 0x231980(%rip), %xmm1   # 0x266010
movsd 0x2319b8(%rip), %xmm2   # 0x266050
callq 0x1c7830
movq %rsp, %rdi
addq $0x420, %rdi            # imm = 0x420
movsd 0x2319a1(%rip), %xmm0   # 0x266050
movsd 0x231a01(%rip), %xmm1   # 0x2660b8
movsd 0x231951(%rip), %xmm2   # 0x266010
callq 0x1c7830
movq %rsp, %rdi
addq $0x438, %rdi            # imm = 0x438
movsd 0x23197a(%rip), %xmm0   # 0x266050
movsd 0x231932(%rip), %xmm1   # 0x266010
movsd 0x2319d2(%rip), %xmm2   # 0x2660b8
callq 0x1c7830
movq %rsp, %rdi
addq $0x450, %rdi            # imm = 0x450
movsd 0x2319bb(%rip), %xmm0   # 0x2660b8
movsd 0x23194b(%rip), %xmm1   # 0x266050
movsd 0x231903(%rip), %xmm2   # 0x266010
callq 0x1c7830
movq %rsp, %rdi
addq $0x468, %rdi            # imm = 0x468
movsd 0x2318ec(%rip), %xmm0   # 0x266010
movsd 0x23198c(%rip), %xmm1   # 0x2660b8
movsd 0x23191c(%rip), %xmm2   # 0x266050
callq 0x1c7830
movq %rsp, %rdi
addq $0x480, %rdi            # imm = 0x480
movsd 0x231905(%rip), %xmm0   # 0x266050
movsd 0x231965(%rip), %xmm2   # 0x2660b8
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x498, %rdi            # imm = 0x498
movsd 0x23194b(%rip), %xmm2   # 0x2660b8
movsd 0x2318db(%rip), %xmm1   # 0x266050
movaps %xmm2, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x4b0, %rdi            # imm = 0x4B0
movsd 0x231929(%rip), %xmm1   # 0x2660b8
movsd 0x2318b9(%rip), %xmm2   # 0x266050
movaps %xmm1, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x4c8, %rdi            # imm = 0x4C8
movsd 0x23189f(%rip), %xmm1   # 0x266050
movsd 0x2318ff(%rip), %xmm2   # 0x2660b8
movaps %xmm1, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x4e0, %rdi            # imm = 0x4E0
movsd 0x2318e5(%rip), %xmm0   # 0x2660b8
movsd 0x231875(%rip), %xmm2   # 0x266050
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x4f8, %rdi            # imm = 0x4F8
movsd 0x23185b(%rip), %xmm2   # 0x266050
movsd 0x2318bb(%rip), %xmm1   # 0x2660b8
movaps %xmm2, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x510, %rdi            # imm = 0x510
movsd 0x2318a1(%rip), %xmm0   # 0x2660b8
movsd 0x231831(%rip), %xmm2   # 0x266050
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x528, %rdi            # imm = 0x528
movsd 0x231817(%rip), %xmm2   # 0x266050
movsd 0x231877(%rip), %xmm1   # 0x2660b8
movaps %xmm2, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x540, %rdi            # imm = 0x540
movsd 0x2317f5(%rip), %xmm1   # 0x266050
movsd 0x231855(%rip), %xmm2   # 0x2660b8
movaps %xmm1, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x558, %rdi            # imm = 0x558
movsd 0x23183b(%rip), %xmm1   # 0x2660b8
movsd 0x2317cb(%rip), %xmm2   # 0x266050
movaps %xmm1, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x570, %rdi            # imm = 0x570
movsd 0x2317b1(%rip), %xmm0   # 0x266050
movsd 0x231811(%rip), %xmm2   # 0x2660b8
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x588, %rdi            # imm = 0x588
movsd 0x2317f7(%rip), %xmm2   # 0x2660b8
movsd 0x231787(%rip), %xmm1   # 0x266050
movaps %xmm2, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x5a0, %rdi            # imm = 0x5A0
movsd 0x2317d5(%rip), %xmm0   # 0x2660b8
movsd 0x2317a5(%rip), %xmm1   # 0x266090
movsd 0x23175d(%rip), %xmm2   # 0x266050
callq 0x1c7830
movq %rsp, %rdi
addq $0x5b8, %rdi            # imm = 0x5B8
movsd 0x231746(%rip), %xmm0   # 0x266050
movsd 0x2317a6(%rip), %xmm1   # 0x2660b8
movsd 0x231776(%rip), %xmm2   # 0x266090
callq 0x1c7830
movq %rsp, %rdi
addq $0x5d0, %rdi            # imm = 0x5D0
movsd 0x23175f(%rip), %xmm0   # 0x266090
movsd 0x231717(%rip), %xmm1   # 0x266050
movsd 0x231777(%rip), %xmm2   # 0x2660b8
callq 0x1c7830
movq %rsp, %rdi
addq $0x5e8, %rdi            # imm = 0x5E8
movsd 0x231738(%rip), %xmm0   # 0x266090
movsd 0x231758(%rip), %xmm1   # 0x2660b8
movsd 0x2316e8(%rip), %xmm2   # 0x266050
callq 0x1c7830
movq %rsp, %rdi
addq $0x600, %rdi            # imm = 0x600
movsd 0x2316d1(%rip), %xmm0   # 0x266050
movsd 0x231709(%rip), %xmm1   # 0x266090
movsd 0x231729(%rip), %xmm2   # 0x2660b8
callq 0x1c7830
movq %rsp, %rdi
addq $0x618, %rdi            # imm = 0x618
movsd 0x231712(%rip), %xmm0   # 0x2660b8
movsd 0x2316a2(%rip), %xmm1   # 0x266050
movsd 0x2316da(%rip), %xmm2   # 0x266090
callq 0x1c7830
movq %rsp, %rdi
addq $0x630, %rdi            # imm = 0x630
movsd 0x2316c3(%rip), %xmm0   # 0x266090
movsd 0x23167b(%rip), %xmm2   # 0x266050
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x648, %rdi            # imm = 0x648
movsd 0x231661(%rip), %xmm2   # 0x266050
movsd 0x231699(%rip), %xmm1   # 0x266090
movaps %xmm2, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x660, %rdi            # imm = 0x660
movsd 0x23163f(%rip), %xmm1   # 0x266050
movsd 0x231677(%rip), %xmm2   # 0x266090
movaps %xmm1, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x678, %rdi            # imm = 0x678
movsd 0x23165d(%rip), %xmm1   # 0x266090
movsd 0x231615(%rip), %xmm2   # 0x266050
movaps %xmm1, %xmm0
callq 0x1c7830
movq %rsp, %rdi
addq $0x690, %rdi            # imm = 0x690
movsd 0x2315fb(%rip), %xmm0   # 0x266050
movsd 0x231633(%rip), %xmm2   # 0x266090
movaps %xmm2, %xmm1
callq 0x1c7830
movq %rsp, %rdi
addq $0x6a8, %rdi            # imm = 0x6A8
movsd 0x231619(%rip), %xmm2   # 0x266090
movsd 0x2315d1(%rip), %xmm1   # 0x266050
movaps %xmm2, %xmm0
callq 0x1c7830
cmpl $-0x1, 0x6c4(%rsp)
jne 0x34aa6
movsd 0x2315f7(%rip), %xmm2   # 0x266090
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x38d60
jmp 0x34ae0
cmpl $0x0, 0x6c4(%rsp)
jne 0x34aba
movq %rsp, %rdi
callq 0x39130
jmp 0x34ade
movl 0x6c4(%rsp), %eax
movl $0x47, %ecx
cltd
idivl %ecx
addl $0x1, %edx
movslq %edx, %rax
movq %rsp, %rdi
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x39130
jmp 0x34ae0
addq $0x6c8, %rsp            # imm = 0x6C8
retq
nopl (%rax,%rax)