	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XLogBeginInsert                ## -- Begin function XLogBeginInsert
	.p2align	4, 0x90
_XLogBeginInsert:                       ## @XLogBeginInsert
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_max_registered_block_id@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	sete	%dil
	callq	_Assert
	movq	_mainrdata_last@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%edi, %edi
	cmpq	_mainrdata_head@GOTPCREL(%rip), %rax
	sete	%dil
	callq	_Assert
	movq	_mainrdata_len@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	sete	%dil
	callq	_Assert
	xorl	%eax, %eax
	callq	_XLogInsertAllowed
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_2:
	movq	_begininsert_called@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	je	LBB0_4
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_elog
LBB0_4:
	movl	$1, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_max_registered_block_id,8,3    ## @max_registered_block_id
	.comm	_mainrdata_last,8,3             ## @mainrdata_last
	.comm	_mainrdata_head,4,2             ## @mainrdata_head
	.comm	_mainrdata_len,8,3              ## @mainrdata_len
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot make new WAL entries during recovery"

	.comm	_begininsert_called,4,2         ## @begininsert_called
L_.str.1:                               ## @.str.1
	.asciz	"XLogBeginInsert was already called"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XLogBeginInsert                ; -- Begin function XLogBeginInsert
	.p2align	2
_XLogBeginInsert:                       ; @XLogBeginInsert
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _max_registered_block_id@GOTPAGE
Lloh1:
	ldr	x8, [x8, _max_registered_block_id@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, eq
	bl	_Assert
Lloh3:
	adrp	x8, _mainrdata_last@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mainrdata_last@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _mainrdata_head@GOTPAGE
Lloh7:
	ldr	x9, [x9, _mainrdata_head@GOTPAGEOFF]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
Lloh8:
	adrp	x8, _mainrdata_len@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mainrdata_len@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, eq
	bl	_Assert
	bl	_XLogInsertAllowed
Lloh11:
	adrp	x19, _ERROR@GOTPAGE
Lloh12:
	ldr	x19, [x19, _ERROR@GOTPAGEOFF]
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_2:
Lloh15:
	adrp	x20, _begininsert_called@GOTPAGE
Lloh16:
	ldr	x20, [x20, _begininsert_called@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
LBB0_4:
	mov	w8, #1
	str	w8, [x20]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_max_registered_block_id,8,3    ; @max_registered_block_id
	.comm	_mainrdata_last,8,3             ; @mainrdata_last
	.comm	_mainrdata_head,4,2             ; @mainrdata_head
	.comm	_mainrdata_len,8,3              ; @mainrdata_len
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot make new WAL entries during recovery"

	.comm	_begininsert_called,4,2         ; @begininsert_called
l_.str.1:                               ; @.str.1
	.asciz	"XLogBeginInsert was already called"

.subsections_via_symbols
