	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_spi_probe                ## -- Begin function intel_spi_probe
	.p2align	4, 0x90
_intel_spi_probe:                       ## @intel_spi_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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SNOR_HWCAPS_READ@GOTPCREL(%rip), %rax
	movq	_SNOR_HWCAPS_READ_FAST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_SNOR_HWCAPS_PP@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -48(%rbp)
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%rdx, %r12
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.4:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$72, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 64(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.19:
	movl	64(%r15), %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_CAST                       ## TAILCALL
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_7:
	movq	%r14, 48(%r15)
	movq	%r12, 56(%r15)
	movl	(%r12), %eax
	movl	%eax, 40(%r15)
	movq	%r15, %rdi
	callq	_intel_spi_init
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	movl	%eax, %edi
	jmp	LBB0_9
LBB0_10:
	movq	48(%r15), %rax
	movq	%rax, 32(%r15)
	movq	%r15, 24(%r15)
	movq	_intel_spi_read_reg@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r15)
	movq	_intel_spi_write_reg@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	_intel_spi_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	_intel_spi_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	_intel_spi_erase@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_spi_nor_scan
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	movl	%ebx, %edi
	jmp	LBB0_17
LBB0_12:
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	_intel_spi_fill_partition
	cmpl	$0, 40(%r15)
	je	LBB0_14
## %bb.13:
	movq	_writeable@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_15
LBB0_14:
	movq	_MTD_WRITEABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r15)
LBB0_15:
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_mtd_device_register
	testl	%eax, %eax
	je	LBB0_18
## %bb.16:
	movl	%eax, %edi
LBB0_17:
	callq	_ERR_PTR
	movq	%rax, %r15
LBB0_18:
	movq	%r15, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNOR_HWCAPS_READ,4,2           ## @SNOR_HWCAPS_READ
	.comm	_SNOR_HWCAPS_READ_FAST,4,2      ## @SNOR_HWCAPS_READ_FAST
	.comm	_SNOR_HWCAPS_PP,4,2             ## @SNOR_HWCAPS_PP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_intel_spi_read_reg,4,2         ## @intel_spi_read_reg
	.comm	_intel_spi_write_reg,4,2        ## @intel_spi_write_reg
	.comm	_intel_spi_read,4,2             ## @intel_spi_read
	.comm	_intel_spi_write,4,2            ## @intel_spi_write
	.comm	_intel_spi_erase,4,2            ## @intel_spi_erase
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to locate the chip\n"

	.comm	_writeable,4,2                  ## @writeable
	.comm	_MTD_WRITEABLE,4,2              ## @MTD_WRITEABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_spi_probe                ; -- Begin function intel_spi_probe
	.p2align	2
_intel_spi_probe:                       ; @intel_spi_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _SNOR_HWCAPS_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SNOR_HWCAPS_READ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SNOR_HWCAPS_READ_FAST@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SNOR_HWCAPS_READ_FAST@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _SNOR_HWCAPS_PP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SNOR_HWCAPS_PP@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [sp, #8]
	cbz	x1, LBB0_5
; %bb.1:
	mov	x21, x2
	cbz	x2, LBB0_5
; %bb.2:
	mov	x22, x1
	mov	x20, x0
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	w1, #72
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.3:
	mov	x19, x0
	mov	x0, x20
	mov	x1, x22
	bl	_devm_ioremap_resource
	str	w0, [x19, #64]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.4:
	ldr	w0, [x19, #64]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_ERR_CAST
LBB0_5:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_ERR_PTR
LBB0_9:
	stp	x20, x21, [x19, #48]
	ldr	w8, [x21]
	str	w8, [x19, #40]
	mov	x0, x19
	bl	_intel_spi_init
	cbnz	w0, LBB0_8
; %bb.10:
	ldr	x8, [x19, #48]
	stp	x19, x8, [x19, #24]
Lloh16:
	adrp	x8, _intel_spi_read_reg@GOTPAGE
Lloh17:
	ldr	x8, [x8, _intel_spi_read_reg@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x19, #20]
Lloh19:
	adrp	x8, _intel_spi_write_reg@GOTPAGE
Lloh20:
	ldr	x8, [x8, _intel_spi_write_reg@GOTPAGEOFF]
Lloh21:
	adrp	x9, _intel_spi_read@GOTPAGE
Lloh22:
	ldr	x9, [x9, _intel_spi_read@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #12]
Lloh25:
	adrp	x8, _intel_spi_write@GOTPAGE
Lloh26:
	ldr	x8, [x8, _intel_spi_write@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _intel_spi_erase@GOTPAGE
Lloh29:
	ldr	x9, [x9, _intel_spi_erase@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #4]
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, #0
	bl	_spi_nor_scan
	cbz	w0, LBB0_12
; %bb.11:
	mov	x21, x0
Lloh31:
	adrp	x1, l_.str@PAGE
Lloh32:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	mov	x0, x21
	b	LBB0_16
LBB0_12:
	mov	x1, sp
	mov	x0, x19
	bl	_intel_spi_fill_partition
	ldr	w8, [x19, #40]
	cbz	w8, LBB0_14
; %bb.13:
Lloh33:
	adrp	x8, _writeable@GOTPAGE
Lloh34:
	ldr	x8, [x8, _writeable@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	cbnz	w8, LBB0_15
LBB0_14:
Lloh36:
	adrp	x8, _MTD_WRITEABLE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _MTD_WRITEABLE@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
LBB0_15:
	mov	x1, sp
	mov	x0, x19
	mov	w2, #1
	bl	_mtd_device_register
	cbz	w0, LBB0_17
LBB0_16:
	bl	_ERR_PTR
	mov	x19, x0
LBB0_17:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh23
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_SNOR_HWCAPS_READ,4,2           ; @SNOR_HWCAPS_READ
	.comm	_SNOR_HWCAPS_READ_FAST,4,2      ; @SNOR_HWCAPS_READ_FAST
	.comm	_SNOR_HWCAPS_PP,4,2             ; @SNOR_HWCAPS_PP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_intel_spi_read_reg,4,2         ; @intel_spi_read_reg
	.comm	_intel_spi_write_reg,4,2        ; @intel_spi_write_reg
	.comm	_intel_spi_read,4,2             ; @intel_spi_read
	.comm	_intel_spi_write,4,2            ; @intel_spi_write
	.comm	_intel_spi_erase,4,2            ; @intel_spi_erase
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to locate the chip\n"

	.comm	_writeable,4,2                  ; @writeable
	.comm	_MTD_WRITEABLE,4,2              ; @MTD_WRITEABLE
.subsections_via_symbols
