	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_btgettuple                     ## -- Begin function btgettuple
	.p2align	4, 0x90
_btgettuple:                            ## @btgettuple
	.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	%esi, %r14d
	movq	%rdi, %r15
	movslq	16(%rdi), %r12
	movl	$0, (%rdi)
	cmpq	$0, (%r12)
	je	LBB0_5
## %bb.1:
	movl	20(%r12), %edi
	callq	_BTScanPosIsValid
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	cmpq	$0, (%r12)
	js	LBB0_3
## %bb.4:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	__bt_start_array_keys
LBB0_5:
	movq	_MaxIndexTuplesPerPage@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	20(%r12), %edi
	callq	_BTScanPosIsValid
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, 8(%r15)
	je	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%r12), %rax
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r13), %edi
	shll	$2, %edi
	callq	_palloc
	movq	%rax, 8(%r12)
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movslq	16(%r12), %rcx
	cmpl	(%r13), %ecx
	jge	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	20(%r12), %edx
	leal	1(%rcx), %esi
	movl	%esi, 16(%r12)
	movl	%edx, (%rax,%rcx,4)
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	__bt_next
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	__bt_first
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=1
	xorl	%ebx, %ebx
	cmpq	$0, (%r12)
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	__bt_advance_array_keys
	testq	%rax, %rax
	jne	LBB0_6
	jmp	LBB0_17
LBB0_3:
	xorl	%ebx, %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MaxIndexTuplesPerPage,4,2      ## @MaxIndexTuplesPerPage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_btgettuple                     ; -- Begin function btgettuple
	.p2align	2
_btgettuple:                            ; @btgettuple
	.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, x1
	mov	x20, x0
	ldrsw	x21, [x0, #16]
	str	wzr, [x0]
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w0, [x21, #20]
	bl	_BTScanPosIsValid
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	x8, [x21]
	tbnz	x8, #63, LBB0_15
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	bl	__bt_start_array_keys
LBB0_4:
Lloh0:
	adrp	x22, _MaxIndexTuplesPerPage@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MaxIndexTuplesPerPage@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21, #20]
	bl	_BTScanPosIsValid
	cbz	w0, LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x21, #8]
	cbnz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x22]
	lsl	w0, w8, #2
	bl	_palloc
	str	x0, [x21, #8]
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldrsw	x8, [x21, #16]
	ldr	w9, [x22]
	cmp	w8, w9
	b.ge	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x21, #20]
	add	w10, w8, #1
	str	w10, [x21, #16]
	str	w9, [x0, x8, lsl #2]
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	__bt_next
	cbz	w0, LBB0_13
	b	LBB0_16
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	__bt_first
	cbnz	w0, LBB0_16
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21]
	cbz	x8, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	__bt_advance_array_keys
	cbnz	x0, LBB0_5
	b	LBB0_16
LBB0_15:
	mov	w0, #0
LBB0_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	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MaxIndexTuplesPerPage,4,2      ; @MaxIndexTuplesPerPage
.subsections_via_symbols
