	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _rtl92d_phy_calc_curvindex
__rtl92d_phy_calc_curvindex:            ## @_rtl92d_phy_calc_curvindex
	.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, -48(%rbp)                  ## 8-byte Spill
	movl	%ecx, %ebx
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_rtl_priv
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	jne	LBB0_1
## %bb.2:
	movq	_TARGET_CHNL_NUM_2G@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_TARGET_CHNL_NUM_5G@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_16
## %bb.4:
	movl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r13,4), %r9d
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_FINIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_INIT_IQK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rcx
	movl	%r13d, %r8d
	callq	_RTPRINT
	incq	%r13
	movq	%r13, %r14
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %r13
	cmpq	-80(%rbp), %r14                 ## 8-byte Folded Reload
	je	LBB0_16
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	1(%r13), %r14
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	__rtl92d_is_legal_5g_channel
	testl	%eax, %eax
	je	LBB0_15
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax,%r13,4)
	movq	_CV_CURVE_CNT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$-1, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=2
	incq	%rbx
	movq	_CV_CURVE_CNT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	%rax, %rax
	cmpq	%rax, %rbx
	jge	LBB0_13
LBB0_10:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15,%r13,4), %edi
	movl	(%r12,%rbx,4), %esi
	callq	__rtl92d_phy_get_abs
	cmpl	%r14d, %eax
	jge	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%ebx, (%rcx,%r13,4)
	movl	%eax, %r14d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r9d, %r9d
	jmp	LBB0_14
LBB0_16:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TARGET_CHNL_NUM_5G,4,2         ## @TARGET_CHNL_NUM_5G
	.comm	_TARGET_CHNL_NUM_2G,4,2         ## @TARGET_CHNL_NUM_2G
	.comm	_CV_CURVE_CNT,4,2               ## @CV_CURVE_CNT
	.comm	_FINIT,4,2                      ## @FINIT
	.comm	_INIT_IQK,4,2                   ## @INIT_IQK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"curveindex[%d] = %x\n"

	.no_dead_strip	__rtl92d_phy_calc_curvindex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _rtl92d_phy_calc_curvindex
__rtl92d_phy_calc_curvindex:            ; @_rtl92d_phy_calc_curvindex
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_rtl_priv
Lloh0:
	adrp	x8, _TARGET_CHNL_NUM_5G@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TARGET_CHNL_NUM_5G@GOTPAGEOFF]
Lloh2:
	adrp	x9, _TARGET_CHNL_NUM_2G@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TARGET_CHNL_NUM_2G@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w28, [x8]
	cmp	w28, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x24, x0
	mov	x25, #0
Lloh4:
	adrp	x26, _CV_CURVE_CNT@GOTPAGE
Lloh5:
	ldr	x26, [x26, _CV_CURVE_CNT@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w5, [x19, x25, lsl #2]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh6:
	adrp	x8, _FINIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FINIT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _INIT_IQK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _INIT_IQK@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x24
Lloh12:
	adrp	x3, l_.str@PAGE
Lloh13:
	add	x3, x3, l_.str@PAGEOFF
	mov	x4, x25
	bl	_RTPRINT
	add	x25, x25, #1
	cmp	x25, x28
	b.eq	LBB0_13
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	cbz	w20, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x27, x25, #1
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x1, x27
	bl	__rtl92d_is_legal_5g_channel
	cbz	w0, LBB0_12
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	wzr, [x19, x25, lsl #2]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x27, #0
	mov	w23, #-1
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	x27, x27, #1
	ldrsw	x8, [x26]
	cmp	x27, x8, lsl #1
	b.ge	LBB0_2
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x22, x25, lsl #2]
	ldr	w1, [x21, x27, lsl #2]
	bl	__rtl92d_phy_get_abs
	cmp	w0, w23
	b.ge	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	str	w27, [x19, x25, lsl #2]
	mov	x23, x0
	b	LBB0_8
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w5, #0
	b	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x27
	cmp	x25, x28
	b.ne	LBB0_4
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_TARGET_CHNL_NUM_5G,4,2         ; @TARGET_CHNL_NUM_5G
	.comm	_TARGET_CHNL_NUM_2G,4,2         ; @TARGET_CHNL_NUM_2G
	.comm	_CV_CURVE_CNT,4,2               ; @CV_CURVE_CNT
	.comm	_FINIT,4,2                      ; @FINIT
	.comm	_INIT_IQK,4,2                   ; @INIT_IQK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"curveindex[%d] = %x\n"

	.no_dead_strip	__rtl92d_phy_calc_curvindex
.subsections_via_symbols
