	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	$1, (%rdi)
	movl	104(%rdi), %edi
	xorl	%esi, %esi
	callq	_SDL_WaitThread
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	js	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_stream_component_close
LBB0_2:
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	js	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_stream_component_close
LBB0_4:
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	js	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_stream_component_close
LBB0_6:
	leaq	100(%rbx), %rdi
	callq	_avformat_close_input
	leaq	96(%rbx), %rdi
	callq	_packet_queue_destroy
	leaq	92(%rbx), %rdi
	callq	_packet_queue_destroy
	leaq	88(%rbx), %rdi
	callq	_packet_queue_destroy
	leaq	84(%rbx), %rdi
	callq	_frame_queue_destory
	leaq	80(%rbx), %rdi
	callq	_frame_queue_destory
	leaq	76(%rbx), %rdi
	callq	_frame_queue_destory
	movl	72(%rbx), %edi
	callq	_SDL_DestroyCond
	movl	68(%rbx), %edi
	callq	_sws_freeContext
	movl	64(%rbx), %edi
	callq	_sws_freeContext
	movq	56(%rbx), %rdi
	callq	_av_free
	movq	48(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_SDL_DestroyTexture
LBB0_8:
	movq	40(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	callq	_SDL_DestroyTexture
LBB0_10:
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.11:
	callq	_SDL_DestroyTexture
LBB0_12:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_av_free                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.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	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	w8, #1
	str	w8, [x0]
	ldr	w0, [x0, #104]
	mov	x1, #0
	bl	_SDL_WaitThread
	ldr	x1, [x19, #8]
	tbnz	x1, #63, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_stream_component_close
LBB0_2:
	ldr	x1, [x19, #16]
	tbnz	x1, #63, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_stream_component_close
LBB0_4:
	ldr	x1, [x19, #24]
	tbnz	x1, #63, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_stream_component_close
LBB0_6:
	add	x0, x19, #100
	bl	_avformat_close_input
	add	x0, x19, #96
	bl	_packet_queue_destroy
	add	x0, x19, #92
	bl	_packet_queue_destroy
	add	x0, x19, #88
	bl	_packet_queue_destroy
	add	x0, x19, #84
	bl	_frame_queue_destory
	add	x0, x19, #80
	bl	_frame_queue_destory
	add	x0, x19, #76
	bl	_frame_queue_destory
	ldr	w0, [x19, #72]
	bl	_SDL_DestroyCond
	ldr	w0, [x19, #68]
	bl	_sws_freeContext
	ldr	w0, [x19, #64]
	bl	_sws_freeContext
	ldr	x0, [x19, #56]
	bl	_av_free
	ldr	x0, [x19, #48]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_SDL_DestroyTexture
LBB0_8:
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_10
; %bb.9:
	bl	_SDL_DestroyTexture
LBB0_10:
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_12
; %bb.11:
	bl	_SDL_DestroyTexture
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_av_free
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_stream_close
.subsections_via_symbols
