	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_unregister_con_driver          ## -- Begin function unregister_con_driver
	.p2align	4, 0x90
_unregister_con_driver:                 ## @unregister_con_driver
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_acquire_console_sem
	movq	%r15, %rdi
	callq	_con_is_bound
	testq	%rax, %rax
	je	LBB0_1
LBB0_7:
	xorl	%eax, %eax
	callq	_release_console_sem
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_MAX_NR_CON_DRIVER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_7
## %bb.2:
	movq	_registered_con_driver@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	movq	_CON_DRIVER_FLAG_MODULE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	$56, %rbx
	decq	%rax
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r15, 48(%rbx)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%ecx, (%rbx)
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_vtconsole_deinit_device
	movq	_vtconsole_class@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	24(%rbx), %rsi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_MKDEV
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_device_destroy
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	movups	%xmm0, 40(%rbx)
	movl	$0, (%rbx)
	movups	%xmm0, 8(%rbx)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_MAX_NR_CON_DRIVER,4,2          ## @MAX_NR_CON_DRIVER
	.comm	_registered_con_driver,8,3      ## @registered_con_driver
	.comm	_CON_DRIVER_FLAG_MODULE,4,2     ## @CON_DRIVER_FLAG_MODULE
	.comm	_vtconsole_class,4,2            ## @vtconsole_class
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_unregister_con_driver          ; -- Begin function unregister_con_driver
	.p2align	2
_unregister_con_driver:                 ; @unregister_con_driver
	.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	x21, x0
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
	bl	_acquire_console_sem
	mov	x0, x21
	bl	_con_is_bound
	cbz	x0, LBB0_2
LBB0_1:
	bl	_release_console_sem
	mov	x0, x19
	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_2:
Lloh3:
	adrp	x8, _MAX_NR_CON_DRIVER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_NR_CON_DRIVER@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_1
; %bb.3:
Lloh6:
	adrp	x9, _registered_con_driver@GOTPAGE
Lloh7:
	ldr	x9, [x9, _registered_con_driver@GOTPAGEOFF]
Lloh8:
	ldr	x20, [x9]
Lloh9:
	adrp	x9, _CON_DRIVER_FLAG_MODULE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CON_DRIVER_FLAG_MODULE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, #56
	subs	x8, x8, #1
	b.eq	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x20, #48]
	cmp	x10, x21
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w10, [x20]
	tst	w9, w10
	b.eq	LBB0_4
; %bb.7:
	mov	x0, x20
	bl	_vtconsole_deinit_device
Lloh12:
	adrp	x8, _vtconsole_class@GOTPAGE
Lloh13:
	ldr	x8, [x8, _vtconsole_class@GOTPAGEOFF]
Lloh14:
	ldr	w19, [x8]
	ldr	x1, [x20, #24]
	mov	w0, #0
	bl	_MKDEV
	mov	x1, x0
	mov	x0, x19
	bl	_device_destroy
	mov	w19, #0
	stp	xzr, xzr, [x20, #40]
	stp	xzr, xzr, [x20, #24]
	str	wzr, [x20]
	stp	xzr, xzr, [x20, #8]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_MAX_NR_CON_DRIVER,4,2          ; @MAX_NR_CON_DRIVER
	.comm	_registered_con_driver,8,3      ; @registered_con_driver
	.comm	_CON_DRIVER_FLAG_MODULE,4,2     ; @CON_DRIVER_FLAG_MODULE
	.comm	_vtconsole_class,4,2            ; @vtconsole_class
.subsections_via_symbols
