	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function linebuffer_write
_linebuffer_write:                      ## @linebuffer_write
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	testq	%rsi, %rsi
	je	LBB0_37
## %bb.1:
	movl	%edx, %ebx
	testl	%edx, %edx
	jle	LBB0_37
## %bb.2:
	movq	8(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_37
## %bb.3:
	cmpq	$0, (%rdi)
	je	LBB0_37
## %bb.4:
	movq	%rsi, %r15
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_BIO_clear_retry_flags
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r15, %r14
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##     Child Loop BB0_10 Depth 2
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %ecx
	addq	%r14, %rcx
	movq	%r14, %rax
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%rax), %r15d
	cmpb	$10, %r15b
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	incq	%rax
	cmpq	%rcx, %rax
	jb	LBB0_6
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	xorl	%ecx, %ecx
	cmpb	$10, %r15b
	sete	%cl
	addq	%rax, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=2
	subl	%ebx, %eax
	movl	%eax, 4(%r12)
LBB0_10:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpb	$10, %r15b
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	4(%r12), %r13d
	testl	%r13d, %r13d
	jle	LBB0_23
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	(%r12), %eax
	subl	%r13d, %eax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	subq	%r14, %rbx
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=2
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	subq	%r14, %rbx
	movslq	(%r12), %rcx
	movslq	4(%r12), %r13
	movq	%rcx, %rax
	subq	%r13, %rax
	cmpq	%rax, %rbx
	jle	LBB0_24
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=2
	testl	%r13d, %r13d
	jle	LBB0_24
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=2
	testq	%rbx, %rbx
	jle	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	%r14, %rsi
	movslq	%eax, %r14
	movl	%r13d, %edi
	addq	8(%r12), %rdi
	cmpq	%r14, %rbx
	jle	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	%rsi, %rbx
	movl	%r14d, %edx
	callq	_memcpy
	movl	4(%r12), %edx
	addl	%r14d, %edx
	movl	%edx, 4(%r12)
	subl	%r14d, -48(%rbp)                ## 4-byte Folded Spill
	addq	%r14, %rbx
	addl	%r14d, -44(%rbp)                ## 4-byte Folded Spill
	movq	%rbx, %r14
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=2
	movl	%r13d, %edx
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_10 Depth=2
	movl	%ebx, %edx
	callq	_memcpy
	movl	4(%r12), %edx
	addl	%ebx, %edx
	movl	%edx, 4(%r12)
	subl	%ebx, -48(%rbp)                 ## 4-byte Folded Spill
	addl	%ebx, -44(%rbp)                 ## 4-byte Folded Spill
	movq	-64(%rbp), %r14                 ## 8-byte Reload
LBB0_20:                                ##   in Loop: Header=BB0_10 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	8(%r12), %rsi
	callq	_BIO_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jle	LBB0_32
## %bb.21:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	4(%r12), %eax
	movl	%eax, %edx
	subl	%ebx, %edx
	jle	LBB0_9
## %bb.22:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	8(%r12), %rdi
	movl	%ebx, %esi
	addq	%rdi, %rsi
	callq	_memmove
	movl	4(%r12), %eax
	jmp	LBB0_9
LBB0_23:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	subq	%r14, %rbx
	jmp	LBB0_25
LBB0_24:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%rcx, %rbx
	jle	LBB0_38
LBB0_25:                                ##   in Loop: Header=BB0_5 Depth=1
	testq	%rbx, %rbx
	jle	LBB0_28
## %bb.26:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_BIO_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jle	LBB0_33
## %bb.27:                              ##   in Loop: Header=BB0_5 Depth=1
	addl	%ebx, -44(%rbp)                 ## 4-byte Folded Spill
	movl	%ebx, %eax
	addq	%rax, %r14
	subl	%ebx, -48(%rbp)                 ## 4-byte Folded Spill
LBB0_28:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpb	$10, %r15b
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_5 Depth=1
	testl	%ebx, %ebx
	jg	LBB0_5
LBB0_30:
	testl	%ebx, %ebx
	jle	LBB0_34
## %bb.31:
	movq	%r14, %rsi
	movl	4(%r12), %r13d
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_39
LBB0_32:
	movl	%r13d, 4(%r12)
LBB0_33:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_BIO_copy_next_retry
	testl	%ebx, %ebx
	js	LBB0_36
LBB0_34:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_37
LBB0_36:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	testl	%r14d, %r14d
	cmovlel	%ebx, %r14d
LBB0_37:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_38:
	movq	%r14, %rsi
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jle	LBB0_37
LBB0_39:
	movslq	%r13d, %rdi
	addq	8(%r12), %rdi
	movl	%ebx, %edx
	callq	_memcpy
	addl	%ebx, 4(%r12)
	addl	%ebx, %r14d
	jmp	LBB0_37
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_linebuffer_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function linebuffer_write
_linebuffer_write:                      ; @linebuffer_write
	.cfi_startproc
