	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spider_net_setup_netdev
_spider_net_setup_netdev:               ## @spider_net_setup_netdev
	.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
	movq	(%rdi), %rbx
	movq	8(%rdi), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_SET_NETDEV_DEV
	movq	8(%r14), %rdi
	movq	%rbx, %rsi
	callq	_pci_set_drvdata
	leaq	48(%r14), %rdi
	movq	_spider_net_cleanup_tx_ring@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_timer_setup
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	$0, 40(%r14)
	leaq	36(%r14), %rdi
	movq	_spider_net_link_phy@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_timer_setup
	leaq	32(%r14), %rsi
	movq	_spider_net_poll@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SPIDER_NET_NAPI_WEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_netif_napi_add
	movq	%rbx, %rdi
	callq	_spider_net_setup_netdev_ops
	movq	_NETIF_F_RXCSUM@GOTPCREL(%rip), %rdx
	movq	_NETIF_F_IP_CSUM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	orl	(%rdx), %ecx
	movl	%ecx, (%rbx)
	movq	_SPIDER_NET_RX_CSUM_DEFAULT@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_1
## %bb.2:
	movl	4(%rbx), %ecx
	orl	(%rdx), %ecx
	jmp	LBB0_3
LBB0_1:
	movl	4(%rbx), %ecx
LBB0_3:
	movq	_NETIF_F_LLTX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rax), %edx
	orl	%ecx, %edx
	movl	%edx, 4(%rbx)
	movq	_SPIDER_NET_MIN_MTU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_SPIDER_NET_MAX_MTU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	8(%r14), %rdi
	movl	(%rdi), %eax
	movl	%eax, 16(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r14)
	callq	_pci_device_to_OF_node
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	_ETH_ALEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rsi
	callq	_memcpy
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_spider_net_set_mac
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_netif_msg_probe
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	(%r14), %rdi
	addq	$12, %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
LBB0_10:
	movq	%rbx, %rdi
	callq	_register_netdev
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_netif_msg_probe
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.11:
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:
	movq	(%r14), %rdi
	addq	$12, %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
	jmp	LBB0_15
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_15
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_15
LBB0_13:
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movl	8(%rbx), %esi
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_info
LBB0_15:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_spider_net_cleanup_tx_ring,4,2 ## @spider_net_cleanup_tx_ring
	.comm	_spider_net_link_phy,4,2        ## @spider_net_link_phy
	.comm	_spider_net_poll,4,2            ## @spider_net_poll
	.comm	_SPIDER_NET_NAPI_WEIGHT,4,2     ## @SPIDER_NET_NAPI_WEIGHT
	.comm	_NETIF_F_RXCSUM,4,2             ## @NETIF_F_RXCSUM
	.comm	_NETIF_F_IP_CSUM,4,2            ## @NETIF_F_IP_CSUM
	.comm	_SPIDER_NET_RX_CSUM_DEFAULT,8,3 ## @SPIDER_NET_RX_CSUM_DEFAULT
	.comm	_NETIF_F_LLTX,4,2               ## @NETIF_F_LLTX
	.comm	_SPIDER_NET_MIN_MTU,4,2         ## @SPIDER_NET_MIN_MTU
	.comm	_SPIDER_NET_MAX_MTU,4,2         ## @SPIDER_NET_MAX_MTU
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"local-mac-address"

	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
L_.str.1:                               ## @.str.1
	.asciz	"Failed to set MAC address: %i\n"

L_.str.2:                               ## @.str.2
	.asciz	"Couldn't register net_device: %i\n"

L_.str.3:                               ## @.str.3
	.asciz	"Initialized device %s.\n"

	.no_dead_strip	_spider_net_setup_netdev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spider_net_setup_netdev
