// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x8, %edx
jae 0x5ee2a
movq %rdi, %rbx
movl %edx, %r13d
shlq $0x4, %r13
leaq 0x12ef8(%rip), %rbp     # 0x71bc0
movzwl %si, %ecx
leaq 0x14(%rsp), %r14
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
pushq $0x1
popq %r8
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x5e8fc
movl (%r14), %ecx
movl (%r15), %eax
movl (%r12), %edi
movl (%r13,%rbp), %r8d
leal (%r8,%rcx), %r10d
leal (%r8,%rax), %r11d
addl %edi, %r8d
xorl %edx, %edx
testl %r10d, %r10d
cmovlel %edx, %r10d
movl $0xff, %esi
cmpl %esi, %r10d
cmovgel %esi, %r10d
testl %r11d, %r11d
cmovlel %edx, %r11d
cmpl %esi, %r11d
cmovgel %esi, %r11d
movl 0x4(%r13,%rbp), %r9d
testl %r8d, %r8d
cmovlel %edx, %r8d
movb %r10b, (%rbx)
cmpl %esi, %r8d
cmovgel %esi, %r8d
movb %r11b, 0x1(%rbx)
movb %r8b, 0x2(%rbx)
leal (%r9,%rcx), %r10d
leal (%r9,%rax), %r11d
addl %edi, %r9d
testl %r10d, %r10d
cmovlel %edx, %r10d
movb $-0x1, %r8b
cmpl %esi, %r10d
cmovgel %esi, %r10d
movb %r8b, 0x3(%rbx)
testl %r11d, %r11d
cmovlel %edx, %r11d
movb %r10b, 0x4(%rbx)
cmpl %esi, %r11d
cmovgel %esi, %r11d
movb %r11b, 0x5(%rbx)
testl %r9d, %r9d
cmovlel %edx, %r9d
cmpl %esi, %r9d
cmovgel %esi, %r9d
movb %r9b, 0x6(%rbx)
movb %r8b, 0x7(%rbx)
movl 0x8(%r13,%rbp), %r9d
leal (%r9,%rcx), %r10d
leal (%r9,%rax), %r11d
addl %edi, %r9d
testl %r10d, %r10d
cmovlel %edx, %r10d
cmpl %esi, %r10d
cmovgel %esi, %r10d
testl %r11d, %r11d
cmovlel %edx, %r11d
movb %r10b, 0x8(%rbx)
cmpl %esi, %r11d
cmovgel %esi, %r11d
movb %r11b, 0x9(%rbx)
testl %r9d, %r9d
cmovlel %edx, %r9d
cmpl %esi, %r9d
cmovgel %esi, %r9d
movb %r9b, 0xa(%rbx)
movb %r8b, 0xb(%rbx)
movl 0xc(%r13,%rbp), %r9d
addl %r9d, %ecx
addl %r9d, %eax
addl %edi, %r9d
testl %ecx, %ecx
cmovlel %edx, %ecx
cmpl %esi, %ecx
cmovgel %esi, %ecx
movb %cl, 0xc(%rbx)
testl %eax, %eax
cmovlel %edx, %eax
cmpl %esi, %eax
cmovgel %esi, %eax
movb %al, 0xd(%rbx)
testl %r9d, %r9d
cmovlel %edx, %r9d
cmpl %esi, %r9d
cmovgel %esi, %r9d
movb %r9b, 0xe(%rbx)
movb %r8b, 0xf(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x126ba(%rip), %rdi     # 0x714eb
leaq 0x125f7(%rip), %rsi     # 0x7142f
leaq 0x1278b(%rip), %rcx     # 0x715ca
movl $0x46e, %edx            # imm = 0x46E
callq 0x61b0