	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sts_parallel_scan_next         ## -- Begin function sts_parallel_scan_next
	.p2align	4, 0x90
_sts_parallel_scan_next:                ## @sts_parallel_scan_next
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	cmpq	8(%rdi), %rax
	jge	LBB0_4
LBB0_1:
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_sts_read_tuple
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_3
## %bb.25:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	$0, (%rbx)
	movq	-64(%rbp), %rax
	movq	%rax, 8(%rbx)
	movq	_STS_CHUNK_HEADER_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 56(%rbx)
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	jl	LBB0_1
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rax
	movq	40(%rbx), %rcx
	movq	8(%rcx), %r13
	leaq	(%rax,%rax,2), %r14
	leaq	(,%r14,8), %r12
	addq	%r13, %r12
	leaq	16(%r13,%r14,8), %r15
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_LWLockAcquire
	movq	(%r13,%r14,8), %rcx
	movq	24(%rbx), %rax
	cmpq	%rax, %rcx
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, (%r12)
	movq	%rax, %rcx
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpq	8(%r13,%r14,8), %rcx
	jge	LBB0_16
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_STS_CHUNK_PAGES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	%rcx, %rax
	movq	%rax, (%r12)
	movq	%rax, 24(%rbx)
	movq	%r15, %rdi
	movq	%rcx, %r12
	callq	_LWLockRelease
	movq	48(%rbx), %rdi
	testq	%rdi, %rdi
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rsp, %r14
	movq	_MAXPGPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	16(%rbx), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_sts_filename
	movl	64(%rbx), %edi
	movq	%r15, %rsi
	callq	_BufFileOpenShared
	movq	%rax, 48(%rbx)
	movq	%r14, %rsp
	movq	48(%rbx), %rdi
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %r13
	movq	%r12, %rsi
	callq	_BufFileSeekBlock
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	leaq	L_.str.1(%rip), %rdi
	callq	_errdetail_internal
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	48(%rbx), %rdi
	movq	_STS_CHUNK_HEADER_SIZE@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	leaq	-72(%rbp), %rsi
	callq	_BufFileRead
	cmpq	(%r14), %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	leaq	L_.str.2(%rip), %rdi
	callq	_errdetail_internal
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	movslq	-72(%rbp), %rax
	testq	%rax, %rax
	jle	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_STS_CHUNK_PAGES@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	imulq	%rax, %rcx
	addq	%rcx, %r13
	movq	%r13, 24(%rbx)
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	callq	_LWLockRelease
	movq	48(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	callq	_BufFileClose
	movq	$0, 48(%rbx)
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%rbx), %rax
	movq	40(%rbx), %rcx
	incq	%rax
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_4 Depth=1
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_21
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%rdx, 16(%rbx)
	movslq	32(%rbx), %rax
	cmpq	%rax, %rdx
	je	LBB0_22
## %bb.23:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	$0, 24(%rbx)
	jmp	LBB0_24
LBB0_22:
	xorl	%eax, %eax
	jmp	LBB0_2
LBB0_3:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_STS_CHUNK_PAGES,4,2            ## @STS_CHUNK_PAGES
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not read from shared tuplestore temporary file"

L_.str.1:                               ## @.str.1
	.asciz	"Could not seek to next block."

	.comm	_STS_CHUNK_HEADER_SIZE,8,3      ## @STS_CHUNK_HEADER_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"Short read while reading chunk header."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sts_parallel_scan_next         ; -- Begin function sts_parallel_scan_next
	.p2align	2
