	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smsc911x_phy_initialise_external
_smsc911x_phy_initialise_external:      ## @smsc911x_phy_initialise_external
	.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	_HW_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_smsc911x_reg_read
	movl	4(%rbx), %ecx
	movq	_SMSC911X_FORCE_INTERNAL_PHY@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_2
## %bb.1:
	movq	_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
LBB0_8:
	movq	%rbx, %rdi
	callq	_SMSC_TRACE
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_2:
	movq	_SMSC911X_FORCE_EXTERNAL_PHY@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_4
## %bb.3:
	movq	_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_6
LBB0_4:
	movq	_HW_CFG_EXT_PHY_DET_@GOTPCREL(%rip), %rcx
	movq	_hw@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.5:
	leaq	L_.str.2(%rip), %rdx
LBB0_6:
	movq	%rbx, %rdi
	callq	_SMSC_TRACE
	movq	%rbx, %rdi
	callq	_smsc911x_phy_enable_external
	movl	$1, %eax
LBB0_9:
	movl	%eax, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_HW_CFG,4,2                     ## @HW_CFG
	.comm	_SMSC911X_FORCE_INTERNAL_PHY,4,2 ## @SMSC911X_FORCE_INTERNAL_PHY
	.comm	_hw,4,2                         ## @hw
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Forcing internal PHY"

	.comm	_SMSC911X_FORCE_EXTERNAL_PHY,4,2 ## @SMSC911X_FORCE_EXTERNAL_PHY
L_.str.1:                               ## @.str.1
	.asciz	"Forcing external PHY"

	.comm	_HW_CFG_EXT_PHY_DET_,4,2        ## @HW_CFG_EXT_PHY_DET_
L_.str.2:                               ## @.str.2
	.asciz	"HW_CFG EXT_PHY_DET set, using external PHY"

L_.str.3:                               ## @.str.3
	.asciz	"HW_CFG EXT_PHY_DET clear, using internal PHY"

	.no_dead_strip	_smsc911x_phy_initialise_external
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smsc911x_phy_initialise_external
_smsc911x_phy_initialise_external:      ; @smsc911x_phy_initialise_external
	.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
Lloh0:
	adrp	x8, _HW_CFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HW_CFG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_smsc911x_reg_read
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x9, _SMSC911X_FORCE_INTERNAL_PHY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SMSC911X_FORCE_INTERNAL_PHY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _hw@GOTPAGE
Lloh7:
	ldr	x8, [x8, _hw@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_TRACE
	mov	w8, #0
	b	LBB0_8
LBB0_3:
Lloh11:
	adrp	x9, _SMSC911X_FORCE_EXTERNAL_PHY@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SMSC911X_FORCE_EXTERNAL_PHY@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
Lloh14:
	adrp	x8, _hw@GOTPAGE
Lloh15:
	ldr	x8, [x8, _hw@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:
Lloh19:
	adrp	x8, _HW_CFG_EXT_PHY_DET_@GOTPAGE
Lloh20:
	ldr	x8, [x8, _HW_CFG_EXT_PHY_DET_@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _hw@GOTPAGE
Lloh23:
	ldr	x9, [x9, _hw@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x9]
	tst	w8, w0
	b.eq	LBB0_9
; %bb.6:
Lloh25:
	adrp	x2, l_.str.2@PAGE
Lloh26:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_SMSC_TRACE
	mov	x0, x19
	bl	_smsc911x_phy_enable_external
	mov	w8, #1
LBB0_8:
	str	w8, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh27:
	adrp	x2, l_.str.3@PAGE
Lloh28:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_HW_CFG,4,2                     ; @HW_CFG
	.comm	_SMSC911X_FORCE_INTERNAL_PHY,4,2 ; @SMSC911X_FORCE_INTERNAL_PHY
	.comm	_hw,4,2                         ; @hw
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Forcing internal PHY"

	.comm	_SMSC911X_FORCE_EXTERNAL_PHY,4,2 ; @SMSC911X_FORCE_EXTERNAL_PHY
l_.str.1:                               ; @.str.1
	.asciz	"Forcing external PHY"

	.comm	_HW_CFG_EXT_PHY_DET_,4,2        ; @HW_CFG_EXT_PHY_DET_
l_.str.2:                               ; @.str.2
	.asciz	"HW_CFG EXT_PHY_DET set, using external PHY"

l_.str.3:                               ; @.str.3
	.asciz	"HW_CFG EXT_PHY_DET clear, using internal PHY"

	.no_dead_strip	_smsc911x_phy_initialise_external
.subsections_via_symbols
