	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spi_nor_read_id
_spi_nor_read_id:                       ## @spi_nor_read_id
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	24(%rdi), %r15
	cmpq	$0, 16(%rdi)
	je	LBB0_2
## %bb.1:
	movq	_SPINOR_OP_RDID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_SPI_MEM_OP_CMD
	movl	%eax, %r12d
	movq	_SPI_MEM_OP_NO_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_SPI_MEM_OP_NO_DUMMY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_SPI_NOR_MAX_ID_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_SPI_MEM_OP_DATA_IN
	movl	%r12d, %edi
	movl	%r13d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_SPI_MEM_OP
	movl	%eax, -48(%rbp)
	movq	16(%r14), %rdi
	leaq	-48(%rbp), %rsi
	callq	_spi_mem_exec_op
	jmp	LBB0_3
LBB0_2:
	movq	_SPINOR_OP_RDID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SPI_NOR_MAX_ID_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	*(%r14)
LBB0_3:
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
## %bb.4:
	movq	_spi_nor_ids@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	$2, %eax
	jl	LBB0_10
## %bb.5:
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	decl	%eax
	cltq
	addq	$16, %r13
	cmpq	%rax, %rbx
	jge	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movq	(%rdi,%r13), %rdx
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	8(%rdi,%r13), %edi
	movq	%r15, %rsi
	callq	_memcmp
	testl	%eax, %eax
	je	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r12), %rdi
	jmp	LBB0_9
LBB0_10:
	movl	8(%r14), %edi
	movq	_SPI_NOR_MAX_ID_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_13:
	movl	8(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_11:
	movl	%ebx, %edi
	callq	_ERR_PTR
	movq	%rax, %r13
LBB0_12:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	addq	(%r12), %r13
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_SPINOR_OP_RDID,4,2             ## @SPINOR_OP_RDID
	.comm	_SPI_MEM_OP_NO_ADDR,4,2         ## @SPI_MEM_OP_NO_ADDR
	.comm	_SPI_MEM_OP_NO_DUMMY,4,2        ## @SPI_MEM_OP_NO_DUMMY
	.comm	_SPI_NOR_MAX_ID_LEN,4,2         ## @SPI_NOR_MAX_ID_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error %d reading JEDEC ID\n"

	.comm	_spi_nor_ids,8,3                ## @spi_nor_ids
L_.str.1:                               ## @.str.1
	.asciz	"unrecognized JEDEC id bytes: %*ph\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_spi_nor_read_id
.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_id
_spi_nor_read_id:                       ; @spi_nor_read_id
	.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, x0
	ldp	x8, x19, [x0, #16]
Lloh0:
	adrp	x24, _SPI_NOR_MAX_ID_LEN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SPI_NOR_MAX_ID_LEN@GOTPAGEOFF]
	cbz	x8, LBB0_9
; %bb.1:
Lloh2:
	adrp	x8, _SPINOR_OP_RDID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SPINOR_OP_RDID@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_SPI_MEM_OP_CMD
	mov	x21, x0
Lloh5:
	adrp	x8, _SPI_MEM_OP_NO_ADDR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SPI_MEM_OP_NO_ADDR@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
Lloh8:
	adrp	x8, _SPI_MEM_OP_NO_DUMMY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SPI_MEM_OP_NO_DUMMY@GOTPAGEOFF]
Lloh10:
	ldr	w23, [x8]
	ldr	w0, [x24]
	mov	x1, x19
	mov	w2, #1
	bl	_SPI_MEM_OP_DATA_IN
	mov	x3, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_SPI_MEM_OP
	str	w0, [sp, #8]
	ldr	x0, [x20, #16]
	add	x1, sp, #8
	bl	_spi_mem_exec_op
	mov	x21, x0
	tbnz	w0, #31, LBB0_10
LBB0_2:
Lloh11:
	adrp	x21, _spi_nor_ids@GOTPAGE
Lloh12:
	ldr	x21, [x21, _spi_nor_ids@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #2
	b.lt	LBB0_8
; %bb.3:
	mov	x22, #0
	mov	x23, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	sub	w8, w0, #1
	add	x22, x22, #16
	cmp	x23, w8, sxtw
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	ldr	x2, [x0, x22]
	cbz	x2, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x0, x22
	ldr	w0, [x8, #8]
	mov	x1, x19
	bl	_memcmp
	cbz	w0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x21]
	b	LBB0_4
LBB0_8:
	ldr	w0, [x20, #8]
	ldr	w2, [x24]
	str	x19, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_9:
	ldr	x8, [x20]
Lloh18:
	adrp	x9, _SPINOR_OP_RDID@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SPINOR_OP_RDID@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x9]
	ldr	w3, [x24]
	mov	x0, x20
	mov	x2, x19
	blr	x8
	mov	x21, x0
	tbz	w0, #31, LBB0_2
LBB0_10:
	ldr	w0, [x20, #8]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	mov	x0, x21
LBB0_11:
	bl	_ERR_PTR
LBB0_12:
	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
LBB0_13:
	ldr	x8, [x21]
	add	x0, x8, x22
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_SPINOR_OP_RDID,4,2             ; @SPINOR_OP_RDID
	.comm	_SPI_MEM_OP_NO_ADDR,4,2         ; @SPI_MEM_OP_NO_ADDR
	.comm	_SPI_MEM_OP_NO_DUMMY,4,2        ; @SPI_MEM_OP_NO_DUMMY
	.comm	_SPI_NOR_MAX_ID_LEN,4,2         ; @SPI_NOR_MAX_ID_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error %d reading JEDEC ID\n"

	.comm	_spi_nor_ids,8,3                ; @spi_nor_ids
l_.str.1:                               ; @.str.1
	.asciz	"unrecognized JEDEC id bytes: %*ph\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_spi_nor_read_id
.subsections_via_symbols
