	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function macb_set_tx_clk
_macb_set_tx_clk:                       ## @macb_set_tx_clk
	.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
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	addl	$-128, %esi
	cmpl	$2, %esi
	ja	LBB0_6
## %bb.2:
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movslq	%esi, %rax
	leaq	l_switch.table.macb_set_tx_clk(%rip), %rcx
	movq	(%rcx,%rax,8), %r15
	movq	%r15, %rsi
	callq	_clk_round_rate
	testq	%rax, %rax
	js	LBB0_6
## %bb.3:
	movq	%rax, %r12
	subq	%r15, %rax
	movq	%rax, %rdi
	negq	%rdi
	cmovsq	%rax, %rdi
	movl	%r15d, %eax
	shrl	$5, %eax
	imulq	$175921861, %rax, %rsi          ## imm = 0xA7C5AC5
	shrq	$39, %rsi
	callq	_DIV_ROUND_UP
	cmpq	$6, %rax
	jl	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_netdev_warn
LBB0_5:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_clk_set_rate
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netdev_err                     ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to generate target frequency: %ld Hz\n"

L_.str.1:                               ## @.str.1
	.asciz	"adjusting tx_clk failed.\n"

	.no_dead_strip	_macb_set_tx_clk
	.section	__TEXT,__const
	.p2align	3                               ## @switch.table.macb_set_tx_clk
l_switch.table.macb_set_tx_clk:
	.quad	125000000                       ## 0x7735940
	.quad	25000000                        ## 0x17d7840
	.quad	2500000                         ## 0x2625a0

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function macb_set_tx_clk
_macb_set_tx_clk:                       ; @macb_set_tx_clk
	.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
	cbz	x0, LBB0_7
; %bb.1:
	sub	w8, w1, #128
	cmp	w8, #2
	b.hi	LBB0_7
; %bb.2:
	mov	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x9, l_switch.table.macb_set_tx_clk@PAGE
Lloh1:
	add	x9, x9, l_switch.table.macb_set_tx_clk@PAGEOFF
	ldr	x21, [x9, w8, sxtw #3]
	mov	x1, x21
	bl	_clk_round_rate
	tbnz	x0, #63, LBB0_7
; %bb.3:
	mov	x22, x0
	subs	x8, x0, x21
	cneg	x0, x8, mi
	ubfx	x8, x21, #5, #27
	mov	w9, #23237
	movk	w9, #2684, lsl #16
	umull	x8, w8, w9
	lsr	x1, x8, #39
	bl	_DIV_ROUND_UP
	cmp	x0, #6
	b.lt	LBB0_5
; %bb.4:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_netdev_warn
LBB0_5:
	mov	x0, x20
	mov	x1, x22
	bl	_clk_set_rate
	cbz	x0, LBB0_7
; %bb.6:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	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	_netdev_err
LBB0_7:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to generate target frequency: %ld Hz\n"

l_.str.1:                               ; @.str.1
	.asciz	"adjusting tx_clk failed.\n"

	.no_dead_strip	_macb_set_tx_clk
	.section	__TEXT,__const
	.p2align	3                               ; @switch.table.macb_set_tx_clk
l_switch.table.macb_set_tx_clk:
	.quad	125000000                       ; 0x7735940
	.quad	25000000                        ; 0x17d7840
	.quad	2500000                         ; 0x2625a0

.subsections_via_symbols
