	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hisi_spi_nor_register
_hisi_spi_nor_register:                 ## @hisi_spi_nor_register
	.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	_SNOR_HWCAPS_READ@GOTPCREL(%rip), %rax
	movq	_SNOR_HWCAPS_READ_FAST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_SNOR_HWCAPS_READ_1_1_2@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_SNOR_HWCAPS_READ_1_1_4@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_SNOR_HWCAPS_PP@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -48(%rbp)
	movq	16(%rsi), %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%r13, %rdi
	movl	$56, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, 48(%rax)
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_spi_nor_set_flash_node
	movl	(%r14), %edx
	movq	%r13, %rdi
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	leaq	12(%rax), %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_6:
	leaq	8(%r14), %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
LBB0_5:
	movq	%r13, %rdi
	movq	%r15, %rdx
	callq	_dev_err
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r14)
	movq	%r14, 40(%r12)
	movq	_hisi_spi_nor_prep@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r12)
	movq	_hisi_spi_nor_unprep@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
	movq	_hisi_spi_nor_read_reg@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r12)
	movq	_hisi_spi_nor_write_reg@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r12)
	movq	_hisi_spi_nor_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r12)
	movq	_hisi_spi_nor_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	movq	$0, 8(%r12)
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_spi_nor_scan
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movl	(%r15), %eax
	movl	%eax, (%r12)
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_mtd_device_register
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rax
	movq	8(%rdx), %rcx
	movq	%r12, (%rcx,%rax,8)
	incq	%rax
	movq	%rax, (%rdx)
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.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_READ_1_1_2,4,2     ## @SNOR_HWCAPS_READ_1_1_2
	.comm	_SNOR_HWCAPS_READ_1_1_4,4,2     ## @SNOR_HWCAPS_READ_1_1_4
	.comm	_SNOR_HWCAPS_PP,4,2             ## @SNOR_HWCAPS_PP
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reg"

L_.str.1:                               ## @.str.1
	.asciz	"There's no reg property for %pOF\n"

L_.str.2:                               ## @.str.2
	.asciz	"spi-max-frequency"

L_.str.3:                               ## @.str.3
	.asciz	"There's no spi-max-frequency property for %pOF\n"

	.comm	_hisi_spi_nor_prep,4,2          ## @hisi_spi_nor_prep
	.comm	_hisi_spi_nor_unprep,4,2        ## @hisi_spi_nor_unprep
	.comm	_hisi_spi_nor_read_reg,4,2      ## @hisi_spi_nor_read_reg
	.comm	_hisi_spi_nor_write_reg,4,2     ## @hisi_spi_nor_write_reg
	.comm	_hisi_spi_nor_read,4,2          ## @hisi_spi_nor_read
	.comm	_hisi_spi_nor_write,4,2         ## @hisi_spi_nor_write
	.no_dead_strip	_hisi_spi_nor_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hisi_spi_nor_register
_hisi_spi_nor_register:                 ; @hisi_spi_nor_register
	.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	x19, x1
	mov	x20, x0
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_READ_1_1_2@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SNOR_HWCAPS_READ_1_1_2@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _SNOR_HWCAPS_READ_1_1_4@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SNOR_HWCAPS_READ_1_1_4@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh11:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _SNOR_HWCAPS_PP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SNOR_HWCAPS_PP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [sp, #8]
	ldr	x22, [x1, #16]
Lloh15:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh16:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x22
	mov	w1, #56
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	str	x22, [x0, #48]
	mov	x1, x20
	bl	_spi_nor_set_flash_node
	ldr	w2, [x23]
	mov	x0, x22
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.2:
	mov	x24, x0
	add	x2, x0, #12
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_of_property_read_u32
	cbz	w0, LBB0_5
; %bb.3:
	mov	x23, x0
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_4:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_8
LBB0_5:
	add	x2, x24, #8
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_of_property_read_u32
	cbz	w0, LBB0_9
; %bb.6:
	mov	x23, x0
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_7:
	mov	x0, x22
	mov	x2, x20
	bl	_dev_err
LBB0_8:
	mov	x0, x23
	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_9:
	str	x19, [x24]
Lloh28:
	adrp	x8, _hisi_spi_nor_prep@GOTPAGE
Lloh29:
	ldr	x8, [x8, _hisi_spi_nor_prep@GOTPAGEOFF]
	str	x24, [x21, #40]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _hisi_spi_nor_unprep@GOTPAGE
Lloh32:
	ldr	x9, [x9, _hisi_spi_nor_unprep@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #32]
Lloh34:
	adrp	x8, _hisi_spi_nor_read_reg@GOTPAGE
Lloh35:
	ldr	x8, [x8, _hisi_spi_nor_read_reg@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	adrp	x9, _hisi_spi_nor_write_reg@GOTPAGE
Lloh38:
	ldr	x9, [x9, _hisi_spi_nor_write_reg@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #24]
Lloh40:
	adrp	x8, _hisi_spi_nor_read@GOTPAGE
Lloh41:
	ldr	x8, [x8, _hisi_spi_nor_read@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
Lloh43:
	adrp	x9, _hisi_spi_nor_write@GOTPAGE
Lloh44:
	ldr	x9, [x9, _hisi_spi_nor_write@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #16]
	str	xzr, [x21, #8]
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, #0
	bl	_spi_nor_scan
	mov	x23, x0
	cbnz	w0, LBB0_8
; %bb.10:
	ldr	w8, [x20]
	str	w8, [x21]
	mov	x0, x21
	mov	x1, #0
	mov	w2, #0
	bl	_mtd_device_register
	mov	x23, x0
	cbnz	w0, LBB0_8
; %bb.11:
	ldp	x9, x8, [x19]
	str	x21, [x8, x9, lsl #3]
	add	x8, x9, #1
	str	x8, [x19]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.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_READ_1_1_2,4,2     ; @SNOR_HWCAPS_READ_1_1_2
	.comm	_SNOR_HWCAPS_READ_1_1_4,4,2     ; @SNOR_HWCAPS_READ_1_1_4
	.comm	_SNOR_HWCAPS_PP,4,2             ; @SNOR_HWCAPS_PP
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reg"

l_.str.1:                               ; @.str.1
	.asciz	"There's no reg property for %pOF\n"

l_.str.2:                               ; @.str.2
	.asciz	"spi-max-frequency"

l_.str.3:                               ; @.str.3
	.asciz	"There's no spi-max-frequency property for %pOF\n"

	.comm	_hisi_spi_nor_prep,4,2          ; @hisi_spi_nor_prep
	.comm	_hisi_spi_nor_unprep,4,2        ; @hisi_spi_nor_unprep
	.comm	_hisi_spi_nor_read_reg,4,2      ; @hisi_spi_nor_read_reg
	.comm	_hisi_spi_nor_write_reg,4,2     ; @hisi_spi_nor_write_reg
	.comm	_hisi_spi_nor_read,4,2          ; @hisi_spi_nor_read
	.comm	_hisi_spi_nor_write,4,2         ; @hisi_spi_nor_write
	.no_dead_strip	_hisi_spi_nor_register
.subsections_via_symbols
