	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_z8530_sync_dma_open            ## -- Begin function z8530_sync_dma_open
	.p2align	4, 0x90
_z8530_sync_dma_open:                   ## @z8530_sync_dma_open
	.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
	movl	$1, (%rsi)
	movl	(%rdi), %eax
	addl	$64, %eax
	movl	%eax, 4(%rsi)
	movq	$0, 8(%rsi)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 88(%rsi)
	movq	$0, 104(%rsi)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	cmpl	%edx, %eax
	jle	LBB0_2
## %bb.1:
	movq	_EMSGSIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_2:
	movq	%rsi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movq	_GFP_DMA@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	orl	(%r15), %edi
	callq	_get_zeroed_page
	movq	64(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	64(%rbx), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.3:
	movl	(%r14), %edx
	movl	%edx, %esi
	shrl	$31, %esi
	addl	%edx, %esi
	sarl	%esi
	movslq	%esi, %rdx
	leaq	(%rcx,%rdx,4), %rcx
	movq	%rcx, 8(%rax)
	movl	(%r12), %edi
	orl	(%r15), %edi
	callq	_get_zeroed_page
	movq	80(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	80(%rbx), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.4:
	movl	(%r14), %edx
	movl	%edx, %esi
	shrl	$31, %esi
	addl	%edx, %esi
	sarl	%esi
	movslq	%esi, %rdx
	leaq	(%rcx,%rdx,4), %rcx
	movq	%rcx, 8(%rax)
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	movq	%rax, 16(%rbx)
	movq	$0, 72(%rbx)
	movl	$1, 24(%rbx)
	movl	40(%rbx), %edi
	callq	_spin_lock_irqsave
	movq	_DTRREQ@GOTPCREL(%rip), %rax
	movq	32(%rbx), %rcx
	movq	_R14@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movl	(%rcx,%rsi,4), %edx
	orl	(%rax), %edx
	movl	%edx, (%rcx,%rsi,4)
	movq	%rbx, %rdi
	callq	_write_zsreg
	movq	_TxINT_ENAB@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	notl	%edx
	movq	32(%rbx), %rax
	movq	_R1@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	andl	(%rax,%rsi,4), %edx
	movl	%edx, (%rax,%rsi,4)
	movq	%rbx, %rdi
	callq	_write_zsreg
	movq	_WT_FN_RDYFN@GOTPCREL(%rip), %rax
	movq	32(%rbx), %rcx
	movq	(%r14), %rsi
	movl	(%rcx,%rsi,4), %edi
	orl	(%rax), %edi
	movl	%edi, (%rcx,%rsi,4)
	movq	_WT_RDY_RT@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movl	%edi, (%rcx,%rsi,4)
	movq	_INT_ERR_Rx@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movl	%edi, (%rcx,%rsi,4)
	movl	(%r15), %edx
	notl	%edx
	andl	%edi, %edx
	movl	%edx, (%rcx,%rsi,4)
	movq	%rbx, %rdi
	callq	_write_zsreg
	movq	_WT_RDY_ENAB@GOTPCREL(%rip), %rax
	movq	32(%rbx), %rcx
	movq	(%r14), %rsi
	movl	(%rcx,%rsi,4), %edx
	orl	(%rax), %edx
	movl	%edx, (%rcx,%rsi,4)
	movq	%rbx, %rdi
	callq	_write_zsreg
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_claim_dma_lock
	movq	%rax, %r15
	movl	60(%rbx), %edi
	callq	_disable_dma
	movl	60(%rbx), %edi
	callq	_clear_dma_ff
	movl	60(%rbx), %edi
	movq	_DMA_MODE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	$16, %esi
	callq	_set_dma_mode
	movl	60(%rbx), %r12d
	movq	64(%rbx), %rax
	movq	(%rax), %rdi
	callq	_virt_to_bus
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_set_dma_addr
	movl	4(%rbx), %esi
	movl	60(%rbx), %edi
	callq	_set_dma_count
	movl	60(%rbx), %edi
	callq	_enable_dma
	movl	56(%rbx), %edi
	callq	_disable_dma
	movl	56(%rbx), %edi
	callq	_clear_dma_ff
	movl	56(%rbx), %edi
	movq	_DMA_MODE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_set_dma_mode
	movl	56(%rbx), %edi
	callq	_disable_dma
	movq	%r15, %rdi
	callq	_release_dma_lock
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 8(%rbx)
	movl	$1, 16(%rbx)
	movq	_z8530_dma_sync@GOTPCREL(%rip), %rax
	movq	%rax, 48(%rbx)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_z8530_rtsdtr
	movq	_R3@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	32(%rbx), %rax
	movq	_RxENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax,%rsi,4), %edx
	movq	%rbx, %rdi
	callq	_write_zsreg
	movl	40(%rbx), %edi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_9
LBB0_6:
	movq	64(%rbx), %rax
	movq	(%rax), %rdi
	callq	_free_page
	movq	64(%rbx), %rax
	movq	$0, (%rax)
LBB0_7:
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_EMSGSIZE,4,2                   ## @EMSGSIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ## @GFP_DMA
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.comm	_DTRREQ,4,2                     ## @DTRREQ
	.comm	_R14,8,3                        ## @R14
	.comm	_TxINT_ENAB,4,2                 ## @TxINT_ENAB
	.comm	_R1,8,3                         ## @R1
	.comm	_WT_FN_RDYFN,4,2                ## @WT_FN_RDYFN
	.comm	_WT_RDY_RT,4,2                  ## @WT_RDY_RT
	.comm	_INT_ERR_Rx,4,2                 ## @INT_ERR_Rx
	.comm	_WT_RDY_ENAB,4,2                ## @WT_RDY_ENAB
	.comm	_DMA_MODE_READ,4,2              ## @DMA_MODE_READ
	.comm	_DMA_MODE_WRITE,4,2             ## @DMA_MODE_WRITE
	.comm	_z8530_dma_sync,4,2             ## @z8530_dma_sync
	.comm	_R3,8,3                         ## @R3
	.comm	_RxENABLE,4,2                   ## @RxENABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function z8530_sync_dma_open
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_z8530_sync_dma_open
	.p2align	2
_z8530_sync_dma_open:                   ; @z8530_sync_dma_open
	.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	w8, #1
	ldr	w9, [x0]
	add	w9, w9, #64
	stp	w8, w9, [x1]
	str	xzr, [x1, #8]
	stp	xzr, xzr, [x1, #96]
	str	xzr, [x1, #88]
Lloh0:
	adrp	x20, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #0
	cinc	w8, w8, lt
	cmp	w9, w8, asr #1
	b.le	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EMSGSIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EMSGSIZE@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	mov	x19, x1
Lloh4:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh6:
	adrp	x22, _GFP_DMA@GOTPAGE
Lloh7:
	ldr	x22, [x22, _GFP_DMA@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w0, w9, w8
	bl	_get_zeroed_page
	ldr	x8, [x19, #64]
	str	x0, [x8]
	ldr	x8, [x19, #64]
	ldr	x9, [x8]
	cbz	x9, LBB0_6
; %bb.3:
	ldr	w10, [x20]
	cmp	w10, #0
	cinc	w10, w10, lt
	asr	w10, w10, #1
	add	x9, x9, w10, sxtw #2
	str	x9, [x8, #8]
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w0, w9, w8
	bl	_get_zeroed_page
	ldr	x8, [x19, #80]
	str	x0, [x8]
	ldr	x8, [x19, #80]
	ldr	x9, [x8]
	cbz	x9, LBB0_5
; %bb.4:
	ldr	w10, [x20]
	cmp	w10, #0
	cinc	w10, w10, lt
	asr	w10, w10, #1
	add	x9, x9, w10, sxtw #2
	str	x9, [x8, #8]
Lloh8:
	adrp	x8, lCPI0_0@PAGE
Lloh9:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #16]
	str	xzr, [x19, #72]
	mov	w22, #1
	str	w22, [x19, #24]
	ldr	w0, [x19, #40]
	bl	_spin_lock_irqsave
Lloh10:
	adrp	x8, _DTRREQ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DTRREQ@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	x9, [x19, #32]
Lloh13:
	adrp	x10, _R14@GOTPAGE
Lloh14:
	ldr	x10, [x10, _R14@GOTPAGEOFF]
Lloh15:
	ldr	x1, [x10]
	lsl	x10, x1, #2
	ldr	w11, [x9, x10]
	orr	w2, w11, w8
	str	w2, [x9, x10]
	mov	x0, x19
	bl	_write_zsreg
Lloh16:
	adrp	x20, _TxINT_ENAB@GOTPAGE
Lloh17:
	ldr	x20, [x20, _TxINT_ENAB@GOTPAGEOFF]
	ldr	w8, [x20]
	ldr	x9, [x19, #32]
Lloh18:
	adrp	x21, _R1@GOTPAGE
Lloh19:
	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
Lloh20:
	adrp	x8, _WT_FN_RDYFN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _WT_FN_RDYFN@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	ldr	x9, [x19, #32]
	ldr	x1, [x21]
	lsl	x10, x1, #2
	ldr	w11, [x9, x10]
	orr	w8, w11, w8
	str	w8, [x9, x10]
Lloh23:
	adrp	x11, _WT_RDY_RT@GOTPAGE
Lloh24:
	ldr	x11, [x11, _WT_RDY_RT@GOTPAGEOFF]
Lloh25:
	ldr	w11, [x11]
	orr	w8, w11, w8
	str	w8, [x9, x10]
Lloh26:
	adrp	x11, _INT_ERR_Rx@GOTPAGE
Lloh27:
	ldr	x11, [x11, _INT_ERR_Rx@GOTPAGEOFF]
Lloh28:
	ldr	w11, [x11]
	orr	w8, w11, w8
	str	w8, [x9, x10]
	ldr	w11, [x20]
	bic	w2, w8, w11
	str	w2, [x9, x10]
	mov	x0, x19
	bl	_write_zsreg
Lloh29:
	adrp	x8, _WT_RDY_ENAB@GOTPAGE
Lloh30:
	ldr	x8, [x8, _WT_RDY_ENAB@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	ldr	x9, [x19, #32]
	ldr	x1, [x21]
	lsl	x10, x1, #2
	ldr	w11, [x9, x10]
	orr	w2, w11, w8
	str	w2, [x9, x10]
	mov	x0, x19
	bl	_write_zsreg
	bl	_claim_dma_lock
	mov	x20, x0
	ldr	w0, [x19, #60]
	bl	_disable_dma
	ldr	w0, [x19, #60]
	bl	_clear_dma_ff
	ldr	w0, [x19, #60]
Lloh32:
	adrp	x8, _DMA_MODE_READ@GOTPAGE
Lloh33:
	ldr	x8, [x8, _DMA_MODE_READ@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	orr	w1, w8, #0x10
	bl	_set_dma_mode
	ldr	w21, [x19, #60]
	ldr	x8, [x19, #64]
	ldr	x0, [x8]
	bl	_virt_to_bus
	mov	x1, x0
	mov	x0, x21
	bl	_set_dma_addr
	ldr	w0, [x19, #60]
	ldr	w1, [x19, #4]
	bl	_set_dma_count
	ldr	w0, [x19, #60]
	bl	_enable_dma
	ldr	w0, [x19, #56]
	bl	_disable_dma
	ldr	w0, [x19, #56]
	bl	_clear_dma_ff
	ldr	w0, [x19, #56]
Lloh35:
	adrp	x8, _DMA_MODE_WRITE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _DMA_MODE_WRITE@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	bl	_set_dma_mode
	ldr	w0, [x19, #56]
	bl	_disable_dma
	mov	x0, x20
	bl	_release_dma_lock
	movi.2s	v0, #1
	str	d0, [x19, #8]
	str	w22, [x19, #16]
Lloh38:
	adrp	x8, _z8530_dma_sync@GOTPAGE
Lloh39:
	ldr	x8, [x8, _z8530_dma_sync@GOTPAGEOFF]
	str	x8, [x19, #48]
	mov	x0, x19
	mov	w1, #1
	bl	_z8530_rtsdtr
Lloh40:
	adrp	x8, _R3@GOTPAGE
Lloh41:
	ldr	x8, [x8, _R3@GOTPAGEOFF]
Lloh42:
	ldr	x1, [x8]
	ldr	x8, [x19, #32]
	ldr	w8, [x8, x1, lsl #2]
Lloh43:
	adrp	x9, _RxENABLE@GOTPAGE
Lloh44:
	ldr	x9, [x9, _RxENABLE@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_write_zsreg
	ldr	w0, [x19, #40]
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_8
LBB0_5:
	ldr	x8, [x19, #64]
	ldr	x0, [x8]
	bl	_free_page
	ldr	x8, [x19, #64]
	str	xzr, [x8]
LBB0_6:
Lloh46:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh47:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_EMSGSIZE,4,2                   ; @EMSGSIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ; @GFP_DMA
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.comm	_DTRREQ,4,2                     ; @DTRREQ
	.comm	_R14,8,3                        ; @R14
	.comm	_TxINT_ENAB,4,2                 ; @TxINT_ENAB
	.comm	_R1,8,3                         ; @R1
	.comm	_WT_FN_RDYFN,4,2                ; @WT_FN_RDYFN
	.comm	_WT_RDY_RT,4,2                  ; @WT_RDY_RT
	.comm	_INT_ERR_Rx,4,2                 ; @INT_ERR_Rx
	.comm	_WT_RDY_ENAB,4,2                ; @WT_RDY_ENAB
	.comm	_DMA_MODE_READ,4,2              ; @DMA_MODE_READ
	.comm	_DMA_MODE_WRITE,4,2             ; @DMA_MODE_WRITE
	.comm	_z8530_dma_sync,4,2             ; @z8530_dma_sync
	.comm	_R3,8,3                         ; @R3
	.comm	_RxENABLE,4,2                   ; @RxENABLE
.subsections_via_symbols
