	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isdn_tty_edit_at
_isdn_tty_edit_at:                      ## @isdn_tty_edit_at
	.cfi_startproc
## %bb.0:
	testl	%esi, %esi
	jle	LBB0_1
## %bb.2:
	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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rdi, %r15
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	$0, 16(%rbx)
LBB0_30:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	cmpl	%r13d, -56(%rbp)                ## 4-byte Folded Reload
	je	LBB0_31
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r15,%r13), %r12d
	movq	(%rbx), %rax
	movq	_REG_CR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpb	(%rax,%rcx), %r12b
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_REG_LF@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpb	(%rax,%rcx), %r12b
	jne	LBB0_11
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movb	$0, (%rax,%rcx)
	movq	(%rbx), %rax
	movq	_REG_ECHO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movsbl	(%rax,%rcx), %eax
	movq	_BIT_ECHO@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movb	%r12b, -42(%rbp)
	movb	$0, -41(%rbp)
	leaq	-42(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_isdn_tty_at_cout
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$2, 16(%rbx)
	jb	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	$2, %edx
	callq	_strncmp
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_isdn_tty_parse_at
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_REG_BS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpb	(%rax,%rcx), %r12b
	jne	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rbx), %rcx
	leaq	-3(%rcx), %rdx
	cmpq	$-3, %rdx
	ja	LBB0_30
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	testq	%rcx, %rcx
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	decq	%rcx
	movq	%rcx, 16(%rbx)
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_REG_ECHO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movsbl	(%rax,%rcx), %eax
	movq	_BIT_ECHO@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_30
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	callq	_isdn_tty_at_cout
	jmp	LBB0_30
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movsbl	%r12b, %r14d
	movl	%r14d, %edi
	callq	_cmdchar
	testq	%rax, %rax
	je	LBB0_30
