	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpif_reqbufs
_vpif_reqbufs:                          ## @vpif_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	16(%rsi), %rbx
	movq	_debug@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdx
	movl	$2, %edi
	callq	_vpif_dbg
	movq	_VPIF_CHANNEL0_VIDEO@GOTPCREL(%rip), %rcx
	movq	(%rbx), %rax
	cmpq	%rax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_VPIF_CHANNEL1_VIDEO@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_4
LBB0_2:
	cmpl	$0, 8(%r14)
	je	LBB0_3
LBB0_4:
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	4(%r12), %eax
	jne	LBB0_5
## %bb.7:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	_VPIF_VIDEO_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	8(%rbx), %r13
	leaq	(%r15,%r15,8), %rax
	leaq	(%rax,%rax,2), %r12
	addq	%r15, %r12
	leaq	(%r12,%r13), %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	movl	(%r15), %esi
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %edi
	callq	_vpif_dbg
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%r13,%r12)
	je	LBB0_11
## %bb.10:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_11:
	leaq	(%r12,%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	(%r12,%r13), %rdi
	addq	$8, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	leaq	24(%r13,%r12), %rcx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	4(%rbx), %r8d
	movl	20(%r13,%r12), %r9d
	movq	_video_qops@GOTPCREL(%rip), %rsi
	xorl	%edx, %edx
	pushq	%r14
	pushq	$4
	callq	_videobuf_queue_dma_contig_init
	addq	$16, %rsp
	movq	(%r14), %rax
	movl	$1, (%rax,%r15,4)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movl	(%rbx), %eax
	movl	%eax, 16(%r13,%r12)
	leaq	(%r12,%r13), %rdi
	addq	$12, %rdi
	callq	_INIT_LIST_HEAD
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_videobuf_reqbufs
	movl	%eax, %ebx
LBB0_12:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vpif_reqbufs\n"

	.comm	_VPIF_CHANNEL0_VIDEO,8,3        ## @VPIF_CHANNEL0_VIDEO
	.comm	_VPIF_CHANNEL1_VIDEO,8,3        ## @VPIF_CHANNEL1_VIDEO
L_.str.1:                               ## @.str.1
	.asciz	"Channel Busy\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VPIF_VIDEO_INDEX,8,3           ## @VPIF_VIDEO_INDEX
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_video_qops,4,2                 ## @video_qops
	.no_dead_strip	_vpif_reqbufs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpif_reqbufs
_vpif_reqbufs:                          ; @vpif_reqbufs
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	ldr	x21, [x1, #16]
Lloh0:
	adrp	x22, _debug@GOTPAGE
Lloh1:
	ldr	x22, [x22, _debug@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #2
	bl	_vpif_dbg
Lloh4:
	adrp	x8, _VPIF_CHANNEL0_VIDEO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VPIF_CHANNEL0_VIDEO@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldr	x9, [x21]
Lloh7:
	adrp	x10, _VPIF_CHANNEL1_VIDEO@GOTPAGE
Lloh8:
	ldr	x10, [x10, _VPIF_CHANNEL1_VIDEO@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x10, x9, #4, ne
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_6
LBB0_2:
Lloh10:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
Lloh13:
	adrp	x8, _VPIF_VIDEO_INDEX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VPIF_VIDEO_INDEX@GOTPAGEOFF]
Lloh15:
	ldr	x23, [x8]
	ldr	x22, [x21, #8]
	mov	w8, #28
	madd	x8, x23, x8, x22
	add	x21, x8, #4
	mov	x0, x21
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_9
; %bb.4:
Lloh16:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
	ldr	w1, [x22]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_vpif_dbg
Lloh22:
	adrp	x8, _EBUSY@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	w8, #28
	madd	x24, x23, x8, x22
	ldr	w8, [x24]
	cbz	w8, LBB0_11
; %bb.10:
Lloh24:
	adrp	x8, _EBUSY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_12
LBB0_11:
	mov	w8, #28
	madd	x25, x23, x8, x22
	add	x22, x25, #8
	add	x3, x25, #24
	ldr	w4, [x19, #4]
	ldr	w5, [x25, #20]
Lloh27:
	adrp	x1, _video_qops@GOTPAGE
Lloh28:
	ldr	x1, [x1, _video_qops@GOTPAGEOFF]
	mov	x0, x22
	mov	x2, #0
	mov	w6, #4
	mov	x7, x20
	bl	_videobuf_queue_dma_contig_init
	ldr	x8, [x20]
	mov	w9, #1
	str	w9, [x8, x23, lsl #2]
	str	w9, [x24]
	ldr	w8, [x19]
	str	w8, [x25, #16]
	add	x0, x25, #12
	bl	_INIT_LIST_HEAD
	mov	x0, x22
	mov	x1, x19
	bl	_videobuf_reqbufs
	mov	x19, x0
LBB0_12:
	mov	x0, x21
	bl	_mutex_unlock
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vpif_reqbufs\n"

	.comm	_VPIF_CHANNEL0_VIDEO,8,3        ; @VPIF_CHANNEL0_VIDEO
	.comm	_VPIF_CHANNEL1_VIDEO,8,3        ; @VPIF_CHANNEL1_VIDEO
l_.str.1:                               ; @.str.1
	.asciz	"Channel Busy\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VPIF_VIDEO_INDEX,8,3           ; @VPIF_VIDEO_INDEX
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_video_qops,4,2                 ; @video_qops
	.no_dead_strip	_vpif_reqbufs
.subsections_via_symbols
