	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3c24xx_nand_probe
_s3c24xx_nand_probe:                    ## @s3c24xx_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
	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, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	$56, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	%r12, %rdi
	addq	$48, %rdi
	callq	_nand_controller_init
	movq	_s3c24xx_nand_controller_ops@GOTPCREL(%rip), %rax
	movq	%rax, 48(%r12)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_clk_get
	movl	%eax, 40(%r12)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movq	_CLOCK_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_s3c2410_nand_clk_set_state
	cmpq	$0, (%r14)
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_s3c24xx_nand_probe_dt
	jmp	LBB0_8
LBB0_7:
	movq	%r14, %rdi
	callq	_s3c24xx_nand_probe_pdata
LBB0_8:
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movq	%r14, %rdi
	callq	_to_nand_plat
	movq	%rax, %r15
	movq	8(%r14), %rbx
	movq	%rbx, %rdi
	callq	_resource_size
	movq	%r14, 32(%r12)
	movq	%r15, 24(%r12)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 16(%r12)
	movl	%eax, %edi
	callq	_IS_ERR
	movl	16(%r12), %edx
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movl	%edx, %edi
	callq	_PTR_ERR
LBB0_11:
	movl	%eax, %r15d
	jmp	LBB0_12
LBB0_13:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	movq	8(%r15), %rbx
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.14:
	movl	(%r15), %r15d
	testl	%r15d, %r15d
	jle	LBB0_15
## %bb.16:
	movl	%r15d, (%r12)
	leal	(,%r15,4), %esi
	movl	(%r13), %edx
	movq	%r14, %rdi
	callq	_devm_kzalloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_1
## %bb.17:
	movq	%rax, %r13
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_nand_to_mtd
	movq	%rax, %r15
	leaq	L_.str.3(%rip), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r13, %rdx
	movq	%r12, %rcx
	callq	_pr_debug
	movq	%r14, (%r15)
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_s3c2410_nand_init_chip
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_nand_scan
	testl	%eax, %eax
	jne	LBB0_11
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_s3c2410_nand_add_partition
	addq	$4, %r13
	addq	$4, %rbx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incq	%rax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpl	%eax, %r15d
	jne	LBB0_18
## %bb.20:
	movq	%r12, %rdi
	callq	_s3c2410_nand_inithw
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.21:
	movq	%r12, %rdi
	callq	_s3c2410_nand_cpufreq_register
	testl	%eax, %eax
	js	LBB0_22
## %bb.23:
	movq	%r12, %rdi
	callq	_allow_clk_suspend
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	movq	_CLOCK_SUSPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_s3c2410_nand_clk_set_state
	jmp	LBB0_25
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_12:
	movq	%r14, %rdi
	callq	_s3c24xx_nand_remove
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testl	%r15d, %r15d
	cmovnel	%r15d, %ebx
LBB0_25:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_22:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_s3c24xx_nand_controller_ops,4,2 ## @s3c24xx_nand_controller_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nand"

L_.str.1:                               ## @.str.1
	.asciz	"failed to get clock\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_CLOCK_ENABLE,4,2               ## @CLOCK_ENABLE
L_.str.2:                               ## @.str.2
	.asciz	"mapped registers at %p\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"initialising set %d (%p, info %p)\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to init cpufreq support\n"

L_.str.5:                               ## @.str.5
	.asciz	"clock idle support enabled\n"

	.comm	_CLOCK_SUSPEND,4,2              ## @CLOCK_SUSPEND
	.no_dead_strip	_s3c24xx_nand_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3c24xx_nand_probe
_s3c24xx_nand_probe:                    ; @s3c24xx_nand_probe
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	w1, #56
	bl	_devm_kzalloc
Lloh2:
	adrp	x26, _EINVAL@GOTPAGE
Lloh3:
	ldr	x26, [x26, _EINVAL@GOTPAGEOFF]
	cbz	x0, LBB0_19
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	add	x0, x20, #48
	bl	_nand_controller_init
Lloh4:
	adrp	x8, _s3c24xx_nand_controller_ops@GOTPAGE
