// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/rg_etc1.cpp
// Function: rg_etc1::etc1_block::get_abs_subblock_colors(rg_etc1::color_quad_u8*, unsigned short, unsigned int)
void etc1_block::get_abs_subblock_colors(color_quad_u8* pDst, uint16 packed_color4, uint table_idx)
   {
      RG_ETC1_ASSERT(table_idx < cETC1IntenModifierValues);
      const int *pInten_modifer_table = &g_etc1_inten_tables[table_idx][0];

      uint r, g, b;
      unpack_color4(r, g, b, packed_color4, true);
      
      const int ir = static_cast<int>(r), ig = static_cast<int>(g), ib = static_cast<int>(b);

      const int y0 = pInten_modifer_table[0];
      pDst[0].set(ir + y0, ig + y0, ib + y0);
      
      const int y1 = pInten_modifer_table[1];
      pDst[1].set(ir + y1, ig + y1, ib + y1);

      const int y2 = pInten_modifer_table[2];
      pDst[2].set(ir + y2, ig + y2, ib + y2);

      const int y3 = pInten_modifer_table[3];
      pDst[3].set(ir + y3, ig + y3, ib + y3);
   }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpl $0x8, %edx
jae 0x67f58
movl %edx, %edx
shlq $0x4, %rdx
leaq 0x13aac(%rip), %r8      # 0x7b8b0
movzwl %si, %r9d
movl %r9d, %ecx
andl $0xf, %ecx
movl %r9d, %esi
shrl $0x4, %esi
andl $0xf, %esi
shrl $0x8, %r9d
andl $0xf, %r9d
movl %ecx, %eax
shll $0x4, %eax
orl %ecx, %eax
movl %esi, %ecx
shll $0x4, %ecx
orl %esi, %ecx
movl %r9d, %esi
shll $0x4, %esi
orl %r9d, %esi
movl (%rdx,%r8), %r11d
leal (%r11,%rsi), %ebp
leal (%r11,%rcx), %r14d
addl %eax, %r11d
xorl %r9d, %r9d
testl %ebp, %ebp
cmovlel %r9d, %ebp
movl $0xff, %r10d
cmpl %r10d, %ebp
cmovgel %r10d, %ebp
testl %r14d, %r14d
cmovlel %r9d, %r14d
cmpl %r10d, %r14d
cmovgel %r10d, %r14d
movl 0x4(%rdx,%r8), %ebx
testl %r11d, %r11d
cmovlel %r9d, %r11d
movb %bpl, (%rdi)
cmpl %r10d, %r11d
cmovgel %r10d, %r11d
movb %r14b, 0x1(%rdi)
movb %r11b, 0x2(%rdi)
leal (%rbx,%rsi), %ebp
leal (%rbx,%rcx), %r14d
addl %eax, %ebx
testl %ebp, %ebp
cmovlel %r9d, %ebp
movb $-0x1, %r11b
cmpl %r10d, %ebp
cmovgel %r10d, %ebp
movb %r11b, 0x3(%rdi)
testl %r14d, %r14d
cmovlel %r9d, %r14d
movb %bpl, 0x4(%rdi)
cmpl %r10d, %r14d
cmovgel %r10d, %r14d
movb %r14b, 0x5(%rdi)
testl %ebx, %ebx
cmovlel %r9d, %ebx
cmpl %r10d, %ebx
cmovgel %r10d, %ebx
movb %bl, 0x6(%rdi)
movb %r11b, 0x7(%rdi)
movl 0x8(%rdx,%r8), %ebx
leal (%rbx,%rsi), %ebp
leal (%rbx,%rcx), %r14d
addl %eax, %ebx
testl %ebp, %ebp
cmovlel %r9d, %ebp
cmpl %r10d, %ebp
cmovgel %r10d, %ebp
testl %r14d, %r14d
cmovlel %r9d, %r14d
movb %bpl, 0x8(%rdi)
cmpl %r10d, %r14d
cmovgel %r10d, %r14d
movb %r14b, 0x9(%rdi)
testl %ebx, %ebx
cmovlel %r9d, %ebx
cmpl %r10d, %ebx
cmovgel %r10d, %ebx
movb %bl, 0xa(%rdi)
movb %r11b, 0xb(%rdi)
movl 0xc(%rdx,%r8), %edx
addl %edx, %esi
addl %edx, %ecx
addl %edx, %eax
testl %esi, %esi
cmovlel %r9d, %esi
cmpl %r10d, %esi
cmovgel %r10d, %esi
movb %sil, 0xc(%rdi)
testl %ecx, %ecx
cmovlel %r9d, %ecx
cmpl %r10d, %ecx
cmovgel %r10d, %ecx
movb %cl, 0xd(%rdi)
testl %eax, %eax
cmovlel %r9d, %eax
cmpl %r10d, %eax
cmovgel %r10d, %eax
movb %al, 0xe(%rdi)
movb %r11b, 0xf(%rdi)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1330c(%rip), %rdi     # 0x7b26b
leaq 0x13249(%rip), %rsi     # 0x7b1af
leaq 0x133dd(%rip), %rcx     # 0x7b34a
movl $0x46e, %edx            # imm = 0x46E
callq 0x61b0