	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rvin_stop_streaming
_rvin_stop_streaming:                   ## @rvin_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	%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
	callq	_vb2_get_drv_priv
	movq	%rax, %r12
	leaq	24(%rax), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_STOPPING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movq	_RVIN_RETRIES@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	movq	_RVIN_TIMEOUT_MS@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_rvin_capture_stop
	movq	%r12, %rdi
	callq	_rvin_capture_active
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%r13), %edi
	callq	_msleep
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_2
## %bb.5:
	movq	(%r12), %rax
	jmp	LBB0_6
LBB0_3:
	movq	_STOPPED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
LBB0_6:
	movq	_STOPPED@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_vin_err
	movq	(%rbx), %rax
	movq	%rax, (%r12)
LBB0_8:
	movq	_VB2_BUF_STATE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_return_all_buffers
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_rvin_set_stream
	movq	%r12, %rdi
	callq	_rvin_disable_interrupts
	movl	20(%r12), %edi
	movl	16(%r12), %esi
	movl	8(%r12), %ecx
	movl	12(%r12), %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dma_free_coherent              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_STOPPING,8,3                   ## @STOPPING
	.comm	_RVIN_RETRIES,4,2               ## @RVIN_RETRIES
	.comm	_STOPPED,8,3                    ## @STOPPED
	.comm	_RVIN_TIMEOUT_MS,4,2            ## @RVIN_TIMEOUT_MS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed stop HW, something is seriously broken\n"

	.comm	_VB2_BUF_STATE_ERROR,4,2        ## @VB2_BUF_STATE_ERROR
	.no_dead_strip	_rvin_stop_streaming
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rvin_stop_streaming
_rvin_stop_streaming:                   ; @rvin_stop_streaming
	.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
	bl	_vb2_get_drv_priv
	mov	x19, x0
	add	x20, x0, #24
	mov	x0, x20
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x8, _STOPPING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STOPPING@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh3:
	adrp	x22, _RVIN_RETRIES@GOTPAGE
Lloh4:
	ldr	x22, [x22, _RVIN_RETRIES@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh5:
	adrp	x21, _STOPPED@GOTPAGE
Lloh6:
	ldr	x21, [x21, _STOPPED@GOTPAGEOFF]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w23, #0
Lloh7:
	adrp	x24, _RVIN_TIMEOUT_MS@GOTPAGE
Lloh8:
	ldr	x24, [x24, _RVIN_TIMEOUT_MS@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_rvin_capture_stop
	mov	x0, x19
	bl	_rvin_capture_active
	cbz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w0, [x24]
	bl	_msleep
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w8, [x22]
	add	w23, w23, #1
	cmp	w23, w8
	b.lt	LBB0_2
; %bb.4:
	ldr	x8, [x19]
	b	LBB0_6
LBB0_5:
	ldr	x8, [x21]
	str	x8, [x19]
LBB0_6:
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.7:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_vin_err
	ldr	x8, [x21]
	str	x8, [x19]
LBB0_8:
Lloh11:
	adrp	x8, _VB2_BUF_STATE_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VB2_BUF_STATE_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_return_all_buffers
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	mov	w1, #0
	bl	_rvin_set_stream
	mov	x0, x19
	bl	_rvin_disable_interrupts
	ldp	w1, w0, [x19, #16]
	ldp	w3, w2, [x19, #8]
	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
	b	_dma_free_coherent
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_STOPPING,8,3                   ; @STOPPING
	.comm	_RVIN_RETRIES,4,2               ; @RVIN_RETRIES
	.comm	_STOPPED,8,3                    ; @STOPPED
	.comm	_RVIN_TIMEOUT_MS,4,2            ; @RVIN_TIMEOUT_MS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed stop HW, something is seriously broken\n"

	.comm	_VB2_BUF_STATE_ERROR,4,2        ; @VB2_BUF_STATE_ERROR
	.no_dead_strip	_rvin_stop_streaming
.subsections_via_symbols
