	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ogg_write_header
_ogg_write_header:                      ## @ogg_write_header
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rsi
	movq	(%rsi), %r13
	movq	8(%r13), %rax
	movq	16(%r13), %rcx
	movl	(%rcx), %edx
	movl	(%rax), %ecx
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_ogg_buffer_data
	orb	$2, (%r13)
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_ogg_buffer_page
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_1
## %bb.2:
	testl	%eax, %eax
	jle	LBB0_9
## %bb.3:
	xorl	%r12d, %r12d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_ogg_buffer_page
	incq	%r12
	movslq	(%r14), %rax
	cmpq	%rax, %r12
	jge	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%r12,8), %r15
	movq	(%r15), %r13
	movq	8(%r13), %rax
	movl	4(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r13), %rax
	movl	4(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_ogg_buffer_data
	movq	8(%r13), %rax
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	8(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r13), %rax
	movl	8(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_ogg_buffer_data
	jmp	LBB0_8
LBB0_9:
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r13)
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_ogg_write_pages
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NOPTS_VALUE,4,2             ## @AV_NOPTS_VALUE
	.no_dead_strip	_ogg_write_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ogg_write_header
_ogg_write_header:                      ; @ogg_write_header
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	mov	x21, #0
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x1, [x8, x21, lsl #3]
	ldr	x20, [x1]
	ldp	x9, x8, [x20, #8]
	ldr	w2, [x8]
	ldr	w3, [x9]
	mov	x0, x19
	mov	w4, #0
	mov	w5, #1
	bl	_ogg_buffer_data
	ldr	w8, [x20]
	orr	w8, w8, #0x2
	str	w8, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_ogg_buffer_page
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.lt	LBB0_1
; %bb.2:
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.3:
	mov	x22, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_ogg_buffer_page
	add	x22, x22, #1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.ge	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x21, [x8, x22, lsl #3]
	ldr	x20, [x21]
	ldr	x8, [x20, #8]
	ldr	w3, [x8, #4]
	cbz	w3, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20, #16]
	ldr	w2, [x8, #4]
	mov	x0, x19
	mov	x1, x21
	mov	w4, #0
	mov	w5, #1
	bl	_ogg_buffer_data
	ldr	x8, [x20, #8]
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w3, [x8, #8]
	cbz	w3, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20, #16]
	ldr	w2, [x8, #8]
	mov	x0, x19
	mov	x1, x21
	mov	w4, #0
	mov	w5, #1
	bl	_ogg_buffer_data
	b	LBB0_4
LBB0_9:
Lloh0:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x20, #4]
	mov	x0, x19
	mov	w1, #2
	bl	_ogg_write_pages
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,4,2             ; @AV_NOPTS_VALUE
	.no_dead_strip	_ogg_write_header
.subsections_via_symbols
