	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p54_parse_rssical
_p54_parse_rssical:                     ## @p54_parse_rssical
	.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, %r12
	movl	%edx, %r13d
	movq	%rdi, %rbx
	movq	8(%rdi), %rdx
	movq	_PDR_RSSI_LINEAR_APPROXIMATION_EXTENDED@GOTPCREL(%rip), %rax
	cmpq	%rcx, (%rax)
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_1
## %bb.5:
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %r15
	xorl	%edi, %edi
	callq	_cpu_to_le16
	xorl	%r14d, %r14d
	cmpq	%rax, %r15
	sete	%r14b
	addl	%r14d, %r14d
	leaq	L_.str.1(%rip), %rsi
	cmpl	%r13d, %r14d
	jg	LBB0_3
## %bb.6:
	movl	%r13d, %edi
	subl	%r14d, %edi
	movslq	%edi, %rcx
	movabsq	$-6148914691236517205, %r8      ## imm = 0xAAAAAAAAAAAAAAAB
	movq	%rcx, %rax
	mulq	%r8
	imulq	%r8, %rcx
	rorq	$2, %rcx
	movabsq	$1537228672809129301, %rax      ## imm = 0x1555555555555555
	cmpq	%rax, %rcx
	ja	LBB0_3
## %bb.7:
	cmpl	$12, %edi
	jb	LBB0_3
## %bb.8:
	movq	%rdx, %r15
	shrq	$3, %r15
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_1:
	movq	_PDR_RSSI_LINEAR_APPROXIMATION@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpq	%r12, (%rax)
	sete	%cl
	movl	$2, %r15d
	subq	%rcx, %r15
	movslq	%r13d, %rax
	leaq	(,%r15,8), %rcx
	xorl	%r14d, %r14d
	cmpq	%rax, %rcx
	jne	LBB0_2
LBB0_9:
	leaq	(,%r15,8), %r13
	leaq	40(,%r13,2), %rdi
	addq	%r13, %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdx, %rbx
	callq	_kzalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	leaq	(,%r13,2), %rcx
	addq	%r13, %rcx
	movq	$0, (%rax)
	movq	%r15, 8(%rax)
	movl	$24, 16(%rax)
	movq	%rcx, 24(%rax)
	movq	32(%rax), %r13
	movl	%r14d, %eax
	movq	_PDR_RSSI_LINEAR_APPROXIMATION_EXTENDED@GOTPCREL(%rip), %rcx
	cmpq	%r12, (%rcx)
	jne	LBB0_15
## %bb.12:
	testq	%r15, %r15
	je	LBB0_18
## %bb.13:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %r14
	movl	$8, %ebx
	movq	%r15, %r12
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx), %edi
	callq	_le16_to_cpu
	movq	%rax, (%r13,%rbx,2)
	movl	-4(%r14,%rbx), %edi
	callq	_le16_to_cpu
	movq	%rax, -8(%r13,%rbx,2)
	movl	-8(%r14,%rbx), %edi
	callq	_le16_to_cpu
	movq	%rax, -16(%r13,%rbx,2)
	addq	$12, %rbx
	decq	%r12
	jne	LBB0_14
	jmp	LBB0_18
LBB0_2:
	leaq	L_.str(%rip), %rsi
