	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__bt_parallel_build_main        ## -- Begin function _bt_parallel_build_main
	.p2align	4, 0x90
__bt_parallel_build_main:               ## @_bt_parallel_build_main
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_PARALLEL_KEY_QUERY_TEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_shm_toc_lookup
	movq	_debug_query_string@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_STATE_RUNNING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	%rax, %rsi
	callq	_pgstat_report_activity
	movq	_PARALLEL_KEY_BTREE_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_shm_toc_lookup
	movq	%rax, %r15
	cmpl	$0, 16(%rax)
	movq	_RowExclusiveLock@GOTPCREL(%rip), %rax
	cmoveq	_AccessExclusiveLock@GOTPCREL(%rip), %rax
	movq	_ShareUpdateExclusiveLock@GOTPCREL(%rip), %rcx
	cmoveq	_ShareLock@GOTPCREL(%rip), %rcx
	movl	(%rax), %ebx
	movl	(%rcx), %esi
	movl	12(%r15), %edi
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	callq	_table_open
	movq	%rax, %r13
	movl	8(%r15), %edi
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	callq	_index_open
	movq	%rax, %rbx
	movl	$24, %edi
	callq	_palloc0
	movq	%rax, %r12
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%r13, 16(%rax)
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, 8(%rax)
	movl	(%r15), %eax
	movl	%eax, (%r12)
	movq	_PARALLEL_KEY_TUPLESORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_shm_toc_lookup
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%rsi, %rbx
	callq	_tuplesort_attach_shared
	cmpl	$0, (%r15)
	je	LBB0_1
## %bb.2:
	movl	$24, %edi
	callq	_palloc0
	movq	%rax, %r13
	movups	8(%r12), %xmm0
	movups	%xmm0, 8(%rax)
	movl	$0, (%rax)
	movq	_PARALLEL_KEY_TUPLESORT_SPOOL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_shm_toc_lookup
	movq	%rax, %r14
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_tuplesort_attach_shared
	jmp	LBB0_3
LBB0_1:
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
LBB0_3:
	movq	_maintenance_work_mem@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	4(%r15)
	movl	$0, (%rsp)
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, %r8
	movl	%eax, %r9d
	callq	__bt_parallel_scan_and_sort
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_index_close
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_table_close                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PARALLEL_KEY_QUERY_TEXT,4,2    ## @PARALLEL_KEY_QUERY_TEXT
	.comm	_debug_query_string,8,3         ## @debug_query_string
	.comm	_STATE_RUNNING,4,2              ## @STATE_RUNNING
	.comm	_PARALLEL_KEY_BTREE_SHARED,4,2  ## @PARALLEL_KEY_BTREE_SHARED
	.comm	_ShareLock,4,2                  ## @ShareLock
	.comm	_AccessExclusiveLock,4,2        ## @AccessExclusiveLock
	.comm	_ShareUpdateExclusiveLock,4,2   ## @ShareUpdateExclusiveLock
	.comm	_RowExclusiveLock,4,2           ## @RowExclusiveLock
	.comm	_PARALLEL_KEY_TUPLESORT,4,2     ## @PARALLEL_KEY_TUPLESORT
	.comm	_PARALLEL_KEY_TUPLESORT_SPOOL2,4,2 ## @PARALLEL_KEY_TUPLESORT_SPOOL2
	.comm	_maintenance_work_mem,4,2       ## @maintenance_work_mem
	.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	__bt_parallel_build_main        ; -- Begin function _bt_parallel_build_main
	.p2align	2
__bt_parallel_build_main:               ; @_bt_parallel_build_main
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PARALLEL_KEY_QUERY_TEXT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PARALLEL_KEY_QUERY_TEXT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_shm_toc_lookup
	mov	x1, x0
Lloh3:
	adrp	x8, _debug_query_string@GOTPAGE
Lloh4:
	ldr	x8, [x8, _debug_query_string@GOTPAGEOFF]
Lloh5:
	str	x0, [x8]
Lloh6:
	adrp	x8, _STATE_RUNNING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STATE_RUNNING@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_pgstat_report_activity
