	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pasemi_nand_probe
_pasemi_nand_probe:                     ## @pasemi_nand_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	xorl	%r12d, %r12d
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_of_address_to_resource
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_20
LBB0_2:
	movq	_pasemi_nand_mtd@GOTPCREL(%rip), %r13
	cmpq	$0, (%r13)
	je	LBB0_5
## %bb.3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_20
LBB0_5:
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	callq	_dev_dbg
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.6:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_nand_to_mtd
	movq	%rax, (%r13)
	movq	%r15, (%rax)
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_of_iomap
	movl	%eax, (%r14)
	movl	%eax, 32(%r14)
	testl	%eax, %eax
	je	LBB0_14
## %bb.7:
	movq	_PCI_VENDOR_ID_PASEMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r12d, %r12d
	movl	$40968, %esi                    ## imm = 0xA008
	xorl	%edx, %edx
	callq	_pci_get_device
	testq	%rax, %rax
	je	LBB0_15
## %bb.8:
	movq	%rax, %rbx
	xorl	%r12d, %r12d
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_start
	movq	_lpcctl@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	%rbx, %rdi
	movq	%rcx, %rbx
	callq	_pci_dev_put
	movl	(%rbx), %edi
	movq	_driver_name@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_request_region
	testl	%eax, %eax
	je	LBB0_16
## %bb.9:
	movq	_pasemi_hwcontrol@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r14)
	movq	_pasemi_device_ready@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movq	_pasemi_read_buf@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
	movq	_pasemi_write_buf@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	$0, 8(%r14)
	movq	_NAND_ECC_SOFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r14)
	movq	_NAND_ECC_HAMMING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r14)
	movq	_NAND_BBT_USE_FLASH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r14)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_nand_scan
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.10:
	movq	(%r13), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_mtd_device_register
	testq	%rax, %rax
	je	LBB0_21
## %bb.11:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_12:
	movl	(%rbx), %edi
	movl	$4, %esi
	callq	_release_region
	jmp	LBB0_18
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_14:
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_19
LBB0_15:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_16:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_17:
	subl	(%rax), %r12d
LBB0_18:
	movl	(%r14), %edi
	callq	_iounmap
LBB0_19:
	movq	%r14, %rdi
	callq	_kfree
LBB0_20:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movl	(%rbx), %ecx
	leaq	L_.str.2(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	callq	_dev_info
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_pasemi_nand_mtd,8,3            ## @pasemi_nand_mtd
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pasemi_nand at %pR\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EIO,4,2                        ## @EIO
	.comm	_PCI_VENDOR_ID_PASEMI,4,2       ## @PCI_VENDOR_ID_PASEMI
	.comm	_lpcctl,4,2                     ## @lpcctl
	.comm	_driver_name,4,2                ## @driver_name
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_pasemi_hwcontrol,4,2           ## @pasemi_hwcontrol
	.comm	_pasemi_device_ready,4,2        ## @pasemi_device_ready
	.comm	_pasemi_read_buf,4,2            ## @pasemi_read_buf
	.comm	_pasemi_write_buf,4,2           ## @pasemi_write_buf
	.comm	_NAND_ECC_SOFT,4,2              ## @NAND_ECC_SOFT
	.comm	_NAND_ECC_HAMMING,4,2           ## @NAND_ECC_HAMMING
	.comm	_NAND_BBT_USE_FLASH,4,2         ## @NAND_BBT_USE_FLASH
L_.str.1:                               ## @.str.1
	.asciz	"Unable to register MTD device\n"

L_.str.2:                               ## @.str.2
	.asciz	"PA Semi NAND flash at %pR, control at I/O %x\n"

	.no_dead_strip	_pasemi_nand_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pasemi_nand_probe
_pasemi_nand_probe:                     ; @pasemi_nand_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	x20, x0
	ldr	x21, [x0]
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #0
	bl	_of_address_to_resource
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh2:
	adrp	x22, _pasemi_nand_mtd@GOTPAGE
Lloh3:
	ldr	x22, [x22, _pasemi_nand_mtd@GOTPAGEOFF]
	ldr	x8, [x22]
	cbz	x8, LBB0_6
; %bb.3:
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	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_6:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	mov	x0, x20
	bl	_dev_dbg
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w0, #56
	bl	_kzalloc
	cbz	x0, LBB0_14
; %bb.7:
	mov	x19, x0
	bl	_nand_to_mtd
	str	x0, [x22]
	str	x20, [x0]
	mov	x0, x21
	mov	w1, #0
	bl	_of_iomap
	str	w0, [x19]
	str	w0, [x19, #32]
	cbz	w0, LBB0_15
; %bb.8:
Lloh11:
	adrp	x8, _PCI_VENDOR_ID_PASEMI@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PCI_VENDOR_ID_PASEMI@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	w1, #40968
	mov	x2, #0
	bl	_pci_get_device
	cbz	x0, LBB0_16
; %bb.9:
	mov	x21, x0
	mov	w1, #0
	bl	_pci_resource_start
Lloh14:
	adrp	x23, _lpcctl@GOTPAGE
Lloh15:
	ldr	x23, [x23, _lpcctl@GOTPAGEOFF]
	str	w0, [x23]
	mov	x0, x21
	bl	_pci_dev_put
	ldr	w0, [x23]
Lloh16:
	adrp	x8, _driver_name@GOTPAGE
Lloh17:
	ldr	x8, [x8, _driver_name@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_request_region
	cbz	w0, LBB0_17
; %bb.10:
Lloh19:
	adrp	x8, _pasemi_hwcontrol@GOTPAGE
Lloh20:
	ldr	x8, [x8, _pasemi_hwcontrol@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _pasemi_device_ready@GOTPAGE
Lloh23:
	ldr	x9, [x9, _pasemi_device_ready@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #24]
Lloh25:
	adrp	x8, _pasemi_read_buf@GOTPAGE
Lloh26:
	ldr	x8, [x8, _pasemi_read_buf@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _pasemi_write_buf@GOTPAGE
Lloh29:
	ldr	x9, [x9, _pasemi_write_buf@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #16]
	str	xzr, [x19, #8]
Lloh31:
	adrp	x8, _NAND_ECC_SOFT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _NAND_ECC_SOFT@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	str	w8, [x19, #48]
Lloh34:
	adrp	x8, _NAND_ECC_HAMMING@GOTPAGE
Lloh35:
	ldr	x8, [x8, _NAND_ECC_HAMMING@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	adrp	x9, _NAND_BBT_USE_FLASH@GOTPAGE
Lloh38:
	ldr	x9, [x9, _NAND_BBT_USE_FLASH@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #40]
	mov	x0, x19
	mov	w1, #1
	bl	_nand_scan
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.11:
	ldr	x0, [x22]
	mov	x1, #0
	mov	w2, #0
	bl	_mtd_device_register
	cbz	x0, LBB0_21
; %bb.12:
Lloh40:
	adrp	x1, l_.str.1@PAGE
Lloh41:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh42:
	adrp	x8, _ENODEV@GOTPAGE
Lloh43:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_13:
	ldr	w0, [x23]
	mov	w1, #4
	bl	_release_region
	b	LBB0_19
LBB0_14:
Lloh45:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh46:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_15:
Lloh47:
	adrp	x8, _EIO@GOTPAGE
Lloh48:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_20
LBB0_16:
Lloh50:
	adrp	x8, _ENODEV@GOTPAGE
Lloh51:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh52:
	adrp	x8, _EBUSY@GOTPAGE
Lloh53:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_19:
	ldr	w0, [x19]
	bl	_iounmap
LBB0_20:
	mov	x0, x19
	bl	_kfree
	b	LBB0_5
LBB0_21:
	ldr	w3, [x23]
Lloh54:
	adrp	x1, l_.str.2@PAGE
Lloh55:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #8
	mov	x0, x20
	bl	_dev_info
	mov	w21, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpAdd	Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_pasemi_nand_mtd,8,3            ; @pasemi_nand_mtd
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pasemi_nand at %pR\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EIO,4,2                        ; @EIO
	.comm	_PCI_VENDOR_ID_PASEMI,4,2       ; @PCI_VENDOR_ID_PASEMI
	.comm	_lpcctl,4,2                     ; @lpcctl
	.comm	_driver_name,4,2                ; @driver_name
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_pasemi_hwcontrol,4,2           ; @pasemi_hwcontrol
	.comm	_pasemi_device_ready,4,2        ; @pasemi_device_ready
	.comm	_pasemi_read_buf,4,2            ; @pasemi_read_buf
	.comm	_pasemi_write_buf,4,2           ; @pasemi_write_buf
	.comm	_NAND_ECC_SOFT,4,2              ; @NAND_ECC_SOFT
	.comm	_NAND_ECC_HAMMING,4,2           ; @NAND_ECC_HAMMING
	.comm	_NAND_BBT_USE_FLASH,4,2         ; @NAND_BBT_USE_FLASH
l_.str.1:                               ; @.str.1
	.asciz	"Unable to register MTD device\n"

l_.str.2:                               ; @.str.2
	.asciz	"PA Semi NAND flash at %pR, control at I/O %x\n"

	.no_dead_strip	_pasemi_nand_probe
.subsections_via_symbols
