	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw_wx_get_freq
_ipw_wx_get_freq:                       ## @ipw_wx_get_freq
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	callq	_libipw_priv
	movq	%rax, %rbx
	movl	$0, (%r15)
	leaq	12(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_CFG_STATIC_CHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_2
## %bb.1:
	movq	_STATUS_ASSOCIATING@GOTPCREL(%rip), %rax
	movq	_STATUS_ASSOCIATED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, 4(%rbx)
	je	LBB0_8
LBB0_2:
	movq	16(%rbx), %rdi
	movl	8(%rbx), %esi
	callq	_libipw_channel_to_index
	movl	%eax, %r12d
	xorl	%edi, %edi
	cmpl	$-1, %eax
	sete	%dil
	callq	_BUG_ON
	movl	$1, (%r15)
	movq	16(%rbx), %rdi
	movl	8(%rbx), %esi
	callq	_libipw_is_valid_channel
	cmpl	$129, %eax
	je	LBB0_6
## %bb.3:
	cmpl	$128, %eax
	jne	LBB0_7
## %bb.4:
	movq	16(%rbx), %rax
	movq	8(%rax), %rax
	jmp	LBB0_5
LBB0_6:
	movq	16(%rbx), %rax
	movq	(%rax), %rax
LBB0_5:
	movslq	%r12d, %rcx
	imull	$100000, (%rax,%rcx,4), %eax    ## imm = 0x186A0
	movl	%eax, 4(%r15)
	jmp	LBB0_9
LBB0_7:
	xorl	%eax, %eax
	callq	_BUG
	jmp	LBB0_9
LBB0_8:
	movl	$0, 4(%r15)
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	8(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_IPW_DEBUG_WX
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CFG_STATIC_CHANNEL,4,2         ## @CFG_STATIC_CHANNEL
	.comm	_STATUS_ASSOCIATING,4,2         ## @STATUS_ASSOCIATING
	.comm	_STATUS_ASSOCIATED,4,2          ## @STATUS_ASSOCIATED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GET Freq/Channel -> %d\n"

	.no_dead_strip	_ipw_wx_get_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw_wx_get_freq
_ipw_wx_get_freq:                       ; @ipw_wx_get_freq
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x2
	bl	_libipw_priv
	mov	x19, x0
	str	wzr, [x21]
	add	x20, x0, #12
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _CFG_STATIC_CHANNEL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CFG_STATIC_CHANNEL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x9, _STATUS_ASSOCIATING@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STATUS_ASSOCIATING@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _STATUS_ASSOCIATED@GOTPAGE
Lloh7:
	ldr	x10, [x10, _STATUS_ASSOCIATED@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_8
LBB0_2:
	ldr	x0, [x19, #16]
	ldr	w1, [x19, #8]
	bl	_libipw_channel_to_index
	mov	x22, x0
	cmn	w0, #1
	cset	w0, eq
	bl	_BUG_ON
	mov	w8, #1
	str	w8, [x21]
	ldr	x0, [x19, #16]
	ldr	w1, [x19, #8]
	bl	_libipw_is_valid_channel
	cmp	w0, #129
	b.eq	LBB0_5
; %bb.3:
	cmp	w0, #128
	b.ne	LBB0_7
; %bb.4:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	b	LBB0_6
LBB0_5:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
LBB0_6:
	ldr	w8, [x8, w22, sxtw #2]
	mov	w9, #34464
	movk	w9, #1, lsl #16
	mul	w8, w8, w9
	str	w8, [x21, #4]
	b	LBB0_9
LBB0_7:
	bl	_BUG
	b	LBB0_9
LBB0_8:
	str	wzr, [x21, #4]
LBB0_9:
	mov	x0, x20
	bl	_mutex_unlock
	ldr	w1, [x19, #8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IPW_DEBUG_WX
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CFG_STATIC_CHANNEL,4,2         ; @CFG_STATIC_CHANNEL
	.comm	_STATUS_ASSOCIATING,4,2         ; @STATUS_ASSOCIATING
	.comm	_STATUS_ASSOCIATED,4,2          ; @STATUS_ASSOCIATED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GET Freq/Channel -> %d\n"

	.no_dead_strip	_ipw_wx_get_freq
.subsections_via_symbols
