	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wnm_nei_get_chan
_wnm_nei_get_chan:                      ## @wnm_nei_get_chan
	.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	%edx, %r14d
	movl	%esi, %ebx
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	_WLAN_EID_COUNTRY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_wpa_bss_get_ie
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %rdi
	cmpl	$2, 4(%rax)
	jl	LBB0_6
## %bb.3:
	addq	$8, %rdi
	jmp	LBB0_7
LBB0_6:
	xorl	%edi, %edi
LBB0_7:
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_ieee80211_chan_to_freq
	testl	%ebx, %ebx
	jne	LBB0_12
## %bb.8:
	testl	%eax, %eax
	jg	LBB0_12
## %bb.9:
	leal	-1(%r14), %ecx
	cmpl	$12, %ecx
	ja	LBB0_13
## %bb.10:
	leal	(%r14,%r14,4), %ecx
	addl	$2407, %ecx                     ## imm = 0x967
	jmp	LBB0_16
LBB0_12:
	movl	%eax, %ecx
LBB0_16:
	movl	%ecx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_13:
	movl	$2484, %ecx                     ## imm = 0x9B4
	cmpl	$14, %r14d
	je	LBB0_16
## %bb.14:
	leal	-36(%r14), %edx
	movl	%eax, %ecx
	cmpl	$133, %edx
	ja	LBB0_16
## %bb.15:
	leal	(%r14,%r14,4), %ecx
	addl	$5000, %ecx                     ## imm = 0x1388
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_WLAN_EID_COUNTRY,4,2           ## @WLAN_EID_COUNTRY
	.no_dead_strip	_wnm_nei_get_chan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wnm_nei_get_chan
_wnm_nei_get_chan:                      ; @wnm_nei_get_chan
	.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, x2
	mov	x19, x1
	ldr	x0, [x0]
	cbz	x0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _WLAN_EID_COUNTRY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WLAN_EID_COUNTRY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_wpa_bss_get_ie
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w8, [x0, #4]
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.3:
	add	x0, x0, #8
	b	LBB0_5
LBB0_4:
	mov	x0, #0
LBB0_5:
	mov	x1, x19
	mov	x2, x20
	bl	_ieee80211_chan_to_freq
	sub	w8, w20, #1
	mov	w9, #2484
	sub	w10, w20, #36
	add	w11, w20, w20, lsl #2
	mov	w12, #5000
	add	w12, w11, w12
	cmp	w10, #133
	csel	w10, w0, w12, hi
	cmp	w20, #14
	csel	w9, w9, w10, eq
	add	w10, w11, #2407
	cmp	w8, #12
	csel	w8, w9, w10, hi
	cmp	w0, #0
	csel	w8, w0, w8, gt
	cmp	w19, #0
	csel	w0, w0, w8, ne
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WLAN_EID_COUNTRY,4,2           ; @WLAN_EID_COUNTRY
	.no_dead_strip	_wnm_nei_get_chan
.subsections_via_symbols
