	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function phar_stream_write
_phar_stream_write:                     ## @phar_stream_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	movl	16(%rbx), %edi
	movq	(%rbx), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_php_stream_seek
	movl	16(%rbx), %edi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_php_stream_write
	cmpq	%r14, %rax
	jne	LBB0_1
## %bb.2:
	movl	16(%rbx), %edi
	callq	_php_stream_tell
	movq	%rax, (%rbx)
	movq	8(%rbx), %rcx
	movq	(%rcx), %rdx
	cmpq	%rdx, %rax
	jle	LBB0_4
## %bb.3:
	movq	%rax, (%rcx)
	movq	%rax, %rdx
LBB0_4:
	movq	%rdx, 8(%rcx)
	movl	20(%rcx), %eax
	movl	%eax, 24(%rcx)
	movl	$1, 16(%rcx)
	jmp	LBB0_5
LBB0_1:
	movl	(%r12), %esi
	movl	4(%r12), %edi
	movq	8(%rbx), %rax
	movq	24(%rbx), %rcx
	movl	28(%rax), %r8d
	movl	(%rcx), %r9d
	leaq	L_.str(%rip), %rdx
	movl	%r14d, %ecx
	callq	_php_stream_wrapper_log_error
	movl	$-1, %r14d
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phar error: Could not write %d characters to \"%s\" in phar \"%s\""

	.no_dead_strip	_phar_stream_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function phar_stream_write
_phar_stream_write:                     ; @phar_stream_write
	.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	x21, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldr	w0, [x22, #16]
	ldr	x1, [x22]
Lloh0:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_php_stream_seek
	ldr	w0, [x22, #16]
	mov	x1, x21
	mov	x2, x19
	bl	_php_stream_write
	cmp	x0, x19
	b.ne	LBB0_4
; %bb.1:
	ldr	w0, [x22, #16]
	bl	_php_stream_tell
	str	x0, [x22]
	ldr	x8, [x22, #8]
	ldr	x9, [x8]
	cmp	x0, x9
	b.le	LBB0_3
; %bb.2:
	str	x0, [x8]
	mov	x9, x0
LBB0_3:
	str	x9, [x8, #8]
	ldr	w9, [x8, #20]
	str	w9, [x8, #24]
	mov	w9, #1
	str	w9, [x8, #16]
	b	LBB0_5
LBB0_4:
	ldp	w1, w0, [x20]
	ldr	x8, [x22, #8]
	ldr	w4, [x8, #28]
	ldr	x8, [x22, #24]
	ldr	w5, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x19
	bl	_php_stream_wrapper_log_error
	mov	w19, #-1
LBB0_5:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phar error: Could not write %d characters to \"%s\" in phar \"%s\""

	.no_dead_strip	_phar_stream_write
.subsections_via_symbols
