	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stmmac_clk_csr_set
_stmmac_clk_csr_set:                    ## @stmmac_clk_csr_set
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movl	16(%rax), %edi
	callq	_clk_get_rate
	movq	_MAC_CSR_H_FRQ_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	jne	LBB0_14
## %bb.1:
	movq	_CSR_F_35M@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_3
## %bb.2:
	movq	_STMMAC_CSR_20_35M@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_3:
	movq	_CSR_F_60M@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_5
## %bb.4:
	movq	_STMMAC_CSR_35_60M@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_5:
	movq	_CSR_F_100M@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_7
## %bb.6:
	movq	_STMMAC_CSR_60_100M@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_7:
	movq	_CSR_F_150M@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_9
## %bb.8:
	movq	_STMMAC_CSR_100_150M@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_9:
	movq	_CSR_F_250M@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_11
## %bb.10:
	movq	_STMMAC_CSR_150_250M@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_11:
	movq	_CSR_F_300M@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_14
## %bb.12:
	movq	_STMMAC_CSR_250_300M@GOTPCREL(%rip), %rcx
LBB0_13:
	movl	(%rcx), %ecx
	movl	%ecx, (%rbx)
LBB0_14:
	movq	8(%rbx), %rcx
	cmpq	$0, 8(%rcx)
	je	LBB0_19
## %bb.15:
	movl	$3, %edx
	cmpl	$160000000, %eax                ## imm = 0x9896800
	jg	LBB0_18
## %bb.16:
	movl	$2, %edx
	cmpl	$80000000, %eax                 ## imm = 0x4C4B400
	jg	LBB0_18
## %bb.17:
	xorl	%edx, %edx
	cmpl	$40000001, %eax                 ## imm = 0x2625A01
	setge	%dl
LBB0_18:
	movl	%edx, (%rbx)
LBB0_19:
	cmpq	$0, (%rcx)
	je	LBB0_26
## %bb.20:
	movl	$5, %ecx
	cmpl	$400000000, %eax                ## imm = 0x17D78400
	jg	LBB0_25
## %bb.21:
	movl	$4, %ecx
	cmpl	$350000000, %eax                ## imm = 0x14DC9380
	jg	LBB0_25
## %bb.22:
	movl	$3, %ecx
	cmpl	$300000000, %eax                ## imm = 0x11E1A300
	jg	LBB0_25
## %bb.23:
	movl	$2, %ecx
	cmpl	$250000000, %eax                ## imm = 0xEE6B280
	jg	LBB0_25
## %bb.24:
	xorl	%ecx, %ecx
	cmpl	$150000001, %eax                ## imm = 0x8F0D181
	setge	%cl
LBB0_25:
	movl	%ecx, (%rbx)
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAC_CSR_H_FRQ_MASK,4,2         ## @MAC_CSR_H_FRQ_MASK
	.comm	_CSR_F_35M,4,2                  ## @CSR_F_35M
	.comm	_STMMAC_CSR_20_35M,4,2          ## @STMMAC_CSR_20_35M
	.comm	_CSR_F_60M,4,2                  ## @CSR_F_60M
	.comm	_STMMAC_CSR_35_60M,4,2          ## @STMMAC_CSR_35_60M
	.comm	_CSR_F_100M,4,2                 ## @CSR_F_100M
	.comm	_STMMAC_CSR_60_100M,4,2         ## @STMMAC_CSR_60_100M
	.comm	_CSR_F_150M,4,2                 ## @CSR_F_150M
	.comm	_STMMAC_CSR_100_150M,4,2        ## @STMMAC_CSR_100_150M
	.comm	_CSR_F_250M,4,2                 ## @CSR_F_250M
	.comm	_STMMAC_CSR_150_250M,4,2        ## @STMMAC_CSR_150_250M
	.comm	_CSR_F_300M,4,2                 ## @CSR_F_300M
	.comm	_STMMAC_CSR_250_300M,4,2        ## @STMMAC_CSR_250_300M
	.no_dead_strip	_stmmac_clk_csr_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stmmac_clk_csr_set
_stmmac_clk_csr_set:                    ; @stmmac_clk_csr_set
	.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	x19, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8, #16]
	bl	_clk_get_rate
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _MAC_CSR_H_FRQ_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAC_CSR_H_FRQ_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_14
; %bb.1:
Lloh3:
	adrp	x8, _CSR_F_35M@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CSR_F_35M@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ge	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _STMMAC_CSR_20_35M@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STMMAC_CSR_20_35M@GOTPAGEOFF]
	b	LBB0_13
LBB0_3:
Lloh8:
	adrp	x8, _CSR_F_60M@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CSR_F_60M@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ge	LBB0_5
