// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/frame_dec.c
// Function: VP8InitFrame
int VP8InitFrame(VP8Decoder* const dec, VP8Io* const io) {
  if (!InitThreadContext(dec)) return 0;  // call first. Sets dec->num_caches_.
  if (!AllocateMemory(dec)) return 0;
  InitIo(dec, io);
  VP8DspInit();  // Init critical function pointers and look-up tables.
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
movl $0x0, 0xcc(%rdi)
cmpl $0x0, 0xc8(%rdi)
movq %rsi, 0x18(%rsp)
jle 0xcfee1
leaq 0x98(%r14), %r15
callq 0x56690
movq %r15, %rdi
callq *0x8(%rax)
testl %eax, %eax
je 0xcfef3
movq %r14, 0xb0(%r14)
leaq 0xf8(%r14), %rax
movq %rax, 0xb8(%r14)
leaq -0xa52(%rip), %rax      # 0xcf46e
movq %rax, 0xa8(%r14)
xorl %ebp, %ebp
cmpl $0x0, 0xb68(%r14)
setg %bpl
orl $0x2, %ebp
movl %ebp, 0xd0(%r14)
jmp 0xcff16
movl $0x1, 0xd0(%r14)
movl $0x1, %ebp
jmp 0xcff16
leaq 0x591c2(%rip), %rdx     # 0x1290bc
movq %r14, %rdi
movl $0x1, %esi
callq 0xd18d5
testl %eax, %eax
je 0xd026b
movl 0xd0(%r14), %ebp
movslq 0x198(%r14), %r12
movq %r12, %r15
shlq $0x5, %r15
movslq 0xb68(%r14), %r9
movl 0xc8(%r14), %esi
testq %r9, %r9
jle 0xcff4a
testl %esi, %esi
setg %cl
movl %r12d, %eax
shll %cl, %eax
movslq %eax, %rbx
shlq $0x2, %rbx
jmp 0xcff4c
xorl %ebx, %ebx
leaq (,%r12,4), %rdi
leaq 0x2(,%r12,2), %rdx
cmpl $0x2, %esi
sete %cl
movl %r12d, %eax
shll %cl, %eax
cltq
imulq $0x320, %rax, %r8       # imm = 0x320
movl %ebp, 0xc(%rsp)
shll $0x4, %ebp
leaq 0x58f6e(%rip), %r10     # 0x128eec
movzbl (%r9,%r10), %eax
addl %ebp, %eax
leal (%rax,%rax,2), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movslq %ecx, %r11
imulq %r15, %r11
cmpq $0x0, 0xb98(%r14)
je 0xcffb2
movzwl 0x4c(%r14), %eax
movzwl 0x4e(%r14), %ecx
imulq %rax, %rcx
jmp 0xcffb4
xorl %ecx, %ecx
leaq (%rdi,%r15), %rax
addq %rdx, %rax
addq %rbx, %rax
movq %r8, 0x38(%rsp)
addq %r8, %rax
addq %r11, %rax
movq %rcx, 0x40(%rsp)
leaq (%rcx,%rax), %r13
addq $0x35f, %r13            # imm = 0x35F
movq 0xb48(%r14), %rax
movq 0xb50(%r14), %rcx
cmpq %rcx, %r13
movq %rdi, 0x20(%rsp)
jbe 0xd005d
movq %r11, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rax, %rdi
callq 0x57290
movq $0x0, 0xb50(%r14)
movl $0x1, %esi
movq %r13, %rdi
callq 0x56b20
movq %rax, 0xb48(%r14)
testq %rax, %rax
je 0xd024e
movq %r13, 0x10(%rsp)
movq %r13, 0xb50(%r14)
movl 0xb68(%r14), %r9d
movl 0xc8(%r14), %esi
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %r11
leaq 0x58e91(%rip), %r10     # 0x128eec
jmp 0xd0062
movq %rcx, 0x10(%rsp)
movq %rax, 0xaf8(%r14)
leaq (%rax,%rdi), %rcx
movq %rcx, 0xb08(%r14)
leaq (%rcx,%r15), %rdi
addq %r15, %rcx
addq $0x2, %rcx
movq %rcx, 0xb10(%r14)
leaq (%rdi,%rdx), %rcx
testq %rbx, %rbx
movq %rcx, %r8
cmoveq %rbx, %r8
movq %r8, 0xb18(%r14)
addq %rbx, %rcx
movl $0x0, 0xd8(%r14)
movq %r8, 0xe8(%r14)
testl %r9d, %r9d
jle 0xd00c4
testl %esi, %esi
jle 0xd00fe
leaq (%r8,%r12,4), %r8
movq %r8, 0xe8(%r14)
addq $0x1f, %rcx
andq $-0x20, %rcx
movq %rcx, 0xb20(%r14)
leaq 0x340(%rcx), %r8
movq %r8, 0xb60(%r14)
xorl %r8d, %r8d
cmpl $0x2, %esi
cmoveq %r12, %r8
imulq $0x320, %r8, %rsi       # imm = 0x320
addq %rcx, %rsi
addq $0x340, %rsi            # imm = 0x340
jmp 0xd011b
addq $0x1f, %rcx
andq $-0x20, %rcx
movq %rcx, 0xb20(%r14)
leaq 0x340(%rcx), %rsi
movq %rsi, 0xb60(%r14)
addq 0x38(%rsp), %rcx
movq %rsi, 0xf0(%r14)
movq %r12, %rsi
shlq $0x4, %rsi
movl %esi, 0xb40(%r14)
leal (,%r12,8), %r8d
movl %r8d, 0xb44(%r14)
movslq %r9d, %r9
movzbl (%r9,%r10), %r10d
movq %r10, %r9
imulq %rsi, %r9
shrl %r10d
imull %r8d, %r10d
addq %rcx, %r9
addq $0x340, %r9             # imm = 0x340
movq %r9, 0xb28(%r14)
imull %esi, %ebp
movslq %ebp, %rsi
addq %r9, %rsi
movslq %r10d, %r9
addq %r9, %rsi
movq %rsi, 0xb30(%r14)
movl 0xc(%rsp), %r10d
imull %r8d, %r10d
shll $0x3, %r10d
movslq %r10d, %r8
addq %r9, %r8
addq %rsi, %r8
movq %r8, 0xb38(%r14)
movl $0x0, 0xcc(%r14)
addq %r11, %rcx
addq $0x340, %rcx            # imm = 0x340
movq 0x40(%rsp), %r8
testq %r8, %r8
movq %rcx, %rsi
cmoveq %r8, %rsi
movq %rsi, 0xbb8(%r14)
addq %r8, %rcx
addq 0x10(%rsp), %rax
cmpq %rax, %rcx
ja 0xd026f
xorl %esi, %esi
callq 0x55f20
movq %r14, %rdi
callq 0xd2459
movq 0xaf8(%r14), %rdi
xorl %esi, %esi
movq 0x20(%rsp), %rdx
callq 0x55f20
movq 0x18(%rsp), %rcx
movl $0x0, 0x8(%rcx)
movups 0xb28(%r14), %xmm0
movups %xmm0, 0x18(%rcx)
movq 0xb38(%r14), %rax
movq %rax, 0x28(%rcx)
movq 0xb40(%r14), %rax
movq %rax, 0x30(%rcx)
movq $0x0, 0x98(%rcx)
callq 0xd7490
movl $0x1, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x58e85(%rip), %rdx     # 0x1290da
movq %r14, %rdi
movl $0x1, %esi
callq 0xd18d5
testl %eax, %eax
movq 0x18(%rsp), %rcx
jne 0xd0201
xorl %eax, %eax
jmp 0xd023f
leaq 0x58e8b(%rip), %rdi     # 0x129101
leaq 0x58c72(%rip), %rsi     # 0x128eef
leaq 0x58ea9(%rip), %rcx     # 0x12912d
movl $0x304, %edx            # imm = 0x304
callq 0x55710