	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mrf24j40_set_channel
_mrf24j40_set_channel:                  ## @mrf24j40_set_channel
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	(%rdi), %r14
	movq	%r14, %rdi
	callq	_printdev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movq	%rbx, %rdx
	callq	_dev_dbg
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_WARN_ON
	movq	_MRF24J40_CHAN_MIN@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%rbx, (%rax)
	setg	%dil
	callq	_WARN_ON
	movq	_MRF24J40_CHAN_MAX@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%rbx, (%rax)
	setl	%dil
	callq	_WARN_ON
	addq	$-11, %rbx
	movq	_RFCON0_CH_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %rbx
	movq	_RFOPT_RECOMMEND@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movl	4(%r14), %edi
	movq	_REG_RFCON0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RFCON0_CH_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rbx, %rcx
	callq	_regmap_update_bits
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movl	(%r14), %edi
	movq	_REG_RFCTL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_BIT_RFRST@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movq	%rcx, %rdx
	callq	_regmap_update_bits
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movl	(%r14), %edi
	movl	(%r15), %esi
	movq	(%rbx), %rdx
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_SET_CHANNEL_DELAY_US@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_udelay
	xorl	%eax, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set Channel %d\n"

	.comm	_MRF24J40_CHAN_MIN,8,3          ## @MRF24J40_CHAN_MIN
	.comm	_MRF24J40_CHAN_MAX,8,3          ## @MRF24J40_CHAN_MAX
	.comm	_RFCON0_CH_SHIFT,8,3            ## @RFCON0_CH_SHIFT
	.comm	_RFOPT_RECOMMEND,8,3            ## @RFOPT_RECOMMEND
	.comm	_REG_RFCON0,4,2                 ## @REG_RFCON0
	.comm	_RFCON0_CH_MASK,8,3             ## @RFCON0_CH_MASK
	.comm	_REG_RFCTL,4,2                  ## @REG_RFCTL
	.comm	_BIT_RFRST,8,3                  ## @BIT_RFRST
	.comm	_SET_CHANNEL_DELAY_US,4,2       ## @SET_CHANNEL_DELAY_US
	.no_dead_strip	_mrf24j40_set_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mrf24j40_set_channel
_mrf24j40_set_channel:                  ; @mrf24j40_set_channel
	.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
	mov	x21, x1
	ldr	x19, [x0]
	mov	x0, x19
	bl	_printdev
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
	cmp	x21, #0
	cset	w0, ne
	bl	_WARN_ON
Lloh2:
	adrp	x8, _MRF24J40_CHAN_MIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MRF24J40_CHAN_MIN@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x8, x20
	cset	w0, gt
	bl	_WARN_ON
Lloh5:
	adrp	x8, _MRF24J40_CHAN_MAX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MRF24J40_CHAN_MAX@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x8, x20
	cset	w0, lt
	bl	_WARN_ON
	sub	x8, x20, #11
Lloh8:
	adrp	x9, _RFCON0_CH_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RFCON0_CH_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	lsl	x8, x8, x9
Lloh11:
	adrp	x9, _RFOPT_RECOMMEND@GOTPAGE
Lloh12:
	ldr	x9, [x9, _RFOPT_RECOMMEND@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	orr	x3, x8, x9
	ldr	w0, [x19, #4]
Lloh14:
	adrp	x8, _REG_RFCON0@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REG_RFCON0@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _RFCON0_CH_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RFCON0_CH_MASK@GOTPAGEOFF]
Lloh19:
	ldr	x2, [x8]
	bl	_regmap_update_bits
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	w0, [x19]
Lloh20:
	adrp	x20, _REG_RFCTL@GOTPAGE
Lloh21:
	ldr	x20, [x20, _REG_RFCTL@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh22:
	adrp	x21, _BIT_RFRST@GOTPAGE
Lloh23:
	ldr	x21, [x21, _BIT_RFRST@GOTPAGEOFF]
	ldr	x2, [x21]
	mov	x3, x2
	bl	_regmap_update_bits
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x19]
	ldr	w1, [x20]
	ldr	x2, [x21]
	mov	x3, #0
	bl	_regmap_update_bits
	cbnz	w0, LBB0_4
; %bb.3:
Lloh24:
	adrp	x8, _SET_CHANNEL_DELAY_US@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SET_CHANNEL_DELAY_US@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_udelay
	mov	w0, #0
LBB0_4:
	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	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set Channel %d\n"

	.comm	_MRF24J40_CHAN_MIN,8,3          ; @MRF24J40_CHAN_MIN
	.comm	_MRF24J40_CHAN_MAX,8,3          ; @MRF24J40_CHAN_MAX
	.comm	_RFCON0_CH_SHIFT,8,3            ; @RFCON0_CH_SHIFT
	.comm	_RFOPT_RECOMMEND,8,3            ; @RFOPT_RECOMMEND
	.comm	_REG_RFCON0,4,2                 ; @REG_RFCON0
	.comm	_RFCON0_CH_MASK,8,3             ; @RFCON0_CH_MASK
	.comm	_REG_RFCTL,4,2                  ; @REG_RFCTL
	.comm	_BIT_RFRST,8,3                  ; @BIT_RFRST
	.comm	_SET_CHANNEL_DELAY_US,4,2       ; @SET_CHANNEL_DELAY_US
	.no_dead_strip	_mrf24j40_set_channel
.subsections_via_symbols
