// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/asf.c
// Function: handler_CodecList
static void handler_CodecList(deark *c, lctx *d, struct handler_params *hp)
{
	i64 numentries;
	i64 k;
	i64 pos;

	if(hp->dlen<20) return;
	numentries = de_getu32le(hp->dpos+16);
	de_dbg(c, "number of codec entries: %d", (int)numentries);

	pos = hp->dpos+20;
	for(k=0; k<numentries; k++) {
		i64 bytes_consumed = 0;
		int ret;

		if(pos >= hp->dpos + hp->dlen) break;
		ret = do_codec_entry(c, d, pos, hp->dpos+hp->dlen-pos, &bytes_consumed);
		if(!ret || (bytes_consumed<8)) break;
		pos += bytes_consumed;
	}
}

// Assembly:
cmpq $0x14, 0x18(%rdx)
jl 0x1eb96
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq 0x10(%rdx), %rsi
addq $0x10, %rsi
callq 0xef37e
movq %rax, %r15
leaq 0xf3d30(%rip), %rsi     # 0x11260b
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9226
testq %r15, %r15
jle 0x1eb88
movq 0x10(%rbx), %r13
addq $0x14, %r13
decq %r15
movq %rbx, 0x38(%rsp)
movq 0x18(%rbx), %rcx
addq 0x10(%rbx), %rcx
movb $0x1, %al
subq %r13, %rcx
jle 0x1eb75
movq %r15, 0x40(%rsp)
movq %r13, 0x10(%rsp)
movq %r14, %rdi
leaq 0x1c(%rsp), %rsi
movq %rcx, 0x20(%rsp)
callq 0xe958c
movq %r14, %rdi
leaq 0xf3ced(%rip), %rsi     # 0x112627
movq %r13, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x20(%rsp), %rax
movl $0x0, %ebp
movl $0x0, %r12d
movl $0x0, %r15d
cmpq $0x8, %rax
jl 0x1eb33
movq %r13, 0x30(%rsp)
movq 0x18(%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0xef1ed
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x1e9ae
cmpl $0x2, %eax
je 0x1e9a5
leaq 0x10d4d2(%rip), %rcx    # 0x12be69
cmpl $0x1, %eax
jne 0x1e9b5
leaq 0x10e04e(%rip), %rcx    # 0x12c9f1
jmp 0x1e9b5
leaq 0x10e056(%rip), %rcx    # 0x12ca02
jmp 0x1e9b5
leaq 0xf3ad7(%rip), %rcx     # 0x11248c
movq %r14, %rdi
leaq 0xf3d63(%rip), %rsi     # 0x112722
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r14), %rdi
leaq 0x10(%rsp), %r13
movq %r13, %rsi
callq 0xef1ed
movq %rax, %rbx
movq %r14, %rdi
callq 0xf6870
movq %r14, %r15
movq %rax, %r14
movq 0x18(%r15), %rdi
movq 0x10(%rsp), %rsi
addq %rbx, %rbx
movl $0x3, %ebp
movl %ebp, (%rsp)
movl $0x3e8, %ecx            # imm = 0x3E8
movq %rbx, %rdx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xf0203
movq %r14, %rdi
callq 0xf68c1
movq %r14, 0x28(%rsp)
movq %r14, %rdi
movq %r15, %r14
callq 0xf74bd
movq %r15, %rdi
leaq 0x103b40(%rip), %rsi    # 0x122573
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
addq %rbx, 0x10(%rsp)
movq 0x18(%r15), %rdi
movq %r13, %rsi
callq 0xef1ed
movq %rax, %rbx
movq %r15, %rdi
callq 0xf6870
movq %rax, %r15
movq 0x18(%r14), %rdi
movq 0x10(%rsp), %rsi
addq %rbx, %rbx
movl %ebp, (%rsp)
movl $0x3e8, %ecx            # imm = 0x3E8
movq %rbx, %rdx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xf0203
movq %r15, %rdi
callq 0xf68c1
movq %r15, %r12
movq %r15, %rdi
callq 0xf74bd
movq %r14, %rdi
leaq 0x1092a9(%rip), %rsi    # 0x127d44
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
addq %rbx, 0x10(%rsp)
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xef1ed
movq %rax, %rbx
testq %rax, %rax
jle 0x1eb14
movq 0x10(%rsp), %rcx
movq %r14, %rdi
leaq 0xf3b6d(%rip), %rsi     # 0x11263a
movl %ebx, %edx
xorl %eax, %eax
callq 0xe9226
movq %r14, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%r14), %rsi
movq 0x10(%rsp), %rdx
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %r14, %rdi
movq %rbx, %rcx
xorl %r9d, %r9d
callq 0xe975a
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x10(%rsp), %rbp
addq %rbx, %rbp
movq %rbp, 0x10(%rsp)
movq 0x30(%rsp), %r13
subq %r13, %rbp
movq 0x28(%rsp), %r15
movq 0x20(%rsp), %rax
cmpq $0x8, %rax
setl %bl
movl 0x1c(%rsp), %esi
movq %r14, %rdi
callq 0xe9595
movq %r15, %rdi
callq 0xf6bb0
movq %r12, %rdi
callq 0xf6bb0
cmpq $0x8, %rbp
setl %al
orb %bl, %al
movl $0x0, %ecx
cmoveq %rbp, %rcx
addq %rcx, %r13
movq 0x38(%rsp), %rbx
movq 0x40(%rsp), %r15
subq $0x1, %r15
setb %cl
testb %al, %al
jne 0x1eb88
testb %cl, %cl
je 0x1e901
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq