	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_nand_probe
_omap_nand_probe:                       ## @omap_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, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	$112, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r13
	movq	%r14, 104(%rax)
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_omap_get_dt_info
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_29
## %bb.4:
	leaq	100(%r13), %rdi
	movl	28(%r13), %esi
	callq	_gpmc_omap_get_nand_ops
	movl	%eax, 96(%r13)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	%r13, %r15
	addq	$32, %r15
	movq	%r15, %rdi
	callq	_nand_to_mtd
	movq	%rax, %rbx
	movq	%r14, 8(%rax)
	movq	$0, 40(%r13)
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_nand_set_flash_node
	cmpq	$0, (%rbx)
	jne	LBB0_9
## %bb.7:
	movl	(%r12), %esi
	movl	28(%r13), %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_devm_kasprintf
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_8
LBB0_9:
	movq	%rbx, %r12
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 72(%r13)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	72(%r13), %rdi
	jmp	LBB0_11
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_12:
	movl	(%rbx), %eax
	movl	%eax, 24(%r13)
	movq	_omap_gpmc_controller_initialized@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jne	LBB0_14
## %bb.13:
	movq	_omap_nand_controller_ops@GOTPCREL(%rip), %rax
	movq	_omap_gpmc_controller@GOTPCREL(%rip), %rdi
	movq	%rax, (%rdi)
	callq	_nand_controller_init
	movl	$1, (%rbx)
LBB0_14:
	movq	_omap_gpmc_controller@GOTPCREL(%rip), %rax
	movq	%rax, 88(%r13)
	movq	72(%r13), %rax
	movq	%rax, 80(%r13)
	movq	_omap_hwcontrol@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%r13)
	movq	_GPIOD_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get_optional
	movq	%rax, 16(%r13)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	16(%r13), %rdi
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_29:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	cmpq	$0, 16(%r13)
	je	LBB0_18
## %bb.17:
	movq	_omap_dev_ready@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%r13)
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_18:
	movq	_omap_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%r13)
	movl	$50, %eax
LBB0_19:
	movl	%eax, 56(%r13)
	cmpq	$0, 8(%r13)
	je	LBB0_21
## %bb.20:
	movq	_NAND_BBT_USE_FLASH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 48(%r13)
LBB0_21:
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r13), %eax
	orl	%eax, 32(%r13)
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_nand_scan
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
## %bb.22:
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_mtd_device_register
	testl	%eax, %eax
	je	LBB0_23
## %bb.24:
	movq	%r15, %rdi
	movl	%eax, %ebx
	callq	_nand_cleanup
                                        ## kill: def $ebx killed $ebx def $rbx
LBB0_25:
	movl	4(%r13), %edi
	callq	_IS_ERR_OR_NULL
	testl	%eax, %eax
	jne	LBB0_27
## %bb.26:
	movl	4(%r13), %edi
	callq	_dma_release_channel
