	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xlgmac_flush_tx_queues
_xlgmac_flush_tx_queues:                ## @xlgmac_flush_tx_queues
	.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
	cmpl	$0, (%rdi)
	je	LBB0_13
## %bb.1:
	xorl	%ebx, %ebx
	movq	_MTL_Q_TQOMR@GOTPCREL(%rip), %r12
	movq	_MTL_Q_TQOMR_FTQ_POS@GOTPCREL(%rip), %r13
	movq	_MTL_Q_TQOMR_FTQ_LEN@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edx
	movq	%rdi, %r14
	movl	%ebx, %esi
	callq	_XLGMAC_MTL_REG
	movl	%eax, %edi
	callq	_readl
	movl	(%r13), %esi
	movl	(%r15), %edx
	movq	%rax, %rdi
	movl	$1, %ecx
	callq	_XLGMAC_SET_REG_BITS
	movq	%rax, %r15
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_XLGMAC_MTL_REG
	movq	%r15, %rdi
	movq	_MTL_Q_TQOMR_FTQ_LEN@GOTPCREL(%rip), %r15
	movl	%eax, %esi
	callq	_writel
	movq	%r14, %rdi
	incl	%ebx
	movl	(%r14), %eax
	cmpl	%eax, %ebx
	jb	LBB0_2
## %bb.3:
	testl	%eax, %eax
	je	LBB0_13
## %bb.4:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	movq	%r14, %rdi
	cmpl	(%r14), %ebx
	movq	_MTL_Q_TQOMR_FTQ_LEN@GOTPCREL(%rip), %r15
	jae	LBB0_13
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movl	(%r12), %edx
	movl	%ebx, %esi
	callq	_XLGMAC_MTL_REG
	movl	%eax, %edi
	callq	_readl
	movl	(%r13), %esi
	movl	(%r15), %edx
	movq	%rax, %rdi
	callq	_XLGMAC_GET_REG_BITS
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %r15
	movq	%r13, %r12
	movl	$-1999, %r13d                   ## imm = 0xF831
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$600, %esi                      ## imm = 0x258
	callq	_usleep_range
	incl	%r13d
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	testq	%r15, %r15
	movq	%r12, %r13
	movq	_MTL_Q_TQOMR@GOTPCREL(%rip), %r12
	je	LBB0_5
## %bb.10:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTL_Q_TQOMR,4,2                ## @MTL_Q_TQOMR
	.comm	_MTL_Q_TQOMR_FTQ_POS,4,2        ## @MTL_Q_TQOMR_FTQ_POS
	.comm	_MTL_Q_TQOMR_FTQ_LEN,4,2        ## @MTL_Q_TQOMR_FTQ_LEN
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_xlgmac_flush_tx_queues
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xlgmac_flush_tx_queues
_xlgmac_flush_tx_queues:                ; @xlgmac_flush_tx_queues
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_11
; %bb.1:
	mov	x19, x0
	mov	w20, #0
Lloh0:
	adrp	x22, _MTL_Q_TQOMR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MTL_Q_TQOMR@GOTPAGEOFF]
Lloh2:
	adrp	x23, _MTL_Q_TQOMR_FTQ_POS@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MTL_Q_TQOMR_FTQ_POS@GOTPAGEOFF]
Lloh4:
	adrp	x24, _MTL_Q_TQOMR_FTQ_LEN@GOTPAGE
Lloh5:
	ldr	x24, [x24, _MTL_Q_TQOMR_FTQ_LEN@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_XLGMAC_MTL_REG
	bl	_readl
	ldr	w1, [x23]
	ldr	w2, [x24]
	mov	w3, #1
	bl	_XLGMAC_SET_REG_BITS
	mov	x21, x0
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_XLGMAC_MTL_REG
	mov	x1, x0
	mov	x0, x21
	bl	_writel
	add	w20, w20, #1
	ldr	w8, [x19]
	cmp	w20, w8
	b.lo	LBB0_2
; %bb.3:
	cbz	w8, LBB0_11
; %bb.4:
	mov	w20, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w20, w20, #1
	ldr	w8, [x19]
	cmp	w20, w8
	b.hs	LBB0_11
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_XLGMAC_MTL_REG
	bl	_readl
	ldr	w1, [x23]
	ldr	w2, [x24]
	bl	_XLGMAC_GET_REG_BITS
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x21, x0
	mov	w25, #-1999
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	w0, #500
	mov	w1, #600
	bl	_usleep_range
	adds	w25, w25, #1
	b.lo	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	x21, LBB0_5
; %bb.10:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MTL_Q_TQOMR,4,2                ; @MTL_Q_TQOMR
	.comm	_MTL_Q_TQOMR_FTQ_POS,4,2        ; @MTL_Q_TQOMR_FTQ_POS
	.comm	_MTL_Q_TQOMR_FTQ_LEN,4,2        ; @MTL_Q_TQOMR_FTQ_LEN
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_xlgmac_flush_tx_queues
.subsections_via_symbols
