	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spider_net_init_firmware
_spider_net_init_firmware:              ## @spider_net_init_firmware
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movq	$0, -32(%rbp)
	movq	_SPIDER_NET_FIRMWARE_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rdi), %rdx
	leaq	-32(%rbp), %rdi
	callq	_request_firmware
	testq	%rax, %rax
	jne	LBB0_7
## %bb.1:
	movq	-32(%rbp), %rax
	movl	(%rax), %ecx
	movq	_SPIDER_NET_FIRMWARE_LEN@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	callq	_netif_msg_probe
	testq	%rax, %rax
	je	LBB0_3
## %bb.6:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_7
LBB0_3:
	movq	-32(%rbp), %rax
LBB0_4:
	movq	8(%rax), %rsi
	movq	%rbx, %rdi
	callq	_spider_net_download_firmware
	movl	%eax, %r14d
	movq	-32(%rbp), %rdi
	callq	_release_firmware
	testl	%r14d, %r14d
	je	LBB0_5
LBB0_7:
	movq	8(%rbx), %rdi
	callq	_pci_device_to_OF_node
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	leaq	-36(%rbp), %rdx
	movq	%rax, %rdi
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movq	%rax, %r15
	movl	-36(%rbp), %eax
	movq	_SPIDER_NET_FIRMWARE_LEN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_12
## %bb.10:
	movq	%rbx, %rdi
	callq	_netif_msg_probe
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_15
LBB0_13:
	movq	%rbx, %rdi
	callq	_netif_msg_probe
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movq	(%rbx), %rdi
	leaq	L_.str.3(%rip), %rsi
LBB0_15:
	callq	_dev_err
	jmp	LBB0_16
LBB0_12:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_spider_net_download_firmware
	movl	%eax, %r14d
	jmp	LBB0_16
LBB0_5:
	xorl	%r14d, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_SPIDER_NET_FIRMWARE_NAME,4,2   ## @SPIDER_NET_FIRMWARE_NAME
	.comm	_SPIDER_NET_FIRMWARE_LEN,4,2    ## @SPIDER_NET_FIRMWARE_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Incorrect size of spidernet firmware in filesystem. Looking in host firmware...\n"

L_.str.1:                               ## @.str.1
	.asciz	"firmware"

L_.str.2:                               ## @.str.2
	.asciz	"Incorrect size of spidernet firmware in host firmware\n"

L_.str.3:                               ## @.str.3
	.asciz	"Couldn't find spidernet firmware in filesystem or host firmware\n"

	.no_dead_strip	_spider_net_init_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spider_net_init_firmware
_spider_net_init_firmware:              ; @spider_net_init_firmware
	.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
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _ENOENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
Lloh3:
	adrp	x8, _SPIDER_NET_FIRMWARE_NAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SPIDER_NET_FIRMWARE_NAME@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x2, [x0, #8]
	add	x0, sp, #8
	bl	_request_firmware
	cbnz	x0, LBB0_6
; %bb.1:
	ldr	x8, [sp, #8]
	ldr	w9, [x8]
Lloh6:
	adrp	x10, _SPIDER_NET_FIRMWARE_LEN@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SPIDER_NET_FIRMWARE_LEN@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w9, w10
	b.eq	LBB0_5
; %bb.2:
	mov	x0, x20
	bl	_netif_msg_probe
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x0, [x20]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_6
LBB0_4:
	ldr	x8, [sp, #8]
LBB0_5:
	ldr	x1, [x8, #8]
	mov	x0, x20
	bl	_spider_net_download_firmware
	mov	x19, x0
	ldr	x0, [sp, #8]
	bl	_release_firmware
	cbz	w19, LBB0_15
LBB0_6:
	ldr	x0, [x20, #8]
	bl	_pci_device_to_OF_node
	cbz	x0, LBB0_11
; %bb.7:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #4
	bl	_of_get_property
	cbz	x0, LBB0_11
; %bb.8:
	mov	x21, x0
	ldr	w8, [sp, #4]
Lloh13:
	adrp	x9, _SPIDER_NET_FIRMWARE_LEN@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SPIDER_NET_FIRMWARE_LEN@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_14
; %bb.9:
	mov	x0, x20
	bl	_netif_msg_probe
	cbz	x0, LBB0_14
; %bb.10:
	ldr	x0, [x20]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_11:
	mov	x0, x20
	bl	_netif_msg_probe
	cbz	x0, LBB0_15
; %bb.12:
	ldr	x0, [x20]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_13:
	bl	_dev_err
	b	LBB0_15
LBB0_14:
	mov	x0, x20
	mov	x1, x21
	bl	_spider_net_download_firmware
	mov	x19, x0
LBB0_15:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_SPIDER_NET_FIRMWARE_NAME,4,2   ; @SPIDER_NET_FIRMWARE_NAME
	.comm	_SPIDER_NET_FIRMWARE_LEN,4,2    ; @SPIDER_NET_FIRMWARE_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Incorrect size of spidernet firmware in filesystem. Looking in host firmware...\n"

l_.str.1:                               ; @.str.1
	.asciz	"firmware"

l_.str.2:                               ; @.str.2
	.asciz	"Incorrect size of spidernet firmware in host firmware\n"

l_.str.3:                               ; @.str.3
	.asciz	"Couldn't find spidernet firmware in filesystem or host firmware\n"

	.no_dead_strip	_spider_net_init_firmware
.subsections_via_symbols
