	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xilinx_dma_reset
_xilinx_dma_reset:                      ## @xilinx_dma_reset
	.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
	movq	%rdi, %rbx
	movq	_XILINX_DMA_REG_DMACR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_XILINX_DMA_DMACR_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_dma_ctrl_set
	movl	(%r12), %esi
	movq	_XILINX_DMA_LOOP_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_xilinx_dma_poll_timeout
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	16(%rbx), %r15d
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_dma_ctrl_read
	movl	%eax, %r12d
	movq	_XILINX_DMA_REG_DMASR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dma_ctrl_read
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_3
LBB0_2:
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	movq	%rax, (%rbx)
	movq	$0, 8(%rbx)
LBB0_3:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XILINX_DMA_REG_DMACR,4,2       ## @XILINX_DMA_REG_DMACR
	.comm	_XILINX_DMA_DMACR_RESET,4,2     ## @XILINX_DMA_DMACR_RESET
	.comm	_XILINX_DMA_LOOP_COUNT,4,2      ## @XILINX_DMA_LOOP_COUNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset timeout, cr %x, sr %x\n"

	.comm	_XILINX_DMA_REG_DMASR,4,2       ## @XILINX_DMA_REG_DMASR
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_xilinx_dma_reset
.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 xilinx_dma_reset
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_xilinx_dma_reset:                      ; @xilinx_dma_reset
	.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, x0
Lloh0:
	adrp	x21, _XILINX_DMA_REG_DMACR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _XILINX_DMA_REG_DMACR@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x8, _XILINX_DMA_DMACR_RESET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _XILINX_DMA_DMACR_RESET@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_dma_ctrl_set
	ldr	w1, [x21]
Lloh5:
	adrp	x8, _XILINX_DMA_LOOP_COUNT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _XILINX_DMA_LOOP_COUNT@GOTPAGEOFF]
Lloh7:
	ldr	w5, [x8]
	mov	x0, x19
	mov	w3, #1
	mov	w4, #0
	bl	_xilinx_dma_poll_timeout
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w20, [x19, #16]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_dma_ctrl_read
	mov	x21, x0
Lloh8:
	adrp	x8, _XILINX_DMA_REG_DMASR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _XILINX_DMA_REG_DMASR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dma_ctrl_read
	mov	x3, x0
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_err
Lloh13:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
Lloh16:
	adrp	x8, lCPI0_0@PAGE
Lloh17:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	str	xzr, [x19, #8]
LBB0_3:
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdr	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_XILINX_DMA_REG_DMACR,4,2       ; @XILINX_DMA_REG_DMACR
	.comm	_XILINX_DMA_DMACR_RESET,4,2     ; @XILINX_DMA_DMACR_RESET
	.comm	_XILINX_DMA_LOOP_COUNT,4,2      ; @XILINX_DMA_LOOP_COUNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset timeout, cr %x, sr %x\n"

	.comm	_XILINX_DMA_REG_DMASR,4,2       ; @XILINX_DMA_REG_DMASR
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_xilinx_dma_reset
.subsections_via_symbols
