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

	ictx->is_std_container = is_container_chunk(c, d, ictx->chunkctx->chunk4cc.id);
	if(ictx->is_std_container) goto done;

	if(ictx->main_contentstype4cc.id==CODE_8SVX) {
		switch(ictx->chunkctx->chunk4cc.id) {
		case CODE_NAME:
			// In 8SVX, the NAME chunk means "voice name". In other types
			// of files, it presumably means some other sort of name.
			do_text_chunk(c, ictx, "voice name");
			ictx->handled = 1;
			break;
		}
	}
	else if(ictx->main_contentstype4cc.id==CODE_AIFF) {
		switch(ictx->chunkctx->chunk4cc.id) {
		case CODE_COMT:
			do_aiff_comt_chunk(c, ictx);
			ictx->handled = 1;
			break;
		case CODE_ID3:
			do_id3_chunk(c, ictx);
			ictx->handled = 1;
			break;
		}
	}
	else if(ictx->main_contentstype4cc.id==CODE_YAFA) {
		do_YAFA_chunk(c, d, ictx);
	}

done:
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x10(%rdi), %r13
movq 0x128(%rdi), %rax
movl 0x4(%rax), %ecx
cmpl $0x4, (%r13)
jne 0x77c8a
cmpl $0x43415434, %ecx       # imm = 0x43415434
je 0x77ca2
cmpl $0x464f5234, %ecx       # imm = 0x464F5234
je 0x77ca2
cmpl $0x4c495334, %ecx       # imm = 0x4C495334
je 0x77ca2
jmp 0x77cc0
cmpl $0x43415420, %ecx       # imm = 0x43415420
je 0x77ca2
cmpl $0x4c495354, %ecx       # imm = 0x4C495354
je 0x77ca2
cmpl $0x464f524d, %ecx       # imm = 0x464F524D
jne 0x77cc0
movl $0x1, 0x134(%rbx)
movl $0x1, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x134(%rbx)
movl 0x9c(%rbx), %edx
cmpl $0x59414641, %edx       # imm = 0x59414641
je 0x77ea6
cmpl $0x41494646, %edx       # imm = 0x41494646
je 0x77d63
cmpl $0x38535658, %edx       # imm = 0x38535658
jne 0x77cac
cmpl $0x4e414d45, %ecx       # imm = 0x4E414D45
jne 0x77cac
movq %r14, %rdi
callq 0xf6410
movq %rax, %r15
movq 0x18(%r14), %rdi
movq 0x128(%rbx), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
movl $0x1, %ebp
movl %ebp, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %r15, %r8
movl $0x1, %r9d
callq 0xefc2a
movq %r15, %rdi
callq 0xf705c
leaq 0xb43ee(%rip), %rsi     # 0x12c12a
leaq 0xb0b09(%rip), %rdx     # 0x12884c
movq %r14, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movq %r15, %rdi
callq 0xf6753
movl %ebp, 0x130(%rbx)
jmp 0x77cac
cmpl $0x49443320, %ecx       # imm = 0x49443320
je 0x77ef0
cmpl $0x434f4d54, %ecx       # imm = 0x434F4D54
jne 0x77cac
movq 0x40(%rax), %rbp
leaq 0x18(%rsp), %r15
movq %rbp, (%r15)
addq 0x48(%rax), %rbp
leaq 0x14(%rsp), %rsi
movq %r14, %rdi
callq 0xe8a1c
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeeb91
movq %rax, %r15
leaq 0xb0aa9(%rip), %rsi     # 0x128857
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
callq 0xf6410
movq %rax, %r12
testq %r15, %r15
jle 0x77e8d
movq 0x18(%rsp), %rdx
leaq 0x8(%rdx), %rax
cmpq %rbp, %rax
jge 0x77e8d
movq %r14, %rdi
leaq 0xab2a2(%rip), %rsi     # 0x12308d
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
addq $0x6, 0x18(%rsp)
movq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0xeeb91
movq %rax, %r13
movq 0x18(%rsp), %rax
addq %r13, %rax
cmpq %rbp, %rax
jg 0x77e8d
movq %r12, %rdi
callq 0xf6423
movq 0x18(%rbx), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, (%rsp)
movl $0x3e8, %ecx            # imm = 0x3E8
movq %r13, %rdx
movq %r12, %r8
xorl %r9d, %r9d
callq 0xefc2a
movq %r12, %rdi
callq 0xf70f6
movq %r14, %rdi
leaq 0xc3244(%rip), %rsi     # 0x13b0a4
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %r13, %rdi
callq 0xe9c7e
addq %rax, 0x18(%rsp)
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
decq %r15
jne 0x77dcf
movq %r12, %rdi
callq 0xf6753
movl 0x14(%rsp), %esi
movq %r14, %rdi
callq 0xe8a25
jmp 0x78135
cmpl $0x494e464f, %ecx       # imm = 0x494E464F
je 0x77fee
cmpl $0x424f4459, %ecx       # imm = 0x424F4459
je 0x77f79
cmpl $0x414e4e4f, %ecx       # imm = 0x414E4E4F
jne 0x77cac
movq 0x40(%rax), %rcx
movq %rcx, 0x18(%rsp)
movl $0x1, 0x130(%rbx)
cmpq $0x4, 0x48(%rax)
jge 0x78085
xorl %r15d, %r15d
jmp 0x780e9
movq 0x18(%rbx), %rdi
movq 0x40(%rax), %rsi
leaq 0x9a89f(%rip), %rdx     # 0x11279e
movl $0x3, %ecx
callq 0xefc85
testl %eax, %eax
jne 0x78135
movq 0x128(%rbx), %rax
movq 0x40(%rax), %rdx
movq 0x48(%rax), %rcx
leaq 0xb0941(%rip), %rsi     # 0x128868
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rcx
movq 0x128(%rbx), %rax
movq 0x40(%rax), %r8
movq 0x48(%rax), %r9
leaq 0x9a87e(%rip), %rsi     # 0x1127d6
leaq 0xb8f9d(%rip), %rdx     # 0x130efc
movq %r14, %rdi
callq 0xe9b13
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
jmp 0x78135
cmpb $0x0, 0x5(%r13)
je 0x77cac
cmpq $0xc, 0x48(%rax)
jl 0x77cac
movq 0x18(%rbx), %rdi
movq 0x40(%rax), %rsi
callq 0xeed0d
cmpl $0x58504b46, %eax       # imm = 0x58504B46
jne 0x77cac
movq 0x18(%rbx), %rdi
movq 0x128(%rbx), %rax
movq 0x40(%rax), %rsi
addq $0x8, %rsi
leaq 0x18(%rsp), %rdx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0xf1762
leaq 0x28(%rsp), %rcx
leaq 0xb08d5(%rip), %rsi     # 0x1288ad
leaq 0xb08a4(%rip), %rdx     # 0x128883
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8617
jmp 0x78135
movq 0x40(%rax), %rcx
movq %rcx, 0x18(%rsp)
cmpq $0xe, 0x48(%rax)
jl 0x77cac
movq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0xeeb91
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeeb91
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xe8f88
addq $0x4, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeeb91
leaq 0xc2516(%rip), %rsi     # 0x13a55d
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeeb91
cmpq $0x4, %rax
ja 0x7811b
leaq 0xb076c(%rip), %rcx     # 0x1287dc
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
leaq 0xbdd49(%rip), %rcx     # 0x135dc9
jmp 0x78122
movq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %r12
movq %r12, %rsi
callq 0xeed31
movq %rax, %r13
movq %r14, %rdi
callq 0xf6410
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq (%r12), %rsi
movl 0x60(%rbx), %eax
movl %eax, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %r13, %rdx
movq %r15, %r8
xorl %r9d, %r9d
callq 0xefc2a
movq %r15, %rdi
callq 0xf6483
movq %r15, %rdi
callq 0xf705c
leaq 0xb07c0(%rip), %rsi     # 0x12889c
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %r15, %rdi
callq 0xf6753
jmp 0x77cac
movb $0x1, 0x5(%r13)
leaq 0xb07c3(%rip), %rcx     # 0x1288c5
jmp 0x78122
movb $0x1, 0x5(%r13)
leaq 0xb07aa(%rip), %rcx     # 0x1288ba
jmp 0x78122
leaq 0xb07bc(%rip), %rcx     # 0x1288d5
jmp 0x78122
leaq 0xb402f(%rip), %rcx     # 0x12c151
leaq 0xb07b8(%rip), %rsi     # 0x1288e1
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movl $0x1, 0x130(%rbx)
jmp 0x77cac