	.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	%rsi, %rbx
	movq	16(%rsi), %rax
	movq	_VPIF_CHANNEL2_VIDEO@GOTPCREL(%rip), %rsi
	movq	(%rax), %rcx
	cmpq	%rcx, (%rsi)
	je	LBB0_2
## %bb.1:
	movq	_VPIF_CHANNEL3_VIDEO@GOTPCREL(%rip), %rsi
	cmpq	%rcx, (%rsi)
	jne	LBB0_4
LBB0_2:
	cmpl	$0, 8(%rbx)
	je	LBB0_3
LBB0_4:
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	4(%rdx), %ecx
	jne	LBB0_5
## %bb.7:
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	_VPIF_VIDEO_INDEX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	movq	8(%rax), %r12
	leaq	(%r15,%r15,4), %r14
	leaq	(%r12,%r14,8), %r13
	addq	$4, %r13
	movq	%r13, %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:
	leaq	L_.str(%rip), %rdi
	callq	_vpif_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	32(%r12,%r14,8), %r8d
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	cmpl	4(%r15), %r8d
	jne	LBB0_10
## %bb.12:
	movq	%r14, %rdx
	cmpl	$0, (%r12,%r14,8)
	je	LBB0_14
## %bb.13:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r13, %r14
LBB0_19:
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_20
LBB0_14:
	leaq	(%r12,%rdx,8), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %r8d
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_17
## %bb.15:
	movq	24(%r12,%rdx,8), %r9
	movq	_V4L2_FIELD_ANY@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r9
	movq	%r13, %r14
	jne	LBB0_18
## %bb.16:
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	jmp	LBB0_18
LBB0_17:
	movq	_V4L2_VBI_INTERLACED@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r13, %r14
LBB0_18:
	leaq	(%r12,%rdx,8), %rdi
	addq	$8, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	leaq	(%r12,%rdx,8), %rcx
	addq	$20, %rcx
	movq	_video_qops@GOTPCREL(%rip), %rsi
	movq	%rdx, %r13
	xorl	%edx, %edx
                                        ## kill: def $r9d killed $r9d killed $r9
	pushq	%rbx
	pushq	$4
	callq	_videobuf_queue_dma_contig_init
	addq	$16, %rsp
	movq	(%rbx), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	$1, (%rax,%rcx,4)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movl	(%r15), %eax
	movl	%eax, 16(%r12,%r13,8)
	leaq	(%r12,%r13,8), %rdi
	addq	$12, %rdi
	callq	_INIT_LIST_HEAD
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_videobuf_reqbufs
	movl	%eax, %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_VPIF_CHANNEL2_VIDEO,8,3        ## @VPIF_CHANNEL2_VIDEO
	.comm	_VPIF_CHANNEL3_VIDEO,8,3        ## @VPIF_CHANNEL3_VIDEO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Channel Busy\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VPIF_VIDEO_INDEX,8,3           ## @VPIF_VIDEO_INDEX
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_V4L2_FIELD_ANY,8,3             ## @V4L2_FIELD_ANY
	.comm	_V4L2_FIELD_INTERLACED,4,2      ## @V4L2_FIELD_INTERLACED
	.comm	_V4L2_VBI_INTERLACED,4,2        ## @V4L2_VBI_INTERLACED
	.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	x21, x1
	ldr	x8, [x1, #16]
Lloh0:
	adrp	x9, _VPIF_CHANNEL2_VIDEO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VPIF_CHANNEL2_VIDEO@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x10, [x8]
Lloh3:
	adrp	x11, _VPIF_CHANNEL3_VIDEO@GOTPAGE
Lloh4:
	ldr	x11, [x11, _VPIF_CHANNEL3_VIDEO@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	cmp	x9, x10
	ccmp	x11, x10, #4, ne
	b.ne	LBB0_2
; %bb.1:
	ldr	w9, [x21, #8]
	cbz	w9, LBB0_6
LBB0_2:
Lloh6:
	adrp	x25, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh7:
	ldr	x25, [x25, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
	ldr	w9, [x25]
	ldr	w10, [x19, #4]
	cmp	w9, w10
	b.ne	LBB0_5
; %bb.3:
Lloh8:
	adrp	x9, _VPIF_VIDEO_INDEX@GOTPAGE
Lloh9:
	ldr	x9, [x9, _VPIF_VIDEO_INDEX@GOTPAGEOFF]
Lloh10:
	ldr	x23, [x9]
	ldr	x22, [x8, #8]
	mov	w8, #40
	madd	x8, x23, x8, x22
	add	x20, x8, #4
	mov	x0, x20
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_9
; %bb.4:
Lloh11:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_vpif_err
Lloh17:
	adrp	x8, _EBUSY@GOTPAGE
Lloh18:
	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, #40
	madd	x8, x23, x8, x22
	ldr	w4, [x8, #32]
	ldr	w8, [x19, #4]
	cmp	w4, w8
	b.ne	LBB0_12
; %bb.10:
	mov	w8, #40
	madd	x24, x23, x8, x22
	ldr	w8, [x24]
	cbz	w8, LBB0_15
; %bb.11:
Lloh19:
	adrp	x8, _EBUSY@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_14:
	mov	x0, x20
	bl	_mutex_unlock
	b	LBB0_8
LBB0_15:
	ldr	w8, [x25]
	cmp	w4, w8
	b.ne	LBB0_18
; %bb.16:
	mov	w8, #40
	madd	x8, x23, x8, x22
	ldr	x5, [x8, #24]
Lloh23:
	adrp	x8, _V4L2_FIELD_ANY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _V4L2_FIELD_ANY@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cmp	x5, x8
	b.ne	LBB0_20
; %bb.17:
Lloh26:
	adrp	x8, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh27:
	ldr	x8, [x8, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:
Lloh28:
	adrp	x8, _V4L2_VBI_INTERLACED@GOTPAGE
Lloh29:
	ldr	x8, [x8, _V4L2_VBI_INTERLACED@GOTPAGEOFF]
LBB0_19:
	ldr	w5, [x8]
LBB0_20:
	mov	w8, #40
	madd	x25, x23, x8, x22
	add	x22, x25, #8
	add	x3, x25, #20
Lloh30:
	adrp	x1, _video_qops@GOTPAGE
Lloh31:
	ldr	x1, [x1, _video_qops@GOTPAGEOFF]
	mov	x0, x22
	mov	x2, #0
                                        ; kill: def $w5 killed $w5 killed $x5
	mov	w6, #4
	mov	x7, x21
	bl	_videobuf_queue_dma_contig_init
	ldr	x8, [x21]
	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
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_VPIF_CHANNEL2_VIDEO,8,3        ; @VPIF_CHANNEL2_VIDEO
	.comm	_VPIF_CHANNEL3_VIDEO,8,3        ; @VPIF_CHANNEL3_VIDEO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Channel Busy\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VPIF_VIDEO_INDEX,8,3           ; @VPIF_VIDEO_INDEX
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_V4L2_FIELD_ANY,8,3             ; @V4L2_FIELD_ANY
	.comm	_V4L2_FIELD_INTERLACED,4,2      ; @V4L2_FIELD_INTERLACED
	.comm	_V4L2_VBI_INTERLACED,4,2        ; @V4L2_VBI_INTERLACED
	.comm	_video_qops,4,2                 ; @video_qops
	.no_dead_strip	_vpif_reqbufs
.subsections_via_symbols
