	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_change_gain_boundary_setting
_ath9k_change_gain_boundary_setting:    ## @ath9k_change_gain_boundary_setting
	.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
	movq	%r9, %r14
	movq	%r8, %r13
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r12
	callq	_AR_SREV_9280_20_OR_LATER
	testq	%rax, %rax
	je	LBB0_16
## %bb.1:
	movq	_AR5416_PWR_TABLE_OFFSET_DB@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%r13, %rax
	je	LBB0_13
## %bb.2:
	subl	%eax, %r13d
	addl	%r13d, %r13d
	movl	%r13d, (%r14)
	testq	%r15, %r15
	je	LBB0_16
## %bb.3:
	movslq	%r13d, %rax
	cmpq	$4, %r15
	jae	LBB0_5
## %bb.4:
	xorl	%ecx, %ecx
	jmp	LBB0_12
LBB0_5:
	movq	%r15, %rcx
	andq	$-4, %rcx
	movq	%rax, %xmm0
	pshufd	$68, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,0,1]
	leaq	-4(%rcx), %rdx
	movq	%rdx, %rsi
	shrq	$2, %rsi
	incq	%rsi
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.7:
	movq	%rsi, %rdi
	andq	$-2, %rdi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%r12,%rdx,8), %xmm1
	movdqu	16(%r12,%rdx,8), %xmm2
	movdqu	32(%r12,%rdx,8), %xmm3
	movdqu	48(%r12,%rdx,8), %xmm4
	psubq	%xmm0, %xmm1
	psubq	%xmm0, %xmm2
	movdqu	%xmm1, (%r12,%rdx,8)
	movdqu	%xmm2, 16(%r12,%rdx,8)
	psubq	%xmm0, %xmm3
	psubq	%xmm0, %xmm4
	movdqu	%xmm3, 32(%r12,%rdx,8)
	movdqu	%xmm4, 48(%r12,%rdx,8)
	addq	$8, %rdx
	addq	$-2, %rdi
	jne	LBB0_8
## %bb.9:
	testb	$1, %sil
	je	LBB0_11
LBB0_10:
	movdqu	(%r12,%rdx,8), %xmm1
	movdqu	16(%r12,%rdx,8), %xmm2
	psubq	%xmm0, %xmm1
	psubq	%xmm0, %xmm2
	movdqu	%xmm1, (%r12,%rdx,8)
	movdqu	%xmm2, 16(%r12,%rdx,8)
LBB0_11:
	cmpq	%r15, %rcx
	je	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	subq	%rax, (%r12,%rcx,8)
	incq	%rcx
	cmpq	%rcx, %r15
	jne	LBB0_12
LBB0_13:
	testq	%r15, %r15
	je	LBB0_16
## %bb.14:
	movq	_MAX_RATE_POWER@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	subq	%rbx, %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%rbx,8), %rsi
	movq	%r13, %rdi
	callq	_min
	movq	%rax, (%r12,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_15
LBB0_16:
	movl	(%r14), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%edx, %edx
	testb	$1, %sil
	jne	LBB0_10
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_AR5416_PWR_TABLE_OFFSET_DB,8,3 ## @AR5416_PWR_TABLE_OFFSET_DB
	.comm	_MAX_RATE_POWER,8,3             ## @MAX_RATE_POWER
	.no_dead_strip	_ath9k_change_gain_boundary_setting
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_change_gain_boundary_setting
_ath9k_change_gain_boundary_setting:    ; @ath9k_change_gain_boundary_setting
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x5
	mov	x23, x4
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	bl	_AR_SREV_9280_20_OR_LATER
	cbz	x0, LBB0_13
; %bb.1:
Lloh0:
	adrp	x8, _AR5416_PWR_TABLE_OFFSET_DB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR5416_PWR_TABLE_OFFSET_DB@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x23
	b.eq	LBB0_10
; %bb.2:
	sub	w8, w23, w8
	lsl	w8, w8, #1
	str	w8, [x19]
	cbz	x20, LBB0_13
; %bb.3:
	sxtw	x8, w8
	cmp	x20, #8
	b.hs	LBB0_5
; %bb.4:
	mov	x9, #0
	b	LBB0_8
LBB0_5:
	and	x9, x20, #0xfffffffffffffff8
	dup.2d	v0, x8
	add	x10, x21, #32
	mov	x11, x9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x10, #-32]
	ldp	q3, q4, [x10]
	sub.2d	v1, v1, v0
	sub.2d	v2, v2, v0
	sub.2d	v3, v3, v0
	sub.2d	v4, v4, v0
	stp	q1, q2, [x10, #-32]
	stp	q3, q4, [x10], #64
	subs	x11, x11, #8
	b.ne	LBB0_6
; %bb.7:
	cmp	x9, x20
	b.eq	LBB0_10
LBB0_8:
	sub	x10, x20, x9
	add	x9, x21, x9, lsl #3
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9]
	sub	x11, x11, x8
	str	x11, [x9], #8
	subs	x10, x10, #1
	b.ne	LBB0_9
LBB0_10:
	cbz	x20, LBB0_13
; %bb.11:
Lloh3:
	adrp	x8, _MAX_RATE_POWER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_RATE_POWER@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	sub	x22, x8, x22
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x21]
	mov	x0, x22
	bl	_min
	str	x0, [x21], #8
	subs	x20, x20, #1
	b.ne	LBB0_12
LBB0_13:
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AR5416_PWR_TABLE_OFFSET_DB,8,3 ; @AR5416_PWR_TABLE_OFFSET_DB
	.comm	_MAX_RATE_POWER,8,3             ; @MAX_RATE_POWER
	.no_dead_strip	_ath9k_change_gain_boundary_setting
.subsections_via_symbols
