	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_thread_finish_setup         ## -- Begin function ff_thread_finish_setup
	.p2align	4, 0x90
_ff_thread_finish_setup:                ## @ff_thread_finish_setup
	.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	_FF_THREAD_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_9
## %bb.1:
	movq	%rdi, %r14
	movq	16(%rdi), %rax
	movq	(%rax), %rbx
	movq	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	cmpl	$0, (%rbx)
	jne	LBB0_4
## %bb.3:
	movq	24(%rbx), %rdi
	callq	_pthread_mutex_lock
	movl	$1, (%rbx)
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_6
LBB0_4:
	movq	_HWACCEL_CAP_ASYNC_SAFE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_6
## %bb.5:
	movl	$1, 4(%rbx)
	movq	24(%rbx), %rdi
	callq	_async_lock
LBB0_6:
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_pthread_mutex_lock
	leaq	16(%rbx), %r12
	movq	%r12, %rdi
	callq	_atomic_load
	movq	_STATE_SETUP_FINISHED@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	cmpq	%rsi, %rax
	jne	LBB0_8
## %bb.7:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movq	(%r13), %rsi
LBB0_8:
	movq	%r12, %rdi
	callq	_atomic_store
	addq	$12, %rbx
	movq	%rbx, %rdi
	callq	_pthread_cond_broadcast
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pthread_mutex_unlock           ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FF_THREAD_FRAME,4,2            ## @FF_THREAD_FRAME
	.comm	_HWACCEL_CAP_ASYNC_SAFE,4,2     ## @HWACCEL_CAP_ASYNC_SAFE
	.comm	_STATE_SETUP_FINISHED,8,3       ## @STATE_SETUP_FINISHED
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Multiple ff_thread_finish_setup() calls\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_thread_finish_setup         ; -- Begin function ff_thread_finish_setup
	.p2align	2
_ff_thread_finish_setup:                ; @ff_thread_finish_setup
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _FF_THREAD_FRAME@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FF_THREAD_FRAME@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.1:
	mov	x19, x0
	ldp	x8, x9, [x0, #8]
	ldr	x22, [x9]
	cbz	x8, LBB0_6
; %bb.2:
	ldr	w9, [x22]
	cbnz	w9, LBB0_4
; %bb.3:
	ldr	x0, [x22, #24]
	bl	_pthread_mutex_lock
	mov	w8, #1
	str	w8, [x22]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
LBB0_4:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _HWACCEL_CAP_ASYNC_SAFE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HWACCEL_CAP_ASYNC_SAFE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.5:
	mov	w8, #1
	str	w8, [x22, #4]
	ldr	x0, [x22, #24]
	bl	_async_lock
LBB0_6:
	add	x20, x22, #8
	mov	x0, x20
	bl	_pthread_mutex_lock
	add	x21, x22, #16
	mov	x0, x21
	bl	_atomic_load
Lloh6:
	adrp	x23, _STATE_SETUP_FINISHED@GOTPAGE
Lloh7:
	ldr	x23, [x23, _STATE_SETUP_FINISHED@GOTPAGEOFF]
	ldr	x1, [x23]
	cmp	x0, x1
	b.ne	LBB0_8
; %bb.7:
Lloh8:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	ldr	x1, [x23]
LBB0_8:
	mov	x0, x21
	bl	_atomic_store
	add	x0, x22, #12
	bl	_pthread_cond_broadcast
	mov	x0, x20
	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	_pthread_mutex_unlock
LBB0_9:
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_FF_THREAD_FRAME,4,2            ; @FF_THREAD_FRAME
	.comm	_HWACCEL_CAP_ASYNC_SAFE,4,2     ; @HWACCEL_CAP_ASYNC_SAFE
	.comm	_STATE_SETUP_FINISHED,8,3       ; @STATE_SETUP_FINISHED
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Multiple ff_thread_finish_setup() calls\n"

.subsections_via_symbols
