	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpia2_streamoff
_cpia2_streamoff:                       ## @cpia2_streamoff
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	callq	_video_drvdata
	movq	%rax, %r14
	movq	_EINVAL@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movq	8(%rax), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_DBG
	cmpl	$0, 16(%r14)
	je	LBB0_2
## %bb.1:
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_2
## %bb.3:
	cmpq	$0, 8(%r14)
	je	LBB0_4
## %bb.5:
	movq	%r14, %rdi
	callq	_cpia2_usb_stream_stop
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	(%r14), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_v4l2_ctrl_grab
	jmp	LBB0_7
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%r12), %ebx
	jmp	LBB0_7
LBB0_4:
	negl	%ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VIDIOC_STREAMOFF, streaming=%d\n"

	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.no_dead_strip	_cpia2_streamoff
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpia2_streamoff
_cpia2_streamoff:                       ; @cpia2_streamoff
	.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
	mov	x20, x2
	bl	_video_drvdata
	mov	x19, x0
Lloh0:
	adrp	x22, _EINVAL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _EINVAL@GOTPAGEOFF]
	ldr	w21, [x22]
	ldr	x1, [x0, #8]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	ldr	w8, [x19, #16]
Lloh4:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w8, #0
	ccmp	w9, w20, #0, ne
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x22]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_cpia2_usb_stream_stop
	cbnz	w0, LBB0_6
; %bb.4:
	ldr	w0, [x19]
	mov	w1, #0
	bl	_v4l2_ctrl_grab
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	neg	w0, w21
LBB0_6:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VIDIOC_STREAMOFF, streaming=%d\n"

	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.no_dead_strip	_cpia2_streamoff
.subsections_via_symbols
