	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_audio_fifo_write            ## -- Begin function av_audio_fifo_write
	.p2align	4, 0x90
_av_audio_fifo_write:                   ## @av_audio_fifo_write
	.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
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_av_audio_fifo_space
	cmpl	%r14d, %eax
	jge	LBB0_4
## %bb.1:
	movq	%r12, %rdi
	callq	_av_audio_fifo_size
	movq	_INT_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	subl	%eax, %edx
	cmpl	%r14d, %edx
	jge	LBB0_2
## %bb.11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_2:
	addl	%r14d, %eax
	addl	%eax, %eax
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_av_audio_fifo_realloc
	testl	%eax, %eax
	js	LBB0_3
LBB0_4:
	cmpl	$0, 4(%r12)
	jle	LBB0_9
## %bb.5:
	movl	(%r12), %r13d
	imull	%r14d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	movq	(%r15,%rbx,8), %rsi
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	callq	_av_fifo_generic_write
	cmpl	%r13d, %eax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movslq	4(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_9:
	addl	%r14d, 8(%r12)
	jmp	LBB0_10
LBB0_8:
	movq	_AVERROR_BUG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_10
LBB0_3:
	movl	%eax, %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AVERROR_BUG,4,2                ## @AVERROR_BUG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_audio_fifo_write            ; -- Begin function av_audio_fifo_write
	.p2align	2
_av_audio_fifo_write:                   ; @av_audio_fifo_write
	.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, x2
	mov	x21, x1
	mov	x20, x0
	bl	_av_audio_fifo_space
	cmp	w0, w19
	b.ge	LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_av_audio_fifo_size
Lloh0:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	sub	w8, w8, w0
	cmp	w8, w19
	b.ge	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	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_3:
	add	w8, w0, w19
	lsl	w1, w8, #1
	mov	x0, x20
	bl	_av_audio_fifo_realloc
	tbnz	w0, #31, LBB0_10
LBB0_4:
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x23, #0
	ldr	w8, [x20]
	mul	w22, w8, w19
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	ldr	w0, [x8, x23, lsl #2]
	ldr	x1, [x21, x23, lsl #3]
	mov	x2, x22
	mov	x3, #0
	bl	_av_fifo_generic_write
	cmp	w0, w22
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x20, #4]
	cmp	x23, x8
	b.lt	LBB0_6
LBB0_8:
	ldr	w8, [x20, #8]
	add	w8, w8, w19
	str	w8, [x20, #8]
	b	LBB0_11
LBB0_9:
Lloh6:
	adrp	x8, _AVERROR_BUG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVERROR_BUG@GOTPAGEOFF]
Lloh8:
	ldr	w19, [x8]
	b	LBB0_11
LBB0_10:
	mov	x19, x0
LBB0_11:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AVERROR_BUG,4,2                ; @AVERROR_BUG
.subsections_via_symbols
