	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function complete_change_console
_complete_change_console:               ## @complete_change_console
	.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, %rbx
	movq	_fg_console@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_last_console@GOTPCREL(%rip), %rax
	movq	%r14, (%rax)
	movq	_vc_cons@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r14,8), %rax
	movb	(%rax), %r15b
	callq	_switch_screen
	movb	(%rbx), %al
	cmpb	%al, %r15b
	je	LBB0_4
## %bb.1:
	movq	_KD_TEXT@GOTPCREL(%rip), %rcx
	cmpb	(%rcx), %al
	jne	LBB0_3
## %bb.2:
	movl	$1, %edi
	callq	_do_unblank_screen
	jmp	LBB0_4
LBB0_3:
	movl	$1, %edi
	callq	_do_blank_screen
LBB0_4:
	movq	8(%rbx), %rax
	movq	_VT_PROCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.5:
	movl	16(%rbx), %esi
	movl	24(%rbx), %edi
	movl	$1, %edx
	callq	_kill_pid
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	%rbx, %rdi
	callq	_reset_vc
	movb	(%rbx), %al
	cmpb	%al, %r15b
	je	LBB0_10
## %bb.7:
	movq	_KD_TEXT@GOTPCREL(%rip), %rcx
	cmpb	(%rcx), %al
	jne	LBB0_9
## %bb.8:
	movl	$1, %edi
	callq	_do_unblank_screen
	jmp	LBB0_10
LBB0_9:
	movl	$1, %edi
	callq	_do_blank_screen
LBB0_10:
	movq	_VT_EVENT_SWITCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %edx
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vt_event_post                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_fg_console,8,3                 ## @fg_console
	.comm	_last_console,8,3               ## @last_console
	.comm	_vc_cons,8,3                    ## @vc_cons
	.comm	_KD_TEXT,1,0                    ## @KD_TEXT
	.comm	_VT_PROCESS,8,3                 ## @VT_PROCESS
	.comm	_VT_EVENT_SWITCH,4,2            ## @VT_EVENT_SWITCH
	.no_dead_strip	_complete_change_console
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function complete_change_console
_complete_change_console:               ; @complete_change_console
	.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	x20, x0
Lloh0:
	adrp	x8, _fg_console@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fg_console@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
Lloh3:
	adrp	x8, _last_console@GOTPAGE
Lloh4:
	ldr	x8, [x8, _last_console@GOTPAGEOFF]
Lloh5:
	str	x19, [x8]
Lloh6:
	adrp	x8, _vc_cons@GOTPAGE
Lloh7:
	ldr	x8, [x8, _vc_cons@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x8, [x8, x19, lsl #3]
	ldrb	w21, [x8]
	bl	_switch_screen
	ldrb	w8, [x20]
	cmp	w21, w8
	b.eq	LBB0_4
; %bb.1:
Lloh9:
	adrp	x9, _KD_TEXT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _KD_TEXT@GOTPAGEOFF]
	ldrb	w9, [x9]
	mov	w0, #1
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.2:
	bl	_do_unblank_screen
	b	LBB0_4
LBB0_3:
	bl	_do_blank_screen
LBB0_4:
	ldr	x8, [x20, #8]
Lloh11:
	adrp	x9, _VT_PROCESS@GOTPAGE
Lloh12:
	ldr	x9, [x9, _VT_PROCESS@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.5:
	ldr	w0, [x20, #24]
	ldr	w1, [x20, #16]
	mov	w2, #1
	bl	_kill_pid
	cbz	x0, LBB0_10
; %bb.6:
	mov	x0, x20
	bl	_reset_vc
	ldrb	w8, [x20]
	cmp	w21, w8
	b.eq	LBB0_10
; %bb.7:
Lloh14:
	adrp	x9, _KD_TEXT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _KD_TEXT@GOTPAGEOFF]
	ldrb	w9, [x9]
	mov	w0, #1
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.8:
	bl	_do_unblank_screen
	b	LBB0_10
LBB0_9:
	bl	_do_blank_screen
LBB0_10:
Lloh16:
	adrp	x8, _VT_EVENT_SWITCH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _VT_EVENT_SWITCH@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	w2, [x20, #4]
	mov	x1, 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
	b	_vt_event_post
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_fg_console,8,3                 ; @fg_console
	.comm	_last_console,8,3               ; @last_console
	.comm	_vc_cons,8,3                    ; @vc_cons
	.comm	_KD_TEXT,1,0                    ; @KD_TEXT
	.comm	_VT_PROCESS,8,3                 ; @VT_PROCESS
	.comm	_VT_EVENT_SWITCH,4,2            ; @VT_EVENT_SWITCH
	.no_dead_strip	_complete_change_console
.subsections_via_symbols
