// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/asf.c
// Function: handler_StreamProperties
static void handler_StreamProperties(deark *c, lctx *d, struct handler_params *hp)
{
	i64 pos = hp->dpos;
	i64 x;
	i64 tsdlen, ecdlen;
	unsigned int flags;
	u8 stream_type[16];
	u8 ec_type[16];
	char stream_type_string[50];
	char ec_type_string[50];
	char buf[64];

	if(hp->dlen<54) return;

	read_and_render_guid(c->infile, stream_type, pos,
		stream_type_string, sizeof(stream_type_string));
	de_dbg(c, "stream type: {%s} (%s)", stream_type_string, get_uuid_name(stream_type));
	pos += 16;

	read_and_render_guid(c->infile, ec_type, pos, ec_type_string, sizeof(ec_type_string));
	de_dbg(c, "error correction type: {%s} (%s)", ec_type_string, get_uuid_name(ec_type));
	pos += 16;

	x = de_geti64le(pos);
	de_dbg(c, "time offset: %"I64_FMT" (%s)", x, format_duration(x, buf, sizeof(buf)));
	pos += 8;

	tsdlen = de_getu32le_p(&pos);
	ecdlen = de_getu32le_p(&pos);

	flags = (unsigned int)de_getu16le_p(&pos);
	de_dbg(c, "flags: 0x%08x", flags);
	de_dbg_indent(c, 1);
	de_dbg(c, "stream number: %u", (unsigned int)(flags&0x7f));
	de_dbg_indent(c, -1);

	pos += 4; // reserved

	if(tsdlen) {
		de_dbg(c, "[%d bytes of type-specific data at %"I64_FMT"]", (int)tsdlen, pos);
		de_dbg_indent(c, 1);
		de_dbg_hexdump(c, c->infile, pos, tsdlen, 256, NULL, 0x1);
		de_dbg_indent(c, -1);
		pos += tsdlen;
	}
	if(ecdlen) {
		de_dbg(c, "[%d bytes of error correction data at %"I64_FMT"]", (int)ecdlen, pos);
		de_dbg_indent(c, 1);
		de_dbg_hexdump(c, c->infile, pos, ecdlen, 256, NULL, 0x1);
		de_dbg_indent(c, -1);
		pos += ecdlen;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x36, 0x18(%rax)
jge 0x23303
jmp 0x235cb
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x50(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0xa0(%rbp), %rcx
movl $0x32, %r8d
callq 0x22de0
movq -0x8(%rbp), %rax
movq %rax, -0x150(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0x148(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x248e0
movq -0x150(%rbp), %rdi
movq -0x148(%rbp), %rdx
movq %rax, %rcx
leaq 0x17b20e(%rip), %rsi    # 0x19e56d
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x60(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0xe0(%rbp), %rcx
movl $0x32, %r8d
callq 0x22de0
movq -0x8(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x248e0
movq -0x140(%rbp), %rdi
movq -0x138(%rbp), %rdx
movq %rax, %rcx
leaq 0x17b1b6(%rip), %rsi    # 0x19e584
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x1657e0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x120(%rbp), %rsi
movl $0x40, %edx
callq 0x24890
movq -0x130(%rbp), %rdi
movq -0x128(%rbp), %rdx
movq %rax, %rcx
leaq 0x17b16c(%rip), %rsi    # 0x19e5a5
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165580
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x165580
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1652c0
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %edx
leaq 0x18ebe6(%rip), %rsi    # 0x1b207e
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %edx
andl $0x7f, %edx
leaq 0x17b0fd(%rip), %rsi    # 0x19e5bb
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x23555
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %edx
movq -0x20(%rbp), %rcx
leaq 0x17b0d2(%rip), %rsi    # 0x19e5cd
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %rcx
movl $0x100, %r8d            # imm = 0x100
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, (%rsp)
callq 0x15b840
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x30(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x235cb
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
movq -0x20(%rbp), %rcx
leaq 0x17b084(%rip), %rsi    # 0x19e5f5
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x20(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl $0x100, %r8d            # imm = 0x100
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, (%rsp)
callq 0x15b840
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x38(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopw %cs:(%rax,%rax)