// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: EmitAlphaRGBA4444
static int EmitAlphaRGBA4444(const VP8Io* const io, WebPDecParams* const p,
                             int expected_num_lines_out) {
  const uint8_t* alpha = io->a;
  if (alpha != NULL) {
    const int mb_w = io->mb_w;
    const WEBP_CSP_MODE colorspace = p->output->colorspace;
    const WebPRGBABuffer* const buf = &p->output->u.RGBA;
    int num_rows;
    const size_t start_y = GetAlphaSourceRow(io, &alpha, &num_rows);
    uint8_t* const base_rgba = buf->rgba + start_y * buf->stride;
#if (WEBP_SWAP_16BIT_CSP == 1)
    uint8_t* alpha_dst = base_rgba;
#else
    uint8_t* alpha_dst = base_rgba + 1;
#endif
    uint32_t alpha_mask = 0x0f;
    int i, j;
    for (j = 0; j < num_rows; ++j) {
      for (i = 0; i < mb_w; ++i) {
        // Fill in the alpha value (converted to 4 bits).
        const uint32_t alpha_value = alpha[i] >> 4;
        alpha_dst[2 * i] = (alpha_dst[2 * i] & 0xf0) | alpha_value;
        alpha_mask &= alpha_value;
      }
      alpha += io->width;
      alpha_dst += buf->stride;
    }
    (void)expected_num_lines_out;
    assert(expected_num_lines_out == num_rows);
    if (alpha_mask != 0x0f && WebPIsPremultipliedMode(colorspace)) {
      WebPApplyAlphaMultiply4444(base_rgba, mb_w, num_rows, buf->stride);
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x14149d
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x142250
cltq
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movq -0x30(%rbp), %rdx
movslq 0x8(%rdx), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movl $0xf, -0x54(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x141442
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x14140b
movq -0x20(%rbp), %rax
movslq -0x58(%rbp), %rcx
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
movl %eax, -0x60(%rbp)
movq -0x50(%rbp), %rax
movl -0x58(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
andl $0xf0, %eax
orl -0x60(%rbp), %eax
movb %al, %dl
movq -0x50(%rbp), %rax
movl -0x58(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x60(%rbp), %eax
andl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1413b4
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x50(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x1413a1
movl -0x14(%rbp), %eax
cmpl -0x34(%rbp), %eax
jne 0x14144c
jmp 0x14146b
leaq 0x7bad2(%rip), %rdi     # 0x1bcf25
leaq 0x7b8b6(%rip), %rsi     # 0x1bcd10
movl $0xe4, %edx
leaq 0x7bae2(%rip), %rcx     # 0x1bcf48
callq 0x598a0
cmpl $0xf, -0x54(%rbp)
je 0x14149b
movl -0x28(%rbp), %edi
callq 0x140640
cmpl $0x0, %eax
je 0x14149b
leaq 0xd79db(%rip), %rax     # 0x218e60
movq (%rax), %rax
movq -0x48(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x34(%rbp), %edx
movq -0x30(%rbp), %rcx
movl 0x8(%rcx), %ecx
callq *%rax
jmp 0x14149d
xorl %eax, %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)