	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vsp1_video_stop_streaming
_vsp1_video_stop_streaming:             ## @vsp1_video_stop_streaming
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_vb2_get_drv_priv
	movq	%rax, %r14
	movq	24(%rax), %rax
	movq	(%rax), %rbx
	leaq	16(%r14), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movb	(%r14), %cl
	movl	$-2, %eax
	roll	%cl, %eax
	andl	%eax, (%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	leaq	24(%rbx), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	8(%rbx), %rax
	decq	%rax
	movq	%rax, 8(%rbx)
	cmpq	16(%rbx), %rax
	jne	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	callq	_vsp1_pipeline_stop
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_3
## %bb.2:
	movq	8(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_3:
	movq	%rbx, %rdi
	callq	_vsp1_video_cleanup_pipeline
LBB0_4:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	addq	$4, %rdi
	callq	_media_pipeline_stop
	movq	%r14, %rdi
	callq	_vsp1_video_release_buffers
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vsp1_video_pipeline_put        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pipeline stop timeout\n"

	.no_dead_strip	_vsp1_video_stop_streaming
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vsp1_video_stop_streaming
_vsp1_video_stop_streaming:             ; @vsp1_video_stop_streaming
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_vb2_get_drv_priv
	mov	x19, x0
	ldr	x8, [x0, #24]
	ldr	x20, [x8]
	add	x21, x0, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w8, [x19]
	mov	w9, #1
	lsl	w8, w9, w8
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	add	x21, x20, #24
	mov	x0, x21
	bl	_mutex_lock
	ldp	x8, x9, [x20, #8]
	sub	x8, x8, #1
	str	x8, [x20, #8]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_vsp1_pipeline_stop
Lloh0:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_3:
	mov	x0, x20
	bl	_vsp1_video_cleanup_pipeline
LBB0_4:
	mov	x0, x21
	bl	_mutex_unlock
	add	x0, x19, #4
	bl	_media_pipeline_stop
	mov	x0, x19
	bl	_vsp1_video_release_buffers
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_vsp1_video_pipeline_put
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pipeline stop timeout\n"

	.no_dead_strip	_vsp1_video_stop_streaming
.subsections_via_symbols
