	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_fb_helper_fini             ## -- Begin function drm_fb_helper_fini
	.p2align	4, 0x90
_drm_fb_helper_fini:                    ## @drm_fb_helper_fini
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.1:
	movq	%rdi, %rbx
	movq	32(%rdi), %rax
	movq	$0, (%rax)
	movq	_drm_fbdev_emulation@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_10
## %bb.2:
	leaq	28(%rbx), %rdi
	callq	_cancel_work_sync
	leaq	24(%rbx), %rdi
	callq	_cancel_work_sync
	movq	16(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_6
## %bb.3:
	cmpq	$0, (%r14)
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_fb_dealloc_cmap
LBB0_5:
	movq	%r14, %rdi
	callq	_framebuffer_release
LBB0_6:
	movq	$0, 16(%rbx)
	movq	_kernel_fb_helper_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_list_empty
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	movq	%r14, %rdi
	callq	_list_del
	movq	_kernel_fb_helper_list@GOTPCREL(%rip), %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_sysrq_drm_fb_helper_restore_op@GOTPCREL(%rip), %rsi
	movl	$118, %edi
	callq	_unregister_sysrq_key
LBB0_9:
	movq	_kernel_fb_helper_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	leaq	4(%rbx), %rdi
	callq	_mutex_destroy
	cmpl	$0, (%rbx)
	je	LBB0_11
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_drm_client_release             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_drm_fbdev_emulation,4,2        ## @drm_fbdev_emulation
	.comm	_kernel_fb_helper_lock,4,2      ## @kernel_fb_helper_lock
	.comm	_kernel_fb_helper_list,4,2      ## @kernel_fb_helper_list
	.comm	_sysrq_drm_fb_helper_restore_op,4,2 ## @sysrq_drm_fb_helper_restore_op
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_fb_helper_fini             ; -- Begin function drm_fb_helper_fini
	.p2align	2
_drm_fb_helper_fini:                    ; @drm_fb_helper_fini
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #32]
	str	xzr, [x8]
Lloh0:
	adrp	x8, _drm_fbdev_emulation@GOTPAGE
Lloh1:
	ldr	x8, [x8, _drm_fbdev_emulation@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_10
; %bb.2:
	add	x0, x19, #28
	bl	_cancel_work_sync
	add	x0, x19, #24
	bl	_cancel_work_sync
	ldr	x20, [x19, #16]
	cbz	x20, LBB0_6
; %bb.3:
	ldr	x8, [x20]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_fb_dealloc_cmap
LBB0_5:
	mov	x0, x20
	bl	_framebuffer_release
LBB0_6:
	str	xzr, [x19, #16]
Lloh3:
	adrp	x0, _kernel_fb_helper_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _kernel_fb_helper_lock@GOTPAGEOFF]
	bl	_mutex_lock
	add	x20, x19, #8
	mov	x0, x20
	bl	_list_empty
	cbnz	x0, LBB0_9
; %bb.7:
	mov	x0, x20
	bl	_list_del
Lloh5:
	adrp	x0, _kernel_fb_helper_list@GOTPAGE
Lloh6:
	ldr	x0, [x0, _kernel_fb_helper_list@GOTPAGEOFF]
	bl	_list_empty
	cbz	x0, LBB0_9
; %bb.8:
Lloh7:
	adrp	x1, _sysrq_drm_fb_helper_restore_op@GOTPAGE
Lloh8:
	ldr	x1, [x1, _sysrq_drm_fb_helper_restore_op@GOTPAGEOFF]
	mov	w0, #118
	bl	_unregister_sysrq_key
LBB0_9:
Lloh9:
	adrp	x0, _kernel_fb_helper_lock@GOTPAGE
Lloh10:
	ldr	x0, [x0, _kernel_fb_helper_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	add	x0, x19, #4
	bl	_mutex_destroy
	ldr	w8, [x19]
	cbz	w8, LBB0_11
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_drm_client_release
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_drm_fbdev_emulation,4,2        ; @drm_fbdev_emulation
	.comm	_kernel_fb_helper_lock,4,2      ; @kernel_fb_helper_lock
	.comm	_kernel_fb_helper_list,4,2      ; @kernel_fb_helper_list
	.comm	_sysrq_drm_fb_helper_restore_op,4,2 ; @sysrq_drm_fb_helper_restore_op
.subsections_via_symbols
