	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_InitBufferPool                 ## -- Begin function InitBufferPool
	.p2align	4, 0x90
_InitBufferPool:                        ## @InitBufferPool
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_NBuffers@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	shll	$2, %esi
	leaq	L_.str(%rip), %rdi
	leaq	-44(%rbp), %rdx
	callq	_ShmemInitStruct
	movq	_BufferDescriptors@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	(%r15), %esi
	movq	_BLCKSZ@GOTPCREL(%rip), %rax
	imull	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	leaq	-56(%rbp), %rdx
	callq	_ShmemInitStruct
	movq	_BufferBlocks@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	(%r15), %esi
	shll	$2, %esi
	leaq	L_.str.2(%rip), %rdi
	leaq	-52(%rbp), %rdx
	callq	_ShmemInitStruct
	movq	_BufferIOLWLockArray@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_LWTRANCHE_BUFFER_IO_IN_PROGRESS@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_LWLockRegisterTranche
	movq	_LWTRANCHE_BUFFER_CONTENT@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_LWLockRegisterTranche
	movl	(%r15), %esi
	shll	$2, %esi
	leaq	L_.str.5(%rip), %rdi
	leaq	-48(%rbp), %rdx
	callq	_ShmemInitStruct
	movq	_CkptBufferIds@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	-44(%rbp), %eax
	movl	-56(%rbp), %ecx
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %esi
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	testl	%ecx, %ecx
	jne	LBB0_9
## %bb.2:
	testl	%edx, %edx
	jne	LBB0_9
## %bb.3:
	testl	%esi, %esi
	jne	LBB0_9
## %bb.4:
	movl	(%r15), %edi
	testl	%edi, %edi
	jle	LBB0_7
## %bb.5:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	callq	_GetBufferDescriptor
	movq	%rax, %rbx
	movl	20(%rax), %edi
	callq	_CLEAR_BUFFERTAG
	leaq	16(%rbx), %rdi
	xorl	%esi, %esi
	callq	_pg_atomic_init_u32
	movq	$0, 8(%rbx)
	movl	%r14d, (%rbx)
	incl	%r14d
	movl	%r14d, 4(%rbx)
	movq	%rbx, %rdi
	callq	_BufferDescriptorGetContentLock
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_LWLockInitialize
	movq	%rbx, %rdi
	callq	_BufferDescriptorGetIOLock
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_LWLockInitialize
	movl	(%r15), %edi
	cmpl	%edi, %r14d
	jl	LBB0_6
LBB0_7:
	movq	_FREENEXT_END_OF_LIST@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	decl	%edi
	callq	_GetBufferDescriptor
	movl	%ebx, 4(%rax)
	jmp	LBB0_8
LBB0_9:
	testl	%esi, %esi
	setne	%bl
	testl	%edx, %edx
	setne	%dl
	testl	%ecx, %ecx
	setne	%cl
	testl	%eax, %eax
	setne	%al
	andb	%cl, %al
	andb	%bl, %dl
	andb	%al, %dl
	movzbl	%dl, %edi
	callq	_Assert
LBB0_8:
	xorl	%edi, %edi
	cmpl	$0, -44(%rbp)
	sete	%dil
	callq	_StrategyInitialize
	movq	_BackendWritebackContext@GOTPCREL(%rip), %rdi
	movq	_backend_flush_after@GOTPCREL(%rip), %rsi
	callq	_WritebackContextInit
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Buffer Descriptors"

	.comm	_NBuffers,4,2                   ## @NBuffers
	.comm	_BufferDescriptors,8,3          ## @BufferDescriptors
L_.str.1:                               ## @.str.1
	.asciz	"Buffer Blocks"

	.comm	_BLCKSZ,8,3                     ## @BLCKSZ
	.comm	_BufferBlocks,8,3               ## @BufferBlocks
L_.str.2:                               ## @.str.2
	.asciz	"Buffer IO Locks"

	.comm	_BufferIOLWLockArray,8,3        ## @BufferIOLWLockArray
	.comm	_LWTRANCHE_BUFFER_IO_IN_PROGRESS,4,2 ## @LWTRANCHE_BUFFER_IO_IN_PROGRESS
L_.str.3:                               ## @.str.3
	.asciz	"buffer_io"

	.comm	_LWTRANCHE_BUFFER_CONTENT,4,2   ## @LWTRANCHE_BUFFER_CONTENT
L_.str.4:                               ## @.str.4
	.asciz	"buffer_content"

L_.str.5:                               ## @.str.5
	.asciz	"Checkpoint BufferIds"

	.comm	_CkptBufferIds,8,3              ## @CkptBufferIds
	.comm	_FREENEXT_END_OF_LIST,4,2       ## @FREENEXT_END_OF_LIST
	.comm	_BackendWritebackContext,4,2    ## @BackendWritebackContext
	.comm	_backend_flush_after,4,2        ## @backend_flush_after
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_InitBufferPool                 ; -- Begin function InitBufferPool
	.p2align	2
_InitBufferPool:                        ; @InitBufferPool
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x21, _NBuffers@GOTPAGE
Lloh1:
	ldr	x21, [x21, _NBuffers@GOTPAGEOFF]
	ldr	w8, [x21]
	lsl	w1, w8, #2
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	add	x2, sp, #8
	bl	_ShmemInitStruct
Lloh4:
	adrp	x8, _BufferDescriptors@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BufferDescriptors@GOTPAGEOFF]
Lloh6:
	str	x0, [x8]
	ldr	w8, [x21]
