	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reference_levdist
_reference_levdist:                     ## @reference_levdist
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	16(%rbp), %r14
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.4:
	movq	_LEVENSHTEIN_MAX_LENGTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	$-1, %rbx
	cmpq	%rsi, %rax
	jb	LBB0_18
## %bb.5:
	cmpq	%rcx, %rax
	jb	LBB0_18
## %bb.6:
	movq	%rdi, %r12
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	leaq	1(%rcx), %rbx
	movq	%rbx, %rdi
	movl	$8, %esi
	xorl	%edx, %edx
	movq	%rcx, %r15
	callq	_safe_emalloc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	$8, %esi
	xorl	%edx, %edx
	callq	_safe_emalloc
	movq	%r15, %r9
	movq	%rax, %r15
	movq	%rbx, %r8
                                        ## kill: def $ebx killed $ebx killed $rbx def $rbx
	andl	$3, %ebx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	cmpq	$3, %r9
	jae	LBB0_8
## %bb.7:
	movq	-56(%rbp), %r10                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	xorl	%esi, %esi
	jmp	LBB0_10
LBB0_1:
	imulq	%rcx, %r13
	movq	%r13, %rbx
	jmp	LBB0_18
LBB0_3:
	imulq	%rsi, %r14
	movq	%r14, %rbx
	jmp	LBB0_18
LBB0_8:
	andq	$-4, %r8
	movq	%r13, %r11
	addq	%r13, %r11
	leaq	(,%r13,4), %rdx
	leaq	(,%r13,2), %rcx
	addq	%r13, %rcx
	xorl	%edi, %edi
	xorl	%esi, %esi
	movq	-56(%rbp), %r10                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdi, (%rbx,%rsi,8)
	leaq	(%rdi,%r13), %rax
	movq	%rax, 8(%rbx,%rsi,8)
	leaq	(%r11,%rdi), %rax
	movq	%rax, 16(%rbx,%rsi,8)
	leaq	(%rcx,%rdi), %rax
	movq	%rax, 24(%rbx,%rsi,8)
	addq	$4, %rsi
	addq	%rdx, %rdi
	cmpq	%rsi, %r8
	jne	LBB0_9
LBB0_10:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	leaq	(%rbx,%rsi,8), %rcx
	imulq	%r13, %rsi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%rsi, (%rcx,%rdx,8)
	incq	%rdx
	addq	%r13, %rsi
	cmpq	%rdx, %rax
	jne	LBB0_12
LBB0_13:
	xorl	%r8d, %r8d
	xorl	%ecx, %ecx
	movq	-72(%rbp), %r11                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_14:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movq	%r15, %rdi
	movq	%rbx, %r15
	movq	(%rbx), %rdx
	addq	%r14, %rdx
	movq	%rdx, (%rdi)
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%r12,%rcx), %ebx
	cmpb	(%r11,%rsi), %bl
	movq	%r10, %rbx
	cmoveq	%r8, %rbx
	addq	(%r15,%rsi,8), %rbx
	movq	8(%r15,%rsi,8), %rax
	addq	%r14, %rax
	cmpq	%rbx, %rax
	cmovaeq	%rbx, %rax
	addq	%r13, %rdx
	cmpq	%rax, %rdx
	cmovaeq	%rax, %rdx
	movq	%rdx, 8(%rdi,%rsi,8)
	incq	%rsi
	cmpq	%rsi, %r9
	jne	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	incq	%rcx
	movq	%rdi, %rbx
	cmpq	-80(%rbp), %rcx                 ## 8-byte Folded Reload
	jne	LBB0_14
## %bb.17:
	movq	(%rdi,%r9,8), %rbx
	callq	_efree
	movq	%r15, %rdi
	callq	_efree
LBB0_18:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LEVENSHTEIN_MAX_LENGTH,8,3     ## @LEVENSHTEIN_MAX_LENGTH
	.no_dead_strip	_reference_levdist
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reference_levdist
_reference_levdist:                     ; @reference_levdist
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x4
	mov	x20, x3
	cbz	x1, LBB0_4
; %bb.1:
	mov	x19, x6
	mov	x23, x1
	cbz	x20, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _LEVENSHTEIN_MAX_LENGTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LEVENSHTEIN_MAX_LENGTH@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x23
	ccmp	x8, x20, #0, hs
	b.hs	LBB0_6
; %bb.3:
	mov	x19, #-1
	b	LBB0_18
LBB0_4:
	mul	x19, x21, x20
	b	LBB0_18
LBB0_5:
	mul	x19, x19, x23
	b	LBB0_18
LBB0_6:
	mov	x22, x5
	mov	x24, x2
	mov	x25, x0
	add	x28, x20, #1
	mov	x0, x28
	mov	w1, #8
	mov	w2, #0
	bl	_safe_emalloc
	mov	x27, x0
	mov	x0, x28
	mov	w1, #8
	mov	w2, #0
	bl	_safe_emalloc
	mov	x26, x0
	cmp	x28, #4
	b.hs	LBB0_8
; %bb.7:
	mov	x8, #0
	b	LBB0_11
LBB0_8:
	mov	x9, #0
	and	x8, x28, #0xfffffffffffffffc
	lsl	x10, x21, #1
	add	x11, x10, x21
	lsl	x12, x21, #2
	add	x13, x27, #16
	mov	x14, x8
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	add	x15, x21, x9
	add	x16, x10, x9
	add	x17, x11, x9
	stp	x9, x15, [x13, #-16]
	stp	x16, x17, [x13], #32
	add	x9, x9, x12
	subs	x14, x14, #4
	b.ne	LBB0_9
; %bb.10:
	cmp	x28, x8
	b.eq	LBB0_13
LBB0_11:
	sub	x9, x20, x8
	add	x9, x9, #1
	add	x10, x27, x8, lsl #3
	mul	x8, x8, x21
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	str	x8, [x10], #8
	add	x8, x8, x21
	subs	x9, x9, #1
	b.ne	LBB0_12
LBB0_13:
	mov	x8, #0
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	mov	x9, #0
	mov	x0, x26
	mov	x26, x27
	ldr	x10, [x27]
	add	x10, x10, x19
	str	x10, [x0]
LBB0_15:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x11, x9, #3
	ldrb	w12, [x25, x8]
	add	x13, x26, x11
	ldrb	w14, [x24, x9]
	cmp	w12, w14
	csel	x12, xzr, x22, eq
	ldp	x14, x13, [x13]
	add	x12, x12, x14
	add	x9, x9, #1
	add	x13, x13, x19
	cmp	x13, x12
	csel	x12, x13, x12, lo
	add	x10, x10, x21
	cmp	x10, x12
	csel	x10, x10, x12, lo
	add	x11, x0, x11
	str	x10, [x11, #8]
	cmp	x20, x9
	b.ne	LBB0_15
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x8, x8, #1
	mov	x27, x0
	cmp	x8, x23
	b.ne	LBB0_14
; %bb.17:
	ldr	x19, [x0, x20, lsl #3]
	bl	_efree
	mov	x0, x26
	bl	_efree
LBB0_18:
	mov	x0, x19
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LEVENSHTEIN_MAX_LENGTH,8,3     ; @LEVENSHTEIN_MAX_LENGTH
	.no_dead_strip	_reference_levdist
.subsections_via_symbols
