LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0xf09dd
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 0xd2ea5
addq %r15, %r14
movq %r14, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
leaq (%r15,%rsi), %r13
testl %eax, %eax
movq %rbx, 0x18(%rsp)
je 0xd2e68
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 0xf087a
addq %r14, %r13
subq %r14, %r12
addq $0x3, %rbx
addq $0x30, %rbp
cmpq %rbx, 0x20(%rsp)
jne 0xd2e2c
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 0xf087a
xorl %ecx, %ecx
cmpq 0x10(%rsp), %r13
jb 0xd2ea5
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_O1/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8_dec.c
// Function: VP8InitScanline
void VP8InitScanline(VP8Decoder* const dec) {
  VP8MB* const left = dec->mb_info_ - 1;
  left->nz_ = 0;
  left->nz_dc_ = 0;
  memset(dec->intra_l_, B_DC_PRED, sizeof(dec->intra_l_));
  dec->mb_x_ = 0;
}

// Assembly:
movq 0xb10(%rdi), %rax
movw $0x0, -0x2(%rax)
xorl %eax, %eax
movl %eax, 0xb00(%rdi)
movl %eax, 0xb58(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd45e9
cmpb $0x2f, (%rsi)
jne 0xd45e9
cmpb $0x1f, 0x4(%rsi)
ja 0xd45e9
movq %r8, %rbx
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0xf0b06
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r12, %rdi
callq 0xd45f5
testl %eax, %eax
je 0xd45e7
testq %r15, %r15
je 0xd45c9
movl 0xc(%rsp), %eax
movl %eax, (%r15)
testq %r14, %r14
je 0xd45d5
movl 0x8(%rsp), %eax
movl %eax, (%r14)
movl $0x1, %eax
testq %rbx, %rbx
je 0xd45e9
movl 0x4(%rsp), %ecx
movl %ecx, (%rbx)
jmp 0xd45e9
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf0d7f
xorl %ebx, %ebx
cmpl $0x2f, %eax
jne 0xd466c
movq %r14, %rdi
movl $0xe, %esi
callq 0xf0d7f
incl %eax
movl %eax, (%r13)
movq %r14, %rdi
movl $0xe, %esi
callq 0xf0d7f
incl %eax
movl %eax, (%r12)
movq %r14, %rdi
movl $0x1, %esi
callq 0xf0d7f
movl %eax, (%r15)
movq %r14, %rdi
movl $0x3, %esi
callq 0xf0d7f
testl %eax, %eax
jne 0xd466c
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_O1/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
testq %rax, %rax
je 0xd4e33
movq %rax, %rbx
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, (%rbx)
callq 0xdb9e3
jmp 0xd4e35
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd4eca
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x98, %rdi
callq 0xd4ecb
movq 0x18(%rbx), %rdi
callq 0x57290
movq $0x0, 0x18(%rbx)
cmpl $0x0, 0x110(%rbx)
jle 0xd4e9d
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 0xd4e7b
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_O1/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 0xd4f29
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
callq 0x57290
leaq 0x50(%rbx), %rdi
callq 0xf1647
movq 0x48(%rbx), %rdi
callq 0xf0f54
leaq 0x8(%rbx), %rdi
callq 0xf0e72
leaq 0x18(%rbx), %rdi
callq 0xf0e72
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 0x55a07(%rip), %rdi     # 0x12a937
leaq 0x55782(%rip), %rsi     # 0x12a6b9
leaq 0x55a05(%rip), %rcx     # 0x12a943
movl $0x573, %edx            # imm = 0x573
callq 0x55710
// File: /workspace/github_c_makefile_star2_O1/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 0xd4e07
testq %rax, %rax
je 0xd5059
testq %r14, %r14
je 0xd50a3
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 0xf0b06
movl (%r14), %edi
movl 0x4(%r14), %esi
xorl %r15d, %r15d
movl $0x1, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0xd50c2
testl %eax, %eax
je 0xd5084
cmpl $0x1, 0x110(%rbx)
jne 0xd505e
cmpl $0x3, 0x118(%rbx)
jne 0xd505e
movq %rbx, %rdi
addq $0x98, %rdi
callq 0xd582a
testl %eax, %eax
je 0xd505e
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 0xd5078
movl (%rbx), %eax
cmpl $0x5, %eax
je 0xd5051
testl %eax, %eax
jne 0xd5084
movl $0x1, (%rbx)
jmp 0xd5084
xorl %r15d, %r15d
jmp 0xd5094
movl $0x0, 0xc0(%r14)
movl (%r14), %esi
movq %rbx, %rdi
callq 0xd587c
testl %eax, %eax
je 0xd5084
movq %rbx, 0x18(%r14)
movl $0x1, %r15d
jmp 0xd5094
movq %rbx, %rdi
callq 0xd4e3a
movq %rbx, %rdi
callq 0x57290
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x555fe(%rip), %rdi     # 0x12a6a8
leaq 0x55608(%rip), %rsi     # 0x12a6b9
leaq 0x55614(%rip), %rcx     # 0x12a6cc
movl $0x64c, %edx            # imm = 0x64C
callq 0x55710
// File: /workspace/github_c_makefile_star2_O1/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 0xd5832
retq
movslq 0x40(%rdi), %rdx
movl $0x1, %eax
testq %rdx, %rdx
jle 0xd5831
movq 0x48(%rdi), %rcx
imulq $0x238, %rdx, %rdx      # imm = 0x238
xorl %esi, %esi
movq 0x8(%rcx,%rsi), %rdi
cmpb $0x0, (%rdi)
jne 0xd5879
movq 0x10(%rcx,%rsi), %rdi
cmpb $0x0, (%rdi)
jne 0xd5879
movq 0x18(%rcx,%rsi), %rdi
cmpb $0x0, (%rdi)
jne 0xd5879
addq $0x238, %rsi            # imm = 0x238
cmpq %rsi, %rdx
jne 0xd584d
jmp 0xd5831
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd58f2
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 0xd58d1
leaq (%rax,%r14,4), %rax
leaq (%rax,%r15,4), %rax
movq %rax, 0x20(%rbx)
movl $0x1, %eax
jmp 0xd58ec
movq $0x0, 0x20(%rbx)
movl (%rbx), %ecx
xorl %eax, %eax
cmpl $0x5, %ecx
je 0xd58e6
testl %ecx, %ecx
jne 0xd58ec
movl $0x1, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x551bf(%rip), %rdi     # 0x12aab8
leaq 0x54db9(%rip), %rsi     # 0x12a6b9
leaq 0x551cc(%rip), %rcx     # 0x12aad3
movl $0x612, %edx            # imm = 0x612
callq 0x55710
// File: /workspace/github_c_makefile_star2_O1/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 0xd6db8
movslq 0x8c(%rdi), %r12
movl %esi, 0x8(%rsp)
movl %esi, %r15d
subl %r12d, %r15d
testl %r15d, %r15d
jle 0xd6d92
movslq 0x84(%rdi), %rcx
imulq %r12, %rcx
shlq $0x2, %rcx
addq 0x18(%rdi), %rcx
movq %rdi, 0x10(%rsp)
movq %rcx, 0x20(%rsp)
cmpl $0x10, %r15d
movl $0x10, %r13d
cmovll %r15d, %r13d
movq 0x8(%rdi), %rax
movq 0x20(%rdi), %rbp
movq 0x38(%rax), %rdx
movq %rdx, 0x18(%rsp)
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movl %eax, %r14d
imull %r13d, %r14d
imull %r12d, %eax
movslq %eax, %rbx
addq 0xc8(%rdx), %rbx
movq 0x10(%rsp), %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0xd7aa9
movq %rbp, %rdi
movq %rbx, %rsi
movl %r14d, %edx
leaq 0xa54e5(%rip), %rax     # 0x17c230
callq *(%rax)
leal (%r12,%r13), %ebp
movq 0x18(%rsp), %rdi
movl %r12d, %esi
movl %ebp, %edx
movq %rbx, %rcx
movl 0xc(%rsp), %r8d
callq 0xd795a
movq 0x20(%rsp), %rcx
movq 0x10(%rsp), %rdi
movslq 0x84(%rdi), %rax
movslq %r13d, %rdx
imulq %rdx, %rax
leaq (%rcx,%rax,4), %rcx
movl %ebp, %r12d
subl %edx, %r15d
jg 0xd6cec
jmp 0xd6d95
movl %r12d, %ebp
movl 0x8(%rsp), %eax
cmpl %eax, %ebp
jne 0xd6dd7
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 0x53e3d(%rip), %rdi     # 0x12abfc
leaq 0x538f3(%rip), %rsi     # 0x12a6b9
leaq 0x542b0(%rip), %rcx     # 0x12b07d
movl $0x62e, %edx            # imm = 0x62E
callq 0x55710
leaq 0x542ce(%rip), %rdi     # 0x12b0ac
leaq 0x538d4(%rip), %rsi     # 0x12a6b9
leaq 0x54291(%rip), %rcx     # 0x12b07d
movl $0x641, %edx            # imm = 0x641
callq 0x55710
// File: /workspace/github_c_makefile_star2_O1/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 0xd6eb6
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0xd6e80
movq %r14, 0x8(%rbx)
movl $0x0, (%rbx)
leaq 0x28(%rbx), %r15
movq 0x60(%r14), %rdx
movq 0x68(%r14), %rsi
movq %r15, %rdi
callq 0xf0b06
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x14(%rsp), %rcx
movq %r15, %rdi
callq 0xd45f5
testl %eax, %eax
je 0xd6e93
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 0xd50c2
testl %eax, %eax
jne 0xd6eb6
jmp 0xd6ea4
movl (%rbx), %eax
cmpl $0x5, %eax
je 0xd6e8b
testl %eax, %eax
jne 0xd6eb6
movl $0x2, (%rbx)
jmp 0xd6eb6
movl (%rbx), %eax
cmpl $0x5, %eax
je 0xd6e9e
testl %eax, %eax
jne 0xd6ea4
movl $0x3, (%rbx)
movq %rbx, %rdi
callq 0xd4e3a
cmpl $0x0, (%rbx)
movl $0x0, %ebp
je 0xd6ec3
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5389f(%rip), %rdi     # 0x12a769
leaq 0x537e8(%rip), %rsi     # 0x12a6b9
leaq 0x538af(%rip), %rcx     # 0x12a787
movl $0x6a6, %edx            # imm = 0x6A6
callq 0x55710
// File: /workspace/github_c_makefile_star2_O1/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 0xd77bd
retq
pushq %rax
leaq 0x53115(%rip), %rdi     # 0x12a8da
leaq 0x52eed(%rip), %rsi     # 0x12a6b9
leaq 0x53128(%rip), %rcx     # 0x12a8fb
movl $0xe8, %edx
callq 0x55710
// File: /workspace/github_c_makefile_star2_O1/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 0xd77fa
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 0xd77fc
xorl %eax, %eax
cmpl 0x40(%rdi), %eax
jge 0xd780f
cltq
imulq $0x238, %rax, %rax      # imm = 0x238
addq 0x48(%rdi), %rax
retq
pushq %rax
leaq 0x53382(%rip), %rdi     # 0x12ab99
leaq 0x52e9b(%rip), %rsi     # 0x12a6b9
leaq 0x53398(%rip), %rcx     # 0x12abbd
movl $0x30a, %edx            # imm = 0x30A
callq 0x55710
// File: /workspace/github_c_makefile_star2_O1/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 0xd78fd
movq %rdi, %rbx
movl %esi, %ebp
cmpl %esi, %r15d
jge 0xd78e2
cmpl $0x1, 0x110(%rbx)
jne 0xd791c
leaq 0x118(%rbx), %rdi
cmpl $0x3, (%rdi)
jne 0xd793b
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 0xdb1a9
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
movq %r13, %rcx
movl %r12d, %r8d
callq 0xd795a
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 0x532f8(%rip), %rdi     # 0x12abfc
leaq 0x52dae(%rip), %rsi     # 0x12a6b9
leaq 0x5330c(%rip), %rcx     # 0x12ac1e
movl $0x380, %edx            # imm = 0x380
callq 0x55710
leaq 0x53332(%rip), %rdi     # 0x12ac55
leaq 0x52d8f(%rip), %rsi     # 0x12a6b9
leaq 0x532ed(%rip), %rcx     # 0x12ac1e
movl $0x388, %edx            # imm = 0x388
callq 0x55710
leaq 0x5332d(%rip), %rdi     # 0x12ac6f
leaq 0x52d70(%rip), %rsi     # 0x12a6b9
leaq 0x532ce(%rip), %rcx     # 0x12ac1e
movl $0x389, %edx            # imm = 0x389
callq 0x55710
// File: /workspace/github_c_makefile_star2_O1/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 0xd79b6
leaq 0xa4a7f(%rip), %r12     # 0x17c3f0
cmpq $0x0, (%r12,%rax,8)
je 0xd79bf
movl %edx, %ebp
movq %rdi, %rbx
movq 0xd0(%rdi), %rdi
subl %esi, %ebp
jle 0xd79af
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 0xd798b
subq %r14, %rcx
movq %rcx, %rdi
movq %rdi, 0xd0(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x532d6(%rip), %rdi     # 0x12ac9c
leaq 0x52cec(%rip), %rsi     # 0x12a6b9
leaq 0x532f1(%rip), %rcx     # 0x12acc5
movl $0x36d, %edx            # imm = 0x36D
callq 0x55710
// File: /workspace/github_c_makefile_star2_O1/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 0xd7a11
cmpl $0x2, %eax
jg 0xd7a11
cmpl $0x4, %edx
jl 0xd7a11
cmpl $0x1, %eax
jne 0xd7a2e
movl (%rsi), %ecx
movq %rcx, %rax
shlq $0x20, %rax
orq %rcx, %rax
jmp 0xd7a31
cmpl %edx, %eax
jge 0xd7a58
testl %edx, %edx
jle 0xd7a88
movl %edx, %eax
negq %rcx
movl (%rdi,%rcx), %edx
movl %edx, (%rdi)
addq $0x4, %rdi
decq %rax
jne 0xd7a1e
jmp 0xd7a88
movq (%rsi), %rax
testb $0x4, %dil
je 0xd7a49
movl (%rsi), %ecx
addq $0x4, %rsi
movl %ecx, (%rdi)
addq $0x4, %rdi
rolq $0x20, %rax
decl %edx
testb $0x7, %dil
jne 0xd7a8a
cmpl $0x2, %edx
jae 0xd7a65
xorl %eax, %eax
jmp 0xd7a7d
movslq %edx, %rdx
shlq $0x2, %rdx
popq %rax
jmp 0x552d0
movl %edx, %ecx
andl $-0x2, %ecx
xorl %r8d, %r8d
movq %rax, (%rdi,%r8,4)
addq $0x2, %r8
cmpq %r8, %rcx
jne 0xd7a6d
movslq %r8d, %rax
testb $0x1, %dl
je 0xd7a88
movl (%rsi,%rax,4), %ecx
movl %ecx, (%rdi,%rax,4)
popq %rax
retq
leaq 0x534c1(%rip), %rdi     # 0x12af52
leaq 0x52c21(%rip), %rsi     # 0x12a6b9
leaq 0x534cd(%rip), %rcx     # 0x12af6c
movl $0x3ec, %edx            # imm = 0x3EC
callq 0x55710
// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movslq 0x110(%rdi), %r14
movslq 0x84(%rdi), %rbx
movq 0x20(%rdi), %r15
testq %r14, %r14
jle 0xd7b0f
movl %esi, %r12d
movq %rdx, (%rsp)
leal (%rdx,%r12), %ebp
leaq (%r14,%r14,2), %rax
incq %r14
leaq (%rdi,%rax,8), %r13
addq $0x100, %r13            # imm = 0x100
movq %r13, %rdi
movl %r12d, %esi
movl %ebp, %edx
movq %r15, %r8
callq 0xdb247
decq %r14
addq $-0x18, %r13
movq %r15, %rcx
cmpq $0x1, %r14
jg 0xd7ae8
movq %r15, %rcx
movq (%rsp), %rdx
cmpq %r15, %rcx
je 0xd7b3b
movslq %edx, %rax
imulq %rax, %rbx
shlq $0x2, %rbx
movq %r15, %rdi
movq %rcx, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x552d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xa4bfd(%rip), %rax     # 0x17c760
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 0xa4bca(%rip), %rax     # 0x17c768
andl $0x1, %ebp
movq %r14, %rdi
movl %ebx, %ecx
movl %ebp, %r8d
callq *(%rax)
movq 0x28(%r15), %r8
testq %r8, %r8
je 0xd7be6
movslq 0x3c(%r15), %rax
imulq %r12, %rax
addq %rax, %r8
leaq 0xa4662(%rip), %rax     # 0x17c228
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
nop
// File: /workspace/github_c_makefile_star2_O1/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 0xd7ca3
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 0xd7c96
xorl %eax, %eax
cmpl $0x1000000, %r11d       # imm = 0x1000000
jb 0xd7c92
movl %r11d, %ebx
shrl $0x18, %ebx
testl %ecx, %ecx
je 0xd7c39
movl $0xff000000, %eax       # imm = 0xFF000000
xorl %edx, %edx
divl %ebx
jmp 0xd7c3f
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 0xd7c0c
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd7cfc
movl %edx, %r8d
xorl %r9d, %r9d
movzbl (%rsi,%r9), %r10d
cmpl $0xff, %r10d
je 0xd7cf4
testl %r10d, %r10d
jne 0xd7cc8
movb $0x0, (%rdi,%r9)
jmp 0xd7cf4
testl %ecx, %ecx
je 0xd7cd8
movl $0xff000000, %eax       # imm = 0xFF000000
xorl %edx, %edx
divl %r10d
jmp 0xd7cdf
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 0xd7cae
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd7d34
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 *0xa44d3(%rip)          # 0x17c1f8
addq %r12, %r15
decl %ebp
jne 0xd7d17
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd7d81
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 *0xa4497(%rip)          # 0x17c200
addq %r13, %r15
addq %r12, %r14
decl %ebx
jne 0xd7d57
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd8132
pushq %rbp
pushq %r14
pushq %rbx
movslq %ecx, %rax
movl %esi, %ecx
testl %esi, %esi
jle 0xd811b
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 0xd809b
leal -0x1(%rdx), %r8d
addq %rax, %rdi
cmpl $0x1, %edx
movl %r8d, %edx
jg 0xd8090
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd8176
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 0xd8144
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd820b
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 0xd81fb
xorl %edi, %edi
movzbl (%rax,%rdi,4), %r10d
cmpl $0xff, %r10d
je 0xd81f3
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 0xd81a7
leal -0x1(%rcx), %edi
addq %rsi, %r9
addq %rsi, %rax
cmpl $0x1, %ecx
movl %edi, %ecx
jg 0xd81a1
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd825a
pushq %rbp
pushq %rbx
movslq %esi, %rax
movslq %r9d, %rsi
movl %edx, %r10d
movl $0xff, %r9d
xorl %r11d, %r11d
testl %edx, %edx
jle 0xd823d
xorl %ebx, %ebx
movzbl (%rdi,%rbx), %ebp
movb %bpl, (%r8,%rbx,4)
andl %ebp, %r9d
incq %rbx
cmpq %rbx, %r10
jne 0xd822a
addq %rax, %rdi
addq %rsi, %r8
incl %r11d
cmpl %ecx, %r11d
jne 0xd8224
xorl %eax, %eax
cmpl $0xff, %r9d
setne %al
popq %rbx
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd829c
pushq %rbx
movslq %esi, %rax
movslq %r9d, %rsi
movl %edx, %r9d
shlq $0x2, %rsi
xorl %r10d, %r10d
testl %edx, %edx
jle 0xd828d
xorl %r11d, %r11d
movzbl (%rdi,%r11), %ebx
shll $0x8, %ebx
movl %ebx, (%r8,%r11,4)
incq %r11
cmpq %r11, %r9
jne 0xd8279
addq %rax, %rdi
incl %r10d
addq %rsi, %r8
cmpl %ecx, %r10d
jne 0xd8272
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd82e5
pushq %rbp
pushq %rbx
movslq %esi, %rax
movslq %r9d, %rsi
movl %edx, %r10d
movb $-0x1, %r9b
xorl %r11d, %r11d
testl %edx, %edx
jle 0xd82cb
xorl %ebx, %ebx
movb (%rdi,%rbx,4), %bpl
movb %bpl, (%r8,%rbx)
andb %bpl, %r9b
incq %rbx
cmpq %rbx, %r10
jne 0xd82b8
addq %rax, %rdi
addq %rsi, %r8
incl %r11d
cmpl %ecx, %r11d
jne 0xd82b2
xorl %eax, %eax
cmpb $-0x1, %r9b
sete %al
popq %rbx
popq %rbp
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/libraries/libwebp/src/dsp/cpu.c
// Function: x86CPUInfo
static int x86CPUInfo(CPUFeature feature) {
  int max_cpuid_value;
  int cpu_info[4];
  int is_intel = 0;

  // get the highest feature value cpuid supports
  GetCPUInfo(cpu_info, 0);
  max_cpuid_value = cpu_info[0];
  if (max_cpuid_value < 1) {
    return 0;
  } else {
    const int VENDOR_ID_INTEL_EBX = 0x756e6547;  // uneG
    const int VENDOR_ID_INTEL_EDX = 0x49656e69;  // Ieni
    const int VENDOR_ID_INTEL_ECX = 0x6c65746e;  // letn
    is_intel = (cpu_info[1] == VENDOR_ID_INTEL_EBX &&
                cpu_info[2] == VENDOR_ID_INTEL_ECX &&
                cpu_info[3] == VENDOR_ID_INTEL_EDX);    // genuine Intel?
  }

  GetCPUInfo(cpu_info, 1);
  if (feature == kSSE2) {
    return !!(cpu_info[3] & (1 << 26));
  }
  if (feature == kSSE3) {
    return !!(cpu_info[2] & (1 << 0));
  }
  if (feature == kSlowSSSE3) {
    if (is_intel && (cpu_info[2] & (1 << 9))) {   // SSSE3?
      return CheckSlowModel(cpu_info[0]);
    }
    return 0;
  }

  if (feature == kSSE4_1) {
    return !!(cpu_info[2] & (1 << 19));
  }
  if (feature == kAVX) {
    // bits 27 (OSXSAVE) & 28 (256-bit AVX)
    if ((cpu_info[2] & 0x18000000) == 0x18000000) {
      // XMM state and YMM state enabled by the OS.
      return (xgetbv() & 0x6) == 0x6;
    }
  }
  if (feature == kAVX2) {
    if (x86CPUInfo(kAVX) && max_cpuid_value >= 7) {
      GetCPUInfo(cpu_info, 7);
      return !!(cpu_info[1] & (1 << 5));
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %ebp, %ebp
xorl %eax, %eax
xorl %ecx, %ecx
cpuid
testl %eax, %eax
jle 0xd846c
movl %ebx, %r9d
movl %ecx, %esi
movl %edx, %r8d
movl %eax, %r14d
xorl %ebp, %ebp
movl $0x1, %eax
xorl %ecx, %ecx
cpuid
cmpl $0x5, %edi
ja 0xd846c
movl %edi, %r10d
leaq 0x530f3(%rip), %r11     # 0x12b488
movslq (%r11,%r10,4), %r10
addq %r11, %r10
jmpq *%r10
shrl $0x1a, %edx
andl $0x1, %edx
movl %edx, %ebp
jmp 0xd846c
xorl $0x756e6547, %r9d       # imm = 0x756E6547
xorl $0x6c65746e, %esi       # imm = 0x6C65746E
orl %r9d, %esi
xorl $0x49656e69, %r8d       # imm = 0x49656E69
orl %esi, %r8d
setne %dl
btl $0x9, %ecx
setae %cl
orb %dl, %cl
jne 0xd846c
movl %eax, %ecx
andl $0xf00, %ecx            # imm = 0xF00
cmpl $0x600, %ecx            # imm = 0x600
jne 0xd846c
movl %eax, %ecx
shrl $0xc, %ecx
andl $0xf0, %ecx
shrl $0x4, %eax
andl $0xf, %eax
orl %ecx, %eax
xorl %ecx, %ecx
leaq 0x53098(%rip), %rdx     # 0x12b4a0
xorl %ebp, %ebp
movzbl (%rcx,%rdx), %esi
cmpl %esi, %eax
je 0xd8473
incq %rcx
cmpq $0x6, %rcx
jne 0xd840a
jmp 0xd846c
shrl $0x13, %ecx
andl $0x1, %ecx
movl %ecx, %ebp
jmp 0xd846c
notl %ecx
testl $0x18000000, %ecx       # imm = 0x18000000
jne 0xd8442
xorl %ecx, %ecx
xgetbv
notl %eax
xorl %ebp, %ebp
testb $0x6, %al
sete %bpl
jmp 0xd846c
cmpl $0x5, %edi
jne 0xd846c
movl $0x4, %edi
callq 0xd8358
cmpl $0x7, %r14d
jl 0xd846c
testl %eax, %eax
je 0xd846c
movl $0x7, %eax
xorl %ecx, %ecx
cpuid
movl %ebx, %ebp
shrl $0x5, %ebp
andl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl $0x1, %ebp
jmp 0xd846c
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/libraries/libwebp/src/dsp/dec.c
// Function: TransformWHT_C
static void TransformWHT_C(const int16_t* in, int16_t* out) {
  int tmp[16];
  int i;
  for (i = 0; i < 4; ++i) {
    const int a0 = in[0 + i] + in[12 + i];
    const int a1 = in[4 + i] + in[ 8 + i];
    const int a2 = in[4 + i] - in[ 8 + i];
    const int a3 = in[0 + i] - in[12 + i];
    tmp[0  + i] = a0 + a1;
    tmp[8  + i] = a0 - a1;
    tmp[4  + i] = a3 + a2;
    tmp[12 + i] = a3 - a2;
  }
  for (i = 0; i < 4; ++i) {
    const int dc = tmp[0 + i * 4] + 3;    // w/ rounder
    const int a0 = dc             + tmp[3 + i * 4];
    const int a1 = tmp[1 + i * 4] + tmp[2 + i * 4];
    const int a2 = tmp[1 + i * 4] - tmp[2 + i * 4];
    const int a3 = dc             - tmp[3 + i * 4];
    out[ 0] = (a0 + a1) >> 3;
    out[16] = (a3 + a2) >> 3;
    out[32] = (a0 - a1) >> 3;
    out[48] = (a3 - a2) >> 3;
    out += 64;
  }
}

// Assembly:
movl $0xc, %eax
movswl -0x18(%rdi,%rax,2), %ecx
movswl (%rdi,%rax,2), %edx
leal (%rdx,%rcx), %r8d
movswl -0x10(%rdi,%rax,2), %r9d
movswl -0x8(%rdi,%rax,2), %r10d
leal (%r10,%r9), %r11d
subl %r10d, %r9d
subl %edx, %ecx
leal (%r11,%r8), %edx
movl %edx, -0x78(%rsp,%rax,4)
subl %r11d, %r8d
movl %r8d, -0x58(%rsp,%rax,4)
leal (%r9,%rcx), %edx
movl %edx, -0x68(%rsp,%rax,4)
subl %r9d, %ecx
movl %ecx, -0x48(%rsp,%rax,4)
incq %rax
cmpq $0x10, %rax
jne 0xd8ea8
xorl %eax, %eax
movl -0x48(%rsp,%rax), %edx
movl -0x44(%rsp,%rax), %ecx
movl -0x3c(%rsp,%rax), %edi
leal (%rdx,%rdi), %r8d
addl $0x3, %r8d
addl $0x3, %edx
movl -0x40(%rsp,%rax), %r9d
leal (%r9,%rcx), %r10d
subl %r9d, %ecx
subl %edi, %edx
leal (%r10,%r8), %edi
shrl $0x3, %edi
movw %di, (%rsi,%rax,8)
leal (%rcx,%rdx), %edi
shrl $0x3, %edi
movw %di, 0x20(%rsi,%rax,8)
subl %r10d, %r8d
shrl $0x3, %r8d
movw %r8w, 0x40(%rsi,%rax,8)
subl %ecx, %edx
shrl $0x3, %edx
movw %dx, 0x60(%rsi,%rax,8)
addq $0x10, %rax
cmpq $0x40, %rax
jne 0xd8ef4
retq