	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sja1105_mii_clocking_setup
_sja1105_mii_clocking_setup:            ## @sja1105_mii_clocking_setup
	.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	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	(%rax), %rdi
	movq	_XMII_MAC@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_XMII_PHY@GOTPCREL(%rip), %r12
	xorl	%edx, %edx
	cmpq	%rbx, (%r12)
	sete	%dl
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	$1, %ecx
	callq	_sja1105_cgu_idiv_config
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_sja1105_cgu_mii_tx_clk_config
	testl	%eax, %eax
	js	LBB0_7
## %bb.2:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_sja1105_cgu_mii_rx_clk_config
	testl	%eax, %eax
	js	LBB0_7
## %bb.3:
	cmpq	%rbx, (%r12)
	jne	LBB0_6
## %bb.4:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_sja1105_cgu_mii_ext_tx_clk_config
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_sja1105_cgu_mii_ext_rx_clk_config
	testl	%eax, %eax
	js	LBB0_7
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Configuring MII-%s clocking\n"

	.comm	_XMII_MAC,8,3                   ## @XMII_MAC
L_.str.1:                               ## @.str.1
	.asciz	"MAC"

L_.str.2:                               ## @.str.2
	.asciz	"PHY"

	.comm	_XMII_PHY,8,3                   ## @XMII_PHY
	.no_dead_strip	_sja1105_mii_clocking_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sja1105_mii_clocking_setup
_sja1105_mii_clocking_setup:            ; @sja1105_mii_clocking_setup
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x0, [x8]
Lloh0:
	adrp	x8, _XMII_MAC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XMII_MAC@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, l_.str.2@PAGE
Lloh4:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh5:
	adrp	x10, l_.str.1@PAGE
Lloh6:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	x8, x2
	csel	x2, x10, x9, eq
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh9:
	adrp	x22, _XMII_PHY@GOTPAGE
Lloh10:
	ldr	x22, [x22, _XMII_PHY@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x8, x21
	cset	w2, eq
	mov	x0, x20
	mov	x1, x19
	mov	w3, #1
	bl	_sja1105_cgu_idiv_config
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_sja1105_cgu_mii_tx_clk_config
	tbnz	w0, #31, LBB0_7
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	bl	_sja1105_cgu_mii_rx_clk_config
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	x8, [x22]
	cmp	x8, x21
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x20
	mov	x1, x19
	bl	_sja1105_cgu_mii_ext_tx_clk_config
	tbnz	w0, #31, LBB0_7
; %bb.5:
	mov	x0, x20
	mov	x1, x19
	bl	_sja1105_cgu_mii_ext_rx_clk_config
	tbnz	w0, #31, LBB0_7
LBB0_6:
	mov	w0, #0
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 AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Configuring MII-%s clocking\n"

	.comm	_XMII_MAC,8,3                   ; @XMII_MAC
l_.str.1:                               ; @.str.1
	.asciz	"MAC"

l_.str.2:                               ; @.str.2
	.asciz	"PHY"

	.comm	_XMII_PHY,8,3                   ; @XMII_PHY
	.no_dead_strip	_sja1105_mii_clocking_setup
.subsections_via_symbols
