	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spi_nor_read
_spi_nor_read:                          ## @spi_nor_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r12
	movq	%rcx, %r15
	movq	%rdx, %rbx
	movq	%rsi, %r13
	callq	_mtd_to_spi_nor
	movq	%rax, %r14
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	movq	%rbx, %rcx
	callq	_dev_dbg
	movq	_SPI_NOR_OPS_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_spi_nor_lock_and_prep
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.3:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_spi_nor_convert_addr
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	callq	_spi_nor_read_data
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	js	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %r15d
	xorl	%edi, %edi
	cmpq	%r15, %rbx
	setb	%dil
	callq	_WARN_ON
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	%r15, (%rax)
	addq	%r15, %r13
	leaq	(%r12,%r15,4), %r12
	subq	%r15, %rbx
	jne	LBB0_4
	jmp	LBB0_9
LBB0_2:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_9
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_9
LBB0_7:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_9:
	movq	_SPI_NOR_OPS_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_spi_nor_unlock_and_unprep
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"from 0x%08x, len %zd\n"

	.comm	_SPI_NOR_OPS_READ,4,2           ## @SPI_NOR_OPS_READ
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_spi_nor_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spi_nor_read
_spi_nor_read:                          ; @spi_nor_read
	.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
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	bl	_mtd_to_spi_nor
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	mov	x3, x22
	bl	_dev_dbg
Lloh2:
	adrp	x25, _SPI_NOR_OPS_READ@GOTPAGE
Lloh3:
	ldr	x25, [x25, _SPI_NOR_OPS_READ@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_spi_nor_lock_and_prep
	mov	x24, x0
	cbnz	w0, LBB0_8
; %bb.1:
	cbz	x22, LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_spi_nor_convert_addr
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	mov	x3, x20
	bl	_spi_nor_read_data
	cbz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, x0
	tbnz	w0, #31, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w26, w24
	subs	x22, x22, x26
	cset	w0, lo
	bl	_WARN_ON
	ldr	x8, [x21]
	add	x8, x8, x26
	str	x8, [x21]
	add	x20, x20, w24, uxtw #2
	add	x23, x23, x26
	cbnz	x22, LBB0_2
LBB0_5:
	mov	w24, #0
	b	LBB0_7
LBB0_6:
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_7:
	ldr	w1, [x25]
	mov	x0, x19
	bl	_spi_nor_unlock_and_unprep
LBB0_8:
	mov	x0, x24
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"from 0x%08x, len %zd\n"

	.comm	_SPI_NOR_OPS_READ,4,2           ; @SPI_NOR_OPS_READ
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_spi_nor_read
.subsections_via_symbols
