	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8xxxu_simularity_compare
_rtl8xxxu_simularity_compare:           ## @rtl8xxxu_simularity_compare
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r10d
	movq	$-1, -56(%rbp)
	movl	(%rdi), %ecx
	xorl	%eax, %eax
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	cmpl	$2, %ecx
	setge	%al
	leaq	4(,%rax,4), %r11
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
	movslq	%edx, %rdx
	movslq	%r10d, %rax
	movq	_MAX_TOLERANCE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	shlq	$5, %rax
	leaq	(%rsi,%rax), %r12
	addq	$4, %r12
	shlq	$5, %rdx
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	leaq	(%rsi,%rdx), %r13
	addq	$4, %r13
	xorl	%edi, %edi
	movabsq	$9223372036854775803, %r14      ## imm = 0x7FFFFFFFFFFFFFFB
	xorl	%ecx, %ecx
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %eax
	shll	%cl, %eax
	orq	%rax, %rdi
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	incq	%rcx
	cmpq	%rcx, %r11
	je	LBB0_11
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	-4(%r13,%rcx,4), %r9d
	movl	-4(%r12,%rcx,4), %eax
	movl	%r9d, %ebx
	subl	%eax, %ebx
	negl	%ebx
	movl	%r9d, %r8d
	subl	%eax, %r8d
	cmovlel	%ebx, %r8d
	movslq	%r8d, %rbx
	cmpq	%rbx, %r15
	jae	LBB0_10
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rcx, %rbx
	andq	%r14, %rbx
	cmpq	$2, %rbx
	jne	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	testq	%rdi, %rdi
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	addl	(%r13,%rcx,4), %r9d
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rcx, %rax
	andq	$-4, %rax
	movl	%r10d, -56(%rbp,%rax)
	xorl	%edi, %edi
	jmp	LBB0_10
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	addl	(%r12,%rcx,4), %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rcx, %rax
	andq	$-4, %rax
	movl	%esi, -56(%rbp,%rax)
	xorl	%edi, %edi
	jmp	LBB0_10
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	shll	%cl, %edi
	jmp	LBB0_10
LBB0_11:
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.21:
	xorl	%eax, %eax
	testb	$15, %dil
	je	LBB0_22
## %bb.23:
	testb	$-16, %dil
	jne	LBB0_27
