// File: /workspace/github_c_makefile_star2_O1/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 0x78021
cmpl $0x43415434, %ecx       # imm = 0x43415434
je 0x78039
cmpl $0x464f5234, %ecx       # imm = 0x464F5234
je 0x78039
cmpl $0x4c495334, %ecx       # imm = 0x4C495334
je 0x78039
jmp 0x78057
cmpl $0x43415420, %ecx       # imm = 0x43415420
je 0x78039
cmpl $0x464f524d, %ecx       # imm = 0x464F524D
je 0x78039
cmpl $0x4c495354, %ecx       # imm = 0x4C495354
jne 0x78057
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 $0x38535658, %edx       # imm = 0x38535658
je 0x7820c
cmpl $0x41494646, %edx       # imm = 0x41494646
je 0x780c9
cmpl $0x59414641, %edx       # imm = 0x59414641
jne 0x78043
cmpl $0x494e464f, %ecx       # imm = 0x494E464F
je 0x78385
cmpl $0x424f4459, %ecx       # imm = 0x424F4459
je 0x78310
cmpl $0x414e4e4f, %ecx       # imm = 0x414E4E4F
jne 0x78043
movq 0x40(%rax), %rcx
movq %rcx, 0x18(%rsp)
movl $0x1, 0x130(%rbx)
cmpq $0x4, 0x48(%rax)
jge 0x7841c
xorl %r15d, %r15d
jmp 0x78480
cmpl $0x49443320, %ecx       # imm = 0x49443320
je 0x78287
cmpl $0x434f4d54, %ecx       # imm = 0x434F4D54
jne 0x78043
movq 0x40(%rax), %rbp
leaq 0x18(%rsp), %r15
movq %rbp, (%r15)
addq 0x48(%rax), %rbp
leaq 0x14(%rsp), %rsi
movq %r14, %rdi
callq 0xe958c
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef193
movq %rax, %r15
leaq 0xb0513(%rip), %rsi     # 0x128627
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
callq 0xf6870
movq %rax, %r12
testq %r15, %r15
jle 0x781f3
movq 0x18(%rsp), %rdx
leaq 0x8(%rdx), %rax
cmpq %rbp, %rax
jge 0x781f3
movq %r14, %rdi
leaq 0xaad4f(%rip), %rsi     # 0x122ea0
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
movl $0x1, %esi
callq 0xe9585
addq $0x6, 0x18(%rsp)
movq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0xef193
movq %rax, %r13
movq 0x18(%rsp), %rax
addq %r13, %rax
cmpq %rbp, %rax
jg 0x781f3
movq %r12, %rdi
callq 0xf6883
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 0xf0203
movq %r12, %rdi
callq 0xf7557
movq %r14, %rdi
leaq 0xc2b46(%rip), %rsi     # 0x13ad0c
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r13, %rdi
callq 0xea7d5
addq %rax, 0x18(%rsp)
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
decq %r15
jne 0x78135
movq %r12, %rdi
callq 0xf6bb0
movl 0x14(%rsp), %esi
movq %r14, %rdi
callq 0xe9595
jmp 0x784cc
cmpl $0x4e414d45, %ecx       # imm = 0x4E414D45
jne 0x78043
movq %r14, %rdi
callq 0xf6870
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 0xf0203
movq %r15, %rdi
callq 0xf74bd
leaq 0xb3be2(%rip), %rsi     # 0x12be42
leaq 0xb03b5(%rip), %rdx     # 0x12861c
movq %r14, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
callq 0xf6bb0
movl %ebp, 0x130(%rbx)
jmp 0x78043
movq 0x18(%rbx), %rdi
movq 0x40(%rax), %rsi
leaq 0x9a4f8(%rip), %rdx     # 0x11278e
movl $0x3, %ecx
callq 0xf025e
testl %eax, %eax
jne 0x784cc
movq 0x128(%rbx), %rax
movq 0x40(%rax), %rdx
movq 0x48(%rax), %rcx
leaq 0xb037a(%rip), %rsi     # 0x128638
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rcx
movq 0x128(%rbx), %rax
movq 0x40(%rax), %r8
movq 0x48(%rax), %r9
leaq 0x9a4d7(%rip), %rsi     # 0x1127c6
leaq 0xb88cb(%rip), %rdx     # 0x130bc1
movq %r14, %rdi
callq 0xea66a
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
jmp 0x784cc
cmpb $0x0, 0x5(%r13)
je 0x78043
cmpq $0xc, 0x48(%rax)
jl 0x78043
movq 0x18(%rbx), %rdi
movq 0x40(%rax), %rsi
callq 0xef32a
cmpl $0x58504b46, %eax       # imm = 0x58504B46
jne 0x78043
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 0xf1d74
leaq 0x28(%rsp), %rcx
leaq 0xb030e(%rip), %rsi     # 0x12867d
leaq 0xb02dd(%rip), %rdx     # 0x128653
movq %r14, %rdi
xorl %eax, %eax
callq 0xe9226
jmp 0x784cc
movq 0x40(%rax), %rcx
movq %rcx, 0x18(%rsp)
cmpq $0xe, 0x48(%rax)
jl 0x78043
movq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0xef193
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef193
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xe9b05
addq $0x4, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef193
leaq 0xc1dfb(%rip), %rsi     # 0x13a1d9
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xef193
cmpq $0x4, %rax
ja 0x784b2
leaq 0xb01a5(%rip), %rcx     # 0x1285ac
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
leaq 0xbd62a(%rip), %rcx     # 0x135a41
jmp 0x784b9
movq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %r12
movq %r12, %rsi
callq 0xef34e
movq %rax, %r13
movq %r14, %rdi
callq 0xf6870
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 0xf0203
movq %r15, %rdi
callq 0xf68e3
movq %r15, %rdi
callq 0xf74bd
leaq 0xb01f9(%rip), %rsi     # 0x12866c
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
callq 0xf6bb0
jmp 0x78043
movb $0x1, 0x5(%r13)
leaq 0xb01fc(%rip), %rcx     # 0x128695
jmp 0x784b9
movb $0x1, 0x5(%r13)
leaq 0xb01e3(%rip), %rcx     # 0x12868a
jmp 0x784b9
leaq 0xb01f5(%rip), %rcx     # 0x1286a5
jmp 0x784b9
leaq 0xb39b0(%rip), %rcx     # 0x12be69
leaq 0xb01f1(%rip), %rsi     # 0x1286b1
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movl $0x1, 0x130(%rbx)
jmp 0x78043