	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_get_txgain_index
_ath9k_get_txgain_index:                ## @ath9k_get_txgain_index
	.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	%r9, %r14
	movq	%r8, %r15
	movq	%rcx, %rbx
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	$0, -56(%rbp)
	movq	$0, -80(%rbp)
	leaq	-48(%rbp), %rdx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_ath9k_hw_get_channel_centers
	testq	%r15, %r15
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movq	_AR5416_BCHAN_UNUSED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, (%rbx,%r14,8)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	cmpq	%r14, %r15
	jne	LBB0_3
## %bb.5:
	movq	%r15, %r14
	jmp	LBB0_6
LBB0_1:
	xorl	%r14d, %r14d
LBB0_6:
	movl	-48(%rbp), %r15d
	movq	%r13, %rdi
	callq	_IS_CHAN_2GHZ
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_FREQ2FBIN
	leaq	-56(%rbp), %rcx
	leaq	-80(%rbp), %r8
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_ath9k_hw_get_lower_upper_index
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	-56(%rbp), %rcx
	movq	%rcx, %rax
	shlq	$4, %rax
	movq	8(%r12,%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdx
	jmp	LBB0_9
LBB0_8:
	movq	-80(%rbp), %rcx
	movq	-56(%rbp), %rax
	shlq	$4, %rax
	movq	8(%r12,%rax), %rax
	movq	(%rax), %rax
	movq	%rcx, %rdx
	shlq	$4, %rdx
	movq	8(%r12,%rdx), %rdx
	movq	(%rdx), %rdx
	movq	(%rdx), %rsi
	addq	(%rax), %rsi
	movq	%rsi, %rdx
	shrq	$63, %rdx
	addq	%rsi, %rdx
	sarq	%rdx
LBB0_9:
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	16(%rbp), %rax
	shlq	$4, %rcx
	movq	(%r12,%rcx), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movq	%rdx, (%rsi)
	movq	(%rdi), %rdx
	cmpq	(%rdx), %rcx
	jle	LBB0_10
## %bb.11:
	movq	_AR9280_TX_GAIN_TABLE_SIZE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	cmpl	$2, %esi
	movl	$1, %ebx
	cmovgel	%esi, %ebx
	decl	%ebx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rdi, %rbx
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	leaq	1(%rdi), %rsi
	cmpq	8(%rdx,%rdi,8), %rcx
	movq	%rsi, %rdi
	jg	LBB0_12
	jmp	LBB0_15
LBB0_10:
	xorl	%esi, %esi
	jmp	LBB0_15
LBB0_13:
	movq	%rbx, %rsi
LBB0_15:
	movq	%rsi, (%rax)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR5416_BCHAN_UNUSED,8,3        ## @AR5416_BCHAN_UNUSED
	.comm	_AR9280_TX_GAIN_TABLE_SIZE,4,2  ## @AR9280_TX_GAIN_TABLE_SIZE
	.no_dead_strip	_ath9k_get_txgain_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_get_txgain_index
_ath9k_get_txgain_index:                ; @ath9k_get_txgain_index
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x6
	mov	x20, x5
	mov	x26, x4
	mov	x23, x3
	mov	x22, x2
	mov	x25, x1
	mov	x21, x0
	stp	xzr, xzr, [sp, #16]
	add	x2, sp, #8
	bl	_ath9k_hw_get_channel_centers
	mov	x24, #0
	cbz	x26, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _AR5416_BCHAN_UNUSED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR5416_BCHAN_UNUSED@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x23, x24, lsl #3]
	cmp	x9, x8
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #1
	cmp	x26, x24
	b.ne	LBB0_2
; %bb.4:
	mov	x24, x26
LBB0_5:
	ldr	w26, [sp, #8]
	mov	x0, x25
	bl	_IS_CHAN_2GHZ
	mov	x1, x0
	mov	x0, x26
	bl	_FREQ2FBIN
	add	x3, sp, #24
	add	x4, sp, #16
	mov	x1, x23
	mov	x2, x24
	bl	_ath9k_hw_get_lower_upper_index
	cbz	w0, LBB0_7
; %bb.6:
	ldr	x8, [sp, #24]
	add	x9, x22, x8, lsl #4
	ldr	x9, [x9, #8]
	ldr	x9, [x9]
	ldr	x9, [x9]
	b	LBB0_8
LBB0_7:
	ldp	x8, x9, [sp, #16]
	add	x9, x22, x9, lsl #4
	ldr	x9, [x9, #8]
	ldr	x9, [x9]
	ldr	x9, [x9]
	add	x10, x22, x8, lsl #4
	ldr	x10, [x10, #8]
	ldr	x10, [x10]
	ldr	x10, [x10]
	add	x9, x10, x9
	cmp	x9, #0
	cinc	x9, x9, lt
	asr	x9, x9, #1
LBB0_8:
	lsl	x8, x8, #4
	ldr	x8, [x22, x8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	str	x9, [x20]
	ldr	x11, [x21]
	ldr	x9, [x11]
	cmp	x8, x9
	b.le	LBB0_12
; %bb.9:
	mov	x9, #0
Lloh3:
	adrp	x10, _AR9280_TX_GAIN_TABLE_SIZE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _AR9280_TX_GAIN_TABLE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w10, #1
	csinc	w10, w10, wzr, gt
	sub	w10, w10, #1
	add	x11, x11, #8
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	cmp	x10, x9
	b.eq	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x12, x9, #1
	ldr	x13, [x11, x9, lsl #3]
	mov	x9, x12
	cmp	x8, x13
	b.gt	LBB0_10
	b	LBB0_14
LBB0_12:
	mov	x12, #0
	b	LBB0_14
LBB0_13:
	mov	x12, x10
LBB0_14:
	str	x12, [x19]
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AR5416_BCHAN_UNUSED,8,3        ; @AR5416_BCHAN_UNUSED
	.comm	_AR9280_TX_GAIN_TABLE_SIZE,4,2  ; @AR9280_TX_GAIN_TABLE_SIZE
	.no_dead_strip	_ath9k_get_txgain_index
.subsections_via_symbols
