	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_build_partition_pathkeys       ## -- Begin function build_partition_pathkeys
	.p2align	4, 0x90
_build_partition_pathkeys:              ## @build_partition_pathkeys
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	_NIL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	24(%rsi), %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_Assert
	movl	16(%r15), %esi
	movl	20(%r15), %edi
	callq	_partitions_are_ordered
	movl	%eax, %edi
	callq	_Assert
	movq	%r15, %rdi
	callq	_IS_SIMPLE_REL
	movl	%eax, %edi
	callq	_Assert
	cmpl	$0, (%rbx)
	jle	LBB0_1
## %bb.2:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_partkey_is_bool_constant_for_query
	testl	%eax, %eax
	je	LBB0_9
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	incq	%r14
	movslq	(%rbx), %rax
	cmpq	%rax, %r14
	jge	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	8(%r13), %rax
	movl	(%rax,%r14,4), %edi
	callq	_linitial
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	24(%rbx), %rax
	movl	(%rax,%r14,4), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	(%rcx,%r14,4), %r12d
	movl	(%rax,%r14,4), %r15d
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_ScanDirectionIsBackward
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	%ebx, %edi
	callq	_ScanDirectionIsBackward
                                        ## kill: def $eax killed $eax def $rax
	movl	(%r13), %ebx
	subq	$8, %rsp
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	movl	%r12d, %r8d
	movl	%r15d, %r9d
	pushq	$0
	pushq	%rbx
	pushq	$0
	pushq	%rax
	pushq	-104(%rbp)                      ## 8-byte Folded Reload
	callq	_make_pathkey_from_sortinfo
	addq	$48, %rsp
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r13
	movq	%rax, %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_pathkey_is_redundant
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_lappend
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_9:
	movl	$1, %eax
LBB0_10:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
LBB0_11:
	movl	%eax, (%r14)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NIL,8,3                        ## @NIL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_build_partition_pathkeys       ; -- Begin function build_partition_pathkeys
	.p2align	2
_build_partition_pathkeys:              ; @build_partition_pathkeys
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x3
	mov	x21, x2
	mov	x22, x1
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
Lloh0:
	adrp	x8, _NIL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NIL@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
	ldr	x23, [x1, #24]
	cmp	x23, #0
	cset	w0, ne
	bl	_Assert
	ldp	w1, w0, [x22, #16]
	bl	_partitions_are_ordered
	bl	_Assert
	mov	x0, x22
	bl	_IS_SIMPLE_REL
	bl	_Assert
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	str	x19, [sp, #16]                  ; 8-byte Folded Spill
	mov	x24, #0
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	mov	x1, x24
	bl	_partkey_is_bool_constant_for_query
	cbz	w0, LBB0_9
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	lsl	x19, x24, #2
	ldr	w0, [x8, x19]
	bl	_linitial
	mov	x25, x0
	ldr	x8, [x23, #24]
	ldr	w26, [x8, x19]
	ldp	x9, x8, [x23, #8]
	ldr	w27, [x8, x19]
	ldr	w28, [x9, x19]
	mov	x0, x21
	bl	_ScanDirectionIsBackward
	mov	x19, x0
	mov	x0, x21
	bl	_ScanDirectionIsBackward
	mov	x7, x0
	ldr	w8, [x22]
	stp	w8, wzr, [sp, #4]
	str	wzr, [sp]
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	mov	x1, x25
	mov	x2, #0
	mov	x3, x26
	mov	x4, x27
	mov	x5, x28
	mov	x6, x19
	bl	_make_pathkey_from_sortinfo
	cbz	x0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x0
	mov	x1, x20
	bl	_pathkey_is_redundant
	cbnz	w0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	x1, x25
	bl	_lappend
	mov	x20, x0
	b	LBB0_3
LBB0_7:
	mov	w8, #0
	b	LBB0_10
LBB0_8:
	mov	w8, #0
	b	LBB0_11
LBB0_9:
	mov	w8, #1
LBB0_10:
	ldr	x19, [sp, #16]                  ; 8-byte Folded Reload
LBB0_11:
	str	w8, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NIL,8,3                        ; @NIL
.subsections_via_symbols
