// File: /workspace/github_c_makefile_star2_O1/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 0x67c29
movl %edx, %edx
shlq $0x4, %rdx
leaq 0x13dde(%rip), %r8      # 0x7b8b0
movzwl %si, %esi
movl %esi, %eax
shrl $0x2, %eax
movl %eax, %r9d
andl $0x7, %r9d
movl %esi, %ecx
shrl $0x7, %ecx
movl %ecx, %r10d
andl $0x7, %r10d
movl %esi, %r11d
shrl $0xc, %r11d
andl $0x7, %r11d
movl $0xf8, %ebx
andl %ebx, %ecx
orl %r11d, %ecx
andl %ebx, %eax
orl %r10d, %eax
andl $0x1f, %esi
leal (%r9,%rsi,8), %r10d
movl (%rdx,%r8), %r11d
leal (%r11,%rcx), %ebp
leal (%r11,%rax), %r14d
addl %r10d, %r11d
xorl %esi, %esi
testl %ebp, %ebp
cmovlel %esi, %ebp
movl $0xff, %r9d
cmpl %r9d, %ebp
cmovgel %r9d, %ebp
testl %r14d, %r14d
cmovlel %esi, %r14d
cmpl %r9d, %r14d
cmovgel %r9d, %r14d
movl 0x4(%rdx,%r8), %ebx
testl %r11d, %r11d
cmovlel %esi, %r11d
movb %bpl, (%rdi)
cmpl %r9d, %r11d
cmovgel %r9d, %r11d
movb %r14b, 0x1(%rdi)
movb %r11b, 0x2(%rdi)
leal (%rbx,%rcx), %ebp
leal (%rbx,%rax), %r14d
addl %r10d, %ebx
testl %ebp, %ebp
cmovlel %esi, %ebp
movb $-0x1, %r11b
cmpl %r9d, %ebp
cmovgel %r9d, %ebp
movb %r11b, 0x3(%rdi)
testl %r14d, %r14d
cmovlel %esi, %r14d
movb %bpl, 0x4(%rdi)
cmpl %r9d, %r14d
cmovgel %r9d, %r14d
movb %r14b, 0x5(%rdi)
testl %ebx, %ebx
cmovlel %esi, %ebx
cmpl %r9d, %ebx
cmovgel %r9d, %ebx
movb %bl, 0x6(%rdi)
movb %r11b, 0x7(%rdi)
movl 0x8(%rdx,%r8), %ebx
leal (%rbx,%rcx), %ebp
leal (%rbx,%rax), %r14d
addl %r10d, %ebx
testl %ebp, %ebp
cmovlel %esi, %ebp
cmpl %r9d, %ebp
cmovgel %r9d, %ebp
testl %r14d, %r14d
cmovlel %esi, %r14d
movb %bpl, 0x8(%rdi)
cmpl %r9d, %r14d
cmovgel %r9d, %r14d
movb %r14b, 0x9(%rdi)
testl %ebx, %ebx
cmovlel %esi, %ebx
cmpl %r9d, %ebx
cmovgel %r9d, %ebx
movb %bl, 0xa(%rdi)
movb %r11b, 0xb(%rdi)
movl 0xc(%rdx,%r8), %edx
addl %edx, %ecx
addl %edx, %eax
addl %r10d, %edx
testl %ecx, %ecx
cmovlel %esi, %ecx
cmpl %r9d, %ecx
cmovgel %r9d, %ecx
movb %cl, 0xc(%rdi)
testl %eax, %eax
cmovlel %esi, %eax
cmpl %r9d, %eax
cmovgel %r9d, %eax
movb %al, 0xd(%rdi)
testl %edx, %edx
cmovlel %esi, %edx
cmpl %r9d, %edx
cmovgel %r9d, %edx
movb %dl, 0xe(%rdi)
movb %r11b, 0xf(%rdi)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1363b(%rip), %rdi     # 0x7b26b
leaq 0x13578(%rip), %rsi     # 0x7b1af
leaq 0x13652(%rip), %rcx     # 0x7b290
movl $0x43e, %edx            # imm = 0x43E
callq 0x61b0