	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xlgmac_prepare_tx_stop
_xlgmac_prepare_tx_stop:                ## @xlgmac_prepare_tx_stop
	.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	(%rsi), %r12d
	movq	_DMA_DSRX_FIRST_QUEUE@GOTPCREL(%rip), %rcx
	movl	%r12d, %eax
	subl	(%rcx), %eax
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	jae	LBB0_2
## %bb.1:
	movq	_DMA_DSR0@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_DMA_DSR0_TPS_START@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_DMA_DSRX_QPR@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	divl	(%rcx)
	movl	%eax, %r13d
	movl	%edx, %r12d
	movq	_DMA_DSRX_INC@GOTPCREL(%rip), %rax
	imull	(%rax), %r13d
	movq	_DMA_DSR1@GOTPCREL(%rip), %rax
	addl	(%rax), %r13d
	movq	_DMA_DSRX_TPS_START@GOTPCREL(%rip), %rax
LBB0_3:
	movq	_DMA_DSR_Q_LEN@GOTPCREL(%rip), %rcx
	imull	(%rcx), %r12d
	addl	(%rax), %r12d
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_XLGMAC_DMA_STOP_TIMEOUT@GOTPCREL(%rip), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	imulq	(%rax), %rbx
	addq	%rdi, %rbx
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movl	%r13d, %r13d
	movq	_DMA_TPS_SUSPENDED@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rdi
	addq	%r13, %rdi
	callq	_readl
	movq	_DMA_DSR_TPS_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_XLGMAC_GET_REG_BITS
	movq	_DMA_TPS_STOPPED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	(%r14), %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	jne	LBB0_5
LBB0_8:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	(%r15), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netdev_info                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_DSRX_FIRST_QUEUE,4,2       ## @DMA_DSRX_FIRST_QUEUE
	.comm	_DMA_DSR0,4,2                   ## @DMA_DSR0
	.comm	_DMA_DSR_Q_LEN,4,2              ## @DMA_DSR_Q_LEN
	.comm	_DMA_DSR0_TPS_START,4,2         ## @DMA_DSR0_TPS_START
	.comm	_DMA_DSR1,4,2                   ## @DMA_DSR1
	.comm	_DMA_DSRX_QPR,4,2               ## @DMA_DSRX_QPR
	.comm	_DMA_DSRX_INC,4,2               ## @DMA_DSRX_INC
	.comm	_DMA_DSRX_TPS_START,4,2         ## @DMA_DSRX_TPS_START
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_XLGMAC_DMA_STOP_TIMEOUT,8,3    ## @XLGMAC_DMA_STOP_TIMEOUT
	.comm	_HZ,8,3                         ## @HZ
	.comm	_DMA_DSR_TPS_LEN,4,2            ## @DMA_DSR_TPS_LEN
	.comm	_DMA_TPS_STOPPED,4,2            ## @DMA_TPS_STOPPED
	.comm	_DMA_TPS_SUSPENDED,4,2          ## @DMA_TPS_SUSPENDED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timed out waiting for Tx DMA channel %u to stop\n"

	.no_dead_strip	_xlgmac_prepare_tx_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xlgmac_prepare_tx_stop
_xlgmac_prepare_tx_stop:                ; @xlgmac_prepare_tx_stop
	.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, x1
	mov	x20, x0
	ldr	w22, [x1]
Lloh0:
	adrp	x8, _DMA_DSRX_FIRST_QUEUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_DSRX_FIRST_QUEUE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	subs	w8, w22, w8
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _DMA_DSR0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_DSR0@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
Lloh6:
	adrp	x8, _DMA_DSR0_TPS_START@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_DSR0_TPS_START@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x9, _DMA_DSR1@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DMA_DSR1@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _DMA_DSRX_QPR@GOTPAGE
Lloh12:
	ldr	x10, [x10, _DMA_DSRX_QPR@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
Lloh14:
	adrp	x11, _DMA_DSRX_INC@GOTPAGE
Lloh15:
	ldr	x11, [x11, _DMA_DSRX_INC@GOTPAGEOFF]
	udiv	w12, w8, w10
Lloh16:
	ldr	w11, [x11]
	madd	w24, w11, w12, w9
	msub	w22, w12, w10, w8
Lloh17:
	adrp	x8, _DMA_DSRX_TPS_START@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DMA_DSRX_TPS_START@GOTPAGEOFF]
