LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/webp_dec.c
// Function: WebPDecode
VP8StatusCode WebPDecode(const uint8_t* data, size_t data_size,
                         WebPDecoderConfig* config) {
  WebPDecParams params;
  VP8StatusCode status;

  if (config == NULL) {
    return VP8_STATUS_INVALID_PARAM;
  }

  status = GetFeatures(data, data_size, &config->input);
  if (status != VP8_STATUS_OK) {
    if (status == VP8_STATUS_NOT_ENOUGH_DATA) {
      return VP8_STATUS_BITSTREAM_ERROR;  // Not-enough-data treated as error.
    }
    return status;
  }

  WebPResetDecParams(&params);
  params.options = &config->options;
  params.output = &config->output;
  if (WebPAvoidSlowMemory(params.output, &config->input)) {
    // decoding to slow memory: use a temporary in-mem buffer to decode into.
    WebPDecBuffer in_mem_buffer;
    if (!WebPInitDecBuffer(&in_mem_buffer)) {
      return VP8_STATUS_INVALID_PARAM;
    }
    in_mem_buffer.colorspace = config->output.colorspace;
    in_mem_buffer.width = config->input.width;
    in_mem_buffer.height = config->input.height;
    params.output = &in_mem_buffer;
    status = DecodeInto(data, data_size, &params);
    if (status == VP8_STATUS_OK) {  // do the slow-copy
      status = WebPCopyDecBufferPixels(&in_mem_buffer, &config->output);
    }
    WebPFreeDecBuffer(&in_mem_buffer);
  } else {
    status = DecodeInto(data, data_size, &params);
  }

  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
testq %rdx, %rdx
je 0xc76ad
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0xc7532
testl %eax, %eax
je 0xc7610
movl %eax, %ebp
cmpl $0x7, %eax
jne 0xc76b0
pushq $0x3
jmp 0xc76af
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rsp)
movups %xmm0, 0x58(%rsp)
movups %xmm0, 0x48(%rsp)
movups %xmm0, 0x38(%rsp)
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
andq $0x0, 0x68(%rsp)
leaq 0xa0(%r15), %rax
movq %rax, 0x28(%rsp)
leaq 0x28(%r15), %r12
movq %r12, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xc68df
testl %eax, %eax
je 0xc76c4
leaq 0x70(%rsp), %r13
movq %r13, %rdi
callq 0xc70f1
testl %eax, %eax
je 0xc76ad
movl 0x28(%r15), %eax
movl %eax, 0x70(%rsp)
movq (%r15), %rax
movq %rax, 0x74(%rsp)
movq %rsp, %rdx
movq %r13, (%rdx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc70fb
movl %eax, %ebp
testl %eax, %eax
jne 0xc76a1
leaq 0x70(%rsp), %rdi
movq %r12, %rsi
callq 0xc65f6
movl %eax, %ebp
leaq 0x70(%rsp), %rdi
callq 0x58ee0
jmp 0xc76b0
pushq $0x2
popq %rbp
movl %ebp, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc70fb
movl %eax, %ebp
jmp 0xc76b0
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/utils/rescaler_utils.c
// Function: WebPRescalerGetScaledDimensions
int WebPRescalerGetScaledDimensions(int src_width, int src_height,
                                    int* const scaled_width,
                                    int* const scaled_height) {
  assert(scaled_width != NULL);
  assert(scaled_height != NULL);
  {
    int width = *scaled_width;
    int height = *scaled_height;
    const int max_size = INT_MAX / 2;

    // if width is unspecified, scale original proportionally to height ratio.
    if (width == 0 && src_height > 0) {
      width =
          (int)(((uint64_t)src_width * height + src_height - 1) / src_height);
    }
    // if height is unspecified, scale original proportionally to width ratio.
    if (height == 0 && src_width > 0) {
      height =
          (int)(((uint64_t)src_height * width + src_width - 1) / src_width);
    }
    // Check if the overall dimensions still make sense.
    if (width <= 0 || height <= 0 || width > max_size || height > max_size) {
      return 0;
    }

    *scaled_width = width;
    *scaled_height = height;
    return 1;
  }
}

// Assembly:
pushq %rax
testq %rdx, %rdx
je 0xc7a7f
testq %rcx, %rcx
je 0xc7a98
movq %rdx, %r8
movl (%rdx), %r9d
movl (%rcx), %r10d
testl %r9d, %r9d
setne %al
testl %esi, %esi
setle %dl
orb %al, %dl
jne 0xc7a2c
movslq %r10d, %rax
movslq %edi, %rdx
imulq %rax, %rdx
movl %esi, %r9d
leaq (%r9,%rdx), %rax
decq %rax
xorl %edx, %edx
divq %r9
movq %rax, %r9
testl %r10d, %r10d
setne %al
testl %edi, %edi
setle %dl
orb %al, %dl
jne 0xc7a56
movslq %esi, %rax
movslq %r9d, %rdx
imulq %rax, %rdx
movl %edi, %esi
leaq (%rsi,%rdx), %rax
decq %rax
xorl %edx, %edx
divq %rsi
movq %rax, %r10
movl $0xc0000000, %edx       # imm = 0xC0000000
leal (%r9,%rdx), %esi
xorl %eax, %eax
cmpl $0xc0000001, %esi       # imm = 0xC0000001
jb 0xc7a7d
addl %r10d, %edx
cmpl $0xc0000001, %edx       # imm = 0xC0000001
jb 0xc7a7d
movl %r9d, (%r8)
movl %r10d, (%rcx)
pushq $0x1
popq %rax
popq %rcx
retq
leaq 0x50f1a(%rip), %rdi     # 0x1189a0
leaq 0x50f28(%rip), %rsi     # 0x1189b5
leaq 0x50f3c(%rip), %rcx     # 0x1189d0
pushq $0x58
jmp 0xc7aaf
leaq 0x50f77(%rip), %rdi     # 0x118a16
leaq 0x50f0f(%rip), %rsi     # 0x1189b5
leaq 0x50f23(%rip), %rcx     # 0x1189d0
pushq $0x59
popq %rdx
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/utils/rescaler_utils.c
// Function: WebPRescalerImport
int WebPRescalerImport(WebPRescaler* const rescaler, int num_lines,
                       const uint8_t* src, int src_stride) {
  int total_imported = 0;
  while (total_imported < num_lines &&
         !WebPRescalerHasPendingOutput(rescaler)) {
    if (rescaler->y_expand) {
      rescaler_t* const tmp = rescaler->irow;
      rescaler->irow = rescaler->frow;
      rescaler->frow = tmp;
    }
    WebPRescalerImportRow(rescaler, src);
    if (!rescaler->y_expand) {    // Accumulate the contribution of the new row.
      int x;
      for (x = 0; x < rescaler->num_channels * rescaler->dst_width; ++x) {
        rescaler->irow[x] += rescaler->frow[x];
      }
    }
    ++rescaler->src_y;
    src += src_stride;
    ++total_imported;
    rescaler->y_accum -= rescaler->y_sub;
  }
  return total_imported;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
movslq %ecx, %r13
xorl %r12d, %r12d
testl %esi, %esi
cmovlel %r12d, %ebx
cmpl %ebx, %r12d
je 0xc7b62
movl 0x40(%r15), %eax
cmpl 0x38(%r15), %eax
jge 0xc7afb
cmpl $0x0, 0x18(%r15)
jle 0xc7b5f
cmpl $0x0, 0x4(%r15)
je 0xc7b13
movdqu 0x58(%r15), %xmm0
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
movdqu %xmm0, 0x58(%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0xd341c
cmpl $0x0, 0x4(%r15)
je 0xc7b39
incl 0x3c(%r15)
addq %r13, %r14
incl %r12d
movl 0x20(%r15), %eax
subl %eax, 0x18(%r15)
jmp 0xc7ae5
xorl %eax, %eax
movslq 0x8(%r15), %rcx
movslq 0x34(%r15), %rdx
imulq %rcx, %rdx
cmpq %rdx, %rax
jge 0xc7b25
movq 0x58(%r15), %rcx
movq 0x60(%r15), %rdx
movl (%rdx,%rax,4), %edx
addl %edx, (%rcx,%rax,4)
incq %rax
jmp 0xc7b3b
movl %r12d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/utils/rescaler_utils.c
// Function: WebPRescalerExport
int WebPRescalerExport(WebPRescaler* const rescaler) {
  int total_exported = 0;
  while (WebPRescalerHasPendingOutput(rescaler)) {
    WebPRescalerExportRow(rescaler);
    ++total_exported;
  }
  return total_exported;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %ebx, %ebx
movl 0x40(%r14), %eax
cmpl 0x38(%r14), %eax
jge 0xc7b94
cmpl $0x0, 0x18(%r14)
jg 0xc7b94
movq %r14, %rdi
callq 0xd345e
incl %ebx
jmp 0xc7b77
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/utils/utils.c
// Function: WebPSafeMalloc
void* WebPSafeMalloc(uint64_t nmemb, size_t size) {
  void* ptr;
  Increment(&num_malloc_calls);
  if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL;
  assert(nmemb * size > 0);
  ptr = malloc((size_t)(nmemb * size));
  AddMem(ptr, (size_t)(nmemb * size));
  return ptr;
}

// Assembly:
testq %rdi, %rdi
je 0xc7bbc
movabsq $0x400000000, %rax      # imm = 0x400000000
xorl %edx, %edx
divq %rdi
cmpq %rsi, %rax
jae 0xc7bbc
xorl %eax, %eax
retq
imulq %rdi, %rsi
testq %rsi, %rsi
je 0xc7bcd
movq %rsi, %rdi
jmp 0x59280
pushq %rax
leaq 0x50e57(%rip), %rdi     # 0x118a2c
leaq 0x50e61(%rip), %rsi     # 0x118a3d
leaq 0x50e6c(%rip), %rcx     # 0x118a4f
movl $0xc6, %edx
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/utils/utils.c
// Function: WebPSafeCalloc
void* WebPSafeCalloc(uint64_t nmemb, size_t size) {
  void* ptr;
  Increment(&num_calloc_calls);
  if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL;
  assert(nmemb * size > 0);
  ptr = calloc((size_t)nmemb, size);
  AddMem(ptr, (size_t)(nmemb * size));
  return ptr;
}

// Assembly:
testq %rdi, %rdi
je 0xc7c09
movabsq $0x400000000, %rax      # imm = 0x400000000
xorl %edx, %edx
divq %rdi
cmpq %rsi, %rax
jae 0xc7c09
xorl %eax, %eax
retq
movq %rsi, %rax
imulq %rdi, %rax
testq %rax, %rax
je 0xc7c1a
jmp 0x58f50
pushq %rax
leaq 0x50e0a(%rip), %rdi     # 0x118a2c
leaq 0x50e14(%rip), %rsi     # 0x118a3d
leaq 0x50e46(%rip), %rcx     # 0x118a76
movl $0xd0, %edx
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/utils/utils.c
// Function: WebPCopyPlane
void WebPCopyPlane(const uint8_t* src, int src_stride,
                   uint8_t* dst, int dst_stride, int width, int height) {
  assert(src != NULL && dst != NULL);
  assert(abs(src_stride) >= width && abs(dst_stride) >= width);
  while (height-- > 0) {
    memcpy(dst, src, width);
    src += src_stride;
    dst += dst_stride;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xc7cb9
movq %rdx, %r14
testq %rdx, %rdx
je 0xc7cb9
movl %esi, %edx
negl %edx
cmovsl %esi, %edx
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
cmpl %r8d, %edx
jl 0xc7cd8
cmpl %r8d, %eax
jl 0xc7cd8
movl %r9d, %ebx
movq %rdi, %r15
movslq %r8d, %r12
movslq %esi, %r13
movslq %ecx, %rbp
testl %ebx, %ebx
jle 0xc7caa
decl %ebx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x562f0
addq %r13, %r15
addq %rbp, %r14
jmp 0xc7c8e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x50ddd(%rip), %rdi     # 0x118a9d
leaq 0x50d76(%rip), %rsi     # 0x118a3d
leaq 0x50dea(%rip), %rcx     # 0x118ab8
movl $0xec, %edx
callq 0x56770
leaq 0x50e1c(%rip), %rdi     # 0x118afb
leaq 0x50d57(%rip), %rsi     # 0x118a3d
leaq 0x50dcb(%rip), %rcx     # 0x118ab8
movl $0xed, %edx
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/utils/utils.c
// Function: WebPCopyPixels
void WebPCopyPixels(const WebPPicture* const src, WebPPicture* const dst) {
  assert(src != NULL && dst != NULL);
  assert(src->width == dst->width && src->height == dst->height);
  assert(src->use_argb && dst->use_argb);
  WebPCopyPlane((uint8_t*)src->argb, 4 * src->argb_stride, (uint8_t*)dst->argb,
                4 * dst->argb_stride, 4 * src->width, src->height);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0xc7d8c
testq %rsi, %rsi
je 0xc7d8c
movl 0x8(%rdi), %r8d
cmpl 0x8(%rsi), %r8d
jne 0xc7d4e
movl 0xc(%rdi), %r9d
cmpl 0xc(%rsi), %r9d
jne 0xc7d4e
cmpl $0x0, (%rdi)
je 0xc7d6d
cmpl $0x0, (%rsi)
je 0xc7d6d
movq 0x48(%rdi), %rax
movl 0x50(%rdi), %r10d
shll $0x2, %r10d
movq 0x48(%rsi), %rdx
movl 0x50(%rsi), %ecx
shll $0x2, %ecx
shll $0x2, %r8d
movq %rax, %rdi
movl %r10d, %esi
popq %rax
jmp 0x59590
leaq 0x50e1d(%rip), %rdi     # 0x118b72
leaq 0x50ce1(%rip), %rsi     # 0x118a3d
leaq 0x50dcd(%rip), %rcx     # 0x118b30
movl $0xf7, %edx
callq 0x56770
leaq 0x50e35(%rip), %rdi     # 0x118ba9
leaq 0x50cc2(%rip), %rsi     # 0x118a3d
leaq 0x50dae(%rip), %rcx     # 0x118b30
movl $0xf8, %edx
callq 0x56770
leaq 0x50d0a(%rip), %rdi     # 0x118a9d
leaq 0x50ca3(%rip), %rsi     # 0x118a3d
leaq 0x50d8f(%rip), %rcx     # 0x118b30
movl $0xf6, %edx
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/frame_dec.c
// Function: VP8InitDithering
void VP8InitDithering(const WebPDecoderOptions* const options,
                      VP8Decoder* const dec) {
  assert(dec != NULL);
  if (options != NULL) {
    const int d = options->dithering_strength;
    const int max_amp = (1 << VP8_RANDOM_DITHER_FIX) - 1;
    const int f = (d < 0) ? 0 : (d > 100) ? max_amp : (d * max_amp / 100);
    if (f > 0) {
      int s;
      int all_amp = 0;
      for (s = 0; s < NUM_MB_SEGMENTS; ++s) {
        VP8QuantMatrix* const dqm = &dec->dqm_[s];
        if (dqm->uv_quant_ < DITHER_AMP_TAB_SIZE) {
          const int idx = (dqm->uv_quant_ < 0) ? 0 : dqm->uv_quant_;
          dqm->dither_ = (f * kQuantToDitherAmp[idx]) >> 3;
        }
        all_amp |= dqm->dither_;
      }
      if (all_amp != 0) {
        VP8InitRandom(&dec->dithering_rg_, 1.0f);
        dec->dither_ = 1;
      }
    }
    // potentially allow alpha dithering
    dec->alpha_dithering_ = options->alpha_dithering_strength;
    if (dec->alpha_dithering_ > 100) {
      dec->alpha_dithering_ = 100;
    } else if (dec->alpha_dithering_ < 0) {
      dec->alpha_dithering_ = 0;
    }
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xc7e95
movq %rdi, %r14
testq %rdi, %rdi
je 0xc7e8d
movq %rsi, %rbx
movl 0x2c(%r14), %ecx
testl %ecx, %ecx
js 0xc7e6d
movl $0xff, %eax
cmpl $0x64, %ecx
ja 0xc7df8
imull $0xff, %ecx, %eax
movw $0x64, %si
xorl %edx, %edx
divw %si
testl %ecx, %ecx
je 0xc7e6d
movzwl %ax, %eax
xorl %ecx, %ecx
leaq 0x50dff(%rip), %rdx     # 0x118c00
xorl %edi, %edi
xorl %esi, %esi
cmpq $0x80, %rdi
je 0xc7e4b
movl 0x43c(%rbx,%rdi), %r8d
cmpl $0xc, %r8d
jge 0xc7e3a
testl %r8d, %r8d
cmovlel %ecx, %r8d
movzbl (%r8,%rdx), %r8d
imull %eax, %r8d
shrl $0x3, %r8d
movl %r8d, 0x440(%rbx,%rdi)
jmp 0xc7e42
movl 0x440(%rbx,%rdi), %r8d
orl %r8d, %esi
addq $0x20, %rdi
jmp 0xc7e05
testl %esi, %esi
je 0xc7e6d
leaq 0x33c(%rbx), %rdi
movss 0x50d6a(%rip), %xmm0    # 0x118bc8
callq 0xe1bbc
movl $0x1, 0x338(%rbx)
movl 0x34(%r14), %eax
movl %eax, 0xbc8(%rbx)
cmpl $0x64, %eax
jle 0xc7e81
pushq $0x64
popq %rax
jmp 0xc7e87
testl %eax, %eax
jns 0xc7e8d
xorl %eax, %eax
movl %eax, 0xbc8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x51771(%rip), %rdi     # 0x11960d
leaq 0x50d6c(%rip), %rsi     # 0x118c0f
leaq 0x50d79(%rip), %rcx     # 0x118c23
movl $0x14a, %edx            # imm = 0x14A
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/frame_dec.c
// Function: VP8ExitCritical
int VP8ExitCritical(VP8Decoder* const dec, VP8Io* const io) {
  int ok = 1;
  if (dec->mt_method_ > 0) {
    ok = WebPGetWorkerInterface()->Sync(&dec->worker_);
  }

  if (io->teardown != NULL) {
    io->teardown(io);
  }
  return ok;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpl $0x0, 0xc8(%rdi)
jle 0xc8e61
movq %rdi, %r14
callq 0x577c0
addq $0x98, %r14
movq %r14, %rdi
callq *0x10(%rax)
movl %eax, %ebp
jmp 0xc8e64
pushq $0x1
popq %rbp
movq 0x50(%rbx), %rax
testq %rax, %rax
je 0xc8e72
movq %rbx, %rdi
callq *%rax
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/frame_dec.c
// Function: VP8GetThreadMethod
int VP8GetThreadMethod(const WebPDecoderOptions* const options,
                       const WebPHeaderStructure* const headers,
                       int width, int height) {
  if (options == NULL || options->use_threads == 0) {
    return 0;
  }
  (void)headers;
  (void)width;
  (void)height;
  assert(headers == NULL || !headers->is_lossless);
#if defined(WEBP_USE_THREAD)
  if (width >= MIN_WIDTH_FOR_THREADS) return 2;
#endif
  return 0;
}

// Assembly:
testq %rdi, %rdi
je 0xc8e8f
testq %rsi, %rsi
je 0xc8e8f
cmpl $0x0, 0x28(%rdi)
je 0xc8e8f
cmpl $0x0, 0x40(%rsi)
jne 0xc8e92
xorl %eax, %eax
retq
pushq %rax
leaq 0x4fe2f(%rip), %rdi     # 0x118cc9
leaq 0x4fd6e(%rip), %rsi     # 0x118c0f
leaq 0x4fe4a(%rip), %rcx     # 0x118cf2
movl $0x29d, %edx            # imm = 0x29D
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/frame_dec.c
// Function: DoTransform
static WEBP_INLINE void DoTransform(uint32_t bits, const int16_t* const src,
                                    uint8_t* const dst) {
  switch (bits >> 30) {
    case 3:
      VP8Transform(src, dst, 0);
      break;
    case 2:
      VP8TransformAC3(src, dst);
      break;
    case 1:
      VP8TransformDC(src, dst);
      break;
    default:
      break;
  }
}

// Assembly:
shrl $0x1e, %edi
leaq 0x4f960(%rip), %rax     # 0x118bf0
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
retq
leaq 0xa825f(%rip), %rax     # 0x171500
jmp 0xc92be
leaq 0xa824e(%rip), %rax     # 0x1714f8
movq (%rax), %rax
movq %rsi, %rdi
movq %rdx, %rsi
xorl %edx, %edx
jmpq *%rax
leaq 0xa8252(%rip), %rax     # 0x171510
movq (%rax), %rax
movq %rsi, %rdi
movq %rdx, %rsi
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/frame_dec.c
// Function: Dither8x8
static void Dither8x8(VP8Random* const rg, uint8_t* dst, int bps, int amp) {
  uint8_t dither[64];
  int i;
  for (i = 0; i < 8 * 8; ++i) {
    dither[i] = VP8RandomBits2(rg, VP8_DITHER_AMP_BITS + 1, amp);
  }
  VP8DitherCombine8x8(dither, dst, bps);
}

// Assembly:
subq $0x48, %rsp
xorl %eax, %eax
pcmpeqd %xmm0, %xmm0
movdqa 0x4f8de(%rip), %xmm1    # 0x118be0
cmpq $0x40, %rax
je 0xc935d
movslq (%rdi), %r8
movl 0x8(%rdi,%r8,4), %r9d
movslq 0x4(%rdi), %r10
subl 0x8(%rdi,%r10,4), %r9d
movl %r9d, %r10d
andl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
movl %r10d, 0x8(%rdi,%r8,4)
movq (%rdi), %xmm2
psubd %xmm0, %xmm2
movdqa %xmm2, %xmm3
pcmpeqd %xmm1, %xmm3
pandn %xmm2, %xmm3
movq %xmm3, (%rdi)
shrl $0x17, %r9d
movsbl %r9b, %r8d
imull %ecx, %r8d
shrl $0x8, %r8d
addb $-0x80, %r8b
movb %r8b, (%rsp,%rax)
incq %rax
jmp 0xc9302
leaq 0xa821c(%rip), %rax     # 0x171580
movq %rsp, %rdi
callq *(%rax)
addq $0x48, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: WebPInitCustomIo
void WebPInitCustomIo(WebPDecParams* const params, VP8Io* const io) {
  io->put      = CustomPut;
  io->setup    = CustomSetup;
  io->teardown = CustomTeardown;
  io->opaque   = params;
}

// Assembly:
leaq 0x1f(%rip), %rax        # 0xc9396
movq %rax, 0x40(%rsi)
leaq 0x7d(%rip), %rax        # 0xc93ff
movq %rax, 0x48(%rsi)
leaq 0x6a3(%rip), %rax       # 0xc9a30
movq %rax, 0x50(%rsi)
movq %rdi, 0x38(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: CustomPut
static int CustomPut(const VP8Io* io) {
  WebPDecParams* const p = (WebPDecParams*)io->opaque;
  const int mb_w = io->mb_w;
  const int mb_h = io->mb_h;
  int num_lines_out;
  assert(!(io->mb_y & 1));

  if (mb_w <= 0 || mb_h <= 0) {
    return 0;
  }
  num_lines_out = p->emit(io, p);
  if (p->emit_alpha != NULL) {
    p->emit_alpha(io, p, num_lines_out);
  }
  p->last_y += num_lines_out;
  return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testb $0x1, 0x8(%rdi)
jne 0xc93e0
movq %rdi, %rbx
xorl %eax, %eax
cmpl $0x0, 0xc(%rdi)
jle 0xc93db
cmpl $0x0, 0x10(%rbx)
jle 0xc93db
movq 0x38(%rbx), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq *0x58(%r14)
movl %eax, %ebp
movq 0x60(%r14), %rax
testq %rax, %rax
je 0xc93d4
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq *%rax
addl %ebp, 0x20(%r14)
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x4fab9(%rip), %rdi     # 0x118ea0
leaq 0x4fac2(%rip), %rsi     # 0x118eb0
leaq 0x4facc(%rip), %rcx     # 0x118ec1
movl $0x277, %edx            # imm = 0x277
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: EmitSampledRGB
static int EmitSampledRGB(const VP8Io* const io, WebPDecParams* const p) {
  WebPDecBuffer* const output = p->output;
  WebPRGBABuffer* const buf = &output->u.RGBA;
  uint8_t* const dst = buf->rgba + (size_t)io->mb_y * buf->stride;
  WebPSamplerProcessPlane(io->y, io->y_stride,
                          io->u, io->v, io->uv_stride,
                          dst, buf->stride, io->mb_w, io->mb_h,
                          WebPSamplers[output->colorspace]);
  return io->mb_h;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %r10
movslq 0x8(%rdi), %r9
movslq 0x18(%r10), %rax
imulq %rax, %r9
addq 0x10(%r10), %r9
movq 0x18(%rdi), %rdi
movl 0x30(%rbx), %esi
movq 0x20(%rbx), %rdx
movq 0x28(%rbx), %rcx
movl 0x34(%rbx), %r8d
movl 0xc(%rbx), %r11d
movl 0x10(%rbx), %r14d
movl (%r10), %r10d
leaq 0xa7e1b(%rip), %r15     # 0x1718a0
pushq (%r15,%r10,8)
pushq %r14
pushq %r11
pushq %rax
callq 0xd55f4
addq $0x20, %rsp
movl 0x10(%rbx), %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: EmitYUV
static int EmitYUV(const VP8Io* const io, WebPDecParams* const p) {
  WebPDecBuffer* output = p->output;
  const WebPYUVABuffer* const buf = &output->u.YUVA;
  uint8_t* const y_dst = buf->y + (size_t)io->mb_y * buf->y_stride;
  uint8_t* const u_dst = buf->u + (size_t)(io->mb_y >> 1) * buf->u_stride;
  uint8_t* const v_dst = buf->v + (size_t)(io->mb_y >> 1) * buf->v_stride;
  const int mb_w = io->mb_w;
  const int mb_h = io->mb_h;
  const int uv_w = (mb_w + 1) / 2;
  const int uv_h = (mb_h + 1) / 2;
  WebPCopyPlane(io->y, io->y_stride, y_dst, buf->y_stride, mb_w, mb_h);
  WebPCopyPlane(io->u, io->uv_stride, u_dst, buf->u_stride, uv_w, uv_h);
  WebPCopyPlane(io->v, io->uv_stride, v_dst, buf->v_stride, uv_w, uv_h);
  return io->mb_h;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %r13
movslq 0x8(%rdi), %rax
movslq 0x30(%r13), %rcx
movq %rcx, %r10
imulq %rax, %r10
addq 0x10(%r13), %r10
sarl %eax
cltq
movslq 0x34(%r13), %r15
imulq %rax, %r15
addq 0x18(%r13), %r15
movslq 0x38(%r13), %r14
imulq %rax, %r14
addq 0x20(%r13), %r14
movl 0xc(%rdi), %r8d
movl 0x10(%rdi), %r9d
leal 0x1(%r8), %eax
pushq $0x2
popq %rsi
cltd
idivl %esi
movl %eax, %ebp
leal 0x1(%r9), %eax
cltd
idivl %esi
movl %eax, %r12d
movq 0x18(%rdi), %rdi
movl 0x30(%rbx), %esi
movq %r10, %rdx
callq 0x59590
movq 0x20(%rbx), %rdi
movl 0x34(%rbx), %esi
movl 0x34(%r13), %ecx
movq %r15, %rdx
movl %ebp, %r8d
movl %r12d, %r9d
callq 0x59590
movq 0x28(%rbx), %rdi
movl 0x34(%rbx), %esi
movl 0x38(%r13), %ecx
movq %r14, %rdx
movl %ebp, %r8d
movl %r12d, %r9d
callq 0x59590
movl 0x10(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: EmitAlphaRGBA4444
static int EmitAlphaRGBA4444(const VP8Io* const io, WebPDecParams* const p,
                             int expected_num_lines_out) {
  const uint8_t* alpha = io->a;
  if (alpha != NULL) {
    const int mb_w = io->mb_w;
    const WEBP_CSP_MODE colorspace = p->output->colorspace;
    const WebPRGBABuffer* const buf = &p->output->u.RGBA;
    int num_rows;
    const size_t start_y = GetAlphaSourceRow(io, &alpha, &num_rows);
    uint8_t* const base_rgba = buf->rgba + start_y * buf->stride;
#if (WEBP_SWAP_16BIT_CSP == 1)
    uint8_t* alpha_dst = base_rgba;
#else
    uint8_t* alpha_dst = base_rgba + 1;
#endif
    uint32_t alpha_mask = 0x0f;
    int i, j;
    for (j = 0; j < num_rows; ++j) {
      for (i = 0; i < mb_w; ++i) {
        // Fill in the alpha value (converted to 4 bits).
        const uint32_t alpha_value = alpha[i] >> 4;
        alpha_dst[2 * i] = (alpha_dst[2 * i] & 0xf0) | alpha_value;
        alpha_mask &= alpha_value;
      }
      alpha += io->width;
      alpha_dst += buf->stride;
    }
    (void)expected_num_lines_out;
    assert(expected_num_lines_out == num_rows);
    if (alpha_mask != 0x0f && WebPIsPremultipliedMode(colorspace)) {
      WebPApplyAlphaMultiply4444(base_rgba, mb_w, num_rows, buf->stride);
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x98(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0xc9e2c
movq %rdi, %r14
movl %edx, 0x4(%rsp)
movl 0xc(%rdi), %ebp
movq (%rsi), %rbx
movl (%rbx), %r13d
leaq 0x8(%rsp), %r15
leaq 0x14(%rsp), %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0xca6ce
cltq
movq 0x10(%rbx), %rdx
movslq 0x18(%rbx), %rcx
imulq %rcx, %rax
leaq (%rdx,%rax), %rdi
addq %rax, %rdx
incq %rdx
movl (%r12), %eax
movq (%r15), %rsi
xorl %r8d, %r8d
testl %ebp, %ebp
movl $0x0, %r9d
cmovgl %ebp, %r9d
testl %eax, %eax
movl $0x0, %r11d
cmovgl %eax, %r11d
pushq $0xf
popq %r10
cmpl %r11d, %r8d
je 0xc9e09
xorl %ecx, %ecx
cmpq %rcx, %r9
je 0xc9df7
movzbl (%rsi,%rcx), %r15d
shrl $0x4, %r15d
movb (%rdx,%rcx,2), %r12b
andb $-0x10, %r12b
orb %r15b, %r12b
movb %r12b, (%rdx,%rcx,2)
andl %r15d, %r10d
incq %rcx
jmp 0xc9dd2
movslq (%r14), %rcx
addq %rcx, %rsi
movslq 0x18(%rbx), %rcx
addq %rcx, %rdx
incl %r8d
jmp 0xc9dcb
movl 0x4(%rsp), %edx
cmpl %edx, %eax
jne 0xc9e3d
cmpl $0xf, %r10d
je 0xc9e2c
addl $-0xb, %r13d
cmpl $-0x4, %r13d
jb 0xc9e2c
leaq 0xa75a8(%rip), %rax     # 0x1713d0
movl %ebp, %esi
callq *(%rax)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4f281(%rip), %rdi     # 0x1190c5
leaq 0x4f065(%rip), %rsi     # 0x118eb0
leaq 0x4f296(%rip), %rcx     # 0x1190e8
movl $0xe4, %edx
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: EmitAlphaRGB
static int EmitAlphaRGB(const VP8Io* const io, WebPDecParams* const p,
                        int expected_num_lines_out) {
  const uint8_t* alpha = io->a;
  if (alpha != NULL) {
    const int mb_w = io->mb_w;
    const WEBP_CSP_MODE colorspace = p->output->colorspace;
    const int alpha_first =
        (colorspace == MODE_ARGB || colorspace == MODE_Argb);
    const WebPRGBABuffer* const buf = &p->output->u.RGBA;
    int num_rows;
    const size_t start_y = GetAlphaSourceRow(io, &alpha, &num_rows);
    uint8_t* const base_rgba = buf->rgba + start_y * buf->stride;
    uint8_t* const dst = base_rgba + (alpha_first ? 0 : 3);
    const int has_alpha = WebPDispatchAlpha(alpha, io->width, mb_w,
                                            num_rows, dst, buf->stride);
    (void)expected_num_lines_out;
    assert(expected_num_lines_out == num_rows);
    // has_alpha is true if there's non-trivial alpha to premultiply with.
    if (has_alpha && WebPIsPremultipliedMode(colorspace)) {
      WebPApplyAlphaMultiply(base_rgba, alpha_first,
                             mb_w, num_rows, buf->stride);
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x98(%rdi), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0xc9f23
movl %edx, %ecx
movq %rdi, %r15
movl 0xc(%rdi), %r12d
movq (%rsi), %rbp
movl (%rbp), %ebx
cmpl $0x4, %ebx
sete %al
cmpl $0x9, %ebx
sete %r13b
orb %al, %r13b
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rdx
movl %ecx, 0x8(%rsp)
callq 0xca6ce
movslq %eax, %r14
movslq 0x18(%rbp), %r9
imulq %r9, %r14
addq 0x10(%rbp), %r14
movl %r13d, %eax
xorb $0x1, %al
movzbl %al, %eax
leaq (%rax,%rax,2), %r8
addq %r14, %r8
leaq 0xa7502(%rip), %rax     # 0x1713d8
leaq 0x10(%rsp), %rcx
movq (%rcx), %rdi
movl (%r15), %esi
leaq 0xc(%rsp), %rcx
movl (%rcx), %r15d
movl %r12d, 0x4(%rsp)
movl %r12d, %edx
movl %r15d, %ecx
callq *(%rax)
movl 0x8(%rsp), %ecx
cmpl %ecx, %r15d
jne 0xc9f34
addl $-0xb, %ebx
cmpl $-0x4, %ebx
jb 0xc9f23
testl %eax, %eax
je 0xc9f23
movzbl %r13b, %esi
leaq 0xa74b2(%rip), %rax     # 0x1713c8
movl 0x18(%rbp), %r8d
movq %r14, %rdi
movl 0x4(%rsp), %edx
callq *(%rax)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4f18a(%rip), %rdi     # 0x1190c5
leaq 0x4ef6e(%rip), %rsi     # 0x118eb0
leaq 0x4f1e4(%rip), %rcx     # 0x11912d
movl $0xbe, %edx
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: EmitAlphaYUV
static int EmitAlphaYUV(const VP8Io* const io, WebPDecParams* const p,
                        int expected_num_lines_out) {
  const uint8_t* alpha = io->a;
  const WebPYUVABuffer* const buf = &p->output->u.YUVA;
  const int mb_w = io->mb_w;
  const int mb_h = io->mb_h;
  uint8_t* dst = buf->a + (size_t)io->mb_y * buf->a_stride;
  int j;
  (void)expected_num_lines_out;
  assert(expected_num_lines_out == mb_h);
  if (alpha != NULL) {
    for (j = 0; j < mb_h; ++j) {
      memcpy(dst, alpha, mb_w * sizeof(*dst));
      alpha += io->width;
      dst += buf->a_stride;
    }
  } else if (buf->a != NULL) {
    // the user requested alpha, but there is none, set it to opaque.
    FillAlphaPlane(dst, mb_w, mb_h, buf->a_stride);
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl %edx, 0x10(%rdi)
jne 0xc9fd5
movq %rdi, %r15
movq (%rsi), %r13
movslq 0xc(%rdi), %rbx
movq 0x28(%r13), %rax
movslq 0x8(%rdi), %r14
movslq 0x3c(%r13), %rcx
imulq %rcx, %r14
addq %rax, %r14
movq 0x98(%rdi), %r12
testq %r12, %r12
je 0xc9fb5
xorl %ebp, %ebp
testl %edx, %edx
cmovgl %edx, %ebp
subl $0x1, %ebp
jb 0xc9fc4
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x562f0
movslq (%r15), %rax
addq %rax, %r12
movslq 0x3c(%r13), %rax
addq %rax, %r14
jmp 0xc9f93
testq %rax, %rax
je 0xc9fc4
movq %r14, %rdi
movl %ebx, %esi
callq 0xca692
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4f191(%rip), %rdi     # 0x11916d
leaq 0x4eecd(%rip), %rsi     # 0x118eb0
leaq 0x4f1a2(%rip), %rcx     # 0x11918c
movl $0x86, %edx
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: EmitRescaledAlphaRGB
static int EmitRescaledAlphaRGB(const VP8Io* const io, WebPDecParams* const p,
                                int expected_num_out_lines) {
  if (io->a != NULL) {
    WebPRescaler* const scaler = p->scaler_a;
    int lines_left = expected_num_out_lines;
    const int y_end = p->last_y + lines_left;
    while (lines_left > 0) {
      const int64_t row_offset = (int64_t)scaler->src_y - io->mb_y;
      WebPRescalerImport(scaler, io->mb_h + io->mb_y - scaler->src_y,
                         io->a + row_offset * io->width, io->width);
      lines_left -= p->emit_alpha_row(p, y_end - lines_left, lines_left);
    }
  }
  return 0;
}

// Assembly:
cmpq $0x0, 0x98(%rdi)
je 0xca269
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq 0x48(%rsi), %r12
movl 0x20(%rsi), %ebp
addl %edx, %ebp
testl %ebx, %ebx
jle 0xca261
movslq 0x3c(%r12), %rax
movslq 0x8(%r15), %rsi
movq %rax, %rdx
subq %rsi, %rdx
subl %eax, %esi
addl 0x10(%r15), %esi
movslq (%r15), %rcx
imulq %rcx, %rdx
addq 0x98(%r15), %rdx
movq %r12, %rdi
callq 0xc7ac8
movl %ebp, %esi
subl %ebx, %esi
movq %r14, %rdi
movl %ebx, %edx
callq *0x68(%r14)
subl %eax, %ebx
jmp 0xca221
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: ExportAlphaRGBA4444
static int ExportAlphaRGBA4444(WebPDecParams* const p, int y_pos,
                               int max_lines_out) {
  const WebPRGBABuffer* const buf = &p->output->u.RGBA;
  uint8_t* const base_rgba = buf->rgba + (size_t)y_pos * buf->stride;
#if (WEBP_SWAP_16BIT_CSP == 1)
  uint8_t* alpha_dst = base_rgba;
#else
  uint8_t* alpha_dst = base_rgba + 1;
#endif
  int num_lines_out = 0;
  const WEBP_CSP_MODE colorspace = p->output->colorspace;
  const int width = p->scaler_a->dst_width;
  const int is_premult_alpha = WebPIsPremultipliedMode(colorspace);
  uint32_t alpha_mask = 0x0f;

  while (WebPRescalerHasPendingOutput(p->scaler_a) &&
         num_lines_out < max_lines_out) {
    int i;
    assert(y_pos + num_lines_out < p->output->height);
    WebPRescalerExportRow(p->scaler_a);
    for (i = 0; i < width; ++i) {
      // Fill in the alpha value (converted to 4 bits).
      const uint32_t alpha_value = p->scaler_a->dst[i] >> 4;
      alpha_dst[2 * i] = (alpha_dst[2 * i] & 0xf0) | alpha_value;
      alpha_mask &= alpha_value;
    }
    alpha_dst += buf->stride;
    ++num_lines_out;
  }
  if (is_premult_alpha && alpha_mask != 0x0f) {
    WebPApplyAlphaMultiply4444(base_rgba, width, num_lines_out, buf->stride);
  }
  return num_lines_out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, 0x14(%rsp)
movq %rdi, %r13
movq (%rdi), %r14
movq 0x48(%rdi), %rdi
movq 0x10(%r14), %rax
movq %rsi, 0x20(%rsp)
movslq %esi, %rdx
movslq 0x18(%r14), %rcx
imulq %rcx, %rdx
leaq (%rax,%rdx), %rsi
movq %rsi, 0x18(%rsp)
leaq (%rax,%rdx), %r12
incq %r12
movl (%r14), %edx
movl 0x34(%rdi), %eax
addl $-0x7, %edx
movl %edx, 0x10(%rsp)
xorl %ebx, %ebx
testl %eax, %eax
movl $0x0, %r15d
movl %eax, 0xc(%rsp)
cmovgl %eax, %r15d
pushq $0xf
popq %rbp
movl 0x40(%rdi), %eax
cmpl 0x38(%rdi), %eax
jge 0xca330
cmpl $0x0, 0x18(%rdi)
jg 0xca330
cmpl 0x14(%rsp), %ebx
jge 0xca330
movq 0x20(%rsp), %rax
addl %ebx, %eax
movq (%r13), %rcx
cmpl 0x8(%rcx), %eax
jge 0xca361
callq 0xd345e
xorl %eax, %eax
cmpq %rax, %r15
je 0xca321
movq 0x48(%r13), %rcx
movq 0x48(%rcx), %rcx
movzbl (%rcx,%rax), %ecx
shrl $0x4, %ecx
movb (%r12,%rax,2), %dl
andb $-0x10, %dl
orb %cl, %dl
movb %dl, (%r12,%rax,2)
andl %ecx, %ebp
incq %rax
jmp 0xca2f9
movslq 0x18(%r14), %rcx
addq %rcx, %r12
incl %ebx
movq 0x48(%r13), %rdi
jmp 0xca2ce
cmpl $0x3, 0x10(%rsp)
ja 0xca350
cmpl $0xf, %ebp
je 0xca350
leaq 0xa708d(%rip), %rax     # 0x1713d0
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %esi
movl %ebx, %edx
callq *(%rax)
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4ebcd(%rip), %rdi     # 0x118f35
leaq 0x4eb41(%rip), %rsi     # 0x118eb0
leaq 0x4ec3f(%rip), %rcx     # 0x118fb5
movl $0x1c7, %edx            # imm = 0x1C7
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: ExportAlpha
static int ExportAlpha(WebPDecParams* const p, int y_pos, int max_lines_out) {
  const WebPRGBABuffer* const buf = &p->output->u.RGBA;
  uint8_t* const base_rgba = buf->rgba + (size_t)y_pos * buf->stride;
  const WEBP_CSP_MODE colorspace = p->output->colorspace;
  const int alpha_first =
      (colorspace == MODE_ARGB || colorspace == MODE_Argb);
  uint8_t* dst = base_rgba + (alpha_first ? 0 : 3);
  int num_lines_out = 0;
  const int is_premult_alpha = WebPIsPremultipliedMode(colorspace);
  uint32_t non_opaque = 0;
  const int width = p->scaler_a->dst_width;

  while (WebPRescalerHasPendingOutput(p->scaler_a) &&
         num_lines_out < max_lines_out) {
    assert(y_pos + num_lines_out < p->output->height);
    WebPRescalerExportRow(p->scaler_a);
    non_opaque |= WebPDispatchAlpha(p->scaler_a->dst, 0, width, 1, dst, 0);
    dst += buf->stride;
    ++num_lines_out;
  }
  if (is_premult_alpha && non_opaque) {
    WebPApplyAlphaMultiply(base_rgba, alpha_first,
                           width, num_lines_out, buf->stride);
  }
  return num_lines_out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, 0x14(%rsp)
movq %rdi, %r15
movq (%rdi), %rbp
movq 0x48(%rdi), %rdi
movq %rsi, 0x20(%rsp)
movslq %esi, %rdx
movslq 0x18(%rbp), %r8
imulq %r8, %rdx
addq 0x10(%rbp), %rdx
movl (%rbp), %esi
cmpl $0x4, %esi
sete %al
cmpl $0x9, %esi
sete %cl
orb %al, %cl
movzbl %cl, %eax
movl %eax, 0xc(%rsp)
xorb $0x1, %al
movzbl %al, %eax
leaq (%rax,%rax,2), %rbx
movq %rdx, 0x18(%rsp)
addq %rdx, %rbx
addl $-0x7, %esi
movl %esi, 0x10(%rsp)
movl 0x34(%rdi), %r12d
xorl %r13d, %r13d
xorl %r14d, %r14d
movl 0x40(%rdi), %eax
cmpl 0x38(%rdi), %eax
jge 0xca446
cmpl $0x0, 0x18(%rdi)
jg 0xca446
cmpl 0x14(%rsp), %r13d
jge 0xca446
movq 0x20(%rsp), %rax
addl %r13d, %eax
movq (%r15), %rcx
cmpl 0x8(%rcx), %eax
jge 0xca47c
callq 0xd345e
movq 0x48(%r15), %rax
movq 0x48(%rax), %rdi
xorl %esi, %esi
movl %r12d, %edx
pushq $0x1
popq %rcx
movq %rbx, %r8
xorl %r9d, %r9d
leaq 0xa6fa7(%rip), %rax     # 0x1713d8
callq *(%rax)
orl %eax, %r14d
movslq 0x18(%rbp), %r8
addq %r8, %rbx
incl %r13d
movq 0x48(%r15), %rdi
jmp 0xca3ea
cmpl $0x3, 0x10(%rsp)
ja 0xca46a
testl %r14d, %r14d
je 0xca46a
leaq 0xa6f6f(%rip), %rax     # 0x1713c8
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %esi
movl %r12d, %edx
movl %r13d, %ecx
callq *(%rax)
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4eab2(%rip), %rdi     # 0x118f35
leaq 0x4ea26(%rip), %rsi     # 0x118eb0
leaq 0x4eb5c(%rip), %rcx     # 0x118fed
movl $0x1a8, %edx            # imm = 0x1A8
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: EmitRescaledYUV
static int EmitRescaledYUV(const VP8Io* const io, WebPDecParams* const p) {
  const int mb_h = io->mb_h;
  const int uv_mb_h = (mb_h + 1) >> 1;
  WebPRescaler* const scaler = p->scaler_y;
  int num_lines_out = 0;
  if (WebPIsAlphaMode(p->output->colorspace) && io->a != NULL) {
    // Before rescaling, we premultiply the luma directly into the io->y
    // internal buffer. This is OK since these samples are not used for
    // intra-prediction (the top samples are saved in cache_y_/u_/v_).
    // But we need to cast the const away, though.
    WebPMultRows((uint8_t*)io->y, io->y_stride,
                 io->a, io->width, io->mb_w, mb_h, 0);
  }
  num_lines_out = Rescale(io->y, io->y_stride, mb_h, scaler);
  Rescale(io->u, io->uv_stride, uv_mb_h, p->scaler_u);
  Rescale(io->v, io->uv_stride, uv_mb_h, p->scaler_v);
  return num_lines_out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x10(%rdi), %r15d
movq (%rsi), %rax
movq 0x30(%rsi), %r12
movl (%rax), %eax
cmpl $0xc, %eax
ja 0xca546
movl $0x103a, %ecx           # imm = 0x103A
btl %eax, %ecx
jae 0xca546
movq 0x98(%r14), %rdx
testq %rdx, %rdx
je 0xca4f4
movq 0x18(%r14), %rdi
movl 0x30(%r14), %esi
movl (%r14), %ecx
movl 0xc(%r14), %r8d
andl $0x0, (%rsp)
movl %r15d, %r9d
callq 0xcea7f
leal 0x1(%r15), %ebp
sarl %ebp
movq 0x18(%r14), %rdi
movl 0x30(%r14), %esi
movl %r15d, %edx
movq %r12, %rcx
callq 0xca644
movl %eax, %r15d
movq 0x20(%r14), %rdi
movl 0x34(%r14), %esi
movq 0x38(%rbx), %rcx
movl %ebp, %edx
callq 0xca644
movq 0x28(%r14), %rdi
movl 0x34(%r14), %esi
movq 0x40(%rbx), %rcx
movl %ebp, %edx
callq 0xca644
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addl $-0xb, %eax
cmpl $-0x4, %eax
jae 0xca4cd
jmp 0xca4f4
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: EmitRescaledAlphaYUV
static int EmitRescaledAlphaYUV(const VP8Io* const io, WebPDecParams* const p,
                                int expected_num_lines_out) {
  const WebPYUVABuffer* const buf = &p->output->u.YUVA;
  uint8_t* const dst_a = buf->a + (size_t)p->last_y * buf->a_stride;
  if (io->a != NULL) {
    uint8_t* const dst_y = buf->y + (size_t)p->last_y * buf->y_stride;
    const int num_lines_out = Rescale(io->a, io->width, io->mb_h, p->scaler_a);
    assert(expected_num_lines_out == num_lines_out);
    if (num_lines_out > 0) {   // unmultiply the Y
      WebPMultRows(dst_y, buf->y_stride, dst_a, buf->a_stride,
                   p->scaler_a->dst_width, num_lines_out, 1);
    }
  } else if (buf->a != NULL) {
    // the user requested alpha, but there is none, set it to opaque.
    assert(p->last_y + expected_num_lines_out <= io->scaled_height);
    FillAlphaPlane(dst_a, io->scaled_width, expected_num_lines_out,
                   buf->a_stride);
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r15
movq (%rsi), %r13
movq 0x28(%r13), %rsi
movslq 0x20(%r15), %rdx
movslq 0x3c(%r13), %rcx
movq %rcx, %r14
imulq %rdx, %r14
addq %rsi, %r14
movq 0x98(%rdi), %rax
testq %rax, %rax
je 0xca5d7
movslq 0x30(%r13), %r12
imulq %rdx, %r12
addq 0x10(%r13), %r12
movl (%rdi), %esi
movl 0x10(%rdi), %edx
movq 0x48(%r15), %rcx
movq %rax, %rdi
callq 0xca644
cmpl %ebx, %eax
jne 0xca606
testl %ebx, %ebx
jle 0xca5f6
movl 0x30(%r13), %esi
movl 0x3c(%r13), %ecx
movq 0x48(%r15), %rax
movl 0x34(%rax), %r8d
movl $0x1, (%rsp)
movq %r12, %rdi
movq %r14, %rdx
movl %ebx, %r9d
callq 0xcea7f
jmp 0xca5f6
testq %rsi, %rsi
je 0xca5f6
addl %ebx, %edx
cmpl 0x90(%rdi), %edx
jg 0xca625
movl 0x8c(%rdi), %esi
movq %r14, %rdi
movl %ebx, %edx
callq 0xca692
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x4ea10(%rip), %rdi     # 0x11901d
leaq 0x4e89c(%rip), %rsi     # 0x118eb0
leaq 0x4ea2a(%rip), %rcx     # 0x119045
movl $0x116, %edx            # imm = 0x116
callq 0x56770
leaq 0x4ea61(%rip), %rdi     # 0x11908d
leaq 0x4e87d(%rip), %rsi     # 0x118eb0
leaq 0x4ea0b(%rip), %rcx     # 0x119045
movl $0x11d, %edx            # imm = 0x11D
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: Rescale
static int Rescale(const uint8_t* src, int src_stride,
                   int new_lines, WebPRescaler* const wrk) {
  int num_lines_out = 0;
  while (new_lines > 0) {    // import new contributions of source rows.
    const int lines_in = WebPRescalerImport(wrk, new_lines, src, src_stride);
    src += lines_in * src_stride;
    new_lines -= lines_in;
    num_lines_out += WebPRescalerExport(wrk);    // emit output row(s)
  }
  return num_lines_out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r12
xorl %r15d, %r15d
testl %ebp, %ebp
jle 0xca686
movq %rbx, %rdi
movl %ebp, %esi
movq %r12, %rdx
movl %r14d, %ecx
callq 0xc7ac8
subl %eax, %ebp
imull %r14d, %eax
cltq
addq %rax, %r12
movq %rbx, %rdi
callq 0xc7b6e
addl %eax, %r15d
jmp 0xca65a
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: FillAlphaPlane
static void FillAlphaPlane(uint8_t* dst, int w, int h, int stride) {
  int j;
  for (j = 0; j < h; ++j) {
    memset(dst, 0xff, w * sizeof(*dst));
    dst += stride;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq %esi, %r14
movslq %ecx, %r15
xorl %ebp, %ebp
testl %edx, %edx
cmovgl %edx, %ebp
subl $0x1, %ebp
jb 0xca6c3
movq %rbx, %rdi
movl $0xff, %esi
movq %r14, %rdx
callq 0x56ff0
addq %r15, %rbx
jmp 0xca6a9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: GetAlphaSourceRow
static int GetAlphaSourceRow(const VP8Io* const io,
                             const uint8_t** alpha, int* const num_rows) {
  int start_y = io->mb_y;
  *num_rows = io->mb_h;

  // Compensate for the 1-line delay of the fancy upscaler.
  // This is similar to EmitFancyRGB().
  if (io->fancy_upsampling) {
    if (start_y == 0) {
      // We don't process the last row yet. It'll be done during the next call.
      --*num_rows;
    } else {
      --start_y;
      // Fortunately, *alpha data is persistent, so we can go back
      // one row and finish alpha blending, now that the fancy upscaler
      // completed the YUV->RGB interpolation.
      *alpha -= io->width;
    }
    if (io->crop_top + io->mb_y + io->mb_h == io->crop_bottom) {
      // If it's the very last call, we process all the remaining rows!
      *num_rows = io->crop_bottom - io->crop_top - start_y;
    }
  }
  return start_y;
}

// Assembly:
movl 0x8(%rdi), %eax
movl 0x10(%rdi), %ecx
movl %ecx, (%rdx)
cmpl $0x0, 0x58(%rdi)
je 0xca712
testl %eax, %eax
je 0xca6ea
decl %eax
movslq (%rdi), %r8
subq %r8, (%rsi)
jmp 0xca6f3
decl %ecx
movl %ecx, (%rdx)
movl 0x10(%rdi), %ecx
xorl %eax, %eax
movl 0x80(%rdi), %r8d
movl 0x8(%rdi), %esi
addl %r8d, %esi
addl %ecx, %esi
cmpl 0x84(%rdi), %esi
jne 0xca712
addl %eax, %r8d
subl %r8d, %esi
movl %esi, (%rdx)
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8_dec.c
// Function: VP8InitIoInternal
int VP8InitIoInternal(VP8Io* const io, int version) {
  if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_DECODER_ABI_VERSION)) {
    return 0;  // mismatch error
  }
  if (io != NULL) {
    memset(io, 0, sizeof(*io));
  }
  return 1;
}

// Assembly:
pushq %rbx
andl $0xffffff00, %esi       # imm = 0xFFFFFF00
xorl %ebx, %ebx
cmpl $0x200, %esi            # imm = 0x200
jne 0xca73f
pushq $0x1
popq %rbx
testq %rdi, %rdi
je 0xca73f
movl $0xa0, %edx
xorl %esi, %esi
callq 0x56ff0
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8_dec.c
// Function: VP8New
VP8Decoder* VP8New(void) {
  VP8Decoder* const dec = (VP8Decoder*)WebPSafeCalloc(1ULL, sizeof(*dec));
  if (dec != NULL) {
    SetOk(dec);
    WebPGetWorkerInterface()->Init(&dec->worker_);
    dec->ready_ = 0;
    dec->num_parts_minus_one_ = 0;
    InitGetCoeffs();
  }
  return dec;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
pushq $0x1
popq %rdi
movl $0xbd0, %esi            # imm = 0xBD0
callq 0x57690
movq %rax, %rbx
testq %rax, %rax
je 0xca7cb
andl $0x0, (%rbx)
leaq 0x5374e(%rip), %rax     # 0x11deb4
movq %rax, 0x8(%rbx)
callq 0x577c0
movq %rbx, %rdi
addq $0x98, %rdi
callq *(%rax)
andl $0x0, 0x4(%rbx)
andl $0x0, 0x1b0(%rbx)
movq 0x99d9b(%rip), %rcx     # 0x164528
movq 0x96fc4(%rip), %r14     # 0x161758
movq (%r14), %rax
cmpq %rax, %rcx
je 0xca7cb
testq %rax, %rax
je 0xca7b3
pushq $0x2
popq %rdi
callq *%rax
testl %eax, %eax
je 0xca7b3
leaq 0xe05(%rip), %rax       # 0xcb5b6
jmp 0xca7ba
leaq 0xf0a(%rip), %rax       # 0xcb6c4
movq %rax, 0xa6bef(%rip)     # 0x1713b0
movq (%r14), %rax
movq %rax, 0x99d5d(%rip)     # 0x164528
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8_dec.c
// Function: VP8Clear
void VP8Clear(VP8Decoder* const dec) {
  if (dec == NULL) {
    return;
  }
  WebPGetWorkerInterface()->End(&dec->worker_);
  WebPDeallocateAlphaMemory(dec);
  WebPSafeFree(dec->mem_);
  dec->mem_ = NULL;
  dec->mem_size_ = 0;
  memset(&dec->br_, 0, sizeof(dec->br_));
  dec->ready_ = 0;
}

// Assembly:
testq %rdi, %rdi
je 0xca861
pushq %rbx
movq %rdi, %rbx
callq 0x577c0
leaq 0x98(%rbx), %rdi
callq *0x28(%rax)
movq %rbx, %rdi
callq 0xe1d70
movq 0xb48(%rbx), %rdi
callq 0x58480
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
andl $0x0, 0x4(%rbx)
movups %xmm0, 0xb48(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8_dec.c
// Function: VP8SetError
int VP8SetError(VP8Decoder* const dec,
                VP8StatusCode error, const char* const msg) {
  // VP8_STATUS_SUSPENDED is only meaningful in incremental decoding.
  assert(dec->incremental_ || error != VP8_STATUS_SUSPENDED);
  // The oldest error reported takes precedence over the new one.
  if (dec->status_ == VP8_STATUS_OK) {
    dec->status_ = error;
    dec->error_msg_ = msg;
    dec->ready_ = 0;
  }
  return 0;
}

// Assembly:
cmpl $0x5, %esi
jne 0xca86d
cmpl $0x0, 0x40(%rdi)
je 0xca87f
cmpl $0x0, (%rdi)
jne 0xca87c
movl %esi, (%rdi)
movq %rdx, 0x8(%rdi)
andl $0x0, 0x4(%rdi)
xorl %eax, %eax
retq
pushq %rax
leaq 0x4e973(%rip), %rdi     # 0x1191fa
leaq 0x4e99f(%rip), %rsi     # 0x11922d
leaq 0x4e9aa(%rip), %rcx     # 0x11923f
pushq $0x5a
popq %rdx
callq 0x56770