	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smsc911x_soft_reset
_smsc911x_soft_reset:                   ## @smsc911x_soft_reset
	.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, %r14
	movq	_HW_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_HW_CFG_SRST_@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	callq	_smsc911x_phy_general_power_up
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %r12d
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
LBB0_2:
	movq	%r14, %rdi
	callq	_SMSC_WARN
LBB0_16:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	cmpl	$4, (%r14)
	jne	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	callq	_smsc911x_phy_disable_energy_detect
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r12d
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_2
LBB0_6:
	movzwl	6(%r14), %eax
	shll	$16, %eax
	movq	_LAN9250@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.7:
	movq	_RESET_CTL@GOTPCREL(%rip), %rax
	movq	_RESET_CTL_DIGITAL_RST_@GOTPCREL(%rip), %rcx
	movl	(%rax), %r15d
	movl	(%rcx), %r13d
LBB0_8:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	callq	_smsc911x_reg_write
	movl	$-9, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_udelay
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_smsc911x_reg_read
	andl	%r13d, %eax
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incl	%ebx
	testl	%eax, %eax
	jne	LBB0_9
LBB0_11:
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	callq	_SMSC_WARN
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_16
LBB0_13:
	xorl	%r12d, %r12d
	cmpl	$4, (%r14)
	jne	LBB0_16
## %bb.14:
	movq	%r14, %rdi
	callq	_smsc911x_phy_enable_energy_detect
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %ebx
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_SMSC_WARN
	movl	%ebx, %r12d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_HW_CFG,4,2                     ## @HW_CFG
	.comm	_HW_CFG_SRST_,4,2               ## @HW_CFG_SRST_
	.comm	_drv,4,2                        ## @drv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to power-up the PHY chip"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to wakeup the PHY chip"

	.comm	_LAN9250,4,2                    ## @LAN9250
	.comm	_RESET_CTL,4,2                  ## @RESET_CTL
	.comm	_RESET_CTL_DIGITAL_RST_,4,2     ## @RESET_CTL_DIGITAL_RST_
L_.str.2:                               ## @.str.2
	.asciz	"Failed to complete reset"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_smsc911x_soft_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smsc911x_soft_reset
_smsc911x_soft_reset:                   ; @smsc911x_soft_reset
	.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	x19, x0
Lloh0:
	adrp	x8, _HW_CFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HW_CFG@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _HW_CFG_SRST_@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HW_CFG_SRST_@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	bl	_smsc911x_phy_general_power_up
	cbz	w0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh6:
	adrp	x8, _drv@GOTPAGE
Lloh7:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
LBB0_2:
	mov	x0, x19
	bl	_SMSC_WARN
LBB0_3:
	mov	x0, x20
	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
LBB0_4:
	ldr	w8, [x19]
	cmp	w8, #4
	b.ne	LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_smsc911x_phy_disable_energy_detect
	cbz	w0, LBB0_7
; %bb.6:
	mov	x20, x0
	b	LBB0_14
LBB0_7:
	ldrh	w8, [x19, #6]
	lsl	w8, w8, #16
Lloh11:
	adrp	x9, _LAN9250@GOTPAGE
Lloh12:
	ldr	x9, [x9, _LAN9250@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _RESET_CTL@GOTPAGE
Lloh15:
	ldr	x10, [x10, _RESET_CTL@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
Lloh17:
	adrp	x11, _RESET_CTL_DIGITAL_RST_@GOTPAGE
Lloh18:
	ldr	x11, [x11, _RESET_CTL_DIGITAL_RST_@GOTPAGEOFF]
Lloh19:
	ldr	w11, [x11]
	cmp	w8, w9
	csel	w20, w10, w21, eq
	csel	w21, w11, w22, eq
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_smsc911x_reg_write
	mov	w22, #-9
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_udelay
	mov	x0, x19
	mov	x1, x20
	bl	_smsc911x_reg_read
	and	w0, w0, w21
	cbz	w22, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	w22, w22, #1
	cbnz	w0, LBB0_8
LBB0_10:
	bl	_unlikely
	cbz	x0, LBB0_12
; %bb.11:
Lloh20:
	adrp	x8, _drv@GOTPAGE
Lloh21:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x2, l_.str.2@PAGE
Lloh24:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_SMSC_WARN
Lloh25:
	adrp	x8, _EIO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_3
LBB0_12:
	ldr	w8, [x19]
	cmp	w8, #4
	b.ne	LBB0_15
; %bb.13:
	mov	x0, x19
	bl	_smsc911x_phy_enable_energy_detect
	mov	x20, x0
	cbz	w0, LBB0_3
LBB0_14:
Lloh28:
	adrp	x8, _drv@GOTPAGE
Lloh29:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x2, l_.str.1@PAGE
Lloh32:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_15:
	mov	w20, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_HW_CFG,4,2                     ; @HW_CFG
	.comm	_HW_CFG_SRST_,4,2               ; @HW_CFG_SRST_
	.comm	_drv,4,2                        ; @drv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to power-up the PHY chip"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to wakeup the PHY chip"

	.comm	_LAN9250,4,2                    ; @LAN9250
	.comm	_RESET_CTL,4,2                  ; @RESET_CTL
	.comm	_RESET_CTL_DIGITAL_RST_,4,2     ; @RESET_CTL_DIGITAL_RST_
l_.str.2:                               ; @.str.2
	.asciz	"Failed to complete reset"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_smsc911x_soft_reset
.subsections_via_symbols