LBB0_3:
Lloh19:
	adrp	x9, _DMA_DSR_Q_LEN@GOTPAGE
Lloh20:
	ldr	x9, [x9, _DMA_DSR_Q_LEN@GOTPAGEOFF]
Lloh21:
	ldr	w26, [x9]
	ldr	w27, [x8]
Lloh22:
	adrp	x23, _jiffies@GOTPAGE
Lloh23:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
Lloh24:
	adrp	x8, _XLGMAC_DMA_STOP_TIMEOUT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _XLGMAC_DMA_STOP_TIMEOUT@GOTPAGEOFF]
	ldr	x0, [x23]
Lloh26:
	ldr	x8, [x8]
Lloh27:
	adrp	x9, _HZ@GOTPAGE
Lloh28:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	madd	x21, x9, x8, x0
	mov	x1, x21
	bl	_time_before
	cbz	x0, LBB0_7
; %bb.4:
Lloh30:
	adrp	x25, _DMA_DSR_TPS_LEN@GOTPAGE
Lloh31:
	ldr	x25, [x25, _DMA_DSR_TPS_LEN@GOTPAGEOFF]
	madd	w22, w26, w22, w27
Lloh32:
	adrp	x26, _DMA_TPS_STOPPED@GOTPAGE
Lloh33:
	ldr	x26, [x26, _DMA_TPS_STOPPED@GOTPAGEOFF]
Lloh34:
	adrp	x27, _DMA_TPS_SUSPENDED@GOTPAGE
Lloh35:
	ldr	x27, [x27, _DMA_TPS_SUSPENDED@GOTPAGEOFF]
	mov	w24, w24
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x0, x8, x24
	bl	_readl
	ldr	w2, [x25]
	mov	x1, x22
	bl	_XLGMAC_GET_REG_BITS
	ldr	w8, [x26]
	ldr	w9, [x27]
	cmp	w0, w8
	ccmp	w0, w9, #4, ne
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	ldr	x0, [x23]
	mov	x1, x21
	bl	_time_before
	cbnz	x0, LBB0_5
LBB0_7:
	ldr	x0, [x23]
	mov	x1, x21
	bl	_time_before
	cbz	x0, LBB0_9
; %bb.8:
	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
	ret
LBB0_9:
	ldr	w0, [x20]
	ldr	w2, [x19]
Lloh36:
	adrp	x1, l_.str@PAGE
Lloh37:
	add	x1, x1, l_.str@PAGEOFF
	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	_netdev_info
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_DSRX_FIRST_QUEUE,4,2       ; @DMA_DSRX_FIRST_QUEUE
	.comm	_DMA_DSR0,4,2                   ; @DMA_DSR0
	.comm	_DMA_DSR_Q_LEN,4,2              ; @DMA_DSR_Q_LEN
	.comm	_DMA_DSR0_TPS_START,4,2         ; @DMA_DSR0_TPS_START
	.comm	_DMA_DSR1,4,2                   ; @DMA_DSR1
	.comm	_DMA_DSRX_QPR,4,2               ; @DMA_DSRX_QPR
	.comm	_DMA_DSRX_INC,4,2               ; @DMA_DSRX_INC
	.comm	_DMA_DSRX_TPS_START,4,2         ; @DMA_DSRX_TPS_START
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_XLGMAC_DMA_STOP_TIMEOUT,8,3    ; @XLGMAC_DMA_STOP_TIMEOUT
	.comm	_HZ,8,3                         ; @HZ
	.comm	_DMA_DSR_TPS_LEN,4,2            ; @DMA_DSR_TPS_LEN
	.comm	_DMA_TPS_STOPPED,4,2            ; @DMA_TPS_STOPPED
	.comm	_DMA_TPS_SUSPENDED,4,2          ; @DMA_TPS_SUSPENDED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timed out waiting for Tx DMA channel %u to stop\n"

	.no_dead_strip	_xlgmac_prepare_tx_stop
.subsections_via_symbols
