	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_scr
_setup_scr:                             ## @setup_scr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movq	_gbuf@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	_opt_interactive@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_6
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	_tbuf@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	%rax, %rsi
	callq	_tgetent
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	leaq	-8(%rbp), %rsi
	callq	_tgetstr
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_clear_ok@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_5:
	xorl	%eax, %eax
	callq	_set_tty
	xorl	%eax, %eax
	callq	_clear
LBB0_6:
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gbuf,8,3                       ## @gbuf
	.comm	_opt_interactive,4,2            ## @opt_interactive
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TERM"

	.comm	_tbuf,4,2                       ## @tbuf
L_.str.1:                               ## @.str.1
	.asciz	"cl"

	.comm	_clear_ok,4,2                   ## @clear_ok
	.no_dead_strip	_setup_scr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_scr
_setup_scr:                             ; @setup_scr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.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
Lloh0:
	adrp	x8, _gbuf@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gbuf@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
Lloh3:
	adrp	x8, _opt_interactive@GOTPAGE
Lloh4:
	ldr	x8, [x8, _opt_interactive@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_5
; %bb.2:
	mov	x1, x0
Lloh8:
	adrp	x8, _tbuf@GOTPAGE
Lloh9:
	ldr	x8, [x8, _tbuf@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_tgetent
	cmp	w0, #1
	b.ne	LBB0_5
; %bb.3:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	add	x1, sp, #8
	bl	_tgetstr
	cbz	x0, LBB0_5
; %bb.4:
Lloh13:
	adrp	x8, _clear_ok@GOTPAGE
Lloh14:
	ldr	x8, [x8, _clear_ok@GOTPAGEOFF]
	mov	w9, #1
Lloh15:
	str	w9, [x8]
LBB0_5:
	bl	_set_tty
	bl	_clear
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_gbuf,8,3                       ; @gbuf
	.comm	_opt_interactive,4,2            ; @opt_interactive
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TERM"

	.comm	_tbuf,4,2                       ; @tbuf
l_.str.1:                               ; @.str.1
	.asciz	"cl"

	.comm	_clear_ok,4,2                   ; @clear_ok
	.no_dead_strip	_setup_scr
.subsections_via_symbols
