	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_hw_get_max_edge_power
_ar9003_hw_get_max_edge_power:          ## @ar9003_hw_get_max_edge_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%esi, %ebx
	movq	_MAX_RATE_POWER@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	testl	%r12d, %r12d
	sete	%r8b
	jne	LBB0_2
## %bb.1:
	movq	_AR9300_NUM_BAND_EDGES_5G@GOTPCREL(%rip), %rsi
	jmp	LBB0_3
LBB0_2:
	movq	_AR9300_NUM_BAND_EDGES_2G@GOTPCREL(%rip), %rsi
LBB0_3:
	movl	(%rcx), %ecx
	movl	(%rsi), %r13d
	testl	%r13d, %r13d
	je	LBB0_14
## %bb.4:
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movb	%r8b, %al
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi,%rax,8), %rax
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movslq	%edx, %rcx
	movq	(%rax,%rcx,8), %r15
	xorl	%r14d, %r14d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%r14d
	cmpl	%r14d, %r13d
	je	LBB0_11
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %r14d
	movq	(%r15,%r14,8), %rdi
	movq	_AR5416_BCHAN_UNUSED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %esi
	callq	_ath9k_hw_fbin2freq
	cmpl	%ebx, %eax
	je	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	testq	%r14, %r14
	je	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r15,%r14,8), %rdi
	movl	%r12d, %esi
	callq	_ath9k_hw_fbin2freq
	cmpl	%ebx, %eax
	jbe	LBB0_5
## %bb.10:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movl	%r12d, %r8d
	callq	_ar9003_hw_get_indirect_edge_power
	jmp	LBB0_13
LBB0_11:
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_14
LBB0_12:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	movl	%r12d, %ecx
	callq	_ar9003_hw_get_direct_edge_power
LBB0_13:
	movl	%eax, %ecx
LBB0_14:
	testl	%ecx, %ecx
	movl	$60, %eax
	cmovnel	%ecx, %eax
	testl	%r12d, %r12d
	cmovel	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_RATE_POWER,4,2             ## @MAX_RATE_POWER
	.comm	_AR9300_NUM_BAND_EDGES_2G,4,2   ## @AR9300_NUM_BAND_EDGES_2G
	.comm	_AR9300_NUM_BAND_EDGES_5G,4,2   ## @AR9300_NUM_BAND_EDGES_5G
	.comm	_AR5416_BCHAN_UNUSED,8,3        ## @AR5416_BCHAN_UNUSED
	.no_dead_strip	_ar9003_hw_get_max_edge_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9003_hw_get_max_edge_power
_ar9003_hw_get_max_edge_power:          ; @ar9003_hw_get_max_edge_power
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x3
	cmp	w3, #0
	cset	w9, eq
Lloh0:
	adrp	x8, _MAX_RATE_POWER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_RATE_POWER@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _AR9300_NUM_BAND_EDGES_2G@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR9300_NUM_BAND_EDGES_2G@GOTPAGEOFF]
Lloh5:
	adrp	x10, _AR9300_NUM_BAND_EDGES_5G@GOTPAGE
Lloh6:
	ldr	x10, [x10, _AR9300_NUM_BAND_EDGES_5G@GOTPAGEOFF]
	csel	x8, x10, x8, eq
	ldr	w25, [x8]
	cbz	w25, LBB0_10
; %bb.1:
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	mov	w8, #0
	ldr	x9, [x0, w9, uxtw #3]
	ldr	x26, [x9, w2, sxtw #3]
Lloh7:
	adrp	x27, _AR5416_BCHAN_UNUSED@GOTPAGE
Lloh8:
	ldr	x27, [x27, _AR5416_BCHAN_UNUSED@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w24, #1
	cmp	w25, w8
	b.eq	LBB0_10
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x26, w8, uxtw #3]
	ldr	x9, [x27]
	cmp	x0, x9
	b.eq	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w24, w8
	mov	x1, x19
	bl	_ath9k_hw_fbin2freq
	cmp	w0, w22
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w24, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x26, x24, lsl #3]
	mov	x1, x19
	bl	_ath9k_hw_fbin2freq
	cmp	w0, w22
	b.ls	LBB0_2
; %bb.7:
	mov	x0, x23
	mov	x1, x21
	mov	x2, x24
	mov	x3, x22
	mov	x4, x19
	bl	_ar9003_hw_get_indirect_edge_power
	b	LBB0_9
LBB0_8:
	mov	x0, x23
	mov	x1, x21
	mov	x2, x24
	mov	x3, x19
	bl	_ar9003_hw_get_direct_edge_power
LBB0_9:
	mov	x20, x0
LBB0_10:
	cmp	w20, #0
	ccmp	w19, #0, #4, eq
	mov	w8, #60
	csel	w0, w20, w8, eq
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_RATE_POWER,4,2             ; @MAX_RATE_POWER
	.comm	_AR9300_NUM_BAND_EDGES_2G,4,2   ; @AR9300_NUM_BAND_EDGES_2G
	.comm	_AR9300_NUM_BAND_EDGES_5G,4,2   ; @AR9300_NUM_BAND_EDGES_5G
	.comm	_AR5416_BCHAN_UNUSED,8,3        ; @AR5416_BCHAN_UNUSED
	.no_dead_strip	_ar9003_hw_get_max_edge_power
.subsections_via_symbols
