	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_streamoff
_vidioc_streamoff:                      ## @vidioc_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	%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
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	24(%rsi), %r12
	movq	%r12, %rdi
	callq	_check_dev
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	(%r14), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rbx
	movq	_V4L2_BUF_TYPE_VBI_CAPTURE@GOTPCREL(%rip), %r13
	cmpq	(%rbx), %rax
	je	LBB0_5
## %bb.3:
	cmpq	(%r13), %rax
	jne	LBB0_4
LBB0_5:
	movl	%r15d, %ecx
	cmpq	%rcx, %rax
	jne	LBB0_4
## %bb.6:
	movl	16(%r14), %ecx
	movl	(%r12), %r8d
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_em28xx_videodbg
	movq	(%r14), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_9
## %bb.7:
	movq	_EM28XX_RESOURCE_VIDEO@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_res_check
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	leaq	12(%r14), %rdi
	jmp	LBB0_12
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_1:
	movl	%eax, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%ebx, %ebx
	cmpq	(%r13), %rax
	jne	LBB0_13
## %bb.10:
	movq	_EM28XX_RESOURCE_VBI@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_res_check
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	leaq	8(%r14), %rdi
LBB0_12:
	callq	_videobuf_streamoff
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_res_free
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_BUF_TYPE_VBI_CAPTURE,8,3  ## @V4L2_BUF_TYPE_VBI_CAPTURE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vidioc_streamoff fh=%p t=%d fh->res=%d dev->res=%d\n"

	.comm	_EM28XX_RESOURCE_VIDEO,4,2      ## @EM28XX_RESOURCE_VIDEO
	.comm	_EM28XX_RESOURCE_VBI,4,2        ## @EM28XX_RESOURCE_VBI
	.no_dead_strip	_vidioc_streamoff
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_streamoff
_vidioc_streamoff:                      ; @vidioc_streamoff
	.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
	mov	x20, x2
	mov	x19, x1
	ldr	x21, [x1, #24]
	mov	x0, x21
	bl	_check_dev
	tbnz	w0, #31, LBB0_7
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x23, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
	ldr	x9, [x23]
Lloh2:
	adrp	x22, _V4L2_BUF_TYPE_VBI_CAPTURE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _V4L2_BUF_TYPE_VBI_CAPTURE@GOTPAGEOFF]
	ldr	x10, [x22]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.2:
	cmp	x8, w20, uxtw
	b.ne	LBB0_6
; %bb.3:
	ldr	w3, [x19, #16]
	ldr	w4, [x21]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_em28xx_videodbg
	ldr	x8, [x19]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.4:
Lloh6:
	adrp	x20, _EM28XX_RESOURCE_VIDEO@GOTPAGE
Lloh7:
	ldr	x20, [x20, _EM28XX_RESOURCE_VIDEO@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_res_check
	cbz	x0, LBB0_7
; %bb.5:
	add	x0, x19, #12
	b	LBB0_11
LBB0_6:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	ret
LBB0_8:
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.9:
Lloh11:
	adrp	x20, _EM28XX_RESOURCE_VBI@GOTPAGE
Lloh12:
	ldr	x20, [x20, _EM28XX_RESOURCE_VBI@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_res_check
	cbz	x0, LBB0_7
; %bb.10:
	add	x0, x19, #8
LBB0_11:
	bl	_videobuf_streamoff
	ldr	w1, [x20]
	mov	x0, x19
	bl	_res_free
LBB0_12:
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_BUF_TYPE_VBI_CAPTURE,8,3  ; @V4L2_BUF_TYPE_VBI_CAPTURE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vidioc_streamoff fh=%p t=%d fh->res=%d dev->res=%d\n"

	.comm	_EM28XX_RESOURCE_VIDEO,4,2      ; @EM28XX_RESOURCE_VIDEO
	.comm	_EM28XX_RESOURCE_VBI,4,2        ; @EM28XX_RESOURCE_VBI
	.no_dead_strip	_vidioc_streamoff
.subsections_via_symbols
