	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function phar_stream_read
_phar_stream_read:                      ## @phar_stream_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	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rdi), %r13
	movq	24(%r13), %rbx
	cmpq	$0, 16(%rbx)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_phar_get_link_source
	movq	%rax, %rbx
LBB0_2:
	cmpq	$0, 8(%rbx)
	je	LBB0_4
## %bb.3:
	movl	$-1, %r15d
	movl	$1, %ecx
	jmp	LBB0_5
LBB0_4:
	movl	16(%r13), %edi
	movq	8(%r13), %rsi
	addq	(%r13), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_php_stream_seek
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	16(%r13), %r15d
	movq	(%rbx), %rsi
	subq	(%r13), %rsi
	movq	%r12, %rdi
	callq	_MIN
	movl	%r15d, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_php_stream_read
	movq	%rax, %r15
	movl	16(%r13), %edi
	callq	_php_stream_tell
	subq	8(%r13), %rax
	movq	%rax, (%r13)
	xorl	%ecx, %ecx
	cmpq	(%rbx), %rax
	sete	%cl
LBB0_5:
	movl	%ecx, (%r14)
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.no_dead_strip	_phar_stream_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function phar_stream_read
_phar_stream_read:                      ; @phar_stream_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, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x24, [x0, #8]
	ldr	x20, [x24, #24]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_phar_get_link_source
	mov	x20, x0
LBB0_2:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_4
; %bb.3:
	mov	w21, #-1
	mov	w8, #1
	b	LBB0_5
LBB0_4:
	ldr	w0, [x24, #16]
	ldp	x8, x9, [x24]
	add	x1, x9, x8
Lloh0:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_php_stream_seek
	ldr	w23, [x24, #16]
	ldr	x8, [x20]
	ldr	x9, [x24]
	sub	x1, x8, x9
	mov	x0, x22
	bl	_MIN
	mov	x2, x0
	mov	x0, x23
	mov	x1, x21
	bl	_php_stream_read
	mov	x21, x0
	ldr	w0, [x24, #16]
	bl	_php_stream_tell
	ldr	x8, [x24, #8]
	ldr	x9, [x20]
	sub	x8, x0, x8
	cmp	x8, x9
	str	x8, [x24]
	cset	w8, eq
LBB0_5:
	str	w8, [x19]
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.no_dead_strip	_phar_stream_read
.subsections_via_symbols
