	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gbt_var_picksplit              ## -- Begin function gbt_var_picksplit
	.p2align	4, 0x90
_gbt_var_picksplit:                     ## @gbt_var_picksplit
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movslq	(%rdi), %r13
	movl	%r13d, %edi
	shll	$4, %edi
	callq	_palloc
	movq	%rax, %r15
	leal	4(,%r13,4), %r14d
	movl	%r14d, %edi
	callq	_palloc
	movq	%rax, (%rbx)
	movl	%r14d, %edi
	callq	_palloc
	movq	%rax, 8(%rbx)
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_PointerGetDatum
	movq	%rax, 40(%rbx)
	xorl	%edi, %edi
	callq	_PointerGetDatum
	movq	%rax, 32(%rbx)
	leal	(,%r13,8), %edi
	xorps	%xmm0, %xmm0
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movups	%xmm0, 16(%rbx)
	callq	_palloc
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_FirstOffsetNumber@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	cmpl	%eax, %r13d
	jg	LBB0_1
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rax
	shlq	$4, %rax
	movq	%r12, 8(%r15,%rax)
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rax
	shlq	$4, %rax
	movl	%ebx, (%r15,%rax)
	movl	%ebx, %edi
	callq	_OffsetNumberNext
                                        ## kill: def $eax killed $eax def $rax
	cmpl	%r13d, %eax
	jge	LBB0_5
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rcx
	movslq	%eax, %rbx
	movq	(%rcx,%rbx,8), %rdi
	callq	_DatumGetPointer
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_gbt_var_key_readable
	cmpq	%rdx, %rax
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	callq	_gbt_var_leaf2node
	movslq	%r14d, %r14
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, (%rdx,%r14,8)
	movq	%rbx, %rcx
	shlq	$4, %rcx
	movq	%rax, 8(%r15,%rcx)
	xorl	%eax, %eax
	cmpq	%r12, (%rdx,%r14,8)
	setne	%al
	addl	%eax, %r14d
	jmp	LBB0_4
LBB0_5:
	movq	_FirstOffsetNumber@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
LBB0_6:
	movq	%rax, %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	leaq	40(%rdx), %rsi
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	addq	$32, %rdx
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, -112(%rbp)
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, -120(%rbp)
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, -128(%rbp)
	shlq	$4, %rcx
	movq	%r15, %rdi
	addq	%rcx, %rdi
	movl	%r13d, %esi
	subl	%eax, %esi
	movq	_gbt_vsrt_cmp@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-128(%rbp), %r8
	movl	$16, %edx
	callq	_qsort_arg
	movq	(%rbx), %rax
	cmpl	%eax, %r13d
	jle	LBB0_13
## %bb.7:
	movq	%rbx, %r12
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	16(%rcx), %rdx
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	addq	$24, %rcx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %rcx
	movq	%r13, %rdx
	subq	%rax, %rdx
	shrq	%rdx
	movq	%rcx, %r14
	shlq	$4, %r14
	movq	8(%r15,%r14), %rsi
	cmpq	%rcx, %rdx
	jae	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	callq	_gbt_var_bin_union
	movl	(%r15,%r14), %ecx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdx
	movq	24(%rax), %rax
	movl	%ecx, (%rdx,%rax,4)
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_8 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	callq	_gbt_var_bin_union
	movl	(%r15,%r14), %ecx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdx
	movq	16(%rax), %rax
	movl	%ecx, (%rdx,%rax,4)
	movq	-104(%rbp), %rcx                ## 8-byte Reload
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%rax
	movq	%rax, (%rcx)
	movl	%ebx, %edi
	callq	_OffsetNumberNext
	cmpl	%r13d, %eax
	jge	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, %ebx
	movq	(%r12), %rax
	jmp	LBB0_8
LBB0_13:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	cmpq	$0, (%rbx)
	je	LBB0_15
## %bb.14:
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rdi
	callq	_DatumGetPointer
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_gbt_var_node_cp_len
	movl	%eax, %r14d
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %rdi
	callq	_DatumGetPointer
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_gbt_var_node_cp_len
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_Max
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %r15d
	movq	(%r13), %rdi
	callq	_DatumGetPointer
	movq	%rax, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	callq	_gbt_var_node_truncate
	movq	%rax, %r14
	movq	(%r12), %rdi
	callq	_DatumGetPointer
	movq	%rax, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	callq	_gbt_var_node_truncate
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_PointerGetDatum
	movq	%rax, (%r13)
	movq	%rbx, %rdi
	callq	_PointerGetDatum
	movq	%rax, (%r12)
LBB0_15:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FirstOffsetNumber,8,3          ## @FirstOffsetNumber
	.comm	_gbt_vsrt_cmp,4,2               ## @gbt_vsrt_cmp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gbt_var_picksplit              ; -- Begin function gbt_var_picksplit
	.p2align	2
