	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hva_stop_streaming
_hva_stop_streaming:                    ## @hva_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
	movq	%rdi, %r12
	callq	_vb2_get_drv_priv
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_ctx_to_hdev
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_ctx_to_dev
	movq	%rax, %r14
	movq	16(%rbx), %r15
	movl	24(%rbx), %r13d
	movq	(%r12), %rdi
	callq	_to_type_str
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r13d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%r12), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	$0, 48(%rbx)
	movq	32(%rbx), %rdi
	callq	_v4l2_m2m_src_buf_remove
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	_VB2_BUF_STATE_ERROR@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%rax, %rdi
	callq	_v4l2_m2m_buf_done
	movq	32(%rbx), %rdi
	callq	_v4l2_m2m_src_buf_remove
	testq	%rax, %rax
	jne	LBB0_3
	jmp	LBB0_7
LBB0_4:
	movq	$0, 40(%rbx)
	movq	32(%rbx), %rdi
	callq	_v4l2_m2m_dst_buf_remove
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_VB2_BUF_STATE_ERROR@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%rax, %rdi
	callq	_v4l2_m2m_buf_done
	movq	32(%rbx), %rdi
	callq	_v4l2_m2m_dst_buf_remove
	testq	%rax, %rax
	jne	LBB0_6
LBB0_7:
	movq	(%r12), %rdi
	callq	_V4L2_TYPE_IS_OUTPUT
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	32(%rbx), %rdi
	callq	_vb2_is_streaming
	testq	%rax, %rax
	jne	LBB0_14
LBB0_9:
	movq	(%r12), %rdi
	callq	_V4L2_TYPE_IS_OUTPUT
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movq	32(%rbx), %rdi
	addq	$4, %rdi
	callq	_vb2_is_streaming
	testq	%rax, %rax
	je	LBB0_11
LBB0_14:
	movl	24(%rbx), %r15d
	movq	(%r12), %rdi
	callq	_to_type_str
	movl	%eax, %r12d
	movq	32(%rbx), %rdi
	addq	$4, %rdi
	callq	_vb2_is_streaming
	movq	%rax, %r13
	movq	32(%rbx), %rdi
	callq	_vb2_is_streaming
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	movq	%r13, %r8
	movq	%rax, %r9
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
LBB0_11:
	testq	%r15, %r15
	je	LBB0_13
## %bb.12:
	movl	24(%rbx), %edx
	movl	8(%r15), %ecx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%rbx, %rdi
	callq	*(%r15)
	movq	$0, 16(%rbx)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rdx), %rax
	movq	(%rbx), %rcx
	movq	$0, (%rax,%rcx,8)
	decl	(%rdx)
LBB0_13:
	movl	$0, 8(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s %s stop streaming\n"

	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_VB2_BUF_STATE_ERROR,4,2        ## @VB2_BUF_STATE_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"%s %s out=%d cap=%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s %s encoder closed\n"

	.no_dead_strip	_hva_stop_streaming
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hva_stop_streaming
_hva_stop_streaming:                    ; @hva_stop_streaming
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x0
	bl	_vb2_get_drv_priv
	mov	x19, x0
	bl	_ctx_to_hdev
	mov	x21, x0
	mov	x0, x19
	bl	_ctx_to_dev
	mov	x20, x0
	ldr	x24, [x19, #16]
	ldr	w23, [x19, #24]
	ldr	x0, [x22]
	bl	_to_type_str
	mov	x3, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x23
	bl	_dev_dbg
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	str	xzr, [x19, #48]
	ldr	x0, [x19, #32]
	bl	_v4l2_m2m_src_buf_remove
	cbz	x0, LBB0_7
; %bb.2:
Lloh5:
	adrp	x23, _VB2_BUF_STATE_ERROR@GOTPAGE
Lloh6:
	ldr	x23, [x23, _VB2_BUF_STATE_ERROR@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	bl	_v4l2_m2m_buf_done
	ldr	x0, [x19, #32]
	bl	_v4l2_m2m_src_buf_remove
	cbnz	x0, LBB0_3
	b	LBB0_7
LBB0_4:
	str	xzr, [x19, #40]
	ldr	x0, [x19, #32]
	bl	_v4l2_m2m_dst_buf_remove
	cbz	x0, LBB0_7
; %bb.5:
Lloh7:
	adrp	x23, _VB2_BUF_STATE_ERROR@GOTPAGE
Lloh8:
	ldr	x23, [x23, _VB2_BUF_STATE_ERROR@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	bl	_v4l2_m2m_buf_done
	ldr	x0, [x19, #32]
	bl	_v4l2_m2m_dst_buf_remove
	cbnz	x0, LBB0_6
LBB0_7:
	ldr	x0, [x22]
	bl	_V4L2_TYPE_IS_OUTPUT
	cbz	x0, LBB0_9
; %bb.8:
	ldr	x0, [x19, #32]
	bl	_vb2_is_streaming
	cbnz	x0, LBB0_11
LBB0_9:
	ldr	x0, [x22]
	bl	_V4L2_TYPE_IS_OUTPUT
	cbnz	x0, LBB0_12
; %bb.10:
	ldr	x8, [x19, #32]
	add	x0, x8, #4
	bl	_vb2_is_streaming
	cbz	x0, LBB0_12
LBB0_11:
	ldr	w21, [x19, #24]
	ldr	x0, [x22]
	bl	_to_type_str
	mov	x22, x0
	ldr	x8, [x19, #32]
	add	x0, x8, #4
	bl	_vb2_is_streaming
	mov	x23, x0
	ldr	x0, [x19, #32]
	bl	_vb2_is_streaming
	stp	x23, x0, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	mov	x3, x22
	bl	_dev_dbg
	b	LBB0_15
LBB0_12:
	cbz	x24, LBB0_14
; %bb.13:
	ldr	w2, [x19, #24]
	ldr	w3, [x24, #8]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	x8, [x24]
	mov	x0, x19
	blr	x8
	str	xzr, [x19, #16]
	ldr	x8, [x21, #8]
	ldr	x9, [x19]
	str	xzr, [x8, x9, lsl #3]
	ldr	w8, [x21]
	sub	w8, w8, #1
	str	w8, [x21]
LBB0_14:
	str	wzr, [x19, #8]
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s %s stop streaming\n"

	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_VB2_BUF_STATE_ERROR,4,2        ; @VB2_BUF_STATE_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"%s %s out=%d cap=%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s %s encoder closed\n"

	.no_dead_strip	_hva_stop_streaming
.subsections_via_symbols
