	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libipw_channel_to_index        ## -- Begin function libipw_channel_to_index
	.p2align	4, 0x90
_libipw_channel_to_index:               ## @libipw_channel_to_index
	.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), %edx
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.1:
	movl	(%rdi), %r8d
	movq	_LIBIPW_24GHZ_BAND@GOTPCREL(%rip), %rax
	testl	%r8d, (%rax)
	je	LBB0_8
## %bb.2:
	testl	%edx, %edx
	jle	LBB0_8
## %bb.3:
	movq	24(%rdi), %rcx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rsi, (%rcx,%rax,8)
	je	LBB0_13
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rax
	cmpq	%rax, %rdx
	jne	LBB0_4
	jmp	LBB0_8
LBB0_6:
	cmpl	$0, 12(%rdi)
	je	LBB0_14
## %bb.7:
	movl	(%rdi), %r8d
LBB0_8:
	movq	_LIBIPW_52GHZ_BAND@GOTPCREL(%rip), %rcx
	movl	$-1, %eax
	testl	%r8d, (%rcx)
	je	LBB0_13
## %bb.9:
	movl	12(%rdi), %ecx
	testl	%ecx, %ecx
	jle	LBB0_13
## %bb.10:
	movq	16(%rdi), %rdi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rsi, (%rdi,%rdx,8)
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_11
LBB0_13:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_14:
	movl	$-1, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_15:
	movl	%edx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	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_channel_to_index        ; -- Begin function libipw_channel_to_index
	.p2align	2
_libipw_channel_to_index:               ; @libipw_channel_to_index
	.cfi_startproc
; %bb.0:
	ldr	w10, [x0, #8]
	cbz	w10, LBB0_5
; %bb.1:
	ldr	w9, [x0]
Lloh0:
	adrp	x8, _LIBIPW_24GHZ_BAND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LIBIPW_24GHZ_BAND@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w9
	cmp	w8, #0
	ccmp	w10, #1, #8, ne
	b.lt	LBB0_7
; %bb.2:
	mov	x8, #0
	ldr	x11, [x0, #24]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11, x8, lsl #3]
	cmp	x12, x1
	b.eq	LBB0_14
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #1
	cmp	x10, x8
	b.ne	LBB0_3
	b	LBB0_7
LBB0_5:
	ldr	w8, [x0, #12]
	cbz	w8, LBB0_12
; %bb.6:
	ldr	w9, [x0]
LBB0_7:
Lloh3:
	adrp	x8, _LIBIPW_52GHZ_BAND@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LIBIPW_52GHZ_BAND@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_12
; %bb.8:
	ldr	w8, [x0, #12]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.9:
	mov	x9, #0
	ldr	x10, [x0, #16]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, x9, lsl #3]
	cmp	x11, x1
	b.eq	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_10
LBB0_12:
	mov	w8, #-1
	mov	x0, x8
	ret
LBB0_13:
	mov	x8, x9
LBB0_14:
	mov	x0, x8
	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
