	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function choose_custom_plan
_choose_custom_plan:                    ## @choose_custom_plan
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpq	$0, 24(%rdi)
	je	LBB0_3
LBB0_1:
	movl	$1, %r14d
LBB0_2:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	xorl	%r14d, %r14d
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.4:
	movq	%rdi, %rbx
	callq	_IsTransactionStmtPlan
	testq	%rax, %rax
	jne	LBB0_2
## %bb.5:
	movq	_plan_cache_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PLAN_CACHE_MODE_FORCE_GENERIC_PLAN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.6:
	movq	_PLAN_CACHE_MODE_FORCE_CUSTOM_PLAN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_1
## %bb.8:
	movl	(%rbx), %eax
	movq	_CURSOR_OPT_GENERIC_PLAN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_2
## %bb.9:
	movq	_CURSOR_OPT_CUSTOM_PLAN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_1
## %bb.11:
	movl	4(%rbx), %eax
	movl	$1, %r14d
	cmpl	$5, %eax
	jl	LBB0_2
## %bb.12:
	movsd	8(%rbx), %xmm0                  ## xmm0 = mem[0],zero
	cvtsi2sd	%eax, %xmm1
	divsd	%xmm1, %xmm0
	xorl	%r14d, %r14d
	ucomisd	16(%rbx), %xmm0
	setbe	%r14b
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_plan_cache_mode,8,3            ## @plan_cache_mode
	.comm	_PLAN_CACHE_MODE_FORCE_GENERIC_PLAN,8,3 ## @PLAN_CACHE_MODE_FORCE_GENERIC_PLAN
	.comm	_PLAN_CACHE_MODE_FORCE_CUSTOM_PLAN,8,3 ## @PLAN_CACHE_MODE_FORCE_CUSTOM_PLAN
	.comm	_CURSOR_OPT_GENERIC_PLAN,4,2    ## @CURSOR_OPT_GENERIC_PLAN
	.comm	_CURSOR_OPT_CUSTOM_PLAN,4,2     ## @CURSOR_OPT_CUSTOM_PLAN
	.no_dead_strip	_choose_custom_plan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function choose_custom_plan
_choose_custom_plan:                    ; @choose_custom_plan
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_2
LBB0_1:
	mov	w0, #1
	b	LBB0_8
LBB0_2:
	cbz	x1, LBB0_7
; %bb.3:
	mov	x19, x0
	bl	_IsTransactionStmtPlan
	cbnz	x0, LBB0_7
; %bb.4:
Lloh0:
	adrp	x8, _plan_cache_mode@GOTPAGE
Lloh1:
	ldr	x8, [x8, _plan_cache_mode@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _PLAN_CACHE_MODE_FORCE_GENERIC_PLAN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PLAN_CACHE_MODE_FORCE_GENERIC_PLAN@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.5:
Lloh6:
	adrp	x9, _PLAN_CACHE_MODE_FORCE_CUSTOM_PLAN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PLAN_CACHE_MODE_FORCE_CUSTOM_PLAN@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_1
; %bb.6:
	ldr	w8, [x19]
Lloh9:
	adrp	x9, _CURSOR_OPT_GENERIC_PLAN@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CURSOR_OPT_GENERIC_PLAN@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh12:
	adrp	x9, _CURSOR_OPT_CUSTOM_PLAN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CURSOR_OPT_CUSTOM_PLAN@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_1
; %bb.10:
	ldr	w8, [x19, #4]
	cmp	w8, #5
	b.lt	LBB0_1
; %bb.11:
	scvtf	d0, w8
	ldp	d1, d2, [x19, #8]
	fdiv	d0, d1, d0
	fcmp	d2, d0
	cset	w0, pl
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_plan_cache_mode,8,3            ; @plan_cache_mode
	.comm	_PLAN_CACHE_MODE_FORCE_GENERIC_PLAN,8,3 ; @PLAN_CACHE_MODE_FORCE_GENERIC_PLAN
	.comm	_PLAN_CACHE_MODE_FORCE_CUSTOM_PLAN,8,3 ; @PLAN_CACHE_MODE_FORCE_CUSTOM_PLAN
	.comm	_CURSOR_OPT_GENERIC_PLAN,4,2    ; @CURSOR_OPT_GENERIC_PLAN
	.comm	_CURSOR_OPT_CUSTOM_PLAN,4,2     ; @CURSOR_OPT_CUSTOM_PLAN
	.no_dead_strip	_choose_custom_plan
.subsections_via_symbols
