	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3c24xx_nand_remove
_s3c24xx_nand_remove:                   ## @s3c24xx_nand_remove
	.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
	callq	_to_nand_info
	movq	%rax, %r14
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_platform_set_drvdata
	testq	%r14, %r14
	je	LBB0_17
## %bb.1:
	movq	%r14, %rdi
	callq	_s3c2410_nand_cpufreq_deregister
	movq	32(%r14), %r15
	testq	%r15, %r15
	je	LBB0_7
## %bb.2:
	cmpl	$0, (%r14)
	jle	LBB0_6
## %bb.3:
	xorl	%ebx, %ebx
	leaq	L_.str(%rip), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	callq	_pr_debug
	leaq	40(%r15), %rdi
	callq	_nand_release
	incl	%ebx
	addq	$48, %r15
	cmpl	(%r14), %ebx
	jl	LBB0_4
## %bb.5:
	movq	32(%r14), %r15
LBB0_6:
	movq	%r15, %rdi
	callq	_kfree
LBB0_7:
	movq	24(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.8:
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movq	%r14, %rdi
	callq	_allow_clk_stop
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movq	24(%r14), %rdi
	callq	_clk_disable
LBB0_11:
	movq	24(%r14), %rdi
	callq	_clk_put
LBB0_12:
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:
	callq	_iounmap
	movq	$0, 16(%r14)
LBB0_14:
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.15:
	callq	_release_resource
	movq	8(%r14), %rdi
	callq	_kfree
	movq	$0, 8(%r14)
LBB0_16:
	movq	%r14, %rdi
	callq	_kfree
LBB0_17:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"releasing mtd %d (%p)\n"

	.no_dead_strip	_s3c24xx_nand_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3c24xx_nand_remove
_s3c24xx_nand_remove:                   ; @s3c24xx_nand_remove
	.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
	bl	_to_nand_info
	mov	x19, x0
	mov	x0, x20
	mov	x1, #0
	bl	_platform_set_drvdata
	cbz	x19, LBB0_17
; %bb.1:
	mov	x0, x19
	bl	_s3c2410_nand_cpufreq_deregister
	ldr	x20, [x19, #32]
	cbz	x20, LBB0_7
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	w21, #0
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_pr_debug
	add	x0, x20, #40
	bl	_nand_release
	add	w21, w21, #1
	ldr	w8, [x19]
	add	x20, x20, #48
	cmp	w21, w8
	b.lt	LBB0_4
; %bb.5:
	ldr	x20, [x19, #32]
LBB0_6:
	mov	x0, x20
	bl	_kfree
LBB0_7:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_12
; %bb.8:
	bl	_IS_ERR
	cbnz	w0, LBB0_12
; %bb.9:
	mov	x0, x19
	bl	_allow_clk_stop
	cbnz	w0, LBB0_11
; %bb.10:
	ldr	x0, [x19, #24]
	bl	_clk_disable
LBB0_11:
	ldr	x0, [x19, #24]
	bl	_clk_put
LBB0_12:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_14
; %bb.13:
	bl	_iounmap
	str	xzr, [x19, #16]
LBB0_14:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_16
; %bb.15:
	bl	_release_resource
	ldr	x0, [x19, #8]
	bl	_kfree
	str	xzr, [x19, #8]
LBB0_16:
	mov	x0, x19
	bl	_kfree
LBB0_17:
	mov	w0, #0
	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 AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"releasing mtd %d (%p)\n"

	.no_dead_strip	_s3c24xx_nand_remove
.subsections_via_symbols
