	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qt202x_reset_phy
_qt202x_reset_phy:                      ## @qt202x_reset_phy
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_PHY_TYPE_QT2025C@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	%r14, %rdi
	callq	_qt2025c_wait_reset
	testl	%eax, %eax
	js	LBB0_5
LBB0_3:
	movl	$250, %edi
	callq	_msleep
	movq	%r14, %rdi
	callq	_falcon_board
	movq	(%rax), %rax
	movq	%r14, %rdi
	callq	*(%rax)
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_4:
	movq	_MDIO_MMD_PHYXS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_QT2022C2_MAX_RESET_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_QT2022C2_RESET_WAIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cltd
	idivl	%ecx
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_ef4_mdio_reset_mmd
	testl	%eax, %eax
	jns	LBB0_3
LBB0_5:
	movl	%eax, %ebx
	movq	_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_err
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_TYPE_QT2025C,8,3           ## @PHY_TYPE_QT2025C
	.comm	_MDIO_MMD_PHYXS,4,2             ## @MDIO_MMD_PHYXS
	.comm	_QT2022C2_MAX_RESET_TIME,4,2    ## @QT2022C2_MAX_RESET_TIME
	.comm	_QT2022C2_RESET_WAIT,4,2        ## @QT2022C2_RESET_WAIT
	.comm	_hw,4,2                         ## @hw
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PHY reset timed out\n"

	.no_dead_strip	_qt202x_reset_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qt202x_reset_phy
_qt202x_reset_phy:                      ; @qt202x_reset_phy
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PHY_TYPE_QT2025C@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PHY_TYPE_QT2025C@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_qt2025c_wait_reset
	tbnz	w0, #31, LBB0_4
LBB0_2:
	mov	w0, #250
	bl	_msleep
	mov	x0, x19
	bl	_falcon_board
	ldr	x8, [x0]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	mov	w20, #0
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _MDIO_MMD_PHYXS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MDIO_MMD_PHYXS@GOTPAGEOFF]
Lloh5:
	adrp	x9, _QT2022C2_MAX_RESET_TIME@GOTPAGE
Lloh6:
	ldr	x9, [x9, _QT2022C2_MAX_RESET_TIME@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	ldr	w8, [x9]
Lloh9:
	adrp	x9, _QT2022C2_RESET_WAIT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _QT2022C2_RESET_WAIT@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x9]
	sdiv	w2, w8, w3
	mov	x0, x19
	bl	_ef4_mdio_reset_mmd
	tbz	w0, #31, LBB0_2
LBB0_4:
	mov	x20, x0
Lloh12:
	adrp	x8, _hw@GOTPAGE
Lloh13:
	ldr	x8, [x8, _hw@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
Lloh15:
	adrp	x3, l_.str@PAGE
Lloh16:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_err
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_TYPE_QT2025C,8,3           ; @PHY_TYPE_QT2025C
	.comm	_MDIO_MMD_PHYXS,4,2             ; @MDIO_MMD_PHYXS
	.comm	_QT2022C2_MAX_RESET_TIME,4,2    ; @QT2022C2_MAX_RESET_TIME
	.comm	_QT2022C2_RESET_WAIT,4,2        ; @QT2022C2_RESET_WAIT
	.comm	_hw,4,2                         ; @hw
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PHY reset timed out\n"

	.no_dead_strip	_qt202x_reset_phy
.subsections_via_symbols
