// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/iff.c
// Function: my_rgfx_chunk_handler
static int my_rgfx_chunk_handler(struct de_iffctx *ictx)
{
	deark *c = ictx->c;
	struct rgfx_ctx *d = (struct rgfx_ctx*)ictx->userdata;

	switch(ictx->chunkctx->chunk4cc.id) {
	case CODE_FORM:
		ictx->is_std_container = 1;
		goto done;
	}

	if(ictx->level != 1) goto done;

	switch(ictx->chunkctx->chunk4cc.id) {
	case CODE_RBOD:
		do_RGFX_RBOD(c, d, ictx);
		ictx->handled = 1;
		break;
	case CODE_RCOL:
		do_RGFX_RCOL(c, d, ictx);
		ictx->handled = 1;
		break;
	case CODE_RGHD:
		do_RGFX_RGHD(c, d, ictx);
		ictx->handled = 1;
		break;
	case CODE_RSCM:
		do_RGFX_RSCM(c, d, ictx);
		ictx->handled = 1;
		break;
	}

done:
	if(d->errflag) return 0;
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %r13
movq 0x128(%rdi), %rax
movl 0x4(%rax), %ecx
cmpl $0x464f524d, %ecx       # imm = 0x464F524D
jne 0x73f3e
movl $0x1, 0x134(%rbx)
jmp 0x7423a
cmpl $0x1, 0x64(%rbx)
jne 0x7423a
movq (%rbx), %r14
cmpl $0x5253434d, %ecx       # imm = 0x5253434D
je 0x740f4
cmpl $0x52434f4c, %ecx       # imm = 0x52434F4C
je 0x73fab
cmpl $0x52474844, %ecx       # imm = 0x52474844
je 0x7400c
cmpl $0x52424f44, %ecx       # imm = 0x52424F44
jne 0x7423a
leaq 0x1c(%rsp), %rsi
movq %r14, %rdi
callq 0xdebae
cmpb $0x0, 0x4(%r13)
je 0x74128
xorl %r15d, %r15d
movq %r15, %rdi
callq 0xe7084
movl 0x1c(%rsp), %esi
movq %r14, %rdi
callq 0xdebb7
jmp 0x74230
movb $0x1, 0x3(%r13)
movq 0x40(%rax), %rdx
movq 0x48(%rax), %rax
leaq 0x8(%rdx), %rcx
cmpq $0x308, %rax            # imm = 0x308
cmovneq %rdx, %rcx
pushq $0x3
popq %r8
cqto
idivq %r8
movl $0x100, %edx            # imm = 0x100
cmpq %rdx, %rax
cmovgeq %rdx, %rax
movq 0x18(%rbx), %rsi
leaq 0x48(%r13), %r9
pushq $0x1
popq %rbp
andl $0x0, 0x10(%rsp)
movl %ebp, 0x8(%rsp)
movq %rdx, (%rsp)
movq %r14, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq 0xe79ca
movl %ebp, 0x130(%rbx)
jmp 0x7423a
cmpq $0x34, 0x48(%rax)
jl 0x74230
movq 0x40(%rax), %rax
addq $0x8, %rax
leaq 0x38(%rsp), %r15
movq %rax, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, 0x10(%r13)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, 0x18(%r13)
movq 0x10(%r13), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0xdf038
addq $0x8, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, 0x28(%r13)
leaq 0xa2f29(%rip), %rsi     # 0x116f9a
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, 0x30(%r13)
leaq 0xa76f3(%rip), %rsi     # 0x11b787
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe4071
movq %rax, 0x38(%r13)
leaq 0xa76de(%rip), %rsi     # 0x11b795
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe4071
movl %eax, 0x8(%r13)
cmpl $0x2, %eax
ja 0x741e8
movl %eax, %ecx
andl $0x3, %ecx
leaq 0xa74c8(%rip), %rdx     # 0x11b5b0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmp 0x741ef
cmpq $0x4, 0x48(%rax)
jl 0x74230
movq 0x18(%rbx), %rdi
movq 0x40(%rax), %rsi
callq 0xe404f
movl %eax, 0x24(%r13)
leaq 0xa76b5(%rip), %rsi     # 0x11b7cc
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
jmp 0x74230
movb $0x1, 0x4(%r13)
movq 0x10(%r13), %rsi
movq 0x18(%r13), %rdx
movq %r14, %rdi
callq 0xe6be1
testl %eax, %eax
je 0x73f8f
cmpl $0x0, 0x8(%r13)
je 0x74256
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe59cd
movq %rax, 0x40(%r13)
leaq 0xa18eb(%rip), %rsi     # 0x115a52
movq %r14, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0xdeba7
leaq 0x98(%rsp), %r15
leaq 0x20(%rsp), %r12
leaq 0x38(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xee7ee
movq 0x18(%rbx), %rax
movq %rax, (%r15)
movq 0x128(%rbx), %rax
movups 0x40(%rax), %xmm0
movups %xmm0, 0x8(%r15)
movq 0x40(%r13), %rax
movq %rax, (%r12)
cmpl $0x1, 0x8(%r13)
jne 0x74274
leaq 0x98(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %r14, %rdi
xorl %r8d, %r8d
callq 0xefe20
jmp 0x7428c
leaq 0xaacf2(%rip), %rcx     # 0x11eee1
leaq 0xa75ae(%rip), %rsi     # 0x11b7a4
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
leaq 0x38(%rsp), %rsi
addq $0x8, (%rsi)
movq 0x18(%rbx), %rdi
callq 0xe4071
movl %eax, 0x20(%r13)
leaq 0xa759a(%rip), %rsi     # 0x11b7b9
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movb $0x1, 0x2(%r13)
movl $0x1, 0x130(%rbx)
xorl %eax, %eax
cmpb $0x0, (%r13)
sete %al
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rbx), %rdi
movq 0x128(%rbx), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
callq 0xe6248
movq %rax, 0x40(%r13)
jmp 0x742b9
leaq 0x9f799(%rip), %rcx     # 0x113a14
leaq 0x38(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0xee823
cmpl $0x0, 0x38(%rsp)
je 0x742ae
leaq 0x48(%rsp), %rdx
leaq 0x92f22(%rip), %rsi     # 0x1071c1
movq %r14, %rdi
xorl %eax, %eax
callq 0xdf2a5
movb $0x1, (%r13)
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0xdeba7
cmpb $0x0, (%r13)
jne 0x73f8f
movl 0x20(%r13), %eax
cmpl $0x2, %eax
je 0x742e9
cmpl $0x1, %eax
jne 0x74340
cmpq $0x8, 0x28(%r13)
jne 0x74340
cmpq $0x8, 0x30(%r13)
jne 0x74340
cmpb $0x0, 0x3(%r13)
jne 0x742f7
jmp 0x74340
cmpq $0x18, 0x28(%r13)
jne 0x74340
cmpq $0x18, 0x30(%r13)
jne 0x74340
movq 0x10(%r13), %rsi
movq 0x18(%r13), %rdx
pushq $0x3
popq %rcx
movq %r14, %rdi
callq 0xe7437
movq %rax, %r15
movq 0x28(%r13), %rax
cmpq $0x18, %rax
je 0x74359
cmpq $0x8, %rax
jne 0x73f92
movq 0x38(%r13), %rcx
movq 0x40(%r13), %rdi
leaq 0x48(%r13), %r8
andl $0x0, (%rsp)
pushq $0x8
popq %rdx
xorl %esi, %esi
movq %r15, %r9
callq 0xe7cbc
jmp 0x74371
leaq 0x96343(%rip), %rsi     # 0x10a68a
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0xdf2a5
jmp 0x73f92
movq 0x38(%r13), %rdx
movq 0x40(%r13), %rdi
pushq $0x3
popq %rcx
xorl %esi, %esi
movq %r15, %r8
xorl %r9d, %r9d
callq 0xe7f67
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe70b7
jmp 0x73f92
nop