	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function try_mergejoin_path
_try_mergejoin_path:                    ## @try_mergejoin_path
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r15
	cmpl	$0, 48(%rbp)
	je	LBB0_1
## %bb.17:
	movq	%r15, %rdx
	movq	%rbx, %rcx
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_try_partial_mergejoin_path     ## TAILCALL
LBB0_1:
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movq	%r8, -120(%rbp)                 ## 8-byte Spill
	movq	40(%rbp), %r12
	movl	32(%rbp), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	24(%rbp), %r13
	movq	16(%rbp), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_calc_non_nestloop_required_outer
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	4(%r12), %esi
	movq	%rax, %rdi
	movq	%rax, %r14
	callq	_bms_overlap
	testl	%eax, %eax
	movq	%r14, %rax
	je	LBB0_18
LBB0_3:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	je	LBB0_4
## %bb.5:
	movl	(%r15), %esi
	callq	_pathkeys_contained_in
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	_NIL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_7
LBB0_4:
	xorl	%eax, %eax
LBB0_7:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_8:
	movq	%r12, %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	%r13, %rdi
	testq	%r13, %r13
	je	LBB0_9
## %bb.10:
	movq	%rbx, %r14
	movl	(%rbx), %esi
	callq	_pathkeys_contained_in
	movq	%r13, %rbx
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_NIL@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_12:
	movq	%r12, %rax
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_13
LBB0_9:
	movq	%rbx, %r14
	xorl	%ebx, %ebx
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
LBB0_13:
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	subq	$8, %rsp
	leaq	-80(%rbp), %rsi
	movq	%r13, %rdi
	movl	%ecx, %edx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%r15, %r8
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %r9
	pushq	%rax
	pushq	%rbx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	pushq	%rbx
	callq	_initial_cost_mergejoin
	addq	$32, %rsp
	movl	-80(%rbp), %edx
	movl	-76(%rbp), %esi
	movq	%r12, %rdi
	movq	-120(%rbp), %r12                ## 8-byte Reload
	movq	%r12, %rcx
	movq	-112(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %r8
	callq	_add_path_precheck
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	-96(%rbp), %r8                  ## 8-byte Reload
	movl	(%r8), %eax
	subq	$8, %rsp
	leaq	-80(%rbp), %rcx
	movq	%r13, %rdi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%r15, %r9
	pushq	-104(%rbp)                      ## 8-byte Folded Reload
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	pushq	%r14
	pushq	%r12
	pushq	%rax
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	callq	_create_mergejoin_path
	addq	$64, %rsp
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_add_path
	jmp	LBB0_16
LBB0_15:
	movq	%r14, %rdi
	callq	_bms_free
LBB0_16:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	%rax, %rdi
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bms_free                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NIL,8,3                        ## @NIL
	.no_dead_strip	_try_mergejoin_path
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function try_mergejoin_path
_try_mergejoin_path:                    ; @try_mergejoin_path
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x28, x7
	mov	x27, x6
	mov	x22, x4
	mov	x20, x3
	mov	x23, x2
	mov	x19, x1
	mov	x24, x0
	ldr	x25, [x29, #24]
	ldr	w26, [x29, #16]
	ldr	w8, [x29, #32]
	cbz	w8, LBB0_2
; %bb.1:
	str	x25, [x29, #24]
	str	w26, [x29, #16]
	mov	x0, x24
	mov	x1, x19
	mov	x2, x23
	mov	x3, x20
	mov	x4, x22
	mov	x6, x27
	mov	x7, x28
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	b	_try_partial_mergejoin_path
LBB0_2:
	str	x5, [sp, #48]                   ; 8-byte Folded Spill
	mov	x0, x23
	mov	x1, x20
	bl	_calc_non_nestloop_required_outer
	mov	x21, x0
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w1, [x25, #4]
	mov	x0, x21
	bl	_bms_overlap
	cbz	w0, LBB0_13
LBB0_4:
	str	x21, [sp, #40]                  ; 8-byte Folded Spill
Lloh0:
	adrp	x21, _NIL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _NIL@GOTPAGEOFF]
	cbz	x27, LBB0_7
; %bb.5:
	ldr	w1, [x23]
	mov	x0, x27
	bl	_pathkeys_contained_in
Lloh2:
	adrp	x21, _NIL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _NIL@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, #0
	csel	x9, x27, x8, eq
	cbz	x28, LBB0_8
LBB0_6:
	ldr	w1, [x20]
	mov	x0, x28
	mov	x27, x9
	bl	_pathkeys_contained_in
	mov	x9, x27
	ldr	x8, [x21]
	cmp	x0, #0
	csel	x27, x28, x8, eq
	b	LBB0_9
LBB0_7:
	mov	x9, #0
	cbnz	x28, LBB0_6
LBB0_8:
	mov	x27, #0
LBB0_9:
	ldp	x28, x3, [sp, #40]              ; 16-byte Folded Reload
	str	x25, [sp]
	add	x1, sp, #56
	mov	x0, x24
	mov	x2, x26
	mov	x4, x23
	mov	x5, x20
	mov	x21, x9
	mov	x6, x9
	mov	x7, x27
	bl	_initial_cost_mergejoin
	ldp	w2, w1, [sp, #56]
	mov	x0, x19
	mov	x3, x22
	mov	x4, x28
	bl	_add_path_precheck
	cbz	x0, LBB0_11
; %bb.10:
	ldr	w7, [x25]
	stp	x21, x27, [sp, #24]
	add	x3, sp, #56
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	stp	x28, x8, [sp, #8]
	str	x22, [sp]
	mov	x0, x24
	mov	x1, x19
	mov	x2, x26
	mov	x4, x25
	mov	x5, x23
	mov	x6, x20
	bl	_create_mergejoin_path
	mov	x1, x0
	mov	x0, x19
	bl	_add_path
	b	LBB0_12
LBB0_11:
	mov	x0, x28
	bl	_bms_free
LBB0_12:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	b	_bms_free
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_NIL,8,3                        ; @NIL
	.no_dead_strip	_try_mergejoin_path
.subsections_via_symbols
