// File: /workspace/github_c_makefile_star2_O0/hcmiya[P]opuscomment/src/read.c
// Function: copy_tag_packet
static bool copy_tag_packet(ogg_page *og, bool *packet_break_in_page) {
	static unsigned int total = 0;
	
	int lace_num = og->header[26];
	if (!lace_num) return false;
	
	uint8_t const *bin = og->body;
	
	uint_fast8_t i;
	for (i = 0; i < lace_num - 1 && og->header[27 + i] == 255; i++, bin += 255, total += 255) {
		if (total > TAG_LENGTH_LIMIT__INPUT) {
			opuserror(err_opus_long_tag, TAG_LENGTH_LIMIT__INPUT >> 20);
		}
		write(retriever_fd, bin, 255);
	}
	total += og->header[27 + i];
	if (total > TAG_LENGTH_LIMIT__INPUT) {
		opuserror(err_opus_long_tag, TAG_LENGTH_LIMIT__INPUT >> 20);
	}
	write(retriever_fd, bin, og->header[27 + i]);
	i++;
	bool packet_term = false;
	if (i != lace_num || og->header[27 + i - 1] != 255) {
		packet_term = true;
		*packet_break_in_page = i != lace_num;
	}
	return packet_term;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzbl 0x1a(%rax), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x58ed
movb $0x0, -0x1(%rbp)
jmp 0x5a4d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movb $0x0, -0x29(%rbp)
movzbl -0x29(%rbp), %ecx
movl -0x1c(%rbp), %edx
subl $0x1, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x2b(%rbp)
jge 0x5930
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzbl -0x29(%rbp), %ecx
addl $0x1b, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0xff, %eax
sete %al
movb %al, -0x2b(%rbp)
movb -0x2b(%rbp), %al
testb $0x1, %al
jne 0x5939
jmp 0x5996
cmpl $0x7800000, 0x7d1d(%rip) # imm = 0x7800000
jbe 0x5956
movl $0x9, %edi
movl $0x78, %esi
movb $0x0, %al
callq 0x8690
movl 0x7cf4(%rip), %edi      # 0xd650
movq -0x28(%rbp), %rsi
movl $0xff, %edx
callq 0x2100
movb -0x29(%rbp), %al
addb $0x1, %al
movb %al, -0x29(%rbp)
movq -0x28(%rbp), %rax
addq $0xff, %rax
movq %rax, -0x28(%rbp)
movl 0x7cda(%rip), %eax      # 0xd660
addl $0xff, %eax
movl %eax, 0x7ccf(%rip)      # 0xd660
jmp 0x58fd
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzbl -0x29(%rbp), %ecx
addl $0x1b, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
addl 0x7caf(%rip), %eax      # 0xd660
movl %eax, 0x7ca9(%rip)      # 0xd660
cmpl $0x7800000, 0x7c9f(%rip) # imm = 0x7800000
jbe 0x59d4
movl $0x9, %edi
movl $0x78, %esi
movb $0x0, %al
callq 0x8690
movl 0x7c76(%rip), %edi      # 0xd650
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzbl -0x29(%rbp), %ecx
addl $0x1b, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %edx
callq 0x2100
movb -0x29(%rbp), %al
addb $0x1, %al
movb %al, -0x29(%rbp)
movb $0x0, -0x2a(%rbp)
movzbl -0x29(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jne 0x5a2e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzbl -0x29(%rbp), %ecx
addl $0x1b, %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0xff, %eax
je 0x5a45
movb $0x1, -0x2a(%rbp)
movzbl -0x29(%rbp), %eax
cmpl -0x1c(%rbp), %eax
setne %cl
movq -0x18(%rbp), %rax
andb $0x1, %cl
movb %cl, (%rax)
movb -0x2a(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)