	.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	%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	(%rdx), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	jae	LBB0_3
## %bb.1:
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r12
	leaq	12(%rsi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r13), %ebx
	cmpl	$130, %ebx
	je	LBB0_9
## %bb.7:
	movq	_GSPCA_MEMORY_NO@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_9
## %bb.8:
	cmpl	(%r15), %ebx
	jne	LBB0_11
LBB0_9:
	movq	40(%r13), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	cmpq	%r12, %rax
	je	LBB0_13
LBB0_11:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_D_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r15), %rcx
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_PDEBUG
	jmp	LBB0_5
LBB0_13:
	movl	4(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_17
## %bb.14:
	movq	32(%r13), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rcx,%rdx,8)
	jne	LBB0_11
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_15
LBB0_17:
	movl	8(%r13), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	je	LBB0_19
## %bb.18:
	leaq	16(%r13), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	$0, 24(%r13)
	movq	%r13, %rdi
	callq	_gspca_stream_off
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	(%r13), %ebx
	movl	4(%r13), %eax
LBB0_19:
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	movq	%r13, %rdi
	callq	_frame_free
LBB0_21:
	movq	8(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_27
## %bb.22:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	(%r15), %edx
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_frame_alloc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.23:
	movslq	4(%r13), %rax
	movq	%rax, 8(%r15)
	cmpl	$130, -44(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_27
## %bb.24:
	movl	$0, %ebx
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_12
## %bb.25:
	movq	%r13, %rdi
	callq	_gspca_init_transfer
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_27:
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_GSPCA_MEMORY_NO,4,2            ## @GSPCA_MEMORY_NO
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_D_STREAM,4,2                   ## @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reqbufs st:%d c:%d"

	.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	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
	ldr	w8, [x2]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hs	LBB0_3
; %bb.1:
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	add	x20, x1, #12
	mov	x0, x20
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_5:
	mov	x0, x22
	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_6:
	ldr	w23, [x21]
Lloh4:
	adrp	x8, _GSPCA_MEMORY_NO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GSPCA_MEMORY_NO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w23, #130
	ccmp	w23, w8, #4, ne
	b.eq	LBB0_8
; %bb.7:
	ldr	w8, [x19]
	cmp	w23, w8
	b.ne	LBB0_10
LBB0_8:
	ldr	x8, [x21, #40]
	cbz	x8, LBB0_12
; %bb.9:
	cmp	x8, x22
	b.eq	LBB0_12
LBB0_10:
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_11:
	mov	x0, x20
	bl	_mutex_unlock
Lloh10:
	adrp	x8, _D_STREAM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _D_STREAM@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldr	x3, [x19, #8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_PDEBUG
	b	LBB0_5
LBB0_12:
	ldr	w8, [x21, #4]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.13:
	ldr	x9, [x21, #32]
	mov	x10, x8
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9]
	cbnz	x11, LBB0_10
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x9, x9, #8
	subs	x10, x10, #1
	b.ne	LBB0_14
LBB0_16:
	ldr	w24, [x21, #8]
	cbz	w24, LBB0_18
; %bb.17:
	add	x23, x21, #16
	mov	x0, x23
	bl	_mutex_lock
	str	xzr, [x21, #24]
	mov	x0, x21
	bl	_gspca_stream_off
	mov	x0, x23
	bl	_mutex_unlock
	ldp	w23, w8, [x21]
LBB0_18:
	cbz	w8, LBB0_20
; %bb.19:
	mov	x0, x21
	bl	_frame_free
LBB0_20:
	ldr	x3, [x19, #8]
	cbz	x3, LBB0_25
; %bb.21:
	ldr	w2, [x19]
	mov	x0, x21
	mov	x1, x22
	bl	_frame_alloc
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.22:
	ldrsw	x8, [x21, #4]
	str	x8, [x19, #8]
	cmp	w23, #130
	b.eq	LBB0_11
; %bb.23:
	cbz	w24, LBB0_11
; %bb.24:
	mov	x0, x21
	bl	_gspca_init_transfer
	mov	x22, x0
	b	LBB0_11
LBB0_25:
	mov	w22, #0
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_GSPCA_MEMORY_NO,4,2            ; @GSPCA_MEMORY_NO
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_D_STREAM,4,2                   ; @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reqbufs st:%d c:%d"

	.no_dead_strip	_vidioc_reqbufs
.subsections_via_symbols
