	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___bt_close                     ## -- Begin function __bt_close
	.p2align	4, 0x90
___bt_close:                            ## @__bt_close
	.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
	movq	%rdi, %r14
	movq	72(%rdi), %rbx
	movq	64(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movl	56(%rbx), %edi
	xorl	%edx, %edx
	callq	_mpool_put
	movq	$0, 64(%rbx)
LBB0_2:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	___bt_sync
	movq	_RET_ERROR@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	je	LBB0_13
## %bb.3:
	movl	56(%rbx), %edi
	callq	_mpool_close
	cmpq	(%r12), %rax
	je	LBB0_13
## %bb.4:
	movq	40(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	leaq	40(%rbx), %r15
	callq	_free
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r15)
LBB0_6:
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	leaq	24(%rbx), %r15
	callq	_free
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r15)
LBB0_8:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	leaq	8(%rbx), %r15
	callq	_free
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r15)
LBB0_10:
	movl	(%rbx), %r15d
	movq	%rbx, %rdi
	callq	_free
	movq	%r14, %rdi
	callq	_free
	movl	%r15d, %edi
	callq	__close
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	(%r12), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_RET_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_13:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RET_ERROR,8,3                  ## @RET_ERROR
	.comm	_RET_SUCCESS,4,2                ## @RET_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___bt_close                     ; -- Begin function __bt_close
	.p2align	2
___bt_close:                            ; @__bt_close
	.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	x19, x0
	ldr	x20, [x0, #72]
	ldr	x1, [x20, #64]
	cbz	x1, LBB0_2
; %bb.1:
	ldr	w0, [x20, #56]
	mov	w2, #0
	bl	_mpool_put
	str	xzr, [x20, #64]
LBB0_2:
	mov	x0, x19
	mov	w1, #0
	bl	___bt_sync
Lloh0:
	adrp	x22, _RET_ERROR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _RET_ERROR@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_11
; %bb.3:
	ldr	w0, [x20, #56]
	bl	_mpool_close
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_11
; %bb.4:
	mov	x21, x20
	ldr	x0, [x21, #40]!
	cbz	x0, LBB0_6
; %bb.5:
	bl	_free
	stp	xzr, xzr, [x21]
LBB0_6:
	mov	x21, x20
	ldr	x0, [x21, #24]!
	cbz	x0, LBB0_8
; %bb.7:
	bl	_free
	stp	xzr, xzr, [x21]
LBB0_8:
	mov	x21, x20
	ldr	x0, [x21, #8]!
	cbz	x0, LBB0_10
; %bb.9:
	bl	_free
	stp	xzr, xzr, [x21]
LBB0_10:
	ldr	w21, [x20]
	mov	x0, x20
	bl	_free
	mov	x0, x19
	bl	_free
	mov	x0, x21
	bl	__close
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _RET_SUCCESS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RET_SUCCESS@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	x0, #0
	csel	x0, x9, x8, eq
LBB0_11:
                                        ; kill: def $w0 killed $w0 killed $x0
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_RET_ERROR,8,3                  ; @RET_ERROR
	.comm	_RET_SUCCESS,4,2                ; @RET_SUCCESS
.subsections_via_symbols
