	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spider_net_download_firmware
_spider_net_download_firmware:          ## @spider_net_download_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_SPIDER_NET_GSINIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_SPIDER_NET_STOP_SEQ_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_spider_net_write_reg
	movq	_SPIDER_NET_FIRMWARE_SEQS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_7
## %bb.1:
	xorl	%r15d, %r15d
	movq	_SPIDER_NET_FIRMWARE_SEQWORDS@GOTPCREL(%rip), %rdx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	incq	%r15
	movq	_SPIDER_NET_FIRMWARE_SEQS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r15
	jge	LBB0_7
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	leaq	(,%r15,8), %r13
	movq	_SPIDER_NET_GSnPRGADR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r13, %rsi
	movq	%r14, %rdi
	movq	%rdx, %r12
	xorl	%edx, %edx
	callq	_spider_net_write_reg
	cmpl	$0, (%r12)
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r15d, %r15d
	movq	_SPIDER_NET_GSnPRGDAT@GOTPCREL(%rip), %rax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rax), %rsi
	addq	%r13, %rsi
	movl	(%rbx), %edx
	movq	%r14, %rdi
	callq	_spider_net_write_reg
	movq	%r12, %rdx
	movq	_SPIDER_NET_GSnPRGDAT@GOTPCREL(%rip), %rax
	addq	$4, %rbx
	incl	%r15d
	cmpl	(%r12), %r15d
	jl	LBB0_5
	jmp	LBB0_6
LBB0_7:
	movq	_SPIDER_NET_GSINIT@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_spider_net_read_reg
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_9:
	movq	(%rbx), %rsi
	movq	_SPIDER_NET_RUN_SEQ_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_spider_net_write_reg
	xorl	%eax, %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPIDER_NET_GSINIT,8,3          ## @SPIDER_NET_GSINIT
	.comm	_SPIDER_NET_STOP_SEQ_VALUE,4,2  ## @SPIDER_NET_STOP_SEQ_VALUE
	.comm	_SPIDER_NET_FIRMWARE_SEQS,4,2   ## @SPIDER_NET_FIRMWARE_SEQS
	.comm	_SPIDER_NET_GSnPRGADR,8,3       ## @SPIDER_NET_GSnPRGADR
	.comm	_SPIDER_NET_FIRMWARE_SEQWORDS,4,2 ## @SPIDER_NET_FIRMWARE_SEQWORDS
	.comm	_SPIDER_NET_GSnPRGDAT,8,3       ## @SPIDER_NET_GSnPRGDAT
	.comm	_EIO,4,2                        ## @EIO
	.comm	_SPIDER_NET_RUN_SEQ_VALUE,4,2   ## @SPIDER_NET_RUN_SEQ_VALUE
	.no_dead_strip	_spider_net_download_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_download_firmware
_spider_net_download_firmware:          ; @spider_net_download_firmware
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _SPIDER_NET_GSINIT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SPIDER_NET_GSINIT@GOTPAGEOFF]
	ldr	x1, [x21]
Lloh2:
	adrp	x8, _SPIDER_NET_STOP_SEQ_VALUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SPIDER_NET_STOP_SEQ_VALUE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_spider_net_write_reg
Lloh5:
	adrp	x22, _SPIDER_NET_FIRMWARE_SEQS@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SPIDER_NET_FIRMWARE_SEQS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x23, #0
Lloh7:
	adrp	x24, _SPIDER_NET_GSnPRGADR@GOTPAGE
Lloh8:
	ldr	x24, [x24, _SPIDER_NET_GSnPRGADR@GOTPAGEOFF]
Lloh9:
	adrp	x25, _SPIDER_NET_FIRMWARE_SEQWORDS@GOTPAGE
Lloh10:
	ldr	x25, [x25, _SPIDER_NET_FIRMWARE_SEQWORDS@GOTPAGEOFF]
Lloh11:
	adrp	x26, _SPIDER_NET_GSnPRGDAT@GOTPAGE
Lloh12:
	ldr	x26, [x26, _SPIDER_NET_GSnPRGDAT@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	x8, [x24]
	lsl	x27, x23, #3
	add	x1, x8, x27
	mov	x0, x19
	mov	w2, #0
	bl	_spider_net_write_reg
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w28, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x26]
	add	x1, x8, x27
	ldr	w2, [x20], #4
	mov	x0, x19
	bl	_spider_net_write_reg
	add	w28, w28, #1
	ldr	w8, [x25]
	cmp	w28, w8
	b.lt	LBB0_5
	b	LBB0_2
LBB0_6:
	ldr	x1, [x21]
	mov	x0, x19
	bl	_spider_net_read_reg
	cbz	x0, LBB0_8
; %bb.7:
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_8:
	ldr	x1, [x21]
Lloh16:
	adrp	x8, _SPIDER_NET_RUN_SEQ_VALUE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SPIDER_NET_RUN_SEQ_VALUE@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_spider_net_write_reg
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SPIDER_NET_GSINIT,8,3          ; @SPIDER_NET_GSINIT
	.comm	_SPIDER_NET_STOP_SEQ_VALUE,4,2  ; @SPIDER_NET_STOP_SEQ_VALUE
	.comm	_SPIDER_NET_FIRMWARE_SEQS,4,2   ; @SPIDER_NET_FIRMWARE_SEQS
	.comm	_SPIDER_NET_GSnPRGADR,8,3       ; @SPIDER_NET_GSnPRGADR
	.comm	_SPIDER_NET_FIRMWARE_SEQWORDS,4,2 ; @SPIDER_NET_FIRMWARE_SEQWORDS
	.comm	_SPIDER_NET_GSnPRGDAT,8,3       ; @SPIDER_NET_GSnPRGDAT
	.comm	_EIO,4,2                        ; @EIO
	.comm	_SPIDER_NET_RUN_SEQ_VALUE,4,2   ; @SPIDER_NET_RUN_SEQ_VALUE
	.no_dead_strip	_spider_net_download_firmware
.subsections_via_symbols
