// File: /workspace/github_c_makefile_star2_O1/hcmiya[P]opuscomment/src/read.c
// Function: parse_info
bool parse_info(ogg_page *og) {
	static int osidx = 0;
	if (!ogg_page_bos(og) || ogg_page_eos(og)) {
		if (ogg_page_pageno(og) == 0) {
			opuserror(err_opus_bad_stream);
		}
		opuserror(err_opus_no_target_codec);
	}
	if (ogg_page_pageno(og) != 0) {
		// BOSがあるのにページが0でない
		opuserror(err_opus_bad_stream);
	}
	if (ogg_page_granulepos(og) != 0) {
		// ヘッダのgranuleposは必ず0
		opuserror(err_opus_bad_stream);
	}
	check_header_is_single_page(og);
	
	if (og->body_len < codec->headmagic_len || memcmp(og->body, codec->headmagic, codec->headmagic_len) != 0) {
// 		have_multi_streams = true;
		return false;
	}
	osidx++;
	if (O.target_idx && O.target_idx != osidx) {
// 		have_multi_streams = true;
		return false;
	}
	opus_sno = ogg_page_serialno(og);
	header_packet_len = og->header_len + og->body_len;
	header_packet_pos = seeked_len - header_packet_len;
	built_header_pos = ftell(built_stream);
	codec->parse(og);
	if (O.edit != EDIT_LIST && codec->type != CODEC_FLAC) {
		write_page(og, built_stream);
	}
	opus_idx++;
	opst = PAGE_INFO_BORDER;
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2040
testl %eax, %eax
je 0x47cf
movq %rbx, %rdi
callq 0x24a0
testl %eax, %eax
je 0x47f4
movq %rbx, %rdi
callq 0x2080
testq %rax, %rax
jne 0x47e8
movl $0x5, %edi
xorl %eax, %eax
callq 0x6e10
movl $0x4, %edi
xorl %eax, %eax
callq 0x6e10
movq %rbx, %rdi
callq 0x2080
testq %rax, %rax
je 0x480d
movl $0x5, %edi
xorl %eax, %eax
callq 0x6e10
movq %rbx, %rdi
callq 0x22b0
testq %rax, %rax
je 0x4826
movl $0x5, %edi
xorl %eax, %eax
callq 0x6e10
movq (%rbx), %rax
movzbl 0x1a(%rax), %r14d
testq %r14, %r14
jne 0x483f
movl $0x3, %edi
xorl %eax, %eax
callq 0x6e10
movq (%rbx), %r12
leaq 0x1b(%r12), %r15
cmpb $0x2, %r14b
jb 0x4876
leaq -0x1(%r14), %r13
xorl %ebp, %ebp
cmpb $-0x1, (%r15,%rbp)
je 0x4866
movl $0x3, %edi
xorl %eax, %eax
callq 0x6e10
incq %rbp
cmpq %rbp, %r13
jne 0x4853
leaq (%r12,%r14), %r15
addq $0x1a, %r15
cmpb $-0x1, (%r15)
jne 0x4888
movl $0x3, %edi
xorl %eax, %eax
callq 0x6e10
leaq 0x17de1(%rip), %r14     # 0x1c670
movq (%r14), %rax
movq 0x18(%rax), %rdx
cmpq %rdx, 0x18(%rbx)
jb 0x4967
movq 0x10(%rbx), %rdi
movq 0x20(%rax), %rsi
callq 0x2300
testl %eax, %eax
jne 0x4967
movl 0x7d2d(%rip), %eax      # 0xc5e8
incl %eax
movl %eax, 0x7d25(%rip)      # 0xc5e8
leaq 0x17dbe(%rip), %r15     # 0x1c688
movl 0x24(%r15), %ecx
testl %ecx, %ecx
sete %dl
cmpl %eax, %ecx
sete %al
orb %dl, %al
cmpb $0x1, %al
jne 0x4967
movq %rbx, %rdi
callq 0x2420
leaq 0x17de3(%rip), %rcx     # 0x1c6d4
movl %eax, (%rcx)
movq 0x18(%rbx), %rax
addq 0x8(%rbx), %rax
movq %rax, 0x7cee(%rip)      # 0xc5f0
movq 0x7cef(%rip), %rcx      # 0xc5f8
subq %rax, %rcx
movq %rcx, 0x7ced(%rip)      # 0xc600
leaq 0x17dc6(%rip), %r12     # 0x1c6e0
movq (%r12), %rdi
callq 0x2280
movq %rax, 0x7cde(%rip)      # 0xc608
movq (%r14), %rax
movq %rbx, %rdi
callq *0x28(%rax)
cmpl $0x1, (%r15)
je 0x494d
movq (%r14), %rax
cmpl $0x2, (%rax)
je 0x494d
movq (%r12), %rsi
movq %rbx, %rdi
callq 0x5b3b
leaq 0x17d7c(%rip), %rax     # 0x1c6d0
incl (%rax)
leaq 0x17d6f(%rip), %rax     # 0x1c6cc
movl $0x1, (%rax)
movb $0x1, %al
jmp 0x4969
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq