	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function unixClose
_unixClose:                             ## @unixClose
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_assert
	movq	%rbx, %rdi
	callq	_verifyDbFile
	movq	_NO_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_unixUnlock
	movq	%rbx, %rdi
	callq	_unixFileMutexNotheld
	movl	%eax, %edi
	callq	_assert
	xorl	%eax, %eax
	callq	_unixEnterMutex
	movq	(%rbx), %rax
	movl	$1, %edi
	cmpq	$0, (%rax)
	jg	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpq	$0, 8(%rax)
	sete	%dil
LBB0_2:
	callq	_assert
	movl	16(%r14), %edi
	callq	_sqlite3_mutex_enter
	cmpq	$0, (%r14)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_setPendingFd
LBB0_4:
	movl	16(%r14), %edi
	callq	_sqlite3_mutex_leave
	movq	%rbx, %rdi
	callq	_releaseInodeInfo
	movq	%rbx, %rdi
	callq	_closeUnixFile
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_unixLeaveMutex
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_NO_LOCK,4,2                    ## @NO_LOCK
	.no_dead_strip	_unixClose
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function unixClose
_unixClose:                             ; @unixClose
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0]
	cmp	x20, #0
	cset	w0, ne
	bl	_assert
	mov	x0, x19
	bl	_verifyDbFile
Lloh0:
	adrp	x8, _NO_LOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NO_LOCK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_unixUnlock
	mov	x0, x19
	bl	_unixFileMutexNotheld
	bl	_assert
	bl	_unixEnterMutex
	ldr	x8, [x19]
	ldr	x9, [x8]
	cmp	x9, #0
	b.le	LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_3
LBB0_2:
	ldr	x8, [x8, #8]
	cmp	x8, #0
	cset	w0, eq
LBB0_3:
	bl	_assert
	ldr	w0, [x20, #16]
	bl	_sqlite3_mutex_enter
	ldr	x8, [x20]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_setPendingFd
LBB0_5:
	ldr	w0, [x20, #16]
	bl	_sqlite3_mutex_leave
	mov	x0, x19
	bl	_releaseInodeInfo
	mov	x0, x19
	bl	_closeUnixFile
	mov	x19, x0
	bl	_unixLeaveMutex
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_NO_LOCK,4,2                    ; @NO_LOCK
	.no_dead_strip	_unixClose
.subsections_via_symbols
