	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function z8530_sync_dma_close
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_z8530_sync_dma_close
	.p2align	4, 0x90
_z8530_sync_dma_close:                  ## @z8530_sync_dma_close
	.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	%rsi, %rbx
	movq	_z8530_nop@GOTPCREL(%rip), %rax
	movq	%rax, 88(%rsi)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 72(%rsi)
	xorl	%eax, %eax
	callq	_claim_dma_lock
	movq	%rax, %r14
	movl	64(%rbx), %edi
	callq	_disable_dma
	movl	64(%rbx), %edi
	callq	_clear_dma_ff
	movq	$0, 56(%rbx)
	movl	48(%rbx), %edi
	callq	_disable_dma
	movl	48(%rbx), %edi
	callq	_clear_dma_ff
	movq	%r14, %rdi
	callq	_release_dma_lock
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	movl	8(%rbx), %edi
	movq	%r14, %rsi
	callq	_spin_lock_irqsave
	movq	_WT_RDY_ENAB@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	movq	(%rbx), %rax
	movq	_R1@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	andl	(%rax,%rsi,4), %edx
	movl	%edx, (%rax,%rsi,4)
	movq	%rbx, %rdi
	callq	_write_zsreg
	movq	_WT_RDY_RT@GOTPCREL(%rip), %rax
	movq	_WT_FN_RDYFN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_INT_ERR_Rx@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	notl	%edx
	movq	(%rbx), %rax
	movq	(%r15), %rsi
	andl	(%rax,%rsi,4), %edx
	movl	%edx, (%rax,%rsi,4)
	movq	_INT_ALL_Rx@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	%edx, (%rax,%rsi,4)
	movq	%rbx, %rdi
	callq	_write_zsreg
	movq	_DTRREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	movq	(%rbx), %rax
	movq	_R14@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	andl	(%rax,%rsi,4), %edx
	movl	%edx, (%rax,%rsi,4)
	movq	%rbx, %rdi
	callq	_write_zsreg
	movq	24(%rbx), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_free_page
	movq	24(%rbx), %rax
	movq	$0, (%rax)
LBB0_2:
	movq	16(%rbx), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_free_page
	movq	16(%rbx), %rax
	movq	$0, (%rax)
LBB0_4:
	movq	_R0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_read_zsreg
	movq	_R3@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	(%rbx), %rax
	movl	(%rax,%rsi,4), %edx
	movq	%rbx, %rdi
	callq	_write_zsreg
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_z8530_rtsdtr
	movl	8(%rbx), %edi
	movq	%r14, %rsi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_z8530_nop,4,2                  ## @z8530_nop
	.comm	_WT_RDY_ENAB,4,2                ## @WT_RDY_ENAB
	.comm	_R1,8,3                         ## @R1
	.comm	_WT_RDY_RT,4,2                  ## @WT_RDY_RT
	.comm	_WT_FN_RDYFN,4,2                ## @WT_FN_RDYFN
	.comm	_INT_ERR_Rx,4,2                 ## @INT_ERR_Rx
	.comm	_INT_ALL_Rx,4,2                 ## @INT_ALL_Rx
	.comm	_DTRREQ,4,2                     ## @DTRREQ
	.comm	_R14,8,3                        ## @R14
	.comm	_R0,4,2                         ## @R0
	.comm	_R3,8,3                         ## @R3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_z8530_sync_dma_close           ; -- Begin function z8530_sync_dma_close
	.p2align	2
_z8530_sync_dma_close:                  ; @z8530_sync_dma_close
	.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	x19, x1
Lloh0:
	adrp	x8, _z8530_nop@GOTPAGE
