	.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
	callq	_to_nand_info
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_s3c2410_nand_cpufreq_deregister
	movq	8(%r14), %r15
	testq	%r15, %r15
	je	LBB0_5
## %bb.2:
	cmpl	$0, (%r14)
	jle	LBB0_5
## %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
	movq	%r15, %rdi
	callq	_nand_release
	incl	%ebx
	addq	$4, %r15
	cmpl	(%r14), %ebx
	jl	LBB0_4
LBB0_5:
	movl	4(%r14), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_CLOCK_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_s3c2410_nand_clk_set_state
LBB0_7:
	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"

	.comm	_CLOCK_DISABLE,4,2              ## @CLOCK_DISABLE
	.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
	bl	_to_nand_info
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	bl	_s3c2410_nand_cpufreq_deregister
	ldr	x20, [x19, #8]
	cbz	x20, LBB0_5
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_5
; %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
	mov	x0, x20
	bl	_nand_release
	add	w21, w21, #1
	add	x20, x20, #4
	ldr	w8, [x19]
	cmp	w21, w8
	b.lt	LBB0_4
LBB0_5:
	ldr	w0, [x19, #4]
	bl	_IS_ERR
	cbnz	w0, LBB0_7
; %bb.6:
Lloh2:
	adrp	x8, _CLOCK_DISABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CLOCK_DISABLE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_s3c2410_nand_clk_set_state
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"releasing mtd %d (%p)\n"

	.comm	_CLOCK_DISABLE,4,2              ; @CLOCK_DISABLE
	.no_dead_strip	_s3c24xx_nand_remove
.subsections_via_symbols
