	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tty_maxsize_update
_tty_maxsize_update:                    ## @tty_maxsize_update
	.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	_STDIN_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_maxsize@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	jne	LBB0_4
## %bb.1:
	movl	$4, %edi
	callq	_malloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_errx
	movq	(%r14), %rax
LBB0_3:
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
LBB0_4:
	movl	%ebx, %edi
	callq	_isatty
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_open
	movl	%eax, %ebx
LBB0_6:
	leaq	-24(%rbp), %rsi
	movl	%ebx, %edi
	callq	_tcgetattr
	testq	%rax, %rax
	js	LBB0_8
## %bb.7:
	movq	_TIOCGWINSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r14), %rdx
	movl	%ebx, %edi
	callq	_ioctl
	testq	%rax, %rax
	jns	LBB0_9
LBB0_8:
	movq	_TTY_DEFAULT_ROWS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r14), %rcx
	movl	%eax, 4(%rcx)
	movq	_TTY_DEFAULT_COLS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rcx)
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_maxsize,8,3                    ## @maxsize
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of memory?!"

L_.str.1:                               ## @.str.1
	.asciz	"/dev/tty"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_TIOCGWINSZ,4,2                 ## @TIOCGWINSZ
	.comm	_TTY_DEFAULT_ROWS,4,2           ## @TTY_DEFAULT_ROWS
	.comm	_TTY_DEFAULT_COLS,4,2           ## @TTY_DEFAULT_COLS
	.no_dead_strip	_tty_maxsize_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tty_maxsize_update
_tty_maxsize_update:                    ; @tty_maxsize_update
	.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
Lloh0:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
Lloh3:
	adrp	x20, _maxsize@GOTPAGE
Lloh4:
	ldr	x20, [x20, _maxsize@GOTPAGEOFF]
	ldr	x8, [x20]
	cbnz	x8, LBB0_4
; %bb.1:
	mov	w0, #4
	bl	_malloc
	str	x0, [x20]
	cbnz	x0, LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_errx
	ldr	x0, [x20]
LBB0_3:
	mov	w1, #0
	mov	w2, #4
	bl	_memset
LBB0_4:
	mov	x0, x19
	bl	_isatty
	cbnz	w0, LBB0_6
; %bb.5:
Lloh10:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_open
	mov	x19, x0
LBB0_6:
	add	x1, sp, #8
	mov	x0, x19
	bl	_tcgetattr
	tbnz	x0, #63, LBB0_8
; %bb.7:
Lloh15:
	adrp	x8, _TIOCGWINSZ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TIOCGWINSZ@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	x2, [x20]
	mov	x0, x19
	bl	_ioctl
	tbz	x0, #63, LBB0_9
LBB0_8:
Lloh18:
	adrp	x8, _TTY_DEFAULT_ROWS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TTY_DEFAULT_ROWS@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	x9, [x20]
Lloh21:
	adrp	x10, _TTY_DEFAULT_COLS@GOTPAGE
Lloh22:
	ldr	x10, [x10, _TTY_DEFAULT_COLS@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	stp	w10, w8, [x9]
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_maxsize,8,3                    ; @maxsize
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of memory?!"

l_.str.1:                               ; @.str.1
	.asciz	"/dev/tty"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_TIOCGWINSZ,4,2                 ; @TIOCGWINSZ
	.comm	_TTY_DEFAULT_ROWS,4,2           ; @TTY_DEFAULT_ROWS
	.comm	_TTY_DEFAULT_COLS,4,2           ; @TTY_DEFAULT_COLS
	.no_dead_strip	_tty_maxsize_update
.subsections_via_symbols
