	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___rec_close                    ## -- Begin function __rec_close
	.p2align	4, 0x90
___rec_close:                           ## @__rec_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	(%rdi), %rbx
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movl	24(%rbx), %edi
	xorl	%edx, %edx
	callq	_mpool_put
	movq	$0, 16(%rbx)
LBB0_2:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	___rec_sync
	movl	%eax, %r15d
	movq	_RET_ERROR@GOTPCREL(%rip), %r12
	cmpl	(%r12), %eax
	je	LBB0_13
## %bb.3:
	movq	_RET_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_R_MEMMAPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_F_ISSET
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	callq	_munmap
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	(%r12), %r15d
LBB0_6:
	movq	_R_INMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_F_ISSET
	testq	%rax, %rax
	jne	LBB0_12
## %bb.7:
	movq	_R_CLOSEFP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_F_ISSET
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	4(%rbx), %edi
	callq	_fclose
	testq	%rax, %rax
	je	LBB0_12
LBB0_11:
	movl	(%r12), %r15d
LBB0_12:
	movq	%r14, %rdi
	callq	___bt_close
	movl	(%r12), %ecx
	cmpl	%ecx, %eax
	cmovel	%ecx, %r15d
LBB0_13:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	(%rbx), %edi
	callq	__close
	testq	%rax, %rax
	jne	LBB0_11
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_RET_ERROR,4,2                  ## @RET_ERROR
	.comm	_RET_SUCCESS,4,2                ## @RET_SUCCESS
	.comm	_R_MEMMAPPED,4,2                ## @R_MEMMAPPED
	.comm	_R_INMEM,4,2                    ## @R_INMEM
	.comm	_R_CLOSEFP,4,2                  ## @R_CLOSEFP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___rec_close                    ; -- Begin function __rec_close
	.p2align	2
___rec_close:                           ; @__rec_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]
	ldr	x1, [x20, #16]
	cbz	x1, LBB0_2
; %bb.1:
	ldr	w0, [x20, #24]
	mov	w2, #0
	bl	_mpool_put
	str	xzr, [x20, #16]
LBB0_2:
	mov	x0, x19
	mov	w1, #0
	bl	___rec_sync
Lloh0:
	adrp	x21, _RET_ERROR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _RET_ERROR@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w0, w8
	b.eq	LBB0_11
; %bb.3:
Lloh2:
	adrp	x8, _RET_SUCCESS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RET_SUCCESS@GOTPAGEOFF]
Lloh4:
	ldr	w22, [x8]
Lloh5:
	adrp	x8, _R_MEMMAPPED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _R_MEMMAPPED@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_F_ISSET
	cbz	x0, LBB0_5
; %bb.4:
	ldp	w1, w0, [x20, #8]
	bl	_munmap
	ldr	w8, [x21]
	cmp	x0, #0
	csel	w22, w22, w8, eq
LBB0_5:
Lloh8:
	adrp	x8, _R_INMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _R_INMEM@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_F_ISSET
	cbnz	x0, LBB0_10
; %bb.6:
Lloh11:
	adrp	x8, _R_CLOSEFP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _R_CLOSEFP@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_F_ISSET
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x20, #4]
	bl	_fclose
	b	LBB0_9
LBB0_8:
	ldr	w0, [x20]
	bl	__close
LBB0_9:
	ldr	w8, [x21]
	cmp	x0, #0
	csel	w22, w22, w8, eq
LBB0_10:
	mov	x0, x19
	bl	___bt_close
	ldr	w8, [x21]
	cmp	w0, w8
	csel	w0, w8, w22, eq
LBB0_11:
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_RET_ERROR,4,2                  ; @RET_ERROR
	.comm	_RET_SUCCESS,4,2                ; @RET_SUCCESS
	.comm	_R_MEMMAPPED,4,2                ; @R_MEMMAPPED
	.comm	_R_INMEM,4,2                    ; @R_INMEM
	.comm	_R_CLOSEFP,4,2                  ; @R_CLOSEFP
.subsections_via_symbols
