// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/apple2-dsk.c
// Function: my_woz_chunk_handler
static int my_woz_chunk_handler(struct de_iffctx *ictx)
{
	deark *c = ictx->c;

	switch(ictx->chunkctx->chunk4cc.id) {
	case CODE_INFO:
		ictx->handled = 1;
		do_woz_INFO(c, ictx, ictx->chunkctx);
		break;
	case CODE_META:
		ictx->handled = 1;
		do_wozmoof_META(c, ictx, ictx->chunkctx);
		break;
	}

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x128(%rdi), %rdx
movl 0x4(%rdx), %eax
cmpl $0x4d455441, %eax       # imm = 0x4D455441
je 0x2dab3
cmpl $0x494e464f, %eax       # imm = 0x494E464F
jne 0x2dac9
movl $0x1, 0x130(%r14)
movq 0x40(%rdx), %rax
movq %rax, 0x8(%rsp)
cmpq $0x25, 0x48(%rdx)
jl 0x2dac9
movq 0x10(%r14), %r13
movq 0x18(%r14), %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0xdbf07(%rip), %rsi     # 0x1097e8
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xe3f2a
movzbl %al, %edx
cmpb $0x2, %dl
leaq 0xdc059(%rip), %rax     # 0x10995d
leaq 0xf15d6(%rip), %rsi     # 0x11eee1
cmoveq %rax, %rsi
cmpb $0x1, %dl
leaq 0xdc03f(%rip), %rcx     # 0x109958
cmovneq %rsi, %rcx
leaq 0xdbedb(%rip), %rsi     # 0x1097ff
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0xdbece(%rip), %rsi     # 0x109812
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0xdbec2(%rip), %rsi     # 0x109826
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0xdbf61(%rip), %rsi     # 0x1098e5
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r15
movq 0x18(%r14), %rdi
movq (%r12), %rsi
pushq $0x20
popq %rdx
pushq $0x2
popq %r9
movq %rax, %rcx
xorl %r8d, %r8d
callq 0xe4c9a
movq %r15, %rdi
callq 0xead03
movq %r15, %rdi
callq 0xeb7e4
leaq 0xdbe84(%rip), %rsi     # 0x10984e
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
addq $0x20, (%r12)
cmpb $0x32, 0x1(%r13)
jb 0x2daa9
movq 0x18(%r14), %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0xdbeef(%rip), %rsi     # 0x1098f1
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0xdbede(%rip), %rsi     # 0x109900
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xe3f2a
movzbl %al, %edx
leaq 0xdbed5(%rip), %rsi     # 0x109917
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xe3fc4
leaq 0xdbecf(%rip), %rsi     # 0x10992e
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xe3fc4
leaq 0xdbec8(%rip), %rsi     # 0x109946
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xe3fc4
leaq 0xdbdbf(%rip), %rsi     # 0x10985c
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq %r15, %rdi
callq 0xeaf3c
jmp 0x2dac9
movl $0x1, 0x130(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2dada
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq