	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hisi_nfc_probe
_hisi_nfc_probe:                        ## @hisi_nfc_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	_HINFC504_MAX_CHIP@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	(%rdi), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$72, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r14
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%r12, 64(%rax)
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	%r14, %rbx
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_nand_to_mtd
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	testl	%eax, %eax
	js	LBB0_5
## %bb.2:
	movl	%eax, %r15d
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 8(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	8(%r14), %rdi
	jmp	LBB0_10
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_6:
	subl	(%rax), %r13d
LBB0_7:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_platform_get_resource
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, (%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	(%r14), %rdi
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_11:
	leaq	L_.str.2(%rip), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	%r12, 8(%rcx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_nand_set_controller_data
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_nand_set_flash_node
	movq	_hisi_nfc_cmdfunc@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%r14)
	movq	_hisi_nfc_select_chip@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r14)
	movq	_hisi_nfc_read_byte@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r14)
	movq	_hisi_nfc_write_buf@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r14)
	movq	_hisi_nfc_read_buf@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r14)
	movq	_HINFC504_CHIP_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r14)
	movq	_nand_get_set_features_notsupp@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r14)
	movq	%rax, 24(%r14)
	movq	%r14, %rdi
	callq	_hisi_nfc_host_init
	movq	_hinfc_irq_handle@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %r8
	movq	%r12, %rdi
	movl	%r15d, %esi
	xorl	%ecx, %ecx
	movq	%r14, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r13d
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
LBB0_13:
	movq	_hisi_nfc_controller_ops@GOTPCREL(%rip), %rax
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_nand_scan
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.14:
	xorl	%r13d, %r13d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_mtd_device_register
	testl	%eax, %eax
	je	LBB0_7
## %bb.15:
	movl	%eax, %r14d
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_nand_cleanup
	movl	%r14d, %r13d
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_HINFC504_MAX_CHIP,4,2          ## @HINFC504_MAX_CHIP
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no IRQ resource defined\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.1:                               ## @.str.1
	.asciz	"devm_ioremap_resource[1] fail\n"

L_.str.2:                               ## @.str.2
	.asciz	"hisi_nand"

	.comm	_hisi_nfc_cmdfunc,4,2           ## @hisi_nfc_cmdfunc
	.comm	_hisi_nfc_select_chip,4,2       ## @hisi_nfc_select_chip
	.comm	_hisi_nfc_read_byte,4,2         ## @hisi_nfc_read_byte
	.comm	_hisi_nfc_write_buf,4,2         ## @hisi_nfc_write_buf
	.comm	_hisi_nfc_read_buf,4,2          ## @hisi_nfc_read_buf
	.comm	_HINFC504_CHIP_DELAY,4,2        ## @HINFC504_CHIP_DELAY
	.comm	_nand_get_set_features_notsupp,8,3 ## @nand_get_set_features_notsupp
	.comm	_hinfc_irq_handle,4,2           ## @hinfc_irq_handle
L_.str.3:                               ## @.str.3
	.asciz	"nandc"

L_.str.4:                               ## @.str.4
	.asciz	"failed to request IRQ\n"

	.comm	_hisi_nfc_controller_ops,4,2    ## @hisi_nfc_controller_ops
L_.str.5:                               ## @.str.5
	.asciz	"Err MTD partition=%d\n"

	.no_dead_strip	_hisi_nfc_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hisi_nfc_probe
