	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function emac_sgmii_irq_clear
_emac_sgmii_irq_clear:                  ## @emac_sgmii_irq_clear
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_EMAC_SGMII_PHY_INTERRUPT_CLEAR@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	8(%rdi), %rsi
	movl	%r15d, %edi
	callq	_writel_relaxed
	movq	_IRQ_GLOBAL_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EMAC_SGMII_PHY_IRQ_CMD@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	addq	8(%rbx), %rsi
	callq	_writel_relaxed
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_wmb
	movq	_EMAC_SGMII_PHY_INTERRUPT_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	movq	_SGMII_PHY_IRQ_CLR_WAIT_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$1, %edx
	movl	$1, %ecx
	callq	_readl_poll_timeout_atomic
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %ecx
	callq	_net_err_ratelimited
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_3
LBB0_2:
	movq	(%r13), %rsi
	addq	8(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writel_relaxed
	movq	(%r12), %rsi
	addq	8(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writel_relaxed
	xorl	%eax, %eax
	callq	_wmb
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EMAC_SGMII_PHY_INTERRUPT_CLEAR,8,3 ## @EMAC_SGMII_PHY_INTERRUPT_CLEAR
	.comm	_IRQ_GLOBAL_CLEAR,4,2           ## @IRQ_GLOBAL_CLEAR
	.comm	_EMAC_SGMII_PHY_IRQ_CMD,8,3     ## @EMAC_SGMII_PHY_IRQ_CMD
	.comm	_EMAC_SGMII_PHY_INTERRUPT_STATUS,8,3 ## @EMAC_SGMII_PHY_INTERRUPT_STATUS
	.comm	_SGMII_PHY_IRQ_CLR_WAIT_TIME,4,2 ## @SGMII_PHY_IRQ_CLR_WAIT_TIME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: failed to clear SGMII irq: status:0x%x bits:0x%x\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function emac_sgmii_irq_clear
_emac_sgmii_irq_clear:                  ; @emac_sgmii_irq_clear
	.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, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x21, _EMAC_SGMII_PHY_INTERRUPT_CLEAR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _EMAC_SGMII_PHY_INTERRUPT_CLEAR@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x20
	bl	_writel_relaxed
Lloh2:
	adrp	x8, _IRQ_GLOBAL_CLEAR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IRQ_GLOBAL_CLEAR@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x22, _EMAC_SGMII_PHY_IRQ_CMD@GOTPAGE
Lloh6:
	ldr	x22, [x22, _EMAC_SGMII_PHY_IRQ_CMD@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel_relaxed
	bl	_wmb
Lloh7:
	adrp	x8, _EMAC_SGMII_PHY_INTERRUPT_STATUS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EMAC_SGMII_PHY_INTERRUPT_STATUS@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh9:
	ldr	x8, [x8]
	add	x0, x8, x9
Lloh10:
	adrp	x8, _SGMII_PHY_IRQ_CLR_WAIT_TIME@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SGMII_PHY_IRQ_CLR_WAIT_TIME@GOTPAGEOFF]
Lloh12:
	ldr	w4, [x8]
	mov	w2, #1
	mov	w3, #1
	bl	_readl_poll_timeout_atomic
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	ldr	w1, [x8]
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x3, x20
	bl	_net_err_ratelimited
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel_relaxed
	bl	_wmb
	mov	w0, #0
LBB0_3:
	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	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EMAC_SGMII_PHY_INTERRUPT_CLEAR,8,3 ; @EMAC_SGMII_PHY_INTERRUPT_CLEAR
	.comm	_IRQ_GLOBAL_CLEAR,4,2           ; @IRQ_GLOBAL_CLEAR
	.comm	_EMAC_SGMII_PHY_IRQ_CMD,8,3     ; @EMAC_SGMII_PHY_IRQ_CMD
	.comm	_EMAC_SGMII_PHY_INTERRUPT_STATUS,8,3 ; @EMAC_SGMII_PHY_INTERRUPT_STATUS
	.comm	_SGMII_PHY_IRQ_CLR_WAIT_TIME,4,2 ; @SGMII_PHY_IRQ_CLR_WAIT_TIME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: failed to clear SGMII irq: status:0x%x bits:0x%x\n"

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