Lloh9:
	adrp	x8, _PARALLEL_KEY_BTREE_SHARED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PARALLEL_KEY_BTREE_SHARED@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_shm_toc_lookup
	mov	x20, x0
Lloh12:
	adrp	x8, _AccessExclusiveLock@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AccessExclusiveLock@GOTPAGEOFF]
Lloh14:
	adrp	x9, _RowExclusiveLock@GOTPAGE
Lloh15:
	ldr	x9, [x9, _RowExclusiveLock@GOTPAGEOFF]
	ldp	w0, w10, [x0, #12]
	cmp	w10, #0
	csel	x8, x8, x9, eq
	ldr	w23, [x8]
Lloh16:
	adrp	x8, _ShareLock@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ShareLock@GOTPAGEOFF]
Lloh18:
	adrp	x9, _ShareUpdateExclusiveLock@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ShareUpdateExclusiveLock@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w22, [x8]
	mov	x1, x22
	bl	_table_open
	mov	x24, x0
	ldr	w0, [x20, #8]
	mov	x1, x23
	bl	_index_open
	mov	x25, x0
	mov	w0, #24
	bl	_palloc0
	mov	x26, x0
	stp	x25, x24, [x0, #8]
	ldr	w8, [x20]
	str	w8, [x0]
Lloh20:
	adrp	x8, _PARALLEL_KEY_TUPLESORT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PARALLEL_KEY_TUPLESORT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_shm_toc_lookup
	mov	x27, x0
	mov	x1, x19
	bl	_tuplesort_attach_shared
	ldr	w8, [x20]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w0, #24
	bl	_palloc0
	mov	x28, x0
	ldp	x9, x8, [x26, #8]
	stp	x9, x8, [x0, #8]
	str	wzr, [x0]
Lloh23:
	adrp	x8, _PARALLEL_KEY_TUPLESORT_SPOOL2@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PARALLEL_KEY_TUPLESORT_SPOOL2@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_shm_toc_lookup
	mov	x21, x0
	mov	x1, x19
	bl	_tuplesort_attach_shared
	b	LBB0_3
LBB0_2:
	mov	x21, #0
	mov	x28, #0
LBB0_3:
Lloh26:
	adrp	x8, _maintenance_work_mem@GOTPAGE
Lloh27:
	ldr	x8, [x8, _maintenance_work_mem@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	ldr	w9, [x20, #4]
	sdiv	w5, w8, w9
	mov	x0, x26
	mov	x1, x28
	mov	x2, x20
	mov	x3, x27
	mov	x4, x21
	mov	w6, #0
	bl	__bt_parallel_scan_and_sort
	mov	x0, x25
	mov	x1, x23
	bl	_index_close
	mov	x0, x24
	mov	x1, x22
	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
	b	_table_close
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_PARALLEL_KEY_QUERY_TEXT,4,2    ; @PARALLEL_KEY_QUERY_TEXT
	.comm	_debug_query_string,8,3         ; @debug_query_string
	.comm	_STATE_RUNNING,4,2              ; @STATE_RUNNING
	.comm	_PARALLEL_KEY_BTREE_SHARED,4,2  ; @PARALLEL_KEY_BTREE_SHARED
	.comm	_ShareLock,4,2                  ; @ShareLock
	.comm	_AccessExclusiveLock,4,2        ; @AccessExclusiveLock
	.comm	_ShareUpdateExclusiveLock,4,2   ; @ShareUpdateExclusiveLock
	.comm	_RowExclusiveLock,4,2           ; @RowExclusiveLock
	.comm	_PARALLEL_KEY_TUPLESORT,4,2     ; @PARALLEL_KEY_TUPLESORT
	.comm	_PARALLEL_KEY_TUPLESORT_SPOOL2,4,2 ; @PARALLEL_KEY_TUPLESORT_SPOOL2
	.comm	_maintenance_work_mem,4,2       ; @maintenance_work_mem
	.comm	_log_btree_build_stats,8,3      ; @log_btree_build_stats
.subsections_via_symbols
