	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk_vidioc_reqbufs
_stk_vidioc_reqbufs:                    ## @stk_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %rbx
	callq	_video_drvdata
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r15
	movq	(%r14), %rax
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.5:
	movq	%r15, %rdi
	callq	_is_streaming
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	8(%r15), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	cmpq	%rbx, %rax
	je	LBB0_9
LBB0_8:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, %rdi
	callq	_stk_free_buffers
	movl	8(%r14), %esi
	testl	%esi, %esi
	je	LBB0_10
## %bb.11:
	movq	%rbx, 8(%r15)
	movl	$3, %eax
	cmpl	$3, %esi
	jl	LBB0_13
## %bb.12:
	movl	$5, %eax
	cmpl	$6, %esi
	jb	LBB0_14
LBB0_13:
	movl	%eax, 8(%r14)
	movl	%eax, %esi
LBB0_14:
	movq	%r15, %rdi
	callq	_stk_allocate_buffers
	movl	(%r15), %eax
	movl	%eax, 8(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_10:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$73, %edx
	callq	_stk_camera_write_reg
	movq	%r15, %rdi
	callq	_unset_initialised
	movq	$0, 8(%r15)
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_V4L2_MEMORY_MMAP,8,3           ## @V4L2_MEMORY_MMAP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_stk_vidioc_reqbufs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stk_vidioc_reqbufs
_stk_vidioc_reqbufs:                    ; @stk_vidioc_reqbufs
	.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
	mov	x21, x0
	bl	_video_drvdata
	cbz	x0, LBB0_6
; %bb.1:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.2:
	mov	x19, x0
	bl	_is_streaming
	cbnz	x0, LBB0_5
; %bb.3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
; %bb.4:
	cmp	x8, x21
	b.eq	LBB0_10
LBB0_5:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
LBB0_10:
	mov	x0, x19
	bl	_stk_free_buffers
	ldr	w1, [x20, #8]
	cbz	w1, LBB0_13
; %bb.11:
	str	x21, [x19, #8]
	cmp	w1, #3
	b.ge	LBB0_14
; %bb.12:
	mov	w1, #3
	b	LBB0_16
LBB0_13:
	mov	x0, x19
	mov	w2, #73
	bl	_stk_camera_write_reg
	mov	x0, x19
	bl	_unset_initialised
	mov	w0, #0
	str	xzr, [x19, #8]
	b	LBB0_9
LBB0_14:
	cmp	w1, #6
	b.lo	LBB0_17
; %bb.15:
	mov	w1, #5
LBB0_16:
	str	w1, [x20, #8]
LBB0_17:
	mov	x0, x19
	bl	_stk_allocate_buffers
	mov	w0, #0
	ldr	w8, [x19]
	str	w8, [x20, #8]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_V4L2_MEMORY_MMAP,8,3           ; @V4L2_MEMORY_MMAP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_stk_vidioc_reqbufs
.subsections_via_symbols
