// File: /workspace/github_c_makefile_star2_O3/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 0x2e97f
cmpl $0x494e464f, %eax       # imm = 0x494E464F
jne 0x2e995
movl $0x1, 0x130(%r14)
movq 0x40(%rdx), %rax
movq 0x48(%rdx), %rcx
movq %rax, 0x8(%rsp)
cmpq $0x25, %rcx
jl 0x2e995
movq 0x10(%r14), %r13
movq 0x18(%r14), %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe80cf(%rip), %rsi     # 0x116878
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %edx
cmpb $0x2, %dl
leaq 0xe8221(%rip), %rax     # 0x1169ed
leaq 0xfd97e(%rip), %rsi     # 0x12c151
cmoveq %rax, %rsi
cmpb $0x1, %dl
leaq 0xe8207(%rip), %rcx     # 0x1169e8
cmovneq %rsi, %rcx
leaq 0xe80a3(%rip), %rsi     # 0x11688f
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe8096(%rip), %rsi     # 0x1168a2
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe808a(%rip), %rsi     # 0x1168b6
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe8129(%rip), %rsi     # 0x116975
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r15
movq 0x18(%r14), %rdi
movq (%r12), %rsi
movl $0x20, %edx
movq %rax, %rcx
xorl %r8d, %r8d
movl $0x2, %r9d
callq 0xefbd7
movq %r15, %rdi
callq 0xf64a0
movq %r15, %rdi
callq 0xf705c
leaq 0xe8048(%rip), %rsi     # 0x1168de
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
addq $0x20, (%r12)
cmpb $0x32, 0x1(%r13)
jb 0x2e975
movq 0x18(%r14), %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe80b3(%rip), %rsi     # 0x116981
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe80a2(%rip), %rsi     # 0x116990
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeeb4b
movzbl %al, %edx
leaq 0xe8099(%rip), %rsi     # 0x1169a7
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeebeb
leaq 0xe8093(%rip), %rsi     # 0x1169be
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeebeb
leaq 0xe808c(%rip), %rsi     # 0x1169d6
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r14), %rdi
movq %r12, %rsi
callq 0xeebeb
leaq 0xe7f83(%rip), %rsi     # 0x1168ec
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq %r15, %rdi
callq 0xf6753
jmp 0x2e995
movl $0x1, 0x130(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e9a8
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq