	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isdnloop_writecmd
_isdnloop_writecmd:                     ## @isdnloop_writecmd
	.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
	subq	$296, %rsp                      ## imm = 0x128
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movl	%edx, -308(%rbp)                ## 4-byte Spill
	movq	%rdi, -320(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	movl	%esi, %r14d
	xorl	%r12d, %r12d
	movl	$1, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-328(%rbp), %r12                ## 8-byte Reload
	addl	%r14d, %r12d
	movl	-312(%rbp), %eax                ## 4-byte Reload
	subl	%r14d, %eax
	movl	%eax, %r14d
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	testl	%r14d, %r14d
	je	LBB0_17
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	cmpl	$255, %r14d
	movl	$255, %r15d
	cmovll	%r14d, %r15d
	cmpl	$0, -308(%rbp)                  ## 4-byte Folded Reload
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	-304(%rbp), %rdi
	movq	-320(%rbp), %rsi                ## 8-byte Reload
	movl	%r15d, %edx
	callq	_copy_from_user
	testq	%rax, %rax
	je	LBB0_7
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	-304(%rbp), %rdi
	movq	-320(%rbp), %rsi                ## 8-byte Reload
	movl	%r15d, %edx
	callq	_memcpy
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movl	$62, %esi
	callq	_isdnloop_putmsg
	testl	%r14d, %r14d
	jle	LBB0_16
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, -328(%rbp)                ## 8-byte Spill
	movl	$1, %eax
	cmovlel	%r14d, %eax
	subl	%eax, %r15d
	incq	%r15
	movl	%r14d, -312(%rbp)               ## 4-byte Spill
	movl	%r14d, %r12d
	decq	%r12
	xorl	%r14d, %r14d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=2
	incl	%r13d
	incq	%r14
	cmpq	%r14, %r15
	je	LBB0_15
LBB0_9:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movsbl	-304(%rbp,%r14), %esi
	movq	%rbx, %rdi
	callq	_isdnloop_putmsg
	movzbl	-304(%rbp,%r14), %eax
	movq	(%rbx), %rcx
	movq	8(%rbx), %rdx
	movb	%al, (%rcx,%rdx)
	cmpb	$10, -304(%rbp,%r14)
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movb	$0, (%rax,%rcx)
	movq	$0, 8(%rbx)
	movq	%rbx, %rdi
	callq	_isdnloop_parse_cmd
	cmpl	%r14d, %r12d
	je	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%rbx, %rdi
	movl	$62, %esi
	callq	_isdnloop_putmsg
	incl	%r13d
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=2
	movq	8(%rbx), %rax
	cmpq	$58, %rax
	ja	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=2
	incq	%rax
	movq	%rax, 8(%rbx)
	jmp	LBB0_14
LBB0_1:
	movl	$1, %r13d
	xorl	%r12d, %r12d
LBB0_17:
	movq	_ISDN_STAT_STAVAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -296(%rbp)
	movl	24(%rbx), %eax
	movl	%eax, -300(%rbp)
	movl	%r13d, -304(%rbp)
	leaq	-304(%rbp), %rdi
	callq	*16(%rbx)
	jmp	LBB0_18
LBB0_5:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.19:
	movl	%r12d, %eax
	addq	$296, %rsp                      ## imm = 0x128
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_ISDN_STAT_STAVAIL,4,2          ## @ISDN_STAT_STAVAIL
	.no_dead_strip	_isdnloop_writecmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isdnloop_writecmd
_isdnloop_writecmd:                     ; @isdnloop_writecmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #368
	.cfi_def_cfa_offset 368
	stp	x28, x27, [sp, #272]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #288]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #304]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #320]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #336]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #352]            ; 16-byte Folded Spill
	add	x29, sp, #352
	.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, x3
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	cbz	w1, LBB0_14
; %bb.1:
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	mov	w19, #0
	mov	w25, #1
	mov	w26, #255
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	w22, LBB0_15
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	cmp	w22, #255
	csel	w24, w22, w26, lt
	add	x0, sp, #8
	mov	x1, x23
	mov	x2, x24
	cbz	w21, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_copy_from_user
	cbz	x0, LBB0_6
	b	LBB0_16
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_memcpy
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	w1, #62
	bl	_isdnloop_putmsg
	cmp	w22, #1
	b.lt	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x27, sp, #8
	csinc	w8, w22, wzr, lt
	sub	w8, w24, w8
	add	x24, x8, #1
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	w25, w25, #1
	add	x27, x27, #1
	add	w19, w19, #1
	sub	w22, w22, #1
	sub	x24, x24, #1
	cbz	x24, LBB0_2
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsb	w1, [x27]
	mov	x0, x20
	bl	_isdnloop_putmsg
	ldrb	w8, [x27]
	ldp	x9, x10, [x20]
	strb	w8, [x9, x10]
	ldrb	w8, [x27]
	cmp	w8, #10
	b.ne	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldp	x8, x9, [x20]
	strb	wzr, [x8, x9]
	str	xzr, [x20, #8]
	mov	x0, x20
	bl	_isdnloop_parse_cmd
	cmp	w22, #1
	b.eq	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x20
	mov	w1, #62
	bl	_isdnloop_putmsg
	add	w25, w25, #1
	b	LBB0_8
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x20, #8]
	cmp	x8, #58
	b.hi	LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=2
	add	x8, x8, #1
	str	x8, [x20, #8]
	b	LBB0_8
LBB0_14:
	mov	w19, #0
	mov	w25, #1
LBB0_15:
Lloh3:
	adrp	x8, _ISDN_STAT_STAVAIL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ISDN_STAT_STAVAIL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	ldr	w8, [x20, #24]
	stp	w8, w9, [sp, #12]
	str	w25, [sp, #8]
	ldr	x8, [x20, #16]
	add	x0, sp, #8
	blr	x8
	b	LBB0_17
LBB0_16:
Lloh6:
	adrp	x8, _EFAULT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_17:
	ldur	x8, [x29, #-88]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	mov	x0, x19
	ldp	x29, x30, [sp, #352]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #336]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #320]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #304]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #288]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #272]            ; 16-byte Folded Reload
	add	sp, sp, #368
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_ISDN_STAT_STAVAIL,4,2          ; @ISDN_STAT_STAVAIL
	.no_dead_strip	_isdnloop_writecmd
.subsections_via_symbols