Lloh7:
	adrp	x9, _BLCKSZ@GOTPAGE
Lloh8:
	ldr	x9, [x9, _BLCKSZ@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	mul	w1, w8, w9
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	add	x2, sp, #12
	bl	_ShmemInitStruct
Lloh12:
	adrp	x8, _BufferBlocks@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BufferBlocks@GOTPAGEOFF]
Lloh14:
	str	x0, [x8]
	ldr	w8, [x21]
	lsl	w1, w8, #2
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	add	x2, sp, #4
	bl	_ShmemInitStruct
Lloh17:
	adrp	x8, _BufferIOLWLockArray@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BufferIOLWLockArray@GOTPAGEOFF]
Lloh19:
	str	x0, [x8]
Lloh20:
	adrp	x22, _LWTRANCHE_BUFFER_IO_IN_PROGRESS@GOTPAGE
Lloh21:
	ldr	x22, [x22, _LWTRANCHE_BUFFER_IO_IN_PROGRESS@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_LWLockRegisterTranche
Lloh24:
	adrp	x23, _LWTRANCHE_BUFFER_CONTENT@GOTPAGE
Lloh25:
	ldr	x23, [x23, _LWTRANCHE_BUFFER_CONTENT@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_LWLockRegisterTranche
	ldr	w8, [x21]
	lsl	w1, w8, #2
Lloh28:
	adrp	x0, l_.str.5@PAGE
Lloh29:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x2, sp
	bl	_ShmemInitStruct
Lloh30:
	adrp	x8, _CkptBufferIds@GOTPAGE
Lloh31:
	ldr	x8, [x8, _CkptBufferIds@GOTPAGEOFF]
Lloh32:
	str	x0, [x8]
	ldp	w8, w9, [sp, #8]
	ldp	w11, w10, [sp]
	cbnz	w8, LBB0_8
; %bb.1:
	cbnz	w9, LBB0_8
; %bb.2:
	cbnz	w10, LBB0_8
; %bb.3:
	cbnz	w11, LBB0_8
; %bb.4:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	w19, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_GetBufferDescriptor
	mov	x20, x0
	ldr	w0, [x0, #20]
	bl	_CLEAR_BUFFERTAG
	add	x0, x20, #16
	mov	w1, #0
	bl	_pg_atomic_init_u32
	str	xzr, [x20, #8]
	str	w19, [x20]
	add	w19, w19, #1
	str	w19, [x20, #4]
	mov	x0, x20
	bl	_BufferDescriptorGetContentLock
	ldr	w1, [x23]
	bl	_LWLockInitialize
	mov	x0, x20
	bl	_BufferDescriptorGetIOLock
	ldr	w1, [x22]
	bl	_LWLockInitialize
	ldr	w8, [x21]
	cmp	w19, w8
	b.lt	LBB0_6
LBB0_7:
Lloh33:
	adrp	x9, _FREENEXT_END_OF_LIST@GOTPAGE
Lloh34:
	ldr	x9, [x9, _FREENEXT_END_OF_LIST@GOTPAGEOFF]
Lloh35:
	ldr	w19, [x9]
	sub	w0, w8, #1
	bl	_GetBufferDescriptor
	str	w19, [x0, #4]
	b	LBB0_9
LBB0_8:
	cmp	w8, #0
	ccmp	w9, #0, #4, ne
	ccmp	w10, #0, #4, ne
	ccmp	w11, #0, #4, ne
	cset	w0, ne
	bl	_Assert
LBB0_9:
	ldr	w8, [sp, #8]
	cmp	w8, #0
	cset	w0, eq
	bl	_StrategyInitialize
Lloh36:
	adrp	x0, _BackendWritebackContext@GOTPAGE
Lloh37:
	ldr	x0, [x0, _BackendWritebackContext@GOTPAGEOFF]
Lloh38:
	adrp	x1, _backend_flush_after@GOTPAGE
Lloh39:
	ldr	x1, [x1, _backend_flush_after@GOTPAGEOFF]
	bl	_WritebackContextInit
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotStr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Buffer Descriptors"

	.comm	_NBuffers,4,2                   ; @NBuffers
	.comm	_BufferDescriptors,8,3          ; @BufferDescriptors
l_.str.1:                               ; @.str.1
	.asciz	"Buffer Blocks"

	.comm	_BLCKSZ,8,3                     ; @BLCKSZ
	.comm	_BufferBlocks,8,3               ; @BufferBlocks
l_.str.2:                               ; @.str.2
	.asciz	"Buffer IO Locks"

	.comm	_BufferIOLWLockArray,8,3        ; @BufferIOLWLockArray
	.comm	_LWTRANCHE_BUFFER_IO_IN_PROGRESS,4,2 ; @LWTRANCHE_BUFFER_IO_IN_PROGRESS
l_.str.3:                               ; @.str.3
	.asciz	"buffer_io"

	.comm	_LWTRANCHE_BUFFER_CONTENT,4,2   ; @LWTRANCHE_BUFFER_CONTENT
l_.str.4:                               ; @.str.4
	.asciz	"buffer_content"

l_.str.5:                               ; @.str.5
	.asciz	"Checkpoint BufferIds"

	.comm	_CkptBufferIds,8,3              ; @CkptBufferIds
	.comm	_FREENEXT_END_OF_LIST,4,2       ; @FREENEXT_END_OF_LIST
	.comm	_BackendWritebackContext,4,2    ; @BackendWritebackContext
	.comm	_backend_flush_after,4,2        ; @backend_flush_after
.subsections_via_symbols
