	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xdl_do_diff                    ## -- Begin function xdl_do_diff
	.p2align	4, 0x90
_xdl_do_diff:                           ## @xdl_do_diff
	.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
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	(%rdx), %edi
	callq	_XDF_DIFF_ALG
	movq	_XDF_PATIENCE_DIFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.7:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movq	%r14, %rcx
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xdl_do_patience_diff           ## TAILCALL
LBB0_1:
	movl	(%r13), %edi
	callq	_XDF_DIFF_ALG
	movq	_XDF_HISTOGRAM_DIFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.8:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movq	%r14, %rcx
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xdl_do_histogram_diff          ## TAILCALL
LBB0_2:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movq	%r14, %rcx
	callq	_xdl_prepare_env
	movl	$-1, %r12d
	testq	%rax, %rax
	js	LBB0_6
## %bb.3:
	movl	(%r14), %eax
	movl	16(%r14), %ecx
	leal	(%rcx,%rax), %ebx
	addl	$3, %ebx
	movl	%ebx, %edi
	shll	$4, %edi
	addl	$16, %edi
	callq	_xdl_malloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %r15
	movslq	%ebx, %rdi
	leaq	(%rax,%rdi,8), %rax
	movslq	(%r14), %rcx
	leaq	(%r15,%rcx,8), %rdx
	addq	$8, %rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rcx,8), %rax
	addq	$8, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_xdl_bogosqrt
	movq	_XDL_MAX_COST_MIN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	cmovgq	%rax, %rcx
	movq	%rcx, -72(%rbp)
	movq	_XDL_SNAKE_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movq	_XDL_HEUR_MIN_COST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movl	16(%r14), %edx
	movups	16(%r14), %xmm0
	movaps	%xmm0, -112(%rbp)
	movl	(%r14), %r9d
	movups	(%r14), %xmm0
	movaps	%xmm0, -96(%rbp)
	movq	_XDF_NEED_MINIMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	andl	(%r13), %eax
	setne	%bl
	leaq	-72(%rbp), %rax
	leaq	-112(%rbp), %rdi
	leaq	-96(%rbp), %rcx
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	pushq	%rax
	pushq	%rbx
	pushq	-48(%rbp)                       ## 8-byte Folded Reload
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	callq	_xdl_recs_cmp
	addq	$32, %rsp
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_xdl_free
	testq	%rbx, %rbx
	jns	LBB0_6
LBB0_5:
	movq	%r14, %rdi
	callq	_xdl_free_env
	movl	$-1, %r12d
LBB0_6:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XDF_PATIENCE_DIFF,8,3          ## @XDF_PATIENCE_DIFF
	.comm	_XDF_HISTOGRAM_DIFF,8,3         ## @XDF_HISTOGRAM_DIFF
	.comm	_XDL_MAX_COST_MIN,8,3           ## @XDL_MAX_COST_MIN
	.comm	_XDL_SNAKE_CNT,4,2              ## @XDL_SNAKE_CNT
	.comm	_XDL_HEUR_MIN_COST,4,2          ## @XDL_HEUR_MIN_COST
	.comm	_XDF_NEED_MINIMAL,4,2           ## @XDF_NEED_MINIMAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xdl_do_diff                    ; -- Begin function xdl_do_diff
	.p2align	2
_xdl_do_diff:                           ; @xdl_do_diff
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	w0, [x2]
	bl	_XDF_DIFF_ALG
Lloh0:
	adrp	x8, _XDF_PATIENCE_DIFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XDF_PATIENCE_DIFF@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	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
	add	sp, sp, #128
	b	_xdl_do_patience_diff
LBB0_2:
	ldr	w0, [x20]
	bl	_XDF_DIFF_ALG
Lloh3:
	adrp	x8, _XDF_HISTOGRAM_DIFF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XDF_HISTOGRAM_DIFF@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	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
	add	sp, sp, #128
	b	_xdl_do_histogram_diff
LBB0_4:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_xdl_prepare_env
	tbnz	x0, #63, LBB0_8
; %bb.5:
	ldr	w8, [x19, #16]
	ldr	w9, [x19]
	add	w8, w8, w9
	add	w22, w8, #3
	lsl	w8, w22, #4
	add	w0, w8, #16
	bl	_xdl_malloc
	cbz	x0, LBB0_7
; %bb.6:
	mov	x21, x0
	sxtw	x0, w22
	add	x8, x21, w22, sxtw #3
	ldrsw	x9, [x19]
	lsl	x9, x9, #3
	add	x9, x9, #8
	add	x22, x21, x9
	add	x23, x8, x9
	bl	_xdl_bogosqrt
Lloh6:
	adrp	x8, _XDL_MAX_COST_MIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XDL_MAX_COST_MIN@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	csel	x8, x0, x8, gt
	str	x8, [sp, #48]
Lloh9:
	adrp	x8, _XDL_SNAKE_CNT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _XDL_SNAKE_CNT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _XDL_HEUR_MIN_COST@GOTPAGE
Lloh13:
	ldr	x9, [x9, _XDL_HEUR_MIN_COST@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #56]
	ldp	q1, q0, [x19]
	stp	q1, q0, [sp, #16]
Lloh15:
	adrp	x8, _XDF_NEED_MINIMAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _XDF_NEED_MINIMAL@GOTPAGEOFF]
	ldr	w9, [x20]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w9
	cset	w8, ne
	fmov	w2, s0
	fmov	w5, s1
	add	x9, sp, #48
	str	x9, [sp, #8]
	str	w8, [sp]
	add	x0, sp, #32
	add	x3, sp, #16
	mov	w1, #0
	mov	w4, #0
	mov	x6, x22
	mov	x7, x23
	bl	_xdl_recs_cmp
	mov	x20, x0
	mov	x0, x21
	bl	_xdl_free
	mov	w0, #0
	tbz	x20, #63, LBB0_9
LBB0_7:
	mov	x0, x19
	bl	_xdl_free_env
LBB0_8:
	mov	w0, #-1
LBB0_9:
	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
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_XDF_PATIENCE_DIFF,8,3          ; @XDF_PATIENCE_DIFF
	.comm	_XDF_HISTOGRAM_DIFF,8,3         ; @XDF_HISTOGRAM_DIFF
	.comm	_XDL_MAX_COST_MIN,8,3           ; @XDL_MAX_COST_MIN
	.comm	_XDL_SNAKE_CNT,4,2              ; @XDL_SNAKE_CNT
	.comm	_XDL_HEUR_MIN_COST,4,2          ; @XDL_HEUR_MIN_COST
	.comm	_XDF_NEED_MINIMAL,4,2           ; @XDF_NEED_MINIMAL
.subsections_via_symbols
