	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_tty
_add_tty:                               ## @add_tty
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_AC_T@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_Flags@GOTPCREL(%rip), %rcx
	orl	%eax, (%rcx)
	movl	$16, %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_2:
	movq	$0, 8(%rbx)
	movl	$1, (%rbx)
	cmpb	$33, (%r14)
	jne	LBB0_4
## %bb.3:
	movl	$0, (%rbx)
	incq	%r14
LBB0_4:
	movl	4(%rbx), %edi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_strlcpy
	movl	4(%rbx), %edi
	movl	$42, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movb	$0, (%rax)
	movl	4(%rbx), %edi
	callq	_strlen
	movq	%rax, 8(%rbx)
LBB0_6:
	movq	_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_Ttys@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_SLIST_INSERT_HEAD              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AC_T,4,2                       ## @AC_T
	.comm	_Flags,4,2                      ## @Flags
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc failed"

	.comm	_Ttys,4,2                       ## @Ttys
	.comm	_next,4,2                       ## @next
	.no_dead_strip	_add_tty
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_tty
_add_tty:                               ; @add_tty
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
Lloh0:
	adrp	x8, _AC_T@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AC_T@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _Flags@GOTPAGE
Lloh4:
	ldr	x9, [x9, _Flags@GOTPAGEOFF]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	mov	w0, #16
	bl	_malloc
	mov	x19, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_2:
	str	xzr, [x19, #8]
	mov	w8, #1
	str	w8, [x19]
	ldrb	w8, [x20]
	cmp	w8, #33
	b.ne	LBB0_4
; %bb.3:
	str	wzr, [x19]
	add	x20, x20, #1
LBB0_4:
	ldr	w0, [x19, #4]
	mov	x1, x20
	mov	w2, #4
	bl	_strlcpy
	ldr	w0, [x19, #4]
	mov	w1, #42
	bl	_strchr
	cbz	x0, LBB0_6
; %bb.5:
	strb	wzr, [x0]
	ldr	w0, [x19, #4]
	bl	_strlen
	str	x0, [x19, #8]
LBB0_6:
Lloh7:
	adrp	x8, _next@GOTPAGE
Lloh8:
	ldr	x8, [x8, _next@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
Lloh10:
	adrp	x0, _Ttys@GOTPAGE
Lloh11:
	ldr	x0, [x0, _Ttys@GOTPAGEOFF]
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_SLIST_INSERT_HEAD
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AC_T,4,2                       ; @AC_T
	.comm	_Flags,4,2                      ; @Flags
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc failed"

	.comm	_Ttys,4,2                       ; @Ttys
	.comm	_next,4,2                       ; @next
	.no_dead_strip	_add_tty
.subsections_via_symbols
