	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prism2_ioctl_giwfreq
_prism2_ioctl_giwfreq:                  ## @prism2_ioctl_giwfreq
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_HFA384X_RID_CURRENTCHANNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$2, %ecx
	movl	$1, %r8d
	callq	*(%rax)
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	leaq	-20(%rbp), %rdi
	callq	_le16_to_cpus
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.3:
	movq	_FREQ_COUNT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_1
## %bb.4:
	movq	_freq_list@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	decl	%eax
	imull	$100000, (%rcx,%rax,4), %eax    ## imm = 0x186A0
	movl	%eax, (%r14)
	movl	$1, 4(%r14)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HFA384X_RID_CURRENTCHANNEL,4,2 ## @HFA384X_RID_CURRENTCHANNEL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FREQ_COUNT,4,2                 ## @FREQ_COUNT
	.comm	_freq_list,8,3                  ## @freq_list
	.no_dead_strip	_prism2_ioctl_giwfreq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prism2_ioctl_giwfreq
_prism2_ioctl_giwfreq:                  ; @prism2_ioctl_giwfreq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x2
	mov	x20, x0
	bl	_netdev_priv
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _HFA384X_RID_CURRENTCHANNEL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HFA384X_RID_CURRENTCHANNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #2
	mov	w4, #1
	blr	x8
	tbnz	x0, #63, LBB0_2
; %bb.1:
	add	x0, sp, #12
	bl	_le16_to_cpus
	ldr	w9, [sp, #12]
Lloh3:
	adrp	x8, _FREQ_COUNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FREQ_COUNT@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x8]
	subs	w8, w9, #1
	ccmp	w9, w10, #0, ge
	b.le	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_3:
	mov	w0, #0
Lloh9:
	adrp	x9, _freq_list@GOTPAGE
Lloh10:
	ldr	x9, [x9, _freq_list@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldr	w8, [x9, w8, uxtw #2]
	mov	w9, #34464
	movk	w9, #1, lsl #16
	mul	w8, w8, w9
	mov	w9, #1
	stp	w8, w9, [x19]
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HFA384X_RID_CURRENTCHANNEL,4,2 ; @HFA384X_RID_CURRENTCHANNEL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FREQ_COUNT,4,2                 ; @FREQ_COUNT
	.comm	_freq_list,8,3                  ; @freq_list
	.no_dead_strip	_prism2_ioctl_giwfreq
.subsections_via_symbols
