	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ttywidth
_ttywidth:                              ## @ttywidth
	.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
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	cmpb	$0, (%rax)
	je	LBB0_8
## %bb.2:
	movq	_errno@GOTPCREL(%rip), %r14
	movq	$0, (%r14)
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$10, %edx
	callq	_strtol
	cmpq	$0, (%r14)
	jne	LBB0_7
## %bb.3:
	testq	%rax, %rax
	jle	LBB0_7
## %bb.4:
	movq	_INT_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_7
## %bb.5:
	movq	-32(%rbp), %rcx
	cmpq	%rbx, %rcx
	je	LBB0_7
## %bb.6:
	cmpb	$0, (%rcx)
	je	LBB0_11
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	callq	_warnx
LBB0_8:
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TIOCGWINSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.10:
	movl	-24(%rbp), %eax
	jmp	LBB0_11
LBB0_9:
	movl	$80, %eax
LBB0_11:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"COLUMNS"

	.comm	_errno,8,3                      ## @errno
	.comm	_INT_MAX,8,3                    ## @INT_MAX
L_.str.1:                               ## @.str.1
	.asciz	"invalid COLUMNS environment variable ignored"

	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_TIOCGWINSZ,4,2                 ## @TIOCGWINSZ
	.no_dead_strip	_ttywidth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ttywidth
_ttywidth:                              ; @ttywidth
	.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	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldrb	w8, [x0]
	cbz	w8, LBB0_6
; %bb.2:
Lloh2:
	adrp	x20, _errno@GOTPAGE
Lloh3:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	str	xzr, [x20]
	mov	x1, sp
	mov	x0, x19
	mov	w2, #10
	bl	_strtol
	ldr	x8, [x20]
Lloh4:
	adrp	x9, _INT_MAX@GOTPAGE
Lloh5:
	ldr	x9, [x9, _INT_MAX@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, #0
	ccmp	x0, #1, #8, eq
	ccmp	x0, x9, #0, ge
	b.gt	LBB0_5
; %bb.3:
	ldr	x8, [sp]
	cmp	x8, x19
	b.eq	LBB0_5
; %bb.4:
	ldrb	w8, [x8]
	cbz	w8, LBB0_9
LBB0_5:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warnx
LBB0_6:
Lloh9:
	adrp	x8, _STDOUT_FILENO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _STDOUT_FILENO@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _TIOCGWINSZ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TIOCGWINSZ@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.7:
	ldr	w0, [sp, #8]
	b	LBB0_9
LBB0_8:
	mov	w0, #80
LBB0_9:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"COLUMNS"

	.comm	_errno,8,3                      ; @errno
	.comm	_INT_MAX,8,3                    ; @INT_MAX
l_.str.1:                               ; @.str.1
	.asciz	"invalid COLUMNS environment variable ignored"

	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_TIOCGWINSZ,4,2                 ; @TIOCGWINSZ
	.no_dead_strip	_ttywidth
.subsections_via_symbols
