// File: /workspace/github_c_makefile_star2_O3/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 0x69c3e
movl %edx, %edx
shlq $0x4, %rdx
leaq 0x13270(%rip), %r8      # 0x7cd60
movl %esi, %ecx
andl $0xf, %ecx
movl %esi, %r9d
shrl $0x4, %r9d
andl $0xf, %r9d
shrl $0x8, %esi
andl $0xf, %esi
movl %ecx, %eax
shll $0x4, %eax
orl %ecx, %eax
movl %r9d, %ecx
shll $0x4, %ecx
orl %r9d, %ecx
movl %esi, %r9d
shll $0x4, %r9d
orl %esi, %r9d
movl (%rdx,%r8), %r11d
leal (%r11,%r9), %ebp
leal (%r11,%rcx), %r14d
addl %eax, %r11d
xorl %esi, %esi
testl %ebp, %ebp
cmovlel %esi, %ebp
movl $0xff, %r10d
cmpl %r10d, %ebp
cmovgel %r10d, %ebp
testl %r14d, %r14d
cmovlel %esi, %r14d
cmpl %r10d, %r14d
cmovgel %r10d, %r14d
movl 0x4(%rdx,%r8), %ebx
testl %r11d, %r11d
cmovlel %esi, %r11d
movb %bpl, (%rdi)
cmpl %r10d, %r11d
cmovgel %r10d, %r11d
movb %r14b, 0x1(%rdi)
movb %r11b, 0x2(%rdi)
leal (%rbx,%r9), %ebp
leal (%rbx,%rcx), %r14d
addl %eax, %ebx
testl %ebp, %ebp
cmovlel %esi, %ebp
movb $-0x1, %r11b
cmpl %r10d, %ebp
cmovgel %r10d, %ebp
movb %r11b, 0x3(%rdi)
testl %r14d, %r14d
cmovlel %esi, %r14d
movb %bpl, 0x4(%rdi)
cmpl %r10d, %r14d
cmovgel %r10d, %r14d
movb %r14b, 0x5(%rdi)
testl %ebx, %ebx
cmovlel %esi, %ebx
cmpl %r10d, %ebx
cmovgel %r10d, %ebx
movb %bl, 0x6(%rdi)
movb %r11b, 0x7(%rdi)
movl 0x8(%rdx,%r8), %ebx
leal (%rbx,%r9), %ebp
leal (%rbx,%rcx), %r14d
addl %eax, %ebx
testl %ebp, %ebp
cmovlel %esi, %ebp
cmpl %r10d, %ebp
cmovgel %r10d, %ebp
testl %r14d, %r14d
cmovlel %esi, %r14d
movb %bpl, 0x8(%rdi)
cmpl %r10d, %r14d
cmovgel %r10d, %r14d
movb %r14b, 0x9(%rdi)
testl %ebx, %ebx
cmovlel %esi, %ebx
cmpl %r10d, %ebx
cmovgel %r10d, %ebx
movb %bl, 0xa(%rdi)
movb %r11b, 0xb(%rdi)
movl 0xc(%rdx,%r8), %edx
addl %edx, %r9d
addl %edx, %ecx
addl %edx, %eax
testl %r9d, %r9d
cmovlel %esi, %r9d
cmpl %r10d, %r9d
cmovgel %r10d, %r9d
movb %r9b, 0xc(%rdi)
testl %ecx, %ecx
cmovlel %esi, %ecx
cmpl %r10d, %ecx
cmovgel %r10d, %ecx
movb %cl, 0xd(%rdi)
testl %eax, %eax
cmovlel %esi, %eax
cmpl %r10d, %eax
cmovgel %r10d, %eax
movb %al, 0xe(%rdi)
movb %r11b, 0xf(%rdi)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x12b56(%rip), %rdi     # 0x7c79b
leaq 0x12a93(%rip), %rsi     # 0x7c6df
leaq 0x12c27(%rip), %rcx     # 0x7c87a
movl $0x46e, %edx            # imm = 0x46E
callq 0x61b0