	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _bt_spools_heapscan
__bt_spools_heapscan:                   ## @_bt_spools_heapscan
	.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	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	$32, %edi
	callq	_palloc0
	movq	%r12, 24(%rax)
	movq	%r15, 16(%rax)
	movl	(%r14), %ecx
	movl	%ecx, (%rax)
	movq	%rax, 32(%rbx)
	movq	_PROGRESS_CREATEIDX_SUBPHASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PROGRESS_BTREE_PHASE_INDEXBUILD_TABLESCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pgstat_progress_update_param
	movq	8(%r14), %rdx
	testq	%rdx, %rdx
	jle	LBB0_2
## %bb.1:
	movl	20(%r14), %esi
	movq	%rbx, %rdi
	callq	__bt_begin_parallel
LBB0_2:
	cmpq	$0, 24(%rbx)
	je	LBB0_3
## %bb.4:
	movl	$4, %edi
	callq	_palloc0
	movq	%rax, %r8
	movl	$0, (%rax)
	movq	24(%rbx), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 8(%r8)
	movl	8(%rax), %eax
	movl	%eax, 4(%r8)
	jmp	LBB0_5
LBB0_3:
	xorl	%r8d, %r8d
LBB0_5:
	movl	(%rbx), %edx
	movq	_maintenance_work_mem@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%r9d, %r9d
	callq	_tuplesort_begin_index_btree
	movq	32(%rbx), %rcx
	movq	%rax, 8(%rcx)
	cmpl	$0, (%r14)
	je	LBB0_10
## %bb.6:
	movl	$32, %edi
	callq	_palloc0
	movq	%r12, 24(%rax)
	movq	%r15, 16(%rax)
	movl	$0, (%rax)
	movq	%rax, 8(%rbx)
	cmpq	$0, 24(%rbx)
	je	LBB0_7
## %bb.8:
	movl	$4, %edi
	callq	_palloc0
	movq	%rax, %r8
	movl	$0, (%rax)
	movq	24(%rbx), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 8(%r8)
	movl	(%rax), %eax
	movl	%eax, 4(%r8)
	jmp	LBB0_9
LBB0_7:
	xorl	%r8d, %r8d
LBB0_9:
	movq	_work_mem@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_tuplesort_begin_index_btree
	movq	8(%rbx), %rcx
	movq	%rax, 8(%rcx)
LBB0_10:
	cmpq	$0, 24(%rbx)
	je	LBB0_11
## %bb.12:
	addq	$16, %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	__bt_parallel_heapscan
	jmp	LBB0_13
LBB0_11:
	movq	__bt_build_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	movl	$1, %r8d
	pushq	$0
	pushq	%rbx
	callq	_table_index_build_scan
	addq	$16, %rsp
