	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sgdma_txbusy
_sgdma_txbusy:                          ## @sgdma_txbusy
	.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, %r15
	movl	4(%rdi), %r14d
	movq	_status@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_sgdma_csroffs
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_csrrd32
	movq	_SGDMA_STSREG_BUSY@GOTPCREL(%rip), %r14
	testl	%eax, (%r14)
	je	LBB0_4
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_udelay
	movl	4(%r15), %r13d
	movl	(%r12), %edi
	callq	_sgdma_csroffs
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_csrrd32
	testl	%eax, (%r14)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	1(%rbx), %eax
	cmpl	$99, %ebx
	movl	%eax, %ebx
	jb	LBB0_2
LBB0_4:
	movl	4(%r15), %ebx
	movl	(%r12), %edi
	callq	_sgdma_csroffs
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_csrrd32
	testl	%eax, (%r14)
	je	LBB0_5
## %bb.6:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	movl	$1, %eax
	jmp	LBB0_7
LBB0_5:
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_status,4,2                     ## @status
	.comm	_SGDMA_STSREG_BUSY,4,2          ## @SGDMA_STSREG_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout waiting for tx dma\n"

	.no_dead_strip	_sgdma_txbusy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sgdma_txbusy
_sgdma_txbusy:                          ; @sgdma_txbusy
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	w20, [x0, #4]
Lloh0:
	adrp	x21, _status@GOTPAGE
Lloh1:
	ldr	x21, [x21, _status@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_sgdma_csroffs
	mov	x1, x0
	mov	x0, x20
	bl	_csrrd32
Lloh2:
	adrp	x22, _SGDMA_STSREG_BUSY@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SGDMA_STSREG_BUSY@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.1:
	mov	w23, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	w20, [x19, #4]
	ldr	w0, [x21]
	bl	_sgdma_csroffs
	mov	x1, x0
	mov	x0, x20
	bl	_csrrd32
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w8, w23, #1
	cmp	w23, #99
	mov	x23, x8
	b.lo	LBB0_2
LBB0_4:
	ldr	w20, [x19, #4]
	ldr	w0, [x21]
	bl	_sgdma_csroffs
	mov	x1, x0
	mov	x0, x20
	bl	_csrrd32
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.5:
	ldr	w0, [x19]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	mov	w0, #1
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_status,4,2                     ; @status
	.comm	_SGDMA_STSREG_BUSY,4,2          ; @SGDMA_STSREG_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout waiting for tx dma\n"

	.no_dead_strip	_sgdma_txbusy
.subsections_via_symbols
