LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8_dec.c
// Function: VP8GetInfo
int VP8GetInfo(const uint8_t* data, size_t data_size, size_t chunk_size,
               int* const width, int* const height) {
  if (data == NULL || data_size < VP8_FRAME_HEADER_SIZE) {
    return 0;         // not enough data
  }
  // check signature
  if (!VP8CheckSignature(data + 3, data_size - 3)) {
    return 0;         // Wrong signature.
  } else {
    const uint32_t bits = data[0] | (data[1] << 8) | (data[2] << 16);
    const int key_frame = !(bits & 1);
    const int w = ((data[7] << 8) | data[6]) & 0x3fff;
    const int h = ((data[9] << 8) | data[8]) & 0x3fff;

    if (!key_frame) {   // Not a keyframe.
      return 0;
    }

    if (((bits >> 1) & 7) > 3) {
      return 0;         // unknown profile
    }
    if (!((bits >> 4) & 1)) {
      return 0;         // first frame is invisible!
    }
    if (((bits >> 5)) >= chunk_size) {  // partition_length
      return 0;         // inconsistent size information.
    }
    if (w == 0 || h == 0) {
      return 0;         // We don't support both width and height to be zero.
    }

    if (width) {
      *width = w;
    }
    if (height) {
      *height = h;
    }

    return 1;
  }
}

