	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _bt_restore_page
__bt_restore_page:                      ## @_bt_restore_page
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movl	%edi, %r13d
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MaxIndexTuplesPerPage@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movl	(%r14), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rdx
	testl	%r15d, %r15d
	jle	LBB0_8
## %bb.1:
	movq	%r12, %rcx
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	movslq	%r15d, %rax
	addq	%rbx, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	leaq	-76(%rbp), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%rdx, %r13
	movl	$4, %edx
	movq	%rcx, %r12
	callq	_memcpy
	movq	%r15, %rdi
	callq	_IndexTupleSize
	movl	%eax, %edi
	callq	_MAXALIGN
	movq	%r13, %rdx
	movq	%r12, %rcx
	movq	%rbx, (%r12,%r14,8)
	movl	%eax, (%r13,%r14,4)
	incq	%r14
	cltq
	addq	%rax, %rbx
	cmpq	-72(%rbp), %rbx                 ## 8-byte Folded Reload
	jb	LBB0_2
## %bb.3:
	testl	%r14d, %r14d
	jle	LBB0_8
## %bb.4:
	movl	%r14d, %r15d
	incq	%r15
	movl	$1, %ebx
	movq	_InvalidOffsetNumber@GOTPCREL(%rip), %r14
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	decq	%r15
	incl	%ebx
	cmpq	$1, %r15
	movq	%r12, %rcx
	movq	%r13, %rdx
	jbe	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leal	-2(%r15), %eax
	movq	(%rcx,%rax,8), %rsi
	movl	(%rdx,%rax,4), %edx
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_PageAddItem
	cmpq	(%r14), %rax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_PANIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
	jmp	LBB0_7
LBB0_8:
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MaxIndexTuplesPerPage,4,2      ## @MaxIndexTuplesPerPage
	.comm	_InvalidOffsetNumber,8,3        ## @InvalidOffsetNumber
	.comm	_PANIC,4,2                      ## @PANIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"_bt_restore_page: cannot add item to page"

	.no_dead_strip	__bt_restore_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _bt_restore_page
__bt_restore_page:                      ; @_bt_restore_page
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #16
	mov	x20, x1
	mov	x19, x0
	mov	x22, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x12, _MaxIndexTuplesPerPage@GOTPAGE
Lloh4:
	ldr	x12, [x12, _MaxIndexTuplesPerPage@GOTPAGEOFF]
	ldr	w8, [x12]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x23, x9, x8
	mov	sp, x23
	ldr	w8, [x12]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x24, x9, x8
	mov	sp, x24
	cmp	w2, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x21, #0
	add	x25, x20, w2, sxtw
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sub	x0, x29, #92
	mov	x1, x20
	mov	w2, #4
	bl	_memcpy
	sub	x0, x29, #92
	bl	_IndexTupleSize
	bl	_MAXALIGN
	str	x20, [x23, x21, lsl #3]
	str	w0, [x24, x21, lsl #2]
	add	x21, x21, #1
	add	x20, x20, w0, sxtw
	cmp	x20, x25
	b.lo	LBB0_2
; %bb.3:
	cmp	w21, #1
	b.lt	LBB0_8
; %bb.4:
	and	x8, x21, #0xffffffff
	add	x25, x8, #1
	mov	w20, #1
Lloh9:
	adrp	x26, _InvalidOffsetNumber@GOTPAGE
Lloh10:
	ldr	x26, [x26, _InvalidOffsetNumber@GOTPAGEOFF]
Lloh11:
	adrp	x27, _PANIC@GOTPAGE
Lloh12:
	ldr	x27, [x27, _PANIC@GOTPAGEOFF]
Lloh13:
	adrp	x21, l_.str@PAGE
Lloh14:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	sub	x25, x25, #1
	add	w20, w20, #1
	cmp	x25, #1
	b.ls	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w25, #2
	ldr	x1, [x23, w8, uxtw #3]
	ldr	w2, [x24, w8, uxtw #2]
	mov	x0, x19
	mov	x3, x20
	mov	w4, #0
	mov	w5, #0
	bl	_PageAddItem
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x27]
	mov	x1, x21
	bl	_elog
	b	LBB0_5
LBB0_8:
	mov	sp, x22
	ldur	x8, [x29, #-88]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MaxIndexTuplesPerPage,4,2      ; @MaxIndexTuplesPerPage
	.comm	_InvalidOffsetNumber,8,3        ; @InvalidOffsetNumber
	.comm	_PANIC,4,2                      ; @PANIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"_bt_restore_page: cannot add item to page"

	.no_dead_strip	__bt_restore_page
.subsections_via_symbols