_hisi_nfc_probe:                        ; @hisi_nfc_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x8, _HINFC504_MAX_CHIP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HINFC504_MAX_CHIP@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	ldr	x25, [x0]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w1, #72
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x22, x0
	str	x19, [x0, #64]
	mov	x0, x19
	mov	x1, x22
	bl	_platform_set_drvdata
	add	x20, x22, #16
	mov	x0, x20
	bl	_nand_to_mtd
	mov	x23, x0
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	tbnz	w0, #31, LBB0_5
; %bb.2:
	mov	x24, x0
Lloh6:
	adrp	x26, _IORESOURCE_MEM@GOTPAGE
Lloh7:
	ldr	x26, [x26, _IORESOURCE_MEM@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	x0, [x22, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.3:
	ldr	x0, [x22, #8]
	b	LBB0_10
LBB0_4:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh12:
	adrp	x8, _ENXIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
	ldr	w1, [x26]
	mov	x0, x19
	mov	w2, #1
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	x0, [x22]
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.9:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x22]
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_PTR_ERR
LBB0_11:
Lloh16:
	adrp	x8, l_.str.2@PAGE
Lloh17:
	add	x8, x8, l_.str.2@PAGEOFF
	stp	x8, x19, [x23]
	mov	x0, x20
	mov	x1, x22
	bl	_nand_set_controller_data
	mov	x0, x20
	mov	x1, x25
	bl	_nand_set_flash_node
Lloh18:
	adrp	x8, _hisi_nfc_cmdfunc@GOTPAGE
Lloh19:
	ldr	x8, [x8, _hisi_nfc_cmdfunc@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _hisi_nfc_select_chip@GOTPAGE
Lloh22:
	ldr	x9, [x9, _hisi_nfc_select_chip@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	stp	w9, w8, [x22, #56]
Lloh24:
	adrp	x8, _hisi_nfc_read_byte@GOTPAGE
Lloh25:
	ldr	x8, [x8, _hisi_nfc_read_byte@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _hisi_nfc_write_buf@GOTPAGE
Lloh28:
	ldr	x9, [x9, _hisi_nfc_write_buf@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
Lloh30:
	adrp	x10, _hisi_nfc_read_buf@GOTPAGE
Lloh31:
	ldr	x10, [x10, _hisi_nfc_read_buf@GOTPAGEOFF]
	stp	w9, w8, [x22, #48]
Lloh32:
	ldr	w8, [x10]
Lloh33:
	adrp	x9, _HINFC504_CHIP_DELAY@GOTPAGE
Lloh34:
	ldr	x9, [x9, _HINFC504_CHIP_DELAY@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	stp	w9, w8, [x22, #40]
Lloh36:
	adrp	x8, _nand_get_set_features_notsupp@GOTPAGE
Lloh37:
	ldr	x8, [x8, _nand_get_set_features_notsupp@GOTPAGEOFF]
Lloh38:
	ldr	x8, [x8]
	stp	x8, x8, [x22, #24]
	mov	x0, x22
	bl	_hisi_nfc_host_init
Lloh39:
	adrp	x8, _hinfc_irq_handle@GOTPAGE
Lloh40:
	ldr	x8, [x8, _hinfc_irq_handle@GOTPAGEOFF]
Lloh41:
	ldr	w2, [x8]
Lloh42:
	adrp	x4, l_.str.3@PAGE
Lloh43:
	add	x4, x4, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, x24
	mov	w3, #0
	mov	x5, x22
	bl	_devm_request_irq
	cbz	w0, LBB0_13
; %bb.12:
	mov	x22, x0
Lloh44:
	adrp	x1, l_.str.4@PAGE
Lloh45:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_7
LBB0_13:
Lloh46:
	adrp	x8, _hisi_nfc_controller_ops@GOTPAGE
Lloh47:
	ldr	x8, [x8, _hisi_nfc_controller_ops@GOTPAGEOFF]
	str	x8, [x20]
	mov	x0, x20
	mov	x1, x21
	bl	_nand_scan
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.14:
	mov	x0, x23
	mov	x1, #0
	mov	w2, #0
	bl	_mtd_device_register
	mov	x22, x0
	cbz	w0, LBB0_7
; %bb.15:
	str	x22, [sp]
Lloh48:
	adrp	x1, l_.str.5@PAGE
Lloh49:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x20
	bl	_nand_cleanup
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_HINFC504_MAX_CHIP,4,2          ; @HINFC504_MAX_CHIP
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no IRQ resource defined\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.1:                               ; @.str.1
	.asciz	"devm_ioremap_resource[1] fail\n"

l_.str.2:                               ; @.str.2
	.asciz	"hisi_nand"

	.comm	_hisi_nfc_cmdfunc,4,2           ; @hisi_nfc_cmdfunc
	.comm	_hisi_nfc_select_chip,4,2       ; @hisi_nfc_select_chip
	.comm	_hisi_nfc_read_byte,4,2         ; @hisi_nfc_read_byte
	.comm	_hisi_nfc_write_buf,4,2         ; @hisi_nfc_write_buf
	.comm	_hisi_nfc_read_buf,4,2          ; @hisi_nfc_read_buf
	.comm	_HINFC504_CHIP_DELAY,4,2        ; @HINFC504_CHIP_DELAY
	.comm	_nand_get_set_features_notsupp,8,3 ; @nand_get_set_features_notsupp
	.comm	_hinfc_irq_handle,4,2           ; @hinfc_irq_handle
l_.str.3:                               ; @.str.3
	.asciz	"nandc"

l_.str.4:                               ; @.str.4
	.asciz	"failed to request IRQ\n"

	.comm	_hisi_nfc_controller_ops,4,2    ; @hisi_nfc_controller_ops
l_.str.5:                               ; @.str.5
	.asciz	"Err MTD partition=%d\n"

	.no_dead_strip	_hisi_nfc_probe
.subsections_via_symbols
