	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hisi_spi_nor_probe
_hisi_spi_nor_probe:                    ## @hisi_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	$48, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	%rbx, 40(%r14)
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_platform_get_resource_byname
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 32(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	32(%r14), %rdi
	jmp	LBB0_4
LBB0_5:
	movl	(%r15), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	callq	_platform_get_resource_byname
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 24(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	24(%r14), %rdi
	jmp	LBB0_4
LBB0_7:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_devm_clk_get
	movq	%rax, (%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	(%r14), %rdi
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_9:
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_dma_set_mask_and_coherent
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_warn
	jmp	LBB0_16
LBB0_11:
	movq	_HIFMC_DMA_MAX_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	16(%r14), %rdx
	movl	(%r12), %ecx
	movq	%rbx, %rdi
	callq	_dmam_alloc_coherent
	movl	%eax, 12(%r14)
	testl	%eax, %eax
	je	LBB0_1
## %bb.12:
	movq	(%r14), %rdi
	callq	_clk_prepare_enable
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.13:
	movq	%r14, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_mutex_init
	movq	%r14, %rdi
	callq	_hisi_spi_nor_init
	movq	%r14, %rdi
	callq	_hisi_spi_nor_register_all
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movq	%rbx, %rdi
	callq	_mutex_destroy
LBB0_15:
	movq	(%r14), %rdi
	callq	_clk_disable_unprepare
	jmp	LBB0_16
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_16:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"control"

L_.str.1:                               ## @.str.1
	.asciz	"memory"

L_.str.2:                               ## @.str.2
	.asciz	"Unable to set dma mask\n"

	.comm	_HIFMC_DMA_MAX_LEN,4,2          ## @HIFMC_DMA_MAX_LEN
	.no_dead_strip	_hisi_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 hisi_spi_nor_probe
_hisi_spi_nor_probe:                    ; @hisi_spi_nor_probe
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x0
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #48
	bl	_devm_kzalloc
	cbz	x0, LBB0_15
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	mov	x1, x19
	bl	_platform_set_drvdata
	str	x20, [x19, #40]
Lloh2:
	adrp	x21, _IORESOURCE_MEM@GOTPAGE
Lloh3:
	ldr	x21, [x21, _IORESOURCE_MEM@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh4:
	adrp	x2, l_.str@PAGE
Lloh5:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_platform_get_resource_byname
	mov	x1, x0
	mov	x0, x20
	bl	_devm_ioremap_resource
	str	x0, [x19, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x0, [x19, #32]
	b	LBB0_7
LBB0_3:
	ldr	w1, [x21]
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_platform_get_resource_byname
	mov	x1, x0
	mov	x0, x20
	bl	_devm_ioremap_resource
	str	x0, [x19, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x0, [x19, #24]
	b	LBB0_7
LBB0_5:
	mov	x0, x20
	mov	x1, #0
	bl	_devm_clk_get
	str	x0, [x19]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.6:
	ldr	x0, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_8:
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x20
	bl	_dma_set_mask_and_coherent
	cbz	w0, LBB0_10
; %bb.9:
	mov	x21, x0
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
	b	LBB0_16
LBB0_10:
Lloh10:
	adrp	x8, _HIFMC_DMA_MAX_LEN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HIFMC_DMA_MAX_LEN@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	add	x2, x19, #16
	ldr	w3, [x22]
	mov	x0, x20
	bl	_dmam_alloc_coherent
	str	w0, [x19, #12]
	cbz	w0, LBB0_15
; %bb.11:
	ldr	x0, [x19]
	bl	_clk_prepare_enable
	mov	x21, x0
	cbnz	w0, LBB0_16
; %bb.12:
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_init
	mov	x0, x19
	bl	_hisi_spi_nor_init
	mov	x0, x19
	bl	_hisi_spi_nor_register_all
	mov	x21, x0
	cbz	w0, LBB0_14
; %bb.13:
	mov	x0, x20
	bl	_mutex_destroy
LBB0_14:
	ldr	x0, [x19]
	bl	_clk_disable_unprepare
	b	LBB0_16
LBB0_15:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_16:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"control"

l_.str.1:                               ; @.str.1
	.asciz	"memory"

l_.str.2:                               ; @.str.2
	.asciz	"Unable to set dma mask\n"

	.comm	_HIFMC_DMA_MAX_LEN,4,2          ; @HIFMC_DMA_MAX_LEN
	.no_dead_strip	_hisi_spi_nor_probe
.subsections_via_symbols
