	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_reqbufs
_vidioc_reqbufs:                        ## @vidioc_reqbufs
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	callq	_video_drvdata
	movq	%rax, %r14
	movl	8(%rbx), %edi
	movq	_USBVISION_NUMFRAMES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %esi
	callq	_RESTRICT_TO_RANGE
	movq	(%rbx), %rax
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	(%r14), %rax
	movq	_stream_on@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_usbvision_stream_interrupt
	testl	%eax, %eax
	jne	LBB0_5
LBB0_4:
	movq	%r14, %rdi
	callq	_usbvision_frames_free
	movq	%r14, %rdi
	callq	_usbvision_empty_framequeues
	movl	8(%rbx), %esi
	movq	%r14, %rdi
	callq	_usbvision_frames_alloc
	movl	%eax, 8(%rbx)
	movq	$0, 8(%r14)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USBVISION_NUMFRAMES,4,2        ## @USBVISION_NUMFRAMES
	.comm	_V4L2_MEMORY_MMAP,8,3           ## @V4L2_MEMORY_MMAP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_stream_on,8,3                  ## @stream_on
	.no_dead_strip	_vidioc_reqbufs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_reqbufs
_vidioc_reqbufs:                        ; @vidioc_reqbufs
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	bl	_video_drvdata
	mov	x20, x0
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x8, _USBVISION_NUMFRAMES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USBVISION_NUMFRAMES@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #1
	bl	_RESTRICT_TO_RANGE
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _stream_on@GOTPAGE
Lloh7:
	ldr	x9, [x9, _stream_on@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_usbvision_stream_interrupt
	cbnz	w0, LBB0_5
LBB0_3:
	mov	x0, x20
	bl	_usbvision_frames_free
	mov	x0, x20
	bl	_usbvision_empty_framequeues
	ldr	w1, [x19, #8]
	mov	x0, x20
	bl	_usbvision_frames_alloc
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #8]
	str	xzr, [x20, #8]
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_USBVISION_NUMFRAMES,4,2        ; @USBVISION_NUMFRAMES
	.comm	_V4L2_MEMORY_MMAP,8,3           ; @V4L2_MEMORY_MMAP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_stream_on,8,3                  ; @stream_on
	.no_dead_strip	_vidioc_reqbufs
.subsections_via_symbols
