	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XLogRegisterBuffer             ## -- Begin function XLogRegisterBuffer
	.p2align	4, 0x90
_XLogRegisterBuffer:                    ## @XLogRegisterBuffer
	.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
	movl	%edx, %r15d
	movl	%esi, %r14d
	movl	%edi, %r13d
	movq	_REGBUF_FORCE_IMAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edx, %eax
	sete	%al
	movq	_REGBUF_NO_IMAGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%edx, %ecx
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_Assert
	movq	_begininsert_called@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_Assert
	movq	_max_registered_block_id@GOTPCREL(%rip), %r12
	cmpl	%r13d, (%r12)
	jg	LBB0_4
## %bb.1:
	movq	_max_registered_buffers@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jg	LBB0_3
## %bb.2:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_3:
	leal	1(%r13), %eax
	movl	%eax, (%r12)
LBB0_4:
	movq	_registered_buffers@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movslq	%r13d, %rbx
	shlq	$6, %rbx
	leaq	(%r12,%rbx), %rsi
	addq	$24, %rsi
	leaq	(%r12,%rbx), %rdx
	leaq	(%r12,%rbx), %rcx
	addq	$8, %rcx
	movl	%r14d, %edi
	callq	_BufferGetTag
	movl	%r14d, %edi
	callq	_BufferGetPage
	movl	%eax, 56(%r12,%rbx)
	movl	%r15d, 16(%r12,%rbx)
	leaq	(%r12,%rbx), %rax
	addq	$40, %rax
	movq	%rax, 48(%r12,%rbx)
	movq	$0, 32(%r12,%rbx)
	movl	$1, 20(%r12,%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REGBUF_FORCE_IMAGE,4,2         ## @REGBUF_FORCE_IMAGE
	.comm	_REGBUF_NO_IMAGE,4,2            ## @REGBUF_NO_IMAGE
	.comm	_begininsert_called,4,2         ## @begininsert_called
	.comm	_max_registered_block_id,4,2    ## @max_registered_block_id
	.comm	_max_registered_buffers,4,2     ## @max_registered_buffers
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"too many registered buffers"

	.comm	_registered_buffers,8,3         ## @registered_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XLogRegisterBuffer             ; -- Begin function XLogRegisterBuffer
	.p2align	2
_XLogRegisterBuffer:                    ; @XLogRegisterBuffer
	.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, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _REGBUF_FORCE_IMAGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REGBUF_FORCE_IMAGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w2
	cset	w8, eq
Lloh3:
	adrp	x9, _REGBUF_NO_IMAGE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _REGBUF_NO_IMAGE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w2
	cset	w9, eq
	orr	w0, w8, w9
	bl	_Assert
Lloh6:
	adrp	x8, _begininsert_called@GOTPAGE
Lloh7:
	ldr	x8, [x8, _begininsert_called@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_Assert
Lloh9:
	adrp	x22, _max_registered_block_id@GOTPAGE
Lloh10:
	ldr	x22, [x22, _max_registered_block_id@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, w21
	b.gt	LBB0_4
; %bb.1:
Lloh11:
	adrp	x8, _max_registered_buffers@GOTPAGE
Lloh12:
	ldr	x8, [x8, _max_registered_buffers@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, w21
	b.gt	LBB0_3
; %bb.2:
Lloh14:
	adrp	x8, _ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_3:
	add	w8, w21, #1
	str	w8, [x22]
LBB0_4:
Lloh19:
	adrp	x8, _registered_buffers@GOTPAGE
Lloh20:
	ldr	x8, [x8, _registered_buffers@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	sxtw	x9, w21
	add	x21, x8, x9, lsl #6
	add	x1, x21, #24
	add	x3, x21, #8
	mov	x0, x20
	mov	x2, x21
	bl	_BufferGetTag
	mov	x0, x20
	bl	_BufferGetPage
	str	w0, [x21, #56]
	add	x8, x21, #40
	str	x8, [x21, #48]
	str	xzr, [x21, #32]
	mov	w8, #1
	stp	w19, w8, [x21, #16]
	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	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_REGBUF_FORCE_IMAGE,4,2         ; @REGBUF_FORCE_IMAGE
	.comm	_REGBUF_NO_IMAGE,4,2            ; @REGBUF_NO_IMAGE
	.comm	_begininsert_called,4,2         ; @begininsert_called
	.comm	_max_registered_block_id,4,2    ; @max_registered_block_id
	.comm	_max_registered_buffers,4,2     ; @max_registered_buffers
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"too many registered buffers"

	.comm	_registered_buffers,8,3         ; @registered_buffers
.subsections_via_symbols
