	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function greth_open
_greth_open:                            ## @greth_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
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_greth_init_rings
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_netif_msg_ifup
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_3:
	movl	16(%r15), %edi
	movq	_greth_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rcx
	xorl	%edx, %edx
	movq	%r14, %r8
	callq	_request_irq
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_netif_msg_ifup
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.4:
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	4(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_6:
	movq	%r15, %rdi
	callq	_greth_clean_rings
	jmp	LBB0_10
LBB0_7:
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
LBB0_9:
	movq	%r14, %rdi
	callq	_netif_start_queue
	movq	8(%r15), %rax
	movl	(%rax), %edi
	movl	$255, %esi
	callq	_GRETH_REGSAVE
	movq	%r15, %rdi
	callq	_napi_enable
	movq	%r15, %rdi
	callq	_greth_enable_irqs
	movq	%r15, %rdi
	callq	_greth_enable_tx
	movq	%r15, %rdi
	callq	_greth_enable_rx
	xorl	%ebx, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not allocate memory for DMA rings\n"

	.comm	_greth_interrupt,4,2            ## @greth_interrupt
L_.str.1:                               ## @.str.1
	.asciz	"eth"

L_.str.2:                               ## @.str.2
	.asciz	"Could not allocate interrupt %d\n"

L_.str.3:                               ## @.str.3
	.asciz	" starting queue\n"

	.no_dead_strip	_greth_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function greth_open
_greth_open:                            ; @greth_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	bl	_netdev_priv
	mov	x19, x0
	bl	_greth_init_rings
	cbz	w0, LBB0_3
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	bl	_netif_msg_ifup
	cbz	x0, LBB0_10
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_10
LBB0_3:
	ldr	w0, [x19, #16]
Lloh2:
	adrp	x8, _greth_interrupt@GOTPAGE
Lloh3:
	ldr	x8, [x8, _greth_interrupt@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x3, l_.str.1@PAGE
Lloh6:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	w2, #0
	mov	x4, x20
	bl	_request_irq
	mov	x21, x0
	mov	x0, x19
	bl	_netif_msg_ifup
	cbz	w21, LBB0_7
; %bb.4:
	cbz	x0, LBB0_6
; %bb.5:
	ldr	w8, [x20, #4]
	str	x8, [sp]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_6:
	mov	x0, x19
	bl	_greth_clean_rings
	b	LBB0_10
LBB0_7:
	cbz	x0, LBB0_9
; %bb.8:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
LBB0_9:
	mov	x0, x20
	bl	_netif_start_queue
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	mov	w1, #255
	bl	_GRETH_REGSAVE
	mov	x0, x19
	bl	_napi_enable
	mov	x0, x19
	bl	_greth_enable_irqs
	mov	x0, x19
	bl	_greth_enable_tx
	mov	x0, x19
	bl	_greth_enable_rx
	mov	w21, #0
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not allocate memory for DMA rings\n"

	.comm	_greth_interrupt,4,2            ; @greth_interrupt
l_.str.1:                               ; @.str.1
	.asciz	"eth"

l_.str.2:                               ; @.str.2
	.asciz	"Could not allocate interrupt %d\n"

l_.str.3:                               ; @.str.3
	.asciz	" starting queue\n"

	.no_dead_strip	_greth_open
.subsections_via_symbols
