	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brin_page_cleanup              ## -- Begin function brin_page_cleanup
	.p2align	4, 0x90
_brin_page_cleanup:                     ## @brin_page_cleanup
	.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
	movl	%esi, %ebx
	movl	%edi, %r14d
	movl	%esi, %edi
	callq	_BufferGetPage
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_PageIsNew
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_ShareLock@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	%r14d, %edi
	callq	_LockRelationForExtension
	movl	(%r12), %esi
	movl	%r14d, %edi
	callq	_UnlockRelationForExtension
	movq	_BUFFER_LOCK_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_LockBuffer
	movl	%r15d, %edi
	callq	_PageIsNew
	testq	%rax, %rax
	je	LBB0_2
## %bb.6:
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_brin_initialize_empty_new_buffer
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_LockBuffer                     ## TAILCALL
LBB0_2:
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_LockBuffer
LBB0_3:
	movl	%ebx, %edi
	callq	_BufferGetPage
	movl	%eax, %edi
	callq	_BRIN_IS_META_PAGE
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movl	%ebx, %edi
	callq	_BufferGetPage
	movl	%eax, %edi
	callq	_BRIN_IS_REVMAP_PAGE
	testq	%rax, %rax
	je	LBB0_7
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%ebx, %edi
	callq	_BufferGetBlockNumber
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_br_page_get_freespace
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RecordPageWithFreeSpace        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ShareLock,4,2                  ## @ShareLock
	.comm	_BUFFER_LOCK_EXCLUSIVE,4,2      ## @BUFFER_LOCK_EXCLUSIVE
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ## @BUFFER_LOCK_UNLOCK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brin_page_cleanup              ; -- Begin function brin_page_cleanup
	.p2align	2
_brin_page_cleanup:                     ; @brin_page_cleanup
	.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, x1
	mov	x19, x0
	mov	x0, x1
	bl	_BufferGetPage
	mov	x21, x0
	bl	_PageIsNew
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x22, _ShareLock@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ShareLock@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_LockRelationForExtension
	ldr	w1, [x22]
	mov	x0, x19
	bl	_UnlockRelationForExtension
Lloh2:
	adrp	x8, _BUFFER_LOCK_EXCLUSIVE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BUFFER_LOCK_EXCLUSIVE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_LockBuffer
	mov	x0, x21
	bl	_PageIsNew
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	_brin_initialize_empty_new_buffer
Lloh5:
	adrp	x8, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	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
	b	_LockBuffer
LBB0_3:
Lloh8:
	adrp	x8, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_LockBuffer
LBB0_4:
	mov	x0, x20
	bl	_BufferGetPage
	bl	_BRIN_IS_META_PAGE
	cbnz	x0, LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_BufferGetPage
	bl	_BRIN_IS_REVMAP_PAGE
	cbz	x0, LBB0_7
LBB0_6:
	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_7:
	mov	x0, x20
	bl	_BufferGetBlockNumber
	mov	x20, x0
	mov	x0, x21
	bl	_br_page_get_freespace
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	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
	b	_RecordPageWithFreeSpace
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ShareLock,4,2                  ; @ShareLock
	.comm	_BUFFER_LOCK_EXCLUSIVE,4,2      ; @BUFFER_LOCK_EXCLUSIVE
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ; @BUFFER_LOCK_UNLOCK
.subsections_via_symbols
