	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smsc75xx_phy_initialize
_smsc75xx_phy_initialize:               ## @smsc75xx_phy_initialize
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	(%rdi), %edi
	leaq	8(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%edi, 40(%r15)
	movq	_smsc75xx_mdio_read@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r15)
	movq	_smsc75xx_mdio_write@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r15)
	movabsq	$133143986207, %rax             ## imm = 0x1F0000001F
	movq	%rax, 16(%r15)
	movl	$1, 24(%r15)
	movq	_SMSC75XX_INTERNAL_PHY_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, 28(%r15)
	movq	_MII_BMCR@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	_BMCR_RESET@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	callq	_smsc75xx_mdio_write
	movl	$-1, %r14d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_msleep
	movl	(%r15), %edi
	movl	28(%r15), %esi
	movl	(%r12), %edx
	callq	_smsc75xx_mdio_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%r14d
	testl	%ebx, (%r13)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$99, %r14d
	jb	LBB0_1
LBB0_4:
	cmpl	$99, %r14d
	jb	LBB0_7
## %bb.5:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_warn
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_6:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
LBB0_10:
	callq	_netdev_warn
	jmp	LBB0_11
LBB0_7:
	movq	%r15, %rdi
	callq	_smsc75xx_phy_gig_workaround
	movl	(%r15), %edi
	movl	28(%r15), %esi
	movq	_ADVERTISE_ALL@GOTPCREL(%rip), %rax
	movq	_ADVERTISE_CSMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_MII_ADVERTISE@GOTPCREL(%rip), %rax
	movq	_ADVERTISE_PAUSE_CAP@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	(%rax), %edx
	movq	_ADVERTISE_PAUSE_ASYM@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	callq	_smsc75xx_mdio_write
	movl	(%r15), %edi
	movl	28(%r15), %esi
	movq	_MII_CTRL1000@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ADVERTISE_1000FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_smsc75xx_mdio_write
	movl	(%r15), %edi
	movl	28(%r15), %esi
	movq	_PHY_INT_SRC@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	callq	_smsc75xx_mdio_read
	movl	(%r15), %edi
	testl	%eax, %eax
	js	LBB0_9
## %bb.8:
	movl	28(%r15), %esi
	movl	(%r14), %edx
	movl	$65535, %ecx                    ## imm = 0xFFFF
	callq	_smsc75xx_mdio_write
	movl	(%r15), %edi
	movl	28(%r15), %esi
	movq	_PHY_INT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PHY_INT_MASK_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_smsc75xx_mdio_write
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mii_nway_restart
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	leaq	L_.str.3(%rip), %rcx
	movq	%r15, %rdi
	callq	_netif_dbg
	xorl	%ebx, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_SMSC75XX_INTERNAL_PHY_ID,4,2   ## @SMSC75XX_INTERNAL_PHY_ID
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_RESET,4,2                 ## @BMCR_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error reading MII_BMCR\n"

L_.str.1:                               ## @.str.1
	.asciz	"timeout on PHY Reset\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_MII_ADVERTISE,4,2              ## @MII_ADVERTISE
	.comm	_ADVERTISE_ALL,4,2              ## @ADVERTISE_ALL
	.comm	_ADVERTISE_CSMA,4,2             ## @ADVERTISE_CSMA
	.comm	_ADVERTISE_PAUSE_CAP,4,2        ## @ADVERTISE_PAUSE_CAP
	.comm	_ADVERTISE_PAUSE_ASYM,4,2       ## @ADVERTISE_PAUSE_ASYM
	.comm	_MII_CTRL1000,4,2               ## @MII_CTRL1000
	.comm	_ADVERTISE_1000FULL,4,2         ## @ADVERTISE_1000FULL
	.comm	_PHY_INT_SRC,4,2                ## @PHY_INT_SRC
L_.str.2:                               ## @.str.2
	.asciz	"Error reading PHY_INT_SRC\n"

	.comm	_PHY_INT_MASK,4,2               ## @PHY_INT_MASK
	.comm	_PHY_INT_MASK_DEFAULT,4,2       ## @PHY_INT_MASK_DEFAULT
	.comm	_ifup,4,2                       ## @ifup
L_.str.3:                               ## @.str.3
	.asciz	"phy initialised successfully\n"

	.no_dead_strip	_smsc75xx_phy_initialize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smsc75xx_phy_initialize
