	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msgdma_reset                   ## -- Begin function msgdma_reset
	.p2align	4, 0x90
_msgdma_reset:                          ## @msgdma_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_MSGDMA_CSR_STAT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	8(%rdi), %r15d
	movq	_status@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msgdma_csroffs
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_csrwr32
	movq	_MSGDMA_CSR_CTL_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	8(%r12), %r15d
	movq	_control@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msgdma_csroffs
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_csrwr32
	movq	_ALTERA_TSE_SW_RESET_WATCHDOG_CNTR@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movl	$1, %ebx
	movq	_MSGDMA_CSR_STAT_RESETTING@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r12), %r14d
	movq	_status@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msgdma_csroffs
	movl	(%r13), %edx
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_tse_bit_is_clear
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_udelay
	leal	1(%rbx), %ecx
	movl	(%r15), %eax
	cmpl	%eax, %ebx
	movl	%ecx, %ebx
	jl	LBB0_3
	jmp	LBB0_6
LBB0_1:
	movl	$1, %ecx
LBB0_6:
	cmpl	%eax, %ecx
	jl	LBB0_8
LBB0_7:
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r12), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r12, %rdi
	callq	_netif_warn
LBB0_8:
	movq	_MSGDMA_CSR_STAT_MASK@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	movl	8(%r12), %r14d
	movq	_status@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msgdma_csroffs
	movl	%ebx, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_csrwr32
	movl	(%r13), %ebx
	movl	(%r12), %r14d
	movq	_status@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msgdma_csroffs
	movl	%ebx, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_csrwr32
	movq	_MSGDMA_CSR_CTL_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r12), %r14d
	movq	_control@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msgdma_csroffs
	movl	%ebx, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_csrwr32
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.10:
	movl	$1, %ebx
	movq	_MSGDMA_CSR_STAT_RESETTING@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %r14d
	movq	_status@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msgdma_csroffs
	movl	(%r13), %edx
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_tse_bit_is_clear
	testq	%rax, %rax
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	$1, %edi
	callq	_udelay
	leal	1(%rbx), %ecx
	movl	(%r15), %eax
	cmpl	%eax, %ebx
	movl	%ecx, %ebx
	jl	LBB0_11
	jmp	LBB0_14
LBB0_9:
	movl	$1, %ecx
LBB0_14:
	cmpl	%eax, %ecx
	jl	LBB0_16
LBB0_15:
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r12), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r12, %rdi
	callq	_netif_warn
LBB0_16:
	movq	_MSGDMA_CSR_STAT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r12), %r14d
	movq	_status@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msgdma_csroffs
	movl	%ebx, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_csrwr32                        ## TAILCALL
LBB0_4:
	movl	(%r15), %eax
	movl	%ebx, %ecx
	cmpl	%eax, %ecx
	jge	LBB0_7
	jmp	LBB0_8
LBB0_12:
	movl	(%r15), %eax
	movl	%ebx, %ecx
	cmpl	%eax, %ecx
	jge	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_MSGDMA_CSR_STAT_MASK,4,2       ## @MSGDMA_CSR_STAT_MASK
	.comm	_status,4,2                     ## @status
	.comm	_MSGDMA_CSR_CTL_RESET,4,2       ## @MSGDMA_CSR_CTL_RESET
	.comm	_control,4,2                    ## @control
	.comm	_ALTERA_TSE_SW_RESET_WATCHDOG_CNTR,4,2 ## @ALTERA_TSE_SW_RESET_WATCHDOG_CNTR
	.comm	_MSGDMA_CSR_STAT_RESETTING,4,2  ## @MSGDMA_CSR_STAT_RESETTING
	.comm	_drv,4,2                        ## @drv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TSE Rx mSGDMA resetting bit never cleared!\n"

L_.str.1:                               ## @.str.1
	.asciz	"TSE Tx mSGDMA resetting bit never cleared!\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msgdma_reset                   ; -- Begin function msgdma_reset
	.p2align	2