; %bb.0:
	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	w19, #0
	cbz	x1, LBB0_34
; %bb.1:
	mov	x20, x2
	cmp	w2, #1
	b.lt	LBB0_34
; %bb.2:
	mov	x22, x0
	ldr	x25, [x0, #8]
	cbz	x25, LBB0_31
; %bb.3:
	ldr	x8, [x22]
	cbz	x8, LBB0_31
; %bb.4:
	mov	x21, x1
	mov	x0, x22
	bl	_BIO_clear_retry_flags
	mov	w19, #0
	str	x22, [sp, #8]                   ; 8-byte Folded Spill
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;     Child Loop BB0_10 Depth 2
	add	x9, x21, w20, uxtw
	mov	x8, x21
LBB0_6:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w26, [x8]
	cmp	w26, #10
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x8, x8, #1
	cmp	x8, x9
	b.lo	LBB0_6
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	w26, #10
	cinc	x27, x8, eq
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	sub	w8, w8, w23
	str	w8, [x25, #4]
LBB0_10:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w26, #10
	b.ne	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w28, [x25, #4]
	cmp	w28, #1
	b.lt	LBB0_22
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w8, [x25]
	sub	w24, w8, w28
	sub	x23, x27, x21
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=2
	sub	x23, x27, x21
	ldpsw	x8, x28, [x25]
	sub	x24, x8, x28
	cmp	x23, x24
	ccmp	w28, #0, #4, gt
	b.le	LBB0_23
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=2
	cmp	x23, #1
	b.lt	LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	x8, x24
	sxtw	x22, w8
	ldr	x8, [x25, #8]
	add	x0, x8, w28, uxtw
	cmp	x23, x22
	b.le	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	x1, x21
	mov	x2, x24
	bl	_memcpy
	ldr	w8, [x25, #4]
	add	w2, w8, w24
	str	w2, [x25, #4]
	sub	w20, w20, w24
	add	x21, x21, x22
	add	w19, w24, w19
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_10 Depth=2
	mov	x2, x28
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_10 Depth=2
	mov	x1, x21
	mov	x2, x23
	bl	_memcpy
	ldr	w8, [x25, #4]
	add	w2, w8, w23
	str	w2, [x25, #4]
	sub	w20, w20, w23
	add	w19, w19, w23
	mov	x21, x27
LBB0_19:                                ;   in Loop: Header=BB0_10 Depth=2
	ldr	x22, [sp, #8]                   ; 8-byte Folded Reload
	ldr	x0, [x22]
	ldr	x1, [x25, #8]
	bl	_BIO_write
	mov	x23, x0
	cmp	w0, #0
	b.le	LBB0_32
; %bb.20:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w8, [x25, #4]
	subs	w2, w8, w23
	b.le	LBB0_9
; %bb.21:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	x0, [x25, #8]
	add	x1, x0, w23, uxtw
	bl	_memmove
	ldr	w8, [x25, #4]
	b	LBB0_9
LBB0_22:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	x23, x27, x21
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	x23, x8
	ldr	x22, [sp, #8]                   ; 8-byte Folded Reload
	b.le	LBB0_35
LBB0_24:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	x23, #1
	b.lt	LBB0_27
; %bb.25:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x22]
	mov	x1, x21
	mov	x2, x23
	bl	_BIO_write
	mov	x23, x0
	cmp	w0, #0
	b.le	LBB0_33
; %bb.26:                               ;   in Loop: Header=BB0_5 Depth=1
	add	w19, w23, w19
	add	x21, x21, w23, uxtw
	sub	w20, w20, w23
LBB0_27:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w26, #10
	b.ne	LBB0_29
; %bb.28:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	w20, #0
	b.gt	LBB0_5
LBB0_29:
	cmp	w20, #1
	b.lt	LBB0_34
; %bb.30:
	ldr	w28, [x25, #4]
	b	LBB0_36
LBB0_31:
	mov	w19, #0
	b	LBB0_34
LBB0_32:
	str	w28, [x25, #4]
LBB0_33:
	mov	x0, x22
	bl	_BIO_copy_next_retry
	cmp	w19, #0
	csel	w8, w19, w23, gt
	tst	w23, #0x80000000
	csel	w19, w19, w8, eq
LBB0_34:
	mov	x0, x19
	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_35:
	cmp	w20, #0
	b.le	LBB0_34
LBB0_36:
	ldr	x8, [x25, #8]
	add	x0, x8, w28, sxtw
	mov	x1, x21
	mov	x2, x20
	bl	_memcpy
	ldr	w8, [x25, #4]
	add	w8, w8, w20
	str	w8, [x25, #4]
	add	w19, w19, w20
	b	LBB0_34
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_linebuffer_write
.subsections_via_symbols
