	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function InvalidateBuffer
_InvalidateBuffer:                      ## @InvalidateBuffer
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movl	(%rdi), %eax
	movl	%eax, -44(%rbp)
	addq	$4, %rdi
	callq	_pg_atomic_read_u32
	movl	%eax, %ebx
	movq	_BM_LOCKED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	%ebx, %edi
	callq	_Assert
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_UnlockBufHdr
	leaq	-44(%rbp), %rdi
	callq	_BufTableHashCode
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_BufMappingPartitionLock
	movq	%rax, %r14
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rax, %rdi
	callq	_LWLockAcquire
	movq	%r13, %rdi
	callq	_LockBufHdr
	movl	%eax, %ebx
	movl	(%r13), %edi
	movl	-44(%rbp), %esi
	callq	_BUFFERTAGS_EQUAL
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	leaq	L_.str(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_WaitIO
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_LWLockAcquire
	movq	%r13, %rdi
	callq	_LockBufHdr
	movl	%eax, %ebx
	movl	(%r13), %edi
	movl	-44(%rbp), %esi
	callq	_BUFFERTAGS_EQUAL
	testl	%eax, %eax
	je	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_BUF_STATE_GET_REFCOUNT
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_UnlockBufHdr
	movq	%r14, %rdi
	callq	_LWLockRelease
	movq	%r13, %rdi
	callq	_BufferDescriptorGetBuffer
	movl	%eax, %edi
	callq	_GetPrivateRefCount
	testq	%rax, %rax
	jle	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_elog
	jmp	LBB0_5
LBB0_6:
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_UnlockBufHdr
	movq	%r14, %rdi
	callq	_LWLockRelease
	jmp	LBB0_10
LBB0_7:
	movq	_BUF_FLAG_MASK@GOTPCREL(%rip), %r15
	movl	(%r15), %r12d
	andl	%ebx, %r12d
	movl	(%r13), %edi
	callq	_CLEAR_BUFFERTAG
	movq	_BUF_USAGECOUNT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r15), %esi
	notl	%esi
	andl	%ebx, %esi
	movq	%r13, %rdi
	callq	_UnlockBufHdr
	movq	_BM_TAG_VALID@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_9
## %bb.8:
	leaq	-44(%rbp), %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_BufTableDelete
LBB0_9:
	movq	%r14, %rdi
	callq	_LWLockRelease
	movq	%r13, %rdi
	callq	_StrategyFreeBuffer
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BM_LOCKED,4,2                  ## @BM_LOCKED
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"buffer is pinned in InvalidateBuffer"

	.comm	_BUF_FLAG_MASK,4,2              ## @BUF_FLAG_MASK
	.comm	_BUF_USAGECOUNT_MASK,4,2        ## @BUF_USAGECOUNT_MASK
	.comm	_BM_TAG_VALID,4,2               ## @BM_TAG_VALID
	.no_dead_strip	_InvalidateBuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function InvalidateBuffer
_InvalidateBuffer:                      ; @InvalidateBuffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
	ldr	w8, [x0], #4
	str	w8, [sp, #12]
	bl	_pg_atomic_read_u32
	mov	x20, x0
Lloh0:
	adrp	x8, _BM_LOCKED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BM_LOCKED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w0, w8, w0
	bl	_Assert
	mov	x0, x19
	mov	x1, x20
	bl	_UnlockBufHdr
	add	x0, sp, #12
	bl	_BufTableHashCode
	mov	x21, x0
	bl	_BufMappingPartitionLock
	mov	x20, x0
Lloh3:
	adrp	x24, _LW_EXCLUSIVE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _LW_EXCLUSIVE@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_LWLockAcquire
	mov	x0, x19
	bl	_LockBufHdr
	mov	x23, x0
	ldr	w0, [x19]
	ldr	w1, [sp, #12]
	bl	_BUFFERTAGS_EQUAL
	cbz	w0, LBB0_6
; %bb.1:
Lloh5:
	adrp	x25, _ERROR@GOTPAGE
Lloh6:
	ldr	x25, [x25, _ERROR@GOTPAGEOFF]
Lloh7:
	adrp	x22, l_.str@PAGE
Lloh8:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_WaitIO
	ldr	w1, [x24]
	mov	x0, x20
	bl	_LWLockAcquire
	mov	x0, x19
	bl	_LockBufHdr
	mov	x23, x0
	ldr	w0, [x19]
	ldr	w1, [sp, #12]
	bl	_BUFFERTAGS_EQUAL
	cbz	w0, LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_BUF_STATE_GET_REFCOUNT
	cbz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_UnlockBufHdr
	mov	x0, x20
	bl	_LWLockRelease
	mov	x0, x19
	bl	_BufferDescriptorGetBuffer
	bl	_GetPrivateRefCount
	cmp	x0, #1
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x25]
	mov	x1, x22
	bl	_elog
	b	LBB0_2
LBB0_6:
	mov	x0, x19
	mov	x1, x23
	bl	_UnlockBufHdr
	mov	x0, x20
	bl	_LWLockRelease
	b	LBB0_10
LBB0_7:
Lloh9:
	adrp	x22, _BUF_FLAG_MASK@GOTPAGE
Lloh10:
	ldr	x22, [x22, _BUF_FLAG_MASK@GOTPAGEOFF]
	ldr	w8, [x22]
	and	w24, w8, w23
	ldr	w0, [x19]
	bl	_CLEAR_BUFFERTAG
	ldr	w8, [x22]
Lloh11:
	adrp	x9, _BUF_USAGECOUNT_MASK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BUF_USAGECOUNT_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w1, w23, w8
	mov	x0, x19
	bl	_UnlockBufHdr
Lloh14:
	adrp	x8, _BM_TAG_VALID@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BM_TAG_VALID@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w24, w8
	b.eq	LBB0_9
; %bb.8:
	add	x0, sp, #12
	mov	x1, x21
	bl	_BufTableDelete
LBB0_9:
	mov	x0, x20
	bl	_LWLockRelease
	mov	x0, x19
	bl	_StrategyFreeBuffer
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BM_LOCKED,4,2                  ; @BM_LOCKED
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"buffer is pinned in InvalidateBuffer"

	.comm	_BUF_FLAG_MASK,4,2              ; @BUF_FLAG_MASK
	.comm	_BUF_USAGECOUNT_MASK,4,2        ; @BUF_USAGECOUNT_MASK
	.comm	_BM_TAG_VALID,4,2               ; @BM_TAG_VALID
	.no_dead_strip	_InvalidateBuffer
.subsections_via_symbols
