// File: /workspace/github_c_makefile_star2_O2/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 0x738a5
cmpl $0x43415434, %ecx       # imm = 0x43415434
je 0x738bd
cmpl $0x464f5234, %ecx       # imm = 0x464F5234
je 0x738bd
cmpl $0x4c495334, %ecx       # imm = 0x4C495334
je 0x738bd
jmp 0x738d9
cmpl $0x43415420, %ecx       # imm = 0x43415420
je 0x738bd
cmpl $0x4c495354, %ecx       # imm = 0x4C495354
je 0x738bd
cmpl $0x464f524d, %ecx       # imm = 0x464F524D
jne 0x738d9
movl $0x1, 0x134(%rbx)
pushq $0x1
popq %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andl $0x0, 0x134(%rbx)
movl 0x9c(%rbx), %edx
cmpl $0x59414641, %edx       # imm = 0x59414641
je 0x73aa5
cmpl $0x41494646, %edx       # imm = 0x41494646
je 0x73974
cmpl $0x38535658, %edx       # imm = 0x38535658
jne 0x738c7
cmpl $0x4e414d45, %ecx       # imm = 0x4E414D45
jne 0x738c7
movq %r14, %rdi
callq 0xeac74
movq %rax, %r15
movq 0x18(%r14), %rdi
movq 0x128(%rbx), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
pushq $0x1
popq %rbp
movl %ebp, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %r15, %r8
movl %ebp, %r9d
callq 0xe4ced
movq %r15, %rdi
callq 0xeb7e4
leaq 0xab56d(%rip), %rsi     # 0x11eeba
leaq 0xa7cb8(%rip), %rdx     # 0x11b60c
movq %r14, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq %r15, %rdi
callq 0xeaf3c
movl %ebp, 0x130(%rbx)
jmp 0x738c7
cmpl $0x49443320, %ecx       # imm = 0x49443320
je 0x73b08
cmpl $0x434f4d54, %ecx       # imm = 0x434F4D54
jne 0x738c7
movq 0x40(%rax), %r15
leaq 0x18(%rsp), %r12
movq %r15, (%r12)
addq 0x48(%rax), %r15
leaq 0x14(%rsp), %rsi
movq %r14, %rdi
callq 0xdebae
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xe3f6e
movq %rax, %r12
leaq 0xa7c57(%rip), %rsi     # 0x11b617
xorl %ebp, %ebp
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
callq 0xeac74
movq %rax, %r13
testq %r12, %r12
cmovleq %rbp, %r12
subq $0x1, %r12
jb 0x73aef
movq 0x18(%rsp), %rdx
leaq 0x8(%rdx), %rax
cmpq %r15, %rax
jge 0x73aef
movq %r14, %rdi
leaq 0xa24c6(%rip), %rsi     # 0x115ecd
xorl %eax, %eax
callq 0xde896
movq %r14, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
addq $0x6, 0x18(%rsp)
movq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0xe3f6e
movq %rax, %rbp
movq 0x18(%rsp), %rax
addq %rbp, %rax
cmpq %r15, %rax
jg 0x73aef
movq %r13, %rdi
callq 0xeac85
movq 0x18(%rbx), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, (%rsp)
movl $0x3e8, %ecx            # imm = 0x3E8
movq %rbp, %rdx
movq %r13, %r8
xorl %r9d, %r9d
callq 0xe4ced
movq %r13, %rdi
callq 0xeb877
movq %r14, %rdi
leaq 0xba336(%rip), %rsi     # 0x12ddb4
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq %rbp, %rdi
callq 0xdfb87
addq %rax, 0x18(%rsp)
movq %r14, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
jmp 0x739e1
cmpl $0x494e464f, %ecx       # imm = 0x494E464F
je 0x73bfe
cmpl $0x424f4459, %ecx       # imm = 0x424F4459
je 0x73b8b
cmpl $0x414e4e4f, %ecx       # imm = 0x414E4E4F
jne 0x738c7
movq 0x40(%rax), %rcx
movq %rcx, 0x18(%rsp)
movl $0x1, 0x130(%rbx)
cmpq $0x4, 0x48(%rax)
jge 0x73c95
xorl %r15d, %r15d
jmp 0x73cf9
movq %r13, %rdi
callq 0xeaf3c
movl 0x14(%rsp), %esi
movq %r14, %rdi
callq 0xdebb7
jmp 0x73d45
movq 0x18(%rbx), %rdi
movq 0x40(%rax), %rsi
leaq 0x91c67(%rip), %rdx     # 0x10577e
pushq $0x3
popq %rcx
callq 0xe4d48
testl %eax, %eax
jne 0x73d45
movq 0x128(%rbx), %rax
movq 0x40(%rax), %rdx
movq 0x48(%rax), %rcx
leaq 0xa7aeb(%rip), %rsi     # 0x11b628
movq %r14, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0xdeba7
movq 0x18(%rbx), %rcx
movq 0x128(%rbx), %rax
movq 0x40(%rax), %r8
movq 0x48(%rax), %r9
leaq 0x91c4a(%rip), %rsi     # 0x1057b6
leaq 0xb00a6(%rip), %rdx     # 0x123c19
movq %r14, %rdi
callq 0xdfa28
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0xdeba7
jmp 0x73d45
cmpb $0x0, 0x5(%r13)
je 0x738c7
cmpq $0xc, 0x48(%rax)
jl 0x738c7
movq 0x18(%rbx), %rdi
movq 0x40(%rax), %rsi
callq 0xe404f
cmpl $0x58504b46, %eax       # imm = 0x58504B46
jne 0x738c7
movq 0x18(%rbx), %rdi
movq 0x128(%rbx), %rax
movq 0x40(%rax), %rsi
addq $0x8, %rsi
leaq 0x18(%rsp), %rdx
pushq $0x4
popq %rcx
xorl %r8d, %r8d
callq 0xe657c
leaq 0x28(%rsp), %rcx
leaq 0xa7a85(%rip), %rsi     # 0x11b66d
leaq 0xa7a54(%rip), %rdx     # 0x11b643
movq %r14, %rdi
xorl %eax, %eax
callq 0xde896
jmp 0x73d45
movq 0x40(%rax), %rcx
movq %rcx, 0x18(%rsp)
cmpq $0xe, 0x48(%rax)
jl 0x738c7
movq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0xe3f6e
movq %rax, %r12
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3f6e
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xdf038
addq $0x4, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3f6e
leaq 0xb9612(%rip), %rsi     # 0x12d269
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3f6e
cmpq $0x4, %rax
ja 0x73d2b
leaq 0xa791c(%rip), %rcx     # 0x11b59c
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
leaq 0xb4e59(%rip), %rcx     # 0x128ae9
jmp 0x73d32
movq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %r12
movq %r12, %rsi
callq 0xe4071
movq %rax, %r13
movq %r14, %rdi
callq 0xeac74
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 0xe4ced
movq %r15, %rdi
callq 0xeace6
movq %r15, %rdi
callq 0xeb7e4
leaq 0xa7970(%rip), %rsi     # 0x11b65c
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq %r15, %rdi
callq 0xeaf3c
jmp 0x738c7
movb $0x1, 0x5(%r13)
leaq 0xa7973(%rip), %rcx     # 0x11b685
jmp 0x73d32
movb $0x1, 0x5(%r13)
leaq 0xa795a(%rip), %rcx     # 0x11b67a
jmp 0x73d32
leaq 0xa796c(%rip), %rcx     # 0x11b695
jmp 0x73d32
leaq 0xab1af(%rip), %rcx     # 0x11eee1
leaq 0xa7968(%rip), %rsi     # 0x11b6a1
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movl $0x1, 0x130(%rbx)
jmp 0x738c7