	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jedec_probe
_jedec_probe:                           ## @jedec_probe
	.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	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_OP_READ_ID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	leaq	-88(%rbp), %rsi
	leaq	-80(%rbp), %rcx
	movl	$1, %edx
	movl	$5, %r8d
	callq	_spi_write_then_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	-80(%rbp), %rax
	movq	_CFI_MFR_ATMEL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	leaq	-80(%rbp), %rdi
	callq	_be64_to_cpup
	movl	%eax, %r14d
	movq	_DATAFLASH_SHIFT_EXTID@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r14d, %esi
	sarl	%cl, %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_jedec_lookup
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movq	_DATAFLASH_SHIFT_ID@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r14d, %esi
	sarl	%cl, %esi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_jedec_lookup
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_dev_warn
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
LBB0_7:
	movl	%ebx, %edi
	callq	_ERR_PTR
	movq	%rax, %r12
	jmp	LBB0_8
LBB0_3:
	xorl	%r12d, %r12d
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	movq	%r12, %rax
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_OP_READ_ID,8,3                 ## @OP_READ_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error %d reading JEDEC ID\n"

	.comm	_CFI_MFR_ATMEL,8,3              ## @CFI_MFR_ATMEL
	.comm	_DATAFLASH_SHIFT_EXTID,4,2      ## @DATAFLASH_SHIFT_EXTID
	.comm	_DATAFLASH_SHIFT_ID,4,2         ## @DATAFLASH_SHIFT_ID
L_.str.1:                               ## @.str.1
	.asciz	"JEDEC id %016llx not handled\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_jedec_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jedec_probe
_jedec_probe:                           ; @jedec_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _OP_READ_ID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OP_READ_ID@GOTPAGEOFF]
	stur	x8, [x29, #-40]
Lloh5:
	ldr	x8, [x9]
	str	x8, [sp, #8]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #16]
	add	x1, sp, #8
	add	x3, sp, #16
	mov	w2, #1
	mov	w4, #5
	bl	_spi_write_then_read
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	x8, [sp, #16]
Lloh6:
	adrp	x9, _CFI_MFR_ATMEL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CFI_MFR_ATMEL@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.2:
	add	x0, sp, #16
	bl	_be64_to_cpup
	mov	x20, x0
Lloh9:
	adrp	x8, _DATAFLASH_SHIFT_EXTID@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DATAFLASH_SHIFT_EXTID@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	asr	w1, w0, w8
	mov	x0, x19
	mov	w2, #1
	bl	_jedec_lookup
	mov	x21, x0
	bl	_IS_ERR
	cbz	w0, LBB0_8
; %bb.3:
Lloh12:
	adrp	x8, _DATAFLASH_SHIFT_ID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DATAFLASH_SHIFT_ID@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	asr	w1, w20, w8
	mov	x0, x19
	mov	w2, #0
	bl	_jedec_lookup
	mov	x21, x0
	bl	_IS_ERR
	cbz	w0, LBB0_8
; %bb.4:
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_warn
Lloh17:
	adrp	x8, _ENODEV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_5:
	mov	x20, x0
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_dbg
LBB0_6:
	mov	x0, x20
	bl	_ERR_PTR
	mov	x21, x0
	b	LBB0_8
LBB0_7:
	mov	x21, #0
LBB0_8:
	ldur	x8, [x29, #-40]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_OP_READ_ID,8,3                 ; @OP_READ_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error %d reading JEDEC ID\n"

	.comm	_CFI_MFR_ATMEL,8,3              ; @CFI_MFR_ATMEL
	.comm	_DATAFLASH_SHIFT_EXTID,4,2      ; @DATAFLASH_SHIFT_EXTID
	.comm	_DATAFLASH_SHIFT_ID,4,2         ; @DATAFLASH_SHIFT_ID
l_.str.1:                               ; @.str.1
	.asciz	"JEDEC id %016llx not handled\n"

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