	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flashio
_flashio:                               ## @flashio
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rbx
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_DDB_LINK_TAG
	movq	%rax, %r12
	shlq	$2, %r14
	addq	(%r15), %r14
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpq	$5, %rbx
	jb	LBB0_2
## %bb.1:
	movq	_SPI_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	orq	%r12, %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	callq	_ddbwritel
LBB0_2:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r12d
	shll	$11, %r12d
	leaq	(,%rbx,8), %rax
	movl	$32, %r14d
	subq	%rax, %r14
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$5, %rbx
	jb	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r13), %rdi
	callq	_swab32
	addq	$32, %r13
	addq	$-4, %rbx
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	_SPI_DATA@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	orq	%rbx, %rdx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_ddbwritel
	movq	_SPI_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	orq	%rbx, %rsi
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_reg_wait
	addl	$-8192, %r12d                   ## imm = 0xE000
	addq	$32, %r14
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movl	$-1, %r14d
	jmp	LBB0_32
LBB0_6:
	xorl	%eax, %eax
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	sete	%al
	andl	$6144, %r12d                    ## imm = 0x1800
	leal	(%r12,%rax,2), %esi
	incl	%esi
	movq	_SPI_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	orq	-56(%rbp), %rdx                 ## 8-byte Folded Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ddbwritel
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.8:
	leaq	-1(%rbx), %rcx
	movl	%ebx, %eax
	andl	$3, %eax
	cmpq	$3, %rcx
	jae	LBB0_10
## %bb.9:
	xorl	%esi, %esi
	jmp	LBB0_12
LBB0_7:
	xorl	%esi, %esi
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_10:
	andq	$-4, %rbx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	shlq	$16, %rsi
	movq	(%r13), %rcx
	shlq	$8, %rcx
	orq	%rsi, %rcx
	orq	8(%r13), %rcx
	movq	16(%r13), %rsi
	shlq	$16, %rcx
	shlq	$8, %rsi
	orq	%rcx, %rsi
	orq	24(%r13), %rsi
	addq	$32, %r13
	addq	$-4, %rbx
	jne	LBB0_11
LBB0_12:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	shlq	$8, %rsi
	orq	(%r13,%rcx,8), %rsi
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_14
LBB0_15:
	movl	%r14d, %ecx
	shlq	%cl, %rsi
	movq	_SPI_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	orq	%rbx, %rdx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_ddbwritel
	movq	_SPI_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	orq	%rbx, %rsi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_reg_wait
	movl	$-1, %r14d
	testq	%rax, %rax
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_16
LBB0_32:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	%r12, %r13
	testq	%r12, %r12
	je	LBB0_17
## %bb.18:
	cmpq	$5, %r13
	jb	LBB0_19
## %bb.20:
	movq	_SPI_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	orq	-56(%rbp), %rdx                 ## 8-byte Folded Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	callq	_ddbwritel
	movq	_SPI_DATA@GOTPCREL(%rip), %r12
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	orq	%r14, %rdx
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_ddbwritel
	movq	_SPI_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	orq	%r14, %rsi
	movl	$-1, %r14d
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_reg_wait
	testq	%rax, %rax
	jne	LBB0_32
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	(%r12), %rsi
	orq	-56(%rbp), %rsi                 ## 8-byte Folded Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ddbreadl
	movq	%rax, %rdi
	callq	_swab32
	movq	%rax, (%r15)
	addq	$32, %r15
	addq	$-4, %r13
	cmpq	$4, %r13
	ja	LBB0_21
	jmp	LBB0_23
LBB0_17:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	_SPI_CONTROL@GOTPCREL(%rip), %rax
	orq	(%rax), %rdx
	xorl	%r14d, %r14d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_ddbwritel
	jmp	LBB0_32
LBB0_19:
	movq	_SPI_DATA@GOTPCREL(%rip), %r12
