// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/rg_etc1.cpp
// Function: rg_etc1::etc1_block::get_diff_subblock_colors(rg_etc1::color_quad_u8*, unsigned short, unsigned int)
void etc1_block::get_diff_subblock_colors(color_quad_u8* pDst, uint16 packed_color5, 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_color5(r, g, b, packed_color5, 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 0x69914
movl %edx, %ecx
shlq $0x4, %rcx
leaq 0x135aa(%rip), %r8      # 0x7cd60
movl %esi, %eax
andl $0x1c, %eax
movzwl %si, %r9d
shrl $0x2, %eax
leal (%rax,%rsi,8), %eax
shrl $0x2, %esi
movl %r9d, %edx
shrl $0x7, %edx
movl %edx, %r10d
andl $0x7, %r10d
shrl $0xc, %r9d
andl $0x7, %r9d
movl $0xf8, %r11d
andl %r11d, %edx
orl %r9d, %edx
andl %r11d, %esi
orl %r10d, %esi
movl $0xff, %r9d
andl %r9d, %eax
movl (%rcx,%r8), %r11d
leal (%r11,%rdx), %ebp
leal (%r11,%rsi), %r14d
addl %eax, %r11d
xorl %r10d, %r10d
testl %ebp, %ebp
cmovlel %r10d, %ebp
cmpl %r9d, %ebp
cmovgel %r9d, %ebp
testl %r14d, %r14d
cmovlel %r10d, %r14d
cmpl %r9d, %r14d
cmovgel %r9d, %r14d
movl 0x4(%rcx,%r8), %ebx
testl %r11d, %r11d
cmovlel %r10d, %r11d
movb %bpl, (%rdi)
cmpl %r9d, %r11d
cmovgel %r9d, %r11d
movb %r14b, 0x1(%rdi)
movb %r11b, 0x2(%rdi)
leal (%rbx,%rdx), %ebp
leal (%rbx,%rsi), %r14d
addl %eax, %ebx
testl %ebp, %ebp
cmovlel %r10d, %ebp
movb $-0x1, %r11b
cmpl %r9d, %ebp
cmovgel %r9d, %ebp
movb %r11b, 0x3(%rdi)
testl %r14d, %r14d
cmovlel %r10d, %r14d
movb %bpl, 0x4(%rdi)
cmpl %r9d, %r14d
cmovgel %r9d, %r14d
movb %r14b, 0x5(%rdi)
testl %ebx, %ebx
cmovlel %r10d, %ebx
cmpl %r9d, %ebx
cmovgel %r9d, %ebx
movb %bl, 0x6(%rdi)
movb %r11b, 0x7(%rdi)
movl 0x8(%rcx,%r8), %ebx
leal (%rbx,%rdx), %ebp
leal (%rbx,%rsi), %r14d
addl %eax, %ebx
testl %ebp, %ebp
cmovlel %r10d, %ebp
cmpl %r9d, %ebp
cmovgel %r9d, %ebp
testl %r14d, %r14d
cmovlel %r10d, %r14d
movb %bpl, 0x8(%rdi)
cmpl %r9d, %r14d
cmovgel %r9d, %r14d
movb %r14b, 0x9(%rdi)
testl %ebx, %ebx
cmovlel %r10d, %ebx
cmpl %r9d, %ebx
cmovgel %r9d, %ebx
movb %bl, 0xa(%rdi)
movb %r11b, 0xb(%rdi)
movl 0xc(%rcx,%r8), %ecx
addl %ecx, %edx
addl %ecx, %esi
addl %ecx, %eax
testl %edx, %edx
cmovlel %r10d, %edx
cmpl %r9d, %edx
cmovgel %r9d, %edx
movb %dl, 0xc(%rdi)
testl %esi, %esi
cmovlel %r10d, %esi
cmpl %r9d, %esi
cmovgel %r9d, %esi
movb %sil, 0xd(%rdi)
testl %eax, %eax
cmovlel %r10d, %eax
cmpl %r9d, %eax
cmovgel %r9d, %eax
movb %al, 0xe(%rdi)
movb %r11b, 0xf(%rdi)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x12e80(%rip), %rdi     # 0x7c79b
leaq 0x12dbd(%rip), %rsi     # 0x7c6df
leaq 0x12e97(%rip), %rcx     # 0x7c7c0
movl $0x43e, %edx            # imm = 0x43E
callq 0x61b0
nop