	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bdisp_open
_bdisp_open:                            ## @bdisp_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_video_drvdata
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r14
	movq	%r15, 40(%rax)
	movq	%rax, %rdi
	callq	_bdisp_hw_alloc_nodes
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	4(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_6:
	movl	20(%r15), %esi
	movq	%r14, %rdi
	callq	_v4l2_fh_init
	movq	%r14, %rdi
	callq	_bdisp_ctrls_create
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	movl	4(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_10
LBB0_8:
	movq	%r14, %rax
	addq	$32, %rax
	movq	%rax, 8(%r14)
	movq	%r14, (%r12)
	movq	%r14, %rdi
	callq	_v4l2_fh_add
	movq	_bdisp_dflt_fmt@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r14)
	movq	%rax, 16(%r14)
	movl	16(%r15), %edi
	movq	_queue_init@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rsi
	callq	_v4l2_m2m_ctx_init
	movl	%eax, (%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:
	movl	4(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movl	(%r14), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_bdisp_ctrls_delete
	movq	%r14, %rdi
	callq	_v4l2_fh_del
LBB0_10:
	movq	%r14, %rdi
	callq	_v4l2_fh_exit
	movq	%r14, %rdi
	callq	_bdisp_hw_free_nodes
LBB0_11:
	movq	%r14, %rdi
	callq	_kfree
LBB0_12:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_13:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	incl	12(%r15)
	movq	_ST_M2M_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	addq	$8, %rsi
	callq	_set_bit
	movl	4(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdx
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no memory for nodes\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to create control\n"

	.comm	_bdisp_dflt_fmt,8,3             ## @bdisp_dflt_fmt
	.comm	_queue_init,4,2                 ## @queue_init
L_.str.2:                               ## @.str.2
	.asciz	"Failed to initialize m2m context\n"

	.comm	_ST_M2M_OPEN,4,2                ## @ST_M2M_OPEN
L_.str.3:                               ## @.str.3
	.asciz	"driver opened, ctx = 0x%p\n"

	.no_dead_strip	_bdisp_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bdisp_open
_bdisp_open:                            ; @bdisp_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	x22, x0
	bl	_video_drvdata
	mov	x19, x0
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_13
LBB0_2:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	str	x19, [x0, #40]
	bl	_bdisp_hw_alloc_nodes
	cbz	x0, LBB0_6
; %bb.4:
	ldr	w0, [x19, #4]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_5:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_6:
	ldr	w1, [x19, #20]
	mov	x0, x20
	bl	_v4l2_fh_init
	mov	x0, x20
	bl	_bdisp_ctrls_create
	cbz	w0, LBB0_8
; %bb.7:
	mov	x21, x0
	ldr	w0, [x19, #4]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_10
LBB0_8:
	add	x8, x20, #32
	str	x8, [x20, #8]
	str	x20, [x22]
	mov	x0, x20
	bl	_v4l2_fh_add
Lloh16:
	adrp	x8, _bdisp_dflt_fmt@GOTPAGE
Lloh17:
	ldr	x8, [x8, _bdisp_dflt_fmt@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	stp	x8, x8, [x20, #16]
	ldr	w0, [x19, #16]
Lloh19:
	adrp	x8, _queue_init@GOTPAGE
Lloh20:
	ldr	x8, [x8, _queue_init@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_v4l2_m2m_ctx_init
	str	w0, [x20]
	bl	_IS_ERR
	cbz	x0, LBB0_14
; %bb.9:
	ldr	w0, [x19, #4]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	ldr	w0, [x20]
	bl	_PTR_ERR
	mov	x21, x0
	mov	x0, x20
	bl	_bdisp_ctrls_delete
	mov	x0, x20
	bl	_v4l2_fh_del
LBB0_10:
	mov	x0, x20
	bl	_v4l2_fh_exit
	mov	x0, x20
	bl	_bdisp_hw_free_nodes
LBB0_11:
	mov	x0, x20
	bl	_kfree
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
	mov	x0, x21
	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
LBB0_14:
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
Lloh24:
	adrp	x8, _ST_M2M_OPEN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ST_M2M_OPEN@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_set_bit
	ldr	w0, [x19, #4]
Lloh27:
	adrp	x1, l_.str.3@PAGE
Lloh28:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
	mov	x0, x19
	bl	_mutex_unlock
	mov	w21, #0
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no memory for nodes\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to create control\n"

	.comm	_bdisp_dflt_fmt,8,3             ; @bdisp_dflt_fmt
	.comm	_queue_init,4,2                 ; @queue_init
l_.str.2:                               ; @.str.2
	.asciz	"Failed to initialize m2m context\n"

	.comm	_ST_M2M_OPEN,4,2                ; @ST_M2M_OPEN
l_.str.3:                               ; @.str.3
	.asciz	"driver opened, ctx = 0x%p\n"

	.no_dead_strip	_bdisp_open
.subsections_via_symbols
