	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pager_delmaster
_pager_delmaster:                       ## @pager_delmaster
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	(%rdi), %r12
	movl	(%r12), %edi
	addl	%edi, %edi
	callq	_sqlite3MallocZero
	movq	%rax, %r14
	movslq	(%r12), %rbx
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_SQLITE_OPEN_READONLY@GOTPCREL(%rip), %rax
	movq	_SQLITE_OPEN_MASTER_JOURNAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	xorl	%r8d, %r8d
	callq	_sqlite3OsOpen
	movl	%eax, %r15d
	jmp	LBB0_3
LBB0_2:
	movq	_SQLITE_NOMEM_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_3:
	leaq	(%r14,%rbx,4), %rbx
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_9
## %bb.4:
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_sqlite3OsFileSize
	movl	%eax, %r15d
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_9
## %bb.5:
	movl	4(%r12), %ecx
	movl	-44(%rbp), %eax
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leal	(%rcx,%rax), %edi
	addl	$2, %edi
	callq	_sqlite3Malloc
	testq	%rax, %rax
	je	LBB0_19
## %bb.6:
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movslq	-44(%rbp), %rbx
	movq	%r14, %rdi
	movq	%rax, %r13
	movq	%rax, %rsi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_sqlite3OsRead
	movl	%eax, %r15d
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_20
## %bb.7:
	movslq	-44(%rbp), %rax
	movb	$0, (%r13,%rax)
	cmpl	$0, -44(%rbp)
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	jle	LBB0_21
## %bb.8:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	addq	%r13, %rbx
	incq	%rbx
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	jmp	LBB0_11
LBB0_9:
	xorl	%edi, %edi
LBB0_22:
	callq	_sqlite3_free
	testq	%r14, %r14
	je	LBB0_24
## %bb.23:
	movq	%r14, %rdi
	callq	_sqlite3OsClose
	movq	%rbx, %rdi
	callq	_isOpen
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movq	%r14, %rdi
	callq	_sqlite3_free
LBB0_24:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r13, %rdi
	callq	_sqlite3Strlen30
	addq	%rax, %r13
	incq	%r13
	movq	%r13, %rax
	subq	-64(%rbp), %rax                 ## 8-byte Folded Reload
	movslq	-44(%rbp), %rcx
	cmpq	%rcx, %rax
	jge	LBB0_21
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	_SQLITE_ACCESS_EXISTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r13, %rsi
	leaq	-76(%rbp), %rcx
	callq	_sqlite3OsAccess
	movl	%eax, %r15d
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$0, -76(%rbp)
	je	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_SQLITE_OPEN_MAIN_JOURNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_SQLITE_OPEN_READONLY@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdx
	xorl	%r8d, %r8d
	callq	_sqlite3OsOpen
	movl	%eax, %r15d
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_readMasterJournal
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_sqlite3OsClose
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpb	$0, (%rbx)
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_10
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rbx, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_10
LBB0_17:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_22
LBB0_19:
	movq	_SQLITE_NOMEM_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%edi, %edi
	jmp	LBB0_22
LBB0_20:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%r13, %rdi
	jmp	LBB0_22
LBB0_21:
	movq	%r14, %rdi
	callq	_sqlite3OsClose
	movq	%r12, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	callq	_sqlite3OsDelete
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %r15d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_NOMEM_BKPT,4,2          ## @SQLITE_NOMEM_BKPT
	.comm	_SQLITE_OPEN_READONLY,4,2       ## @SQLITE_OPEN_READONLY
	.comm	_SQLITE_OPEN_MASTER_JOURNAL,4,2 ## @SQLITE_OPEN_MASTER_JOURNAL
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_SQLITE_ACCESS_EXISTS,4,2       ## @SQLITE_ACCESS_EXISTS
	.comm	_SQLITE_OPEN_MAIN_JOURNAL,4,2   ## @SQLITE_OPEN_MAIN_JOURNAL
	.no_dead_strip	_pager_delmaster
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pager_delmaster
_pager_delmaster:                       ; @pager_delmaster
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	ldr	x22, [x0]
	ldr	w8, [x22]
	lsl	w0, w8, #1
	bl	_sqlite3MallocZero
	mov	x19, x0
	ldrsw	x8, [x22]
	add	x20, x0, x8, lsl #2
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _SQLITE_OPEN_READONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_OPEN_READONLY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SQLITE_OPEN_MASTER_JOURNAL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SQLITE_OPEN_MASTER_JOURNAL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	mov	w4, #0
	bl	_sqlite3OsOpen
	mov	x24, x0
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _SQLITE_NOMEM_BKPT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SQLITE_NOMEM_BKPT@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
LBB0_3:
Lloh9:
	adrp	x28, _SQLITE_OK@GOTPAGE