## %bb.24:
	cmpl	$2, -44(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_27
## %bb.25:
	movl	$7, %r8d
	movl	$6, %r9d
	movl	$5, %edi
	movl	$4, %ebx
	jmp	LBB0_26
LBB0_12:
	shrq	$2, %r11
	cmpq	$2, %r11
	movl	$1, %ecx
	cmovaeq	%r11, %rcx
	movl	-56(%rbp), %eax
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:
	shlq	$5, %rax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	(%rsi,%rax), %edx
	movl	%edx, 96(%rsi)
	movl	4(%rsi,%rax), %eax
	movl	%eax, 100(%rsi)
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_22:
	movl	$3, %r8d
	movl	$2, %r9d
	movl	$1, %edi
	xorl	%ebx, %ebx
LBB0_26:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	addq	%rsi, %rdx
	movl	(%rdx,%rbx,4), %ecx
	movl	%ecx, 96(%rsi,%rbx,4)
	movl	(%rdx,%rdi,4), %ecx
	movl	%ecx, 96(%rsi,%rdi,4)
	movl	(%rdx,%r9,4), %ecx
	movl	%ecx, 96(%rsi,%r9,4)
	movl	(%rdx,%r8,4), %ecx
	movl	%ecx, 96(%rsi,%r8,4)
	jmp	LBB0_27
LBB0_13:
	movl	$1, %eax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
LBB0_15:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	cmpl	$2, %edx
	jl	LBB0_27
## %bb.16:
	movl	-52(%rbp), %edx
	testl	%edx, %edx
	js	LBB0_18
## %bb.17:
	shlq	$5, %rdx
	movl	16(%rsi,%rdx), %eax
	movl	%eax, 112(%rsi)
	movl	20(%rsi,%rdx), %eax
	movl	%eax, 116(%rsi)
	xorl	%eax, %eax
LBB0_18:
	cmpl	$2, %ecx
	je	LBB0_27
## %bb.19:
	movl	-48(%rbp), %ecx
	testl	%ecx, %ecx
	js	LBB0_27
## %bb.20:
	shlq	$5, %rcx
	movl	32(%rsi,%rcx), %eax
	movl	%eax, 128(%rsi)
	movl	36(%rsi,%rcx), %eax
	movl	%eax, 132(%rsi)
	xorl	%eax, %eax
LBB0_27:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_TOLERANCE,8,3              ## @MAX_TOLERANCE
	.no_dead_strip	_rtl8xxxu_simularity_compare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8xxxu_simularity_compare
_rtl8xxxu_simularity_compare:           ; @rtl8xxxu_simularity_compare
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #16
	.cfi_def_cfa_offset 16
                                        ; kill: def $w3 killed $w3 def $x3
                                        ; kill: def $w2 killed $w2 def $x2
	mov	x11, #0
	mov	x10, #0
	mov	x8, #-1
	str	x8, [sp, #8]
	ldr	w9, [x0]
	cmp	w9, #1
	mov	w8, #4
	mov	w12, #8
	csel	x12, x12, x8, gt
	sxtw	x8, w2
	sxtw	x14, w3
Lloh0:
	adrp	x13, _MAX_TOLERANCE@GOTPAGE
Lloh1:
	ldr	x13, [x13, _MAX_TOLERANCE@GOTPAGEOFF]
Lloh2:
	ldr	x13, [x13]
	add	x14, x1, x14, lsl #5
	add	x14, x14, #4
	add	x15, x1, x8, lsl #5
	add	x15, x15, #4
	mov	x16, #-5
	movk	x16, #32767, lsl #48
	mov	w17, #1
	add	x0, sp, #8
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	lsl	w4, w17, w10
	orr	x11, x11, x4
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #1
	add	x14, x14, #4
	add	x15, x15, #4
	cmp	x12, x10
	b.eq	LBB0_11
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w5, [x15, #-4]
	ldur	w4, [x14, #-4]
	sub	w6, w4, w5
	subs	w7, w5, w4
	csel	w6, w7, w6, gt
	cmp	x13, w6, sxtw
	b.hs	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	and	x6, x10, x16
	cmp	x6, #2
	b.ne	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cbnz	x11, LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w11, [x15]
	cmn	w5, w11
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x11, #0
	and	x4, x10, #0xfffffffffffffffc
	str	w3, [x0, x4]
	b	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w11, [x14]
	cmn	w4, w11
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x11, #0
	and	x4, x10, #0xfffffffffffffffc
	str	w2, [x0, x4]
	b	LBB0_2
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	lsl	w11, w17, w10
	b	LBB0_2
LBB0_11:
	cbz	x11, LBB0_16
; %bb.12:
	tst	x11, #0xf
	b.eq	LBB0_19
; %bb.13:
	mov	w0, #0
	tst	x11, #0xf0
	b.ne	LBB0_18
; %bb.14:
	cmp	w9, #2
	b.lt	LBB0_18
; %bb.15:
	mov	w9, #7
	mov	w10, #6
	mov	w12, #5
	mov	w11, #4
	b	LBB0_20
LBB0_16:
	lsr	x8, x12, #2
	cmp	x8, #1
	csinc	x8, x8, xzr, hi
	ldr	w10, [sp, #8]
	tbnz	w10, #31, LBB0_21
; %bb.17:
	mov	w0, #0
	lsl	x10, x10, #5
	ldr	d0, [x1, x10]
	str	d0, [x1, #96]
	cmp	w9, #2
	b.ge	LBB0_22
LBB0_18:
	add	sp, sp, #16
	ret
LBB0_19:
	mov	x11, #0
	mov	w9, #3
	mov	w10, #2
	mov	w12, #1
LBB0_20:
	mov	w0, #0
	add	x8, x1, x8, lsl #5
	lsl	x11, x11, #2
	ldr	w13, [x8, x11]
	add	x14, x1, #96
	str	w13, [x14, x11]
	lsl	x11, x12, #2
	ldr	w12, [x8, x11]
	str	w12, [x14, x11]
	lsl	x10, x10, #2
	ldr	w11, [x8, x10]
	str	w11, [x14, x10]
	lsl	x9, x9, #2
	ldr	w8, [x8, x9]
	str	w8, [x14, x9]
	add	sp, sp, #16
	ret
LBB0_21:
	mov	w0, #1
	cmp	w9, #2
	b.lt	LBB0_18
LBB0_22:
	ldr	w9, [sp, #12]
	tbnz	w9, #31, LBB0_24
; %bb.23:
	mov	w0, #0
	add	x9, x1, x9, lsl #5
	ldr	d0, [x9, #16]
	str	d0, [x1, #112]
LBB0_24:
	cmp	x8, #2
	b.eq	LBB0_18
; %bb.25:
	ldr	w8, [sp, #16]
	tbnz	w8, #31, LBB0_18
; %bb.26:
	mov	w0, #0
	add	x8, x1, x8, lsl #5
	ldr	d0, [x8, #32]
	str	d0, [x1, #128]
	add	sp, sp, #16
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_TOLERANCE,8,3              ; @MAX_TOLERANCE
	.no_dead_strip	_rtl8xxxu_simularity_compare
.subsections_via_symbols
