	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8xxxu_gen2_simularity_compare ## -- Begin function rtl8xxxu_gen2_simularity_compare
	.p2align	4, 0x90
_rtl8xxxu_gen2_simularity_compare:      ## @rtl8xxxu_gen2_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, %r11d
	movq	$-1, -48(%rbp)
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %ecx
	xorl	%eax, %eax
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	cmpl	$2, %ecx
	setge	%al
	leal	4(,%rax,4), %r8d
	movq	_MAX_TOLERANCE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movslq	%edx, %rdx
	movslq	%r11d, %r15
	shlq	$5, %r15
	addq	%rsi, %r15
	shlq	$5, %rdx
	leaq	(%rsi,%rdx), %r12
	addq	$4, %r12
	xorl	%ecx, %ecx
	xorl	%r13d, %r13d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	btsl	%ecx, %r13d
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	incq	%rcx
	cmpq	%rcx, %r8
	je	LBB0_14
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	-4(%r12,%rcx,4), %r9d
	testb	$1, %cl
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15,%rcx,4), %edi
	movl	%r9d, %r10d
	movl	%edi, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r9d, %r10d
	orl	$-1024, %r10d                   ## imm = 0xFC00
	testl	$512, %r9d                      ## imm = 0x200
	cmovel	%r9d, %r10d
	movl	(%r15,%rcx,4), %edi
	movl	%edi, %ebx
	orl	$-1024, %ebx                    ## imm = 0xFC00
	testl	$512, %edi                      ## imm = 0x200
	cmovel	%edi, %ebx
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r10d, %eax
	subl	%ebx, %eax
	negl	%eax
	subl	%ebx, %r10d
	cmovlel	%eax, %r10d
	cmpl	%r14d, %r10d
	jle	LBB0_13
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ecx, %eax
	andl	$2147483643, %eax               ## imm = 0x7FFFFFFB
	cmpl	$2, %eax
	jne	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%r13d, %r13d
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	addl	(%r12,%rcx,4), %r9d
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ecx, %eax
	andl	$-4, %eax
	movl	%r11d, -48(%rbp,%rax)
	xorl	%r13d, %r13d
	jmp	LBB0_13
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	addl	4(%r15,%rcx,4), %edi
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	%ecx, %eax
	andl	$-4, %eax
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	%edi, -48(%rbp,%rax)
	xorl	%r13d, %r13d
	jmp	LBB0_13
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %r13d
	shll	%cl, %r13d
	jmp	LBB0_13
LBB0_14:
	testl	%r13d, %r13d
	je	LBB0_15
## %bb.23:
	testb	$3, %r13b
	je	LBB0_24
## %bb.25:
	testb	$12, %r13b
	je	LBB0_26
LBB0_27:
	xorl	%eax, %eax
	testb	$48, %r13b
	jne	LBB0_31
## %bb.28:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	cmpl	$2, (%rdi)
	jl	LBB0_31
## %bb.29:
	movl	16(%rsi,%rdx), %ecx
	movl	%ecx, 112(%rsi)
	movl	20(%rsi,%rdx), %ecx
	movl	%ecx, 116(%rsi)
	cmpl	$2, (%rdi)
	jl	LBB0_31
## %bb.30:
	movl	24(%rsi,%rdx), %ecx
	movl	%ecx, 120(%rsi)
	movl	28(%rsi,%rdx), %ecx
	movl	%ecx, 124(%rsi)
	jmp	LBB0_31
LBB0_15:
	shrl	$2, %r8d
	cmpl	$2, %r8d
	movl	$1, %eax
	cmovbl	%eax, %r8d
	movl	-48(%rbp), %ecx
	testl	%ecx, %ecx
	js	LBB0_17
## %bb.16:
	shlq	$5, %rcx
	movl	(%rsi,%rcx), %eax
	movl	%eax, 96(%rsi)
	movl	4(%rsi,%rcx), %eax
	movl	%eax, 100(%rsi)
	xorl	%eax, %eax
