	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_buffer_pool_get             ## -- Begin function av_buffer_pool_get
	.p2align	4, 0x90
_av_buffer_pool_get:                    ## @av_buffer_pool_get
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	4(%rdi), %r15
	movq	%r15, %rdi
	callq	_ff_mutex_lock
	movq	8(%r12), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movl	8(%rbx), %edi
	movl	16(%r12), %esi
	movq	_pool_release_buffer@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rcx
	xorl	%r8d, %r8d
	callq	_av_buffer_create
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %r14
	movq	(%rbx), %rax
	movq	%rax, 8(%r12)
	movq	$0, (%rbx)
	movq	%r15, %rdi
	callq	_ff_mutex_unlock
	jmp	LBB0_4
LBB0_3:
	movq	%r12, %rdi
	callq	_pool_alloc_buffer
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_ff_mutex_unlock
	testq	%r14, %r14
	je	LBB0_6
LBB0_4:
	movq	_memory_order_relaxed@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_atomic_fetch_add_explicit
	jmp	LBB0_7
LBB0_5:
	movq	%r15, %rdi
	callq	_ff_mutex_unlock
LBB0_6:
	xorl	%r14d, %r14d
LBB0_7:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pool_release_buffer,4,2        ## @pool_release_buffer
	.comm	_memory_order_relaxed,4,2       ## @memory_order_relaxed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_buffer_pool_get             ; -- Begin function av_buffer_pool_get
	.p2align	2
_av_buffer_pool_get:                    ; @av_buffer_pool_get
	.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
	add	x20, x0, #4
	mov	x0, x20
	bl	_ff_mutex_lock
	ldr	x22, [x19, #8]
	cbz	x22, LBB0_3
; %bb.1:
	ldr	w0, [x22, #8]
	ldr	w1, [x19, #16]
Lloh0:
	adrp	x8, _pool_release_buffer@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pool_release_buffer@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x3, x22
	mov	w4, #0
	bl	_av_buffer_create
	mov	x21, x0
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x8, [x22]
	str	x8, [x19, #8]
	str	xzr, [x22]
	mov	x0, x20
	bl	_ff_mutex_unlock
	b	LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_pool_alloc_buffer
	mov	x21, x0
	mov	x0, x20
	bl	_ff_mutex_unlock
	cbz	x21, LBB0_6
LBB0_4:
Lloh3:
	adrp	x8, _memory_order_relaxed@GOTPAGE
Lloh4:
	ldr	x8, [x8, _memory_order_relaxed@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #1
	bl	_atomic_fetch_add_explicit
	b	LBB0_6
LBB0_5:
	mov	x0, x20
	bl	_ff_mutex_unlock
LBB0_6:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_pool_release_buffer,4,2        ; @pool_release_buffer
	.comm	_memory_order_relaxed,4,2       ; @memory_order_relaxed
.subsections_via_symbols
