	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function reset_terminal
LCPI0_0:
	.space	16,1
LCPI0_1:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_reset_terminal:                        ## @reset_terminal
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	$0, 168(%rdi)
	movl	156(%rdi), %eax
	movl	%eax, 160(%rdi)
	movq	_ESnormal@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 152(%rdi)
	movq	$0, 144(%rdi)
	movq	_LAT1_MAP@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	%rbx, %rsi
	callq	_set_translate
	movl	%eax, 136(%rbx)
	movl	(%r15), %eax
	movl	%eax, 132(%rbx)
	movq	_GRAF_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 128(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 104(%rbx)
	movq	$0, 120(%rbx)
	movq	_default_utf8@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 96(%rbx)
	movups	%xmm0, 72(%rbx)
	movups	%xmm0, 56(%rbx)
	movq	$0, 88(%rbx)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, (%rbx)
	movq	$0, 48(%rbx)
	movq	_decarm@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_set_kbd
	movq	_decckm@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_clr_kbd
	movq	_kbdapplic@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_clr_kbd
	movq	_lnm@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_clr_kbd
	movq	_kbd_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rbx), %rcx
	shlq	$5, %rcx
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rax,%rcx)
	movq	_LED_SHOW_FLAGS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 8(%rax,%rcx)
	movl	(%rax,%rcx), %edx
	movl	%edx, 4(%rax,%rcx)
	movq	_CUR_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movl	32(%rbx), %eax
	movl	%eax, 36(%rbx)
	movq	%rbx, %rdi
	callq	_default_attr
	movq	%rbx, %rdi
	callq	_update_attr
	movq	16(%rbx), %rax
	movl	$16843008, (%rax)               ## imm = 0x1010100
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
	movups	%xmm0, 16(%rax)
	movups	%xmm0, 4(%rax)
	movq	_DEFAULT_BELL_PITCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_DEFAULT_BELL_DURATION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_gotoxy
	movq	%rbx, %rdi
	callq	_save_cur
	testl	%r14d, %r14d
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movl	$2, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_csi_J                          ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ESnormal,4,2                   ## @ESnormal
	.comm	_LAT1_MAP,4,2                   ## @LAT1_MAP
	.comm	_GRAF_MAP,4,2                   ## @GRAF_MAP
	.comm	_default_utf8,4,2               ## @default_utf8
	.comm	_decarm,4,2                     ## @decarm
	.comm	_decckm,4,2                     ## @decckm
	.comm	_kbdapplic,4,2                  ## @kbdapplic
	.comm	_lnm,4,2                        ## @lnm
	.comm	_kbd_table,8,3                  ## @kbd_table
	.comm	_LED_SHOW_FLAGS,4,2             ## @LED_SHOW_FLAGS
	.comm	_CUR_DEFAULT,4,2                ## @CUR_DEFAULT
	.comm	_DEFAULT_BELL_PITCH,4,2         ## @DEFAULT_BELL_PITCH
	.comm	_DEFAULT_BELL_DURATION,4,2      ## @DEFAULT_BELL_DURATION
	.no_dead_strip	_reset_terminal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reset_terminal
_reset_terminal:                        ; @reset_terminal
	.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, x1
	mov	x19, x0
	str	xzr, [x0, #168]
	ldr	w8, [x0, #156]
	str	w8, [x0, #160]
Lloh0:
	adrp	x8, _ESnormal@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ESnormal@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #152]
	str	xzr, [x0, #144]
Lloh3:
	adrp	x21, _LAT1_MAP@GOTPAGE
Lloh4:
	ldr	x21, [x21, _LAT1_MAP@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	x1, x19
	bl	_set_translate
	str	w0, [x19, #136]
	ldr	w8, [x21]
Lloh5:
	adrp	x9, _GRAF_MAP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _GRAF_MAP@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #128]
	stp	xzr, xzr, [x19, #112]
	str	xzr, [x19, #104]
Lloh8:
	adrp	x8, _default_utf8@GOTPAGE
Lloh9:
	ldr	x8, [x8, _default_utf8@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #96]
	movi.2d	v0, #0000000000000000
	stur	q0, [x19, #56]
	stur	q0, [x19, #72]
	str	xzr, [x19, #88]
	movi.2s	v0, #1
	str	d0, [x19]
	str	xzr, [x19, #48]
Lloh11:
	adrp	x8, _decarm@GOTPAGE
Lloh12:
	ldr	x8, [x8, _decarm@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_set_kbd
Lloh14:
	adrp	x8, _decckm@GOTPAGE
Lloh15:
	ldr	x8, [x8, _decckm@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_clr_kbd
Lloh17:
	adrp	x8, _kbdapplic@GOTPAGE
Lloh18:
	ldr	x8, [x8, _kbdapplic@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_clr_kbd
Lloh20:
	adrp	x8, _lnm@GOTPAGE
Lloh21:
	ldr	x8, [x8, _lnm@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_clr_kbd
Lloh23:
	adrp	x8, _kbd_table@GOTPAGE
Lloh24:
	ldr	x8, [x8, _kbd_table@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	add	x8, x8, x9, lsl #5
	stp	xzr, xzr, [x8, #16]
Lloh26:
	adrp	x9, _LED_SHOW_FLAGS@GOTPAGE
Lloh27:
	ldr	x9, [x9, _LED_SHOW_FLAGS@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	ldr	w10, [x8]
	stp	w10, w9, [x8, #4]
Lloh29:
	adrp	x8, _CUR_DEFAULT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _CUR_DEFAULT@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	ldr	w9, [x19, #32]
	stp	w9, w8, [x19, #36]
	mov	x0, x19
	bl	_default_attr
	mov	x0, x19
	bl	_update_attr
	ldr	x8, [x19, #16]
	mov	w9, #256
	movk	w9, #257, lsl #16
	str	w9, [x8]
	mov	x9, #72340172838076673
	str	w9, [x8, #28]
	stur	x9, [x8, #20]
	stur	x9, [x8, #12]
	stur	x9, [x8, #4]
Lloh32:
	adrp	x8, _DEFAULT_BELL_PITCH@GOTPAGE
Lloh33:
	ldr	x8, [x8, _DEFAULT_BELL_PITCH@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
Lloh35:
	adrp	x9, _DEFAULT_BELL_DURATION@GOTPAGE
Lloh36:
	ldr	x9, [x9, _DEFAULT_BELL_DURATION@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #24]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_gotoxy
	mov	x0, x19
	bl	_save_cur
	cbz	w20, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #2
	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	_csi_J
LBB0_2:
	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
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ESnormal,4,2                   ; @ESnormal
	.comm	_LAT1_MAP,4,2                   ; @LAT1_MAP
	.comm	_GRAF_MAP,4,2                   ; @GRAF_MAP
	.comm	_default_utf8,4,2               ; @default_utf8
	.comm	_decarm,4,2                     ; @decarm
	.comm	_decckm,4,2                     ; @decckm
	.comm	_kbdapplic,4,2                  ; @kbdapplic
	.comm	_lnm,4,2                        ; @lnm
	.comm	_kbd_table,8,3                  ; @kbd_table
	.comm	_LED_SHOW_FLAGS,4,2             ; @LED_SHOW_FLAGS
	.comm	_CUR_DEFAULT,4,2                ; @CUR_DEFAULT
	.comm	_DEFAULT_BELL_PITCH,4,2         ; @DEFAULT_BELL_PITCH
	.comm	_DEFAULT_BELL_DURATION,4,2      ; @DEFAULT_BELL_DURATION
	.no_dead_strip	_reset_terminal
.subsections_via_symbols
