	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sqlite3_soft_heap_limit64      ## -- Begin function sqlite3_soft_heap_limit64
	.p2align	4, 0x90
_sqlite3_soft_heap_limit64:             ## @sqlite3_soft_heap_limit64
	.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
	movl	%edi, %ebx
	xorl	%eax, %eax
	callq	_sqlite3_initialize
	movl	$-1, %r14d
	testl	%eax, %eax
	je	LBB0_1
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_mem0@GOTPCREL(%rip), %r15
	movl	8(%r15), %edi
	callq	_sqlite3_mutex_enter
	movl	(%r15), %r14d
	testl	%ebx, %ebx
	js	LBB0_2
## %bb.3:
	movl	%ebx, (%r15)
	movq	_SQLITE_STATUS_MEMORY_USED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sqlite3StatusValue
	testl	%ebx, %ebx
	setne	%cl
	cmpl	%ebx, %eax
	setge	%al
	andb	%cl, %al
	movzbl	%al, %eax
	movl	%eax, 4(%r15)
	movl	8(%r15), %edi
	callq	_sqlite3_mutex_leave
	xorl	%eax, %eax
	callq	_sqlite3_memory_used
	subl	%ebx, %eax
	jle	LBB0_5
## %bb.4:
	movl	%eax, %edi
	callq	_sqlite3_release_memory
	jmp	LBB0_5
LBB0_2:
	movl	8(%r15), %edi
	callq	_sqlite3_mutex_leave
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_mem0,12,2                      ## @mem0
	.comm	_SQLITE_STATUS_MEMORY_USED,4,2  ## @SQLITE_STATUS_MEMORY_USED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sqlite3_soft_heap_limit64      ; -- Begin function sqlite3_soft_heap_limit64
	.p2align	2
_sqlite3_soft_heap_limit64:             ; @sqlite3_soft_heap_limit64
	.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, x0
	bl	_sqlite3_initialize
	cbz	w0, LBB0_3
; %bb.1:
	mov	w19, #-1
LBB0_2:
	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_3:
Lloh0:
	adrp	x21, _mem0@GOTPAGE
Lloh1:
	ldr	x21, [x21, _mem0@GOTPAGEOFF]
	ldr	w0, [x21, #8]
	bl	_sqlite3_mutex_enter
	ldr	w19, [x21]
	tbnz	w20, #31, LBB0_6
; %bb.4:
	str	w20, [x21]
Lloh2:
	adrp	x8, _SQLITE_STATUS_MEMORY_USED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SQLITE_STATUS_MEMORY_USED@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_sqlite3StatusValue
	cmp	w20, #0
	ccmp	w0, w20, #8, ne
	cset	w8, ge
	str	w8, [x21, #4]
	ldr	w0, [x21, #8]
	bl	_sqlite3_mutex_leave
	bl	_sqlite3_memory_used
	sub	w0, w0, w20
	cmp	w0, #1
	b.lt	LBB0_2
; %bb.5:
	bl	_sqlite3_release_memory
	b	LBB0_2
LBB0_6:
	ldr	w0, [x21, #8]
	bl	_sqlite3_mutex_leave
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_mem0,12,2                      ; @mem0
	.comm	_SQLITE_STATUS_MEMORY_USED,4,2  ; @SQLITE_STATUS_MEMORY_USED
.subsections_via_symbols
