	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lsi64854_detach                ## -- Begin function lsi64854_detach
	.p2align	4, 0x90
_lsi64854_detach:                       ## @lsi64854_detach
	.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
	cmpq	$0, 8(%rdi)
	je	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	movl	(%rdi), %r14d
	movl	4(%rdi), %r15d
	callq	_L64854_GCSR
	movq	_L64854_WRITE@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	jne	LBB0_2
## %bb.3:
	movq	_BUS_DMASYNC_PREWRITE@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_BUS_DMASYNC_PREREAD@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_bus_dmamap_sync
	movl	(%rbx), %edi
	movl	4(%rbx), %esi
	callq	_bus_dmamap_unload
	movl	(%rbx), %edi
	movl	4(%rbx), %esi
	callq	_bus_dmamap_destroy
	movl	(%rbx), %edi
	callq	_bus_dma_tag_destroy
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_L64854_WRITE,4,2               ## @L64854_WRITE
	.comm	_BUS_DMASYNC_PREREAD,4,2        ## @BUS_DMASYNC_PREREAD
	.comm	_BUS_DMASYNC_PREWRITE,4,2       ## @BUS_DMASYNC_PREWRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lsi64854_detach                ; -- Begin function lsi64854_detach
	.p2align	2
_lsi64854_detach:                       ; @lsi64854_detach
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x19, x0
	ldp	w20, w21, [x0]
	bl	_L64854_GCSR
Lloh0:
	adrp	x8, _L64854_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _L64854_WRITE@GOTPAGEOFF]
Lloh2:
	adrp	x9, _BUS_DMASYNC_PREREAD@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BUS_DMASYNC_PREREAD@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x10, _BUS_DMASYNC_PREWRITE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _BUS_DMASYNC_PREWRITE@GOTPAGEOFF]
	tst	w8, w0
	csel	x8, x10, x9, eq
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_bus_dmamap_sync
	ldp	w0, w1, [x19]
	bl	_bus_dmamap_unload
	ldp	w0, w1, [x19]
	bl	_bus_dmamap_destroy
	ldr	w0, [x19]
	bl	_bus_dma_tag_destroy
LBB0_2:
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_L64854_WRITE,4,2               ; @L64854_WRITE
	.comm	_BUS_DMASYNC_PREREAD,4,2        ; @BUS_DMASYNC_PREREAD
	.comm	_BUS_DMASYNC_PREWRITE,4,2       ; @BUS_DMASYNC_PREWRITE
.subsections_via_symbols
