// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: decompress_delta_op8
static void decompress_delta_op8(deark *c, lctx *d, struct imgbody_info *ibi,
	struct frame_ctx *frctx, i64 pos1, i64 len)
{
	i64 planedata_offs[16];
	i64 pos = pos1;
	i64 elem_size;
	int i;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);
	if(!frctx->frame_buffer) goto done;

	de_dbg(c, "[delta8 data]");

	if(frctx->bits & 0xfffffffeU) {
		de_err(c, "Unsupported ANHD options");
		d->errflag = 1;
		goto done;
	}
	if(frctx->bits & 0x00000001) {
		elem_size = 4;
	}
	else {
		elem_size = 2;
	}

	for(i=0; i<16; i++) {
		if(d->errflag) goto done;
		planedata_offs[i] = de_getu32be_p(&pos);
		if(i<ibi->planes_total) {
			de_dbg2(c, "plane[%d] offs: %"I64_FMT, i, planedata_offs[i]);
			if(planedata_offs[i]>0) {
				decompress_plane_vdelta(c, d, ibi, frctx, i, c->infile,
					pos1+planedata_offs[i], 0, pos1+len, elem_size, elem_size, 0, 0);
			}
		}
	}

done:
	de_dbg_indent_restore(c, saved_indent_level);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq %r9, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x18(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x15b580
movq -0x30(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0xb4a61
jmp 0xb4bfe
movq -0x18(%rbp), %rdi
leaq 0x1000b9(%rip), %rsi    # 0x1b4b25
movb $0x0, %al
callq 0x15b0d0
movq -0x30(%rbp), %rax
movl 0x18(%rax), %eax
andl $-0x2, %eax
cmpl $0x0, %eax
je 0xb4aa4
movq -0x18(%rbp), %rdi
leaq 0xfffc3(%rip), %rsi     # 0x1b4a50
movb $0x0, %al
callq 0x15bfb0
movq -0x20(%rbp), %rax
movl $0x1, 0x1c(%rax)
jmp 0xb4bfe
movq -0x30(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xb4ac0
movq $0x4, -0xd0(%rbp)
jmp 0xb4acb
movq $0x2, -0xd0(%rbp)
movl $0x0, -0xd4(%rbp)
cmpl $0x10, -0xd4(%rbp)
jge 0xb4bfc
movq -0x20(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
je 0xb4af1
jmp 0xb4bfe
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x1654b0
movq %rax, %rcx
movslq -0xd4(%rbp), %rax
movq %rcx, -0xc0(%rbp,%rax,8)
movslq -0xd4(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jge 0xb4be6
movq -0x18(%rbp), %rdi
movl -0xd4(%rbp), %edx
movslq -0xd4(%rbp), %rax
movq -0xc0(%rbp,%rax,8), %rcx
leaq 0xffec2(%rip), %rsi     # 0x1b4a0e
movb $0x0, %al
callq 0x15b350
movslq -0xd4(%rbp), %rax
cmpq $0x0, -0xc0(%rbp,%rax,8)
jle 0xb4be4
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movslq -0xd4(%rbp), %r8
movq -0x18(%rbp), %rax
movq 0x18(%rax), %r9
movq -0x38(%rbp), %rbx
movslq -0xd4(%rbp), %rax
addq -0xc0(%rbp,%rax,8), %rbx
movq -0x38(%rbp), %r11
addq -0x40(%rbp), %r11
movq -0xd0(%rbp), %r10
movq -0xd0(%rbp), %rax
xorl %r14d, %r14d
xorl %r14d, %r14d
movq %rbx, (%rsp)
movq $0x0, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x30(%rsp)
callq 0xb5350
jmp 0xb4be6
jmp 0xb4be8
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0xb4ad5
jmp 0xb4bfe
movq -0x18(%rbp), %rdi
movl -0xd8(%rbp), %esi
callq 0x15b5a0
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)