	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function emac_sgmii_common_open
_emac_sgmii_common_open:                ## @emac_sgmii_common_open
	.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
	cmpq	$0, 8(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movl	$255, %esi
	callq	_emac_sgmii_irq_clear
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movq	_EMAC_SGMII_PHY_INTERRUPT_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r14), %rsi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_writel
	movq	8(%r14), %rdi
	movq	_emac_sgmii_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	xorl	%edx, %edx
	movq	%r14, %r8
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r15d
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_err
	movl	%r15d, %ebx
	jmp	LBB0_5
LBB0_1:
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EMAC_SGMII_PHY_INTERRUPT_MASK,8,3 ## @EMAC_SGMII_PHY_INTERRUPT_MASK
	.comm	_emac_sgmii_interrupt,4,2       ## @emac_sgmii_interrupt
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"emac-sgmii"

L_.str.1:                               ## @.str.1
	.asciz	"could not register handler for internal PHY\n"

	.no_dead_strip	_emac_sgmii_common_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function emac_sgmii_common_open
_emac_sgmii_common_open:                ; @emac_sgmii_common_open
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, x0
	mov	w1, #255
	bl	_emac_sgmii_irq_clear
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.2:
	ldr	x8, [x19, #16]
Lloh0:
	adrp	x9, _EMAC_SGMII_PHY_INTERRUPT_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EMAC_SGMII_PHY_INTERRUPT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x0, [x19, #8]
Lloh3:
	adrp	x8, _emac_sgmii_interrupt@GOTPAGE
Lloh4:
	ldr	x8, [x8, _emac_sgmii_interrupt@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	w2, #0
	mov	x4, x19
	bl	_request_irq
	mov	x20, x0
	cbz	w0, LBB0_5
; %bb.3:
	ldr	w0, [x19]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_err
	b	LBB0_5
LBB0_4:
	mov	w20, #0
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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EMAC_SGMII_PHY_INTERRUPT_MASK,8,3 ; @EMAC_SGMII_PHY_INTERRUPT_MASK
	.comm	_emac_sgmii_interrupt,4,2       ; @emac_sgmii_interrupt
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"emac-sgmii"

l_.str.1:                               ; @.str.1
	.asciz	"could not register handler for internal PHY\n"

	.no_dead_strip	_emac_sgmii_common_open
.subsections_via_symbols