LBB0_23:
	movl	%r13d, %esi
	andl	$3, %esi
	shll	$11, %esi
	orl	$3, %esi
	movq	_SPI_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	orq	%rbx, %rdx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_ddbwritel
	movq	(%r12), %rdx
	orq	%rbx, %rdx
	movq	%r14, %rdi
	movl	$-1, %esi
	callq	_ddbwritel
	movq	_SPI_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	orq	%rbx, %rsi
	movq	%r14, %rdi
	movl	$-1, %r14d
	movl	$4, %edx
	callq	_reg_wait
	testq	%rax, %rax
	jne	LBB0_32
## %bb.24:
	movq	(%r12), %rsi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	orq	%rbx, %rsi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_ddbreadl
	movq	%rax, %rcx
	movq	_SPI_CONTROL@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	movq	%rcx, %rbx
	callq	_ddbwritel
	testq	%r13, %r13
	je	LBB0_32
## %bb.25:
	leal	(,%r13,8), %eax
	movb	$32, %cl
	subb	%al, %cl
	xorl	%r14d, %r14d
	cmpq	$4, %r13
	movzbl	%cl, %ecx
	cmovael	%r14d, %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shlq	%cl, %rbx
	leaq	-1(%r13), %rax
	movq	%r13, %rcx
	andq	$3, %rcx
	je	LBB0_29
## %bb.26:
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %esi
	shrl	$24, %esi
	movq	%rsi, (%r15)
	shlq	$8, %rbx
	addq	$8, %r15
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_27
## %bb.28:
	subq	%rdx, %r13
LBB0_29:
	cmpq	$3, %rax
	jb	LBB0_32
## %bb.30:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	movq	%rbx, %rcx
	.p2align	4, 0x90
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edx
	movzbl	%bh, %esi
	movzbl	%bl, %edi
                                        ## kill: def $ebx killed $ebx killed $rbx def $rbx
	shrl	$24, %ebx
	movq	%rbx, (%r15,%rax,8)
	shrl	$16, %edx
	movzbl	%dl, %edx
	movq	%rdx, 8(%r15,%rax,8)
	movq	%rsi, 16(%r15,%rax,8)
	shlq	$32, %rcx
	movq	%rdi, 24(%r15,%rax,8)
	addq	$4, %rax
	movq	%rcx, %rbx
	cmpq	%rax, %r13
	jne	LBB0_31
	jmp	LBB0_32
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI_CONTROL,8,3                ## @SPI_CONTROL
	.comm	_SPI_DATA,8,3                   ## @SPI_DATA
	.no_dead_strip	_flashio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flashio
_flashio:                               ; @flashio
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x5
	mov	x21, x4
	mov	x24, x3
	mov	x25, x2
	mov	x19, x1
	mov	x22, x0
	mov	x0, x1
	bl	_DDB_LINK_TAG
	mov	x23, x0
	ldr	x8, [x22]
	add	x0, x8, x19, lsl #2
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_mutex_lock
Lloh0:
	adrp	x26, _SPI_CONTROL@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SPI_CONTROL@GOTPAGEOFF]
	cmp	x24, #5
	b.lo	LBB0_2
; %bb.1:
	ldr	x8, [x26]
	orr	x2, x8, x23
	mov	x0, x22
	mov	w1, #1
	bl	_ddbwritel
LBB0_2:
	lsl	w19, w24, #11
	mov	w8, #32
	sub	x28, x8, x24, lsl #3
Lloh2:
	adrp	x27, _SPI_DATA@GOTPAGE
Lloh3:
	ldr	x27, [x27, _SPI_DATA@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x24, #5
	b.lo	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x25], #32
	bl	_swab32
	mov	x1, x0
	sub	x24, x24, #4
	ldr	x8, [x27]
	orr	x2, x8, x23
	mov	x0, x22
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_ddbwritel
	ldr	x8, [x26]
	orr	x1, x8, x23
	mov	x0, x22
	mov	w2, #4
	bl	_reg_wait
	sub	w19, w19, #2, lsl #12           ; =8192
	add	x28, x28, #32
	cbz	x0, LBB0_3
	b	LBB0_10
