	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spi_nor_probe
_spi_nor_probe:                         ## @spi_nor_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	%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	%rdi, %r12
	movq	(%rdi), %r13
	leaq	8(%r13), %rbx
	movq	%rbx, %rdi
	callq	_dev_get_platdata
	movq	%rax, %r14
	movq	_SNOR_HWCAPS_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$48, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %r13
	movq	%r12, 40(%r15)
	movq	%rbx, 32(%r15)
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_spi_nor_set_flash_node
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_spi_mem_set_drvdata
	testq	%r14, %r14
	je	LBB0_5
## %bb.3:
	movq	24(%r14), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, 16(%r13)
LBB0_5:
	addq	$16, %r15
	cmpq	$0, 16(%r13)
	je	LBB0_6
## %bb.7:
	testq	%r14, %r14
	jne	LBB0_8
	jmp	LBB0_9
LBB0_6:
	movq	%r12, %rdi
	callq	_spi_mem_get_name
	movq	%rax, (%r15)
	testq	%r14, %r14
	je	LBB0_9
LBB0_8:
	movq	(%r14), %rsi
	testq	%rsi, %rsi
	jne	LBB0_10
LBB0_9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	xorl	%esi, %esi
	testl	%eax, %eax
	cmovneq	%rbx, %rsi
LBB0_10:
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	callq	_spi_nor_scan
	testl	%eax, %eax
	jne	LBB0_17
## %bb.11:
	movq	(%r13), %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_13
## %bb.12:
	movq	%rax, 8(%r13)
	movq	32(%r13), %rdi
	movl	24(%r13), %esi
	callq	_devm_kfree
	movq	8(%r13), %rsi
	movq	32(%r13), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_devm_kmalloc
	movl	%eax, 24(%r13)
	testl	%eax, %eax
	je	LBB0_1
LBB0_13:
	testq	%r14, %r14
	je	LBB0_14
## %bb.15:
	movq	16(%r14), %rsi
	movl	8(%r14), %edx
	jmp	LBB0_16
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_17
LBB0_14:
	xorl	%esi, %esi
	xorl	%edx, %edx
LBB0_16:
	movq	%r15, %rdi
	callq	_mtd_device_register
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNOR_HWCAPS_ALL,4,2            ## @SNOR_HWCAPS_ALL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"spi-nor"

	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.no_dead_strip	_spi_nor_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spi_nor_probe
_spi_nor_probe:                         ; @spi_nor_probe
	.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	x22, x0
	ldr	x24, [x0]
	add	x21, x24, #8
	mov	x0, x21
	bl	_dev_get_platdata
	mov	x19, x0
Lloh0:
	adrp	x8, _SNOR_HWCAPS_ALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SNOR_HWCAPS_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
Lloh3:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x21
	mov	w1, #48
	bl	_devm_kzalloc
	cbz	x0, LBB0_14
; %bb.1:
	mov	x20, x0
	stp	x21, x22, [x0, #32]
	ldr	w1, [x21]
	bl	_spi_nor_set_flash_node
	mov	x0, x22
	mov	x1, x20
	bl	_spi_mem_set_drvdata
	cbz	x19, LBB0_4
; %bb.2:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_4
; %bb.3:
	str	x8, [x20, #16]
LBB0_4:
	mov	x21, x20
	ldr	x8, [x21, #16]!
	cbz	x8, LBB0_6
; %bb.5:
	cbnz	x19, LBB0_7
	b	LBB0_8
LBB0_6:
	mov	x0, x22
	bl	_spi_mem_get_name
	str	x0, [x21]
	cbz	x19, LBB0_8
LBB0_7:
	ldr	x1, [x19]
	cbnz	x1, LBB0_9
LBB0_8:
	ldr	x22, [x24]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_strcmp
	cmp	w0, #0
	csel	x1, xzr, x22, eq
LBB0_9:
	add	x2, sp, #8
	mov	x0, x20
	bl	_spi_nor_scan
	cbnz	w0, LBB0_17
; %bb.10:
	ldr	x8, [x20]
Lloh7:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_12
; %bb.11:
	str	x8, [x20, #8]
	ldr	x0, [x20, #32]
	ldr	w1, [x20, #24]
	bl	_devm_kfree
	ldr	x0, [x20, #32]
	ldr	x1, [x20, #8]
	ldr	w2, [x23]
	bl	_devm_kmalloc
	str	w0, [x20, #24]
	cbz	w0, LBB0_14
LBB0_12:
	cbz	x19, LBB0_15
; %bb.13:
	ldr	x1, [x19, #16]
	ldr	w2, [x19, #8]
	b	LBB0_16
LBB0_14:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_15:
	mov	x1, #0
	mov	w2, #0
LBB0_16:
	mov	x0, x21
	bl	_mtd_device_register
LBB0_17:
	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
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SNOR_HWCAPS_ALL,4,2            ; @SNOR_HWCAPS_ALL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"spi-nor"

	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.no_dead_strip	_spi_nor_probe
.subsections_via_symbols
