	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_doresize                       ## -- Begin function doresize
	.p2align	4, 0x90
_doresize:                              ## @doresize
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_stdout@GOTPCREL(%rip), %r14
	movq	_TIOCGWINSZ@GOTPCREL(%rip), %r15
	leaq	-48(%rbp), %rbx
	movq	_errno@GOTPCREL(%rip), %r12
	movq	_EINTR@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_fileno
	movl	(%r15), %esi
	movl	%eax, %edi
	movq	%rbx, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r12), %rax
	cmpq	(%r13), %rax
	je	LBB0_1
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_xo_err
LBB0_4:
	movl	-48(%rbp), %eax
	cmpl	$4, %eax
	jge	LBB0_5
## %bb.6:
	movq	_VMSTAT_DEFAULT_LINES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_5:
	addl	$-3, %eax
LBB0_7:
	movq	_winlines@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_wresized@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stdout,4,2                     ## @stdout
	.comm	_TIOCGWINSZ,4,2                 ## @TIOCGWINSZ
	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ioctl"

	.comm	_winlines,4,2                   ## @winlines
	.comm	_VMSTAT_DEFAULT_LINES,4,2       ## @VMSTAT_DEFAULT_LINES
	.comm	_wresized,8,3                   ## @wresized
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_doresize                       ; -- Begin function doresize
	.p2align	2
_doresize:                              ; @doresize
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x19, _stdout@GOTPAGE
Lloh1:
	ldr	x19, [x19, _stdout@GOTPAGEOFF]
Lloh2:
	adrp	x20, _TIOCGWINSZ@GOTPAGE
Lloh3:
	ldr	x20, [x20, _TIOCGWINSZ@GOTPAGEOFF]
Lloh4:
	adrp	x21, _errno@GOTPAGE
Lloh5:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
Lloh6:
	adrp	x22, _EINTR@GOTPAGE
Lloh7:
	ldr	x22, [x22, _EINTR@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	bl	_fileno
	ldr	w1, [x20]
	add	x2, sp, #8
	bl	_ioctl
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x21]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_1
; %bb.3:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_xo_err
LBB0_4:
	ldr	w8, [sp, #8]
Lloh10:
	adrp	x9, _VMSTAT_DEFAULT_LINES@GOTPAGE
Lloh11:
	ldr	x9, [x9, _VMSTAT_DEFAULT_LINES@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	subs	w8, w8, #3
	csel	w8, w8, w9, gt
Lloh13:
	adrp	x9, _winlines@GOTPAGE
Lloh14:
	ldr	x9, [x9, _winlines@GOTPAGEOFF]
Lloh15:
	str	w8, [x9]
Lloh16:
	adrp	x8, _wresized@GOTPAGE
Lloh17:
	ldr	x8, [x8, _wresized@GOTPAGEOFF]
Lloh18:
	str	xzr, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_stdout,4,2                     ; @stdout
	.comm	_TIOCGWINSZ,4,2                 ; @TIOCGWINSZ
	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ioctl"

	.comm	_winlines,4,2                   ; @winlines
	.comm	_VMSTAT_DEFAULT_LINES,4,2       ; @VMSTAT_DEFAULT_LINES
	.comm	_wresized,8,3                   ; @wresized
.subsections_via_symbols
