	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grf5101_rf_set_channel
_grf5101_rf_set_channel:                ## @grf5101_rf_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	movq	(%rsi), %rax
	movl	(%rax), %edi
	callq	_ieee80211_frequency_to_channel
                                        ## kill: def $eax killed $eax def $rax
	movq	(%r14), %rcx
	movslq	%eax, %r14
	leal	-1(%rax), %r15d
	movzbl	-4(%rcx,%r14,4), %r12d
	movq	%rbx, %rdi
	movl	$21, %esi
	xorl	%edx, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$6, %esi
	movl	%r12d, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$21, %esi
	movl	$16, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$21, %esi
	xorl	%edx, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$7, %esi
	xorl	%edx, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$11, %esi
	movl	%r15d, %edx
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	$7, %esi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_write_grf5101
	movq	%rbx, %rdi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_grf5101_write_phy_antenna      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_grf5101_rf_set_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grf5101_rf_set_channel
_grf5101_rf_set_channel:                ; @grf5101_rf_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	x19, x0
	ldr	x21, [x0]
	ldr	x8, [x1]
	ldr	w0, [x8]
	bl	_ieee80211_frequency_to_channel
	mov	x20, x0
	ldr	x8, [x21]
	sxtw	x9, w20
	sub	x21, x9, #1
	lsl	x9, x21, #2
	ldrb	w22, [x8, x9]
	mov	x0, x19
	mov	w1, #21
	mov	w2, #0
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #6
	mov	x2, x22
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #21
	mov	w2, #16
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #21
	mov	w2, #0
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #7
	mov	w2, #0
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #11
	mov	x2, x21
	bl	_write_grf5101
	mov	x0, x19
	mov	w1, #7
	mov	w2, #4096
	bl	_write_grf5101
	mov	x0, x19
	mov	x1, x20
	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
	b	_grf5101_write_phy_antenna
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_grf5101_rf_set_channel
.subsections_via_symbols
