	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xen_drm_drv_fini
_xen_drm_drv_fini:                      ## @xen_drm_drv_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
	movq	16(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.2:
	movq	%rdi, %r14
	movq	%rbx, %rdi
	callq	_drm_dev_is_unplugged
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_drm_kms_helper_poll_fini
	movq	%rbx, %rdi
	callq	_drm_dev_unplug
	movq	%rbx, %rdi
	callq	_drm_dev_put
	movq	$0, 16(%r14)
	movq	%r14, %rdi
	callq	_xen_drm_front_evtchnl_free_all
	leaq	8(%r14), %rdi
	callq	_dbuf_free_all
	cmpl	$0, 4(%r14)
	je	LBB0_5
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movl	(%r14), %edi
	movq	_XenbusStateInitialising@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_xenbus_switch_state            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_XenbusStateInitialising,4,2    ## @XenbusStateInitialising
	.no_dead_strip	_xen_drm_drv_fini
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xen_drm_drv_fini
_xen_drm_drv_fini:                      ; @xen_drm_drv_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
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x20, [x8]
	cbz	x20, LBB0_4
; %bb.2:
	mov	x19, x0
	mov	x0, x20
	bl	_drm_dev_is_unplugged
	cbnz	x0, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_drm_kms_helper_poll_fini
	mov	x0, x20
	bl	_drm_dev_unplug
	mov	x0, x20
	bl	_drm_dev_put
	str	xzr, [x19, #16]
	mov	x0, x19
	bl	_xen_drm_front_evtchnl_free_all
	add	x0, x19, #8
	bl	_dbuf_free_all
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w0, [x19]
Lloh0:
	adrp	x8, _XenbusStateInitialising@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XenbusStateInitialising@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_xenbus_switch_state
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_XenbusStateInitialising,4,2    ; @XenbusStateInitialising
	.no_dead_strip	_xen_drm_drv_fini
.subsections_via_symbols
