	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpbe_display_open
_vpbe_display_open:                     ## @vpbe_display_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, %rbx
	callq	_video_drvdata
	movq	%rax, %r12
	movq	16(%rax), %rax
	movq	(%rax), %r13
	movq	8(%rax), %r14
	movq	%rbx, %rdi
	callq	_v4l2_fh_open
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_v4l2_err
	jmp	LBB0_10
LBB0_2:
	movq	%rbx, %rdi
	callq	_v4l2_fh_is_singular_file
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_10
## %bb.3:
	movl	(%r12), %eax
	testl	%eax, %eax
	je	LBB0_4
LBB0_9:
	incl	%eax
	movl	%eax, (%r12)
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rcx
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_v4l2_dbg
	jmp	LBB0_10
LBB0_4:
	movq	%r12, %rdi
	addq	$4, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	8(%r12), %esi
	movq	%r13, %rdi
	callq	*(%r13)
	movl	%eax, %r13d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	testl	%r13d, %r13d
	js	LBB0_11
## %bb.8:
	movl	(%r12), %eax
	jmp	LBB0_9
LBB0_11:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_v4l2_err
	movq	%rbx, %rdi
	callq	_v4l2_fh_release
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"v4l2_fh_open failed\n"

	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
L_.str.1:                               ## @.str.1
	.asciz	"Display Manager failed to allocate layer\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_debug,4,2                      ## @debug
L_.str.2:                               ## @.str.2
	.asciz	"vpbe display device opened successfully\n"

	.no_dead_strip	_vpbe_display_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpbe_display_open
_vpbe_display_open:                     ; @vpbe_display_open
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	bl	_video_drvdata
	mov	x21, x0
	ldr	x8, [x0, #16]
	ldp	x22, x19, [x8]
	mov	x0, x20
	bl	_v4l2_fh_open
	cbz	w0, LBB0_2
; %bb.1:
	mov	x23, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_v4l2_err
	b	LBB0_6
LBB0_2:
	mov	x0, x20
	bl	_v4l2_fh_is_singular_file
	cbz	w0, LBB0_5
; %bb.3:
	ldr	w8, [x21]
	cbz	w8, LBB0_7
LBB0_4:
	add	w8, w8, #1
	str	w8, [x21]
Lloh2:
	adrp	x8, _debug@GOTPAGE
Lloh3:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x3, l_.str.2@PAGE
Lloh6:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
LBB0_5:
	mov	w23, #0
LBB0_6:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	add	x23, x21, #4
	mov	x0, x23
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_10
; %bb.8:
Lloh7:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_6
LBB0_10:
	ldr	x8, [x22]
	ldr	w1, [x21, #8]
	mov	x0, x22
	blr	x8
	mov	x22, x0
	mov	x0, x23
	bl	_mutex_unlock
	tbnz	w22, #31, LBB0_12
; %bb.11:
	ldr	w8, [x21]
	b	LBB0_4
LBB0_12:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_v4l2_err
	mov	x0, x20
	bl	_v4l2_fh_release
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"v4l2_fh_open failed\n"

	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
l_.str.1:                               ; @.str.1
	.asciz	"Display Manager failed to allocate layer\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_debug,4,2                      ; @debug
l_.str.2:                               ; @.str.2
	.asciz	"vpbe display device opened successfully\n"

	.no_dead_strip	_vpbe_display_open
.subsections_via_symbols