## %bb.18:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rbx), %rax
	movq	_REG_ECHO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movsbl	(%rax,%rcx), %eax
	movq	_BIT_ECHO@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_3 Depth=1
	movb	%r12b, -42(%rbp)
	movb	$0, -41(%rbp)
	leaq	-42(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_isdn_tty_at_cout
LBB0_20:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$254, 16(%rbx)
	ja	LBB0_30
## %bb.21:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, %edi
	callq	_my_toupper
	movq	16(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_26
## %bb.22:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$1, %rcx
	jne	LBB0_28
## %bb.23:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpb	$84, %al
	jne	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rax
	movb	$84, 1(%rax)
	jmp	LBB0_29
LBB0_28:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rdx
	movb	%al, (%rdx,%rcx)
	jmp	LBB0_29
LBB0_25:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	$0, 16(%rbx)
LBB0_26:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpb	$65, %al
	jne	LBB0_30
## %bb.27:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rax
	movb	$65, (%rax)
LBB0_29:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	leaq	1(%rcx), %rdx
	movq	%rdx, 16(%rbx)
	movb	$0, 1(%rax,%rcx)
	jmp	LBB0_30
LBB0_31:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	xorl	%eax, %eax
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_CR,8,3                     ## @REG_CR
	.comm	_REG_LF,8,3                     ## @REG_LF
	.comm	_REG_ECHO,8,3                   ## @REG_ECHO
	.comm	_BIT_ECHO,4,2                   ## @BIT_ECHO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AT"

	.comm	_REG_BS,8,3                     ## @REG_BS
L_.str.1:                               ## @.str.1
	.asciz	"\b"

	.no_dead_strip	_isdn_tty_edit_at
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isdn_tty_edit_at
_isdn_tty_edit_at:                      ; @isdn_tty_edit_at
	.cfi_startproc
; %bb.0:
	cmp	w1, #1
	b.lt	LBB0_31
; %bb.1:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x0
Lloh0:
	adrp	x25, _REG_CR@GOTPAGE
Lloh1:
	ldr	x25, [x25, _REG_CR@GOTPAGEOFF]
Lloh2:
	adrp	x26, _REG_ECHO@GOTPAGE
Lloh3:
	ldr	x26, [x26, _REG_ECHO@GOTPAGEOFF]
Lloh4:
	adrp	x22, l_.str@PAGE
Lloh5:
	add	x22, x22, l_.str@PAGEOFF
Lloh6:
	adrp	x27, _BIT_ECHO@GOTPAGE
Lloh7:
	ldr	x27, [x27, _BIT_ECHO@GOTPAGEOFF]
Lloh8:
	adrp	x28, _REG_LF@GOTPAGE
Lloh9:
	ldr	x28, [x28, _REG_LF@GOTPAGEOFF]
	str	w1, [sp, #8]                    ; 4-byte Folded Spill
	mov	x19, x1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	xzr, [x20, #16]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	subs	w19, w19, #1
	b.eq	LBB0_30
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w23, [x21]
	ldr	x8, [x20]
	ldr	x9, [x25]
	ldrb	w9, [x8, x9]
	cmp	w23, w9
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x28]
	ldrb	w9, [x8, x9]
	cmp	w23, w9
	b.ne	LBB0_11
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldp	x8, x9, [x20, #8]
	strb	wzr, [x8, x9]
	ldr	x8, [x20]
	ldr	x9, [x26]
	ldrsb	w8, [x8, x9]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	strb	w23, [sp, #14]
	strb	wzr, [sp, #15]
	add	x0, sp, #14
	mov	x1, x20
	bl	_isdn_tty_at_cout
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #16]
	cmp	x8, #2
	b.lo	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x20, #8]
	mov	x1, x22
	mov	w2, #2
	bl	_strncmp
	cbnz	w0, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_isdn_tty_parse_at
	b	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh10:
	adrp	x9, _REG_BS@GOTPAGE
Lloh11:
	ldr	x9, [x9, _REG_BS@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	ldrb	w9, [x8, x9]
	cmp	w23, w9
	b.ne	LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x20, #16]
	sub	x10, x9, #3
	cmn	x10, #3
	b.hi	LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	cbz	x9, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	x9, x9, #1
	str	x9, [x20, #16]
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x26]
	ldrsb	w8, [x8, x9]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_isdn_tty_at_cout
	b	LBB0_3
LBB0_17:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtb	w24, w23
	mov	x0, x24
	bl	_cmdchar
	cbz	x0, LBB0_3
; %bb.18:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x26]
	ldrsb	w8, [x8, x9]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
	strb	w23, [sp, #14]
	strb	wzr, [sp, #15]
	add	x0, sp, #14
	mov	x1, x20
	bl	_isdn_tty_at_cout
LBB0_20:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #16]
	cmp	x8, #254
	b.hi	LBB0_3
; %bb.21:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	bl	_my_toupper
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_27
; %bb.22:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	x8, #1
	b.ne	LBB0_25
; %bb.23:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	w0, #84
	b.ne	LBB0_26
; %bb.24:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #8]
	mov	w9, #84
	strb	w9, [x8, #1]
	b	LBB0_29
LBB0_25:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x20, #8]
	strb	w0, [x9, x8]
	b	LBB0_29
LBB0_26:                                ;   in Loop: Header=BB0_4 Depth=1
	str	xzr, [x20, #16]
LBB0_27:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w0, #65
	b.ne	LBB0_3
; %bb.28:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #8]
	mov	w9, #65
	strb	w9, [x8]
LBB0_29:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	x8, x9, [x20, #8]
	add	x9, x9, #1
	str	x9, [x20, #16]
	strb	wzr, [x8, x9]
	b	LBB0_3
LBB0_30:
	ldr	w0, [sp, #8]                    ; 4-byte Folded Reload
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_31:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	.cfi_same_value w25
	.cfi_same_value w26
	.cfi_same_value w27
	.cfi_same_value w28
	mov	w0, #0
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_CR,8,3                     ; @REG_CR
	.comm	_REG_LF,8,3                     ; @REG_LF
	.comm	_REG_ECHO,8,3                   ; @REG_ECHO
	.comm	_BIT_ECHO,4,2                   ; @BIT_ECHO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AT"

	.comm	_REG_BS,8,3                     ; @REG_BS
l_.str.1:                               ; @.str.1
	.asciz	"\b"

	.no_dead_strip	_isdn_tty_edit_at
.subsections_via_symbols