LBB0_13:
	movsd	%xmm0, -72(%rbp)                ## 8-byte Spill
	movq	_PROGRESS_CREATEIDX_TUPLES_TOTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_PROGRESS_SCAN_BLOCKS_TOTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_PROGRESS_SCAN_BLOCKS_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movl	20(%rbx), %eax
	movl	%eax, -64(%rbp)
	movq	$0, -60(%rbp)
	leaq	-52(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	movl	$3, %edi
	callq	_pgstat_progress_update_multi_param
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.14:
	cmpl	$0, 16(%rbx)
	jne	LBB0_16
## %bb.15:
	callq	__bt_spooldestroy
	movq	$0, 8(%rbx)
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	movsd	-72(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PROGRESS_CREATEIDX_SUBPHASE,4,2 ## @PROGRESS_CREATEIDX_SUBPHASE
	.comm	_PROGRESS_BTREE_PHASE_INDEXBUILD_TABLESCAN,4,2 ## @PROGRESS_BTREE_PHASE_INDEXBUILD_TABLESCAN
	.comm	_maintenance_work_mem,4,2       ## @maintenance_work_mem
	.comm	_work_mem,4,2                   ## @work_mem
	.comm	__bt_build_callback,4,2         ## @_bt_build_callback
	.comm	_PROGRESS_CREATEIDX_TUPLES_TOTAL,4,2 ## @PROGRESS_CREATEIDX_TUPLES_TOTAL
	.comm	_PROGRESS_SCAN_BLOCKS_TOTAL,4,2 ## @PROGRESS_SCAN_BLOCKS_TOTAL
	.comm	_PROGRESS_SCAN_BLOCKS_DONE,4,2  ## @PROGRESS_SCAN_BLOCKS_DONE
	.no_dead_strip	__bt_spools_heapscan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _bt_spools_heapscan
__bt_spools_heapscan:                   ; @_bt_spools_heapscan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	d9, d8, [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 b8, -56
	.cfi_offset b9, -64
	mov	x20, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	mov	w0, #32
	bl	_palloc0
	stp	x21, x22, [x0, #16]
	ldr	w8, [x20]
	str	w8, [x0]
	str	x0, [x19, #32]
Lloh3:
	adrp	x8, _PROGRESS_CREATEIDX_SUBPHASE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PROGRESS_CREATEIDX_SUBPHASE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _PROGRESS_BTREE_PHASE_INDEXBUILD_TABLESCAN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PROGRESS_BTREE_PHASE_INDEXBUILD_TABLESCAN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_pgstat_progress_update_param
	ldr	x2, [x20, #8]
	cmp	x2, #1
	b.lt	LBB0_2
; %bb.1:
	ldr	w1, [x20, #20]
	mov	x0, x19
	bl	__bt_begin_parallel
LBB0_2:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_4
; %bb.3:
	mov	w0, #4
	bl	_palloc0
	mov	x4, x0
	str	wzr, [x0]
	ldr	x8, [x19, #24]
	ldur	d0, [x8, #4]
	rev64.2s	v0, v0
	stur	d0, [x0, #4]
	b	LBB0_5
LBB0_4:
	mov	x4, #0
LBB0_5:
	ldr	w2, [x19]
Lloh9:
	adrp	x8, _maintenance_work_mem@GOTPAGE
Lloh10:
	ldr	x8, [x8, _maintenance_work_mem@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x0, x22
	mov	x1, x21
	mov	w5, #0
	bl	_tuplesort_begin_index_btree
	ldr	x8, [x19, #32]
	str	x0, [x8, #8]
	ldr	w8, [x20]
	cbz	w8, LBB0_10
; %bb.6:
	mov	w0, #32
	bl	_palloc0
	stp	x21, x22, [x0, #16]
	str	wzr, [x0]
	str	x0, [x19, #8]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_8
; %bb.7:
	mov	w0, #4
	bl	_palloc0
	mov	x4, x0
	str	wzr, [x0]
	ldr	x8, [x19, #24]
	ldr	d0, [x8]
	stur	d0, [x0, #4]
	b	LBB0_9
LBB0_8:
	mov	x4, #0
LBB0_9:
Lloh12:
	adrp	x8, _work_mem@GOTPAGE
Lloh13:
	ldr	x8, [x8, _work_mem@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x0, x22
	mov	x1, x21
	mov	w2, #0
	mov	w5, #0
	bl	_tuplesort_begin_index_btree
	ldr	x8, [x19, #8]
	str	x0, [x8, #8]
LBB0_10:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_12
; %bb.11:
	add	x1, x20, #16
	mov	x0, x19
	bl	__bt_parallel_heapscan
	b	LBB0_13
LBB0_12:
Lloh15:
	adrp	x8, __bt_build_callback@GOTPAGE
Lloh16:
	ldr	x8, [x8, __bt_build_callback@GOTPAGEOFF]
Lloh17:
	ldr	w5, [x8]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	w3, #1
	mov	w4, #1
	mov	x6, x19
	mov	x7, #0
	bl	_table_index_build_scan
LBB0_13:
	fmov	d8, d0
Lloh18:
	adrp	x8, _PROGRESS_CREATEIDX_TUPLES_TOTAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PROGRESS_CREATEIDX_TUPLES_TOTAL@GOTPAGEOFF]
Lloh20:
	adrp	x9, _PROGRESS_SCAN_BLOCKS_TOTAL@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PROGRESS_SCAN_BLOCKS_TOTAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #12]
Lloh24:
	adrp	x8, _PROGRESS_SCAN_BLOCKS_DONE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PROGRESS_SCAN_BLOCKS_DONE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	str	w8, [sp, #20]
	ldr	w8, [x19, #20]
	stp	wzr, wzr, [sp, #4]
	str	w8, [sp]
	add	x1, sp, #12
	mov	x2, sp
	mov	w0, #3
	bl	_pgstat_progress_update_multi_param
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_16
; %bb.14:
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_16
; %bb.15:
	bl	__bt_spooldestroy
	str	xzr, [x19, #8]
LBB0_16:
	ldr	x8, [sp, #24]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	fmov	d0, d8
	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	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_PROGRESS_CREATEIDX_SUBPHASE,4,2 ; @PROGRESS_CREATEIDX_SUBPHASE
	.comm	_PROGRESS_BTREE_PHASE_INDEXBUILD_TABLESCAN,4,2 ; @PROGRESS_BTREE_PHASE_INDEXBUILD_TABLESCAN
	.comm	_maintenance_work_mem,4,2       ; @maintenance_work_mem
	.comm	_work_mem,4,2                   ; @work_mem
	.comm	__bt_build_callback,4,2         ; @_bt_build_callback
	.comm	_PROGRESS_CREATEIDX_TUPLES_TOTAL,4,2 ; @PROGRESS_CREATEIDX_TUPLES_TOTAL
	.comm	_PROGRESS_SCAN_BLOCKS_TOTAL,4,2 ; @PROGRESS_SCAN_BLOCKS_TOTAL
	.comm	_PROGRESS_SCAN_BLOCKS_DONE,4,2  ; @PROGRESS_SCAN_BLOCKS_DONE
	.no_dead_strip	__bt_spools_heapscan
.subsections_via_symbols
