	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtw_channel_to_idx
_rtw_channel_to_idx:                    ## @rtw_channel_to_idx
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_PHY_BAND_2G@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jne	LBB0_2
## %bb.1:
	decl	%esi
	movq	_RTW_MAX_CHANNEL_NUM_2G@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	%esi, %eax
LBB0_9:
	cltq
	cmpq	%rax, %rcx
	movl	$-1, %ecx
	cmovlel	%ecx, %eax
	jmp	LBB0_10
LBB0_2:
	movq	_PHY_BAND_5G@GOTPCREL(%rip), %rcx
	movl	$-1, %eax
	cmpq	%rdi, (%rcx)
	jne	LBB0_10
## %bb.3:
	movq	_RTW_MAX_CHANNEL_NUM_5G@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	jle	LBB0_4
## %bb.5:
	movq	_rtw_channel_idx_5g@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rsi, (%rdx,%rax,8)
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rax
	cmpq	%rax, %rcx
	jne	LBB0_6
## %bb.8:
	movq	%rcx, %rax
	jmp	LBB0_9
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_BAND_2G,8,3                ## @PHY_BAND_2G
	.comm	_RTW_MAX_CHANNEL_NUM_2G,8,3     ## @RTW_MAX_CHANNEL_NUM_2G
	.comm	_PHY_BAND_5G,8,3                ## @PHY_BAND_5G
	.comm	_RTW_MAX_CHANNEL_NUM_5G,8,3     ## @RTW_MAX_CHANNEL_NUM_5G
	.comm	_rtw_channel_idx_5g,8,3         ## @rtw_channel_idx_5g
	.no_dead_strip	_rtw_channel_to_idx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtw_channel_to_idx
_rtw_channel_to_idx:                    ; @rtw_channel_to_idx
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _PHY_BAND_2G@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_BAND_2G@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.ne	LBB0_3
; %bb.1:
	sub	w9, w1, #1
Lloh3:
	adrp	x8, _RTW_MAX_CHANNEL_NUM_2G@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RTW_MAX_CHANNEL_NUM_2G@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
LBB0_2:
	cmp	x8, w9, sxtw
	csinv	w0, w9, wzr, gt
	ret
LBB0_3:
Lloh6:
	adrp	x8, _PHY_BAND_5G@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PHY_BAND_5G@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, x0
	b.ne	LBB0_9
; %bb.4:
Lloh9:
	adrp	x8, _RTW_MAX_CHANNEL_NUM_5G@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RTW_MAX_CHANNEL_NUM_5G@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_10
; %bb.5:
	mov	x9, #0
Lloh12:
	adrp	x10, _rtw_channel_idx_5g@GOTPAGE
Lloh13:
	ldr	x10, [x10, _rtw_channel_idx_5g@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, x9, lsl #3]
	cmp	x11, x1
	b.eq	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.8:
	mov	x9, x8
	b	LBB0_2
LBB0_9:
	mov	w0, #-1
	ret
LBB0_10:
	mov	w9, #0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_BAND_2G,8,3                ; @PHY_BAND_2G
	.comm	_RTW_MAX_CHANNEL_NUM_2G,8,3     ; @RTW_MAX_CHANNEL_NUM_2G
	.comm	_PHY_BAND_5G,8,3                ; @PHY_BAND_5G
	.comm	_RTW_MAX_CHANNEL_NUM_5G,8,3     ; @RTW_MAX_CHANNEL_NUM_5G
	.comm	_rtw_channel_idx_5g,8,3         ; @rtw_channel_idx_5g
	.no_dead_strip	_rtw_channel_to_idx
.subsections_via_symbols
