	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setscreensize                  ## -- Begin function setscreensize
	.p2align	4, 0x90
_setscreensize:                         ## @setscreensize
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$32, %rsp
	movq	_TIOCGWINSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movl	$1, %edi
	callq	_ioctl
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -32(%rbp)
LBB0_2:
	leaq	-8(%rbp), %rsi
	movl	$1, %edi
	callq	_tcgetattr
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	leaq	-8(%rbp), %rdi
	callq	_cfgetospeed
	jmp	LBB0_5
LBB0_3:
	movq	_B9600@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_5:
	movq	_B1200@GOTPCREL(%rip), %rdx
	movl	$9, %ecx
	cmpq	(%rdx), %rax
	jl	LBB0_8
## %bb.6:
	movl	$14, %ecx
	je	LBB0_8
## %bb.7:
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	movl	$24, %ecx
	cmovnel	%eax, %ecx
LBB0_8:
	movq	_screenheight@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	movl	$24, %ecx
	cmovnel	%eax, %ecx
	movq	_realscreenheight@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movq	-32(%rbp), %rax
	testq	%rax, %rax
	movl	$80, %ecx
	cmovneq	%rax, %rcx
	movq	_screenwidth@GOTPCREL(%rip), %rax
	movq	%rcx, (%rax)
	addq	$32, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TIOCGWINSZ,4,2                 ## @TIOCGWINSZ
	.comm	_B9600,8,3                      ## @B9600
	.comm	_B1200,8,3                      ## @B1200
	.comm	_screenheight,4,2               ## @screenheight
	.comm	_realscreenheight,4,2           ## @realscreenheight
	.comm	_screenwidth,8,3                ## @screenwidth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setscreensize                  ; -- Begin function setscreensize
	.p2align	2
_setscreensize:                         ; @setscreensize
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	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
Lloh0:
	adrp	x8, _TIOCGWINSZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TIOCGWINSZ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	w0, #1
	bl	_ioctl
	tbz	x0, #63, LBB0_2
; %bb.1:
	stp	xzr, xzr, [sp, #8]
LBB0_2:
	sub	x1, x29, #8
	mov	w0, #1
	bl	_tcgetattr
	tbnz	x0, #63, LBB0_4
; %bb.3:
	sub	x0, x29, #8
	bl	_cfgetospeed
	b	LBB0_5
LBB0_4:
Lloh3:
	adrp	x8, _B9600@GOTPAGE
Lloh4:
	ldr	x8, [x8, _B9600@GOTPAGEOFF]
Lloh5:
	ldr	x0, [x8]
LBB0_5:
Lloh6:
	adrp	x8, _B1200@GOTPAGE
Lloh7:
	ldr	x8, [x8, _B1200@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_7
; %bb.6:
	mov	w8, #9
	b	LBB0_10
LBB0_7:
	b.ne	LBB0_9
; %bb.8:
	mov	w8, #14
	b	LBB0_10
LBB0_9:
	ldr	x8, [sp, #16]
	cmp	x8, #0
	mov	w9, #24
	csel	w8, w9, w8, eq
LBB0_10:
Lloh9:
	adrp	x9, _screenheight@GOTPAGE
Lloh10:
	ldr	x9, [x9, _screenheight@GOTPAGEOFF]
Lloh11:
	str	w8, [x9]
	ldr	w8, [sp, #16]
	mov	w9, #24
	cmp	w8, #0
	csel	w8, w9, w8, eq
Lloh12:
	adrp	x9, _realscreenheight@GOTPAGE
Lloh13:
	ldr	x9, [x9, _realscreenheight@GOTPAGEOFF]
Lloh14:
	str	w8, [x9]
	ldr	x8, [sp, #8]
	mov	w9, #80
	cmp	x8, #0
	csel	x8, x9, x8, eq
Lloh15:
	adrp	x9, _screenwidth@GOTPAGE
Lloh16:
	ldr	x9, [x9, _screenwidth@GOTPAGEOFF]
Lloh17:
	str	x8, [x9]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_TIOCGWINSZ,4,2                 ; @TIOCGWINSZ
	.comm	_B9600,8,3                      ; @B9600
	.comm	_B1200,8,3                      ; @B1200
	.comm	_screenheight,4,2               ; @screenheight
	.comm	_realscreenheight,4,2           ; @realscreenheight
	.comm	_screenwidth,8,3                ; @screenwidth
.subsections_via_symbols