_sts_parallel_scan_next:                ; @sts_parallel_scan_next
	.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
	sub	sp, sp, #32
	stur	x1, [x29, #-112]                ; 8-byte Folded Spill
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldp	x8, x9, [x0]
	cmp	x8, x9
	b.ge	LBB0_4
LBB0_1:
	mov	x0, x20
	ldur	x1, [x29, #-112]                ; 8-byte Folded Reload
	bl	_sts_read_tuple
LBB0_2:
	ldur	x8, [x29, #-88]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.3:
	sub	sp, x29, #80
	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
	ret
LBB0_4:
	mov	w26, #24
Lloh6:
	adrp	x27, _LW_EXCLUSIVE@GOTPAGE
Lloh7:
	ldr	x27, [x27, _LW_EXCLUSIVE@GOTPAGEOFF]
Lloh8:
	adrp	x28, _STS_CHUNK_PAGES@GOTPAGE
Lloh9:
	ldr	x28, [x28, _STS_CHUNK_PAGES@GOTPAGEOFF]
Lloh10:
	adrp	x22, _STS_CHUNK_HEADER_SIZE@GOTPAGE
Lloh11:
	ldr	x22, [x22, _STS_CHUNK_HEADER_SIZE@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldur	x8, [x29, #-96]
	stp	xzr, x8, [x20]
	ldr	x8, [x22]
	str	x8, [x20, #56]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldp	x8, x9, [x20]
	cmp	x8, x9
	b.lt	LBB0_1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #40]
	ldr	x19, [x8, #8]
	ldr	x21, [x20, #16]
	madd	x23, x21, x26, x19
	add	x25, x23, #16
	ldr	w1, [x27]
	mov	x0, x25
	bl	_LWLockAcquire
	ldr	x24, [x23]
	ldr	x8, [x20, #24]
	cmp	x24, x8
	b.ge	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	str	x8, [x23]
	mov	x24, x8
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	madd	x8, x21, x26, x19
	ldr	x8, [x8, #8]
	cmp	x24, x8
	b.ge	LBB0_18
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldrsw	x8, [x28]
	add	x8, x24, x8
	str	x8, [x23]
	str	x8, [x20, #24]
	mov	x0, x25
	bl	_LWLockRelease
	ldr	x0, [x20, #48]
	cbnz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x19, sp
Lloh12:
	adrp	x8, _MAXPGPATH@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MAXPGPATH@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	mov	x9, x8
Lloh15:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh16:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x25, x9, x8
	mov	sp, x25
	ldr	x2, [x20, #16]
	mov	x0, x25
	mov	x1, x20
	bl	_sts_filename
	ldr	w0, [x20, #64]
	mov	x1, x25
	bl	_BufFileOpenShared
	str	x0, [x20, #48]
	mov	sp, x19
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x1, x24
	bl	_BufFileSeekBlock
	cbz	x0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh17:
	adrp	x8, _ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w25, [x8]
	bl	_errcode_for_file_access
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errdetail_internal
	mov	x1, x0
	mov	x0, x25
	bl	_ereport
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x20, #48]
	ldr	x2, [x22]
	sub	x1, x29, #104
	bl	_BufFileRead
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh24:
	adrp	x8, _ERROR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh26:
	ldr	w25, [x8]
	bl	_errcode_for_file_access
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
Lloh29:
	adrp	x0, l_.str.2@PAGE
Lloh30:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_errdetail_internal
	mov	x1, x0
	mov	x0, x25
	bl	_ereport
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=1
	ldursw	x8, [x29, #-104]
	cmp	w8, #0
	b.le	LBB0_5
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=1
	ldrsw	x9, [x28]
	madd	x8, x9, x8, x24
	str	x8, [x20, #24]
	b	LBB0_6
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x25
	bl	_LWLockRelease
	ldr	x0, [x20, #48]
	cbz	x0, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_7 Depth=1
	bl	_BufFileClose
	str	xzr, [x20, #48]
LBB0_20:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x20, #16]
	add	x8, x8, #1
	ldr	x9, [x20, #40]
	ldrsw	x9, [x9]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x20, #16]
	ldrsw	x9, [x20, #32]
	cmp	x8, x9
	b.eq	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_7 Depth=1
	str	xzr, [x20, #24]
	b	LBB0_6
LBB0_22:
	mov	x0, #0
	b	LBB0_2
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_STS_CHUNK_PAGES,4,2            ; @STS_CHUNK_PAGES
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not read from shared tuplestore temporary file"

l_.str.1:                               ; @.str.1
	.asciz	"Could not seek to next block."

	.comm	_STS_CHUNK_HEADER_SIZE,8,3      ; @STS_CHUNK_HEADER_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"Short read while reading chunk header."

.subsections_via_symbols
