	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ogg_write_page
_ogg_write_page:                        ## @ogg_write_page
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	(%rsi), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %r13
	leaq	-48(%rbp), %rdi
	callq	_avio_open_dyn_buf
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	-48(%rbp), %rdi
	movq	_ff_crc04C11DB7_update@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	callq	_ffio_init_checksum
	movq	-48(%rbp), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_ffio_wfourcc
	movq	-48(%rbp), %rdi
	xorl	%esi, %esi
	callq	_avio_w8
	movq	-48(%rbp), %rdi
	orl	8(%rbx), %r12d
	movl	%r12d, %esi
	callq	_avio_w8
	movq	-48(%rbp), %rdi
	movl	40(%rbx), %esi
	callq	_avio_wl64
	movq	-48(%rbp), %rdi
	movl	8(%r13), %esi
	callq	_avio_wl32
	movq	-48(%rbp), %rdi
	movl	4(%r13), %esi
	leal	1(%rsi), %eax
	movl	%eax, 4(%r13)
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_avio_wl32
	movq	-48(%rbp), %rdi
	callq	_avio_tell
	movl	%eax, %r12d
	movq	-48(%rbp), %rdi
	xorl	%esi, %esi
	callq	_avio_wl32
	movq	-48(%rbp), %rdi
	movl	12(%rbx), %esi
	callq	_avio_w8
	movq	-48(%rbp), %rdi
	movq	32(%rbx), %rsi
	movl	12(%rbx), %edx
	callq	_avio_write
	movq	-48(%rbp), %rdi
	movq	24(%rbx), %rsi
	movl	16(%rbx), %edx
	callq	_avio_write
	movq	-48(%rbp), %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_ogg_update_checksum
	movq	-48(%rbp), %rdi
	callq	_avio_flush
	movq	-48(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	callq	_avio_close_dyn_buf
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:
	movq	(%r14), %rdi
	movq	-56(%rbp), %rsi
	movl	%eax, %edx
	callq	_avio_write
	movq	(%r14), %rdi
	callq	_avio_flush
	movq	-56(%rbp), %rdi
	callq	_av_free
	decl	(%r13)
	jmp	LBB0_5
LBB0_4:
	movl	%eax, %r15d
LBB0_5:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_crc04C11DB7_update,4,2      ## @ff_crc04C11DB7_update
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OggS"

	.no_dead_strip	_ogg_write_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ogg_write_page
_ogg_write_page:                        ; @ogg_write_page
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x9, [x1]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x22, [x8]
	add	x0, sp, #8
	bl	_avio_open_dyn_buf
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	x0, [sp, #8]
Lloh0:
	adrp	x8, _ff_crc04C11DB7_update@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ff_crc04C11DB7_update@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_ffio_init_checksum
	ldr	x0, [sp, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ffio_wfourcc
	ldr	x0, [sp, #8]
	mov	w1, #0
	bl	_avio_w8
	ldr	x0, [sp, #8]
	ldr	w8, [x20, #8]
	orr	w1, w8, w21
	bl	_avio_w8
	ldr	x0, [sp, #8]
	ldr	w1, [x20, #40]
	bl	_avio_wl64
	ldr	x0, [sp, #8]
	ldr	w1, [x22, #8]
	bl	_avio_wl32
	ldr	x0, [sp, #8]
	ldr	w1, [x22, #4]
	add	w8, w1, #1
	str	w8, [x22, #4]
	bl	_avio_wl32
	ldr	x0, [sp, #8]
	bl	_avio_tell
	mov	x21, x0
	ldr	x0, [sp, #8]
	mov	w1, #0
	bl	_avio_wl32
	ldr	x0, [sp, #8]
	ldr	w1, [x20, #12]
	bl	_avio_w8
	ldr	x0, [sp, #8]
	ldr	x1, [x20, #32]
	ldr	w2, [x20, #12]
	bl	_avio_write
	ldr	x0, [sp, #8]
	ldr	x1, [x20, #24]
	ldr	w2, [x20, #16]
	bl	_avio_write
	ldr	x1, [sp, #8]
	mov	x0, x19
	mov	x2, x21
	bl	_ogg_update_checksum
	ldr	x0, [sp, #8]
	bl	_avio_flush
	ldr	x0, [sp, #8]
	mov	x1, sp
	bl	_avio_close_dyn_buf
	mov	x2, x0
	tbnz	w0, #31, LBB0_4
; %bb.2:
	ldr	x0, [x19]
	ldr	x1, [sp]
	bl	_avio_write
	ldr	x0, [x19]
	bl	_avio_flush
	ldr	x0, [sp]
	bl	_av_free
	mov	w2, #0
	ldr	w8, [x22]
	sub	w8, w8, #1
	str	w8, [x22]
	b	LBB0_4
LBB0_3:
	mov	x2, x0
LBB0_4:
	mov	x0, x2
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_crc04C11DB7_update,4,2      ; @ff_crc04C11DB7_update
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OggS"

	.no_dead_strip	_ogg_write_page
.subsections_via_symbols