Lloh1:
	ldr	x8, [x8, _z8530_nop@GOTPAGEOFF]
	stp	xzr, x8, [x1, #80]
	str	xzr, [x1, #72]
	bl	_claim_dma_lock
	mov	x20, x0
	ldr	w0, [x19, #64]
	bl	_disable_dma
	ldr	w0, [x19, #64]
	bl	_clear_dma_ff
	str	xzr, [x19, #56]
	ldr	w0, [x19, #48]
	bl	_disable_dma
	ldr	w0, [x19, #48]
	bl	_clear_dma_ff
	mov	x0, x20
	bl	_release_dma_lock
	stp	xzr, xzr, [x19, #32]
	ldr	w0, [x19, #8]
	mov	x1, x20
	bl	_spin_lock_irqsave
Lloh2:
	adrp	x8, _WT_RDY_ENAB@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WT_RDY_ENAB@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	x9, [x19]
Lloh5:
	adrp	x21, _R1@GOTPAGE
Lloh6:
	ldr	x21, [x21, _R1@GOTPAGEOFF]
	ldr	x1, [x21]
	lsl	x10, x1, #2
	ldr	w11, [x9, x10]
	bic	w2, w11, w8
	str	w2, [x9, x10]
	mov	x0, x19
	bl	_write_zsreg
Lloh7:
	adrp	x8, _WT_RDY_RT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WT_RDY_RT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _WT_FN_RDYFN@GOTPAGE
Lloh11:
	ldr	x9, [x9, _WT_FN_RDYFN@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh13:
	adrp	x9, _INT_ERR_Rx@GOTPAGE
Lloh14:
	ldr	x9, [x9, _INT_ERR_Rx@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	x9, [x19]
	ldr	x1, [x21]
	lsl	x10, x1, #2
	ldr	w11, [x9, x10]
	bic	w8, w11, w8
	str	w8, [x9, x10]
Lloh16:
	adrp	x11, _INT_ALL_Rx@GOTPAGE
Lloh17:
	ldr	x11, [x11, _INT_ALL_Rx@GOTPAGEOFF]
Lloh18:
	ldr	w11, [x11]
	orr	w2, w11, w8
	str	w2, [x9, x10]
	mov	x0, x19
	bl	_write_zsreg
Lloh19:
	adrp	x8, _DTRREQ@GOTPAGE
Lloh20:
	ldr	x8, [x8, _DTRREQ@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	x9, [x19]
Lloh22:
	adrp	x10, _R14@GOTPAGE
Lloh23:
	ldr	x10, [x10, _R14@GOTPAGEOFF]
Lloh24:
	ldr	x1, [x10]
	lsl	x10, x1, #2
	ldr	w11, [x9, x10]
	bic	w2, w11, w8
	str	w2, [x9, x10]
	mov	x0, x19
	bl	_write_zsreg
	ldr	x8, [x19, #24]
	ldr	x0, [x8]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_free_page
	ldr	x8, [x19, #24]
	str	xzr, [x8]
LBB0_2:
	ldr	x8, [x19, #16]
	ldr	x0, [x8]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_free_page
	ldr	x8, [x19, #16]
	str	xzr, [x8]
LBB0_4:
Lloh25:
	adrp	x8, _R0@GOTPAGE
Lloh26:
	ldr	x8, [x8, _R0@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_read_zsreg
Lloh28:
	adrp	x8, _R3@GOTPAGE
Lloh29:
	ldr	x8, [x8, _R3@GOTPAGEOFF]
Lloh30:
	ldr	x1, [x8]
	ldr	x8, [x19]
	ldr	w2, [x8, x1, lsl #2]
	mov	x0, x19
	bl	_write_zsreg
	mov	x0, x19
	mov	w1, #0
	bl	_z8530_rtsdtr
	ldr	w0, [x19, #8]
	mov	x1, x20
	bl	_spin_unlock_irqrestore
	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	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_z8530_nop,4,2                  ; @z8530_nop
	.comm	_WT_RDY_ENAB,4,2                ; @WT_RDY_ENAB
	.comm	_R1,8,3                         ; @R1
	.comm	_WT_RDY_RT,4,2                  ; @WT_RDY_RT
	.comm	_WT_FN_RDYFN,4,2                ; @WT_FN_RDYFN
	.comm	_INT_ERR_Rx,4,2                 ; @INT_ERR_Rx
	.comm	_INT_ALL_Rx,4,2                 ; @INT_ALL_Rx
	.comm	_DTRREQ,4,2                     ; @DTRREQ
	.comm	_R14,8,3                        ; @R14
	.comm	_R0,4,2                         ; @R0
	.comm	_R3,8,3                         ; @R3
.subsections_via_symbols
