	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smsc911x_mii_init
_smsc911x_mii_init:                     ## @smsc911x_mii_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	%rax, %r15
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_mdiobus_alloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_SMSC_MDIONAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 36(%rax)
	movl	32(%rax), %edi
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rcx
	movl	8(%rbx), %r8d
	leaq	L_.str(%rip), %rdx
	callq	_snprintf
	movq	8(%r15), %rax
	movq	%r15, 24(%rax)
	movq	_smsc911x_mii_read@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 20(%rax)
	movq	_smsc911x_mii_write@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rax)
	addq	$12, %rbx
	movq	%rbx, 8(%rax)
	movzwl	2(%r15), %eax
	shll	$16, %eax
	cmpl	$291110911, %eax                ## imm = 0x1159FFFF
	jg	LBB0_7
## %bb.3:
	cmpl	$18153472, %eax                 ## imm = 0x1150000
	je	LBB0_5
## %bb.4:
	cmpl	$18284544, %eax                 ## imm = 0x1170000
	je	LBB0_5
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_14
LBB0_7:
	cmpl	$291110912, %eax                ## imm = 0x115A0000
	je	LBB0_5
## %bb.8:
	cmpl	$293208064, %eax                ## imm = 0x117A0000
	jne	LBB0_9
LBB0_5:
	movq	%r15, %rdi
	callq	_smsc911x_phy_initialise_external
	cmpq	$0, 16(%r15)
	je	LBB0_10
## %bb.6:
	movq	8(%r15), %rdi
	jmp	LBB0_11
LBB0_9:
	movq	_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	callq	_SMSC_TRACE
	movq	$0, 16(%r15)
LBB0_10:
	movq	8(%r15), %rdi
	movl	$-3, (%rdi)
LBB0_11:
	callq	_mdiobus_register
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	_probe@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	callq	_SMSC_WARN
	movq	8(%r15), %rdi
	callq	_mdiobus_free
LBB0_14:
	negl	%r14d
	jmp	LBB0_15
LBB0_12:
	xorl	%r14d, %r14d
LBB0_15:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SMSC_MDIONAME,4,2              ## @SMSC_MDIONAME
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s-%x"

	.comm	_smsc911x_mii_read,4,2          ## @smsc911x_mii_read
	.comm	_smsc911x_mii_write,4,2         ## @smsc911x_mii_write
	.comm	_hw,4,2                         ## @hw
L_.str.1:                               ## @.str.1
	.asciz	"External PHY is not supported, using internal PHY"

	.comm	_probe,4,2                      ## @probe
L_.str.2:                               ## @.str.2
	.asciz	"Error registering mii bus"

	.no_dead_strip	_smsc911x_mii_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smsc911x_mii_init
_smsc911x_mii_init:                     ; @smsc911x_mii_init
	.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	x20, x0
	mov	x0, x1
	bl	_netdev_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _ENXIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bl	_mdiobus_alloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _SMSC_MDIONAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMSC_MDIONAME@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0, #36]
	ldr	w0, [x0, #32]
Lloh6:
	adrp	x8, _MII_BUS_ID_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MII_BUS_ID_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	x3, [x20]
	ldr	w4, [x20, #8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	bl	_snprintf
	ldr	x8, [x19, #8]
	str	x19, [x8, #24]
Lloh11:
	adrp	x9, _smsc911x_mii_read@GOTPAGE
Lloh12:
	ldr	x9, [x9, _smsc911x_mii_read@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _smsc911x_mii_write@GOTPAGE
Lloh15:
	ldr	x10, [x10, _smsc911x_mii_write@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	stp	w10, w9, [x8, #16]
	add	x9, x20, #12
	str	x9, [x8, #8]
	ldrh	w8, [x19, #2]
	lsl	w8, w8, #16
	mov	w9, #291110911
	cmp	w8, w9
	b.gt	LBB0_5
; %bb.2:
	mov	w9, #18153472
	cmp	w8, w9
	b.eq	LBB0_7
; %bb.3:
	mov	w9, #18284544
	cmp	w8, w9
	b.eq	LBB0_7
	b	LBB0_9
LBB0_4:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w21, [x8]
	b	LBB0_12
LBB0_5:
	mov	w9, #291110912
	cmp	w8, w9
	b.eq	LBB0_7
; %bb.6:
	mov	w9, #293208064
	cmp	w8, w9
	b.ne	LBB0_9
LBB0_7:
	mov	x0, x19
	bl	_smsc911x_phy_initialise_external
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_10
; %bb.8:
	ldr	x0, [x19, #8]
	bl	_mdiobus_register
	cbnz	x0, LBB0_11
	b	LBB0_13
LBB0_9:
Lloh20:
	adrp	x8, _hw@GOTPAGE
Lloh21:
	ldr	x8, [x8, _hw@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x2, l_.str.1@PAGE
Lloh24:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_SMSC_TRACE
	str	xzr, [x19, #16]
LBB0_10:
	ldr	x0, [x19, #8]
	mov	w8, #-3
	str	w8, [x0]
	bl	_mdiobus_register
	cbz	x0, LBB0_13
LBB0_11:
Lloh25:
	adrp	x8, _probe@GOTPAGE
Lloh26:
	ldr	x8, [x8, _probe@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x2, l_.str.2@PAGE
Lloh29:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_SMSC_WARN
	ldr	x0, [x19, #8]
	bl	_mdiobus_free
LBB0_12:
	neg	w0, w21
LBB0_13:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SMSC_MDIONAME,4,2              ; @SMSC_MDIONAME
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s-%x"

	.comm	_smsc911x_mii_read,4,2          ; @smsc911x_mii_read
	.comm	_smsc911x_mii_write,4,2         ; @smsc911x_mii_write
	.comm	_hw,4,2                         ; @hw
l_.str.1:                               ; @.str.1
	.asciz	"External PHY is not supported, using internal PHY"

	.comm	_probe,4,2                      ; @probe
l_.str.2:                               ; @.str.2
	.asciz	"Error registering mii bus"

	.no_dead_strip	_smsc911x_mii_init
.subsections_via_symbols
