	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dataflash_read
_dataflash_read:                        ## @dataflash_read
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -152(%rbp)                 ## 8-byte Spill
	movq	%rcx, %r13
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rcx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movq	_MTD_DEBUG_LEVEL2@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rcx, -160(%rbp)                ## 8-byte Spill
	movq	16(%rcx), %rdi
	callq	_dev_name
	movq	%r15, %rcx
	addq	%r12, %rcx
	leaq	L_.str(%rip), %rsi
	movl	$0, -116(%rbp)                  ## 4-byte Folded Spill
	movl	%ebx, %edi
	movq	%rcx, %rbx
	movl	%eax, %edx
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_DEBUG
	movq	%r13, -144(%rbp)                ## 8-byte Spill
	movq	$0, (%r13)
	testq	%r12, %r12
	je	LBB0_6
## %bb.1:
	cmpq	(%r14), %rbx
	jbe	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -116(%rbp)                ## 4-byte Spill
	jmp	LBB0_6
LBB0_3:
	movq	%rbx, -136(%rbp)                ## 8-byte Spill
	movq	-160(%rbp), %r13                ## 8-byte Reload
	movb	4(%r13), %cl
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	(%r13)
	movl	%eax, %r14d
	movl	$0, -116(%rbp)                  ## 4-byte Folded Spill
	shll	%cl, %r14d
	addl	%edx, %r14d
	movq	%r15, -128(%rbp)                ## 8-byte Spill
	movq	8(%r13), %rbx
	movq	_MTD_DEBUG_LEVEL3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	movl	4(%rbx), %ecx
	movl	8(%rbx), %r8d
	movl	12(%rbx), %r9d
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_DEBUG
	leaq	-120(%rbp), %r15
	movq	%r15, %rdi
	callq	_spi_message_init
	movq	%rbx, -112(%rbp)
	movl	$8, -104(%rbp)
	leaq	-112(%rbp), %rdi
	movq	%r15, %rsi
	callq	_spi_message_add_tail
	leaq	-80(%rbp), %rdi
	movq	-152(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -64(%rbp)
	movl	%r12d, -72(%rbp)
	movq	%r15, %rsi
	callq	_spi_message_add_tail
	leaq	24(%r13), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	_OP_READ_CONTINUOUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movl	%r14d, %eax
	shrl	$16, %eax
	movl	%eax, 4(%rbx)
	movl	%r14d, %eax
	shrl	$8, %eax
	movl	%eax, 8(%rbx)
	movl	%r14d, 12(%rbx)
	movq	16(%r13), %rdi
	leaq	-120(%rbp), %rsi
	callq	_spi_sync
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%r14d, %r14d
	js	LBB0_5
## %bb.4:
	movslq	-120(%rbp), %rax
	addq	$-8, %rax
	movq	-144(%rbp), %rcx                ## 8-byte Reload
	movq	%rax, (%rcx)
	jmp	LBB0_6
LBB0_5:
	movq	_MTD_DEBUG_LEVEL1@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	16(%r13), %rdi
	callq	_dev_name
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	movq	-128(%rbp), %rcx                ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	-136(%rbp), %r8                 ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movl	%r14d, %r9d
	xorl	%eax, %eax
	callq	_DEBUG
	movl	%r14d, -116(%rbp)               ## 4-byte Spill
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	-116(%rbp), %eax                ## 4-byte Reload
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MTD_DEBUG_LEVEL2,4,2           ## @MTD_DEBUG_LEVEL2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: read 0x%x..0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MTD_DEBUG_LEVEL3,4,2           ## @MTD_DEBUG_LEVEL3
L_.str.1:                               ## @.str.1
	.asciz	"READ: (%x) %x %x %x\n"

	.comm	_OP_READ_CONTINUOUS,4,2         ## @OP_READ_CONTINUOUS
	.comm	_MTD_DEBUG_LEVEL1,4,2           ## @MTD_DEBUG_LEVEL1
L_.str.2:                               ## @.str.2
	.asciz	"%s: read %x..%x --> %d\n"

	.no_dead_strip	_dataflash_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function dataflash_read
lCPI0_0:
	.long	4294967280                      ; 0xfffffff0
	.long	4294967288                      ; 0xfffffff8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_dataflash_read:                        ; @dataflash_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x23, x4
	mov	x20, x3
	mov	x22, x2
	mov	x19, x1
	mov	x24, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #88]
	ldr	x26, [x0, #8]
	str	xzr, [sp, #80]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #48]
	stur	q0, [sp, #32]
Lloh3:
	adrp	x8, _MTD_DEBUG_LEVEL2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MTD_DEBUG_LEVEL2@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x8]
	ldr	x0, [x26, #16]
	bl	_dev_name
	mov	x2, x0
	add	x21, x22, x19
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x25
	mov	x3, x19
	mov	x4, x21
	bl	_DEBUG
	str	xzr, [x20]
	cbz	x22, LBB0_6
; %bb.1:
	ldr	x8, [x24]
	cmp	x21, x8
	b.ls	LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_6
LBB0_3:
	ldp	w8, w9, [x26]
	udiv	w10, w19, w8
	lsl	w9, w10, w9
	msub	w8, w10, w8, w19
	add	w24, w9, w8
Lloh11:
	adrp	x8, _MTD_DEBUG_LEVEL3@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MTD_DEBUG_LEVEL3@GOTPAGEOFF]
	ldr	x25, [x26, #8]
Lloh13:
	ldr	w0, [x8]
	ldp	w2, w3, [x25]
	ldp	w4, w8, [x25, #8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	str	x8, [sp]
	bl	_DEBUG
	add	x0, sp, #16
	bl	_spi_message_init
	str	x25, [sp, #24]
	mov	w8, #8
	str	w8, [sp, #32]
	add	x27, sp, #24
	add	x0, sp, #24
	add	x1, sp, #16
	bl	_spi_message_add_tail
	add	x0, x27, #32
	str	x23, [sp, #72]
	str	w22, [sp, #64]
	add	x1, sp, #16
	bl	_spi_message_add_tail
	add	x23, x26, #24
	mov	x0, x23
	bl	_mutex_lock
Lloh16:
	adrp	x8, _OP_READ_CONTINUOUS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _OP_READ_CONTINUOUS@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x25]
	dup.2s	v0, w24
Lloh19:
	adrp	x8, lCPI0_0@PAGE
Lloh20:
	ldr	d1, [x8, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	stur	d0, [x25, #4]
	str	w24, [x25, #12]
	ldr	x0, [x26, #16]
	add	x1, sp, #16
	bl	_spi_sync
	mov	x22, x0
	mov	x0, x23
	bl	_mutex_unlock
	tbnz	w22, #31, LBB0_5
; %bb.4:
	mov	w22, #0
	ldrsw	x8, [sp, #16]
	sub	x8, x8, #8
	str	x8, [x20]
	b	LBB0_6
LBB0_5:
Lloh21:
	adrp	x8, _MTD_DEBUG_LEVEL1@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MTD_DEBUG_LEVEL1@GOTPAGEOFF]
Lloh23:
	ldr	w20, [x8]
	ldr	x0, [x26, #16]
	bl	_dev_name
	mov	x2, x0
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	str	x22, [sp]
	mov	x0, x20
	mov	x3, x19
	mov	x4, x21
	bl	_DEBUG
LBB0_6:
	ldr	x8, [sp, #88]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x22
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdr	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_MTD_DEBUG_LEVEL2,4,2           ; @MTD_DEBUG_LEVEL2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: read 0x%x..0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MTD_DEBUG_LEVEL3,4,2           ; @MTD_DEBUG_LEVEL3
l_.str.1:                               ; @.str.1
	.asciz	"READ: (%x) %x %x %x\n"

	.comm	_OP_READ_CONTINUOUS,4,2         ; @OP_READ_CONTINUOUS
	.comm	_MTD_DEBUG_LEVEL1,4,2           ; @MTD_DEBUG_LEVEL1
l_.str.2:                               ; @.str.2
	.asciz	"%s: read %x..%x --> %d\n"

	.no_dead_strip	_dataflash_read
.subsections_via_symbols
