	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpfe_open
_vpfe_open:                             ## @vpfe_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	%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
	movq	%rdi, %r15
	callq	_video_drvdata
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	_video_devdata
	movq	%rax, %r12
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	12(%r13), %rbx
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%rbx, %rdx
	callq	_v4l2_dbg
	movq	16(%r13), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r14
	movq	%rax, (%r15)
	movq	%r13, 16(%rax)
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_v4l2_fh_init
	movq	%r13, %rdi
	callq	_mutex_lock
	cmpl	$0, 8(%r13)
	je	LBB0_7
LBB0_9:
	incl	4(%r13)
	movq	$0, 8(%r14)
	movq	%r14, %rdi
	callq	_v4l2_fh_add
	movq	%r13, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_v4l2_err
	jmp	LBB0_2
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_7:
	movq	%r13, %rdi
	callq	_vpfe_initialize_device
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r13, %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_v4l2_fh_exit
	movq	%r14, %rdi
	callq	_kfree
LBB0_2:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vpfe_open\n"

L_.str.1:                               ## @.str.1
	.asciz	"No decoder registered\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_vpfe_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpfe_open
_vpfe_open:                             ; @vpfe_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_drvdata
	mov	x19, x0
	mov	x0, x21
	bl	_video_devdata
	mov	x22, x0
Lloh0:
	adrp	x8, _debug@GOTPAGE
Lloh1:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x20, x19, #12
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_v4l2_dbg
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.1:
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kmalloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	str	x0, [x21]
	str	x19, [x0, #16]
	mov	x1, x22
	bl	_v4l2_fh_init
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_6
LBB0_3:
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
	str	xzr, [x20, #8]
	mov	x0, x20
	bl	_v4l2_fh_add
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_10
LBB0_4:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_v4l2_err
	b	LBB0_8
LBB0_5:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	mov	x0, x19
	bl	_vpfe_initialize_device
	cbz	x0, LBB0_3
; %bb.7:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	bl	_v4l2_fh_exit
	mov	x0, x20
	bl	_kfree
LBB0_8:
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vpfe_open\n"

l_.str.1:                               ; @.str.1
	.asciz	"No decoder registered\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_vpfe_open
.subsections_via_symbols
