	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function audio_write_packet
_audio_write_packet:                    ## @audio_write_packet
	.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, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r13
	movl	(%rsi), %eax
	cltd
	idivl	(%r13)
	movl	%eax, %r15d
	movq	8(%rsi), %rax
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	8(%r13), %rax
LBB0_2:
	movq	24(%rsi), %r12
	movl	16(%rsi), %ecx
	testl	%ecx, %ecx
	cmovel	%r15d, %ecx
	movslq	%ecx, %rcx
	addq	%rax, %rcx
	movq	%rcx, 8(%r13)
	movq	32(%r13), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.3:
	cmpl	16(%r13), %r15d
	jle	LBB0_6
## %bb.4:
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_ff_alsa_extend_reorder_buf
	testq	%rax, %rax
	je	LBB0_5
## %bb.15:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_5:
	movq	32(%r13), %rcx
LBB0_6:
	movq	24(%r13), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	*%rcx
	movq	24(%r13), %r12
LBB0_7:
	movq	_EAGAIN@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	20(%r13), %edi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_snd_pcm_writei
	testl	%eax, %eax
	jns	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, %ebx
	movl	(%r14), %edi
	addl	%edi, %eax
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_ff_alsa_xrun_recover
	testq	%rax, %rax
	jns	LBB0_8
## %bb.11:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%ebx, %edi
	callq	_snd_strerror
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movl	%eax, %ecx
	callq	_av_log
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %edi
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_14:
	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,8,3             ## @AV_NOPTS_VALUE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ALSA write error: %s\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_audio_write_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function audio_write_packet
_audio_write_packet:                    ; @audio_write_packet
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x20, [x0]
	ldr	w8, [x1]
	ldr	x22, [x1, #24]
	ldr	w9, [x20]
	sdiv	w21, w8, w9
	ldr	x8, [x1, #8]
Lloh0:
	adrp	x9, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x20, #8]
LBB0_2:
	ldr	w9, [x1, #16]
	cmp	w9, #0
	csel	w9, w21, w9, eq
	add	x8, x8, w9, sxtw
	str	x8, [x20, #8]
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_8
; %bb.3:
	ldr	w9, [x20, #16]
	cmp	w21, w9
	b.le	LBB0_7
; %bb.4:
	mov	x0, x20
	mov	x1, x21
	bl	_ff_alsa_extend_reorder_buf
	cbz	x0, LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_13
LBB0_6:
	ldr	x8, [x20, #32]
LBB0_7:
	ldr	x1, [x20, #24]
	mov	x0, x22
	mov	x2, x21
	blr	x8
	ldr	x22, [x20, #24]
LBB0_8:
Lloh5:
	adrp	x24, _EAGAIN@GOTPAGE
Lloh6:
	ldr	x24, [x24, _EAGAIN@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #20]
	mov	x1, x22
	mov	x2, x21
	bl	_snd_pcm_writei
	tbz	w0, #31, LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x23, x0
	ldr	w0, [x24]
	cmn	w23, w0
	b.eq	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_ff_alsa_xrun_recover
	tbz	x0, #63, LBB0_9
; %bb.12:
Lloh7:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w20, [x8]
	mov	x0, x23
	bl	_snd_strerror
	mov	x3, x0
Lloh10:
	adrp	x2, l_.str@PAGE
Lloh11:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_av_log
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
LBB0_14:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_15:
	mov	w0, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ALSA write error: %s\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_audio_write_packet
.subsections_via_symbols