Lloh5:
	ldr	x8, [x8, _s3c24xx_nand_controller_ops@GOTPAGEOFF]
	str	x8, [x20, #48]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_clk_get
	str	w0, [x20, #40]
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh10:
	adrp	x8, _ENOENT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_20
LBB0_3:
Lloh12:
	adrp	x8, _CLOCK_ENABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CLOCK_ENABLE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_s3c2410_nand_clk_set_state
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_s3c24xx_nand_probe_dt
	mov	x24, x0
	cbnz	w0, LBB0_22
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_s3c24xx_nand_probe_pdata
	mov	x24, x0
	cbnz	w0, LBB0_22
LBB0_6:
	mov	x0, x19
	bl	_to_nand_plat
	mov	x22, x0
	ldr	x21, [x19, #8]
	mov	x0, x21
	bl	_resource_size
	stp	x22, x19, [x20, #24]
	mov	x0, x19
	mov	x1, x21
	bl	_devm_ioremap_resource
	str	w0, [x20, #16]
	bl	_IS_ERR
	ldr	w2, [x20, #16]
	cbz	x0, LBB0_9
; %bb.7:
	mov	x0, x2
	bl	_PTR_ERR
LBB0_8:
	mov	x24, x0
	b	LBB0_22
LBB0_9:
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	x21, [x22, #8]
	cbz	x21, LBB0_24
; %bb.10:
	ldr	w27, [x22]
	cmp	w27, #0
	b.le	LBB0_24
; %bb.11:
	str	w27, [x20]
	lsl	w1, w27, #2
	ldr	w2, [x23]
	mov	x0, x19
	bl	_devm_kzalloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_19
; %bb.12:
	mov	x22, x0
	mov	x23, #0
Lloh17:
	adrp	x25, l_.str.3@PAGE
Lloh18:
	add	x25, x25, l_.str.3@PAGEOFF
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_nand_to_mtd
	mov	x24, x0
	mov	x0, x25
	mov	x1, x23
	mov	x2, x22
	mov	x3, x20
	bl	_pr_debug
	str	x19, [x24]
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	_s3c2410_nand_init_chip
	ldr	w1, [x21]
	mov	x0, x22
	bl	_nand_scan
	cbnz	w0, LBB0_8
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	_s3c2410_nand_add_partition
	add	x22, x22, #4
	add	x21, x21, #4
	add	x23, x23, #1
	cmp	w27, w23
	b.ne	LBB0_13
; %bb.15:
	mov	x0, x20
	bl	_s3c2410_nand_inithw
	mov	x24, x0
	cbnz	w0, LBB0_22
; %bb.16:
	mov	x0, x20
	bl	_s3c2410_nand_cpufreq_register
	tbnz	w0, #31, LBB0_25
; %bb.17:
	mov	x0, x20
	bl	_allow_clk_suspend
	cbz	x0, LBB0_23
; %bb.18:
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_info
Lloh21:
	adrp	x8, _CLOCK_SUSPEND@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CLOCK_SUSPEND@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_s3c2410_nand_clk_set_state
	mov	w0, #0
	b	LBB0_23
LBB0_19:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_20:
	ldr	w8, [x8]
LBB0_21:
	neg	w24, w8
LBB0_22:
	mov	x0, x19
	bl	_s3c24xx_nand_remove
	ldr	w8, [x26]
	cmp	w24, #0
	csneg	w0, w24, w8, ne
LBB0_23:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_24:
	ldr	w8, [x26]
	b	LBB0_21
LBB0_25:
	mov	x24, x0
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_22
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_s3c24xx_nand_controller_ops,4,2 ; @s3c24xx_nand_controller_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nand"

l_.str.1:                               ; @.str.1
	.asciz	"failed to get clock\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_CLOCK_ENABLE,4,2               ; @CLOCK_ENABLE
l_.str.2:                               ; @.str.2
	.asciz	"mapped registers at %p\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"initialising set %d (%p, info %p)\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to init cpufreq support\n"

l_.str.5:                               ; @.str.5
	.asciz	"clock idle support enabled\n"

	.comm	_CLOCK_SUSPEND,4,2              ; @CLOCK_SUSPEND
	.no_dead_strip	_s3c24xx_nand_probe
.subsections_via_symbols
