	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il3945_hw_reg_set_scan_power
_il3945_hw_reg_set_scan_power:          ## @il3945_hw_reg_set_scan_power
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%r8, %r12
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	16(%r8), %r14
	movl	(%r8), %edi
	movq	_RATE_6M_IDX_TBL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rcx,%rax,4), %esi
	callq	_min
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_min
	leaq	(%rbx,%rbx,2), %rbx
	movl	%eax, (%r14,%rbx,8)
	movq	8(%r12), %rcx
	shlq	$4, %r15
	movq	(%rcx,%r15), %rdi
	movq	_RATE_6M_IDX_TBL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	shlq	$4, %rdx
	movslq	8(%rcx,%rdx), %rcx
	cltq
	subq	%rcx, %rax
	addq	%rax, %rax
	subq	%rax, %rdi
	callq	_il3945_hw_reg_fix_power_idx
	movq	%rax, 8(%r14,%rbx,8)
	movq	_power_gain_table@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	-44(%rbp), %rdx                 ## 4-byte Folded Reload
	movq	(%rcx,%rdx,8), %rcx
	movl	4(%rcx,%rax,8), %edx
	movl	%edx, 20(%r14,%rbx,8)
	movl	(%rcx,%rax,8), %eax
	movl	%eax, 16(%r14,%rbx,8)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RATE_6M_IDX_TBL,8,3            ## @RATE_6M_IDX_TBL
	.comm	_power_gain_table,8,3           ## @power_gain_table
	.no_dead_strip	_il3945_hw_reg_set_scan_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il3945_hw_reg_set_scan_power
_il3945_hw_reg_set_scan_power:          ; @il3945_hw_reg_set_scan_power
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x5
	mov	x20, x4
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	ldr	x24, [x4, #16]
	ldr	w0, [x4]
Lloh0:
	adrp	x25, _RATE_6M_IDX_TBL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _RATE_6M_IDX_TBL@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	w1, [x3, x8, lsl #2]
	bl	_min
	ldr	w1, [x23]
	bl	_min
	mov	w8, #24
	madd	x22, x22, x8, x24
	str	w0, [x22]
	ldr	x8, [x20, #8]
	lsl	x9, x21, #4
	ldr	x9, [x8, x9]
	ldr	x10, [x25]
	add	x8, x8, x10, lsl #4
	ldr	w8, [x8, #8]
	sub	w8, w0, w8
	lsl	w8, w8, #1
	sub	x0, x9, w8, sxtw
	bl	_il3945_hw_reg_fix_power_idx
	str	x0, [x22, #8]
Lloh2:
	adrp	x8, _power_gain_table@GOTPAGE
Lloh3:
	ldr	x8, [x8, _power_gain_table@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x8, [x8, w19, sxtw #3]
	ldr	d0, [x8, x0, lsl #3]
	str	d0, [x22, #16]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_RATE_6M_IDX_TBL,8,3            ; @RATE_6M_IDX_TBL
	.comm	_power_gain_table,8,3           ; @power_gain_table
	.no_dead_strip	_il3945_hw_reg_set_scan_power
.subsections_via_symbols
