	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zd1201_set_rate
_zd1201_set_rate:                       ## @zd1201_set_rate
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	callq	_netdev_priv
	movq	%rax, %r14
	movl	(%rbx), %eax
	cmpl	$1000000, %eax                  ## imm = 0xF4240
	je	LBB0_1
## %bb.2:
	cmpl	$5500000, %eax                  ## imm = 0x53EC60
	je	LBB0_5
## %bb.3:
	cmpl	$2000000, %eax                  ## imm = 0x1E8480
	jne	LBB0_6
## %bb.4:
	movq	_ZD1201_RATEB2@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	movq	_ZD1201_RATEB1@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_ZD1201_RATEB5@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_ZD1201_RATEB11@GOTPCREL(%rip), %rax
LBB0_7:
	movzwl	(%rax), %eax
	leal	-1(%rax), %ecx
	xorl	%edx, %edx
	cmpl	$0, 4(%rbx)
	cmovel	%ecx, %edx
	orl	%eax, %edx
	movq	_ZD1201_RID_TXRATECNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movswl	%dx, %edx
	movq	%r14, %rdi
	callq	_zd1201_setconfig16
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_zd1201_mac_reset               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ZD1201_RATEB1,2,1              ## @ZD1201_RATEB1
	.comm	_ZD1201_RATEB2,2,1              ## @ZD1201_RATEB2
	.comm	_ZD1201_RATEB5,2,1              ## @ZD1201_RATEB5
	.comm	_ZD1201_RATEB11,2,1             ## @ZD1201_RATEB11
	.comm	_ZD1201_RID_TXRATECNTL,4,2      ## @ZD1201_RID_TXRATECNTL
	.no_dead_strip	_zd1201_set_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zd1201_set_rate
_zd1201_set_rate:                       ; @zd1201_set_rate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	bl	_netdev_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _ZD1201_RATEB1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ZD1201_RATEB1@GOTPAGEOFF]
Lloh2:
	adrp	x9, _ZD1201_RATEB5@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ZD1201_RATEB5@GOTPAGEOFF]
	ldp	w10, w11, [x20]
	sub	w12, w10, #488, lsl #12         ; =1998848
	cmp	w12, #1152
Lloh4:
	adrp	x12, _ZD1201_RATEB11@GOTPAGE
Lloh5:
	ldr	x12, [x12, _ZD1201_RATEB11@GOTPAGEOFF]
Lloh6:
	adrp	x13, _ZD1201_RATEB2@GOTPAGE
Lloh7:
	ldr	x13, [x13, _ZD1201_RATEB2@GOTPAGEOFF]
	csel	x12, x12, x13, ne
	sub	w13, w10, #1342, lsl #12        ; =5496832
	cmp	w13, #3168
	csel	x9, x9, x12, eq
	sub	w10, w10, #244, lsl #12         ; =999424
	cmp	w10, #576
	csel	x8, x8, x9, eq
	ldrh	w8, [x8]
	sub	w9, w8, #1
	cmp	w11, #0
	csel	w9, w9, wzr, eq
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _ZD1201_RID_TXRATECNTL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ZD1201_RID_TXRATECNTL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x9]
	sxth	w2, w8
	bl	_zd1201_setconfig16
	cbz	w0, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_zd1201_mac_reset
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ZD1201_RATEB1,2,1              ; @ZD1201_RATEB1
	.comm	_ZD1201_RATEB2,2,1              ; @ZD1201_RATEB2
	.comm	_ZD1201_RATEB5,2,1              ; @ZD1201_RATEB5
	.comm	_ZD1201_RATEB11,2,1             ; @ZD1201_RATEB11
	.comm	_ZD1201_RID_TXRATECNTL,4,2      ; @ZD1201_RID_TXRATECNTL
	.no_dead_strip	_zd1201_set_rate
.subsections_via_symbols
