	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function enc28j60_net_open
_enc28j60_net_open:                     ## @enc28j60_net_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, %rbx
	movl	(%r14), %edi
	callq	_is_valid_ether_addr
	testl	%eax, %eax
	je	LBB0_1
## %bb.5:
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_enc28j60_lowpower
	movq	%rbx, %rdi
	callq	_enc28j60_hw_disable
	movq	%rbx, %rdi
	callq	_enc28j60_hw_init
	testl	%eax, %eax
	je	LBB0_6
## %bb.9:
	movq	%r14, %rdi
	callq	_enc28j60_set_hw_macaddr
	movq	%rbx, %rdi
	callq	_enc28j60_hw_enable
	movq	%r14, %rdi
	callq	_enc28j60_check_link_status
	movq	%r14, %rdi
	callq	_netif_start_queue
	jmp	LBB0_10
LBB0_1:
	movq	%rbx, %rdi
	callq	_netif_msg_ifup
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
LBB0_3:
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_6:
	movq	%rbx, %rdi
	callq	_netif_msg_ifup
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %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	"invalid MAC address %pM\n"

	.comm	_EADDRNOTAVAIL,4,2              ## @EADDRNOTAVAIL
L_.str.1:                               ## @.str.1
	.asciz	"hw_reset() failed\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_enc28j60_net_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function enc28j60_net_open
_enc28j60_net_open:                     ; @enc28j60_net_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	w0, [x19]
	bl	_is_valid_ether_addr
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x20
	mov	w1, #0
	bl	_enc28j60_lowpower
	mov	x0, x20
	bl	_enc28j60_hw_disable
	mov	x0, x20
	bl	_enc28j60_hw_init
	cbz	w0, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_enc28j60_set_hw_macaddr
	mov	x0, x20
	bl	_enc28j60_hw_enable
	mov	x0, x19
	bl	_enc28j60_check_link_status
	mov	x0, x19
	bl	_netif_start_queue
	mov	w0, #0
	b	LBB0_10
LBB0_3:
	mov	x0, x20
	bl	_netif_msg_ifup
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
LBB0_5:
Lloh2:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	mov	x0, x20
	bl	_netif_msg_ifup
	cbz	x0, LBB0_8
; %bb.7:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
LBB0_8:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid MAC address %pM\n"

	.comm	_EADDRNOTAVAIL,4,2              ; @EADDRNOTAVAIL
l_.str.1:                               ; @.str.1
	.asciz	"hw_reset() failed\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_enc28j60_net_open
.subsections_via_symbols