LBB0_5:
	and	w8, w19, #0x1800
	cmp	x20, #0
	mov	w9, #3
	csinc	w9, w9, wzr, eq
	orr	w1, w8, w9
	ldr	x8, [x26]
	orr	x2, x8, x23
	mov	x0, x22
	bl	_ddbwritel
	cbz	x24, LBB0_8
; %bb.6:
	mov	x9, #0
	mov	x8, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x25, x9, lsl #3]
	orr	x8, x10, x8, lsl #8
	add	x9, x9, #1
	cmp	x24, x9
	b.ne	LBB0_7
	b	LBB0_9
LBB0_8:
	mov	x8, #0
LBB0_9:
	lsl	x1, x8, x28
	ldr	x8, [x27]
	orr	x2, x8, x23
	mov	x0, x22
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_ddbwritel
	ldr	x8, [x26]
	orr	x1, x8, x23
	mov	x0, x22
	mov	w2, #4
	bl	_reg_wait
	cbz	x0, LBB0_12
LBB0_10:
	mov	w24, #-1
LBB0_11:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_mutex_unlock
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_12:
	cbz	x20, LBB0_21
; %bb.13:
	cmp	x20, #5
	b.lo	LBB0_17
; %bb.14:
	ldr	x8, [x26]
	orr	x2, x8, x23
	mov	x0, x22
	mov	w1, #1
	bl	_ddbwritel
	mov	w24, #-1
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x27]
	orr	x2, x8, x23
	mov	x0, x22
	mov	w1, #-1
	bl	_ddbwritel
	ldr	x8, [x26]
	orr	x1, x8, x23
	mov	x0, x22
	mov	w2, #4
	bl	_reg_wait
	cbnz	x0, LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x27]
	orr	x1, x8, x23
	mov	x0, x22
	bl	_ddbreadl
	bl	_swab32
	str	x0, [x21], #32
	sub	x20, x20, #4
	cmp	x20, #4
	b.hi	LBB0_15
LBB0_17:
	mov	w1, #3
	bfi	w1, w20, #11, #2
	ldr	x8, [x26]
	orr	x2, x8, x23
	mov	x0, x22
	bl	_ddbwritel
	ldr	x8, [x27]
	orr	x2, x8, x23
	mov	w24, #-1
	mov	x0, x22
	mov	w1, #-1
	bl	_ddbwritel
	ldr	x8, [x26]
	orr	x1, x8, x23
	mov	x0, x22
	mov	w2, #4
	bl	_reg_wait
	cbnz	x0, LBB0_11
; %bb.18:
	ldr	x8, [x27]
	orr	x1, x8, x23
	mov	x0, x22
	bl	_ddbreadl
	mov	x24, x0
	ldr	x8, [x26]
	orr	x2, x8, x23
	mov	x0, x22
	mov	w1, #0
	bl	_ddbwritel
	cbz	x20, LBB0_22
; %bb.19:
	mov	w8, #32
	sub	x8, x8, x20, lsl #3
	cmp	x20, #4
	csel	x8, x8, xzr, lo
	lsl	x8, x24, x8
	mov	w24, #0
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ubfx	x9, x8, #24, #8
	str	x9, [x21], #8
	lsl	x8, x8, #8
	subs	x20, x20, #1
	b.ne	LBB0_20
	b	LBB0_11
LBB0_21:
	ldr	x8, [x26]
	orr	x2, x8, x23
	mov	x0, x22
	mov	w1, #0
	bl	_ddbwritel
LBB0_22:
	mov	w24, #0
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI_CONTROL,8,3                ; @SPI_CONTROL
	.comm	_SPI_DATA,8,3                   ; @SPI_DATA
	.no_dead_strip	_flashio
.subsections_via_symbols
