	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpif_qbuf
_vpif_qbuf:                             ## @vpif_qbuf
	.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	8(%rsi), %r15
	movq	8(%r15), %r12
	movq	_VPIF_VIDEO_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	imulq	$104, %rax, %r13
	movq	(%rdx), %r14
	cmpq	%r14, 96(%r12,%r13)
	jne	LBB0_11
## %bb.1:
	movq	(%rsi), %rcx
	cmpl	$0, (%rcx,%rax,4)
	je	LBB0_2
## %bb.3:
	movq	%rdx, %rbx
	leaq	(%r12,%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rdx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	16(%rdx), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	20(%rdx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	24(%rdx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	leaq	(%r12,%r13), %rdi
	addq	$88, %rdi
	callq	_list_empty
	testl	%eax, %eax
	je	LBB0_30
## %bb.4:
	movq	80(%r12,%r13), %rax
	cmpq	64(%r12,%r13), %rax
	je	LBB0_5
LBB0_30:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_videobuf_qbuf                  ## TAILCALL
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_vpif_err
	movq	_EACCES@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_5:
	cmpq	$0, 72(%r12,%r13)
	je	LBB0_30
## %bb.6:
	cmpq	$0, (%r15)
	je	LBB0_30
## %bb.7:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	16(%r12,%r13), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rbx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rbx)
	jne	LBB0_8
## %bb.13:
	movq	8(%rbx), %rax
	movq	_VIDEOBUF_QUEUED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.14:
	movq	_VIDEOBUF_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.16:
	cmpl	$128, %edx
	je	LBB0_19
## %bb.17:
	cmpl	$129, %edx
	jne	LBB0_10
## %bb.18:
	cmpl	$0, 28(%rbx)
	jne	LBB0_24
	jmp	LBB0_10
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_9
LBB0_15:
	leaq	L_.str.2(%rip), %rdi
LBB0_9:
	callq	_vpif_err
LBB0_10:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_12:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_29:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	32(%rbx), %ecx
	jl	LBB0_10
## %bb.20:
	movq	_VIDEOBUF_NEEDS_INIT@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_23
## %bb.21:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, 28(%rbx)
	je	LBB0_23
## %bb.22:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_vpif_buffer_release
LBB0_23:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 28(%rbx)
LBB0_24:
	callq	_local_irq_save
	movl	8(%r12,%r13), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_vpif_buffer_prepare
	testl	%eax, %eax
	js	LBB0_25
## %bb.26:
	leaq	(%r12,%r13), %rax
	addq	$64, %rax
	movq	_VIDEOBUF_ACTIVE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 8(%rbx)
	movq	16(%rbx), %rcx
	movq	%rbx, (%rax)
	movq	_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_28
## %bb.27:
	movq	48(%r12,%r13), %rdi
	addq	%rcx, %rdi
	movq	40(%r12,%r13), %rsi
	addq	%rcx, %rsi
	movq	32(%r12,%r13), %rdx
	addq	%rcx, %rdx
	addq	24(%r12,%r13), %rcx
	callq	*56(%r12,%r13)
LBB0_28:
	callq	_local_irq_restore
	addq	$24, %rbx
	leaq	(%r12,%r13), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_list_add_tail
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_29
LBB0_25:
	callq	_local_irq_restore
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_VPIF_VIDEO_INDEX,8,3           ## @VPIF_VIDEO_INDEX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fh->io_allowed\n"

	.comm	_EACCES,4,2                     ## @EACCES
L_.str.1:                               ## @.str.1
	.asciz	"invalid buffer type\n"

	.comm	_VIDEOBUF_QUEUED,8,3            ## @VIDEOBUF_QUEUED
	.comm	_VIDEOBUF_ACTIVE,8,3            ## @VIDEOBUF_ACTIVE
L_.str.2:                               ## @.str.2
	.asciz	"invalid state\n"

	.comm	_VIDEOBUF_NEEDS_INIT,8,3        ## @VIDEOBUF_NEEDS_INIT
	.comm	_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT,8,3 ## @V4L2_BUF_TYPE_SLICED_VBI_OUTPUT
	.no_dead_strip	_vpif_qbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpif_qbuf
_vpif_qbuf:                             ; @vpif_qbuf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x28, [x1, #8]
	ldr	x21, [x28, #8]
Lloh0:
	adrp	x8, _VPIF_VIDEO_INDEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VPIF_VIDEO_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	mov	w8, #104
	madd	x19, x22, x8, x21
	ldr	x23, [x2]
	ldr	x8, [x19, #96]
	cmp	x8, x23
	b.ne	LBB0_14
; %bb.1:
	ldr	x8, [x1]
	ldr	w8, [x8, x22, lsl #2]
	cbz	w8, LBB0_5
; %bb.2:
	mov	x20, x2
	ldr	x25, [x2, #8]
	ldp	w26, w8, [x2, #16]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	ldr	w27, [x2, #24]
	mov	w8, #104
	madd	x8, x22, x8, x21
	add	x0, x8, #88
	bl	_list_empty
	cbz	w0, LBB0_4
; %bb.3:
	mov	w8, #104
	madd	x24, x22, x8, x21
	ldr	x8, [x24, #64]!
	ldr	x9, [x24, #16]
	cmp	x9, x8
	b.eq	LBB0_6
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_videobuf_qbuf
LBB0_5:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_vpif_err
Lloh5:
	adrp	x8, _EACCES@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_15
LBB0_6:
	mov	w8, #104
	madd	x8, x22, x8, x21
	ldr	x8, [x8, #72]
	cbz	x8, LBB0_4
; %bb.7:
	ldr	x8, [x28]
	cbz	x8, LBB0_4
; %bb.8:
	mov	x0, x19
	bl	_mutex_lock
	mov	w8, #104
	madd	x8, x22, x8, x21
	ldr	x8, [x8, #16]
	ldr	x20, [x8, x25, lsl #3]
	ldr	w8, [x20]
	cmp	w8, w26
	b.ne	LBB0_11
; %bb.9:
	ldr	x8, [x20, #8]
Lloh7:
	adrp	x9, _VIDEOBUF_QUEUED@GOTPAGE
Lloh8:
	ldr	x9, [x9, _VIDEOBUF_QUEUED@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
Lloh10:
	adrp	x28, _VIDEOBUF_ACTIVE@GOTPAGE
Lloh11:
	ldr	x28, [x28, _VIDEOBUF_ACTIVE@GOTPAGEOFF]
	ldr	x10, [x28]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_17
; %bb.10:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_12:
	bl	_vpif_err
LBB0_13:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_14:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_17:
	cmp	w26, #128
	b.eq	LBB0_20
; %bb.18:
	cmp	w26, #129
	b.ne	LBB0_13
; %bb.19:
	ldr	w8, [x20, #28]
	cbnz	w8, LBB0_25
	b	LBB0_13
LBB0_20:
	ldr	w9, [x20, #32]
	cmp	w27, w9
	b.lt	LBB0_13
; %bb.21:
Lloh18:
	adrp	x9, _VIDEOBUF_NEEDS_INIT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _VIDEOBUF_NEEDS_INIT@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	ldr	w25, [sp, #12]                  ; 4-byte Folded Reload
	b.eq	LBB0_24
; %bb.22:
	ldr	w8, [x20, #28]
	cmp	w8, w25
	b.eq	LBB0_24
; %bb.23:
	mov	x0, x19
	mov	x1, x20
	bl	_vpif_buffer_release
LBB0_24:
	str	w25, [x20, #28]
LBB0_25:
	bl	_local_irq_save
	mov	w8, #104
	madd	x8, x22, x8, x21
	ldr	w2, [x8, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_vpif_buffer_prepare
	tbnz	w0, #31, LBB0_29
; %bb.26:
	ldr	x8, [x28]
	str	x8, [x20, #8]
	ldr	x8, [x20, #16]
	str	x20, [x24]
Lloh21:
	adrp	x9, _V4L2_BUF_TYPE_SLICED_VBI_OUTPUT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _V4L2_BUF_TYPE_SLICED_VBI_OUTPUT@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x23, x9
	b.eq	LBB0_28
; %bb.27:
	mov	w9, #104
	madd	x9, x22, x9, x21
	ldp	x11, x10, [x9, #48]
	ldr	x12, [x9, #40]
	add	x0, x11, x8
	add	x1, x12, x8
	ldp	x9, x11, [x9, #24]
	add	x2, x11, x8
	add	x3, x9, x8
	blr	x10
LBB0_28:
	bl	_local_irq_restore
	add	x0, x20, #24
	mov	w8, #104
	madd	x8, x22, x8, x21
	add	x1, x8, #4
	bl	_list_add_tail
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_16
LBB0_29:
	bl	_local_irq_restore
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_VPIF_VIDEO_INDEX,8,3           ; @VPIF_VIDEO_INDEX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fh->io_allowed\n"

	.comm	_EACCES,4,2                     ; @EACCES
l_.str.1:                               ; @.str.1
	.asciz	"invalid buffer type\n"

	.comm	_VIDEOBUF_QUEUED,8,3            ; @VIDEOBUF_QUEUED
	.comm	_VIDEOBUF_ACTIVE,8,3            ; @VIDEOBUF_ACTIVE
l_.str.2:                               ; @.str.2
	.asciz	"invalid state\n"

	.comm	_VIDEOBUF_NEEDS_INIT,8,3        ; @VIDEOBUF_NEEDS_INIT
	.comm	_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT,8,3 ; @V4L2_BUF_TYPE_SLICED_VBI_OUTPUT
	.no_dead_strip	_vpif_qbuf
.subsections_via_symbols
