	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function async_buffer_task
_async_buffer_task:                     ## @async_buffer_task
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	(%rdi), %rbx
	xorl	%eax, %eax
	callq	_av_gettime_relative
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	20(%rbx), %r14
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	movq	%r12, %rdi
	callq	_async_check_interrupt
	testq	%rax, %rax
	je	LBB0_1
LBB0_18:
	movl	$1, (%rbx)
	movq	_AVERROR_EXIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	addq	$24, %rbx
	movq	%rbx, %rdi
	callq	_pthread_cond_signal
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	60(%rbx), %r13
	leaq	24(%rbx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	28(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r15d, %r15d
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, (%rbx)
	movl	%eax, %ecx
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, 4(%rbx)
	movl	$1, 8(%rbx)
	movq	%rax, 40(%rbx)
	movq	$0, 32(%rbx)
	movq	%r13, %rdi
	callq	_ring_reset
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_pthread_cond_signal
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	movq	%r12, %rdi
	callq	_async_check_interrupt
	testq	%rax, %rax
	jne	LBB0_18
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 32(%rbx)
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	56(%rbx), %edi
	movl	48(%rbx), %edx
	movl	52(%rbx), %esi
	callq	_ffurl_seek
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, (%rbx)
	xorl	%ecx, %ecx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_ring_space
	cmpl	$0, (%rbx)
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r13d
	testl	%eax, %eax
	jle	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	movl	$4096, %edi                     ## imm = 0x1000
	movl	%r13d, %esi
	callq	_FFMIN
	movq	_wrapped_url_read@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_ring_generic_write
	testl	%eax, %eax
	jle	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %eax
	addq	%rax, %r15
	movl	12(%rbx), %esi
	movl	$1048576, %edi                  ## imm = 0x100000
	callq	_FFMIN
	cmpq	%rax, %r15
	jle	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_av_gettime_relative
	movq	%rax, %r13
	movq	%rax, %rcx
	subq	-72(%rbp), %rcx                 ## 8-byte Folded Reload
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%r15, %rdx
	callq	_call_inject_async_fill_speed
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	xorl	%r15d, %r15d
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	jmp	LBB0_16
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_pthread_cond_signal
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_pthread_cond_wait
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	movl	$1, (%rbx)
	movl	16(%rbx), %eax
	testl	%eax, %eax
	jns	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, 4(%rbx)
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_pthread_cond_signal
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	movq	%r12, %rdi
	callq	_call_inject_statistic
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_EXIT,4,2               ## @AVERROR_EXIT
	.comm	_wrapped_url_read,8,3           ## @wrapped_url_read
	.no_dead_strip	_async_buffer_task
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function async_buffer_task
_async_buffer_task:                     ; @async_buffer_task
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	ldr	x28, [x0]
	bl	_av_gettime_relative
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	add	x19, x28, #20
	mov	x0, x19
	bl	_pthread_mutex_lock
	mov	x0, x20
	bl	_async_check_interrupt
	cbz	x0, LBB0_2
LBB0_1:
	mov	w8, #1
	str	w8, [x28]
Lloh0:
	adrp	x8, _AVERROR_EXIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EXIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x28, #4]
	add	x0, x28, #24
	bl	_pthread_cond_signal
	mov	x0, x19
	bl	_pthread_mutex_unlock
	mov	x0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_2:
	mov	x24, #0
	add	x22, x28, #60
	add	x23, x28, #24
	add	x25, x28, #28
	mov	w21, #1
	mov	w26, #1
	b	LBB0_7
LBB0_3:                                 ;   in Loop: Header=BB0_7 Depth=1
	str	w21, [x28]
	mov	x8, x0
LBB0_4:                                 ;   in Loop: Header=BB0_7 Depth=1
	stp	w8, w21, [x28, #4]
	stp	xzr, x0, [x28, #32]
	mov	x0, x22
	bl	_ring_reset
	mov	x0, x23
	bl	_pthread_cond_signal
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_pthread_mutex_unlock
	mov	w26, #0
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_pthread_mutex_lock
	mov	x0, x20
	bl	_async_check_interrupt
	cbnz	x0, LBB0_1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x28, #32]
	cbz	x8, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldp	w1, w0, [x28, #52]
	ldr	w2, [x28, #48]
	bl	_ffurl_seek
	tbnz	x0, #63, LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w8, #0
	str	wzr, [x28]
	b	LBB0_4
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x22
	bl	_ring_space
	ldr	w8, [x28]
	cmp	w8, #0
	ccmp	w0, #0, #4, eq
	b.gt	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	bl	_pthread_cond_signal
	mov	x0, x25
	mov	x1, x19
	bl	_pthread_cond_wait
	b	LBB0_5
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x27, x0
	mov	x0, x19
	bl	_pthread_mutex_unlock
	mov	w0, #4096
	mov	x1, x27
	bl	_FFMIN
	mov	x2, x0
Lloh3:
	adrp	x8, _wrapped_url_read@GOTPAGE
Lloh4:
	ldr	x8, [x8, _wrapped_url_read@GOTPAGEOFF]
Lloh5:
	ldr	x3, [x8]
	mov	x0, x22
	mov	x1, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_ring_generic_write
	cmp	w0, #1
	b.lt	LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x24, x24, w0, uxtw
	ldr	w1, [x28, #12]
	mov	w0, #1048576
	bl	_FFMIN
	cmp	x24, x0
	b.le	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
	bl	_av_gettime_relative
	mov	x27, x0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	sub	x3, x0, x8
	mov	x0, x20
	mov	x1, x26
	mov	x2, x24
	bl	_call_inject_async_fill_speed
	mov	x24, #0
	mov	w26, #1
	str	x27, [sp, #8]                   ; 8-byte Folded Spill
LBB0_15:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_pthread_mutex_lock
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_pthread_mutex_lock
	str	w21, [x28]
	ldr	w8, [x28, #16]
	tbz	w8, #31, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=1
	str	w8, [x28, #4]
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	bl	_pthread_cond_signal
	mov	x0, x19
	bl	_pthread_mutex_unlock
	mov	x0, x20
	bl	_call_inject_statistic
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EXIT,4,2               ; @AVERROR_EXIT
	.comm	_wrapped_url_read,8,3           ; @wrapped_url_read
	.no_dead_strip	_async_buffer_task
.subsections_via_symbols
