	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cafe_nand_remove
_cafe_nand_remove:                      ## @cafe_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	%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
	callq	_pci_get_drvdata
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mtd_to_nand
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_nand_get_controller_data
	movq	%rax, %rbx
	movq	_GLOBAL_IRQ_MASK@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rax, %rdi
	callq	_cafe_readl
	andl	$-2, %eax
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_cafe_writel
	movl	(%r14), %edi
	movq	%r15, %rsi
	callq	_free_irq
	movq	%r12, %rdi
	callq	_nand_release
	movl	20(%rbx), %edi
	callq	_free_rs
	movl	16(%rbx), %esi
	movq	%r14, %rdi
	callq	_pci_iounmap
	movq	8(%rbx), %rdi
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	movl	$2112, %esi                     ## imm = 0x840
	callq	_dma_free_coherent
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GLOBAL_IRQ_MASK,4,2            ## @GLOBAL_IRQ_MASK
	.no_dead_strip	_cafe_nand_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cafe_nand_remove
_cafe_nand_remove:                      ; @cafe_nand_remove
	.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	x19, x0
	bl	_pci_get_drvdata
	mov	x20, x0
	bl	_mtd_to_nand
	mov	x21, x0
	bl	_nand_get_controller_data
	mov	x22, x0
Lloh0:
	adrp	x23, _GLOBAL_IRQ_MASK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GLOBAL_IRQ_MASK@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_cafe_readl
	and	w1, w0, #0xfffffffe
	ldr	w2, [x23]
	mov	x0, x22
	bl	_cafe_writel
	ldr	w0, [x19]
	mov	x1, x20
	bl	_free_irq
	mov	x0, x21
	bl	_nand_release
	ldr	w0, [x22, #20]
	bl	_free_rs
	ldr	w1, [x22, #16]
	mov	x0, x19
	bl	_pci_iounmap
	ldr	x0, [x22, #8]
	ldp	w3, w2, [x22]
	mov	w1, #2112
	bl	_dma_free_coherent
	mov	x0, x22
	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	_kfree
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GLOBAL_IRQ_MASK,4,2            ; @GLOBAL_IRQ_MASK
	.no_dead_strip	_cafe_nand_remove
.subsections_via_symbols
