	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brin_xlog_insert_update
_brin_xlog_insert_update:               ## @brin_xlog_insert_update
	.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	%rsi, %r13
	movq	%rdi, %r15
	movl	(%rdi), %r12d
	callq	_XLogRecGetInfo
	movq	_XLOG_BRIN_INIT_PAGE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_XLogInitBufferForRedo
	movl	%eax, %ebx
	movl	%eax, -44(%rbp)
	movl	%eax, %edi
	callq	_BufferGetPage
	movq	_BRIN_PAGETYPE_REGULAR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_brin_page_init
	movq	_BLK_NEEDS_REDO@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	jmp	LBB0_3
LBB0_2:
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_XLogReadBufferForRedo
	movq	%rax, %r14
	movl	-44(%rbp), %ebx
LBB0_3:
	movl	%ebx, %edi
	callq	_BufferGetBlockNumber
	movl	%eax, %ebx
	movq	_BLK_NEEDS_REDO@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_9
## %bb.4:
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	leaq	-60(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_XLogRecGetBlockData
	movq	%rax, %r14
	movq	(%rax), %rax
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	sete	%dil
	callq	_Assert
	movl	-44(%rbp), %edi
	callq	_BufferGetPage
	movq	%r13, %rcx
	movq	%rax, %r13
	movq	%rcx, %rbx
	movq	8(%rcx), %r12
	movq	%rax, %rdi
	callq	_PageGetMaxOffsetNumber
	incq	%rax
	cmpq	%r12, %rax
	jge	LBB0_6
## %bb.5:
	movq	_PANIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_6:
	movl	-60(%rbp), %edx
	movq	%r13, %rdi
	movl	%r14d, %esi
	movq	%r12, %rcx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	_PageAddItem
	movq	_InvalidOffsetNumber@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	_PANIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_elog
LBB0_8:
	movq	%r13, %rdi
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	callq	_PageSetLSN
	movl	-44(%rbp), %edi
	callq	_MarkBufferDirty
	movq	%rbx, %r13
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
LBB0_9:
	movl	-44(%rbp), %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	-44(%rbp), %edi
	callq	_UnlockReleaseBuffer
LBB0_11:
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_XLogReadBufferForRedo
	movq	_BLK_NEEDS_REDO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	movq	8(%r13), %rdx
	leaq	-56(%rbp), %rdi
	movl	%ebx, %esi
	callq	_ItemPointerSet
	movl	-44(%rbp), %edi
	callq	_BufferGetPage
	movq	%rax, %rbx
	movl	-44(%rbp), %edi
	movl	16(%r13), %esi
	movq	(%r13), %rdx
	movl	-56(%rbp), %ecx
	callq	_brinSetHeapBlockItemptr
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_PageSetLSN
	movl	-44(%rbp), %edi
	callq	_MarkBufferDirty
LBB0_13:
	movl	-44(%rbp), %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movl	-44(%rbp), %edi
	callq	_UnlockReleaseBuffer
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XLOG_BRIN_INIT_PAGE,4,2        ## @XLOG_BRIN_INIT_PAGE
	.comm	_BRIN_PAGETYPE_REGULAR,4,2      ## @BRIN_PAGETYPE_REGULAR
	.comm	_BLK_NEEDS_REDO,8,3             ## @BLK_NEEDS_REDO
	.comm	_PANIC,4,2                      ## @PANIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"brin_xlog_insert_update: invalid max offset number"

	.comm	_InvalidOffsetNumber,8,3        ## @InvalidOffsetNumber
L_.str.1:                               ## @.str.1
	.asciz	"brin_xlog_insert_update: failed to add tuple"

	.no_dead_strip	_brin_xlog_insert_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brin_xlog_insert_update
_brin_xlog_insert_update:               ; @brin_xlog_insert_update
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x21, x0
	ldr	w19, [x0]
	bl	_XLogRecGetInfo
Lloh0:
	adrp	x8, _XLOG_BRIN_INIT_PAGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XLOG_BRIN_INIT_PAGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x26, _BLK_NEEDS_REDO@GOTPAGE
Lloh4:
	ldr	x26, [x26, _BLK_NEEDS_REDO@GOTPAGEOFF]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x21
	mov	w1, #0
	bl	_XLogInitBufferForRedo
	mov	x22, x0
	str	w0, [sp, #12]
	bl	_BufferGetPage
Lloh5:
	adrp	x8, _BRIN_PAGETYPE_REGULAR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BRIN_PAGETYPE_REGULAR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_brin_page_init
	ldr	x23, [x26]
	b	LBB0_3
LBB0_2:
	add	x2, sp, #12
	mov	x0, x21
	mov	w1, #0
	bl	_XLogReadBufferForRedo
	mov	x23, x0
	ldr	w22, [sp, #12]
LBB0_3:
	mov	x0, x22
	bl	_BufferGetBlockNumber
	mov	x22, x0
	ldr	x8, [x26]
	cmp	x23, x8
	b.ne	LBB0_9
; %bb.4:
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #0
	bl	_XLogRecGetBlockData
	mov	x24, x0
	ldr	x8, [x0]
	ldr	x9, [x20]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldr	w0, [sp, #12]
	bl	_BufferGetPage
	mov	x23, x0
	ldr	x25, [x20, #8]
	bl	_PageGetMaxOffsetNumber
	add	x8, x0, #1
Lloh8:
	adrp	x27, _PANIC@GOTPAGE
Lloh9:
	ldr	x27, [x27, _PANIC@GOTPAGEOFF]
	cmp	x8, x25
	b.ge	LBB0_6
; %bb.5:
	ldr	w0, [x27]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_6:
	ldr	w2, [sp, #8]
	mov	x0, x23
	mov	x1, x24
	mov	x3, x25
	mov	w4, #1
	mov	w5, #0
	bl	_PageAddItem
Lloh12:
	adrp	x8, _InvalidOffsetNumber@GOTPAGE
Lloh13:
	ldr	x8, [x8, _InvalidOffsetNumber@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.7:
	ldr	w0, [x27]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
LBB0_8:
	mov	x0, x23
	mov	x1, x19
	bl	_PageSetLSN
	ldr	w0, [sp, #12]
	bl	_MarkBufferDirty
LBB0_9:
	ldr	w0, [sp, #12]
	bl	_BufferIsValid
	cbz	x0, LBB0_11
; %bb.10:
	ldr	w0, [sp, #12]
	bl	_UnlockReleaseBuffer
LBB0_11:
	add	x2, sp, #12
	mov	x0, x21
	mov	w1, #1
	bl	_XLogReadBufferForRedo
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.12:
	ldr	x2, [x20, #8]
	add	x0, sp, #4
	mov	x1, x22
	bl	_ItemPointerSet
	ldr	w0, [sp, #12]
	bl	_BufferGetPage
	mov	x21, x0
	ldr	w0, [sp, #12]
	ldr	w1, [x20, #16]
	ldr	x2, [x20]
	ldr	w3, [sp, #4]
	bl	_brinSetHeapBlockItemptr
	mov	x0, x21
	mov	x1, x19
	bl	_PageSetLSN
	ldr	w0, [sp, #12]
	bl	_MarkBufferDirty
LBB0_13:
	ldr	w0, [sp, #12]
	bl	_BufferIsValid
	cbz	x0, LBB0_15
; %bb.14:
	ldr	w0, [sp, #12]
	bl	_UnlockReleaseBuffer
LBB0_15:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_XLOG_BRIN_INIT_PAGE,4,2        ; @XLOG_BRIN_INIT_PAGE
	.comm	_BRIN_PAGETYPE_REGULAR,4,2      ; @BRIN_PAGETYPE_REGULAR
	.comm	_BLK_NEEDS_REDO,8,3             ; @BLK_NEEDS_REDO
	.comm	_PANIC,4,2                      ; @PANIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"brin_xlog_insert_update: invalid max offset number"

	.comm	_InvalidOffsetNumber,8,3        ; @InvalidOffsetNumber
l_.str.1:                               ; @.str.1
	.asciz	"brin_xlog_insert_update: failed to add tuple"

	.no_dead_strip	_brin_xlog_insert_update
.subsections_via_symbols