_gbt_var_picksplit:                     ; @gbt_var_picksplit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	str	x4, [sp, #48]                   ; 8-byte Folded Spill
	mov	x24, x3
	str	w2, [sp, #44]                   ; 4-byte Folded Spill
	mov	x19, x1
	mov	x26, x0
	ldrsw	x22, [x0]
	lsl	w0, w22, #4
	bl	_palloc
	mov	x25, x0
	lsl	w8, w22, #2
	add	w21, w8, #4
	mov	x0, x21
	bl	_palloc
	str	x0, [x19]
	mov	x0, x21
	bl	_palloc
	str	x0, [x19, #8]
	mov	x0, #0
	bl	_PointerGetDatum
	mov	x8, x19
	str	x0, [x8, #40]!
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	mov	x0, #0
	bl	_PointerGetDatum
	mov	x8, x19
	str	x0, [x8, #32]!
	mov	x9, x8
	str	xzr, [x9, #-16]!
	str	x8, [sp]                        ; 8-byte Folded Spill
	str	xzr, [x8, #-8]!
	stp	x8, x9, [sp, #24]               ; 16-byte Folded Spill
	lsl	w0, w22, #3
	bl	_palloc
Lloh0:
	adrp	x23, _FirstOffsetNumber@GOTPAGE
Lloh1:
	ldr	x23, [x23, _FirstOffsetNumber@GOTPAGEOFF]
	ldr	x8, [x23]
	mov	x27, x8
	cmp	w22, w8
	b.le	LBB0_7
; %bb.1:
	mov	x28, x0
	str	x24, [sp, #16]                  ; 8-byte Folded Spill
	mov	w24, #0
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x25, x20, lsl #4
	str	x21, [x8, #8]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	lsl	x8, x20, #4
	str	w27, [x25, x8]
	mov	x0, x27
	bl	_OffsetNumberNext
	mov	x27, x0
	cmp	w0, w22
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26, #8]
	sxtw	x20, w27
	ldr	x0, [x8, w27, sxtw #3]
	bl	_DatumGetPointer
	mov	x21, x0
	bl	_gbt_var_key_readable
	cmp	x0, x1
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	ldr	x1, [sp, #16]                   ; 8-byte Folded Reload
	ldr	x2, [sp, #48]                   ; 8-byte Folded Reload
	bl	_gbt_var_leaf2node
	sbfiz	x8, x24, #3, #32
	str	x0, [x28, x8]
	add	x9, x25, x20, lsl #4
	str	x0, [x9, #8]
	ldr	x8, [x28, x8]
	cmp	x8, x21
	cinc	w24, w24, ne
	b	LBB0_3
LBB0_6:
	ldr	x8, [x23]
	mov	x27, x8
	ldr	x24, [sp, #16]                  ; 8-byte Folded Reload
LBB0_7:
	str	x24, [sp, #72]
	ldr	w9, [sp, #44]                   ; 4-byte Folded Reload
	str	w9, [sp, #64]
	ldr	x9, [sp, #48]                   ; 8-byte Folded Reload
	str	x9, [sp, #56]
	add	x0, x25, x8, lsl #4
	sub	w1, w22, w27
Lloh2:
	adrp	x8, _gbt_vsrt_cmp@GOTPAGE
Lloh3:
	ldr	x8, [x8, _gbt_vsrt_cmp@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	add	x4, sp, #56
	mov	w2, #16
	bl	_qsort_arg
	ldr	x8, [x23]
	cmp	w22, w8
	ldp	x28, x27, [sp]                  ; 16-byte Folded Reload
	b.le	LBB0_14
; %bb.8:
	mov	x0, x8
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	sxtw	x26, w0
	sub	x8, x22, x8
	add	x9, x25, w0, sxtw #4
	ldr	x1, [x9, #8]
	cmp	x26, x8, lsr #1
	lsl	x20, x26, #4
	b.ls	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x28
	ldr	w2, [sp, #44]                   ; 4-byte Folded Reload
	mov	x3, x24
	ldr	x4, [sp, #48]                   ; 8-byte Folded Reload
	bl	_gbt_var_bin_union
	ldr	w9, [x25, x20]
	ldr	x10, [x19, #8]
	ldr	x8, [x19, #24]
	str	w9, [x10, x8, lsl #2]
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x27
	ldr	w2, [sp, #44]                   ; 4-byte Folded Reload
	mov	x3, x24
	ldr	x4, [sp, #48]                   ; 8-byte Folded Reload
	bl	_gbt_var_bin_union
	ldr	w9, [x25, x20]
	ldr	x10, [x19]
	ldr	x8, [x19, #16]
	str	w9, [x10, x8, lsl #2]
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	add	x8, x8, #1
	str	x8, [x9]
	mov	x0, x26
	bl	_OffsetNumberNext
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, w22
	b.ge	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x23]
	b	LBB0_9
LBB0_14:
	ldr	x8, [x24]
	cbz	x8, LBB0_16
; %bb.15:
	ldr	x0, [x27]
	bl	_DatumGetPointer
	mov	x1, x24
	bl	_gbt_var_node_cp_len
	mov	x21, x0
	ldr	x0, [x28]
	bl	_DatumGetPointer
	mov	x1, x24
	bl	_gbt_var_node_cp_len
	mov	x1, x0
	mov	x0, x21
	bl	_Max
	add	w21, w0, #1
	ldr	x0, [x27]
	bl	_DatumGetPointer
	mov	x1, x21
	mov	x2, x24
	bl	_gbt_var_node_truncate
	mov	x23, x0
	ldr	x0, [x28]
	bl	_DatumGetPointer
	mov	x1, x21
	mov	x2, x24
	bl	_gbt_var_node_truncate
	mov	x20, x0
	mov	x0, x23
	bl	_PointerGetDatum
	str	x0, [x27]
	mov	x0, x20
	bl	_PointerGetDatum
	str	x0, [x28]
LBB0_16:
	mov	x0, x19
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FirstOffsetNumber,8,3          ; @FirstOffsetNumber
	.comm	_gbt_vsrt_cmp,4,2               ; @gbt_vsrt_cmp
.subsections_via_symbols
