	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_btbuild                        ## -- Begin function btbuild
	.p2align	4, 0x90
_btbuild:                               ## @btbuild
	.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	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movl	%edi, %r15d
	movl	(%rdx), %eax
	movl	%eax, -44(%rbp)
	movl	$0, -88(%rbp)
	movl	%edi, -48(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -80(%rbp)
	movups	%xmm0, -64(%rbp)
	movl	%esi, %edi
	callq	_RelationGetNumberOfBlocks
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%ebx, %edi
	callq	_RelationGetRelationName
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edi
	movl	%eax, %edx
	callq	_elog
LBB0_2:
	leaq	-88(%rbp), %rdx
	movl	%r15d, %edi
	movl	%ebx, %esi
	movq	%r14, %rcx
	callq	__bt_spools_heapscan
	movsd	%xmm0, -40(%rbp)                ## 8-byte Spill
	movq	-64(%rbp), %rsi
	movq	-56(%rbp), %rdi
	callq	__bt_leafbuild
	movq	-56(%rbp), %rdi
	callq	__bt_spooldestroy
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	__bt_spooldestroy
LBB0_4:
	movq	-72(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	__bt_end_parallel
LBB0_6:
	movl	$16, %edi
	callq	_palloc
	movsd	-40(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	%xmm0, (%rax)
	movq	-80(%rbp), %rcx
	movq	%rcx, 8(%rax)
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"index \"%s\" already contains data"

	.comm	_log_btree_build_stats,8,3      ## @log_btree_build_stats
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_btbuild                        ; -- Begin function btbuild
	.p2align	2
_btbuild:                               ; @btbuild
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	d9, d8, [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 b8, -56
	.cfi_offset b9, -64
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w8, [x2]
	str	wzr, [sp]
	stp	w0, w8, [sp, #40]
	movi.2d	v0, #0000000000000000
	stur	q0, [sp, #8]
	stur	q0, [sp, #24]
	mov	x0, x1
	bl	_RelationGetNumberOfBlocks
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_RelationGetRelationName
	mov	x2, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_elog
LBB0_2:
	mov	x2, sp
	mov	x0, x21
	mov	x1, x20
	mov	x3, x19
	bl	__bt_spools_heapscan
	fmov	d8, d0
	ldp	x1, x0, [sp, #24]
	bl	__bt_leafbuild
	ldr	x0, [sp, #32]
	bl	__bt_spooldestroy
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_4
; %bb.3:
	bl	__bt_spooldestroy
LBB0_4:
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_6
; %bb.5:
	bl	__bt_end_parallel
LBB0_6:
	mov	w0, #16
	bl	_palloc
	str	d8, [x0]
	ldr	x8, [sp, #8]
	str	x8, [x0, #8]
	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	d9, d8, [sp, #48]               ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"index \"%s\" already contains data"

	.comm	_log_btree_build_stats,8,3      ; @log_btree_build_stats
.subsections_via_symbols
