	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function multipart_buffer_read
_multipart_buffer_read:                 ## @multipart_buffer_read
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %rsi
	cmpq	%rdx, %rsi
	jae	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_fill_buffer
	movq	(%r14), %rsi
LBB0_2:
	movq	8(%r14), %rdi
	movl	20(%r14), %edx
	movl	16(%r14), %ecx
	movl	$1, %r8d
	callq	_php_ap_memstr
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	8(%r14), %rdi
	movq	%r13, %r12
	subq	%rdi, %r12
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_7
## %bb.4:
	movq	(%r14), %rsi
	movl	20(%r14), %edx
	movl	16(%r14), %ecx
	xorl	%r8d, %r8d
	callq	_php_ap_memstr
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	jmp	LBB0_7
LBB0_6:
	movq	(%r14), %r12
LBB0_7:
	decq	%rbx
	cmpq	%rbx, %r12
	cmovbq	%r12, %rbx
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.9:
	movq	8(%r14), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_memcpy
	movb	$0, (%r15,%rbx)
	testq	%r13, %r13
	je	LBB0_12
## %bb.10:
	cmpb	$13, -1(%r15,%rbx)
	jne	LBB0_12
## %bb.11:
	decq	%rbx
	movb	$0, (%r15,%rbx)
LBB0_12:
	movslq	%ebx, %rax
	subq	%rax, (%r14)
	addq	%rbx, 8(%r14)
	jmp	LBB0_13
LBB0_8:
	xorl	%ebx, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_multipart_buffer_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function multipart_buffer_read
_multipart_buffer_read:                 ; @multipart_buffer_read
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x1, [x0]
	cmp	x1, x2
	b.hs	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_fill_buffer
	ldr	x1, [x19]
LBB0_2:
	ldr	x0, [x19, #8]
	ldp	w3, w2, [x19, #16]
	mov	w4, #1
	bl	_php_ap_memstr
	mov	x23, x0
	cbz	x0, LBB0_6
; %bb.3:
	ldr	x0, [x19, #8]
	sub	x24, x23, x0
	cbz	x22, LBB0_7
; %bb.4:
	ldr	x1, [x19]
	ldp	w3, w2, [x19, #16]
	mov	w4, #0
	bl	_php_ap_memstr
	cbz	x0, LBB0_7
; %bb.5:
	mov	w8, #1
	str	w8, [x22]
	b	LBB0_7
LBB0_6:
	ldr	x24, [x19]
LBB0_7:
	sub	x8, x21, #1
	cmp	x24, x8
	csel	x21, x24, x8, lo
	cbz	x21, LBB0_12
; %bb.8:
	ldr	x1, [x19, #8]
	mov	x0, x20
	mov	x2, x21
	bl	_memcpy
	strb	wzr, [x20, x21]
	cbz	x23, LBB0_11
; %bb.9:
	sub	x8, x21, #1
	ldrb	w9, [x20, x8]
	cmp	w9, #13
	b.ne	LBB0_11
; %bb.10:
	strb	wzr, [x20, x8]
	mov	x21, x8
LBB0_11:
	ldp	x8, x9, [x19]
	sub	x8, x8, w21, sxtw
	add	x9, x9, x21
	stp	x8, x9, [x19]
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_multipart_buffer_read
.subsections_via_symbols