// Assembly:
testq %rdi, %rdi
sete %r9b
cmpq $0xa, %rsi
setb %sil
xorl %eax, %eax
orb %r9b, %sil
jne 0xd19bb
cmpb $-0x63, 0x3(%rdi)
jne 0xd19bb
cmpb $0x1, 0x4(%rdi)
jne 0xd19bb
cmpb $0x2a, 0x5(%rdi)
jne 0xd19bb
movzbl (%rdi), %esi
movl %esi, %r9d
andl $0x19, %r9d
cmpl $0x10, %r9d
jne 0xd19bb
movzwl 0x1(%rdi), %r9d
shll $0x8, %r9d
orl %esi, %r9d
shrl $0x5, %r9d
cmpq %rdx, %r9
jae 0xd19bb
movzbl 0x7(%rdi), %edx
movzbl 0x6(%rdi), %esi
andl $0x3f, %edx
shll $0x8, %edx
orl %esi, %edx
testl %edx, %edx
je 0xd19bb
movzbl 0x9(%rdi), %esi
movzbl 0x8(%rdi), %edi
andl $0x3f, %esi
shll $0x8, %esi
orl %edi, %esi
testl %esi, %esi
je 0xd19bb
testq %rcx, %rcx
je 0xd19ae
movl %edx, (%rcx)
movl $0x1, %eax
testq %r8, %r8
je 0xd19bb
movl %esi, (%r8)
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8_dec.c
// Function: ParseFilterHeader
static int ParseFilterHeader(VP8BitReader* br, VP8Decoder* const dec) {
  VP8FilterHeader* const hdr = &dec->filter_hdr_;
  hdr->simple_    = VP8Get(br, "global-header");
  hdr->level_     = VP8GetValue(br, 6, "global-header");
  hdr->sharpness_ = VP8GetValue(br, 3, "global-header");
  hdr->use_lf_delta_ = VP8Get(br, "global-header");
  if (hdr->use_lf_delta_) {
    if (VP8Get(br, "global-header")) {   // update lf-delta?
      int i;
      for (i = 0; i < NUM_REF_LF_DELTAS; ++i) {
        if (VP8Get(br, "global-header")) {
          hdr->ref_lf_delta_[i] = VP8GetSignedValue(br, 6, "global-header");
        }
      }
      for (i = 0; i < NUM_MODE_LF_DELTAS; ++i) {
        if (VP8Get(br, "global-header")) {
          hdr->mode_lf_delta_[i] = VP8GetSignedValue(br, 6, "global-header");
        }
      }
    }
  }
  dec->filter_type_ = (hdr->level_ == 0) ? 0 : hdr->simple_ ? 1 : 2;
  return !br->eof_;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, %esi
callq 0xefc15
movl %eax, 0x54(%r14)
movq %rbx, %rdi
movl $0x6, %esi
callq 0xefc15
movl %eax, 0x58(%r14)
movq %rbx, %rdi
movl $0x3, %esi
callq 0xefc15
movl %eax, 0x5c(%r14)
movq %rbx, %rdi
movl $0x1, %esi
callq 0xefc15
movl %eax, 0x60(%r14)
testl %eax, %eax
je 0xd1ec5
movq %rbx, %rdi
movl $0x1, %esi
callq 0xefc15
testl %eax, %eax
je 0xd1ec5
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x1, %esi
callq 0xefc15
testl %eax, %eax
je 0xd1e8d
movq %rbx, %rdi
movl $0x6, %esi
callq 0xefd0b
movl %eax, 0x64(%r14,%r15,4)
incq %r15
cmpq $0x4, %r15
jne 0xd1e6a
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x1, %esi
callq 0xefc15
testl %eax, %eax
je 0xd1ebc
movq %rbx, %rdi
movl $0x6, %esi
callq 0xefd0b
movl %eax, 0x74(%r14,%r15,4)
incq %r15
cmpq $0x4, %r15
jne 0xd1e99
cmpl $0x0, 0x58(%r14)
je 0xd1ed8
xorl %eax, %eax
cmpl $0x1, 0x54(%r14)
adcl $0x1, %eax
jmp 0xd1eda
xorl %eax, %eax
movl %eax, 0xb68(%r14)
xorl %eax, %eax
cmpl $0x0, 0x28(%rbx)
sete %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8_dec.c
// Function: ParsePartitions
static VP8StatusCode ParsePartitions(VP8Decoder* const dec,
                                     const uint8_t* buf, size_t size) {
  VP8BitReader* const br = &dec->br_;
  const uint8_t* sz = buf;
  const uint8_t* buf_end = buf + size;
  const uint8_t* part_start;
  size_t size_left = size;
  size_t last_part;
  size_t p;

  dec->num_parts_minus_one_ = (1 << VP8GetValue(br, 2, "global-header")) - 1;
  last_part = dec->num_parts_minus_one_;
  if (size < 3 * last_part) {
    // we can't even read the sizes with sz[]! That's a failure.
    return VP8_STATUS_NOT_ENOUGH_DATA;
  }
  part_start = buf + last_part * 3;
  size_left -= last_part * 3;
  for (p = 0; p < last_part; ++p) {
    size_t psize = sz[0] | (sz[1] << 8) | (sz[2] << 16);
    if (psize > size_left) psize = size_left;
    VP8InitBitReader(dec->parts_ + p, part_start, psize);
    part_start += psize;
    size_left -= psize;
    sz += 3;
  }
  VP8InitBitReader(dec->parts_ + last_part, part_start, size_left);
  if (part_start < buf_end) return VP8_STATUS_OK;
  return dec->incremental_
             ? VP8_STATUS_SUSPENDED  // Init is ok, but there's not enough data
             : VP8_STATUS_NOT_ENOUGH_DATA;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
addq $0x10, %rdi
movl $0x2, %esi
callq 0xefc15
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %edx
notl %edx
movl %edx, 0x1b0(%rbx)
leaq (%rdx,%rdx,2), %rsi
movl $0x7, %ecx
movq %r14, %r12
subq %rsi, %r12
jb 0xd1fe8
addq %r15, %r14
movq %r14, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
leaq (%r15,%rsi), %r13
testl %eax, %eax
movq %rbx, 0x18(%rsp)
je 0xd1fab
leaq 0x1b8(%rbx), %rbp
cmpq $0x1, %rdx
adcq $0x0, %rdx
leaq (%rdx,%rdx,2), %rax
movq %rax, 0x20(%rsp)
xorl %ebx, %ebx
movzwl (%r15,%rbx), %eax
movzbl 0x2(%r15,%rbx), %r14d
shll $0x10, %r14d
orq %rax, %r14
cmpq %r12, %r14
cmovaeq %r12, %r14
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0xefab2
addq %r14, %r13
subq %r14, %r12
addq $0x3, %rbx
addq $0x30, %rbp
cmpq %rbx, 0x20(%rsp)
jne 0xd1f6f
movq 0x8(%rsp), %rax
shlq $0x4, %rax
movq 0x18(%rsp), %rbx
leaq (%rbx,%rax), %rdi
addq $0x1b8, %rdi            # imm = 0x1B8
movq %r13, %rsi
movq %r12, %rdx
callq 0xefab2
xorl %ecx, %ecx
cmpq 0x10(%rsp), %r13
jb 0xd1fe8
xorl %eax, %eax
cmpl $0x0, 0x40(%rbx)
sete %al
leal 0x5(,%rax,2), %ecx
movl %ecx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: VP8LGetInfo
int VP8LGetInfo(const uint8_t* data, size_t data_size,
                int* const width, int* const height, int* const has_alpha) {
  if (data == NULL || data_size < VP8L_FRAME_HEADER_SIZE) {
    return 0;         // not enough data
  } else if (!VP8LCheckSignature(data, data_size)) {
    return 0;         // bad signature
  } else {
    int w, h, a;
    VP8LBitReader br;
    VP8LInitBitReader(&br, data, data_size);
    if (!ReadImageInfo(&br, &w, &h, &a)) {
      return 0;
    }
    if (width != NULL) *width = w;
    if (height != NULL) *height = h;
    if (has_alpha != NULL) *has_alpha = a;
    return 1;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %rsi
testq %rdi, %rdi
sete %cl
cmpq $0x5, %rdx
setb %dil
xorl %eax, %eax
orb %cl, %dil
jne 0xd36a5
cmpb $0x2f, (%rsi)
jne 0xd36a5
cmpb $0x1f, 0x4(%rsi)
ja 0xd36a5
movq %r8, %rbx
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0xefd37
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r12, %rdi
callq 0xd36b1
testl %eax, %eax
je 0xd36a3
testq %r15, %r15
je 0xd3685
movl 0xc(%rsp), %eax
movl %eax, (%r15)
testq %r14, %r14
je 0xd3691
movl 0x8(%rsp), %eax
movl %eax, (%r14)
movl $0x1, %eax
testq %rbx, %rbx
je 0xd36a5
movl 0x4(%rsp), %ecx
movl %ecx, (%rbx)
jmp 0xd36a5
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: ReadImageInfo
static int ReadImageInfo(VP8LBitReader* const br,
                         int* const width, int* const height,
                         int* const has_alpha) {
  if (VP8LReadBits(br, 8) != VP8L_MAGIC_BYTE) return 0;
  *width = VP8LReadBits(br, VP8L_IMAGE_SIZE_BITS) + 1;
  *height = VP8LReadBits(br, VP8L_IMAGE_SIZE_BITS) + 1;
  *has_alpha = VP8LReadBits(br, 1);
  if (VP8LReadBits(br, VP8L_VERSION_BITS) != 0) return 0;
  return !br->eos_;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
movl $0x8, %esi
callq 0xeffac
xorl %ebx, %ebx
cmpl $0x2f, %eax
jne 0xd3728
movq %r14, %rdi
movl $0xe, %esi
callq 0xeffac
incl %eax
movl %eax, (%r13)
movq %r14, %rdi
movl $0xe, %esi
callq 0xeffac
incl %eax
movl %eax, (%r12)
movq %r14, %rdi
movl $0x1, %esi
callq 0xeffac
movl %eax, (%r15)
movq %r14, %rdi
movl $0x3, %esi
callq 0xeffac
testl %eax, %eax
jne 0xd3728
xorl %ebx, %ebx
cmpl $0x0, 0x24(%r14)
sete %bl
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: VP8LNew
VP8LDecoder* VP8LNew(void) {
  VP8LDecoder* const dec = (VP8LDecoder*)WebPSafeCalloc(1ULL, sizeof(*dec));
  if (dec == NULL) return NULL;
  dec->status_ = VP8_STATUS_OK;
  dec->state_ = READ_DIM;

  VP8LDspInit();  // Init critical function pointers.

  return dec;
}

// Assembly:
pushq %rbx
movl $0x1, %edi
movl $0x190, %esi            # imm = 0x190
callq 0x56580
movq %rax, %rbx
testq %rax, %rax
je 0xd3e92
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, (%rbx)
callq 0xdab3f
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: VP8LClear
void VP8LClear(VP8LDecoder* const dec) {
  int i;
  if (dec == NULL) return;
  ClearMetadata(&dec->hdr_);

  WebPSafeFree(dec->pixels_);
  dec->pixels_ = NULL;
  for (i = 0; i < dec->next_transform_; ++i) {
    ClearTransform(&dec->transforms_[i]);
  }
  dec->next_transform_ = 0;
  dec->transforms_seen_ = 0;

  WebPSafeFree(dec->rescaler_memory);
  dec->rescaler_memory = NULL;

  dec->output_ = NULL;   // leave no trace behind
}

// Assembly:
testq %rdi, %rdi
je 0xd3f27
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x98, %rdi
callq 0xd3f28
movq 0x18(%rbx), %rdi
callq 0x57290
movq $0x0, 0x18(%rbx)
cmpl $0x0, 0x110(%rbx)
jle 0xd3efa
leaq 0x128(%rbx), %r14
xorl %r15d, %r15d
movq (%r14), %rdi
callq 0x57290
movq $0x0, (%r14)
incq %r15
movslq 0x110(%rbx), %rax
addq $0x18, %r14
cmpq %rax, %r15
jl 0xd3ed8
xorl %r14d, %r14d
movl %r14d, 0x110(%rbx)
movl %r14d, 0x178(%rbx)
movq 0x180(%rbx), %rdi
callq 0x57290
movq %r14, 0x180(%rbx)
movq %r14, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: ClearMetadata
static void ClearMetadata(VP8LMetadata* const hdr) {
  assert(hdr != NULL);

  WebPSafeFree(hdr->huffman_image_);
  VP8LHuffmanTablesDeallocate(&hdr->huffman_tables_);
  VP8LHtreeGroupsFree(hdr->htree_groups_);
  VP8LColorCacheClear(&hdr->color_cache_);
  VP8LColorCacheClear(&hdr->saved_color_cache_);
  InitMetadata(hdr);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0xd3f86
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
callq 0x57290
leaq 0x50(%rbx), %rdi
callq 0xf0967
movq 0x48(%rbx), %rdi
callq 0xf0185
leaq 0x8(%rbx), %rdi
callq 0xf009e
leaq 0x18(%rbx), %rdi
callq 0xf009e
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq $0x0, 0x70(%rbx)
popq %rbx
retq
leaq 0x55bda(%rip), %rdi     # 0x129b67
leaq 0x55955(%rip), %rsi     # 0x1298e9
leaq 0x55bd8(%rip), %rcx     # 0x129b73
movl $0x573, %edx            # imm = 0x573
callq 0x55710
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: VP8LDecodeAlphaHeader
int VP8LDecodeAlphaHeader(ALPHDecoder* const alph_dec,
                          const uint8_t* const data, size_t data_size) {
  int ok = 0;
  VP8LDecoder* dec = VP8LNew();

  if (dec == NULL) return 0;

  assert(alph_dec != NULL);

  dec->width_ = alph_dec->width_;
  dec->height_ = alph_dec->height_;
  dec->io_ = &alph_dec->io_;
  dec->io_->opaque = alph_dec;
  dec->io_->width = alph_dec->width_;
  dec->io_->height = alph_dec->height_;

  dec->status_ = VP8_STATUS_OK;
  VP8LInitBitReader(&dec->br_, data, data_size);

  if (!DecodeImageStream(alph_dec->width_, alph_dec->height_, /*is_level0=*/1,
                         dec, /*decoded_data=*/NULL)) {
    goto Err;
  }

  // Special case: if alpha data uses only the color indexing transform and
  // doesn't use color cache (a frequent case), we will use DecodeAlphaData()
  // method that only needs allocation of 1 byte per pixel (alpha channel).
  if (dec->next_transform_ == 1 &&
      dec->transforms_[0].type_ == COLOR_INDEXING_TRANSFORM &&
      Is8bOptimizable(&dec->hdr_)) {
    alph_dec->use_8b_decode_ = 1;
    ok = AllocateInternalBuffers8b(dec);
  } else {
    // Allocate internal buffers (note that dec->width_ may have changed here).
    alph_dec->use_8b_decode_ = 0;
    ok = AllocateInternalBuffers32b(dec, alph_dec->width_);
  }

  if (!ok) goto Err;

  // Only set here, once we are sure it is valid (to avoid thread races).
  alph_dec->vp8l_dec_ = dec;
  return 1;

 Err:
  VP8LDelete(dec);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
callq 0xd3e68
testq %rax, %rax
je 0xd40b6
testq %r14, %r14
je 0xd4100
movq %rax, %rbx
movl (%r14), %eax
movl %eax, 0x84(%rbx)
movl 0x4(%r14), %ecx
movl %ecx, 0x88(%rbx)
leaq 0x20(%r14), %rdx
movq %rdx, 0x8(%rbx)
movq %r14, 0x58(%r14)
movl %eax, 0x20(%r14)
movl %ecx, 0x24(%r14)
movl $0x0, (%rbx)
leaq 0x28(%rbx), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xefd37
movl (%r14), %edi
movl 0x4(%r14), %esi
xorl %r15d, %r15d
movl $0x1, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0xd411f
testl %eax, %eax
je 0xd40e1
cmpl $0x1, 0x110(%rbx)
jne 0xd40bb
cmpl $0x3, 0x118(%rbx)
jne 0xd40bb
movq %rbx, %rdi
addq $0x98, %rdi
callq 0xd4832
testl %eax, %eax
je 0xd40bb
movl $0x1, 0xc0(%r14)
movslq 0x84(%rbx), %rax
movslq 0x88(%rbx), %rdi
imulq %rax, %rdi
movq $0x0, 0x20(%rbx)
movl $0x1, %esi
callq 0x56b20
movq %rax, 0x18(%rbx)
testq %rax, %rax
jne 0xd40d5
movl (%rbx), %eax
cmpl $0x5, %eax
je 0xd40ae
testl %eax, %eax
jne 0xd40e1
movl $0x1, (%rbx)
jmp 0xd40e1
xorl %r15d, %r15d
jmp 0xd40f1
movl $0x0, 0xc0(%r14)
movl (%r14), %esi
movq %rbx, %rdi
callq 0xd4884
testl %eax, %eax
je 0xd40e1
movq %rbx, 0x18(%r14)
movl $0x1, %r15d
jmp 0xd40f1
movq %rbx, %rdi
callq 0xd3e97
movq %rbx, %rdi
callq 0x57290
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x557d1(%rip), %rdi     # 0x1298d8
leaq 0x557db(%rip), %rsi     # 0x1298e9
leaq 0x557e7(%rip), %rcx     # 0x1298fc
movl $0x64c, %edx            # imm = 0x64C
callq 0x55710
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: Is8bOptimizable
static int Is8bOptimizable(const VP8LMetadata* const hdr) {
  int i;
  if (hdr->color_cache_size_ > 0) return 0;
  // When the Huffman tree contains only one symbol, we can skip the
  // call to ReadSymbol() for red/blue/alpha channels.
  for (i = 0; i < hdr->num_htree_groups_; ++i) {
    HuffmanCode** const htrees = hdr->htree_groups_[i].htrees;
    if (htrees[RED][0].bits > 0) return 0;
    if (htrees[BLUE][0].bits > 0) return 0;
    if (htrees[ALPHA][0].bits > 0) return 0;
  }
  return 1;
}

// Assembly:
xorl %eax, %eax
cmpl $0x0, (%rdi)
jle 0xd483a
retq
movslq 0x40(%rdi), %rdx
movl $0x1, %eax
testq %rdx, %rdx
jle 0xd4839
movq 0x48(%rdi), %rcx
imulq $0x238, %rdx, %rdx      # imm = 0x238
xorl %esi, %esi
movq 0x8(%rcx,%rsi), %rdi
cmpb $0x0, (%rdi)
jne 0xd4881
movq 0x10(%rcx,%rsi), %rdi
cmpb $0x0, (%rdi)
jne 0xd4881
movq 0x18(%rcx,%rsi), %rdi
cmpb $0x0, (%rdi)
jne 0xd4881
addq $0x238, %rsi            # imm = 0x238
cmpq %rsi, %rdx
jne 0xd4855
jmp 0xd4839
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: AllocateInternalBuffers32b
static int AllocateInternalBuffers32b(VP8LDecoder* const dec, int final_width) {
  const uint64_t num_pixels = (uint64_t)dec->width_ * dec->height_;
  // Scratch buffer corresponding to top-prediction row for transforming the
  // first row in the row-blocks. Not needed for paletted alpha.
  const uint64_t cache_top_pixels = (uint16_t)final_width;
  // Scratch buffer for temporary BGRA storage. Not needed for paletted alpha.
  const uint64_t cache_pixels = (uint64_t)final_width * NUM_ARGB_CACHE_ROWS;
  const uint64_t total_num_pixels =
      num_pixels + cache_top_pixels + cache_pixels;

  assert(dec->width_ <= final_width);
  dec->pixels_ = (uint32_t*)WebPSafeMalloc(total_num_pixels, sizeof(uint32_t));
  if (dec->pixels_ == NULL) {
    dec->argb_cache_ = NULL;    // for soundness
    return VP8LSetError(dec, VP8_STATUS_OUT_OF_MEMORY);
  }
  dec->argb_cache_ = dec->pixels_ + num_pixels + cache_top_pixels;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movslq 0x84(%rdi), %rax
cmpl %esi, %eax
jg 0xd48fa
movq %rdi, %rbx
movslq 0x88(%rdi), %r14
imulq %rax, %r14
movzwl %si, %r15d
movslq %esi, %rdi
shlq $0x4, %rdi
addq %r15, %rdi
addq %r14, %rdi
movl $0x4, %esi
callq 0x56b20
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0xd48d9
leaq (%rax,%r14,4), %rax
leaq (%rax,%r15,4), %rax
movq %rax, 0x20(%rbx)
movl $0x1, %eax
jmp 0xd48f4
movq $0x0, 0x20(%rbx)
movl (%rbx), %ecx
xorl %eax, %eax
cmpl $0x5, %ecx
je 0xd48ee
testl %ecx, %ecx
jne 0xd48f4
movl $0x1, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x553dd(%rip), %rdi     # 0x129cde
leaq 0x54fe1(%rip), %rsi     # 0x1298e9
leaq 0x553ea(%rip), %rcx     # 0x129cf9
movl $0x612, %edx            # imm = 0x612
callq 0x55710
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: ExtractAlphaRows
static void ExtractAlphaRows(VP8LDecoder* const dec, int last_row) {
  int cur_row = dec->last_row_;
  int num_rows = last_row - cur_row;
  const uint32_t* in = dec->pixels_ + dec->width_ * cur_row;

  assert(last_row <= dec->io_->crop_bottom);
  while (num_rows > 0) {
    const int num_rows_to_process =
        (num_rows > NUM_ARGB_CACHE_ROWS) ? NUM_ARGB_CACHE_ROWS : num_rows;
    // Extract alpha (which is stored in the green plane).
    ALPHDecoder* const alph_dec = (ALPHDecoder*)dec->io_->opaque;
    uint8_t* const output = alph_dec->output_;
    const int width = dec->io_->width;      // the final width (!= dec->width_)
    const int cache_pixs = width * num_rows_to_process;
    uint8_t* const dst = output + width * cur_row;
    const uint32_t* const src = dec->argb_cache_;
    ApplyInverseTransforms(dec, cur_row, num_rows_to_process, in);
    WebPExtractGreen(src, dst, cache_pixs);
    AlphaApplyFilter(alph_dec,
                     cur_row, cur_row + num_rows_to_process, dst, width);
    num_rows -= num_rows_to_process;
    in += num_rows_to_process * dec->width_;
    cur_row += num_rows_to_process;
  }
  assert(cur_row == last_row);
  dec->last_row_ = dec->last_out_row_ = last_row;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x8(%rdi), %rax
cmpl %esi, 0x84(%rax)
jl 0xd5d79
movslq 0x8c(%rdi), %rcx
movl %esi, 0x8(%rsp)
movl %esi, %r15d
subl %ecx, %r15d
testl %r15d, %r15d
jle 0xd5d54
movslq 0x84(%rdi), %r12
imulq %rcx, %r12
shlq $0x2, %r12
addq 0x18(%rdi), %r12
movq %rdi, 0x10(%rsp)
cmpl $0x10, %r15d
movl $0x10, %r13d
cmovbl %r15d, %r13d
movq 0x8(%rdi), %rax
movq 0x20(%rdi), %rdx
movq %rdx, 0x18(%rsp)
movq 0x38(%rax), %rdx
movq %rdx, 0x20(%rsp)
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movl %eax, %r14d
imull %r13d, %r14d
imull %ecx, %eax
movslq %eax, %rbx
addq 0xc8(%rdx), %rbx
movq 0x10(%rsp), %rdi
movl %ecx, %esi
movl %r13d, %edx
movq %rcx, %rbp
movq %r12, %rcx
callq 0xd6ae6
movq 0x18(%rsp), %rdi
movq %rbx, %rsi
movl %r14d, %edx
leaq 0xa551c(%rip), %rax     # 0x17b230
callq *(%rax)
movq %rbp, %rsi
addl %r13d, %ebp
movq 0x20(%rsp), %rdi
movl %ebp, %edx
movq %rbx, %rcx
movl 0xc(%rsp), %r8d
callq 0xd690e
movq 0x10(%rsp), %rdi
movslq 0x84(%rdi), %rax
movq %r13, %rcx
imulq %rax, %rcx
leaq (%r12,%rcx,4), %r12
movl %ebp, %ecx
subl %r13d, %r15d
jg 0xd5caf
jmp 0xd5d56
movl %ecx, %ebp
movl 0x8(%rsp), %eax
cmpl %eax, %ebp
jne 0xd5d98
movl %eax, 0x94(%rdi)
movl %eax, 0x8c(%rdi)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x540a2(%rip), %rdi     # 0x129e22
leaq 0x53b62(%rip), %rsi     # 0x1298e9
leaq 0x54501(%rip), %rcx     # 0x12a28f
movl $0x62e, %edx            # imm = 0x62E
callq 0x55710
leaq 0x5451f(%rip), %rdi     # 0x12a2be
leaq 0x53b43(%rip), %rsi     # 0x1298e9
leaq 0x544e2(%rip), %rcx     # 0x12a28f
movl $0x641, %edx            # imm = 0x641
callq 0x55710
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: VP8LDecodeHeader
int VP8LDecodeHeader(VP8LDecoder* const dec, VP8Io* const io) {
  int width, height, has_alpha;

  if (dec == NULL) return 0;
  if (io == NULL) {
    return VP8LSetError(dec, VP8_STATUS_INVALID_PARAM);
  }

  dec->io_ = io;
  dec->status_ = VP8_STATUS_OK;
  VP8LInitBitReader(&dec->br_, io->data, io->data_size);
  if (!ReadImageInfo(&dec->br_, &width, &height, &has_alpha)) {
    VP8LSetError(dec, VP8_STATUS_BITSTREAM_ERROR);
    goto Error;
  }
  dec->state_ = READ_DIM;
  io->width = width;
  io->height = height;

  if (!DecodeImageStream(width, height, /*is_level0=*/1, dec,
                         /*decoded_data=*/NULL)) {
    goto Error;
  }
  return 1;

 Error:
  VP8LClear(dec);
  assert(dec->status_ != VP8_STATUS_OK);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
xorl %ebp, %ebp
testq %rdi, %rdi
je 0xd5e77
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0xd5e41
movq %r14, 0x8(%rbx)
movl $0x0, (%rbx)
leaq 0x28(%rbx), %r15
movq 0x60(%r14), %rdx
movq 0x68(%r14), %rsi
movq %r15, %rdi
callq 0xefd37
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x14(%rsp), %rcx
movq %r15, %rdi
callq 0xd36b1
testl %eax, %eax
je 0xd5e54
movl $0x2, 0x4(%rbx)
movl 0x10(%rsp), %edi
movl %edi, (%r14)
movl 0xc(%rsp), %esi
movl %esi, 0x4(%r14)
movl $0x1, %ebp
movl $0x1, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0xd411f
testl %eax, %eax
jne 0xd5e77
jmp 0xd5e65
movl (%rbx), %eax
cmpl $0x5, %eax
je 0xd5e4c
testl %eax, %eax
jne 0xd5e77
movl $0x2, (%rbx)
jmp 0xd5e77
movl (%rbx), %eax
cmpl $0x5, %eax
je 0xd5e5f
testl %eax, %eax
jne 0xd5e65
movl $0x3, (%rbx)
movq %rbx, %rdi
callq 0xd3e97
cmpl $0x0, (%rbx)
movl $0x0, %ebp
je 0xd5e84
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x53b0e(%rip), %rdi     # 0x129999
leaq 0x53a57(%rip), %rsi     # 0x1298e9
leaq 0x53b1e(%rip), %rcx     # 0x1299b7
movl $0x6a6, %edx            # imm = 0x6A6
callq 0x55710
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: AccumulateHCode
static int AccumulateHCode(HuffmanCode hcode, int shift,
                           HuffmanCode32* const huff) {
  huff->bits += hcode.bits;
  huff->value |= (uint32_t)hcode.value << shift;
  assert(huff->bits <= HUFFMAN_TABLE_BITS);
  return hcode.bits;
}

// Assembly:
movl %esi, %ecx
movzbl %dil, %eax
shrl $0x10, %edi
movl (%rdx), %esi
addl %eax, %esi
movl %esi, (%rdx)
shll %cl, %edi
orl %edi, 0x4(%rdx)
cmpl $0x9, %esi
jge 0xd6771
retq
pushq %rax
leaq 0x53391(%rip), %rdi     # 0x129b0a
leaq 0x53169(%rip), %rsi     # 0x1298e9
leaq 0x533a4(%rip), %rcx     # 0x129b2b
movl $0xe8, %edx
callq 0x55710
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: GetHtreeGroupForPos
static WEBP_INLINE HTreeGroup* GetHtreeGroupForPos(VP8LMetadata* const hdr,
                                                   int x, int y) {
  const int meta_index = GetMetaIndex(hdr->huffman_image_, hdr->huffman_xsize_,
                                      hdr->huffman_subsample_bits_, x, y);
  assert(meta_index < hdr->num_htree_groups_);
  return hdr->htree_groups_ + meta_index;
}

// Assembly:
movl 0x2c(%rdi), %ecx
testl %ecx, %ecx
je 0xd67ae
sarl %cl, %edx
imull 0x30(%rdi), %edx
sarl %cl, %esi
movq 0x38(%rdi), %rax
addl %edx, %esi
movslq %esi, %rcx
movl (%rax,%rcx,4), %eax
jmp 0xd67b0
xorl %eax, %eax
cmpl 0x40(%rdi), %eax
jge 0xd67c3
cltq
imulq $0x238, %rax, %rax      # imm = 0x238
addq 0x48(%rdi), %rax
retq
pushq %rax
leaq 0x535f4(%rip), %rdi     # 0x129dbf
leaq 0x53117(%rip), %rsi     # 0x1298e9
leaq 0x5360a(%rip), %rcx     # 0x129de3
movl $0x30a, %edx            # imm = 0x30A
callq 0x55710
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: ExtractPalettedAlphaRows
static void ExtractPalettedAlphaRows(VP8LDecoder* const dec, int last_row) {
  // For vertical and gradient filtering, we need to decode the part above the
  // crop_top row, in order to have the correct spatial predictors.
  ALPHDecoder* const alph_dec = (ALPHDecoder*)dec->io_->opaque;
  const int top_row =
      (alph_dec->filter_ == WEBP_FILTER_NONE ||
       alph_dec->filter_ == WEBP_FILTER_HORIZONTAL) ? dec->io_->crop_top
                                                    : dec->last_row_;
  const int first_row = (dec->last_row_ < top_row) ? top_row : dec->last_row_;
  assert(last_row <= dec->io_->crop_bottom);
  if (last_row > first_row) {
    // Special method for paletted alpha data. We only process the cropped area.
    const int width = dec->io_->width;
    uint8_t* out = alph_dec->output_ + width * first_row;
    const uint8_t* const in =
      (uint8_t*)dec->pixels_ + dec->width_ * first_row;
    VP8LTransform* const transform = &dec->transforms_[0];
    assert(dec->next_transform_ == 1);
    assert(transform->type_ == COLOR_INDEXING_TRANSFORM);
    VP8LColorIndexInverseTransformAlpha(transform, first_row, last_row,
                                        in, out);
    AlphaApplyFilter(alph_dec, first_row, last_row, out, width);
  }
  dec->last_row_ = dec->last_out_row_ = last_row;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
movq 0x38(%rax), %r14
leaq 0x80(%rax), %rcx
leaq 0x8c(%rdi), %rdx
cmpl $0x2, 0xc(%r14)
cmovbq %rcx, %rdx
movl (%rdx), %r15d
movl 0x8c(%rdi), %ecx
cmpl %r15d, %ecx
cmovgl %ecx, %r15d
cmpl %esi, 0x84(%rax)
jl 0xd68b1
movq %rdi, %rbx
movl %esi, %ebp
cmpl %esi, %r15d
jge 0xd6896
cmpl $0x1, 0x110(%rbx)
jne 0xd68d0
leaq 0x118(%rbx), %rdi
cmpl $0x3, (%rdi)
jne 0xd68ef
movl (%rax), %r12d
movl %r12d, %eax
imull %r15d, %eax
movslq %eax, %r13
addq 0xc8(%r14), %r13
movslq 0x84(%rbx), %rax
movslq %r15d, %rcx
imulq %rax, %rcx
addq 0x18(%rbx), %rcx
movl %r15d, %esi
movl %ebp, %edx
movq %r13, %r8
callq 0xda305
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
movq %r13, %rcx
movl %r12d, %r8d
callq 0xd690e
movl %ebp, 0x94(%rbx)
movl %ebp, 0x8c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5356a(%rip), %rdi     # 0x129e22
leaq 0x5302a(%rip), %rsi     # 0x1298e9
leaq 0x5357e(%rip), %rcx     # 0x129e44
movl $0x380, %edx            # imm = 0x380
callq 0x55710
leaq 0x535a4(%rip), %rdi     # 0x129e7b
leaq 0x5300b(%rip), %rsi     # 0x1298e9
leaq 0x5355f(%rip), %rcx     # 0x129e44
movl $0x388, %edx            # imm = 0x388
callq 0x55710
leaq 0x5359f(%rip), %rdi     # 0x129e95
leaq 0x52fec(%rip), %rsi     # 0x1298e9
leaq 0x53540(%rip), %rcx     # 0x129e44
movl $0x389, %edx            # imm = 0x389
callq 0x55710
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: AlphaApplyFilter
static void AlphaApplyFilter(ALPHDecoder* const alph_dec,
                             int first_row, int last_row,
                             uint8_t* out, int stride) {
  if (alph_dec->filter_ != WEBP_FILTER_NONE) {
    int y;
    const uint8_t* prev_line = alph_dec->prev_line_;
    assert(WebPUnfilters[alph_dec->filter_] != NULL);
    for (y = first_row; y < last_row; ++y) {
      WebPUnfilters[alph_dec->filter_](prev_line, out, out, stride);
      prev_line = out;
      out += stride;
    }
    alph_dec->prev_line_ = prev_line;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0xc(%rdi), %eax
testq %rax, %rax
je 0xd696a
leaq 0xa4acb(%rip), %r12     # 0x17b3f0
cmpq $0x0, (%r12,%rax,8)
je 0xd6973
movl %edx, %ebp
movq %rdi, %rbx
movq 0xd0(%rdi), %rdi
subl %esi, %ebp
jle 0xd6963
movslq %r8d, %r14
movq %rcx, %r15
movl 0xc(%rbx), %eax
movq %rcx, %rsi
movq %rcx, %rdx
movl %r14d, %ecx
callq *(%r12,%rax,8)
leaq (%r15,%r14), %rcx
movq %r15, %rdi
decl %ebp
jne 0xd693f
subq %r14, %rcx
movq %rcx, %rdi
movq %rdi, 0xd0(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x53548(%rip), %rdi     # 0x129ec2
leaq 0x52f68(%rip), %rsi     # 0x1298e9
leaq 0x53563(%rip), %rcx     # 0x129eeb
movl $0x36d, %edx            # imm = 0x36D
callq 0x55710
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: CopyBlock32b
static WEBP_INLINE void CopyBlock32b(uint32_t* const dst,
                                     int dist, int length) {
  const uint32_t* const src = dst - dist;
  if (dist <= 2 && length >= 4 && ((uintptr_t)dst & 3) == 0) {
    uint64_t pattern;
    if (dist == 1) {
      pattern = (uint64_t)src[0];
      pattern |= pattern << 32;
    } else {
      memcpy(&pattern, src, sizeof(pattern));
    }
    CopySmallPattern32b(src, dst, length, pattern);
  } else if (dist >= length) {  // no overlap
    memcpy(dst, src, length * sizeof(*dst));
  } else {
    int i;
    for (i = 0; i < length; ++i) dst[i] = src[i];
  }
}

// Assembly:
pushq %rax
movl %esi, %eax
movslq %esi, %rcx
shlq $0x2, %rcx
movq %rdi, %rsi
subq %rcx, %rsi
testb $0x3, %dil
jne 0xd69c5
cmpl $0x2, %eax
jg 0xd69c5
cmpl $0x4, %edx
jl 0xd69c5
cmpl $0x1, %eax
jne 0xd69ed
movl (%rsi), %ecx
movq %rcx, %rax
shlq $0x20, %rax
orq %rcx, %rax
jmp 0xd69f3
cmpl %edx, %eax
jge 0xd6aba
testl %edx, %edx
jle 0xd6ab8
movl %edx, %eax
negq %rcx
movl (%rdi,%rcx), %edx
movl %edx, (%rdi)
addq $0x4, %rdi
decq %rax
jne 0xd69da
jmp 0xd6ab8
movq (%rsi), %rcx
movq %rcx, %rax
testb $0x4, %dil
je 0xd6a09
addq $0x4, %rsi
movl %ecx, (%rdi)
addq $0x4, %rdi
rolq $0x20, %rax
decl %edx
testb $0x7, %dil
jne 0xd6ac7
movl %edx, %ecx
shrl %ecx
leaq -0x1(%rcx), %r8
incl %ecx
andl $-0x2, %ecx
movq %r8, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x3c33e(%rip), %xmm1    # 0x112d70
xorl %r8d, %r8d
movdqa 0x3c343(%rip), %xmm2    # 0x112d80
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x52db3(%rip), %xmm4    # 0x129800
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %r9d
notl %r9d
testb $0x1, %r9b
je 0xd6a85
movq %rax, (%rdi,%r8,8)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %r9d
testb $0x1, %r9b
je 0xd6a9a
movq %rax, 0x8(%rdi,%r8,8)
addq $0x2, %r8
paddq %xmm4, %xmm1
cmpq %r8, %rcx
jne 0xd6a4d
testb $0x1, %dl
je 0xd6ab8
andl $-0x2, %edx
movslq %edx, %rax
movl (%rsi,%rax,4), %ecx
movl %ecx, (%rdi,%rax,4)
popq %rax
retq
movslq %edx, %rdx
shlq $0x2, %rdx
popq %rax
jmp 0x552d0
leaq 0x53696(%rip), %rdi     # 0x12a164
leaq 0x52e14(%rip), %rsi     # 0x1298e9
leaq 0x536a2(%rip), %rcx     # 0x12a17e
movl $0x3ec, %edx            # imm = 0x3EC
callq 0x55710
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: ApplyInverseTransforms
static void ApplyInverseTransforms(VP8LDecoder* const dec,
                                   int start_row, int num_rows,
                                   const uint32_t* const rows) {
  int n = dec->next_transform_;
  const int cache_pixs = dec->width_ * num_rows;
  const int end_row = start_row + num_rows;
  const uint32_t* rows_in = rows;
  uint32_t* const rows_out = dec->argb_cache_;

  // Inverse transforms.
  while (n-- > 0) {
    VP8LTransform* const transform = &dec->transforms_[n];
    VP8LInverseTransform(transform, start_row, end_row, rows_in, rows_out);
    rows_in = rows_out;
  }
  if (rows_in != rows_out) {
    // No transform called, hence just copy.
    memcpy(rows_out, rows_in, cache_pixs * sizeof(*rows_out));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movslq 0x110(%rdi), %r12
movq 0x20(%rdi), %r14
testq %r12, %r12
jle 0xd6b3e
movl %esi, %ebp
addl %esi, %ebx
leaq (%r12,%r12,2), %rax
incq %r12
leaq (%rdi,%rax,8), %r15
addq $0x100, %r15            # imm = 0x100
movq %r15, %rdi
movl %ebp, %esi
movl %ebx, %edx
movq %r14, %r8
callq 0xda3a3
decq %r12
addq $-0x18, %r15
movq %r14, %rcx
cmpq $0x1, %r12
ja 0xd6b16
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpq %rcx, %r14
je 0xd6b35
movslq 0x84(%rdi), %rax
movslq %ebx, %rdx
imulq %rax, %rdx
shlq $0x2, %rdx
movq %r14, %rdi
movq %rcx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x552d0
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: ConvertToYUVA
static void ConvertToYUVA(const uint32_t* const src, int width, int y_pos,
                          const WebPDecBuffer* const output) {
  const WebPYUVABuffer* const buf = &output->u.YUVA;

  // first, the luma plane
  WebPConvertARGBToY(src, buf->y + y_pos * buf->y_stride, width);

  // then U/V planes
  {
    uint8_t* const u = buf->u + (y_pos >> 1) * buf->u_stride;
    uint8_t* const v = buf->v + (y_pos >> 1) * buf->v_stride;
    // even lines: store values
    // odd lines: average with previous values
    WebPConvertARGBToUV(src, u, v, width, !(y_pos & 1));
  }
  // Lastly, store alpha if needed.
  if (buf->a != NULL) {
    uint8_t* const a = buf->a + y_pos * buf->a_stride;
#if defined(WORDS_BIGENDIAN)
    WebPExtractAlpha((uint8_t*)src + 0, 0, width, 1, a, 0);
#else
    WebPExtractAlpha((uint8_t*)src + 3, 0, width, 1, a, 0);
#endif
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
leaq 0xa4bdf(%rip), %rax     # 0x17b760
movslq 0x30(%rcx), %rsi
movslq %edx, %r12
notl %ebp
imulq %r12, %rsi
addq 0x10(%rcx), %rsi
movl %ebx, %edx
callq *(%rax)
movl %r12d, %eax
sarl %eax
movslq 0x34(%r15), %rsi
cltq
imulq %rax, %rsi
addq 0x18(%r15), %rsi
movslq 0x38(%r15), %rdx
imulq %rax, %rdx
addq 0x20(%r15), %rdx
leaq 0xa4bac(%rip), %rax     # 0x17b768
andl $0x1, %ebp
movq %r14, %rdi
movl %ebx, %ecx
movl %ebp, %r8d
callq *(%rax)
movq 0x28(%r15), %r8
testq %r8, %r8
je 0xd6c04
movslq 0x3c(%r15), %rax
imulq %r12, %rax
addq %rax, %r8
leaq 0xa4644(%rip), %rax     # 0x17b228
movq (%rax), %rax
addq $0x3, %r14
movq %r14, %rdi
xorl %esi, %esi
movl %ebx, %edx
movl $0x1, %ecx
xorl %r9d, %r9d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dsp/alpha_processing.c
// Function: WebPMultARGBRow_C
void WebPMultARGBRow_C(uint32_t* const ptr, int width, int inverse) {
  int x;
  for (x = 0; x < width; ++x) {
    const uint32_t argb = ptr[x];
    if (argb < 0xff000000u) {      // alpha < 255
      if (argb <= 0x00ffffffu) {   // alpha == 0
        ptr[x] = 0;
      } else {
        const uint32_t alpha = (argb >> 24) & 0xff;
        const uint32_t scale = GetScale(alpha, inverse);
        uint32_t out = argb & 0xff000000u;
        out |= Mult(argb >>  0, scale) <<  0;
        out |= Mult(argb >>  8, scale) <<  8;
        out |= Mult(argb >> 16, scale) << 16;
        ptr[x] = out;
      }
    }
  }
}

// Assembly:
testl %esi, %esi
jle 0xd6cc3
pushq %rbx
movl %edx, %ecx
movl %esi, %esi
xorl %r8d, %r8d
movl $0xff, %r9d
movl $0x800000, %r10d        # imm = 0x800000
movl (%rdi,%r8,4), %r11d
cmpl $0xfeffffff, %r11d      # imm = 0xFEFFFFFF
ja 0xd6cb6
xorl %eax, %eax
cmpl $0x1000000, %r11d       # imm = 0x1000000
jb 0xd6cb2
movl %r11d, %ebx
shrl $0x18, %ebx
testl %ecx, %ecx
je 0xd6c59
movl $0xff000000, %eax       # imm = 0xFF000000
xorl %edx, %edx
divl %ebx
jmp 0xd6c5f
imull $0x10101, %ebx, %eax    # imm = 0x10101
movl %r11d, %edx
andl $0xff000000, %edx       # imm = 0xFF000000
movl %r11d, %ebx
andl %r9d, %ebx
imull %eax, %ebx
addl %r10d, %ebx
shrl $0x18, %ebx
orl %edx, %ebx
movl %r11d, %edx
shrl $0x8, %edx
andl %r9d, %edx
imull %eax, %edx
addl %r10d, %edx
shrl $0x10, %edx
andl $0xff00, %edx           # imm = 0xFF00
orl %ebx, %edx
shrl $0x10, %r11d
andl %r9d, %r11d
imull %eax, %r11d
addl %r10d, %r11d
shrl $0x8, %r11d
andl $0xff0000, %r11d        # imm = 0xFF0000
orl %edx, %r11d
movl %r11d, %eax
movl %eax, (%rdi,%r8,4)
incq %r8
cmpq %r8, %rsi
jne 0xd6c2c
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dsp/alpha_processing.c
// Function: WebPMultRow_C
void WebPMultRow_C(uint8_t* WEBP_RESTRICT const ptr,
                   const uint8_t* WEBP_RESTRICT const alpha,
                   int width, int inverse) {
  int x;
  for (x = 0; x < width; ++x) {
    const uint32_t a = alpha[x];
    if (a != 255) {
      if (a == 0) {
        ptr[x] = 0;
      } else {
        const uint32_t scale = GetScale(a, inverse);
        ptr[x] = Mult(ptr[x], scale);
      }
    }
  }
}

// Assembly:
testl %edx, %edx
jle 0xd6d1c
movl %edx, %r8d
xorl %r9d, %r9d
movzbl (%rsi,%r9), %r10d
cmpl $0xff, %r10d
je 0xd6d14
testl %r10d, %r10d
jne 0xd6ce8
movb $0x0, (%rdi,%r9)
jmp 0xd6d14
testl %ecx, %ecx
je 0xd6cf8
movl $0xff000000, %eax       # imm = 0xFF000000
xorl %edx, %edx
divl %r10d
jmp 0xd6cff
imull $0x10101, %r10d, %eax   # imm = 0x10101
movzbl (%rdi,%r9), %edx
imull %eax, %edx
addl $0x800000, %edx         # imm = 0x800000
shrl $0x18, %edx
movb %dl, (%rdi,%r9)
incq %r9
cmpq %r9, %r8
jne 0xd6cce
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dsp/alpha_processing.c
// Function: WebPMultARGBRows
void WebPMultARGBRows(uint8_t* ptr, int stride, int width, int num_rows,
                      int inverse) {
  int n;
  for (n = 0; n < num_rows; ++n) {
    WebPMultARGBRow((uint32_t*)ptr, width, inverse);
    ptr += stride;
  }
}

// Assembly:
testl %ecx, %ecx
jle 0xd6d54
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %r15
movslq %esi, %r12
movq %r15, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq *0xa44b3(%rip)          # 0x17b1f8
addq %r12, %r15
decl %ebp
jne 0xd6d37
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dsp/alpha_processing.c
// Function: WebPMultRows
void WebPMultRows(uint8_t* WEBP_RESTRICT ptr, int stride,
                  const uint8_t* WEBP_RESTRICT alpha, int alpha_stride,
                  int width, int num_rows, int inverse) {
  int n;
  for (n = 0; n < num_rows; ++n) {
    WebPMultRow(ptr, alpha, width, inverse);
    ptr += stride;
    alpha += alpha_stride;
  }
}

// Assembly:
testl %r9d, %r9d
jle 0xd6da1
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %ebp
movq %rdx, %r14
movq %rdi, %r15
movslq %esi, %r13
movslq %ecx, %r12
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl 0x40(%rsp), %ecx
callq *0xa4477(%rip)          # 0x17b200
addq %r13, %r15
addq %r12, %r14
decl %ebx
jne 0xd6d77
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dsp/alpha_processing.c
// Function: ApplyAlphaMultiply_16b_C
static WEBP_INLINE void ApplyAlphaMultiply4444_C(uint8_t* rgba4444,
                                                 int w, int h, int stride,
                                                 int rg_byte_pos /* 0 or 1 */) {
  while (h-- > 0) {
    int i;
    for (i = 0; i < w; ++i) {
      const uint32_t rg = rgba4444[2 * i + rg_byte_pos];
      const uint32_t ba = rgba4444[2 * i + (rg_byte_pos ^ 1)];
      const uint8_t a = ba & 0x0f;
      const uint32_t mult = MULTIPLIER(a);
      const uint8_t r = multiply(dither_hi(rg), mult);
      const uint8_t g = multiply(dither_lo(rg), mult);
      const uint8_t b = multiply(dither_hi(ba), mult);
      rgba4444[2 * i + rg_byte_pos] = (r & 0xf0) | ((g >> 4) & 0x0f);
      rgba4444[2 * i + (rg_byte_pos ^ 1)] = (b & 0xf0) | a;
    }
    rgba4444 += stride;
  }
}

// Assembly:
testl %edx, %edx
jle 0xd7152
pushq %rbp
pushq %r14
pushq %rbx
movslq %ecx, %rax
movl %esi, %ecx
testl %esi, %esi
jle 0xd713b
xorl %r8d, %r8d
movb (%rdi,%r8,2), %bl
movzbl 0x1(%rdi,%r8,2), %r9d
movl %r9d, %r10d
andl $0xf, %r10d
imull $0x1111, %r10d, %ebp    # imm = 0x1111
movl %ebx, %r11d
andb $-0x10, %r11b
movl %ebx, %r14d
shrb $0x4, %r14b
orb %r11b, %r14b
movzbl %r14b, %r11d
imull %ebp, %r11d
shrl $0x10, %r11d
movl %ebx, %r14d
andb $0xf, %r14b
shlb $0x4, %bl
orb %r14b, %bl
movzbl %bl, %ebx
imull %ebp, %ebx
movl %r9d, %r14d
andl $-0x10, %r14d
shrl $0x4, %r9d
orl %r14d, %r9d
imull %ebp, %r9d
shrl $0x10, %r9d
andb $-0x10, %r11b
shrl $0x14, %ebx
orb %r11b, %bl
movb %bl, (%rdi,%r8,2)
andb $-0x10, %r9b
orb %r10b, %r9b
movb %r9b, 0x1(%rdi,%r8,2)
incq %r8
cmpq %r8, %rcx
jne 0xd70bb
leal -0x1(%rdx), %r8d
addq %rax, %rdi
cmpl $0x1, %edx
movl %r8d, %edx
jg 0xd70b0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dsp/alpha_processing.c
// Function: PackRGB_C
static void PackRGB_C(const uint8_t* WEBP_RESTRICT r,
                      const uint8_t* WEBP_RESTRICT g,
                      const uint8_t* WEBP_RESTRICT b,
                      int len, int step, uint32_t* WEBP_RESTRICT out) {
  int i, offset = 0;
  for (i = 0; i < len; ++i) {
    out[i] = MakeARGB32(0xff, r[offset], g[offset], b[offset]);
    offset += step;
  }
}

// Assembly:
testl %ecx, %ecx
jle 0xd7196
pushq %rbp
pushq %rbx
movslq %r8d, %rax
movl %ecx, %ecx
xorl %r8d, %r8d
xorl %r10d, %r10d
movzbl (%rdi,%r10), %r11d
movzbl (%rsi,%r10), %ebx
movzbl (%rdx,%r10), %ebp
shll $0x10, %r11d
shll $0x8, %ebx
orl %r11d, %ebx
orl %ebp, %ebx
orl $0xff000000, %ebx       # imm = 0xFF000000
movl %ebx, (%r9,%r8,4)
addq %rax, %r10
incq %r8
cmpq %r8, %rcx
jne 0xd7164
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dsp/alpha_processing.c
// Function: ApplyAlphaMultiply_C
static void ApplyAlphaMultiply_C(uint8_t* rgba, int alpha_first,
                                 int w, int h, int stride) {
  while (h-- > 0) {
    uint8_t* const rgb = rgba + (alpha_first ? 1 : 0);
    const uint8_t* const alpha = rgba + (alpha_first ? 0 : 3);
    int i;
    for (i = 0; i < w; ++i) {
      const uint32_t a = alpha[4 * i];
      if (a != 0xff) {
        const uint32_t mult = MULTIPLIER(a);
        rgb[4 * i + 0] = PREMULTIPLY(rgb[4 * i + 0], mult);
        rgb[4 * i + 1] = PREMULTIPLY(rgb[4 * i + 1], mult);
        rgb[4 * i + 2] = PREMULTIPLY(rgb[4 * i + 2], mult);
      }
    }
    rgba += stride;
  }
}

// Assembly:
testl %ecx, %ecx
jle 0xd722b
xorl %eax, %eax
xorl %r9d, %r9d
testl %esi, %esi
sete %al
setne %r9b
leaq (%rax,%rax,2), %rax
movslq %r8d, %rsi
movl %edx, %r8d
addq %rdi, %r9
addq $0x2, %r9
addq %rdi, %rax
testl %edx, %edx
jle 0xd721b
xorl %edi, %edi
movzbl (%rax,%rdi,4), %r10d
cmpl $0xff, %r10d
je 0xd7213
imull $0x8081, %r10d, %r10d   # imm = 0x8081
movzbl -0x2(%r9,%rdi,4), %r11d
imull %r10d, %r11d
shrl $0x17, %r11d
movb %r11b, -0x2(%r9,%rdi,4)
movzbl -0x1(%r9,%rdi,4), %r11d
imull %r10d, %r11d
shrl $0x17, %r11d
movb %r11b, -0x1(%r9,%rdi,4)
movzbl (%r9,%rdi,4), %r11d
imull %r10d, %r11d
shrl $0x17, %r11d
movb %r11b, (%r9,%rdi,4)
incq %rdi
cmpq %rdi, %r8
jne 0xd71c7
leal -0x1(%rcx), %edi
addq %rsi, %r9
addq %rsi, %rax
cmpl $0x1, %ecx
movl %edi, %ecx
jg 0xd71c1
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dsp/alpha_processing.c
// Function: DispatchAlpha_C
static int DispatchAlpha_C(const uint8_t* WEBP_RESTRICT alpha, int alpha_stride,
                           int width, int height,
                           uint8_t* WEBP_RESTRICT dst, int dst_stride) {
  uint32_t alpha_mask = 0xff;
  int i, j;

  for (j = 0; j < height; ++j) {
    for (i = 0; i < width; ++i) {
      const uint32_t alpha_value = alpha[i];
      dst[4 * i] = alpha_value;
      alpha_mask &= alpha_value;
    }
    alpha += alpha_stride;
    dst += dst_stride;
  }

  return (alpha_mask != 0xff);
}

// Assembly:
testl %ecx, %ecx
jle 0xd727a
pushq %rbp
pushq %rbx
movslq %esi, %rax
movslq %r9d, %rsi
movl %edx, %r10d
movl $0xff, %r9d
xorl %r11d, %r11d
testl %edx, %edx
jle 0xd725d
xorl %ebx, %ebx
movzbl (%rdi,%rbx), %ebp
movb %bpl, (%r8,%rbx,4)
andl %ebp, %r9d
incq %rbx
cmpq %rbx, %r10
jne 0xd724a
addq %rax, %rdi
addq %rsi, %r8
incl %r11d
cmpl %ecx, %r11d
jne 0xd7244
xorl %eax, %eax
cmpl $0xff, %r9d
setne %al
popq %rbx
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dsp/alpha_processing.c
// Function: DispatchAlphaToGreen_C
static void DispatchAlphaToGreen_C(const uint8_t* WEBP_RESTRICT alpha,
                                   int alpha_stride, int width, int height,
                                   uint32_t* WEBP_RESTRICT dst,
                                   int dst_stride) {
  int i, j;
  for (j = 0; j < height; ++j) {
    for (i = 0; i < width; ++i) {
      dst[i] = alpha[i] << 8;  // leave A/R/B channels zero'd.
    }
    alpha += alpha_stride;
    dst += dst_stride;
  }
}

// Assembly:
testl %ecx, %ecx
jle 0xd72bc
pushq %rbx
movslq %esi, %rax
movslq %r9d, %rsi
movl %edx, %r9d
shlq $0x2, %rsi
xorl %r10d, %r10d
testl %edx, %edx
jle 0xd72ad
xorl %r11d, %r11d
movzbl (%rdi,%r11), %ebx
shll $0x8, %ebx
movl %ebx, (%r8,%r11,4)
incq %r11
cmpq %r11, %r9
jne 0xd7299
addq %rax, %rdi
incl %r10d
addq %rsi, %r8
cmpl %ecx, %r10d
jne 0xd7292
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dsp/alpha_processing.c
// Function: ExtractAlpha_C
static int ExtractAlpha_C(const uint8_t* WEBP_RESTRICT argb, int argb_stride,
                          int width, int height,
                          uint8_t* WEBP_RESTRICT alpha, int alpha_stride) {
  uint8_t alpha_mask = 0xff;
  int i, j;

  for (j = 0; j < height; ++j) {
    for (i = 0; i < width; ++i) {
      const uint8_t alpha_value = argb[4 * i];
      alpha[i] = alpha_value;
      alpha_mask &= alpha_value;
    }
    argb += argb_stride;
    alpha += alpha_stride;
  }
  return (alpha_mask == 0xff);
}

// Assembly:
testl %ecx, %ecx
jle 0xd7305
pushq %rbp
pushq %rbx
movslq %esi, %rax
movslq %r9d, %rsi
movl %edx, %r10d
movb $-0x1, %r9b
xorl %r11d, %r11d
testl %edx, %edx
jle 0xd72eb
xorl %ebx, %ebx
movb (%rdi,%rbx,4), %bpl
movb %bpl, (%r8,%rbx)
andb %bpl, %r9b
incq %rbx
cmpq %rbx, %r10
jne 0xd72d8
addq %rax, %rdi
addq %rsi, %r8
incl %r11d
cmpl %ecx, %r11d
jne 0xd72d2
xorl %eax, %eax
cmpb $-0x1, %r9b
sete %al
popq %rbx
popq %rbp
retq
movl $0x1, %eax
retq