	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_console                    ## -- Begin function set_console
	.p2align	4, 0x90
_set_console:                           ## @set_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %ebx
	movq	_vc_cons@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_fg_console@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r14
	callq	_vc_cons_allocated
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	_vt_dont_switch@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_4
## %bb.2:
	movq	8(%r14), %rax
	movq	_VT_AUTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	movq	(%r14), %rax
	movq	_KD_GRAPHICS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_5:
	movq	_want_console@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_schedule_console_callback
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vc_cons,8,3                    ## @vc_cons
	.comm	_fg_console,8,3                 ## @fg_console
	.comm	_vt_dont_switch,8,3             ## @vt_dont_switch
	.comm	_VT_AUTO,8,3                    ## @VT_AUTO
	.comm	_KD_GRAPHICS,8,3                ## @KD_GRAPHICS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_want_console,4,2               ## @want_console
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_console                    ; -- Begin function set_console
	.p2align	2
_set_console:                           ; @set_console
	.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, _vc_cons@GOTPAGE
Lloh1:
	ldr	x8, [x8, _vc_cons@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _fg_console@GOTPAGE
Lloh4:
	ldr	x9, [x9, _fg_console@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x20, [x8, x9, lsl #3]
	bl	_vc_cons_allocated
	cbz	w0, LBB0_4
; %bb.1:
Lloh6:
	adrp	x8, _vt_dont_switch@GOTPAGE
Lloh7:
	ldr	x8, [x8, _vt_dont_switch@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cbnz	x8, LBB0_4
; %bb.2:
	ldr	x8, [x20, #8]
Lloh9:
	adrp	x9, _VT_AUTO@GOTPAGE
Lloh10:
	ldr	x9, [x9, _VT_AUTO@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x20]
Lloh12:
	adrp	x9, _KD_GRAPHICS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _KD_GRAPHICS@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
LBB0_4:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
Lloh18:
	adrp	x8, _want_console@GOTPAGE
Lloh19:
	ldr	x8, [x8, _want_console@GOTPAGEOFF]
Lloh20:
	str	w19, [x8]
	bl	_schedule_console_callback
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_vc_cons,8,3                    ; @vc_cons
	.comm	_fg_console,8,3                 ; @fg_console
	.comm	_vt_dont_switch,8,3             ; @vt_dont_switch
	.comm	_VT_AUTO,8,3                    ; @VT_AUTO
	.comm	_KD_GRAPHICS,8,3                ; @KD_GRAPHICS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_want_console,4,2               ; @want_console
.subsections_via_symbols
