	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il4965_rs_fill_link_cmd
_il4965_rs_fill_link_cmd:               ## @il4965_rs_fill_link_cmd
	.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	%rsi, %rbx
	movq	%rdi, %r13
	movl	%edx, -44(%rbp)
	leaq	-44(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_il4965_rs_dbgfs_set_mcs
	movl	-44(%rbp), %edi
	movl	(%rbx), %esi
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	callq	_il4965_rs_get_tbl_info_from_mcs
	movl	-56(%rbp), %edi
	callq	_is_legacy
	xorl	%r14d, %r14d
	testq	%rax, %rax
	setne	%r12b
	jne	LBB0_1
## %bb.2:
	movq	_IL_HT_NUMBER_TRY@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_IL_NUMBER_TRY@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r15d
	movl	-56(%rbp), %edi
	callq	_is_mimo
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	%ecx, 32(%rbx)
	movl	-44(%rbp), %edi
	callq	_cpu_to_le32
	movq	24(%rbx), %rcx
	movq	%rax, (%rcx)
	movl	-52(%rbp), %edi
	callq	_il4965_num_of_ant
	movl	-52(%rbp), %edi
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.4:
	movl	%edi, 40(%rbx)
	jmp	LBB0_7
LBB0_5:
	callq	_il4965_num_of_ant
	cmpl	$2, %eax
	jne	LBB0_7
## %bb.6:
	movl	-52(%rbp), %eax
	movl	%eax, 36(%rbx)
LBB0_7:
	testq	%r13, %r13
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_8
## %bb.9:
	movl	(%r13), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	jmp	LBB0_10
LBB0_8:
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
LBB0_10:
	movq	_LINK_QUAL_MAX_RETRY_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$2, %eax
	jl	LBB0_32
## %bb.11:
	movb	%r12b, %r14b
	movl	$1, %r13d
	movl	$1, %ecx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	_IL_HT_NUMBER_TRY@GOTPCREL(%rip), %rax
LBB0_31:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	leaq	-44(%rbp), %rsi
	movl	%r13d, %edx
	callq	_il4965_rs_dbgfs_set_mcs
	movl	-44(%rbp), %edi
	callq	_cpu_to_le32
	movq	24(%rbx), %rcx
	movslq	%r13d, %rdx
	movq	%rax, (%rcx,%rdx,8)
	incl	%r13d
	movq	_LINK_QUAL_MAX_RETRY_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	cmpl	%eax, %r13d
	jge	LBB0_32
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	cmpl	$2, %r15d
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	jl	LBB0_22
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	%eax, %r13d
	jge	LBB0_22
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movslq	%r13d, %r12
	incq	%r12
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	-56(%rbp), %edi
	callq	_is_legacy
	testq	%rax, %rax
	je	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	_NUM_TRY_BEFORE_ANT_TOGGLE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jge	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=2
	incl	%r14d
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=2
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_15 Depth=2
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	leaq	-44(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	callq	_il4965_rs_toggle_antenna
	testq	%rax, %rax
	movl	$1, %eax
	cmovnel	%eax, %r14d
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_15 Depth=2
	movq	%rbx, %rdi
	leaq	-44(%rbp), %rsi
	movl	%r13d, %edx
	callq	_il4965_rs_dbgfs_set_mcs
	movl	-44(%rbp), %edi
	callq	_cpu_to_le32
	movq	24(%rbx), %rcx
	movq	%rax, -8(%rcx,%r12,8)
	incl	%r13d
	cmpl	$3, %r15d
	jb	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_15 Depth=2
	leaq	1(%r12), %rax
	decl	%r15d
	movq	_LINK_QUAL_MAX_RETRY_NUM@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	cmpq	%rcx, %r12
	movq	%rax, %r12
	jl	LBB0_15
LBB0_22:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	-44(%rbp), %edi
	movl	(%rbx), %esi
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	callq	_il4965_rs_get_tbl_info_from_mcs
	movl	-56(%rbp), %edi
	callq	_is_mimo
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	%r13d, 32(%rbx)
LBB0_24:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	-64(%rbp), %edx
	movq	%rbx, %rdi
	leaq	-56(%rbp), %rsi
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	callq	_il4965_rs_get_lower_rate
	movl	%eax, -44(%rbp)
	movl	-56(%rbp), %edi
	callq	_is_legacy
	testq	%rax, %rax
	je	LBB0_25
## %bb.26:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_NUM_TRY_BEFORE_ANT_TOGGLE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jge	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_12 Depth=1
	incl	%r14d
	jmp	LBB0_30
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_12 Depth=1
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	leaq	-44(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	callq	_il4965_rs_toggle_antenna
	testq	%rax, %rax
	movl	$1, %eax
	cmovnel	%eax, %r14d
LBB0_30:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	_IL_NUMBER_TRY@GOTPCREL(%rip), %rax
	jmp	LBB0_31
LBB0_32:
	movq	_LINK_QUAL_AGG_FRAME_LIMIT_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_LINK_QUAL_AGG_DISABLE_START_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	_LINK_QUAL_AGG_TIME_LIMIT_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movl	%eax, 8(%rbx)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IL_NUMBER_TRY,4,2              ## @IL_NUMBER_TRY
	.comm	_IL_HT_NUMBER_TRY,4,2           ## @IL_HT_NUMBER_TRY
	.comm	_LINK_QUAL_MAX_RETRY_NUM,4,2    ## @LINK_QUAL_MAX_RETRY_NUM
	.comm	_NUM_TRY_BEFORE_ANT_TOGGLE,4,2  ## @NUM_TRY_BEFORE_ANT_TOGGLE
	.comm	_LINK_QUAL_AGG_FRAME_LIMIT_DEF,4,2 ## @LINK_QUAL_AGG_FRAME_LIMIT_DEF
	.comm	_LINK_QUAL_AGG_DISABLE_START_DEF,4,2 ## @LINK_QUAL_AGG_DISABLE_START_DEF
	.comm	_LINK_QUAL_AGG_TIME_LIMIT_DEF,4,2 ## @LINK_QUAL_AGG_TIME_LIMIT_DEF
	.no_dead_strip	_il4965_rs_fill_link_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il4965_rs_fill_link_cmd
_il4965_rs_fill_link_cmd:               ; @il4965_rs_fill_link_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x1
	mov	x20, x0
	str	w2, [sp, #28]
	add	x1, sp, #28
	mov	x0, x19
	mov	w2, #0
	bl	_il4965_rs_dbgfs_set_mcs
	ldr	w0, [sp, #28]
	ldr	w1, [x19]
	add	x2, sp, #16
	add	x3, sp, #12
	bl	_il4965_rs_get_tbl_info_from_mcs
	ldr	w0, [sp, #16]
	bl	_is_legacy
Lloh0:
	adrp	x8, _IL_HT_NUMBER_TRY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IL_HT_NUMBER_TRY@GOTPAGEOFF]
Lloh2:
	adrp	x9, _IL_NUMBER_TRY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IL_NUMBER_TRY@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	cset	w24, ne
	ldr	w27, [x8]
	ldr	w0, [sp, #16]
	bl	_is_mimo
	cmp	x0, #0
	cset	w8, ne
	str	w8, [x19, #32]
	ldr	w0, [sp, #28]
	bl	_cpu_to_le32
	ldr	x8, [x19, #24]
	str	x0, [x8]
	ldr	w0, [sp, #20]
	bl	_il4965_num_of_ant
	mov	x8, x0
	ldr	w0, [sp, #20]
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	str	w0, [x19, #40]
	b	LBB0_4
LBB0_2:
	bl	_il4965_num_of_ant
	cmp	w0, #2
	b.ne	LBB0_4
; %bb.3:
	ldr	w8, [sp, #20]
	str	w8, [x19, #36]
LBB0_4:
	cbz	x20, LBB0_6
; %bb.5:
	ldr	w21, [x20]
	b	LBB0_7
LBB0_6:
	mov	w21, #0
LBB0_7:
Lloh4:
	adrp	x25, _LINK_QUAL_MAX_RETRY_NUM@GOTPAGE
Lloh5:
	ldr	x25, [x25, _LINK_QUAL_MAX_RETRY_NUM@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #2
	b.lt	LBB0_29
; %bb.8:
Lloh6:
	adrp	x26, _NUM_TRY_BEFORE_ANT_TOGGLE@GOTPAGE
Lloh7:
	ldr	x26, [x26, _NUM_TRY_BEFORE_ANT_TOGGLE@GOTPAGEOFF]
	mov	w22, #1
	mov	w23, #1
Lloh8:
	adrp	x28, _IL_NUMBER_TRY@GOTPAGE
Lloh9:
	ldr	x28, [x28, _IL_NUMBER_TRY@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
Lloh10:
	adrp	x8, _IL_HT_NUMBER_TRY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IL_HT_NUMBER_TRY@GOTPAGEOFF]
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w27, [x8]
	add	x1, sp, #28
	mov	x0, x19
	mov	x2, x22
	bl	_il4965_rs_dbgfs_set_mcs
	ldr	w0, [sp, #28]
	bl	_cpu_to_le32
	mov	w23, #0
	ldr	x8, [x19, #24]
	str	x0, [x8, w22, sxtw #3]
	add	w22, w22, #1
	ldr	w8, [x25]
	cmp	w22, w8
	b.ge	LBB0_29
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	cmp	w27, #2
	b.lt	LBB0_21
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w22, w8
	b.ge	LBB0_21
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	sxtw	x22, w22
LBB0_14:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [sp, #16]
	bl	_is_legacy
	cbz	x0, LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	ldr	w8, [x26]
	cmp	w24, w8
	b.ge	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=2
	add	w24, w24, #1
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_14 Depth=2
	cbz	x20, LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x1, sp, #28
	add	x2, sp, #16
	mov	x0, x21
	bl	_il4965_rs_toggle_antenna
	cmp	x0, #0
	csinc	w24, w24, wzr, eq
LBB0_19:                                ;   in Loop: Header=BB0_14 Depth=2
	add	x1, sp, #28
	mov	x0, x19
	mov	x2, x22
	bl	_il4965_rs_dbgfs_set_mcs
	ldr	w0, [sp, #28]
	bl	_cpu_to_le32
	ldr	x8, [x19, #24]
	str	x0, [x8, x22, lsl #3]
	add	x22, x22, #1
	cmp	w27, #3
	b.lo	LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_14 Depth=2
	ldrsw	x8, [x25]
	sub	w27, w27, #1
	cmp	x22, x8
	b.lt	LBB0_14
LBB0_21:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [sp, #28]
	ldr	w1, [x19]
	add	x2, sp, #16
	add	x3, sp, #12
	bl	_il4965_rs_get_tbl_info_from_mcs
	ldr	w0, [sp, #16]
	bl	_is_mimo
	cbz	x0, LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_11 Depth=1
	str	w22, [x19, #32]
LBB0_23:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w2, [sp, #12]
	add	x1, sp, #16
	mov	x0, x19
	mov	x3, x23
	bl	_il4965_rs_get_lower_rate
	str	w0, [sp, #28]
	ldr	w0, [sp, #16]
	bl	_is_legacy
	cbz	x0, LBB0_9
; %bb.24:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x26]
	cmp	w24, w8
	b.ge	LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_11 Depth=1
	add	w24, w24, #1
	b	LBB0_28
LBB0_26:                                ;   in Loop: Header=BB0_11 Depth=1
	cbz	x20, LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x1, sp, #28
	add	x2, sp, #16
	mov	x0, x21
	bl	_il4965_rs_toggle_antenna
	cmp	x0, #0
	csinc	w24, w24, wzr, eq
LBB0_28:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x8, x28
	b	LBB0_10
LBB0_29:
Lloh12:
	adrp	x8, _LINK_QUAL_AGG_FRAME_LIMIT_DEF@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LINK_QUAL_AGG_FRAME_LIMIT_DEF@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _LINK_QUAL_AGG_DISABLE_START_DEF@GOTPAGE
Lloh16:
	ldr	x9, [x9, _LINK_QUAL_AGG_DISABLE_START_DEF@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #12]
Lloh18:
	adrp	x8, _LINK_QUAL_AGG_TIME_LIMIT_DEF@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LINK_QUAL_AGG_TIME_LIMIT_DEF@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	str	w0, [x19, #8]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IL_NUMBER_TRY,4,2              ; @IL_NUMBER_TRY
	.comm	_IL_HT_NUMBER_TRY,4,2           ; @IL_HT_NUMBER_TRY
	.comm	_LINK_QUAL_MAX_RETRY_NUM,4,2    ; @LINK_QUAL_MAX_RETRY_NUM
	.comm	_NUM_TRY_BEFORE_ANT_TOGGLE,4,2  ; @NUM_TRY_BEFORE_ANT_TOGGLE
	.comm	_LINK_QUAL_AGG_FRAME_LIMIT_DEF,4,2 ; @LINK_QUAL_AGG_FRAME_LIMIT_DEF
	.comm	_LINK_QUAL_AGG_DISABLE_START_DEF,4,2 ; @LINK_QUAL_AGG_DISABLE_START_DEF
	.comm	_LINK_QUAL_AGG_TIME_LIMIT_DEF,4,2 ; @LINK_QUAL_AGG_TIME_LIMIT_DEF
	.no_dead_strip	_il4965_rs_fill_link_cmd
.subsections_via_symbols
