	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_lockswitch
_set_lockswitch:                        ## @set_lockswitch
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %r14
	movq	%r14, %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	xorl	%eax, %eax
	callq	_revert
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_errx
	jmp	LBB0_5
LBB0_1:
	movl	$1, -20(%rbp)
	jmp	LBB0_5
LBB0_3:
	movl	$2, -20(%rbp)
LBB0_5:
	movq	_VT_LOCKSWITCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	xorl	%edi, %edi
	callq	_ioctl
	cmpl	$-1, %eax
	jne	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	callq	_revert
	cmpl	$1, -20(%rbp)
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%r14, %rdx
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"off"

L_.str.1:                               ## @.str.1
	.asciz	"on"

L_.str.2:                               ## @.str.2
	.asciz	"argument to -S must be either on or off"

	.comm	_VT_LOCKSWITCH,4,2              ## @VT_LOCKSWITCH
L_.str.3:                               ## @.str.3
	.asciz	"turning %s vty switching"

	.no_dead_strip	_set_lockswitch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_lockswitch
_set_lockswitch:                        ; @set_lockswitch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x0
Lloh0:
	adrp	x19, l_.str@PAGE
Lloh1:
	add	x19, x19, l_.str@PAGEOFF
	mov	x1, x19
	bl	_strcmp
	cbz	w0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_strcmp
	cbz	w0, LBB0_4
; %bb.2:
	bl	_revert
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_errx
	b	LBB0_6
LBB0_3:
	mov	w8, #1
	b	LBB0_5
LBB0_4:
	mov	w8, #2
LBB0_5:
	str	w8, [sp, #12]
LBB0_6:
Lloh6:
	adrp	x8, _VT_LOCKSWITCH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VT_LOCKSWITCH@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	w0, #0
	bl	_ioctl
	cmn	w0, #1
	b.ne	LBB0_8
; %bb.7:
	bl	_revert
	ldr	w8, [sp, #12]
Lloh9:
	adrp	x9, l_.str.1@PAGE
Lloh10:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w8, #1
	csel	x2, x19, x9, eq
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"off"

l_.str.1:                               ; @.str.1
	.asciz	"on"

l_.str.2:                               ; @.str.2
	.asciz	"argument to -S must be either on or off"

	.comm	_VT_LOCKSWITCH,4,2              ; @VT_LOCKSWITCH
l_.str.3:                               ; @.str.3
	.asciz	"turning %s vty switching"

	.no_dead_strip	_set_lockswitch
.subsections_via_symbols
