	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_set_freq
_atmel_set_freq:                        ## @atmel_set_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, %rbx
	callq	_netdev_priv
	movq	%rax, %r14
	movq	_EINPROGRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	4(%rbx), %r12d
	cmpl	$1, (%rbx)
	jne	LBB0_2
## %bb.1:
	movslq	%r12d, %rax
	imulq	$351843721, %rax, %rdi          ## imm = 0x14F8B589
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$45, %rdi
	addl	%eax, %edi
	movl	$0, (%rbx)
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ieee80211_frequency_to_channel
	movl	%eax, %r12d
	movl	%eax, 4(%rbx)
LBB0_2:
	cmpl	$1000, %r12d                    ## imm = 0x3E8
	ja	LBB0_4
## %bb.3:
	cmpl	$0, (%rbx)
	jle	LBB0_5
LBB0_4:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %r15d
LBB0_9:
	negl	%r15d
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_atmel_validate_channel
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movl	%r12d, (%r14)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_atmel_set_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmel_set_freq
_atmel_set_freq:                        ; @atmel_set_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	x20, x2
	bl	_netdev_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _EINPROGRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINPROGRESS@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	ldp	w8, w21, [x20]
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	mov	w8, #46473
	movk	w8, #5368, lsl #16
	smull	x8, w21, w8
	lsr	x9, x8, #63
	asr	x8, x8, #45
	add	w0, w8, w9
	str	wzr, [x20]
	bl	_ieee80211_frequency_to_channel
	mov	x21, x0
	str	w0, [x20, #4]
LBB0_2:
	cmp	w21, #1000
	b.hi	LBB0_4
; %bb.3:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_7
LBB0_4:
Lloh3:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_5:
	ldr	w22, [x8]
LBB0_6:
	neg	w0, w22
	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
LBB0_7:
	mov	x0, x19
	mov	x1, x21
	bl	_atmel_validate_channel
	cbz	x0, LBB0_9
; %bb.8:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_9:
	str	w21, [x19]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_atmel_set_freq
.subsections_via_symbols
