	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libipw_freq_to_channel         ## -- Begin function libipw_freq_to_channel
	.p2align	4, 0x90
_libipw_freq_to_channel:                ## @libipw_freq_to_channel
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	8(%rdi), %eax
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	cmpl	$0, 12(%rdi)
	je	LBB0_2
LBB0_3:
	movslq	%esi, %rcx
	imulq	$351843721, %rcx, %rcx          ## imm = 0x14F8B589
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$45, %rcx
	addl	%edx, %ecx
	movl	(%rdi), %esi
	movq	_LIBIPW_24GHZ_BAND@GOTPCREL(%rip), %rdx
	testl	%esi, (%rdx)
	je	LBB0_8
## %bb.4:
	testl	%eax, %eax
	jle	LBB0_8
## %bb.5:
	movq	24(%rdi), %rdx
	addq	$4, %rdx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%ecx, -4(%rdx)
	je	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	addq	$8, %rdx
	decq	%rax
	jne	LBB0_6
LBB0_8:
	movq	_LIBIPW_52GHZ_BAND@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	testl	%esi, (%rdx)
	je	LBB0_14
## %bb.9:
	movl	12(%rdi), %esi
	testl	%esi, %esi
	jle	LBB0_14
## %bb.10:
	movq	16(%rdi), %rdx
	addq	$4, %rdx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%ecx, -4(%rdx)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	addq	$8, %rdx
	decq	%rsi
	jne	LBB0_11
LBB0_14:
	popq	%rbp
	retq
LBB0_13:
	movl	(%rdx), %eax
	popq	%rbp
	retq
LBB0_2:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LIBIPW_24GHZ_BAND,4,2          ## @LIBIPW_24GHZ_BAND
	.comm	_LIBIPW_52GHZ_BAND,4,2          ## @LIBIPW_52GHZ_BAND
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libipw_freq_to_channel         ; -- Begin function libipw_freq_to_channel
	.p2align	2
_libipw_freq_to_channel:                ; @libipw_freq_to_channel
	.cfi_startproc
; %bb.0:
	ldr	w10, [x0, #8]
	cbnz	w10, LBB0_2
; %bb.1:
	ldr	w8, [x0, #12]
	cbz	w8, LBB0_11
LBB0_2:
	mov	w8, #46473
	movk	w8, #5368, lsl #16
	smull	x8, w1, w8
	lsr	x9, x8, #63
	asr	x8, x8, #45
	add	w8, w8, w9
	ldr	w11, [x0]
Lloh0:
	adrp	x9, _LIBIPW_24GHZ_BAND@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LIBIPW_24GHZ_BAND@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w9, w9, w11
	cmp	w9, #0
	ccmp	w10, #1, #8, ne
	b.lt	LBB0_6
; %bb.3:
	ldr	x9, [x0, #24]
	add	x9, x9, #4
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w12, [x9, #-4]
	cmp	w12, w8
	b.eq	LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #8
	subs	x10, x10, #1
	b.ne	LBB0_4
LBB0_6:
Lloh3:
	adrp	x9, _LIBIPW_52GHZ_BAND@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LIBIPW_52GHZ_BAND@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w11
	b.eq	LBB0_11
; %bb.7:
	ldr	w10, [x0, #12]
	cmp	w10, #1
	b.lt	LBB0_11
; %bb.8:
	ldr	x9, [x0, #16]
	add	x9, x9, #4
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w11, [x9, #-4]
	cmp	w11, w8
	b.eq	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x9, x9, #8
	subs	x10, x10, #1
	b.ne	LBB0_9
LBB0_11:
	mov	w0, #0
	ret
LBB0_12:
	ldr	w0, [x9]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_LIBIPW_24GHZ_BAND,4,2          ; @LIBIPW_24GHZ_BAND
	.comm	_LIBIPW_52GHZ_BAND,4,2          ; @LIBIPW_52GHZ_BAND
.subsections_via_symbols
