	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btree_xlog_mark_page_halfdead
_btree_xlog_mark_page_halfdead:         ## @btree_xlog_mark_page_halfdead
	.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, %r12
	movl	(%rsi), %r13d
	movq	%rsi, %rdi
	callq	_XLogRecGetData
	movq	%rax, %r15
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_XLogReadBufferForRedo
	movq	_BLK_NEEDS_REDO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	-44(%rbp), %edi
	callq	_BufferGetPage
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_PageGetSpecialPointer
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	movl	12(%r15), %r13d
	movl	%r13d, %edi
	callq	_OffsetNumberNext
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_PageGetItemId
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_PageGetItem
	movq	%rax, %rdi
	callq	_BTreeInnerTupleGetDownLink
	movl	%eax, %r14d
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_PageGetItemId
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_PageGetItem
	movq	%rax, %rdi
	movl	%r14d, %esi
	callq	_BTreeInnerTupleSetDownLink
	movl	%r13d, %edi
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	callq	_OffsetNumberNext
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_PageIndexTupleDelete
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_PageSetLSN
	movl	-44(%rbp), %edi
	callq	_MarkBufferDirty
LBB0_2:
	movl	-44(%rbp), %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	-44(%rbp), %edi
	callq	_UnlockReleaseBuffer
LBB0_4:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_XLogInitBufferForRedo
	movl	%eax, -44(%rbp)
	movl	%eax, %edi
	callq	_BufferGetPage
	movq	%rax, %rbx
	movl	-44(%rbp), %edi
	callq	_BufferGetPageSize
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	__bt_pageinit
	movq	%rbx, %rdi
	callq	_PageGetSpecialPointer
	movl	8(%r15), %ecx
	movl	%ecx, 28(%rax)
	movl	4(%r15), %ecx
	movl	%ecx, 24(%rax)
	movq	_BTP_HALF_DEAD@GOTPCREL(%rip), %rcx
	movq	_BTP_LEAF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	%edx, (%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_MemSet
	movl	$4, -48(%rbp)
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_BTreeTupleSetTopParent
	movq	_P_HIKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	$4, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_PageAddItem
	movq	_InvalidOffsetNumber@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_6:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_PageSetLSN
	movl	-44(%rbp), %edi
	callq	_MarkBufferDirty
	movl	-44(%rbp), %edi
	callq	_UnlockReleaseBuffer
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLK_NEEDS_REDO,8,3             ## @BLK_NEEDS_REDO
	.comm	_BTP_HALF_DEAD,4,2              ## @BTP_HALF_DEAD
	.comm	_BTP_LEAF,4,2                   ## @BTP_LEAF
	.comm	_P_HIKEY,4,2                    ## @P_HIKEY
	.comm	_InvalidOffsetNumber,8,3        ## @InvalidOffsetNumber
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not add dummy high key to half-dead page"

	.no_dead_strip	_btree_xlog_mark_page_halfdead
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btree_xlog_mark_page_halfdead
_btree_xlog_mark_page_halfdead:         ; @btree_xlog_mark_page_halfdead
	.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
	mov	x21, x1
	ldr	w19, [x1]
	mov	x0, x1
	bl	_XLogRecGetData
	mov	x20, x0
	add	x2, sp, #12
	mov	x0, x21
	mov	w1, #1
	bl	_XLogReadBufferForRedo
Lloh0:
	adrp	x8, _BLK_NEEDS_REDO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLK_NEEDS_REDO@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [sp, #12]
	bl	_BufferGetPage
	mov	x22, x0
	bl	_PageGetSpecialPointer
	ldr	w23, [x20, #12]
	mov	x0, x23
	bl	_OffsetNumberNext
	mov	x1, x0
	mov	x0, x22
	bl	_PageGetItemId
	mov	x1, x0
	mov	x0, x22
	bl	_PageGetItem
	bl	_BTreeInnerTupleGetDownLink
	mov	x24, x0
	mov	x0, x22
	mov	x1, x23
	bl	_PageGetItemId
	mov	x1, x0
	mov	x0, x22
	bl	_PageGetItem
	mov	x1, x24
	bl	_BTreeInnerTupleSetDownLink
	mov	x0, x23
	bl	_OffsetNumberNext
	mov	x1, x0
	mov	x0, x22
	bl	_PageIndexTupleDelete
	mov	x0, x22
	mov	x1, x19
	bl	_PageSetLSN
	ldr	w0, [sp, #12]
	bl	_MarkBufferDirty
LBB0_2:
	ldr	w0, [sp, #12]
	bl	_BufferIsValid
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [sp, #12]
	bl	_UnlockReleaseBuffer
LBB0_4:
	mov	x0, x21
	mov	w1, #0
	bl	_XLogInitBufferForRedo
	str	w0, [sp, #12]
	bl	_BufferGetPage
	mov	x21, x0
	ldr	w0, [sp, #12]
	bl	_BufferGetPageSize
	mov	x1, x0
	mov	x0, x21
	bl	__bt_pageinit
	mov	x0, x21
	bl	_PageGetSpecialPointer
	ldur	d0, [x20, #4]
	str	d0, [x0, #24]
Lloh3:
	adrp	x8, _BTP_HALF_DEAD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BTP_HALF_DEAD@GOTPAGEOFF]
Lloh5:
	adrp	x9, _BTP_LEAF@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BTP_LEAF@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x0]
	stp	xzr, xzr, [x0, #8]
	mov	w22, #4
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_MemSet
	str	w22, [sp, #8]
	ldr	w1, [x20]
	add	x0, sp, #8
	bl	_BTreeTupleSetTopParent
Lloh9:
	adrp	x8, _P_HIKEY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _P_HIKEY@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	add	x1, sp, #8
	mov	x0, x21
	mov	w2, #4
	mov	w4, #0
	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_6
; %bb.5:
Lloh15:
	adrp	x8, _ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_6:
	mov	x0, x21
	mov	x1, x19
	bl	_PageSetLSN
	ldr	w0, [sp, #12]
	bl	_MarkBufferDirty
	ldr	w0, [sp, #12]
	bl	_UnlockReleaseBuffer
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BLK_NEEDS_REDO,8,3             ; @BLK_NEEDS_REDO
	.comm	_BTP_HALF_DEAD,4,2              ; @BTP_HALF_DEAD
	.comm	_BTP_LEAF,4,2                   ; @BTP_LEAF
	.comm	_P_HIKEY,4,2                    ; @P_HIKEY
	.comm	_InvalidOffsetNumber,8,3        ; @InvalidOffsetNumber
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not add dummy high key to half-dead page"

	.no_dead_strip	_btree_xlog_mark_page_halfdead
.subsections_via_symbols