LBB0_27:
	movq	40(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_29
## %bb.28:
	callq	_nand_bch_free
	movq	$0, 40(%r13)
	jmp	LBB0_29
LBB0_23:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_platform_set_drvdata
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get GPMC->NAND interface\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"omap2-nand.%d"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to set MTD name\n"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_omap_gpmc_controller_initialized,4,2 ## @omap_gpmc_controller_initialized
	.comm	_omap_nand_controller_ops,4,2   ## @omap_nand_controller_ops
	.comm	_omap_gpmc_controller,8,3       ## @omap_gpmc_controller
	.comm	_omap_hwcontrol,4,2             ## @omap_hwcontrol
L_.str.3:                               ## @.str.3
	.asciz	"rb"

	.comm	_GPIOD_IN,4,2                   ## @GPIOD_IN
L_.str.4:                               ## @.str.4
	.asciz	"failed to get ready gpio\n"

	.comm	_omap_dev_ready,4,2             ## @omap_dev_ready
	.comm	_omap_wait,4,2                  ## @omap_wait
	.comm	_NAND_BBT_USE_FLASH,4,2         ## @NAND_BBT_USE_FLASH
	.comm	_NAND_BUSWIDTH_16,4,2           ## @NAND_BUSWIDTH_16
	.no_dead_strip	_omap_nand_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_nand_probe
_omap_nand_probe:                       ; @omap_nand_probe
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	w1, #112
	bl	_devm_kzalloc
	cbz	x0, LBB0_14
; %bb.1:
	mov	x19, x0
	str	x20, [x0, #104]
	mov	x0, x20
	mov	x1, x19
	bl	_omap_get_dt_info
	mov	x23, x0
	cbnz	w0, LBB0_16
; %bb.2:
	add	x0, x19, #100
	ldr	w1, [x19, #28]
	bl	_gpmc_omap_get_nand_ops
	str	w0, [x19, #96]
	cbz	w0, LBB0_7
; %bb.3:
	add	x21, x19, #32
	mov	x0, x21
	bl	_nand_to_mtd
	mov	x22, x0
	str	x20, [x0, #8]
	str	xzr, [x19, #40]
	ldr	w1, [x20]
	mov	x0, x21
	bl	_nand_set_flash_node
	ldr	x8, [x22]
	cbnz	x8, LBB0_5
; %bb.4:
	ldr	w1, [x24]
	ldr	w3, [x19, #28]
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_devm_kasprintf
	str	x0, [x22]
	cbz	x0, LBB0_13
LBB0_5:
Lloh4:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_platform_get_resource
	mov	x23, x0
	mov	x0, x20
	mov	x1, x23
	bl	_devm_ioremap_resource
	str	x0, [x19, #72]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.6:
	ldr	x0, [x19, #72]
	b	LBB0_12
LBB0_7:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_15
LBB0_8:
	ldr	w8, [x23]
	str	w8, [x19, #24]
Lloh11:
	adrp	x24, _omap_gpmc_controller_initialized@GOTPAGE
Lloh12:
	ldr	x24, [x24, _omap_gpmc_controller_initialized@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh13:
	adrp	x23, _omap_gpmc_controller@GOTPAGE
Lloh14:
	ldr	x23, [x23, _omap_gpmc_controller@GOTPAGEOFF]
	cbnz	w8, LBB0_10
; %bb.9:
Lloh15:
	adrp	x8, _omap_nand_controller_ops@GOTPAGE
Lloh16:
	ldr	x8, [x8, _omap_nand_controller_ops@GOTPAGEOFF]
	str	x8, [x23]
	mov	x0, x23
	bl	_nand_controller_init
	mov	w8, #1
	str	w8, [x24]
LBB0_10:
	ldr	x8, [x19, #72]
Lloh17:
	adrp	x9, _omap_hwcontrol@GOTPAGE
Lloh18:
	ldr	x9, [x9, _omap_hwcontrol@GOTPAGEOFF]
	stp	x8, x23, [x19, #80]
Lloh19:
	ldr	w8, [x9]
	str	w8, [x19, #68]
Lloh20:
	adrp	x8, _GPIOD_IN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _GPIOD_IN@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_devm_gpiod_get_optional
	str	x0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_17
; %bb.11:
Lloh25:
	adrp	x1, l_.str.4@PAGE
Lloh26:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x19, #16]
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_13:
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_14:
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_16:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_17:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_19
; %bb.18:
	mov	w8, #0
Lloh31:
	adrp	x9, _omap_dev_ready@GOTPAGE
Lloh32:
	ldr	x9, [x9, _omap_dev_ready@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	str	w9, [x19, #64]
	b	LBB0_20
LBB0_19:
Lloh34:
	adrp	x8, _omap_wait@GOTPAGE
Lloh35:
	ldr	x8, [x8, _omap_wait@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	str	w8, [x19, #60]
	mov	w8, #50
LBB0_20:
	str	w8, [x19, #56]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_22
; %bb.21:
Lloh37:
	adrp	x8, _NAND_BBT_USE_FLASH@GOTPAGE
Lloh38:
	ldr	x8, [x8, _NAND_BBT_USE_FLASH@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	ldr	w9, [x19, #48]
	orr	w8, w9, w8
	str	w8, [x19, #48]
LBB0_22:
Lloh40:
	adrp	x8, _NAND_BUSWIDTH_16@GOTPAGE
Lloh41:
	ldr	x8, [x8, _NAND_BUSWIDTH_16@GOTPAGEOFF]
	ldr	w9, [x19]
Lloh42:
	ldr	w8, [x8]
	and	w8, w8, w9
	ldr	w9, [x19, #32]
	orr	w8, w9, w8
	str	w8, [x19, #32]
	mov	x0, x21
	mov	w1, #1
	bl	_nand_scan
	mov	x23, x0
	cbnz	w0, LBB0_25
; %bb.23:
	mov	x0, x22
	mov	x1, #0
	mov	w2, #0
	bl	_mtd_device_register
	mov	x23, x0
	cbz	w0, LBB0_29
; %bb.24:
	mov	x0, x21
	bl	_nand_cleanup
LBB0_25:
	ldr	w0, [x19, #4]
	bl	_IS_ERR_OR_NULL
	cbnz	w0, LBB0_27
; %bb.26:
	ldr	w0, [x19, #4]
	bl	_dma_release_channel
LBB0_27:
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_16
; %bb.28:
	bl	_nand_bch_free
	str	xzr, [x19, #40]
	b	LBB0_16
LBB0_29:
	mov	x0, x20
	mov	x1, x22
	bl	_platform_set_drvdata
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get GPMC->NAND interface\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"omap2-nand.%d"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to set MTD name\n"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_omap_gpmc_controller_initialized,4,2 ; @omap_gpmc_controller_initialized
	.comm	_omap_nand_controller_ops,4,2   ; @omap_nand_controller_ops
	.comm	_omap_gpmc_controller,8,3       ; @omap_gpmc_controller
	.comm	_omap_hwcontrol,4,2             ; @omap_hwcontrol
l_.str.3:                               ; @.str.3
	.asciz	"rb"

	.comm	_GPIOD_IN,4,2                   ; @GPIOD_IN
l_.str.4:                               ; @.str.4
	.asciz	"failed to get ready gpio\n"

	.comm	_omap_dev_ready,4,2             ; @omap_dev_ready
	.comm	_omap_wait,4,2                  ; @omap_wait
	.comm	_NAND_BBT_USE_FLASH,4,2         ; @NAND_BBT_USE_FLASH
	.comm	_NAND_BUSWIDTH_16,4,2           ; @NAND_BUSWIDTH_16
	.no_dead_strip	_omap_nand_probe
.subsections_via_symbols
