// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/frame_dec.c
// Function: VP8ProcessRow
int VP8ProcessRow(VP8Decoder* const dec, VP8Io* const io) {
  int ok = 1;
  VP8ThreadContext* const ctx = &dec->thread_ctx_;
  const int filter_row =
      (dec->filter_type_ > 0) &&
      (dec->mb_y_ >= dec->tl_mb_y_) && (dec->mb_y_ <= dec->br_mb_y_);
  if (dec->mt_method_ == 0) {
    // ctx->id_ and ctx->f_info_ are already set
    ctx->mb_y_ = dec->mb_y_;
    ctx->filter_row_ = filter_row;
    ReconstructRow(dec, ctx);
    ok = FinishRow(dec, io);
  } else {
    WebPWorker* const worker = &dec->worker_;
    // Finish previous job *before* updating context
    ok &= WebPGetWorkerInterface()->Sync(worker);
    assert(worker->status_ == OK);
    if (ok) {   // spawn a new deblocking/output job
      ctx->io_ = *io;
      ctx->id_ = dec->cache_id_;
      ctx->mb_y_ = dec->mb_y_;
      ctx->filter_row_ = filter_row;
      if (dec->mt_method_ == 2) {  // swap macroblock data
        VP8MBData* const tmp = ctx->mb_data_;
        ctx->mb_data_ = dec->mb_data_;
        dec->mb_data_ = tmp;
      } else {
        // perform reconstruction directly in main thread
        ReconstructRow(dec, ctx);
      }
      if (filter_row) {            // swap filter info
        VP8FInfo* const tmp = ctx->f_info_;
        ctx->f_info_ = dec->f_info_;
        dec->f_info_ = tmp;
      }
      // (reconstruct)+filter in parallel
      WebPGetWorkerInterface()->Launch(worker);
      if (++dec->cache_id_ == dec->num_caches_) {
        dec->cache_id_ = 0;
      }
    }
  }
  return ok;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movq -0x8(%rbp), %rax
addq $0xd8, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0xb68(%rcx)
movb %al, -0x41(%rbp)
jle 0x13e06c
movq -0x8(%rbp), %rax
movl 0xb5c(%rax), %ecx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpl 0x1a4(%rdx), %ecx
movb %al, -0x41(%rbp)
jl 0x13e06c
movq -0x8(%rbp), %rax
movl 0xb5c(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1ac(%rcx), %eax
setle %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0xc8(%rax)
jne 0x13e0c1
movq -0x8(%rbp), %rax
movl 0xb5c(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x13e230
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x13e8b0
movl %eax, -0x14(%rbp)
jmp 0x13e218
movq -0x8(%rbp), %rax
addq $0x98, %rax
movq %rax, -0x30(%rbp)
callq 0x5ab60
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rdi
callq *%rax
andl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jne 0x13e0f0
jmp 0x13e10f
leaq 0x7e8a3(%rip), %rdi     # 0x1bc99a
leaq 0x7e83e(%rip), %rsi     # 0x1bc93c
movl $0x205, %edx            # imm = 0x205
leaq 0x7e8a6(%rip), %rcx     # 0x1bc9b0
callq 0x598a0
cmpl $0x0, -0x14(%rbp)
je 0x13e216
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rsi
movl $0xa0, %edx
callq 0x593a0
movq -0x8(%rbp), %rax
movl 0xcc(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl 0xb5c(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpl $0x2, 0xc8(%rax)
jne 0x13e197
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0xb60(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb60(%rax)
jmp 0x13e1a4
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x13e230
cmpl $0x0, -0x24(%rbp)
je 0x13e1d8
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0xb18(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb18(%rax)
callq 0x5ab60
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rdi
callq *%rax
movq -0x8(%rbp), %rcx
movl 0xcc(%rcx), %eax
addl $0x1, %eax
movl %eax, 0xcc(%rcx)
movq -0x8(%rbp), %rcx
cmpl 0xd0(%rcx), %eax
jne 0x13e214
movq -0x8(%rbp), %rax
movl $0x0, 0xcc(%rax)
jmp 0x13e216
jmp 0x13e218
movl -0x14(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)