// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/ilbm.c
// Function: my_vdat_chunk_handler
static int my_vdat_chunk_handler(struct de_iffctx *ictx)
{
	deark *c = ictx->c;
	struct vdat_ctx *vdctx = (struct vdat_ctx*)ictx->userdata;

	if(ictx->chunkctx->chunk4cc.id != CODE_VDAT) {
		goto done;
	}
	ictx->handled = 1;

	if(vdctx->vdat_chunk_count >= vdctx->ibi->planes_total) goto done;
	do_vdat_chunk(c, vdctx, ictx->chunkctx->dpos, ictx->chunkctx->dlen);

done:
	if(ictx->chunkctx->chunk4cc.id == CODE_VDAT) {
		vdctx->vdat_chunk_count++;
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x128(%rdi), %rax
cmpl $0x56444154, 0x4(%rax)  # imm = 0x56444154
jne 0x77d93
movq (%rdi), %r15
movq 0x10(%rdi), %r14
movl $0x1, 0x130(%rdi)
movq 0x8(%r14), %rcx
movq 0x18(%r14), %rdx
cmpq 0x18(%rcx), %rdx
jge 0x77d8f
movq %rdi, 0x30(%rsp)
movq 0x40(%rax), %rbx
movq 0x48(%rax), %r13
addq %rbx, %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r14)
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xe3f46
movq %rax, %r12
leaq -0x2(%rax), %rbp
leaq 0xa3feb(%rip), %rsi     # 0x11bd3d
movq $0x0, 0x18(%rsp)
movq %r15, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
cmpq $0x3, %r12
jge 0x77da5
movq %r15, %rdi
movq 0x18(%rsp), %rsi
callq 0xded32
movq 0x30(%rsp), %rax
movq 0x128(%rax), %rax
cmpl $0x56444154, 0x4(%rax)  # imm = 0x56444154
jne 0x77d93
incq 0x18(%r14)
pushq $0x1
popq %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, 0x28(%rsp)
leaq 0x2(%rbx), %r13
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %rbp, %rsi
callq 0xdf66f
movq 0x18(%r15), %rdi
movq %rax, 0x18(%rsp)
movq %rax, %rsi
movq %r13, %rdx
movq 0x28(%rsp), %r13
movq %rbp, %rcx
callq 0xe3cb7
addq %rbx, %r12
leaq 0x26(%rsp), %rbx
xorl %ecx, %ecx
movq %rbp, 0x8(%rsp)
cmpq %rbp, %rcx
jge 0x77d6d
cmpq %r13, %r12
jge 0x77d6d
movq 0x18(%rsp), %rax
movzbl (%rax,%rcx), %ebp
cmpl $0x1, %ebp
movq %rcx, 0x10(%rsp)
je 0x77e58
testl %ebp, %ebp
jne 0x77ea0
movq 0x18(%r15), %rdi
movq %r12, %rsi
callq 0xe3f46
movq %rax, %rbp
testq %rax, %rax
movl $0x0, %eax
cmovleq %rax, %rbp
addq $0x2, %r12
subq $0x1, %rbp
jb 0x77ece
movq 0x18(%r15), %rdi
movq %rbx, %rsi
movq %r12, %rdx
pushq $0x2
popq %rcx
callq 0xe3cb7
movq %r14, %rdi
movq %rbx, %rsi
callq 0x77f26
jmp 0x77e2b
movq 0x18(%r15), %rdi
movq %r12, %rsi
callq 0xe3f46
movq %rax, %rbp
leaq 0x2(%r12), %rdx
movq 0x18(%r15), %rdi
movq %rbx, %rsi
pushq $0x2
popq %rcx
callq 0xe3cb7
testq %rbp, %rbp
movl $0x0, %eax
cmovleq %rax, %rbp
subq $0x1, %rbp
jb 0x77e9a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x77f26
jmp 0x77e87
addq $0x4, %r12
jmp 0x77ece
testb %bpl, %bpl
js 0x77ee0
movq 0x18(%r15), %rdi
movq %rbx, %rsi
movq %r12, %rdx
pushq $0x2
popq %rcx
callq 0xe3cb7
subq $0x1, %rbp
jb 0x77eca
movq %r14, %rdi
movq %rbx, %rsi
callq 0x77f26
jmp 0x77eb7
addq $0x2, %r12
movq 0x8(%rsp), %rbp
movq 0x10(%rsp), %rcx
incq %rcx
jmp 0x77de7
andl $0x7f, %ebp
movl $0x80, %r13d
subq %rbp, %r13
movq 0x8(%rsp), %rbp
subq $0x1, %r13
jb 0x77f1f
movq 0x18(%r15), %rdi
movq %rbx, %rsi
movq %r12, %rdx
pushq $0x2
popq %rcx
callq 0xe3cb7
addq $0x2, %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0x77f26
movq 0x10(%rsp), %rcx
jmp 0x77ef1
movq 0x28(%rsp), %r13
jmp 0x77ed8