	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function raw_write
_raw_write:                             ## @raw_write
	.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
	movq	%rdx, %rbx
	movq	%rdi, %r15
	movq	%rsi, -64(%rbp)
	movq	%rdx, -56(%rbp)
	callq	_nand_to_mtd
	movq	%rbx, -72(%rbp)
	movl	(%rax), %r12d
	movl	(%r15), %ecx
	movl	4(%r15), %r13d
	movl	$0, -44(%rbp)
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	_BBM_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rbx,%rax,4), %rax
	movq	%rax, -56(%rbp)
LBB0_2:
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	_METADATA_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rcx
	movq	%r15, %rdi
	callq	_aux_write
	cmpl	%r12d, %r13d
	jge	LBB0_3
## %bb.4:
	leaq	-44(%rbp), %r14
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	leaq	-64(%rbp), %rsi
	movl	%r13d, %edx
	movq	%r14, %rcx
	callq	_aux_write
	movq	%r15, %rdi
	leaq	-56(%rbp), %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	%r14, %rcx
	callq	_aux_write
	movl	%r12d, %ebx
	subl	-44(%rbp), %ebx
	cmpl	%ebx, %r13d
	jl	LBB0_5
	jmp	LBB0_6
LBB0_3:
	movl	%r12d, %ebx
LBB0_6:
	leaq	-64(%rbp), %r14
	leaq	-44(%rbp), %r12
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	movq	%r12, %rcx
	callq	_aux_write
	movq	_BBM_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-72(%rbp), %rsi
	movq	%r15, %rdi
	movq	%r12, %rcx
	callq	_aux_write
	subl	%ebx, %r13d
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	movq	%r12, %rcx
	callq	_aux_write
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	%r12, %rcx
	callq	_aux_write
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BBM_SIZE,4,2                   ## @BBM_SIZE
	.comm	_METADATA_SIZE,4,2              ## @METADATA_SIZE
	.no_dead_strip	_raw_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function raw_write
_raw_write:                             ; @raw_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x23, x2
	mov	x19, x0
	stp	x2, x1, [sp, #16]
	bl	_nand_to_mtd
	str	x23, [sp, #8]
	ldr	w22, [x0]
	ldp	w20, w21, [x19]
	str	wzr, [sp, #4]
Lloh0:
	adrp	x24, _BBM_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _BBM_SIZE@GOTPAGEOFF]
	cbz	x23, LBB0_2
; %bb.1:
	ldrsw	x8, [x24]
	add	x8, x23, x8, lsl #2
	str	x8, [sp, #16]
LBB0_2:
Lloh2:
	adrp	x8, _METADATA_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _METADATA_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	add	x1, sp, #16
	add	x3, sp, #4
	mov	x0, x19
	bl	_aux_write
	cmp	w21, w22
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #24
	add	x3, sp, #4
	mov	x0, x19
	mov	x2, x21
	bl	_aux_write
	add	x1, sp, #16
	add	x3, sp, #4
	mov	x0, x19
	mov	x2, x20
	bl	_aux_write
	ldr	w8, [sp, #4]
	sub	w8, w22, w8
	cmp	w21, w8
	b.lt	LBB0_3
; %bb.4:
	mov	x22, x8
LBB0_5:
	add	x1, sp, #24
	add	x3, sp, #4
	mov	x0, x19
	mov	x2, x22
	bl	_aux_write
	ldr	w2, [x24]
	add	x1, sp, #8
	add	x3, sp, #4
	mov	x0, x19
	bl	_aux_write
	sub	w2, w21, w22
	add	x1, sp, #24
	add	x3, sp, #4
	mov	x0, x19
	bl	_aux_write
	add	x1, sp, #16
	add	x3, sp, #4
	mov	x0, x19
	mov	x2, x20
	bl	_aux_write
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_BBM_SIZE,4,2                   ; @BBM_SIZE
	.comm	_METADATA_SIZE,4,2              ; @METADATA_SIZE
	.no_dead_strip	_raw_write
.subsections_via_symbols