LBB0_17:
	cmpl	$2, -52(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_31
## %bb.18:
	movl	-44(%rbp), %ecx
	testl	%ecx, %ecx
	js	LBB0_20
## %bb.19:
	shlq	$5, %rcx
	movl	16(%rsi,%rcx), %eax
	movl	%eax, 112(%rsi)
	movl	20(%rsi,%rcx), %eax
	movl	%eax, 116(%rsi)
	xorl	%eax, %eax
LBB0_20:
	cmpl	$2, %r8d
	je	LBB0_31
## %bb.21:
	movl	-40(%rbp), %ecx
	testl	%ecx, %ecx
	js	LBB0_31
## %bb.22:
	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_31:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movl	(%rsi,%rdx), %eax
	movl	%eax, 96(%rsi)
	movl	4(%rsi,%rdx), %eax
	movl	%eax, 100(%rsi)
	testb	$12, %r13b
	jne	LBB0_27
LBB0_26:
	movl	8(%rsi,%rdx), %eax
	movl	%eax, 104(%rsi)
	movl	12(%rsi,%rdx), %eax
	movl	%eax, 108(%rsi)
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_TOLERANCE,4,2              ## @MAX_TOLERANCE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8xxxu_gen2_simularity_compare ; -- Begin function rtl8xxxu_gen2_simularity_compare
	.p2align	2
_rtl8xxxu_gen2_simularity_compare:      ; @rtl8xxxu_gen2_simularity_compare
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	.cfi_offset w19, -8
	.cfi_offset w20, -16
                                        ; kill: def $w3 killed $w3 def $x3
                                        ; kill: def $w2 killed $w2 def $x2
	mov	x11, #0
	mov	w10, #0
	mov	x8, #-1
	str	x8, [sp, #8]
	ldr	w8, [x0]
	mov	w9, #4
	mov	w12, #8
	cmp	w8, #1
	csel	w12, w12, w9, gt
Lloh0:
	adrp	x9, _MAX_TOLERANCE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_TOLERANCE@GOTPAGEOFF]
Lloh2:
	ldr	w13, [x9]
	sxtw	x9, w2
	sxtw	x14, w3
	add	x14, x1, x14, lsl #5
	add	x15, x1, x9, lsl #5
	add	x15, x15, #4
	mov	w16, #65531
	movk	w16, #32767, lsl #16
	mov	w17, #1
	add	x4, sp, #8
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	lsl	w5, w17, w11
	orr	w10, w10, w5
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x11, x11, #1
	add	x14, x14, #4
	add	x15, x15, #4
	cmp	x12, x11
	b.eq	LBB0_14
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w5, [x15, #-4]
	tbnz	w11, #0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w6, [x14]
	mov	x7, x5
	mov	x19, x6
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	orr	w6, w5, #0xfffffc00
	tst	w5, #0x200
	csel	w7, w5, w6, eq
	ldr	w6, [x14]
	orr	w19, w6, #0xfffffc00
	tst	w6, #0x200
	csel	w19, w6, w19, eq
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	w20, w19, w7
	subs	w7, w7, w19
	csel	w7, w7, w20, gt
	cmp	w7, w13
	b.le	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	and	w7, w11, w16
	cmp	w7, #2
	b.ne	LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	cbnz	w10, LBB0_1
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w10, [x15]
	cmn	w5, w10
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w10, #0
	ubfx	x5, x11, #2, #30
	str	w3, [x4, x5, lsl #2]
	b	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w10, [x14, #4]
	cmn	w6, w10
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w10, #0
	ubfx	x5, x11, #2, #30
	str	w2, [x4, x5, lsl #2]
	b	LBB0_2
LBB0_13:                                ;   in Loop: Header=BB0_3 Depth=1
	lsl	w10, w17, w11
	b	LBB0_2
LBB0_14:
	cbz	w10, LBB0_18
; %bb.15:
	tst	w10, #0x3
	b.eq	LBB0_20
; %bb.16:
	tst	w10, #0xc
	b.eq	LBB0_21
LBB0_17:
	tst	w10, #0x30
	b.ne	LBB0_25
	b	LBB0_22
LBB0_18:
	ubfx	x9, x12, #2, #30
	cmp	w9, #1
	csinc	w9, w9, wzr, hi
	ldr	w10, [sp, #8]
	tbnz	w10, #31, LBB0_27
; %bb.19:
	mov	w0, #0
	lsl	x10, x10, #5
	ldr	d0, [x1, x10]
	str	d0, [x1, #96]
	cmp	w8, #2
	b.ge	LBB0_28
	b	LBB0_26
LBB0_20:
	lsl	x8, x9, #5
	ldr	d0, [x1, x8]
	str	d0, [x1, #96]
	tst	w10, #0xc
	b.ne	LBB0_17
LBB0_21:
	add	x8, x1, x9, lsl #5
	ldr	d0, [x8, #8]
	str	d0, [x1, #104]
	tst	w10, #0x30
	b.ne	LBB0_25
LBB0_22:
	ldr	w8, [x0]
	cmp	w8, #2
	b.lt	LBB0_25
; %bb.23:
	add	x8, x1, x9, lsl #5
	ldr	d0, [x8, #16]
	str	d0, [x1, #112]
	ldr	w9, [x0]
	cmp	w9, #2
	b.lt	LBB0_25
; %bb.24:
	add	x8, x8, #24
	mov	w9, #6
	b	LBB0_33
LBB0_25:
	mov	w0, #0
LBB0_26:
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
LBB0_27:
	mov	w0, #1
	cmp	w8, #2
	b.lt	LBB0_26
LBB0_28:
	ldr	w8, [sp, #12]
	tbnz	w8, #31, LBB0_30
; %bb.29:
	mov	w0, #0
	add	x8, x1, x8, lsl #5
	ldr	d0, [x8, #16]
	str	d0, [x1, #112]
LBB0_30:
	cmp	w9, #2
	b.eq	LBB0_26
; %bb.31:
	ldr	w8, [sp, #16]
	tbnz	w8, #31, LBB0_26
; %bb.32:
	add	x8, x1, x8, lsl #5
	add	x8, x8, #32
	mov	w9, #8
LBB0_33:
	mov	w0, #0
	add	x9, x1, x9, lsl #2
	ldr	d0, [x8]
	str	d0, [x9, #96]
	b	LBB0_26
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_TOLERANCE,4,2              ; @MAX_TOLERANCE
.subsections_via_symbols
