LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
movl $0x190, %esi            # imm = 0x190
callq 0x5a9f0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x144f6c
movq $0x0, -0x8(%rbp)
jmp 0x144f8e
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movl $0x2, 0x4(%rax)
callq 0x14f730
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x144fb8
jmp 0x145064
movq -0x8(%rbp), %rdi
addq $0x98, %rdi
callq 0x145070
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x5b920
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x110(%rcx), %eax
jge 0x14501d
movq -0x8(%rbp), %rdi
addq $0x118, %rdi            # imm = 0x118
movslq -0xc(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x145100
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x144fe8
movq -0x8(%rbp), %rax
movl $0x0, 0x110(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x178(%rax)
movq -0x8(%rbp), %rax
movq 0x180(%rax), %rdi
callq 0x5b920
movq -0x8(%rbp), %rax
movq $0x0, 0x180(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x145085
jmp 0x1450a4
leaq 0x781a0(%rip), %rdi     # 0x1bd22c
leaq 0x78456(%rip), %rsi     # 0x1bd4e9
movl $0x573, %edx            # imm = 0x573
leaq 0x786c8(%rip), %rcx     # 0x1bd767
callq 0x598a0
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x5b920
movq -0x8(%rbp), %rdi
addq $0x50, %rdi
callq 0x183150
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x182800
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x1826a0
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x1826a0
movq -0x8(%rbp), %rdi
callq 0x1473e0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x14562d
movl $0x0, -0x4(%rbp)
jmp 0x1456b9
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x40(%rcx), %eax
jge 0x1456b2
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x238, %rcx, %rcx      # imm = 0x238
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jle 0x145673
movl $0x0, -0x4(%rbp)
jmp 0x1456b9
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jle 0x14568c
movl $0x0, -0x4(%rbp)
jmp 0x1456b9
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jle 0x1456a5
movl $0x0, -0x4(%rbp)
jmp 0x1456b9
jmp 0x1456a7
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x145634
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: AllocateInternalBuffers8b
static int AllocateInternalBuffers8b(VP8LDecoder* const dec) {
  const uint64_t total_num_pixels = (uint64_t)dec->width_ * dec->height_;
  dec->argb_cache_ = NULL;    // for soundness
  dec->pixels_ = (uint32_t*)WebPSafeMalloc(total_num_pixels, sizeof(uint8_t));
  if (dec->pixels_ == NULL) {
    return VP8LSetError(dec, VP8_STATUS_OUT_OF_MEMORY);
  }
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movslq 0x84(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x88(%rcx), %rcx
imulq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x5b060
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x14572d
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x144bc0
movl %eax, -0x4(%rbp)
jmp 0x145734
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movslq 0x84(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x88(%rcx), %rcx
imulq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
movzwl %ax, %eax
movq %rax, -0x28(%rbp)
movslq -0x14(%rbp), %rax
shlq $0x4, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x84(%rax), %eax
cmpl -0x14(%rbp), %eax
jg 0x1457a4
jmp 0x1457c3
leaq 0x78158(%rip), %rdi     # 0x1bd903
leaq 0x77d37(%rip), %rsi     # 0x1bd4e9
movl $0x612, %edx            # imm = 0x612
leaq 0x78160(%rip), %rcx     # 0x1bd91e
callq 0x598a0
movq -0x38(%rbp), %rdi
movl $0x4, %esi
callq 0x5b060
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x145806
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x144bc0
movl %eax, -0x4(%rbp)
jmp 0x145833
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x20(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rcx
movq -0x28(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: VP8LDecodeAlphaImageStream
int VP8LDecodeAlphaImageStream(ALPHDecoder* const alph_dec, int last_row) {
  VP8LDecoder* const dec = alph_dec->vp8l_dec_;
  assert(dec != NULL);
  assert(last_row <= dec->height_);

  if (dec->last_row_ >= last_row) {
    return 1;  // done
  }

  if (!alph_dec->use_8b_decode_) WebPInitAlphaProcessing();

  // Decode (with special row processing).
  return alph_dec->use_8b_decode_ ?
      DecodeAlphaData(dec, (uint8_t*)dec->pixels_, dec->width_, dec->height_,
                      last_row) :
      DecodeImageData(dec, dec->pixels_, dec->width_, dec->height_,
                      last_row, ExtractAlphaRows);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x145864
jmp 0x145883
leaq 0x77c72(%rip), %rdi     # 0x1bd4dd
leaq 0x77c77(%rip), %rsi     # 0x1bd4e9
movl $0x678, %edx            # imm = 0x678
leaq 0x77cca(%rip), %rcx     # 0x1bd548
callq 0x598a0
movl -0x14(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x88(%rcx), %eax
jg 0x145894
jmp 0x1458b3
leaq 0x77ce5(%rip), %rdi     # 0x1bd580
leaq 0x77c47(%rip), %rsi     # 0x1bd4e9
movl $0x679, %edx            # imm = 0x679
leaq 0x77c9a(%rip), %rcx     # 0x1bd548
callq 0x598a0
movq -0x20(%rbp), %rax
movl 0x8c(%rax), %eax
cmpl -0x14(%rbp), %eax
jl 0x1458ce
movl $0x1, -0x4(%rbp)
jmp 0x145954
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc0(%rax)
jne 0x1458e0
callq 0x1493b0
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc0(%rax)
je 0x14591b
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x20(%rbp), %rax
movl 0x84(%rax), %edx
movq -0x20(%rbp), %rax
movl 0x88(%rax), %ecx
movl -0x14(%rbp), %r8d
callq 0x145960
movl %eax, -0x24(%rbp)
jmp 0x14594e
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x20(%rbp), %rax
movl 0x84(%rax), %edx
movq -0x20(%rbp), %rax
movl 0x88(%rax), %ecx
movl -0x14(%rbp), %r8d
leaq 0xc4a(%rip), %r9        # 0x146590
callq 0x145d80
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x146773
movl $0x0, -0x4(%rbp)
jmp 0x146872
cmpq $0x0, -0x18(%rbp)
jne 0x146790
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x144bc0
movl %eax, -0x4(%rbp)
jmp 0x146872
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rdx
callq 0x182070
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
leaq -0x1c(%rbp), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x24(%rbp), %rcx
callq 0x144670
cmpl $0x0, %eax
jne 0x1467f1
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq 0x144bc0
jmp 0x146838
movq -0x10(%rbp), %rax
movl $0x2, 0x4(%rax)
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
movq -0x10(%rbp), %rcx
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r8d
callq 0x145310
cmpl $0x0, %eax
jne 0x14682f
jmp 0x146838
movl $0x1, -0x4(%rbp)
jmp 0x146872
movq -0x10(%rbp), %rdi
callq 0x144fa0
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x14684c
jmp 0x14686b
leaq 0x76d46(%rip), %rdi     # 0x1bd599
leaq 0x76c8f(%rip), %rsi     # 0x1bd4e9
movl $0x6a6, %edx            # imm = 0x6A6
leaq 0x76d51(%rip), %rcx     # 0x1bd5b7
callq 0x598a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movzbl -0x4(%rbp), %ecx
movq -0x10(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movzwl -0x2(%rbp), %eax
movl -0x8(%rbp), %ecx
shll %cl, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
cmpl $0x8, (%rax)
jg 0x1473ae
jmp 0x1473cd
leaq 0x76355(%rip), %rdi     # 0x1bd70a
leaq 0x7612d(%rip), %rsi     # 0x1bd4e9
movl $0xe8, %edx
leaq 0x76363(%rip), %rcx     # 0x1bd72b
callq 0x598a0
movzbl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: UpdateDecoder
static void UpdateDecoder(VP8LDecoder* const dec, int width, int height) {
  VP8LMetadata* const hdr = &dec->hdr_;
  const int num_bits = hdr->huffman_subsample_bits_;
  dec->width_ = width;
  dec->height_ = height;

  hdr->huffman_xsize_ = VP8LSubSampleSize(width, num_bits);
  hdr->huffman_mask_ = (num_bits == 0) ? ~0 : (1 << num_bits) - 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x98, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x84(%rax)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x88(%rax)
movl -0xc(%rbp), %edi
movl -0x1c(%rbp), %esi
callq 0x147a50
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x30(%rax)
cmpl $0x0, -0x1c(%rbp)
jne 0x147a28
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x20(%rbp)
jmp 0x147a38
movl -0x1c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x28(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: ExpandColorMap
static int ExpandColorMap(int num_colors, VP8LTransform* const transform) {
  int i;
  const int final_num_colors = 1 << (8 >> transform->bits_);
  uint32_t* const new_color_map =
      (uint32_t*)WebPSafeMalloc((uint64_t)final_num_colors,
                                sizeof(*new_color_map));
  if (new_color_map == NULL) {
    return 0;
  } else {
    uint8_t* const data = (uint8_t*)transform->data_;
    uint8_t* const new_data = (uint8_t*)new_color_map;
    new_color_map[0] = transform->data_[0];
    for (i = 4; i < 4 * num_colors; ++i) {
      // Equivalent to VP8LAddPixels(), on a byte-basis.
      new_data[i] = (data[i] + new_data[i - 4]) & 0xff;
    }
    for (; i < 4 * final_num_colors; ++i) {
      new_data[i] = 0;  // black tail.
    }
    WebPSafeFree(transform->data_);
    transform->data_ = new_color_map;
  }
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movl $0x8, %eax
sarl %cl, %eax
movl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x18(%rbp)
movslq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x5b060
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x147ace
movl $0x0, -0x4(%rbp)
jmp 0x147b88
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x4, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl -0x8(%rbp), %ecx
shll $0x2, %ecx
cmpl %ecx, %eax
jge 0x147b42
movq -0x28(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x30(%rbp), %rcx
movl -0x14(%rbp), %edx
subl $0x4, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
addl %ecx, %eax
andl $0xff, %eax
movb %al, %dl
movq -0x30(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x147af9
jmp 0x147b44
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
shll $0x2, %ecx
cmpl %ecx, %eax
jge 0x147b68
movq -0x30(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x147b44
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5b920
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x30(%rax), %esi
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %edx
movl -0xc(%rbp), %ecx
movl -0x10(%rbp), %r8d
callq 0x148170
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x40(%rcx), %eax
jge 0x147be5
jmp 0x147c04
leaq 0x75df8(%rip), %rdi     # 0x1bd9e4
leaq 0x758f6(%rip), %rsi     # 0x1bd4e9
movl $0x30a, %edx            # imm = 0x30A
leaq 0x75e09(%rip), %rcx     # 0x1bda08
callq 0x598a0
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x238, %rcx, %rcx      # imm = 0x238
addq %rcx, %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: ReadSymbol
static WEBP_INLINE int ReadSymbol(const HuffmanCode* table,
                                  VP8LBitReader* const br) {
  int nbits;
  uint32_t val = VP8LPrefetchBits(br);
  table += val & HUFFMAN_TABLE_MASK;
  nbits = table->bits - HUFFMAN_TABLE_BITS;
  if (nbits > 0) {
    VP8LSetBitPos(br, br->bit_pos_ + HUFFMAN_TABLE_BITS);
    val = VP8LPrefetchBits(br);
    table += table->value;
    table += val & ((1 << nbits) - 1);
  }
  VP8LSetBitPos(br, br->bit_pos_ + table->bits);
  return table->value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x147330
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
andl $0xff, %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
subl $0x8, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jle 0x147ccb
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x20(%rax), %esi
addl $0x8, %esi
callq 0x147350
movq -0x10(%rbp), %rdi
callq 0x147330
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x2(%rax), %ecx
movq -0x8(%rbp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl -0x1c(%rbp), %ecx
subl $0x1, %eax
andl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x20(%rax), %esi
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
addl %eax, %esi
callq 0x147350
movq -0x8(%rbp), %rax
movzwl 0x2(%rax), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: GetCopyDistance
static WEBP_INLINE int GetCopyDistance(int distance_symbol,
                                       VP8LBitReader* const br) {
  int extra_bits, offset;
  if (distance_symbol < 4) {
    return distance_symbol + 1;
  }
  extra_bits = (distance_symbol - 2) >> 1;
  offset = (2 + (distance_symbol & 1)) << extra_bits;
  return offset + VP8LReadBits(br, extra_bits) + 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x4, -0x8(%rbp)
jge 0x147f10
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x147f4b
movl -0x8(%rbp), %eax
subl $0x2, %eax
sarl %eax
movl %eax, -0x14(%rbp)
movl -0x8(%rbp), %eax
andl $0x1, %eax
addl $0x2, %eax
movl -0x14(%rbp), %ecx
shll %cl, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1824b0
movl %eax, %ecx
movl -0x1c(%rbp), %eax
addl %ecx, %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: PlaneCodeToDistance
static WEBP_INLINE int PlaneCodeToDistance(int xsize, int plane_code) {
  if (plane_code > CODE_TO_PLANE_CODES) {
    return plane_code - CODE_TO_PLANE_CODES;
  } else {
    const int dist_code = kCodeToPlane[plane_code - 1];
    const int yoffset = dist_code >> 4;
    const int xoffset = 8 - (dist_code & 0xf);
    const int dist = yoffset * xsize + xoffset;
    return (dist >= 1) ? dist : 1;  // dist<1 can happen if xsize is very small
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x78, -0xc(%rbp)
jle 0x147f7b
movl -0xc(%rbp), %eax
subl $0x78, %eax
movl %eax, -0x4(%rbp)
jmp 0x147fd6
movl -0xc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x754d5(%rip), %rax     # 0x1bd460
movzbl (%rax,%rcx), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
sarl $0x4, %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %ecx
andl $0xf, %ecx
movl $0x8, %eax
subl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
imull -0x8(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x1, -0x1c(%rbp)
jl 0x147fc6
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x147fd0
movl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x147fd0
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: CopyBlock8b
static WEBP_INLINE void CopyBlock8b(uint8_t* const dst, int dist, int length) {
  const uint8_t* src = dst - dist;
  if (length >= 8) {
    uint32_t pattern = 0;
    switch (dist) {
      case 1:
        pattern = src[0];
#if defined(__arm__) || defined(_M_ARM)   // arm doesn't like multiply that much
        pattern |= pattern << 8;
        pattern |= pattern << 16;
#elif defined(WEBP_USE_MIPS_DSP_R2)
        __asm__ volatile ("replv.qb %0, %0" : "+r"(pattern));
#else
        pattern = 0x01010101u * pattern;
#endif
        break;
      case 2:
#if !defined(WORDS_BIGENDIAN)
        memcpy(&pattern, src, sizeof(uint16_t));
#else
        pattern = ((uint32_t)src[0] << 8) | src[1];
#endif
#if defined(__arm__) || defined(_M_ARM)
        pattern |= pattern << 16;
#elif defined(WEBP_USE_MIPS_DSP_R2)
        __asm__ volatile ("replv.ph %0, %0" : "+r"(pattern));
#else
        pattern = 0x00010001u * pattern;
#endif
        break;
      case 4:
        memcpy(&pattern, src, sizeof(uint32_t));
        break;
      default:
        goto Copy;
    }
    CopySmallPattern8b(src, dst, length, pattern);
    return;
  }
 Copy:
  if (dist >= length) {  // no overlap -> use memcpy()
    memcpy(dst, src, length * sizeof(*dst));
  } else {
    int i;
    for (i = 0; i < length; ++i) dst[i] = src[i];
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
cmpl $0x8, -0x10(%rbp)
jl 0x148083
movl $0x0, -0x1c(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
subl $0x1, %eax
je 0x148034
jmp 0x148020
movl -0x24(%rbp), %eax
subl $0x2, %eax
je 0x14804a
jmp 0x14802a
movl -0x24(%rbp), %eax
subl $0x4, %eax
je 0x148061
jmp 0x14806c
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x1c(%rbp)
imull $0x1010101, -0x1c(%rbp), %eax # imm = 0x1010101
movl %eax, -0x1c(%rbp)
jmp 0x14806e
movq -0x18(%rbp), %rax
movw (%rax), %ax
movw %ax, -0x1c(%rbp)
imull $0x10001, -0x1c(%rbp), %eax # imm = 0x10001
movl %eax, -0x1c(%rbp)
jmp 0x14806e
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0x14806e
jmp 0x148085
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl -0x10(%rbp), %edx
movl -0x1c(%rbp), %ecx
callq 0x1482b0
jmp 0x1480d6
jmp 0x148085
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jl 0x1480a4
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x10(%rbp), %rdx
shlq $0x0, %rdx
callq 0x593a0
jmp 0x1480d6
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x1480d4
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1480ab
jmp 0x1480d6
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0xc(%rax)
je 0x1482a5
movq -0x8(%rbp), %rax
movq 0xd0(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, %ecx
leaq 0xd0e29(%rip), %rax     # 0x219040
cmpq $0x0, (%rax,%rcx,8)
je 0x148220
jmp 0x14823f
leaq 0x758c0(%rip), %rdi     # 0x1bdae7
leaq 0x752bb(%rip), %rsi     # 0x1bd4e9
movl $0x36d, %edx            # imm = 0x36D
leaq 0x758d6(%rip), %rcx     # 0x1bdb10
callq 0x598a0
movl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x148296
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, %ecx
leaq 0xd0de3(%rip), %rax     # 0x219040
movq (%rax,%rcx,8), %rax
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq *%rax
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x148245
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xd0(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: CopySmallPattern8b
static WEBP_INLINE void CopySmallPattern8b(const uint8_t* src, uint8_t* dst,
                                           int length, uint32_t pattern) {
  int i;
  // align 'dst' to 4-bytes boundary. Adjust the pattern along the way.
  while ((uintptr_t)dst & 3) {
    *dst++ = *src++;
    pattern = Rotate8b(pattern);
    --length;
  }
  // Copy the pattern 4 bytes at a time.
  for (i = 0; i < (length >> 2); ++i) {
    ((uint32_t*)dst)[i] = pattern;
  }
  // Finish with left-overs. 'pattern' is still correctly positioned,
  // so no Rotate8b() call is needed.
  for (i <<= 2; i < length; ++i) {
    dst[i] = src[i];
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x10(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
je 0x14830c
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movl -0x18(%rbp), %edi
callq 0x148380
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1482c6
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl -0x14(%rbp), %ecx
sarl $0x2, %ecx
cmpl %ecx, %eax
jge 0x148339
movl -0x18(%rbp), %edx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x148313
movl -0x1c(%rbp), %eax
shll $0x2, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x14836b
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x148342
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: SaveState
static void SaveState(VP8LDecoder* const dec, int last_pixel) {
  assert(dec->incremental_);
  dec->saved_br_ = dec->br_;
  dec->saved_last_pixel_ = last_pixel;
  if (dec->hdr_.color_cache_size_ > 0) {
    VP8LColorCacheCopy(&dec->hdr_.color_cache_, &dec->hdr_.saved_color_cache_);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x50(%rax)
je 0x1483bb
jmp 0x1483da
leaq 0x75930(%rip), %rdi     # 0x1bdcf2
leaq 0x75120(%rip), %rsi     # 0x1bd4e9
movl $0x45f, %edx            # imm = 0x45F
leaq 0x7592f(%rip), %rcx     # 0x1bdd04
callq 0x598a0
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
movq -0x8(%rbp), %rsi
addq $0x28, %rsi
movl $0x28, %edx
callq 0x593a0
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x80(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x98(%rax)
jle 0x148431
movq -0x8(%rbp), %rdi
addq $0x98, %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rsi
addq $0x98, %rsi
addq $0x18, %rsi
callq 0x1826d0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: ReadPackedSymbols
static WEBP_INLINE int ReadPackedSymbols(const HTreeGroup* group,
                                         VP8LBitReader* const br,
                                         uint32_t* const dst) {
  const uint32_t val = VP8LPrefetchBits(br) & (HUFFMAN_PACKED_TABLE_SIZE - 1);
  const HuffmanCode32 code = group->packed_table[val];
  assert(group->use_packed_table);
  if (code.bits < BITS_SPECIAL_MARKER) {
    VP8LSetBitPos(br, br->bit_pos_ + code.bits);
    *dst = code.value;
    return PACKED_NON_LITERAL_CODE;
  } else {
    VP8LSetBitPos(br, br->bit_pos_ + code.bits - BITS_SPECIAL_MARKER);
    assert(code.value >= NUM_LITERAL_CODES);
    return code.value;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x147330
andl $0x3f, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
movq 0x38(%rax,%rcx,8), %rax
movq %rax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x34(%rax)
je 0x14847f
jmp 0x14849e
leaq 0x758a6(%rip), %rdi     # 0x1bdd2c
leaq 0x7505c(%rip), %rsi     # 0x1bd4e9
movl $0xd8, %edx
leaq 0x758ab(%rip), %rcx     # 0x1bdd44
callq 0x598a0
cmpl $0x100, -0x2c(%rbp)     # imm = 0x100
jge 0x1484cc
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x20(%rax), %esi
addl -0x2c(%rbp), %esi
callq 0x147350
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x148515
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x20(%rax), %esi
addl -0x2c(%rbp), %esi
subl $0x100, %esi            # imm = 0x100
callq 0x147350
cmpl $0x100, -0x28(%rbp)     # imm = 0x100
jb 0x1484f0
jmp 0x14850f
leaq 0x7589e(%rip), %rdi     # 0x1bdd95
leaq 0x74feb(%rip), %rsi     # 0x1bd4e9
movl $0xdf, %edx
leaq 0x7583a(%rip), %rcx     # 0x1bdd44
callq 0x598a0
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
cmpl $0x2, -0xc(%rbp)
jg 0x1485e7
cmpl $0x4, -0x10(%rbp)
jl 0x1485e7
movq -0x8(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1485e7
cmpl $0x1, -0xc(%rbp)
jne 0x1485c6
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
shlq $0x20, %rax
orq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x1485d1
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl -0x10(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0x148770
jmp 0x14863a
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jl 0x148606
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x10(%rbp), %rdx
shlq $0x2, %rdx
callq 0x593a0
jmp 0x148638
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x148636
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x14860d
jmp 0x148638
jmp 0x14863a
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: RestoreState
static void RestoreState(VP8LDecoder* const dec) {
  assert(dec->br_.eos_);
  dec->status_ = VP8_STATUS_SUSPENDED;
  dec->br_ = dec->saved_br_;
  dec->last_pixel_ = dec->saved_last_pixel_;
  if (dec->hdr_.color_cache_size_ > 0) {
    VP8LColorCacheCopy(&dec->hdr_.saved_color_cache_, &dec->hdr_.color_cache_);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
je 0x1486b8
jmp 0x1486d7
leaq 0x75821(%rip), %rdi     # 0x1bdee0
leaq 0x74e23(%rip), %rsi     # 0x1bd4e9
movl $0x468, %edx            # imm = 0x468
leaq 0x7581c(%rip), %rcx     # 0x1bdeee
callq 0x598a0
movq -0x8(%rbp), %rax
movl $0x5, (%rax)
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
movq -0x8(%rbp), %rsi
addq $0x58, %rsi
movl $0x28, %edx
callq 0x593a0
movq -0x8(%rbp), %rax
movl 0x80(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x90(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x98(%rax)
jle 0x14873f
movq -0x8(%rbp), %rdi
addq $0x98, %rdi
addq $0x18, %rdi
movq -0x8(%rbp), %rsi
addq $0x98, %rsi
addq $0x8, %rsi
callq 0x1826d0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: CopySmallPattern32b
static WEBP_INLINE void CopySmallPattern32b(const uint32_t* src,
                                            uint32_t* dst,
                                            int length, uint64_t pattern) {
  int i;
  if ((uintptr_t)dst & 4) {           // Align 'dst' to 8-bytes boundary.
    *dst++ = *src++;
    pattern = (pattern >> 32) | (pattern << 32);
    --length;
  }
  assert(0 == ((uintptr_t)dst & 7));
  for (i = 0; i < (length >> 1); ++i) {
    ((uint64_t*)dst)[i] = pattern;    // Copy the pattern 8 bytes at a time.
  }
  if (length & 1) {                   // Finish with left-over.
    dst[i << 1] = src[i << 1];
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
andq $0x4, %rax
cmpq $0x0, %rax
je 0x1487d7
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x8(%rbp)
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x10(%rbp)
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
shrq $0x20, %rax
movq -0x20(%rbp), %rcx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rcx
andq $0x7, %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x1487e8
jmp 0x148807
leaq 0x755c6(%rip), %rdi     # 0x1bddb5
leaq 0x74cf3(%rip), %rsi     # 0x1bd4e9
movl $0x3ec, %edx            # imm = 0x3EC
leaq 0x755cd(%rip), %rcx     # 0x1bddcf
callq 0x598a0
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x14(%rbp), %ecx
sarl %ecx
cmpl %ecx, %eax
jge 0x148835
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x14880e
movl -0x14(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x14885e
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x110(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x84(%rax), %eax
imull -0x10(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x1c(%rbp)
cmpl $0x0, %eax
jle 0x14890b
movq -0x8(%rbp), %rax
addq $0x118, %rax            # imm = 0x118
movslq -0x1c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x24(%rbp), %edx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %r8
callq 0x14e9b0
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x1488c1
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x14892a
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movslq -0x20(%rbp), %rdx
shlq $0x2, %rdx
callq 0x593a0
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: SetCropWindow
static int SetCropWindow(VP8Io* const io, int y_start, int y_end,
                         uint8_t** const in_data, int pixel_stride) {
  assert(y_start < y_end);
  assert(io->crop_left < io->crop_right);
  if (y_end > io->crop_bottom) {
    y_end = io->crop_bottom;  // make sure we don't overflow on last row.
  }
  if (y_start < io->crop_top) {
    const int delta = io->crop_top - y_start;
    y_start = io->crop_top;
    *in_data += delta * pixel_stride;
  }
  if (y_start >= y_end) return 0;  // Crop window is empty.

  *in_data += io->crop_left * sizeof(uint32_t);

  io->mb_y = y_start - io->crop_top;
  io->mb_w = io->crop_right - io->crop_left;
  io->mb_h = y_end - y_start;
  return 1;  // Non-empty crop window.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x148954
jmp 0x148973
leaq 0x756e5(%rip), %rdi     # 0x1be040
leaq 0x74b87(%rip), %rsi     # 0x1bd4e9
movl $0x2ea, %edx            # imm = 0x2EA
leaq 0x756e2(%rip), %rcx     # 0x1be050
callq 0x598a0
movq -0x10(%rbp), %rax
movl 0x78(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x7c(%rcx), %eax
jge 0x148985
jmp 0x1489a4
leaq 0x75704(%rip), %rdi     # 0x1be090
leaq 0x74b56(%rip), %rsi     # 0x1bd4e9
movl $0x2eb, %edx            # imm = 0x2EB
leaq 0x756b1(%rip), %rcx     # 0x1be050
callq 0x598a0
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x84(%rcx), %eax
jle 0x1489c0
movq -0x10(%rbp), %rax
movl 0x84(%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x80(%rcx), %eax
jge 0x148a03
movq -0x10(%rbp), %rax
movl 0x80(%rax), %eax
subl -0x14(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x80(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x28(%rbp), %edx
imull -0x24(%rbp), %edx
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jl 0x148a14
movl $0x0, -0x4(%rbp)
jmp 0x148a67
movq -0x10(%rbp), %rax
movslq 0x78(%rax), %rcx
shlq $0x2, %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
subl 0x80(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x7c(%rax), %ecx
movq -0x10(%rbp), %rax
subl 0x78(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x18(%rbp), %ecx
subl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: EmitRows
static int EmitRows(WEBP_CSP_MODE colorspace,
                    const uint8_t* row_in, int in_stride,
                    int mb_w, int mb_h,
                    uint8_t* const out, int out_stride) {
  int lines = mb_h;
  uint8_t* row_out = out;
  while (lines-- > 0) {
    VP8LConvertFromBGRA((const uint32_t*)row_in, mb_w, colorspace, row_out);
    row_in += in_stride;
    row_out += out_stride;
  }
  return mb_h;  // Num rows out == num rows in.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x10(%rbp), %eax
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq %r9, -0x28(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x2c(%rbp)
cmpl $0x0, %eax
jle 0x148c45
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x4(%rbp), %edx
movq -0x38(%rbp), %rcx
callq 0x14f4b0
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl 0x10(%rbp), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x148bfe
movl -0x1c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: EmitRescaledRowsYUVA
static int EmitRescaledRowsYUVA(const VP8LDecoder* const dec,
                                uint8_t* in, int in_stride, int mb_h) {
  int num_lines_in = 0;
  int y_pos = dec->last_out_row_;
  while (num_lines_in < mb_h) {
    const int lines_left = mb_h - num_lines_in;
    const int needed_lines = WebPRescaleNeededLines(dec->rescaler, lines_left);
    int lines_imported;
    WebPMultARGBRows(in, in_stride, dec->rescaler->src_width, needed_lines, 0);
    lines_imported =
        WebPRescalerImport(dec->rescaler, lines_left, in, in_stride);
    assert(lines_imported == needed_lines);
    num_lines_in += lines_imported;
    in += needed_lines * in_stride;
    y_pos += ExportYUVA(dec, y_pos);
  }
  return y_pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x94(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x148d40
movl -0x18(%rbp), %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq 0x188(%rax), %rdi
movl -0x24(%rbp), %esi
callq 0x13d7e0
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x8(%rbp), %rax
movq 0x188(%rax), %rax
movl 0x2c(%rax), %edx
movl -0x28(%rbp), %ecx
xorl %r8d, %r8d
callq 0x1492d0
movq -0x8(%rbp), %rax
movq 0x188(%rax), %rdi
movl -0x24(%rbp), %esi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
callq 0x13d830
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jne 0x148cec
jmp 0x148d0b
leaq 0x75448(%rip), %rdi     # 0x1be13b
leaq 0x747ef(%rip), %rsi     # 0x1bd4e9
movl $0x2cc, %edx            # imm = 0x2CC
leaq 0x75454(%rip), %rcx     # 0x1be15a
callq 0x598a0
movl -0x2c(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x28(%rbp), %ecx
imull -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x148ee0
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x148c7a
movl -0x20(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)