Lloh10:
	ldr	x28, [x28, _SQLITE_OK@GOTPAGEOFF]
	ldr	w8, [x28]
	cmp	w24, w8
	b.ne	LBB0_9
; %bb.4:
	add	x1, sp, #12
	mov	x0, x19
	bl	_sqlite3OsFileSize
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_17
; %bb.5:
	ldr	w25, [x22, #4]
	ldr	w8, [sp, #12]
	add	w8, w25, w8
	add	w0, w8, #2
	bl	_sqlite3Malloc
	mov	x23, x0
	cbz	x0, LBB0_18
; %bb.6:
	ldrsw	x26, [sp, #12]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x26
	mov	w3, #0
	bl	_sqlite3OsRead
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_20
; %bb.7:
	ldrsw	x8, [sp, #12]
	strb	wzr, [x23, x8]
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.8:
	add	w25, w25, #1
	add	x8, x26, x23
	add	x26, x8, #1
	mov	x27, x23
	b	LBB0_11
LBB0_9:
	mov	x23, #0
	b	LBB0_21
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x27
	bl	_sqlite3Strlen30
	add	x8, x0, x27
	add	x27, x8, #1
	ldrsw	x8, [sp, #12]
	sub	x9, x27, x23
	cmp	x9, x8
	b.ge	LBB0_19
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
Lloh11:
	adrp	x8, _SQLITE_ACCESS_EXISTS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SQLITE_ACCESS_EXISTS@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x22
	mov	x1, x27
	bl	_sqlite3OsAccess
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_20
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [sp, #8]
	cbz	w8, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
Lloh14:
	adrp	x8, _SQLITE_OPEN_READONLY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SQLITE_OPEN_READONLY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _SQLITE_OPEN_MAIN_JOURNAL@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SQLITE_OPEN_MAIN_JOURNAL@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, x22
	mov	x1, x27
	mov	x2, x20
	mov	w4, #0
	bl	_sqlite3OsOpen
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_20
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x20
	mov	x1, x26
	mov	x2, x25
	bl	_readMasterJournal
	mov	x24, x0
	mov	x0, x20
	bl	_sqlite3OsClose
	ldr	w8, [x28]
	cmp	w24, w8
	b.ne	LBB0_21
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	ldrb	w8, [x26]
	cbz	w8, LBB0_10
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x26
	mov	x1, x21
	bl	_strcmp
	cbnz	x0, LBB0_10
	b	LBB0_21
LBB0_17:
	mov	x24, x0
	mov	x23, #0
	b	LBB0_21
LBB0_18:
Lloh20:
	adrp	x8, _SQLITE_NOMEM_BKPT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SQLITE_NOMEM_BKPT@GOTPAGEOFF]
Lloh22:
	ldr	w24, [x8]
	b	LBB0_21
LBB0_19:
	mov	x0, x19
	bl	_sqlite3OsClose
	mov	x0, x22
	mov	x1, x21
	mov	w2, #0
	bl	_sqlite3OsDelete
LBB0_20:
	mov	x24, x0
LBB0_21:
	mov	x0, x23
	bl	_sqlite3_free
	cbz	x19, LBB0_23
; %bb.22:
	mov	x0, x19
	bl	_sqlite3OsClose
	mov	x0, x20
	bl	_isOpen
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	mov	x0, x19
	bl	_sqlite3_free
LBB0_23:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_NOMEM_BKPT,4,2          ; @SQLITE_NOMEM_BKPT
	.comm	_SQLITE_OPEN_READONLY,4,2       ; @SQLITE_OPEN_READONLY
	.comm	_SQLITE_OPEN_MASTER_JOURNAL,4,2 ; @SQLITE_OPEN_MASTER_JOURNAL
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_SQLITE_ACCESS_EXISTS,4,2       ; @SQLITE_ACCESS_EXISTS
	.comm	_SQLITE_OPEN_MAIN_JOURNAL,4,2   ; @SQLITE_OPEN_MAIN_JOURNAL
	.no_dead_strip	_pager_delmaster
.subsections_via_symbols