_msgdma_reset:                          ; @msgdma_reset
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x22, _MSGDMA_CSR_STAT_MASK@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MSGDMA_CSR_STAT_MASK@GOTPAGEOFF]
	ldr	w20, [x22]
	ldr	w21, [x0, #8]
Lloh2:
	adrp	x23, _status@GOTPAGE
Lloh3:
	ldr	x23, [x23, _status@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_msgdma_csroffs
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_csrwr32
Lloh4:
	adrp	x26, _MSGDMA_CSR_CTL_RESET@GOTPAGE
Lloh5:
	ldr	x26, [x26, _MSGDMA_CSR_CTL_RESET@GOTPAGEOFF]
	ldr	w20, [x26]
	ldr	w21, [x19, #8]
Lloh6:
	adrp	x27, _control@GOTPAGE
Lloh7:
	ldr	x27, [x27, _control@GOTPAGEOFF]
	ldr	w0, [x27]
	bl	_msgdma_csroffs
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_csrwr32
Lloh8:
	adrp	x24, _ALTERA_TSE_SW_RESET_WATCHDOG_CNTR@GOTPAGE
Lloh9:
	ldr	x24, [x24, _ALTERA_TSE_SW_RESET_WATCHDOG_CNTR@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh10:
	adrp	x25, _MSGDMA_CSR_STAT_RESETTING@GOTPAGE
Lloh11:
	ldr	x25, [x25, _MSGDMA_CSR_STAT_RESETTING@GOTPAGEOFF]
	mov	w21, #1
	cmp	w8, #1
	b.lt	LBB0_4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w20, [x19, #8]
	ldr	w0, [x23]
	bl	_msgdma_csroffs
	mov	x1, x0
	ldr	w2, [x25]
	mov	x0, x20
	bl	_tse_bit_is_clear
	cbnz	x0, LBB0_13
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1
	bl	_udelay
	add	w9, w21, #1
	ldr	w8, [x24]
	cmp	w21, w8
	mov	x21, x9
	b.lt	LBB0_1
; %bb.3:
	mov	x21, x9
LBB0_4:
	cmp	w21, w8
	b.lt	LBB0_6
LBB0_5:
Lloh12:
	adrp	x8, _drv@GOTPAGE
Lloh13:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
Lloh15:
	adrp	x3, l_.str@PAGE
Lloh16:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_warn
LBB0_6:
	ldr	w20, [x22]
	ldr	w21, [x19, #8]
	ldr	w0, [x23]
	bl	_msgdma_csroffs
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_csrwr32
	ldr	w20, [x22]
	ldr	w21, [x19]
	ldr	w0, [x23]
	bl	_msgdma_csroffs
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_csrwr32
	ldr	w20, [x26]
	ldr	w21, [x19]
	ldr	w0, [x27]
	bl	_msgdma_csroffs
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_csrwr32
	ldr	w8, [x24]
	mov	w21, #1
	cmp	w8, #1
	b.lt	LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w20, [x19]
	ldr	w0, [x23]
	bl	_msgdma_csroffs
	mov	x1, x0
	ldr	w2, [x25]
	mov	x0, x20
	bl	_tse_bit_is_clear
	cbnz	x0, LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #1
	bl	_udelay
	add	w9, w21, #1
	ldr	w8, [x24]
	cmp	w21, w8
	mov	x21, x9
	b.lt	LBB0_7
; %bb.9:
	mov	x21, x9
LBB0_10:
	cmp	w21, w8
	b.lt	LBB0_12
LBB0_11:
Lloh17:
	adrp	x8, _drv@GOTPAGE
Lloh18:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
Lloh20:
	adrp	x3, l_.str.1@PAGE
Lloh21:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_warn
LBB0_12:
	ldr	w20, [x22]
	ldr	w19, [x19]
	ldr	w0, [x23]
	bl	_msgdma_csroffs
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_csrwr32
LBB0_13:
	ldr	w8, [x24]
	cmp	w21, w8
	b.ge	LBB0_5
	b	LBB0_6
LBB0_14:
	ldr	w8, [x24]
	cmp	w21, w8
	b.ge	LBB0_11
	b	LBB0_12
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MSGDMA_CSR_STAT_MASK,4,2       ; @MSGDMA_CSR_STAT_MASK
	.comm	_status,4,2                     ; @status
	.comm	_MSGDMA_CSR_CTL_RESET,4,2       ; @MSGDMA_CSR_CTL_RESET
	.comm	_control,4,2                    ; @control
	.comm	_ALTERA_TSE_SW_RESET_WATCHDOG_CNTR,4,2 ; @ALTERA_TSE_SW_RESET_WATCHDOG_CNTR
	.comm	_MSGDMA_CSR_STAT_RESETTING,4,2  ; @MSGDMA_CSR_STAT_RESETTING
	.comm	_drv,4,2                        ; @drv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TSE Rx mSGDMA resetting bit never cleared!\n"

l_.str.1:                               ; @.str.1
	.asciz	"TSE Tx mSGDMA resetting bit never cleared!\n"

.subsections_via_symbols
