	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dev_unregister             ## -- Begin function drm_dev_unregister
	.p2align	4, 0x90
_drm_dev_unregister:                    ## @drm_dev_unregister
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_DRIVER_LEGACY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_drm_core_check_feature
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_drm_lastclose
LBB0_2:
	movl	$0, (%rbx)
	movq	%rbx, %rdi
	callq	_drm_client_dev_unregister
	movq	_DRIVER_MODESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_drm_core_check_feature
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_drm_modeset_unregister_all
LBB0_4:
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_6:
	cmpq	$0, 8(%rbx)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_drm_pci_agp_destroy
LBB0_8:
	movq	%rbx, %rdi
	callq	_drm_legacy_rmmaps
	movq	%rbx, %rdi
	callq	_remove_compat_control_link
	movq	_DRM_MINOR_PRIMARY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_drm_minor_unregister
	movq	_DRM_MINOR_RENDER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_drm_minor_unregister           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DRIVER_LEGACY,4,2              ## @DRIVER_LEGACY
	.comm	_DRIVER_MODESET,4,2             ## @DRIVER_MODESET
	.comm	_DRM_MINOR_PRIMARY,4,2          ## @DRM_MINOR_PRIMARY
	.comm	_DRM_MINOR_RENDER,4,2           ## @DRM_MINOR_RENDER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dev_unregister             ; -- Begin function drm_dev_unregister
	.p2align	2
_drm_dev_unregister:                    ; @drm_dev_unregister
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _DRIVER_LEGACY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRIVER_LEGACY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_drm_core_check_feature
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_drm_lastclose
LBB0_2:
	str	wzr, [x19]
	mov	x0, x19
	bl	_drm_client_dev_unregister
Lloh3:
	adrp	x8, _DRIVER_MODESET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRIVER_MODESET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_drm_core_check_feature
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_drm_modeset_unregister_all
LBB0_4:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	blr	x8
LBB0_6:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_drm_pci_agp_destroy
LBB0_8:
	mov	x0, x19
	bl	_drm_legacy_rmmaps
	mov	x0, x19
	bl	_remove_compat_control_link
Lloh6:
	adrp	x8, _DRM_MINOR_PRIMARY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DRM_MINOR_PRIMARY@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_drm_minor_unregister
Lloh9:
	adrp	x8, _DRM_MINOR_RENDER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DRM_MINOR_RENDER@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_drm_minor_unregister
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DRIVER_LEGACY,4,2              ; @DRIVER_LEGACY
	.comm	_DRIVER_MODESET,4,2             ; @DRIVER_MODESET
	.comm	_DRM_MINOR_PRIMARY,4,2          ; @DRM_MINOR_PRIMARY
	.comm	_DRM_MINOR_RENDER,4,2           ; @DRM_MINOR_RENDER
.subsections_via_symbols
