	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xdl_prepare_env                ## -- Begin function xdl_prepare_env
	.p2align	4, 0x90
_xdl_prepare_env:                       ## @xdl_prepare_env
	.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	$24, %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
	movq	%rsi, %r13
	movq	%rdi, %r12
	leaq	-44(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	(%r15), %edi
	callq	_XDF_DIFF_ALG
	movq	_XDF_HISTOGRAM_DIFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_1
## %bb.2:
	movq	_XDL_GUESS_NLINES2@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_XDL_GUESS_NLINES1@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_xdl_guess_lines
	incl	%eax
	movslq	%eax, %r14
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_xdl_guess_lines
	incl	%eax
	movslq	%eax, %r13
	movl	(%r15), %edi
	callq	_XDF_DIFF_ALG
	movq	_XDF_HISTOGRAM_DIFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.4:
	leaq	(%r14,%r13), %rsi
	incq	%rsi
	movl	(%r15), %edx
	leaq	-44(%rbp), %rdi
	callq	_xdl_init_classifier
	testq	%rax, %rax
	js	LBB0_5
LBB0_6:
	leaq	-44(%rbp), %r8
	movl	$1, %edi
	movq	%r12, %rsi
	movq	%r14, %rdx
	movq	%r15, %rcx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r9
	callq	_xdl_prepare_ctx
	movl	$-1, %r12d
	testq	%rax, %rax
	js	LBB0_13
## %bb.7:
	leaq	4(%rbx), %r14
	leaq	-44(%rbp), %r8
	movl	$2, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	movq	%r15, %rcx
	movq	%r14, %r9
	callq	_xdl_prepare_ctx
	testq	%rax, %rax
	js	LBB0_12
## %bb.8:
	movl	(%r15), %edi
	callq	_XDF_DIFF_ALG
	movq	_XDF_PATIENCE_DIFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.9:
	movl	(%r15), %edi
	callq	_XDF_DIFF_ALG
	movq	_XDF_HISTOGRAM_DIFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.10:
	leaq	-44(%rbp), %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_xdl_optimize_ctxs
	testq	%rax, %rax
	js	LBB0_11
LBB0_15:
	movl	(%r15), %edi
	callq	_XDF_DIFF_ALG
	xorl	%r12d, %r12d
	movq	_XDF_HISTOGRAM_DIFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
	jmp	LBB0_14
LBB0_5:
	movl	$-1, %r12d
	jmp	LBB0_14
LBB0_11:
	movq	%r14, %rdi
	callq	_xdl_free_ctx
LBB0_12:
	movq	%rbx, %rdi
	callq	_xdl_free_ctx
LBB0_13:
	leaq	-44(%rbp), %rdi
	callq	_xdl_free_classifier
LBB0_14:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XDF_HISTOGRAM_DIFF,8,3         ## @XDF_HISTOGRAM_DIFF
	.comm	_XDL_GUESS_NLINES2,8,3          ## @XDL_GUESS_NLINES2
	.comm	_XDL_GUESS_NLINES1,8,3          ## @XDL_GUESS_NLINES1
	.comm	_XDF_PATIENCE_DIFF,8,3          ## @XDF_PATIENCE_DIFF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xdl_prepare_env                ; -- Begin function xdl_prepare_env
	.p2align	2
_xdl_prepare_env:                       ; @xdl_prepare_env
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	add	x0, sp, #12
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w0, [x20]
	bl	_XDF_DIFF_ALG
Lloh0:
	adrp	x25, _XDF_HISTOGRAM_DIFF@GOTPAGE
Lloh1:
	ldr	x25, [x25, _XDF_HISTOGRAM_DIFF@GOTPAGEOFF]
Lloh2:
	adrp	x8, _XDL_GUESS_NLINES2@GOTPAGE
Lloh3:
	ldr	x8, [x8, _XDL_GUESS_NLINES2@GOTPAGEOFF]
	ldr	x9, [x25]
Lloh4:
	adrp	x10, _XDL_GUESS_NLINES1@GOTPAGE
Lloh5:
	ldr	x10, [x10, _XDL_GUESS_NLINES1@GOTPAGEOFF]
	cmp	x0, x9
	csel	x8, x8, x10, eq
	ldr	x23, [x8]
	mov	x0, x22
	mov	x1, x23
	bl	_xdl_guess_lines
	add	w8, w0, #1
	sxtw	x24, w8
	mov	x0, x21
	mov	x1, x23
	bl	_xdl_guess_lines
	add	w8, w0, #1
	sxtw	x23, w8
	ldr	w0, [x20]
	bl	_XDF_DIFF_ALG
	ldr	x8, [x25]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
	add	x8, x24, x23
	add	x1, x8, #1
	ldr	w2, [x20]
	add	x0, sp, #12
	bl	_xdl_init_classifier
	tbnz	x0, #63, LBB0_8
LBB0_2:
	add	x4, sp, #12
	mov	w0, #1
	mov	x1, x22
	mov	x2, x24
	mov	x3, x20
	mov	x5, x19
	bl	_xdl_prepare_ctx
	tbnz	x0, #63, LBB0_11
; %bb.3:
	add	x22, x19, #4
	add	x4, sp, #12
	mov	w0, #2
	mov	x1, x21
	mov	x2, x23
	mov	x3, x20
	mov	x5, x22
	bl	_xdl_prepare_ctx
	tbnz	x0, #63, LBB0_10
; %bb.4:
	ldr	w0, [x20]
	bl	_XDF_DIFF_ALG
Lloh6:
	adrp	x8, _XDF_PATIENCE_DIFF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XDF_PATIENCE_DIFF@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.5:
	ldr	w0, [x20]
	bl	_XDF_DIFF_ALG
	ldr	x8, [x25]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.6:
	add	x0, sp, #12
	mov	x1, x19
	mov	x2, x22
	bl	_xdl_optimize_ctxs
	tbnz	x0, #63, LBB0_9
LBB0_7:
	ldr	w0, [x20]
	bl	_XDF_DIFF_ALG
	mov	x8, x0
	mov	w19, #0
	mov	w0, #0
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_12
	b	LBB0_13
LBB0_8:
	mov	w0, #-1
	b	LBB0_13
LBB0_9:
	mov	x0, x22
	bl	_xdl_free_ctx
LBB0_10:
	mov	x0, x19
	bl	_xdl_free_ctx
LBB0_11:
	mov	w19, #-1
LBB0_12:
	add	x0, sp, #12
	bl	_xdl_free_classifier
	mov	x0, x19
LBB0_13:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_XDF_HISTOGRAM_DIFF,8,3         ; @XDF_HISTOGRAM_DIFF
	.comm	_XDL_GUESS_NLINES2,8,3          ; @XDL_GUESS_NLINES2
	.comm	_XDL_GUESS_NLINES1,8,3          ; @XDL_GUESS_NLINES1
	.comm	_XDF_PATIENCE_DIFF,8,3          ; @XDF_PATIENCE_DIFF
.subsections_via_symbols
