	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stream_close
_stream_close:                          ## @stream_close
	.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	%rdi, %r14
	movq	(%rdi), %rbx
	movl	$1, (%rbx)
	leaq	104(%rbx), %r15
	movq	%r15, %rdi
	callq	_packet_queue_abort
	leaq	100(%rbx), %r12
	movq	%r12, %rdi
	callq	_packet_queue_abort
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%edi, %edi
	callq	_av_log
	movl	116(%rbx), %edi
	xorl	%esi, %esi
	callq	_SDL_WaitThread
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	js	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_stream_component_close
LBB0_2:
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	js	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_stream_component_close
LBB0_4:
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	js	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_stream_component_close
LBB0_6:
	leaq	112(%rbx), %rdi
	callq	_avformat_close_input
	movl	(%r13), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%edi, %edi
	callq	_av_log
	movl	108(%rbx), %edi
	xorl	%esi, %esi
	callq	_SDL_WaitThread
	movq	%r15, %rdi
	callq	_packet_queue_destroy
	movq	%r12, %rdi
	callq	_packet_queue_destroy
	leaq	96(%rbx), %rdi
	callq	_packet_queue_destroy
	leaq	92(%rbx), %rdi
	callq	_frame_queue_destory
	leaq	88(%rbx), %rdi
	callq	_frame_queue_destory
	leaq	84(%rbx), %rdi
	callq	_frame_queue_destory
	movl	80(%rbx), %edi
	callq	_SDL_DestroyCond
	movl	76(%rbx), %edi
	callq	_SDL_DestroyCond
	movl	72(%rbx), %edi
	callq	_SDL_DestroyCond
	movl	68(%rbx), %edi
	callq	_SDL_DestroyMutex
	movl	64(%rbx), %edi
	callq	_SDL_DestroyMutex
	movq	56(%rbx), %rdi
	callq	_sws_freeContext
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.7:
	leaq	8(%r14), %r15
	movq	16(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%rax, %rdi
	callq	_sws_freeContext
	movq	(%r15), %rdi
LBB0_9:
	cmpq	$0, 8(%rdi)
	je	LBB0_11
## %bb.10:
	addq	$8, %rdi
	callq	_avcodec_free_context
	movq	(%r15), %rdi
LBB0_11:
	callq	_av_freep
	movq	%r15, %rdi
	callq	_av_freep
LBB0_12:
	movq	32(%rbx), %rdi
	callq	_av_free
	movq	%rbx, %rdi
	callq	_av_free
	movq	$0, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wait for read_tid\n"

L_.str.1:                               ## @.str.1
	.asciz	"wait for video_refresh_tid\n"

	.no_dead_strip	_stream_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stream_close
_stream_close:                          ; @stream_close
	.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, x0
	ldr	x20, [x0]
	mov	w8, #1
	str	w8, [x20]
	add	x21, x20, #104
	mov	x0, x21
	bl	_packet_queue_abort
	add	x22, x20, #100
	mov	x0, x22
	bl	_packet_queue_abort
Lloh0:
	adrp	x23, _AV_LOG_DEBUG@GOTPAGE
Lloh1:
	ldr	x23, [x23, _AV_LOG_DEBUG@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, #0
	bl	_av_log
	ldr	w0, [x20, #116]
	mov	x1, #0
	bl	_SDL_WaitThread
	ldr	x1, [x20, #8]
	tbnz	x1, #63, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_stream_component_close
LBB0_2:
	ldr	x1, [x20, #16]
	tbnz	x1, #63, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_stream_component_close
LBB0_4:
	ldr	x1, [x20, #24]
	tbnz	x1, #63, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_stream_component_close
LBB0_6:
	add	x0, x20, #112
	bl	_avformat_close_input
	ldr	w1, [x23]
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, #0
	bl	_av_log
	ldr	w0, [x20, #108]
	mov	x1, #0
	bl	_SDL_WaitThread
	mov	x0, x21
	bl	_packet_queue_destroy
	mov	x0, x22
	bl	_packet_queue_destroy
	add	x0, x20, #96
	bl	_packet_queue_destroy
	add	x0, x20, #92
	bl	_frame_queue_destory
	add	x0, x20, #88
	bl	_frame_queue_destory
	add	x0, x20, #84
	bl	_frame_queue_destory
	ldr	w0, [x20, #80]
	bl	_SDL_DestroyCond
	ldr	w0, [x20, #76]
	bl	_SDL_DestroyCond
	ldr	w0, [x20, #72]
	bl	_SDL_DestroyCond
	ldr	w0, [x20, #68]
	bl	_SDL_DestroyMutex
	ldr	w0, [x20, #64]
	bl	_SDL_DestroyMutex
	ldr	x0, [x20, #56]
	bl	_sws_freeContext
	mov	x21, x19
	ldr	x0, [x21, #8]!
	cbz	x0, LBB0_12
; %bb.7:
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_9
; %bb.8:
	mov	x0, x8
	bl	_sws_freeContext
	ldr	x0, [x21]
LBB0_9:
	mov	x8, x0
	ldr	x9, [x8, #8]!
	cbz	x9, LBB0_11
; %bb.10:
	mov	x0, x8
	bl	_avcodec_free_context
	ldr	x0, [x21]
LBB0_11:
	bl	_av_freep
	mov	x0, x21
	bl	_av_freep
LBB0_12:
	ldr	x0, [x20, #32]
	bl	_av_free
	mov	x0, x20
	bl	_av_free
	str	xzr, [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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wait for read_tid\n"

l_.str.1:                               ; @.str.1
	.asciz	"wait for video_refresh_tid\n"

	.no_dead_strip	_stream_close
.subsections_via_symbols
