	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function truncate_buffer_at_prefix
_truncate_buffer_at_prefix:             ## @truncate_buffer_at_prefix
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	testq	%rsi, %rsi
	setne	%al
	testq	%rdx, %rdx
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_strlen
	movl	%eax, (%r15)
LBB0_2:
	movq	%rbx, %rdi
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rax
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rdi
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%rbx, %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movzbl	-1(%rax), %ecx
	cmpb	$13, %cl
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpb	$10, %cl
	jne	LBB0_9
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movb	$0, (%rax)
	testq	%r15, %r15
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ecx
	subl	%ebx, %ecx
	movl	%ecx, (%r15)
	movq	%rax, %rdi
	jmp	LBB0_3
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_truncate_buffer_at_prefix
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function truncate_buffer_at_prefix
_truncate_buffer_at_prefix:             ; @truncate_buffer_at_prefix
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	cmp	x1, #0
	ccmp	x2, #0, #4, ne
	cset	w0, ne
	bl	_assert
	cbz	x21, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_strlen
	str	w0, [x21]
LBB0_2:
	mov	x0, x20
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x0, x0, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, x19
	bl	_strstr
	cbz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x0, x20
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldurb	w8, [x0, #-1]
	cmp	w8, #13
	ccmp	w8, #10, #4, ne
	b.ne	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	strb	wzr, [x0]
	cbz	x21, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w8, w0, w20
	str	w8, [x21]
	b	LBB0_4
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_truncate_buffer_at_prefix
.subsections_via_symbols
