	.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_txdma_open
LCPI0_0:
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_z8530_sync_txdma_open
	.p2align	4, 0x90
_z8530_sync_txdma_open:                 ## @z8530_sync_txdma_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_printk
	movl	$1, (%rbx)
	movl	(%r14), %eax
	addl	$64, %eax
	movl	%eax, 4(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 80(%rbx)
	movq	$0, 96(%rbx)
	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_3
## %bb.1:
	movq	_EMSGSIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movq	_GFP_DMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_get_zeroed_page
	movq	72(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	72(%rbx), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.5:
	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	32(%rbx), %edi
	callq	_spin_lock_irqsave
	movq	%rbx, %rdi
	callq	_z8530_rx_done
	movq	%rbx, %rdi
	callq	_z8530_rx_done
	movq	$0, 48(%rbx)
	movq	$0, 64(%rbx)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,0,1,1]
	movups	%xmm0, 8(%rbx)
	movq	_DTRREQ@GOTPCREL(%rip), %rax
	movq	24(%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), %rax
	movl	(%rax), %edx
	notl	%edx
	movq	24(%rbx), %rax
	movq	_R1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	andl	(%rax,%rsi,4), %edx
	movl	%edx, (%rax,%rsi,4)
	movq	%rbx, %rdi
	callq	_write_zsreg
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_claim_dma_lock
	movq	%rax, %r15
	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
	movq	$0, 48(%rbx)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 8(%rbx)
	movq	_z8530_txdma_sync@GOTPCREL(%rip), %rax
	movq	%rax, 40(%rbx)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_z8530_rtsdtr
	movq	_R3@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	24(%rbx), %rax
	movq	_RxENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax,%rsi,4), %edx
	movq	%rbx, %rdi
	callq	_write_zsreg
	movl	32(%rbx), %edi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_6
LBB0_4:
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Opening sync interface for TX-DMA\n"

	.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	_DMA_MODE_WRITE,4,2             ## @DMA_MODE_WRITE
	.comm	_z8530_txdma_sync,4,2           ## @z8530_txdma_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
	.globl	_z8530_sync_txdma_open          ; -- Begin function z8530_sync_txdma_open
	.p2align	2
_z8530_sync_txdma_open:                 ; @z8530_sync_txdma_open
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -40
	.cfi_offset b9, -48
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	mov	w8, #1
	ldr	w9, [x20]
	add	w9, w9, #64
	stp	w8, w9, [x19]
	stp	xzr, xzr, [x19, #88]
	str	xzr, [x19, #80]
Lloh2:
	adrp	x20, _PAGE_SIZE@GOTPAGE
Lloh3:
	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:
Lloh4:
	adrp	x8, _EMSGSIZE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EMSGSIZE@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _GFP_DMA@GOTPAGE
Lloh10:
	ldr	x9, [x9, _GFP_DMA@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_get_zeroed_page
	ldr	x8, [x19, #72]
	str	x0, [x8]
	ldr	x8, [x19, #72]
	ldr	x9, [x8]
	cbz	x9, LBB0_4
; %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	w0, [x19, #32]
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_z8530_rx_done
	mov	x0, x19
	bl	_z8530_rx_done
	str	xzr, [x19, #48]
	str	xzr, [x19, #8]
	str	xzr, [x19, #64]
	movi.2s	v8, #1
Lloh12:
	adrp	x8, _DTRREQ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DTRREQ@GOTPAGEOFF]
	str	d8, [x19, #16]
Lloh14:
	ldr	w8, [x8]
	ldr	x9, [x19, #24]
Lloh15:
	adrp	x10, _R14@GOTPAGE
Lloh16:
	ldr	x10, [x10, _R14@GOTPAGEOFF]
Lloh17:
	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
Lloh18:
	adrp	x8, _TxINT_ENAB@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TxINT_ENAB@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	x9, [x19, #24]
Lloh21:
	adrp	x10, _R1@GOTPAGE
Lloh22:
	ldr	x10, [x10, _R1@GOTPAGEOFF]
Lloh23:
	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
	bl	_claim_dma_lock
	mov	x20, x0
	ldr	w0, [x19, #56]
	bl	_disable_dma
	ldr	w0, [x19, #56]
	bl	_clear_dma_ff
	ldr	w0, [x19, #56]
Lloh24:
	adrp	x8, _DMA_MODE_WRITE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DMA_MODE_WRITE@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	bl	_set_dma_mode
	ldr	w0, [x19, #56]
	bl	_disable_dma
	mov	x0, x20
	bl	_release_dma_lock
	str	d8, [x19, #8]
Lloh27:
	adrp	x8, _z8530_txdma_sync@GOTPAGE
Lloh28:
	ldr	x8, [x8, _z8530_txdma_sync@GOTPAGEOFF]
	stp	x8, xzr, [x19, #40]
	mov	x0, x19
	mov	w1, #1
	bl	_z8530_rtsdtr
Lloh29:
	adrp	x8, _R3@GOTPAGE
Lloh30:
	ldr	x8, [x8, _R3@GOTPAGEOFF]
Lloh31:
	ldr	x1, [x8]
	ldr	x8, [x19, #24]
	ldr	w8, [x8, x1, lsl #2]
Lloh32:
	adrp	x9, _RxENABLE@GOTPAGE
Lloh33:
	ldr	x9, [x9, _RxENABLE@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_write_zsreg
	ldr	w0, [x19, #32]
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_6
LBB0_4:
Lloh35:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #48               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Opening sync interface for TX-DMA\n"

	.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	_DMA_MODE_WRITE,4,2             ; @DMA_MODE_WRITE
	.comm	_z8530_txdma_sync,4,2           ; @z8530_txdma_sync
	.comm	_R3,8,3                         ; @R3
	.comm	_RxENABLE,4,2                   ; @RxENABLE
.subsections_via_symbols