_spider_net_setup_netdev:               ; @spider_net_setup_netdev
	.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	x19, x0
	ldp	x20, x8, [x0]
	add	x1, x8, #4
	mov	x0, x20
	bl	_SET_NETDEV_DEV
	ldr	x0, [x19, #8]
	mov	x1, x20
	bl	_pci_set_drvdata
	add	x0, x19, #48
Lloh0:
	adrp	x8, _spider_net_cleanup_tx_ring@GOTPAGE
Lloh1:
	ldr	x8, [x8, _spider_net_cleanup_tx_ring@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	str	w8, [x20, #16]
	str	xzr, [x19, #40]
	add	x0, x19, #36
Lloh3:
	adrp	x8, _spider_net_link_phy@GOTPAGE
Lloh4:
	ldr	x8, [x8, _spider_net_link_phy@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
	add	x1, x19, #32
Lloh6:
	adrp	x8, _spider_net_poll@GOTPAGE
Lloh7:
	ldr	x8, [x8, _spider_net_poll@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _SPIDER_NET_NAPI_WEIGHT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SPIDER_NET_NAPI_WEIGHT@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_netif_napi_add
	mov	x0, x20
	bl	_spider_net_setup_netdev_ops
Lloh12:
	adrp	x9, _NETIF_F_RXCSUM@GOTPAGE
Lloh13:
	ldr	x9, [x9, _NETIF_F_RXCSUM@GOTPAGEOFF]
	ldr	w10, [x9]
Lloh14:
	adrp	x8, _NETIF_F_IP_CSUM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NETIF_F_IP_CSUM@GOTPAGEOFF]
	ldr	w11, [x8]
	orr	w10, w11, w10
	str	w10, [x20]
Lloh16:
	adrp	x10, _SPIDER_NET_RX_CSUM_DEFAULT@GOTPAGE
Lloh17:
	ldr	x10, [x10, _SPIDER_NET_RX_CSUM_DEFAULT@GOTPAGEOFF]
Lloh18:
	ldr	x10, [x10]
	cbz	x10, LBB0_2
; %bb.1:
	ldr	w9, [x9]
	ldr	w10, [x20, #4]
	orr	w9, w10, w9
	b	LBB0_3
LBB0_2:
	ldr	w9, [x20, #4]
LBB0_3:
Lloh19:
	adrp	x10, _NETIF_F_LLTX@GOTPAGE
Lloh20:
	ldr	x10, [x10, _NETIF_F_LLTX@GOTPAGEOFF]
	ldr	w8, [x8]
Lloh21:
	ldr	w10, [x10]
	orr	w8, w10, w8
	orr	w8, w8, w9
Lloh22:
	adrp	x9, _SPIDER_NET_MIN_MTU@GOTPAGE
Lloh23:
	ldr	x9, [x9, _SPIDER_NET_MIN_MTU@GOTPAGEOFF]
	str	w8, [x20, #4]
Lloh24:
	ldr	w8, [x9]
	str	w8, [x20, #24]
Lloh25:
	adrp	x8, _SPIDER_NET_MAX_MTU@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SPIDER_NET_MAX_MTU@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	ldr	x0, [x19, #8]
	ldr	w9, [x0]
	stp	w9, w8, [x20, #16]
	stp	xzr, xzr, [x19, #16]
	bl	_pci_device_to_OF_node
	cbz	x0, LBB0_11
; %bb.4:
Lloh28:
	adrp	x1, l_.str@PAGE
Lloh29:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_11
; %bb.5:
Lloh30:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	mov	x1, x0
	bl	_memcpy
	add	x1, sp, #8
	mov	x0, x20
	bl	_spider_net_set_mac
	cbz	w0, LBB0_8
; %bb.6:
	mov	x21, x0
	mov	x0, x19
	bl	_netif_msg_probe
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x8, [x19]
	add	x0, x8, #12
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_dev_err
LBB0_8:
	mov	x0, x20
	bl	_register_netdev
	mov	x21, x0
	mov	x0, x19
	bl	_netif_msg_probe
	cbz	w21, LBB0_13
; %bb.9:
	cbz	x0, LBB0_12
; %bb.10:
	ldr	x8, [x19]
	add	x0, x8, #12
Lloh35:
	adrp	x1, l_.str.2@PAGE
Lloh36:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	b	LBB0_12
LBB0_11:
Lloh37:
	adrp	x8, _EIO@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_12:
	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
LBB0_13:
	cbz	x0, LBB0_15
; %bb.14:
	ldr	w1, [x20, #8]
Lloh40:
	adrp	x0, l_.str.3@PAGE
Lloh41:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_info
LBB0_15:
	mov	w21, #0
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_spider_net_cleanup_tx_ring,4,2 ; @spider_net_cleanup_tx_ring
	.comm	_spider_net_link_phy,4,2        ; @spider_net_link_phy
	.comm	_spider_net_poll,4,2            ; @spider_net_poll
	.comm	_SPIDER_NET_NAPI_WEIGHT,4,2     ; @SPIDER_NET_NAPI_WEIGHT
	.comm	_NETIF_F_RXCSUM,4,2             ; @NETIF_F_RXCSUM
	.comm	_NETIF_F_IP_CSUM,4,2            ; @NETIF_F_IP_CSUM
	.comm	_SPIDER_NET_RX_CSUM_DEFAULT,8,3 ; @SPIDER_NET_RX_CSUM_DEFAULT
	.comm	_NETIF_F_LLTX,4,2               ; @NETIF_F_LLTX
	.comm	_SPIDER_NET_MIN_MTU,4,2         ; @SPIDER_NET_MIN_MTU
	.comm	_SPIDER_NET_MAX_MTU,4,2         ; @SPIDER_NET_MAX_MTU
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"local-mac-address"

	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
l_.str.1:                               ; @.str.1
	.asciz	"Failed to set MAC address: %i\n"

l_.str.2:                               ; @.str.2
	.asciz	"Couldn't register net_device: %i\n"

l_.str.3:                               ; @.str.3
	.asciz	"Initialized device %s.\n"

	.no_dead_strip	_spider_net_setup_netdev
.subsections_via_symbols
