	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function emac_open
_emac_open:                             ## @emac_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
	callq	_netdev_priv
	movq	%rax, %rbx
	movl	4(%rax), %edi
	movq	%rax, %r15
	addq	$4, %r15
	movq	_emac_isr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	xorl	%edx, %edx
	movq	%r15, %r8
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_err
	jmp	LBB0_10
LBB0_2:
	movq	%rbx, %rdi
	callq	_emac_mac_rx_tx_rings_alloc_all
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_netdev_err
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	callq	_emac_sgmii_open
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_emac_mac_rx_tx_rings_free_all
LBB0_6:
	movl	4(%rbx), %edi
	movq	%r15, %rsi
	callq	_free_irq
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%rbx, %rdi
	callq	_emac_mac_up
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_emac_mac_rx_tx_rings_free_all
	movl	4(%rbx), %edi
	movq	%r15, %rsi
	callq	_free_irq
	movq	%rbx, %rdi
	callq	_emac_sgmii_close
	jmp	LBB0_10
LBB0_8:
	xorl	%r14d, %r14d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_emac_isr,4,2                   ## @emac_isr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"emac-core0"

L_.str.1:                               ## @.str.1
	.asciz	"could not request emac-core0 irq\n"

L_.str.2:                               ## @.str.2
	.asciz	"error allocating rx/tx rings\n"

	.no_dead_strip	_emac_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function emac_open
_emac_open:                             ; @emac_open
	.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
	bl	_netdev_priv
	mov	x20, x0
	mov	x21, x0
	ldr	w0, [x21, #4]!
Lloh0:
	adrp	x8, _emac_isr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _emac_isr@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	w2, #0
	mov	x4, x21
	bl	_request_irq
	cbz	w0, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	w0, [x20]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_err
	b	LBB0_7
LBB0_2:
	mov	x0, x20
	bl	_emac_mac_rx_tx_rings_alloc_all
	cbz	w0, LBB0_4
; %bb.3:
	mov	x19, x0
	ldr	w0, [x20]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_netdev_err
	b	LBB0_6
LBB0_4:
	mov	x0, x20
	bl	_emac_sgmii_open
	cbz	w0, LBB0_8
; %bb.5:
	mov	x19, x0
	mov	x0, x20
	bl	_emac_mac_rx_tx_rings_free_all
LBB0_6:
	ldr	w0, [x20, #4]
	mov	x1, x21
	bl	_free_irq
LBB0_7:
	mov	x0, x19
	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
LBB0_8:
	mov	x0, x20
	bl	_emac_mac_up
	mov	x19, x0
	cbz	w0, LBB0_7
; %bb.9:
	mov	x0, x20
	bl	_emac_mac_rx_tx_rings_free_all
	ldr	w0, [x20, #4]
	mov	x1, x21
	bl	_free_irq
	mov	x0, x20
	bl	_emac_sgmii_close
	b	LBB0_7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_emac_isr,4,2                   ; @emac_isr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"emac-core0"

l_.str.1:                               ; @.str.1
	.asciz	"could not request emac-core0 irq\n"

l_.str.2:                               ; @.str.2
	.asciz	"error allocating rx/tx rings\n"

	.no_dead_strip	_emac_open
.subsections_via_symbols
