// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dsp/lossless.c
// Function: VP8LConvertFromBGRA
void VP8LConvertFromBGRA(const uint32_t* const in_data, int num_pixels,
                         WEBP_CSP_MODE out_colorspace, uint8_t* const rgba) {
  switch (out_colorspace) {
    case MODE_RGB:
      VP8LConvertBGRAToRGB(in_data, num_pixels, rgba);
      break;
    case MODE_RGBA:
      VP8LConvertBGRAToRGBA(in_data, num_pixels, rgba);
      break;
    case MODE_rgbA:
      VP8LConvertBGRAToRGBA(in_data, num_pixels, rgba);
      WebPApplyAlphaMultiply(rgba, 0, num_pixels, 1, 0);
      break;
    case MODE_BGR:
      VP8LConvertBGRAToBGR(in_data, num_pixels, rgba);
      break;
    case MODE_BGRA:
      CopyOrSwap(in_data, num_pixels, rgba, 1);
      break;
    case MODE_bgrA:
      CopyOrSwap(in_data, num_pixels, rgba, 1);
      WebPApplyAlphaMultiply(rgba, 0, num_pixels, 1, 0);
      break;
    case MODE_ARGB:
      CopyOrSwap(in_data, num_pixels, rgba, 0);
      break;
    case MODE_Argb:
      CopyOrSwap(in_data, num_pixels, rgba, 0);
      WebPApplyAlphaMultiply(rgba, 1, num_pixels, 1, 0);
      break;
    case MODE_RGBA_4444:
      VP8LConvertBGRAToRGBA4444(in_data, num_pixels, rgba);
      break;
    case MODE_rgbA_4444:
      VP8LConvertBGRAToRGBA4444(in_data, num_pixels, rgba);
      WebPApplyAlphaMultiply4444(rgba, num_pixels, 1, 0);
      break;
    case MODE_RGB_565:
      VP8LConvertBGRAToRGB565(in_data, num_pixels, rgba);
      break;
    default:
      assert(0);          // Code flow should not reach here.
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cmpl $0xa, %edx
ja 0xd23bc
movq %rcx, %rbx
movl %esi, %ebp
movq %rdi, %rsi
movl %edx, %eax
leaq 0x4960b(%rip), %rcx     # 0x11b8c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x9f313(%rip), %rax     # 0x1715e0
jmp 0xd2354
movq %rsi, %rdi
movl %ebp, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xd23db
movq %rsi, %rdi
movl %ebp, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xd23db
leaq 0x9f0cb(%rip), %rax     # 0x1713c8
movq (%rax), %rax
pushq $0x1
popq %rcx
movq %rbx, %rdi
movl %ecx, %esi
jmp 0xd23af
movq 0x9f2dc(%rip), %rax     # 0x1715f0
jmp 0xd2354
movslq %ebp, %rdx
shlq $0x2, %rdx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x562f0
movq %rsi, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq *0x9f2af(%rip)          # 0x1715e8
jmp 0xd239d
movq 0x9f2a6(%rip), %rax     # 0x1715e8
jmp 0xd2354
movq 0x9f2ad(%rip), %rax     # 0x1715f8
jmp 0xd2354
movq 0x9f2ac(%rip), %rax     # 0x171600
movq %rsi, %rdi
movl %ebp, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rax
movq %rsi, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq *0x9f286(%rip)          # 0x1715f8
leaq 0x9f057(%rip), %rax     # 0x1713d0
movq (%rax), %rax
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rax
movslq %ebp, %rdx
shlq $0x2, %rdx
movq %rbx, %rdi
callq 0x562f0
leaq 0x9f024(%rip), %rax     # 0x1713c8
movq (%rax), %rax
pushq $0x1
popq %rcx
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rax
leaq 0x49c67(%rip), %rdi     # 0x11c02a
leaq 0x4953e(%rip), %rsi     # 0x11b908
leaq 0x495cf(%rip), %rcx     # 0x11b9a0
movl $0x237, %edx            # imm = 0x237
callq 0x56770