	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpif_open
_vpif_open:                             ## @vpif_open
	.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	%rdi, %r15
	callq	_video_devdata
	movq	%rax, %rdi
	callq	_video_get_drvdata
	movq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, (%r15)
	movq	%r14, 16(%rax)
	movl	$0, (%rax)
	cmpl	$0, (%r14)
	jne	LBB0_4
## %bb.3:
	movl	$1, (%rbx)
	movl	$1, (%r14)
	leaq	12(%r14), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
LBB0_4:
	leaq	8(%r14), %rdi
	callq	_atomic_inc
	movq	8(%rbx), %rax
	movq	_VPIF_VIDEO_INDEX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	_V4L2_PRIORITY_UNSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, %rsi
	addq	$4, %rsi
	movl	%eax, 4(%rbx)
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_v4l2_prio_open
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_vpif_err
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to allocate memory for file handle object\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_VPIF_VIDEO_INDEX,8,3           ## @VPIF_VIDEO_INDEX
	.comm	_V4L2_PRIORITY_UNSET,4,2        ## @V4L2_PRIORITY_UNSET
	.no_dead_strip	_vpif_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpif_open
_vpif_open:                             ; @vpif_open
	.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	x21, x0
	bl	_video_devdata
	bl	_video_get_drvdata
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kmalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	str	x0, [x21]
	str	x19, [x0, #16]
	str	wzr, [x0]
	ldr	w8, [x19]
	cbnz	w8, LBB0_3
; %bb.2:
	mov	w8, #1
	str	w8, [x20]
	mov	x0, x19
	str	w8, [x0], #12
	mov	w1, #0
	mov	w2, #4
	bl	_memset
LBB0_3:
	add	x0, x19, #8
	bl	_atomic_inc
Lloh3:
	adrp	x8, _V4L2_PRIORITY_UNSET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_PRIORITY_UNSET@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x20, #4]!
	ldur	x8, [x20, #4]
Lloh6:
	adrp	x9, _VPIF_VIDEO_INDEX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VPIF_VIDEO_INDEX@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	str	xzr, [x8, x9, lsl #3]
	add	x0, x19, #4
	mov	x1, x20
	bl	_v4l2_prio_open
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_vpif_err
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to allocate memory for file handle object\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_VPIF_VIDEO_INDEX,8,3           ; @VPIF_VIDEO_INDEX
	.comm	_V4L2_PRIORITY_UNSET,4,2        ; @V4L2_PRIORITY_UNSET
	.no_dead_strip	_vpif_open
.subsections_via_symbols
