	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_dump_flash                 ## -- Begin function ubi_dump_flash
	.p2align	4, 0x90
_ubi_dump_flash:                        ## @ubi_dump_flash
	.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
	movl	%ecx, %ebx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r12
	movl	(%rdi), %r15d
	movl	%ecx, %edi
	callq	_vmalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r14
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	imull	%r13d, %r15d
	addl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	movl	4(%r12), %edi
	leaq	-56(%rbp), %rcx
	movl	%r15d, %esi
	movl	%ebx, %edx
	movq	%rax, %r8
	callq	_mtd_read
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movq	_EUCLEAN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	jne	LBB0_3
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_ubi_msg
	movq	_KERN_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DUMP_PREFIX_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movl	$32, %ecx
	movl	$1, %r8d
	movq	%r14, %r9
	pushq	$1
	pushq	%rbx
	callq	_print_hex_dump
	jmp	LBB0_5
LBB0_3:
	subq	$8, %rsp
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	movl	%ebx, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	pushq	-56(%rbp)
	callq	_ubi_err
LBB0_5:
	addq	$16, %rsp
	movq	%r14, %rdi
	callq	_vfree
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EUCLEAN,4,2                    ## @EUCLEAN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"err %d while reading %d bytes from PEB %d:%d, read %zd bytes"

L_.str.1:                               ## @.str.1
	.asciz	"dumping %d bytes of data from PEB %d, offset %d"

	.comm	_KERN_DEBUG,4,2                 ## @KERN_DEBUG
L_.str.2:                               ## @.str.2
	.space	1

	.comm	_DUMP_PREFIX_OFFSET,4,2         ## @DUMP_PREFIX_OFFSET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_dump_flash                 ; -- Begin function ubi_dump_flash
	.p2align	2
_ubi_dump_flash:                        ; @ubi_dump_flash
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	ldr	w24, [x0]
	mov	x0, x3
	bl	_vmalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	madd	w1, w24, w22, w21
	ldr	w0, [x23, #4]
	add	x3, sp, #8
	mov	x2, x20
	mov	x4, x19
	bl	_mtd_read
	cbz	w0, LBB0_3
; %bb.2:
	mov	x2, x0
Lloh0:
	adrp	x8, _EUCLEAN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EUCLEAN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_4
LBB0_3:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	mov	x2, x20
	mov	x3, x22
	mov	x4, x21
	bl	_ubi_msg
Lloh5:
	adrp	x8, _KERN_DEBUG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KERN_DEBUG@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _DUMP_PREFIX_OFFSET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DUMP_PREFIX_OFFSET@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w3, #32
	mov	w4, #1
	mov	x5, x19
	mov	x6, x20
	mov	w7, #1
	bl	_print_hex_dump
	b	LBB0_5
LBB0_4:
	ldr	x6, [sp, #8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x3, x20
	mov	x4, x22
	mov	x5, x21
	bl	_ubi_err
LBB0_5:
	mov	x0, x19
	bl	_vfree
LBB0_6:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EUCLEAN,4,2                    ; @EUCLEAN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"err %d while reading %d bytes from PEB %d:%d, read %zd bytes"

l_.str.1:                               ; @.str.1
	.asciz	"dumping %d bytes of data from PEB %d, offset %d"

	.comm	_KERN_DEBUG,4,2                 ; @KERN_DEBUG
l_.str.2:                               ; @.str.2
	.space	1

	.comm	_DUMP_PREFIX_OFFSET,4,2         ; @DUMP_PREFIX_OFFSET
.subsections_via_symbols
