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

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

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

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

    return 1;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
testq %rdi, %rdi
sete %al
cmpq $0xa, %rsi
setb %cl
xorl %ebx, %ebx
orb %al, %cl
jne 0xca958
movq %r8, %r14
movq %rdx, %r13
movq %rdi, %r12
addq $0x3, %rdi
addq $-0x3, %rsi
callq 0x57d90
testl %eax, %eax
je 0xca958
movzbl (%r12), %eax
movl %eax, %ecx
andl $0x19, %ecx
cmpl $0x10, %ecx
jne 0xca958
movzwl 0x1(%r12), %ecx
shll $0x8, %ecx
orl %eax, %ecx
shrl $0x5, %ecx
cmpq %r13, %rcx
jae 0xca958
movzbl 0x7(%r12), %eax
movzbl 0x6(%r12), %ecx
andl $0x3f, %eax
shll $0x8, %eax
orl %ecx, %eax
testl %eax, %eax
je 0xca958
movzbl 0x9(%r12), %ecx
movzbl 0x8(%r12), %edx
andl $0x3f, %ecx
shll $0x8, %ecx
orl %edx, %ecx
testl %ecx, %ecx
je 0xca958
testq %r15, %r15
je 0xca94d
movl %eax, (%r15)
pushq $0x1
popq %rbx
testq %r14, %r14
je 0xca958
movl %ecx, (%r14)
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/dec/vp8_dec.c
// Function: VP8Decode
int VP8Decode(VP8Decoder* const dec, VP8Io* const io) {
  int ok = 0;
  if (dec == NULL) {
    return 0;
  }
  if (io == NULL) {
    return VP8SetError(dec, VP8_STATUS_INVALID_PARAM,
                       "NULL VP8Io parameter in VP8Decode().");
  }

  if (!dec->ready_) {
    if (!VP8GetHeaders(dec, io)) {
      return 0;
    }
  }
  assert(dec->ready_);

  // Finish setting up the decoding parameter. Will call io->setup().
  ok = (VP8EnterCritical(dec, io) == VP8_STATUS_OK);
  if (ok) {   // good to go.
    // Will allocate memory and prepare everything.
    if (ok) ok = VP8InitFrame(dec, io);

    // Main decoding loop
    if (ok) ok = ParseFrame(dec, io);

    // Exit.
    ok &= VP8ExitCritical(dec, io);
  }

  if (!ok) {
    VP8Clear(dec);
    return 0;
  }

  dec->ready_ = 0;
  return ok;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testq %rdi, %rdi
je 0xcb553
movq %rsi, %r15
movq %rdi, %r14
testq %rsi, %rsi
je 0xcb412
cmpl $0x0, 0x4(%r14)
jne 0xcb3f6
movq %r14, %rdi
movq %r15, %rsi
callq 0xca964
testl %eax, %eax
je 0xcb553
cmpl $0x0, 0x4(%r14)
je 0xcb597
movq %r14, %rdi
movq %r15, %rsi
callq 0xc8c2e
testl %eax, %eax
je 0xcb433
movq %r14, %rdi
callq 0xca81a
jmp 0xcb553
cmpl $0x0, (%r14)
jne 0xcb553
movq $0x2, (%r14)
leaq 0x4df66(%rip), %rax     # 0x119390
movq %rax, 0x8(%r14)
jmp 0xcb553
movq %r14, %rdi
movq %r15, %rsi
callq 0xc8eb2
testl %eax, %eax
je 0xcb536
leaq 0x1b8(%r14), %rbp
leaq 0x10(%r14), %r12
xorl %r13d, %r13d
movl %r13d, 0xb5c(%r14)
cmpl 0x1ac(%r14), %r13d
jge 0xcb514
andl 0x1b0(%r14), %r13d
movq %r12, %rdi
movq %r14, %rsi
callq 0xe2559
testl %eax, %eax
je 0xcb564
imulq $0x30, %r13, %r13
addq %rbp, %r13
movl 0xb58(%r14), %eax
cmpl 0x198(%r14), %eax
jge 0xcb4ba
movq %r14, %rdi
movq %r13, %rsi
callq 0xcaf63
testl %eax, %eax
je 0xcb4f8
movl 0xb58(%r14), %eax
incl %eax
movl %eax, 0xb58(%r14)
jmp 0xcb490
movq 0xb10(%r14), %rax
andw $0x0, -0x2(%rax)
andl $0x0, 0xb00(%r14)
andl $0x0, 0xb58(%r14)
movq %r14, %rdi
movq %r15, %rsi
callq 0xc7eb4
testl %eax, %eax
je 0xcb57c
movl 0xb5c(%r14), %r13d
incl %r13d
jmp 0xcb454
xorl %ebp, %ebp
cmpl $0x0, (%r14)
jne 0xcb538
movq $0x7, (%r14)
leaq 0x4dfc8(%rip), %rax     # 0x1194d6
movq %rax, 0x8(%r14)
jmp 0xcb538
cmpl $0x0, 0xc8(%r14)
jle 0xcb531
callq 0x577c0
leaq 0x98(%r14), %rdi
callq *0x10(%rax)
testl %eax, %eax
je 0xcb536
pushq $0x1
popq %rbp
jmp 0xcb538
xorl %ebp, %ebp
movq %r14, %rdi
movq %r15, %rsi
callq 0xc8e38
testl %ebp, %eax
je 0xcb405
andl $0x0, 0x4(%r14)
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
cmpl $0x0, (%r14)
jne 0xcb538
movq $0x7, (%r14)
leaq 0x4df33(%rip), %rax     # 0x1194ad
jmp 0xcb50e
xorl %ebp, %ebp
cmpl $0x0, (%r14)
jne 0xcb538
movq $0x6, (%r14)
leaq 0x4df67(%rip), %rax     # 0x1194f9
jmp 0xcb50e
leaq 0x4de17(%rip), %rdi     # 0x1193b5
leaq 0x4dc88(%rip), %rsi     # 0x11922d
leaq 0x4de15(%rip), %rcx     # 0x1193c1
movl $0x2b3, %edx            # imm = 0x2B3
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8_dec.c
// Function: GetCoeffsAlt
static int GetCoeffsAlt(VP8BitReader* const br,
                        const VP8BandProbas* const prob[],
                        int ctx, const quant_t dq, int n, int16_t* out) {
  const uint8_t* p = prob[n]->probas_[ctx];
  for (; n < 16; ++n) {
    if (!VP8GetBitAlt(br, p[0], "coeffs")) {
      return n;  // previous coeff was last non-zero coeff
    }
    while (!VP8GetBitAlt(br, p[1], "coeffs")) {       // sequence of zero coeffs
      p = prob[++n]->probas_[0];
      if (n == 16) return 16;
    }
    {        // non zero coeff
      const VP8ProbaArray* const p_ctx = &prob[n + 1]->probas_[0];
      int v;
      if (!VP8GetBitAlt(br, p[2], "coeffs")) {
        v = 1;
        p = p_ctx[1];
      } else {
        v = GetLargeValue(br, p);
        p = p_ctx[2];
      }
      out[kZigzag[n]] = VP8GetSigned(br, v, "coeffs") * dq[n > 0];
    }
  }
  return 16;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movl %r8d, %ebx
movq %rcx, 0x8(%rsp)
movq %rsi, %r12
movq %rdi, %r13
movslq %r8d, %rax
movslq %edx, %rcx
imulq $0xb, %rcx, %r14
addq (%rsi,%rax,8), %r14
cmpl $0xf, %ebx
jg 0xcb6ae
movzbl (%r14), %esi
movq %r13, %rdi
callq 0xcb7d2
testl %eax, %eax
je 0xcb6c0
movslq %ebx, %rbp
movq %rbp, %r15
shlq $0x20, %r15
incl %ebx
movzbl 0x1(%r14), %esi
movq %r13, %rdi
callq 0xcb7d2
testl %eax, %eax
jne 0xcb63e
movq 0x8(%r12,%rbp,8), %r14
incq %rbp
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r15
incl %ebx
cmpq $0x10, %rbp
jne 0xcb60e
jmp 0xcb6ae
movslq %ebx, %rax
movq (%r12,%rax,8), %rax
movq %rax, (%rsp)
movzbl 0x2(%r14), %esi
movq %r13, %rdi
callq 0xcb7d2
pushq $0xb
popq %rcx
pushq $0x1
popq %rsi
testl %eax, %eax
je 0xcb670
movq %r13, %rdi
movq %r14, %rsi
callq 0xcb849
movl %eax, %esi
pushq $0x16
popq %rcx
movq (%rsp), %r14
addq %rcx, %r14
movq %r13, %rdi
callq 0xcb953
xorl %ecx, %ecx
testq %rbp, %rbp
setg %cl
movq 0x8(%rsp), %rdx
imull (%rdx,%rcx,4), %eax
sarq $0x20, %r15
leaq 0x4db45(%rip), %rcx     # 0x1191e0
movzbl (%r15,%rcx), %ecx
movq 0x10(%rsp), %rdx
movw %ax, (%rdx,%rcx,2)
jmp 0xcb5e5
pushq $0x10
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebx, %eax
jmp 0xcb6b1
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8_dec.c
// Function: GetCoeffsFast
static int GetCoeffsFast(VP8BitReader* const br,
                         const VP8BandProbas* const prob[],
                         int ctx, const quant_t dq, int n, int16_t* out) {
  const uint8_t* p = prob[n]->probas_[ctx];
  for (; n < 16; ++n) {
    if (!VP8GetBit(br, p[0], "coeffs")) {
      return n;  // previous coeff was last non-zero coeff
    }
    while (!VP8GetBit(br, p[1], "coeffs")) {       // sequence of zero coeffs
      p = prob[++n]->probas_[0];
      if (n == 16) return 16;
    }
    {        // non zero coeff
      const VP8ProbaArray* const p_ctx = &prob[n + 1]->probas_[0];
      int v;
      if (!VP8GetBit(br, p[2], "coeffs")) {
        v = 1;
        p = p_ctx[1];
      } else {
        v = GetLargeValue(br, p);
        p = p_ctx[2];
      }
      out[kZigzag[n]] = VP8GetSigned(br, v, "coeffs") * dq[n > 0];
    }
  }
  return 16;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movl %r8d, %ebx
movq %rcx, 0x8(%rsp)
movq %rsi, %r12
movq %rdi, %r13
movslq %r8d, %rax
movslq %edx, %rcx
imulq $0xb, %rcx, %r14
addq (%rsi,%rax,8), %r14
cmpl $0xf, %ebx
jg 0xcb7bc
movzbl (%r14), %esi
movq %r13, %rdi
callq 0xcba09
testl %eax, %eax
je 0xcb7ce
movslq %ebx, %rbp
movq %rbp, %r15
shlq $0x20, %r15
incl %ebx
movzbl 0x1(%r14), %esi
movq %r13, %rdi
callq 0xcba09
testl %eax, %eax
jne 0xcb74c
movq 0x8(%r12,%rbp,8), %r14
incq %rbp
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r15
incl %ebx
cmpq $0x10, %rbp
jne 0xcb71c
jmp 0xcb7bc
movslq %ebx, %rax
movq (%r12,%rax,8), %rax
movq %rax, (%rsp)
movzbl 0x2(%r14), %esi
movq %r13, %rdi
callq 0xcba09
pushq $0xb
popq %rcx
pushq $0x1
popq %rsi
testl %eax, %eax
je 0xcb77e
movq %r13, %rdi
movq %r14, %rsi
callq 0xcb849
movl %eax, %esi
pushq $0x16
popq %rcx
movq (%rsp), %r14
addq %rcx, %r14
movq %r13, %rdi
callq 0xcb953
xorl %ecx, %ecx
testq %rbp, %rbp
setg %cl
movq 0x8(%rsp), %rdx
imull (%rdx,%rcx,4), %eax
sarq $0x20, %r15
leaq 0x4da37(%rip), %rcx     # 0x1191e0
movzbl (%r15,%rcx), %ecx
movq 0x10(%rsp), %rdx
movw %ax, (%rdx,%rcx,2)
jmp 0xcb6f3
pushq $0x10
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebx, %eax
jmp 0xcb7bf
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8_dec.c
// Function: GetLargeValue
static int GetLargeValue(VP8BitReader* const br, const uint8_t* const p) {
  int v;
  if (!VP8GetBit(br, p[3], "coeffs")) {
    if (!VP8GetBit(br, p[4], "coeffs")) {
      v = 2;
    } else {
      v = 3 + VP8GetBit(br, p[5], "coeffs");
    }
  } else {
    if (!VP8GetBit(br, p[6], "coeffs")) {
      if (!VP8GetBit(br, p[7], "coeffs")) {
        v = 5 + VP8GetBit(br, 159, "coeffs");
      } else {
        v = 7 + 2 * VP8GetBit(br, 165, "coeffs");
        v += VP8GetBit(br, 145, "coeffs");
      }
    } else {
      const uint8_t* tab;
      const int bit1 = VP8GetBit(br, p[8], "coeffs");
      const int bit0 = VP8GetBit(br, p[9 + bit1], "coeffs");
      const int cat = 2 * bit1 + bit0;
      v = 0;
      for (tab = kCat3456[cat]; *tab; ++tab) {
        v += v + VP8GetBit(br, *tab, "coeffs");
      }
      v += 3 + (8 << cat);
    }
  }
  return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzbl 0x3(%rsi), %esi
callq 0xcba09
testl %eax, %eax
je 0xcb8d8
movzbl 0x6(%r14), %esi
movq %rbx, %rdi
callq 0xcba09
testl %eax, %eax
je 0xcb8fb
movzbl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0xcba09
movl %eax, %r15d
movl %eax, %eax
movzbl 0x9(%r14,%rax), %esi
movq %rbx, %rdi
callq 0xcba09
leal (%rax,%r15,2), %r14d
leaq 0x4dc68(%rip), %rax     # 0x11950c
movslq (%rax,%r14,4), %r12
addq %rax, %r12
xorl %r15d, %r15d
movzbl (%r12), %esi
testl %esi, %esi
je 0xcb8c8
movq %rbx, %rdi
callq 0xcba09
leal (%rax,%r15,2), %r15d
incq %r12
jmp 0xcb8ae
pushq $0x8
popq %rax
movl %r14d, %ecx
shll %cl, %eax
addl %r15d, %eax
addl $0x3, %eax
jmp 0xcb947
movzbl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0xcba09
testl %eax, %eax
je 0xcb932
movzbl 0x5(%r14), %esi
movq %rbx, %rdi
callq 0xcba09
addl $0x3, %eax
jmp 0xcb947
movzbl 0x7(%r14), %esi
movq %rbx, %rdi
callq 0xcba09
testl %eax, %eax
je 0xcb937
movq %rbx, %rdi
movl $0xa5, %esi
callq 0xcba09
movl %eax, %r14d
movq %rbx, %rdi
movl $0x91, %esi
callq 0xcba09
leal (%rax,%r14,2), %eax
addl $0x7, %eax
jmp 0xcb947
pushq $0x2
popq %rax
jmp 0xcb947
movq %rbx, %rdi
movl $0x9f, %esi
callq 0xcba09
addl $0x5, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: VP8LGetInfo
int VP8LGetInfo(const uint8_t* data, size_t data_size,
                int* const width, int* const height, int* const has_alpha) {
  if (data == NULL || data_size < VP8L_FRAME_HEADER_SIZE) {
    return 0;         // not enough data
  } else if (!VP8LCheckSignature(data, data_size)) {
    return 0;         // bad signature
  } else {
    int w, h, a;
    VP8LBitReader br;
    VP8LInitBitReader(&br, data, data_size);
    if (!ReadImageInfo(&br, &w, &h, &a)) {
      return 0;
    }
    if (width != NULL) *width = w;
    if (height != NULL) *height = h;
    if (has_alpha != NULL) *has_alpha = a;
    return 1;
  }
}

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
pushq $0x8
popq %rsi
callq 0xe0a0b
xorl %ebx, %ebx
cmpl $0x2f, %eax
jne 0xcbb9b
pushq $0xe
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
callq 0xe0a0b
incl %eax
movl %eax, (%r13)
movq %r14, %rdi
movl %ebp, %esi
callq 0xe0a0b
incl %eax
movl %eax, (%r12)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0xe0a0b
movl %eax, (%r15)
pushq $0x3
popq %rsi
movq %r14, %rdi
callq 0xe0a0b
testl %eax, %eax
jne 0xcbb9b
xorl %ebx, %ebx
cmpl $0x0, 0x24(%r14)
sete %bl
movl %ebx, %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/vp8l_dec.c
// Function: VP8LNew
VP8LDecoder* VP8LNew(void) {
  VP8LDecoder* const dec = (VP8LDecoder*)WebPSafeCalloc(1ULL, sizeof(*dec));
  if (dec == NULL) return NULL;
  dec->status_ = VP8_STATUS_OK;
  dec->state_ = READ_DIM;

  VP8LDspInit();  // Init critical function pointers.

  return dec;
}

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

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

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

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

// Assembly:
testq %rdi, %rdi
je 0xcc35e
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x98, %rdi
callq 0xcc35f
movq 0x18(%rbx), %rdi
callq 0x58480
andq $0x0, 0x18(%rbx)
leaq 0x128(%rbx), %r14
xorl %r15d, %r15d
movslq 0x110(%rbx), %rax
cmpq %rax, %r15
jge 0xcc332
movq (%r14), %rdi
callq 0x58480
andq $0x0, (%r14)
incq %r15
addq $0x18, %r14
jmp 0xcc311
andl $0x0, 0x110(%rbx)
andl $0x0, 0x178(%rbx)
movq 0x180(%rbx), %rdi
callq 0x58480
andq $0x0, 0x180(%rbx)
andq $0x0, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: ClearMetadata
static void ClearMetadata(VP8LMetadata* const hdr) {
  assert(hdr != NULL);

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

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0xcc3ba
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
callq 0x58480
leaq 0x50(%rbx), %rdi
callq 0xe12da
movq 0x48(%rbx), %rdi
callq 0xe0bbf
leaq 0x8(%rbx), %rdi
callq 0xe0aec
leaq 0x18(%rbx), %rdi
callq 0xe0aec
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
andq $0x0, 0x70(%rbx)
popq %rbx
retq
leaq 0x4d4d6(%rip), %rdi     # 0x119897
leaq 0x4d251(%rip), %rsi     # 0x119619
leaq 0x4d4d4(%rip), %rcx     # 0x1198a3
movl $0x573, %edx            # imm = 0x573
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: VP8LDecodeAlphaHeader
int VP8LDecodeAlphaHeader(ALPHDecoder* const alph_dec,
                          const uint8_t* const data, size_t data_size) {
  int ok = 0;
  VP8LDecoder* dec = VP8LNew();

  if (dec == NULL) return 0;

  assert(alph_dec != NULL);

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

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

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

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

  if (!ok) goto Err;

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

 Err:
  VP8LDelete(dec);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
callq 0xcc2b3
testq %rax, %rax
je 0xcc4e2
testq %r14, %r14
je 0xcc51b
movq %rax, %rbx
movl (%r14), %eax
movl %eax, 0x84(%rbx)
movl 0x4(%r14), %ecx
movl %ecx, 0x88(%rbx)
leaq 0x20(%r14), %rdx
movq %rdx, 0x8(%rbx)
movq %r14, 0x58(%r14)
movl %eax, 0x20(%r14)
movl %ecx, 0x24(%r14)
andl $0x0, (%rbx)
leaq 0x28(%rbx), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xe07a1
movl (%r14), %edi
movl 0x4(%r14), %esi
xorl %r15d, %r15d
pushq $0x1
popq %rbp
movl %ebp, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0xcc53a
testl %eax, %eax
je 0xcc507
cmpl $0x1, 0x110(%rbx)
jne 0xcc4e7
cmpl $0x3, 0x118(%rbx)
jne 0xcc4e7
movq %rbx, %rdi
addq $0x98, %rdi
callq 0xccb92
testl %eax, %eax
je 0xcc4e7
movl $0x1, 0xc0(%r14)
movslq 0x84(%rbx), %rax
movslq 0x88(%rbx), %rdi
imulq %rax, %rdi
andq $0x0, 0x20(%rbx)
pushq $0x1
popq %rsi
callq 0x57c90
movq %rax, 0x18(%rbx)
testq %rax, %rax
jne 0xcc4fe
movl (%rbx), %eax
cmpl $0x5, %eax
je 0xcc4da
testl %eax, %eax
jne 0xcc507
movl $0x1, (%rbx)
jmp 0xcc507
xorl %r15d, %r15d
jmp 0xcc50f
andl $0x0, 0xc0(%r14)
movl (%r14), %esi
movq %rbx, %rdi
callq 0xccbef
testl %eax, %eax
je 0xcc507
movq %rbx, 0x18(%r14)
movl %ebp, %r15d
jmp 0xcc50f
movq %rbx, %rdi
callq 0xcc3d9
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4d0e6(%rip), %rdi     # 0x119608
leaq 0x4d0f0(%rip), %rsi     # 0x119619
leaq 0x4d0fc(%rip), %rcx     # 0x11962c
movl $0x64c, %edx            # imm = 0x64C
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: Is8bOptimizable
static int Is8bOptimizable(const VP8LMetadata* const hdr) {
  int i;
  if (hdr->color_cache_size_ > 0) return 0;
  // When the Huffman tree contains only one symbol, we can skip the
  // call to ReadSymbol() for red/blue/alpha channels.
  for (i = 0; i < hdr->num_htree_groups_; ++i) {
    HuffmanCode** const htrees = hdr->htree_groups_[i].htrees;
    if (htrees[RED][0].bits > 0) return 0;
    if (htrees[BLUE][0].bits > 0) return 0;
    if (htrees[ALPHA][0].bits > 0) return 0;
  }
  return 1;
}

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

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movslq 0x84(%rdi), %rax
cmpl %esi, %eax
jg 0xccc5e
movq %rdi, %rbx
movslq 0x88(%rdi), %r14
imulq %rax, %r14
movzwl %si, %r15d
movslq %esi, %rdi
shlq $0x4, %rdi
addq %r15, %rdi
addq %r14, %rdi
pushq $0x4
popq %rsi
callq 0x57c90
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0xccc40
leaq (%rax,%r14,4), %rax
leaq (%rax,%r15,4), %rax
movq %rax, 0x20(%rbx)
pushq $0x1
popq %rax
jmp 0xccc58
andq $0x0, 0x20(%rbx)
movl (%rbx), %ecx
xorl %eax, %eax
cmpl $0x5, %ecx
je 0xccc52
testl %ecx, %ecx
jne 0xccc58
movl $0x1, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4cda9(%rip), %rdi     # 0x119a0e
leaq 0x4c9ad(%rip), %rsi     # 0x119619
leaq 0x4cdb6(%rip), %rcx     # 0x119a29
movl $0x612, %edx            # imm = 0x612
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: ExtractAlphaRows
static void ExtractAlphaRows(VP8LDecoder* const dec, int last_row) {
  int cur_row = dec->last_row_;
  int num_rows = last_row - cur_row;
  const uint32_t* in = dec->pixels_ + dec->width_ * cur_row;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x8(%rdi), %rax
cmpl %esi, 0x84(%rax)
jl 0xcdb31
movslq 0x84(%rdi), %r12
movslq 0x8c(%rdi), %rbx
imulq %rbx, %r12
shlq $0x2, %r12
addq 0x18(%rdi), %r12
movl %esi, 0x8(%rsp)
movl %esi, %ecx
subl %ebx, %ecx
movq %rdi, 0x10(%rsp)
testl %ecx, %ecx
jle 0xcdb0e
cmpl $0x10, %ecx
pushq $0x10
popq %rax
movl %eax, %r13d
cmovbl %ecx, %r13d
movq 0x8(%rdi), %rax
movq 0x20(%rdi), %rsi
movq %rsi, 0x20(%rsp)
movq 0x38(%rax), %rsi
movq %rsi, 0x18(%rsp)
movl (%rax), %r14d
movl %r14d, %r15d
imull %r13d, %r15d
movl %r14d, %eax
imull %ebx, %eax
movslq %eax, %rbp
addq 0xc8(%rsi), %rbp
movq 0x10(%rsp), %rdi
movl %ebx, %esi
movl %r13d, %edx
movl %ecx, 0xc(%rsp)
movq %r12, %rcx
callq 0xce7f6
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
movl %r15d, %edx
leaq 0xa3920(%rip), %rax     # 0x1713f0
callq *(%rax)
leal (%rbx,%r13), %r15d
movq 0x18(%rsp), %rdi
movl %ebx, %esi
movl %r15d, %edx
movq %rbp, %rcx
movl %r14d, %r8d
callq 0xce76a
movl 0xc(%rsp), %ecx
movq 0x10(%rsp), %rdi
subl %r13d, %ecx
movslq 0x84(%rdi), %rax
imulq %rax, %r13
leaq (%r12,%r13,4), %r12
movl %r15d, %ebx
jmp 0xcda63
movl 0x8(%rsp), %eax
cmpl %eax, %ebx
jne 0xcdb50
movl %eax, 0x94(%rdi)
movl %eax, 0x8c(%rdi)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4c01a(%rip), %rdi     # 0x119b52
leaq 0x4bada(%rip), %rsi     # 0x119619
leaq 0x4c479(%rip), %rcx     # 0x119fbf
movl $0x62e, %edx            # imm = 0x62E
callq 0x56770
leaq 0x4c497(%rip), %rdi     # 0x119fee
leaq 0x4babb(%rip), %rsi     # 0x119619
leaq 0x4c45a(%rip), %rcx     # 0x119fbf
movl $0x641, %edx            # imm = 0x641
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: VP8LDecodeHeader
int VP8LDecodeHeader(VP8LDecoder* const dec, VP8Io* const io) {
  int width, height, has_alpha;

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

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
xorl %ebp, %ebp
testq %rdi, %rdi
je 0xcdc27
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0xcdbf1
movq %r14, 0x8(%rbx)
andl $0x0, (%rbx)
leaq 0x28(%rbx), %r15
movq 0x60(%r14), %rdx
movq 0x68(%r14), %rsi
movq %r15, %rdi
callq 0xe07a1
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x14(%rsp), %rcx
movq %r15, %rdi
callq 0xcbb2b
testl %eax, %eax
je 0xcdc04
movl $0x2, 0x4(%rbx)
movl 0x10(%rsp), %edi
movl %edi, (%r14)
movl 0xc(%rsp), %esi
movl %esi, 0x4(%r14)
pushq $0x1
popq %rbp
movl %ebp, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0xcc53a
testl %eax, %eax
jne 0xcdc27
jmp 0xcdc15
movl (%rbx), %eax
cmpl $0x5, %eax
je 0xcdbfc
testl %eax, %eax
jne 0xcdc27
movl $0x2, (%rbx)
jmp 0xcdc27
movl (%rbx), %eax
cmpl $0x5, %eax
je 0xcdc0f
testl %eax, %eax
jne 0xcdc15
movl $0x3, (%rbx)
movq %rbx, %rdi
callq 0xcc2e0
cmpl $0x0, (%rbx)
movl $0x0, %ebp
je 0xcdc34
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4ba8e(%rip), %rdi     # 0x1196c9
leaq 0x4b9d7(%rip), %rsi     # 0x119619
leaq 0x4ba9e(%rip), %rcx     # 0x1196e7
movl $0x6a6, %edx            # imm = 0x6A6
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: AccumulateHCode
static int AccumulateHCode(HuffmanCode hcode, int shift,
                           HuffmanCode32* const huff) {
  huff->bits += hcode.bits;
  huff->value |= (uint32_t)hcode.value << shift;
  assert(huff->bits <= HUFFMAN_TABLE_BITS);
  return hcode.bits;
}

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
movq 0x38(%rax), %r14
leaq 0x80(%rax), %rcx
leaq 0x8c(%rdi), %rdx
cmpl $0x2, 0xc(%r14)
cmovbq %rcx, %rdx
movl (%rdx), %r15d
movl 0x8c(%rdi), %ecx
cmpl %r15d, %ecx
cmovgl %ecx, %r15d
cmpl %esi, 0x84(%rax)
jl 0xce668
movq %rdi, %rbx
movl %esi, %ebp
cmpl %esi, %r15d
jge 0xce64d
cmpl $0x1, 0x110(%rbx)
jne 0xce687
leaq 0x118(%rbx), %rdi
cmpl $0x3, (%rdi)
jne 0xce6a6
movl (%rax), %r12d
movl %r12d, %eax
imull %r15d, %eax
movslq %eax, %r13
addq 0xc8(%r14), %r13
movslq 0x84(%rbx), %rax
movslq %r15d, %rcx
imulq %rax, %rcx
addq 0x18(%rbx), %rcx
movl %r15d, %esi
movl %ebp, %edx
movq %r13, %r8
callq 0xd1bfb
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
movq %r13, %rcx
movl %r12d, %r8d
callq 0xce76a
movl %ebp, 0x94(%rbx)
movl %ebp, 0x8c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4b4e3(%rip), %rdi     # 0x119b52
leaq 0x4afa3(%rip), %rsi     # 0x119619
leaq 0x4b4f7(%rip), %rcx     # 0x119b74
movl $0x380, %edx            # imm = 0x380
callq 0x56770
leaq 0x4b51d(%rip), %rdi     # 0x119bab
leaq 0x4af84(%rip), %rsi     # 0x119619
leaq 0x4b4d8(%rip), %rcx     # 0x119b74
movl $0x388, %edx            # imm = 0x388
callq 0x56770
leaq 0x4b518(%rip), %rdi     # 0x119bc5
leaq 0x4af65(%rip), %rsi     # 0x119619
leaq 0x4b4b9(%rip), %rcx     # 0x119b74
movl $0x389, %edx            # imm = 0x389
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movl %edi, %ebx
cmpl $0x4, %edi
jl 0xce6e8
leal -0x2(%rbx), %ecx
shrl %ecx
andl $0x1, %ebx
orl $0x2, %ebx
shll %cl, %ebx
movq %rsi, %rdi
movl %ecx, %esi
callq 0xe0a0b
addl %ebx, %eax
movl %eax, %ebx
incl %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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:
cmpl $0x79, %esi
jl 0xce6f9
addl $-0x78, %esi
movl %esi, %eax
retq
movslq %esi, %rax
leaq 0x4ae8d(%rip), %rcx     # 0x119590
movzbl -0x1(%rax,%rcx), %eax
movl %eax, %ecx
shrl $0x4, %ecx
andl $0xf, %eax
imull %edi, %ecx
subl %eax, %ecx
addl $0x8, %ecx
cmpl $0x2, %ecx
pushq $0x1
popq %rax
cmovgel %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: AlphaApplyFilter
static void AlphaApplyFilter(ALPHDecoder* const alph_dec,
                             int first_row, int last_row,
                             uint8_t* out, int stride) {
  if (alph_dec->filter_ != WEBP_FILTER_NONE) {
    int y;
    const uint8_t* prev_line = alph_dec->prev_line_;
    assert(WebPUnfilters[alph_dec->filter_] != NULL);
    for (y = first_row; y < last_row; ++y) {
      WebPUnfilters[alph_dec->filter_](prev_line, out, out, stride);
      prev_line = out;
      out += stride;
    }
    alph_dec->prev_line_ = prev_line;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0xc(%rdi), %eax
testq %rax, %rax
je 0xce7c8
leaq 0xa2e2c(%rip), %r13     # 0x1715b0
cmpq $0x0, (%r13,%rax,8)
je 0xce7d7
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movq 0xd0(%rdi), %rdi
movslq %r8d, %r15
cmpl %ebx, %ebp
jge 0xce7c1
movq %rcx, %r12
movl 0xc(%r14), %eax
movq %rcx, %rsi
movq %rcx, %rdx
movl %r15d, %ecx
callq *(%r13,%rax,8)
leaq (%r12,%r15), %rcx
incl %ebp
movq %r12, %rdi
jmp 0xce79d
movq %rdi, 0xd0(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4b414(%rip), %rdi     # 0x119bf2
leaq 0x4ae34(%rip), %rsi     # 0x119619
leaq 0x4b42f(%rip), %rcx     # 0x119c1b
movl $0x36d, %edx            # imm = 0x36D
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: ApplyInverseTransforms
static void ApplyInverseTransforms(VP8LDecoder* const dec,
                                   int start_row, int num_rows,
                                   const uint32_t* const rows) {
  int n = dec->next_transform_;
  const int cache_pixs = dec->width_ * num_rows;
  const int end_row = start_row + num_rows;
  const uint32_t* rows_in = rows;
  uint32_t* const rows_out = dec->argb_cache_;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r12d
movl 0x110(%rdi), %r14d
movslq 0x84(%rdi), %rbx
movq %rdx, (%rsp)
leal (%rdx,%r12), %ebp
movq 0x20(%rdi), %r15
imulq $0x18, %r14, %rax
leaq (%rax,%rdi), %r13
addq $0x100, %r13            # imm = 0x100
testl %r14d, %r14d
jle 0xce84e
movq %r13, %rdi
movl %r12d, %esi
movl %ebp, %edx
movq %r15, %r8
callq 0xd1c91
decl %r14d
addq $-0x18, %r13
movq %r15, %rcx
jmp 0xce82d
cmpq %r15, %rcx
je 0xce87b
movslq (%rsp), %rax
imulq %rax, %rbx
shlq $0x2, %rbx
movq %r15, %rdi
movq %rcx, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x562f0
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/vp8l_dec.c
// Function: ConvertToYUVA
static void ConvertToYUVA(const uint32_t* const src, int width, int y_pos,
                          const WebPDecBuffer* const output) {
  const WebPYUVABuffer* const buf = &output->u.YUVA;

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

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

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %edx, %ebp
movq %rdi, %r14
movslq %esi, %r15
xorl %r12d, %r12d
testl %ecx, %ecx
cmovgl %ecx, %r12d
subl $0x1, %r12d
jb 0xcea76
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq *0xa2947(%rip)          # 0x1713b8
addq %r15, %r14
jmp 0xcea5e
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dsp/alpha_processing.c
// Function: WebPMultRows
void WebPMultRows(uint8_t* WEBP_RESTRICT ptr, int stride,
                  const uint8_t* WEBP_RESTRICT alpha, int alpha_stride,
                  int width, int num_rows, int inverse) {
  int n;
  for (n = 0; n < num_rows; ++n) {
    WebPMultRow(ptr, alpha, width, inverse);
    ptr += stride;
    alpha += alpha_stride;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rdx, %r14
movq %rdi, %r15
movslq %esi, %r12
movslq %ecx, %r13
xorl %ebp, %ebp
testl %r9d, %r9d
cmovgl %r9d, %ebp
subl $0x1, %ebp
jb 0xceac1
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl 0x40(%rsp), %ecx
callq *0xa2907(%rip)          # 0x1713c0
addq %r12, %r15
addq %r13, %r14
jmp 0xceaa2
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/dsp/alpha_processing.c
// Function: ApplyAlphaMultiply_16b_C
static void ApplyAlphaMultiply_16b_C(uint8_t* rgba4444,
                                     int w, int h, int stride) {
#if (WEBP_SWAP_16BIT_CSP == 1)
  ApplyAlphaMultiply4444_C(rgba4444, w, h, stride, 1);
#else
  ApplyAlphaMultiply4444_C(rgba4444, w, h, stride, 0);
#endif
}

// Assembly:
pushq %rbp
pushq %rbx
movslq %ecx, %rax
xorl %ecx, %ecx
testl %esi, %esi
cmovlel %ecx, %esi
testl %edx, %edx
jle 0xcee79
decl %edx
xorl %ecx, %ecx
cmpq %rcx, %rsi
je 0xcee71
movb (%rdi,%rcx,2), %r11b
movzbl 0x1(%rdi,%rcx,2), %r8d
movl %r8d, %r9d
andl $0xf, %r9d
imull $0x1111, %r9d, %ebx     # imm = 0x1111
movl %r11d, %r10d
andb $-0x10, %r10b
movl %r11d, %ebp
shrb $0x4, %bpl
orb %r10b, %bpl
movzbl %bpl, %r10d
imull %ebx, %r10d
shrl $0x10, %r10d
movl %r11d, %ebp
andb $0xf, %bpl
shlb $0x4, %r11b
orb %bpl, %r11b
movzbl %r11b, %r11d
imull %ebx, %r11d
movl %r8d, %ebp
andl $-0x10, %ebp
shrl $0x4, %r8d
orl %ebp, %r8d
imull %ebx, %r8d
shrl $0x10, %r8d
andb $-0x10, %r10b
shrl $0x14, %r11d
orb %r10b, %r11b
movb %r11b, (%rdi,%rcx,2)
andb $-0x10, %r8b
orb %r9b, %r8b
movb %r8b, 0x1(%rdi,%rcx,2)
incq %rcx
jmp 0xcede5
addq %rax, %rdi
jmp 0xcedd9
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dsp/alpha_processing.c
// Function: PackRGB_C
static void PackRGB_C(const uint8_t* WEBP_RESTRICT r,
                      const uint8_t* WEBP_RESTRICT g,
                      const uint8_t* WEBP_RESTRICT b,
                      int len, int step, uint32_t* WEBP_RESTRICT out) {
  int i, offset = 0;
  for (i = 0; i < len; ++i) {
    out[i] = MakeARGB32(0xff, r[offset], g[offset], b[offset]);
    offset += step;
  }
}

// Assembly:
pushq %rbp
pushq %rbx
movslq %r8d, %rax
xorl %r8d, %r8d
testl %ecx, %ecx
cmovlel %r8d, %ecx
xorl %r10d, %r10d
cmpq %r10, %rcx
je 0xceebf
movzbl (%rdi,%r8), %r11d
movzbl (%rsi,%r8), %ebx
movzbl (%rdx,%r8), %ebp
shll $0x10, %r11d
shll $0x8, %ebx
orl %r11d, %ebx
orl %ebp, %ebx
orl $0xff000000, %ebx       # imm = 0xFF000000
movl %ebx, (%r9,%r10,4)
addq %rax, %r8
incq %r10
jmp 0xcee8d
popq %rbx
popq %rbp
retq