	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fifo_thread_attempt_recovery
_fifo_thread_attempt_recovery:          ## @fifo_thread_attempt_recovery
	.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, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	32(%rdi), %r15
	movq	8(%r15), %r12
	movq	%r12, %rdi
	movl	%edx, %esi
	callq	_is_recoverable
	testq	%rax, %rax
	je	LBB0_24
## %bb.1:
	cmpq	$0, 24(%r13)
	je	LBB0_3
## %bb.2:
	movq	%r13, %rdi
	callq	_fifo_thread_write_trailer
	movl	%eax, 40(%r12)
	movq	$0, 24(%r13)
LBB0_3:
	cmpq	$0, 16(%r13)
	movq	32(%r12), %rax
	je	LBB0_4
## %bb.7:
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	(%r13), %rax
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	(%r15), %rcx
	movq	(%r14), %rdx
	movq	8(%r14), %rdi
	movq	(%rcx,%rdx,8), %rcx
	movl	(%rcx), %esi
	subq	%rax, %rdi
	movq	_AV_TIME_BASE_Q@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_av_rescale_q
	cmpq	(%r12), %rax
	jl	LBB0_26
	jmp	LBB0_13
LBB0_4:
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_6:
	movq	%rax, (%r13)
	movl	$1, %ecx
	jmp	LBB0_14
LBB0_11:
	xorl	%eax, %eax
	callq	_av_gettime_relative
	subq	(%r13), %rax
	cmpq	(%r12), %rax
	jge	LBB0_13
LBB0_26:
	movq	_EAGAIN@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_10:
	movq	(%r12), %rax
	cmpq	(%r12), %rax
	jl	LBB0_26
LBB0_13:
	movq	16(%r13), %rcx
	incq	%rcx
LBB0_14:
	movq	%rcx, 16(%r13)
	movq	24(%r12), %r8
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testq	%r8, %r8
	je	LBB0_16
## %bb.15:
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	cmpq	$0, 16(%r12)
	jne	LBB0_18
	jmp	LBB0_20
LBB0_16:
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	cmpq	$0, 16(%r12)
	je	LBB0_20
LBB0_18:
	cmpq	$0, 8(%r12)
	je	LBB0_20
## %bb.19:
	movl	$1, 8(%r13)
LBB0_20:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_fifo_thread_dispatch_message
	testl	%eax, %eax
	js	LBB0_21
## %bb.23:
	movq	_AV_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	$0, 16(%r13)
	jmp	LBB0_25
LBB0_21:
	movl	%eax, %ebx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_is_recoverable
	testq	%rax, %rax
	je	LBB0_24
## %bb.22:
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fifo_thread_process_recovery_failure ## TAILCALL
LBB0_24:
	movq	%r14, %rdi
	callq	_free_message
LBB0_25:
	movl	%ebx, %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	_AV_TIME_BASE_Q,4,2             ## @AV_TIME_BASE_Q
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_AV_LOG_VERBOSE,4,2             ## @AV_LOG_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Recovery attempt #%d/%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Recovery attempt #%d\n"

	.comm	_AV_LOG_INFO,4,2                ## @AV_LOG_INFO
L_.str.2:                               ## @.str.2
	.asciz	"Recovery successful\n"

	.no_dead_strip	_fifo_thread_attempt_recovery
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fifo_thread_attempt_recovery
_fifo_thread_attempt_recovery:          ; @fifo_thread_attempt_recovery
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x23, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #32]
	ldr	x22, [x21, #8]
	mov	x0, x22
	mov	x1, x2
	bl	_is_recoverable
	cbz	x0, LBB0_23
; %bb.1:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_fifo_thread_write_trailer
	str	w0, [x22, #40]
	str	xzr, [x19, #24]
LBB0_3:
	ldr	x9, [x19, #16]
	ldr	x8, [x22, #32]
	cbz	x9, LBB0_7
; %bb.4:
	cbz	x8, LBB0_8
; %bb.5:
	ldr	x8, [x19]
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_9
; %bb.6:
	ldr	x9, [x21]
	ldp	x10, x11, [x20]
	ldr	x9, [x9, x10, lsl #3]
	ldr	w1, [x9]
	sub	x0, x11, x8
Lloh3:
	adrp	x8, _AV_TIME_BASE_Q@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_TIME_BASE_Q@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_av_rescale_q
	b	LBB0_10
LBB0_7:
Lloh6:
	adrp	x9, _AV_NOPTS_VALUE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, #0
	csel	x8, xzr, x9, eq
	str	x8, [x19]
	mov	w8, #1
	b	LBB0_13
LBB0_8:
	bl	_av_gettime_relative
	ldr	x8, [x19]
	sub	x0, x0, x8
	b	LBB0_10
LBB0_9:
	ldr	x0, [x22]
LBB0_10:
	ldr	x8, [x22]
	cmp	x0, x8
	b.ge	LBB0_12
; %bb.11:
Lloh9:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_AVERROR
LBB0_12:
	ldr	x8, [x19, #16]
	add	x8, x8, #1
LBB0_13:
	str	x8, [x19, #16]
	ldr	x9, [x22, #24]
Lloh12:
	adrp	x10, _AV_LOG_VERBOSE@GOTPAGE
Lloh13:
	ldr	x10, [x10, _AV_LOG_VERBOSE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x10]
	cbz	x9, LBB0_15
; %bb.14:
	stp	x8, x9, [sp]
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_16
LBB0_15:
	str	x8, [sp]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_16:
	mov	x0, x21
	bl	_av_log
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_19
; %bb.17:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_19
; %bb.18:
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_19:
	mov	x0, x19
	mov	x1, x20
	bl	_fifo_thread_dispatch_message
	tbnz	w0, #31, LBB0_21
; %bb.20:
Lloh19:
	adrp	x8, _AV_LOG_INFO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AV_LOG_INFO@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x2, l_.str.2@PAGE
Lloh23:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_av_log
	mov	w23, #0
	str	xzr, [x19, #16]
	b	LBB0_24
LBB0_21:
	mov	x23, x0
	mov	x0, x22
	mov	x1, x23
	bl	_is_recoverable
	cbz	x0, LBB0_23
; %bb.22:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_fifo_thread_process_recovery_failure
LBB0_23:
	mov	x0, x20
	bl	_free_message
LBB0_24:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_AV_TIME_BASE_Q,4,2             ; @AV_TIME_BASE_Q
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_AV_LOG_VERBOSE,4,2             ; @AV_LOG_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Recovery attempt #%d/%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Recovery attempt #%d\n"

	.comm	_AV_LOG_INFO,4,2                ; @AV_LOG_INFO
l_.str.2:                               ; @.str.2
	.asciz	"Recovery successful\n"

	.no_dead_strip	_fifo_thread_attempt_recovery
.subsections_via_symbols
