	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_hw_channel
_ath5k_hw_channel:                      ## @ath5k_hw_channel
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_ath5k_channel_ok
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %eax
	leal	-130(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	cmpl	$2, %ecx
	jb	LBB0_7
## %bb.3:
	cmpl	$128, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_8
## %bb.5:
	callq	_ath5k_hw_rf5110_channel
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_10
LBB0_1:
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_ATH5K_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_7:
	callq	_ath5k_hw_rf2425_channel
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_10
LBB0_6:
	callq	_ath5k_hw_rf5111_channel
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_10
LBB0_8:
	callq	_ath5k_hw_rf5112_channel
	testl	%eax, %eax
	jne	LBB0_14
LBB0_10:
	cmpl	$2484, (%r14)                   ## imm = 0x9B4
	movq	_AR5K_PHY_CCKTXCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jne	LBB0_11
## %bb.12:
	movq	_AR5K_PHY_CCKTXCTL_JAPAN@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_AR5K_PHY_CCKTXCTL_WORLD@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_AR5K_REG_ENABLE_BITS
	movq	%r14, 8(%rbx)
	xorl	%eax, %eax
LBB0_14:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"channel frequency (%u MHz) out of supported band range\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AR5K_PHY_CCKTXCTL,4,2          ## @AR5K_PHY_CCKTXCTL
	.comm	_AR5K_PHY_CCKTXCTL_JAPAN,4,2    ## @AR5K_PHY_CCKTXCTL_JAPAN
	.comm	_AR5K_PHY_CCKTXCTL_WORLD,4,2    ## @AR5K_PHY_CCKTXCTL_WORLD
	.no_dead_strip	_ath5k_hw_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_hw_channel
_ath5k_hw_channel:                      ; @ath5k_hw_channel
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_ath5k_channel_ok
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w8, [x19]
	sub	w9, w8, #130
	mov	x0, x19
	mov	x1, x20
	cmp	w9, #2
	b.lo	LBB0_6
; %bb.2:
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.3:
	cmp	w8, #129
	b.ne	LBB0_8
; %bb.4:
	bl	_ath5k_hw_rf5110_channel
	cbnz	w0, LBB0_10
	b	LBB0_9
LBB0_5:
	ldr	w2, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ATH5K_ERR
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_6:
	bl	_ath5k_hw_rf2425_channel
	cbnz	w0, LBB0_10
	b	LBB0_9
LBB0_7:
	bl	_ath5k_hw_rf5111_channel
	cbnz	w0, LBB0_10
	b	LBB0_9
LBB0_8:
	bl	_ath5k_hw_rf5112_channel
	cbnz	w0, LBB0_10
LBB0_9:
	ldr	w8, [x20]
Lloh5:
	adrp	x9, _AR5K_PHY_CCKTXCTL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AR5K_PHY_CCKTXCTL@GOTPAGEOFF]
Lloh7:
	adrp	x10, _AR5K_PHY_CCKTXCTL_JAPAN@GOTPAGE
Lloh8:
	ldr	x10, [x10, _AR5K_PHY_CCKTXCTL_JAPAN@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x9]
Lloh10:
	adrp	x9, _AR5K_PHY_CCKTXCTL_WORLD@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AR5K_PHY_CCKTXCTL_WORLD@GOTPAGEOFF]
	cmp	w8, #2484
	csel	x8, x10, x9, eq
	ldr	w2, [x8]
	mov	x0, x19
	bl	_AR5K_REG_ENABLE_BITS
	mov	w0, #0
	str	x20, [x19, #8]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"channel frequency (%u MHz) out of supported band range\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AR5K_PHY_CCKTXCTL,4,2          ; @AR5K_PHY_CCKTXCTL
	.comm	_AR5K_PHY_CCKTXCTL_JAPAN,4,2    ; @AR5K_PHY_CCKTXCTL_JAPAN
	.comm	_AR5K_PHY_CCKTXCTL_WORLD,4,2    ; @AR5K_PHY_CCKTXCTL_WORLD
	.no_dead_strip	_ath5k_hw_channel
.subsections_via_symbols
