	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function unixWrite
_unixWrite:                             ## @unixWrite
	.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
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_assert
	xorl	%edi, %edi
	testl	%r12d, %r12d
	setg	%dil
	callq	_assert
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	movl	%r12d, %ecx
	callq	_seekAndWrite
	cmpl	%r12d, %eax
	jge	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	testl	%eax, %eax
	jle	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rcx
	subl	%eax, %r12d
	addl	%eax, %r15d
	movl	%eax, %ebx
	addq	%rcx, %rbx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	movl	%r12d, %ecx
	callq	_seekAndWrite
	cmpl	%eax, %r12d
	jg	LBB0_1
LBB0_3:
	movl	$1, %edi
	callq	_SimulateIOError
	movl	$1, %edi
	callq	_SimulateDiskfullError
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_storeLastErrno
	movq	_SQLITE_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSPC,8,3                     ## @ENOSPC
	.comm	_SQLITE_IOERR_WRITE,4,2         ## @SQLITE_IOERR_WRITE
	.comm	_SQLITE_FULL,4,2                ## @SQLITE_FULL
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_PENDING_BYTE,4,2               ## @PENDING_BYTE
	.no_dead_strip	_unixWrite
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function unixWrite
_unixWrite:                             ; @unixWrite
	.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	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_assert
	cmp	w21, #0
	cset	w0, gt
	bl	_assert
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	mov	x3, x21
	bl	_seekAndWrite
	cmp	w0, w21
	b.ge	LBB0_3
; %bb.1:
	cmp	w0, #1
	b.lt	LBB0_3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sub	w21, w21, w0
	add	w20, w0, w20
	add	x22, x22, w0, uxtw
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	mov	x3, x21
	bl	_seekAndWrite
	cmp	w21, w0
	ccmp	w0, #0, #4, gt
	b.gt	LBB0_2
LBB0_3:
	mov	w0, #1
	bl	_SimulateIOError
	mov	w0, #1
	bl	_SimulateDiskfullError
	mov	x0, x19
	mov	w1, #0
	bl	_storeLastErrno
Lloh0:
	adrp	x8, _SQLITE_FULL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_FULL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSPC,8,3                     ; @ENOSPC
	.comm	_SQLITE_IOERR_WRITE,4,2         ; @SQLITE_IOERR_WRITE
	.comm	_SQLITE_FULL,4,2                ; @SQLITE_FULL
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_PENDING_BYTE,4,2               ; @PENDING_BYTE
	.no_dead_strip	_unixWrite
.subsections_via_symbols
