	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pxa3xx_nand_remove
_pxa3xx_nand_remove:                    ## @pxa3xx_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_platform_get_drvdata
	movq	%rax, %r14
	movq	(%rax), %rbx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_platform_set_drvdata
	movq	%r14, %rdi
	callq	_del_mtd_device
	movq	%r14, %rdi
	callq	_del_mtd_partitions
	movq	_IRQ_NAND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_free_irq
	movq	_use_dma@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movl	24(%rbx), %edi
	callq	_pxa_free_dma
	movl	20(%rbx), %esi
	movq	8(%rbx), %rdx
	movl	16(%rbx), %ecx
	movq	%r15, %rdi
	callq	_dma_free_writecombine
	jmp	LBB0_3
LBB0_2:
	movq	8(%rbx), %rdi
	callq	_kfree
LBB0_3:
	movl	4(%rbx), %edi
	callq	_iounmap
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movl	(%rax), %r15d
	movq	%rax, %rdi
	callq	_resource_size
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_release_mem_region
	movl	(%rbx), %edi
	callq	_clk_disable
	movl	(%rbx), %edi
	callq	_clk_put
	movq	%r14, %rdi
	callq	_kfree
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_NAND,4,2                   ## @IRQ_NAND
	.comm	_use_dma,8,3                    ## @use_dma
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.no_dead_strip	_pxa3xx_nand_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pxa3xx_nand_remove
_pxa3xx_nand_remove:                    ; @pxa3xx_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	x21, x0
	bl	_platform_get_drvdata
	mov	x19, x0
	ldr	x20, [x0]
	mov	x0, x21
	mov	x1, #0
	bl	_platform_set_drvdata
	mov	x0, x19
	bl	_del_mtd_device
	mov	x0, x19
	bl	_del_mtd_partitions
Lloh0:
	adrp	x8, _IRQ_NAND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_NAND@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_free_irq
Lloh3:
	adrp	x8, _use_dma@GOTPAGE
Lloh4:
	ldr	x8, [x8, _use_dma@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x20, #24]
	bl	_pxa_free_dma
	ldr	x2, [x20, #8]
	ldp	w3, w1, [x20, #16]
	mov	x0, x21
	bl	_dma_free_writecombine
	b	LBB0_3
LBB0_2:
	ldr	x0, [x20, #8]
	bl	_kfree
LBB0_3:
	ldr	w0, [x20, #4]
	bl	_iounmap
Lloh6:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_platform_get_resource
	ldr	w21, [x0]
	bl	_resource_size
	mov	x1, x0
	mov	x0, x21
	bl	_release_mem_region
	ldr	w0, [x20]
	bl	_clk_disable
	ldr	w0, [x20]
	bl	_clk_put
	mov	x0, x19
	bl	_kfree
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_NAND,4,2                   ; @IRQ_NAND
	.comm	_use_dma,8,3                    ; @use_dma
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.no_dead_strip	_pxa3xx_nand_remove
.subsections_via_symbols