LBB0_3:
	movl	(%rbx), %edi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_wiphy_err
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdx
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_wiphy_err
	movq	_DUMP_PREFIX_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%r13d, %ecx
	callq	_print_hex_dump_bytes
	movl	(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_wiphy_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_19
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_19
LBB0_15:
	testq	%r15, %r15
	je	LBB0_18
## %bb.16:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %r12
	addq	$4, %r12
	leaq	(%r15,%r15,2), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$384, %rbx                      ## imm = 0x180
	movl	$0, %eax
	movl	$5240, %ecx                     ## imm = 0x1478
	cmoveq	%rcx, %rax
	cmpq	$387, %rbx                      ## imm = 0x183
	movl	$2437, %ecx                     ## imm = 0x985
	cmoveq	%rcx, %rax
	movq	%rax, 16(%r13,%rbx,8)
	movl	(%r12), %edi
	callq	_le16_to_cpu
	movq	%rax, 8(%r13,%rbx,8)
	movl	-4(%r12), %edi
	callq	_le16_to_cpu
	movq	%rax, (%r13,%rbx,8)
	addq	$3, %rbx
	addq	$8, %r12
	cmpq	%rbx, %r14
	jne	LBB0_17
LBB0_18:
	movq	_p54_compare_rssichan@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$24, %edx
	xorl	%r8d, %r8d
	callq	_sort
LBB0_19:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PDR_RSSI_LINEAR_APPROXIMATION_EXTENDED,8,3 ## @PDR_RSSI_LINEAR_APPROXIMATION_EXTENDED
	.comm	_PDR_RSSI_LINEAR_APPROXIMATION,8,3 ## @PDR_RSSI_LINEAR_APPROXIMATION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rssical size mismatch.\n"

L_.str.1:                               ## @.str.1
	.asciz	"invalid rssi database.\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_p54_compare_rssichan,4,2       ## @p54_compare_rssichan
L_.str.2:                               ## @.str.2
	.asciz	"rssi calibration data packing type:(%x) len:%d.\n"

L_.str.3:                               ## @.str.3
	.asciz	"rssical:"

	.comm	_DUMP_PREFIX_NONE,4,2           ## @DUMP_PREFIX_NONE
L_.str.4:                               ## @.str.4
	.asciz	"please report this issue.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_p54_parse_rssical
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p54_parse_rssical
_p54_parse_rssical:                     ; @p54_parse_rssical
	.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	x21, x3
	mov	x23, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x25, [x0, #8]
Lloh0:
	adrp	x24, _PDR_RSSI_LINEAR_APPROXIMATION_EXTENDED@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PDR_RSSI_LINEAR_APPROXIMATION_EXTENDED@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x8, x3
	b.ne	LBB0_4
; %bb.1:
	ldr	x19, [x20]
	mov	w0, #0
	bl	_cpu_to_le16
	cmp	x19, x0
	cset	w8, eq
	lsl	w26, w8, #1
	cmp	w26, w23
	b.gt	LBB0_3
; %bb.2:
	sub	w8, w23, w26
	sxtw	x9, w8
	mov	x10, #-6148914691236517206
	movk	x10, #43691
	umulh	x10, x9, x10
	lsr	x19, x10, #3
	mov	w10, #12
	msub	x9, x19, x10, x9
	cmp	x9, #0
	ccmp	w8, #12, #0, eq
	b.hs	LBB0_6
LBB0_3:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_4:
Lloh4:
	adrp	x8, _PDR_RSSI_LINEAR_APPROXIMATION@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PDR_RSSI_LINEAR_APPROXIMATION@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x8, x21
	mov	w8, #1
	cinc	x19, x8, ne
	mov	x8, x23
	sxtw	x8, w8
	cmp	x8, x19, lsl #3
	b.ne	LBB0_11
; %bb.5:
	mov	w26, #0
LBB0_6:
	add	x8, x19, x19, lsl #1
	lsl	x22, x8, #3
	add	x0, x22, #40
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_kzalloc
	str	x0, [x25]
	cbz	x0, LBB0_14
; %bb.7:
	stp	xzr, x19, [x0]
	mov	w8, #24
	str	w8, [x0, #16]
	str	x22, [x0, #24]
	ldr	x22, [x0, #32]
	ldr	x9, [x24]
	mov	w8, w26
	cmp	x9, x21
	b.ne	LBB0_15
; %bb.8:
	cbz	x19, LBB0_18
; %bb.9:
	add	x21, x22, #16
	add	x8, x20, x8, lsl #2
	add	x20, x8, #4
	mov	x23, x19
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #4]
	bl	_le16_to_cpu
	str	x0, [x21]
	ldr	w0, [x20]
	bl	_le16_to_cpu
	stur	x0, [x21, #-8]
	ldur	w0, [x20, #-4]
	bl	_le16_to_cpu
	stur	x0, [x21, #-16]
	add	x21, x21, #24
	add	x20, x20, #12
	subs	x23, x23, #1
	b.ne	LBB0_10
	b	LBB0_18
LBB0_11:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
LBB0_12:
	ldr	w0, [x22]
	bl	_wiphy_err
	ldr	w0, [x22]
	stp	x21, x23, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wiphy_err
Lloh14:
	adrp	x8, _DUMP_PREFIX_NONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DUMP_PREFIX_NONE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x2, x20
	mov	x3, x23
	bl	_print_hex_dump_bytes
	ldr	w0, [x22]
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wiphy_err
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_19
LBB0_14:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_13
LBB0_15:
	cbz	x19, LBB0_18
; %bb.16:
	mov	x21, #0
	add	x8, x20, x8, lsl #2
	add	x20, x8, #4
	mov	w23, #5240
	mov	w24, #2437
	mov	x25, x19
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	cmp	x21, #3072
	csel	x8, x23, xzr, eq
	cmp	x21, #3096
	csel	x8, x24, x8, eq
	add	x26, x22, x21
	str	x8, [x26, #16]
	ldr	w0, [x20]
	bl	_le16_to_cpu
	str	x0, [x26, #8]
	ldur	w0, [x20, #-4]
	bl	_le16_to_cpu
	str	x0, [x26]
	add	x21, x21, #24
	add	x20, x20, #8
	subs	x25, x25, #1
	b.ne	LBB0_17
LBB0_18:
Lloh25:
	adrp	x8, _p54_compare_rssichan@GOTPAGE
Lloh26:
	ldr	x8, [x8, _p54_compare_rssichan@GOTPAGEOFF]
Lloh27:
	ldr	w3, [x8]
	mov	x0, x22
	mov	x1, x19
	mov	w2, #24
	mov	x4, #0
	bl	_sort
	mov	w0, #0
LBB0_19:
	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	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_PDR_RSSI_LINEAR_APPROXIMATION_EXTENDED,8,3 ; @PDR_RSSI_LINEAR_APPROXIMATION_EXTENDED
	.comm	_PDR_RSSI_LINEAR_APPROXIMATION,8,3 ; @PDR_RSSI_LINEAR_APPROXIMATION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rssical size mismatch.\n"

l_.str.1:                               ; @.str.1
	.asciz	"invalid rssi database.\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_p54_compare_rssichan,4,2       ; @p54_compare_rssichan
l_.str.2:                               ; @.str.2
	.asciz	"rssi calibration data packing type:(%x) len:%d.\n"

l_.str.3:                               ; @.str.3
	.asciz	"rssical:"

	.comm	_DUMP_PREFIX_NONE,4,2           ; @DUMP_PREFIX_NONE
l_.str.4:                               ; @.str.4
	.asciz	"please report this issue.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_p54_parse_rssical
.subsections_via_symbols
