	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_copy_raw                       ## -- Begin function copy_raw
	.p2align	4, 0x90
_copy_raw:                              ## @copy_raw
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
                                        ## kill: def $edi killed $edi def $rdi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movl	%esi, %ecx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	orl	%edi, %ecx
	movl	$1, %eax
	testb	$1, %cl
	jne	LBB0_14
## %bb.1:
	movl	%edx, %r14d
	movq	%rsp, %rbx
	movq	_FLASH_SECTOR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r13, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	leal	(%r14,%r13), %eax
	decl	%eax
	movl	%r13d, %r14d
	negl	%r14d
	andl	%eax, %r14d
	je	LBB0_2
## %bb.3:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%r15), %ebx
	movl	%ebx, %eax
	cltd
	idivl	%r13d
	movl	%eax, %edi
	callq	_SPIEraseSector
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%r15), %edi
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_SPIRead
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, %edi
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_SPIWrite
	testq	%rax, %rax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	addl	%r13d, %r15d
	cmpl	%r15d, %r14d
	jne	LBB0_4
## %bb.11:
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_2:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_5:
	movl	$2, %eax
	jmp	LBB0_12
LBB0_7:
	movl	$3, %eax
	jmp	LBB0_12
LBB0_9:
	movl	$4, %eax
LBB0_12:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_13:
	movq	%rbx, %rsp
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_16
## %bb.15:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_FLASH_SECTOR_SIZE,4,2          ## @FLASH_SECTOR_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_copy_raw                       ; -- Begin function copy_raw
	.p2align	2
_copy_raw:                              ; @copy_raw
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	orr	w8, w1, w0
	tbnz	w8, #0, LBB0_8
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	x24, sp
Lloh3:
	adrp	x8, _FLASH_SECTOR_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FLASH_SECTOR_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	lsl	x8, x21, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	add	w8, w2, w21
	sub	w8, w8, #1
	neg	w9, w21
	ands	w25, w8, w9
	b.eq	LBB0_7
; %bb.2:
	mov	w26, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	w23, w19, w26
	sdiv	w0, w23, w21
	bl	_SPIEraseSector
	cbnz	x0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w0, w20, w26
	mov	x1, x22
	mov	x2, x21
	bl	_SPIRead
	cbnz	x0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	bl	_SPIWrite
	cbnz	x0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w26, w26, w21
	cmp	w25, w26
	b.ne	LBB0_3
LBB0_7:
	mov	w0, #0
	b	LBB0_12
LBB0_8:
	mov	w0, #1
	b	LBB0_13
LBB0_9:
	mov	w0, #2
	b	LBB0_12
LBB0_10:
	mov	w0, #3
	b	LBB0_12
LBB0_11:
	mov	w0, #4
LBB0_12:
	mov	sp, x24
LBB0_13:
	ldur	x8, [x29, #-72]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_FLASH_SECTOR_SIZE,4,2          ; @FLASH_SECTOR_SIZE
.subsections_via_symbols