; %bb.4:
Lloh11:
	adrp	x8, _STMMAC_CSR_35_60M@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STMMAC_CSR_35_60M@GOTPAGEOFF]
	b	LBB0_13
LBB0_5:
Lloh13:
	adrp	x8, _CSR_F_100M@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CSR_F_100M@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ge	LBB0_7
; %bb.6:
Lloh16:
	adrp	x8, _STMMAC_CSR_60_100M@GOTPAGE
Lloh17:
	ldr	x8, [x8, _STMMAC_CSR_60_100M@GOTPAGEOFF]
	b	LBB0_13
LBB0_7:
Lloh18:
	adrp	x8, _CSR_F_150M@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CSR_F_150M@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ge	LBB0_9
; %bb.8:
Lloh21:
	adrp	x8, _STMMAC_CSR_100_150M@GOTPAGE
Lloh22:
	ldr	x8, [x8, _STMMAC_CSR_100_150M@GOTPAGEOFF]
	b	LBB0_13
LBB0_9:
Lloh23:
	adrp	x8, _CSR_F_250M@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CSR_F_250M@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ge	LBB0_11
; %bb.10:
Lloh26:
	adrp	x8, _STMMAC_CSR_150_250M@GOTPAGE
Lloh27:
	ldr	x8, [x8, _STMMAC_CSR_150_250M@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
Lloh28:
	adrp	x8, _CSR_F_300M@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CSR_F_300M@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ge	LBB0_14
; %bb.12:
Lloh31:
	adrp	x8, _STMMAC_CSR_250_300M@GOTPAGE
Lloh32:
	ldr	x8, [x8, _STMMAC_CSR_250_300M@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_14:
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_19
; %bb.15:
	mov	w9, #26624
	movk	w9, #2441, lsl #16
	cmp	w0, w9
	b.le	LBB0_17
; %bb.16:
	mov	w9, #3
	b	LBB0_18
LBB0_17:
	mov	w9, #2
	mov	w10, #46080
	movk	w10, #1220, lsl #16
	mov	w11, #23040
	movk	w11, #610, lsl #16
	cmp	w0, w11
	cset	w11, gt
	cmp	w0, w10
	csel	w9, w9, w11, gt
LBB0_18:
	str	w9, [x19]
LBB0_19:
	ldr	x8, [x8]
	cbz	x8, LBB0_30
; %bb.20:
	mov	w8, #33792
	movk	w8, #6103, lsl #16
	cmp	w0, w8
	b.le	LBB0_22
; %bb.21:
	mov	w8, #5
	b	LBB0_29
LBB0_22:
	mov	w8, #37760
	movk	w8, #5340, lsl #16
	cmp	w0, w8
	b.le	LBB0_24
; %bb.23:
	mov	w8, #4
	b	LBB0_29
LBB0_24:
	mov	w8, #41728
	movk	w8, #4577, lsl #16
	cmp	w0, w8
	b.le	LBB0_26
; %bb.25:
	mov	w8, #3
	b	LBB0_29
LBB0_26:
	mov	w8, #45696
	movk	w8, #3814, lsl #16
	cmp	w0, w8
	b.le	LBB0_28
; %bb.27:
	mov	w8, #2
	b	LBB0_29
LBB0_28:
	mov	w8, #53632
	movk	w8, #2288, lsl #16
	cmp	w0, w8
	cset	w8, gt
LBB0_29:
	str	w8, [x19]
LBB0_30:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_MAC_CSR_H_FRQ_MASK,4,2         ; @MAC_CSR_H_FRQ_MASK
	.comm	_CSR_F_35M,4,2                  ; @CSR_F_35M
	.comm	_STMMAC_CSR_20_35M,4,2          ; @STMMAC_CSR_20_35M
	.comm	_CSR_F_60M,4,2                  ; @CSR_F_60M
	.comm	_STMMAC_CSR_35_60M,4,2          ; @STMMAC_CSR_35_60M
	.comm	_CSR_F_100M,4,2                 ; @CSR_F_100M
	.comm	_STMMAC_CSR_60_100M,4,2         ; @STMMAC_CSR_60_100M
	.comm	_CSR_F_150M,4,2                 ; @CSR_F_150M
	.comm	_STMMAC_CSR_100_150M,4,2        ; @STMMAC_CSR_100_150M
	.comm	_CSR_F_250M,4,2                 ; @CSR_F_250M
	.comm	_STMMAC_CSR_150_250M,4,2        ; @STMMAC_CSR_150_250M
	.comm	_CSR_F_300M,4,2                 ; @CSR_F_300M
	.comm	_STMMAC_CSR_250_300M,4,2        ; @STMMAC_CSR_250_300M
	.no_dead_strip	_stmmac_clk_csr_set
.subsections_via_symbols
