	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath_hal_mhz2ieee               ## -- Begin function ath_hal_mhz2ieee
	.p2align	4, 0x90
_ath_hal_mhz2ieee:                      ## @ath_hal_mhz2ieee
	.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
	movl	%esi, %r14d
	movq	_IEEE80211_CHAN_2GHZ@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_6
## %bb.1:
	movl	$14, %eax
	cmpl	$2484, %r14d                    ## imm = 0x9B4
	je	LBB0_20
## %bb.2:
	jge	LBB0_5
LBB0_3:
	addl	$-2407, %r14d                   ## imm = 0xF699
LBB0_4:
	movslq	%r14d, %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$33, %rax
	addl	%ecx, %eax
	jmp	LBB0_20
LBB0_6:
	movl	%edx, %ebx
	movq	_IEEE80211_CHAN_5GHZ@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_12
## %bb.7:
	movl	%r14d, %edi
	callq	_IS_CHAN_IN_PUBLIC_SAFETY_BAND
	testq	%rax, %rax
	je	LBB0_8
LBB0_21:
	movl	%r14d, %edi
	movl	%ebx, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mappsb                         ## TAILCALL
LBB0_5:
	addl	$-2512, %r14d                   ## imm = 0xF630
	movslq	%r14d, %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	sarq	$35, %rcx
	shrq	$63, %rax
	addl	%ecx, %eax
	addl	$15, %eax
	jmp	LBB0_20
LBB0_12:
	movl	$14, %eax
	cmpl	$2484, %r14d                    ## imm = 0x9B4
	jne	LBB0_13
LBB0_20:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	cmpl	$5000, %r14d                    ## imm = 0x1388
	jg	LBB0_11
## %bb.9:
	movq	_IEEE80211_CHAN_A@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	je	LBB0_11
## %bb.10:
	addl	$-4000, %r14d                   ## imm = 0xF060
	jmp	LBB0_4
LBB0_13:
	jl	LBB0_3
## %bb.14:
	cmpl	$4999, %r14d                    ## imm = 0x1387
	ja	LBB0_19
## %bb.15:
	movl	%r14d, %edi
	callq	_IS_CHAN_IN_PUBLIC_SAFETY_BAND
	testq	%rax, %rax
	jne	LBB0_21
## %bb.16:
	cmpl	$4901, %r14d                    ## imm = 0x1325
	jb	LBB0_18
## %bb.17:
	addl	$-4000, %r14d                   ## imm = 0xF060
	movzwl	%r14w, %eax
	imull	$52429, %eax, %eax              ## imm = 0xCCCD
	shrl	$18, %eax
	jmp	LBB0_20
LBB0_11:
	addl	$-5000, %r14d                   ## imm = 0xEC78
	jmp	LBB0_4
LBB0_19:
	addl	$-5000, %r14d                   ## imm = 0xEC78
	movl	$3435973837, %eax               ## imm = 0xCCCCCCCD
	imulq	%r14, %rax
	shrq	$34, %rax
	jmp	LBB0_20
LBB0_18:
	addl	$-2512, %r14d                   ## imm = 0xF630
	movswl	%r14w, %eax
	imull	$26215, %eax, %eax              ## imm = 0x6667
	movl	%eax, %ecx
	sarl	$19, %ecx
	shrl	$31, %eax
	addl	%ecx, %eax
	addl	$15, %eax
	movzwl	%ax, %eax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_CHAN_2GHZ,4,2        ## @IEEE80211_CHAN_2GHZ
	.comm	_IEEE80211_CHAN_5GHZ,4,2        ## @IEEE80211_CHAN_5GHZ
	.comm	_IEEE80211_CHAN_A,4,2           ## @IEEE80211_CHAN_A
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath_hal_mhz2ieee               ; -- Begin function ath_hal_mhz2ieee
	.p2align	2
_ath_hal_mhz2ieee:                      ; @ath_hal_mhz2ieee
	.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	x19, x1
Lloh0:
	adrp	x8, _IEEE80211_CHAN_2GHZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_CHAN_2GHZ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_3
; %bb.1:
	cmp	w19, #2484
	b.ne	LBB0_6
LBB0_2:
	mov	w0, #14
	b	LBB0_15
LBB0_3:
	mov	x20, x2
Lloh3:
	adrp	x8, _IEEE80211_CHAN_5GHZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IEEE80211_CHAN_5GHZ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_7
; %bb.4:
	mov	x0, x19
	bl	_IS_CHAN_IN_PUBLIC_SAFETY_BAND
	cbz	x0, LBB0_10
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mappsb
LBB0_6:
	sub	w8, w19, #2512
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x10, x8, #63
	asr	x8, x8, #35
	add	w8, w8, w10
	add	w8, w8, #15
	sub	w10, w19, #2407
	smull	x9, w10, w9
	lsr	x10, x9, #63
	asr	x9, x9, #33
	add	w9, w9, w10
	cmp	w19, #2483
	csel	w0, w8, w9, gt
	b	LBB0_15
LBB0_7:
	cmp	w19, #2484
	b.eq	LBB0_2
; %bb.8:
	cmp	w19, #2483
	b.gt	LBB0_16
; %bb.9:
	sub	w8, w19, #2407
	b	LBB0_14
LBB0_10:
	mov	w8, #5000
	cmp	w19, w8
	b.gt	LBB0_13
; %bb.11:
Lloh6:
	adrp	x8, _IEEE80211_CHAN_A@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IEEE80211_CHAN_A@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w20
	cbz	w8, LBB0_13
; %bb.12:
	sub	w8, w19, #4000
	b	LBB0_14
LBB0_13:
	mov	w8, #-5000
	add	w8, w19, w8
LBB0_14:
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w0, w8, w9
LBB0_15:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_16:
	lsr	w8, w19, #3
	cmp	w8, #624
	b.hi	LBB0_20
; %bb.17:
	mov	x0, x19
	bl	_IS_CHAN_IN_PUBLIC_SAFETY_BAND
	cbnz	x0, LBB0_5
; %bb.18:
	mov	w8, #4901
	cmp	w19, w8
	b.lo	LBB0_21
; %bb.19:
	sub	w8, w19, #4000
	and	w8, w8, #0xffff
	mov	w9, #52429
	mul	w8, w8, w9
	lsr	w0, w8, #18
	b	LBB0_15
LBB0_20:
	mov	w8, #-5000
	add	w8, w19, w8
	mov	w9, #52429
	movk	w9, #52428, lsl #16
	umull	x8, w8, w9
	lsr	x0, x8, #34
	b	LBB0_15
LBB0_21:
	sub	w8, w19, #2512
	sxth	w8, w8
	mov	w9, #26215
	mul	w8, w8, w9
	asr	w9, w8, #19
	add	w8, w9, w8, lsr #31
	add	w8, w8, #15
	and	w0, w8, #0xffff
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_CHAN_2GHZ,4,2        ; @IEEE80211_CHAN_2GHZ
	.comm	_IEEE80211_CHAN_5GHZ,4,2        ; @IEEE80211_CHAN_5GHZ
	.comm	_IEEE80211_CHAN_A,4,2           ; @IEEE80211_CHAN_A
.subsections_via_symbols