_smsc75xx_phy_initialize:               ; @smsc75xx_phy_initialize
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _smsc75xx_mdio_read@GOTPAGE
Lloh1:
	ldr	x8, [x8, _smsc75xx_mdio_read@GOTPAGEOFF]
	mov	x20, x19
	str	x8, [x20, #8]!
	str	w0, [x19, #40]
Lloh2:
	adrp	x8, _smsc75xx_mdio_write@GOTPAGE
Lloh3:
	ldr	x8, [x8, _smsc75xx_mdio_write@GOTPAGEOFF]
	str	x8, [x19, #32]
	movi.2s	v0, #31
	str	d0, [x19, #16]
	mov	w8, #1
Lloh4:
	adrp	x9, _SMSC75XX_INTERNAL_PHY_ID@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SMSC75XX_INTERNAL_PHY_ID@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x9]
	stp	w8, w1, [x19, #24]
Lloh7:
	adrp	x22, _MII_BMCR@GOTPAGE
Lloh8:
	ldr	x22, [x22, _MII_BMCR@GOTPAGEOFF]
	ldr	w2, [x22]
Lloh9:
	adrp	x23, _BMCR_RESET@GOTPAGE
Lloh10:
	ldr	x23, [x23, _BMCR_RESET@GOTPAGEOFF]
	ldr	w3, [x23]
	bl	_smsc75xx_mdio_write
	mov	w24, #-1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_msleep
	ldr	w0, [x19]
	ldr	w1, [x19, #28]
	ldr	w2, [x22]
	bl	_smsc75xx_mdio_read
	mov	x21, x0
	tbnz	w0, #31, LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w24, w24, #1
	ldr	w8, [x23]
	tst	w8, w21
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w24, #99
	b.lo	LBB0_1
LBB0_4:
	cmp	w24, #99
	b.lo	LBB0_8
; %bb.5:
	ldr	w0, [x19]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_warn
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_6:
	ldr	w0, [x19]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
LBB0_7:
	bl	_netdev_warn
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_smsc75xx_phy_gig_workaround
	ldr	w0, [x19]
	ldr	w1, [x19, #28]
Lloh18:
	adrp	x8, _MII_ADVERTISE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MII_ADVERTISE@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
Lloh21:
	adrp	x8, _ADVERTISE_ALL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ADVERTISE_ALL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _ADVERTISE_CSMA@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ADVERTISE_CSMA@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh27:
	adrp	x9, _ADVERTISE_PAUSE_CAP@GOTPAGE
Lloh28:
	ldr	x9, [x9, _ADVERTISE_PAUSE_CAP@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh30:
	adrp	x9, _ADVERTISE_PAUSE_ASYM@GOTPAGE
Lloh31:
	ldr	x9, [x9, _ADVERTISE_PAUSE_ASYM@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w3, w8, w9
	bl	_smsc75xx_mdio_write
	ldr	w0, [x19]
	ldr	w1, [x19, #28]
Lloh33:
	adrp	x8, _MII_CTRL1000@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MII_CTRL1000@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
Lloh36:
	adrp	x8, _ADVERTISE_1000FULL@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ADVERTISE_1000FULL@GOTPAGEOFF]
Lloh38:
	ldr	w3, [x8]
	bl	_smsc75xx_mdio_write
	ldr	w0, [x19]
	ldr	w1, [x19, #28]
Lloh39:
	adrp	x22, _PHY_INT_SRC@GOTPAGE
Lloh40:
	ldr	x22, [x22, _PHY_INT_SRC@GOTPAGEOFF]
	ldr	w2, [x22]
	bl	_smsc75xx_mdio_read
	mov	x21, x0
	ldr	w0, [x19]
	tbnz	w21, #31, LBB0_11
; %bb.9:
	ldr	w1, [x19, #28]
	ldr	w2, [x22]
	mov	w3, #65535
	bl	_smsc75xx_mdio_write
	ldr	w0, [x19]
	ldr	w1, [x19, #28]
Lloh41:
	adrp	x8, _PHY_INT_MASK@GOTPAGE
Lloh42:
	ldr	x8, [x8, _PHY_INT_MASK@GOTPAGEOFF]
Lloh43:
	ldr	w2, [x8]
Lloh44:
	adrp	x8, _PHY_INT_MASK_DEFAULT@GOTPAGE
Lloh45:
	ldr	x8, [x8, _PHY_INT_MASK_DEFAULT@GOTPAGEOFF]
Lloh46:
	ldr	w3, [x8]
	bl	_smsc75xx_mdio_write
	mov	x0, x20
	bl	_mii_nway_restart
Lloh47:
	adrp	x8, _ifup@GOTPAGE
Lloh48:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh49:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh50:
	adrp	x3, l_.str.3@PAGE
Lloh51:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_netif_dbg
	mov	w21, #0
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh52:
	adrp	x1, l_.str.2@PAGE
Lloh53:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_7
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_SMSC75XX_INTERNAL_PHY_ID,4,2   ; @SMSC75XX_INTERNAL_PHY_ID
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_RESET,4,2                 ; @BMCR_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error reading MII_BMCR\n"

l_.str.1:                               ; @.str.1
	.asciz	"timeout on PHY Reset\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_MII_ADVERTISE,4,2              ; @MII_ADVERTISE
	.comm	_ADVERTISE_ALL,4,2              ; @ADVERTISE_ALL
	.comm	_ADVERTISE_CSMA,4,2             ; @ADVERTISE_CSMA
	.comm	_ADVERTISE_PAUSE_CAP,4,2        ; @ADVERTISE_PAUSE_CAP
	.comm	_ADVERTISE_PAUSE_ASYM,4,2       ; @ADVERTISE_PAUSE_ASYM
	.comm	_MII_CTRL1000,4,2               ; @MII_CTRL1000
	.comm	_ADVERTISE_1000FULL,4,2         ; @ADVERTISE_1000FULL
	.comm	_PHY_INT_SRC,4,2                ; @PHY_INT_SRC
l_.str.2:                               ; @.str.2
	.asciz	"Error reading PHY_INT_SRC\n"

	.comm	_PHY_INT_MASK,4,2               ; @PHY_INT_MASK
	.comm	_PHY_INT_MASK_DEFAULT,4,2       ; @PHY_INT_MASK_DEFAULT
	.comm	_ifup,4,2                       ; @ifup
l_.str.3:                               ; @.str.3
	.asciz	"phy initialised successfully\n"

	.no_dead_strip	_smsc75xx_phy_initialize
.subsections_via_symbols
