// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ogg.c
// Function: do_theora_id_header
static void do_theora_id_header(deark *c, lctx *d, struct page_info *pgi, struct stream_info *si)
{
	i64 pos = pgi->dpos;
	u8 vmaj, vmin, vrev;
	i64 x1, x2;
	unsigned int u1, u2;

	pos += 7; // Skip signature
	vmaj = de_getbyte_p(&pos);
	vmin = de_getbyte_p(&pos);
	vrev = de_getbyte_p(&pos);
	de_dbg(c, "version: %u.%u.%u", (unsigned int)vmaj, (unsigned int)vmin,
		(unsigned int)vrev);
	x1 = de_getu16be_p(&pos);
	x2 = de_getu16be_p(&pos);
	de_dbg(c, "frame dimensions: %d"DE_CHAR_TIMES"%d macroblocks", (int)x1, (int)x2);

	u1 = getu24be_p(c->infile, &pos);
	u2 = getu24be_p(c->infile, &pos);
	de_dbg(c, "picture dimensions: %u"DE_CHAR_TIMES"%u pixels", u1, u2);

	u1 = (unsigned int)de_getbyte_p(&pos);
	u2 = (unsigned int)de_getbyte_p(&pos);
	de_dbg(c, "picture region offset: %u,%u pixels", u1, u2);

	u1 = (unsigned int)de_getu32be_p(&pos);
	u2 = (unsigned int)de_getu32be_p(&pos);
	de_dbg(c, "frame rate: %u/%u", u1, u2);

	u1 = getu24be_p(c->infile, &pos);
	u2 = getu24be_p(c->infile, &pos);
	de_dbg(c, "aspect ratio: %u/%u", u1, u2);

	u1 = (unsigned int)de_getbyte_p(&pos);
	de_dbg(c, "color space: %u", u1);

	u1 = getu24be_p(c->infile, &pos);
	de_dbg(c, "nominal bitrate: %u bits/sec", u1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x7, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165170
movb %al, -0x29(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165170
movb %al, -0x2a(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165170
movb %al, -0x2b(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x29(%rbp), %edx
movzbl -0x2a(%rbp), %ecx
movzbl -0x2b(%rbp), %r8d
leaq 0xe8ea6(%rip), %rsi     # 0x1b200a
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165210
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165210
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl %eax, %edx
movq -0x40(%rbp), %rax
movl %eax, %ecx
leaq 0xef72d(%rip), %rsi     # 0x1b88d9
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0xc9320
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0xc9320
movl %eax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %edx
movl -0x48(%rbp), %ecx
leaq 0xef712(%rip), %rsi     # 0x1b88fe
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165170
movzbl %al, %eax
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165170
movzbl %al, %eax
movl %eax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %edx
movl -0x48(%rbp), %ecx
leaq 0xef6ee(%rip), %rsi     # 0x1b8920
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1654b0
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1654b0
movl %eax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %edx
movl -0x48(%rbp), %ecx
leaq 0xef6d2(%rip), %rsi     # 0x1b8944
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0xc9320
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0xc9320
movl %eax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %edx
movl -0x48(%rbp), %ecx
leaq 0xef6a4(%rip), %rsi     # 0x1b8956
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x165170
movzbl %al, %eax
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %edx
leaq 0xef68c(%rip), %rsi     # 0x1b896a
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0xc9320
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %edx
leaq 0xef673(%rip), %rsi     # 0x1b897a
movb $0x0, %al
callq 0x15b0d0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)