	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function php_sqlite3_stream_write
_php_sqlite3_stream_write:              ## @php_sqlite3_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rbx
	movq	_SQLITE_OPEN_READONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_3
## %bb.1:
	movq	_E_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_2
LBB0_3:
	movq	%rdx, %r14
	movq	8(%rbx), %rcx
	leaq	(%rcx,%rdx), %rax
	cmpq	16(%rbx), %rax
	jbe	LBB0_5
## %bb.4:
	movq	_E_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_2:
	xorl	%edi, %edi
	callq	_php_error_docref
	movl	$-1, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rdi, %r15
	movl	24(%rbx), %edi
	movq	%r14, %rdx
	callq	_sqlite3_blob_write
	movq	%rax, %rcx
	movq	_SQLITE_OK@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_9
## %bb.6:
	movq	8(%rbx), %rax
	addq	%r14, %rax
	movq	16(%rbx), %rcx
	cmpq	%rcx, %rax
	jb	LBB0_8
## %bb.7:
	movl	$1, (%r15)
	movq	%rcx, %rax
LBB0_8:
	movq	%rax, 8(%rbx)
	movl	%r14d, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OPEN_READONLY,4,2       ## @SQLITE_OPEN_READONLY
	.comm	_E_WARNING,4,2                  ## @E_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't write to blob stream: is open as read only"

L_.str.1:                               ## @.str.1
	.asciz	"It is not possible to increase the size of a BLOB"

	.comm	_SQLITE_OK,8,3                  ## @SQLITE_OK
	.no_dead_strip	_php_sqlite3_stream_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function php_sqlite3_stream_write
_php_sqlite3_stream_write:              ; @php_sqlite3_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
	ldr	x21, [x0, #8]
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _SQLITE_OPEN_READONLY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SQLITE_OPEN_READONLY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _E_WARNING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _E_WARNING@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	mov	x19, x2
	ldp	x3, x8, [x21, #8]
	add	x9, x3, x2
	cmp	x9, x8
	b.ls	LBB0_7
; %bb.3:
Lloh8:
	adrp	x8, _E_WARNING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _E_WARNING@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, #0
	bl	_php_error_docref
LBB0_5:
	mov	w19, #-1
LBB0_6:
	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
LBB0_7:
	mov	x20, x0
	ldr	w0, [x21, #24]
	mov	x2, x19
	bl	_sqlite3_blob_write
Lloh13:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.8:
	ldp	x9, x8, [x21, #8]
	add	x9, x9, x19
	cmp	x9, x8
	b.lo	LBB0_10
; %bb.9:
	mov	w9, #1
	str	w9, [x20]
	mov	x9, x8
LBB0_10:
	str	x9, [x21, #8]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OPEN_READONLY,4,2       ; @SQLITE_OPEN_READONLY
	.comm	_E_WARNING,4,2                  ; @E_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't write to blob stream: is open as read only"

l_.str.1:                               ; @.str.1
	.asciz	"It is not possible to increase the size of a BLOB"

	.comm	_SQLITE_OK,8,3                  ; @SQLITE_OK
	.no_dead_strip	_php_sqlite3_stream_write
.subsections_via_symbols
