	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p54p_check_tx_ring
_p54p_check_tx_ring:                    ## @p54p_check_tx_ring
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movq	%r8, %r14
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %rax
	movq	(%rsi), %r12
	movq	(%rax), %rax
	movslq	%edx, %rcx
	movq	(%rax,%rcx,8), %rdi
	callq	_le32_to_cpu
	movq	%rax, (%r13)
	movq	%rax, %rcx
	orq	%r14, %rcx
	shrq	$32, %rcx
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	divq	%r14
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r14d
                                        ## kill: def $edx killed $edx def $rdx
LBB0_3:
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rax
	orq	%r14, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.5:
	movq	%r12, %rax
	xorl	%edx, %edx
	divq	%r14
	movq	%rdx, %rbx
	cmpq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	jne	LBB0_7
	jmp	LBB0_15
LBB0_4:
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%r14d
	movl	%edx, %ebx
	cmpq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	je	LBB0_15
LBB0_7:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%r14
	movq	%rdx, %rbx
	cmpq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	je	LBB0_15
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%rbx,8), %rcx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	$0, (%rax,%rbx,8)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r14d
	movq	%rbx, %r12
	shlq	$5, %r12
	movq	24(%r13,%r12), %rdi
	callq	_le32_to_cpu
	movq	%rax, %r15
	movq	8(%r13,%r12), %rdi
	callq	_le16_to_cpu
	movq	_PCI_DMA_TODEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r14d, %edi
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_pci_unmap_single
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r13,%r12)
	movups	%xmm0, 16(%r13,%r12)
	testq	%r14, %r14
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%r14, %rdi
	callq	_FREE_AFTER_TX
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_p54_free_skb
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	movq	%rbx, %rax
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	orq	%r14, %rax
	shrq	$32, %rax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r14d
	movl	%edx, %ebx
	cmpq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	jne	LBB0_8
LBB0_15:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_DMA_TODEVICE,4,2           ## @PCI_DMA_TODEVICE
	.no_dead_strip	_p54p_check_tx_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p54p_check_tx_ring
_p54p_check_tx_ring:                    ; @p54p_check_tx_ring
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x5
	mov	x20, x4
	mov	x21, x3
	mov	x23, x1
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x26, [x0]
	ldr	x8, [x26, #8]
	ldr	x22, [x1]
	ldr	x8, [x8]
	ldr	x0, [x8, w2, sxtw #3]
	bl	_le32_to_cpu
	str	x0, [x23]
	udiv	x8, x0, x20
	msub	x27, x8, x20, x0
	udiv	x8, x22, x20
	msub	x28, x8, x20, x22
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x28, #1
	udiv	x9, x8, x20
	msub	x28, x9, x20, x8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x28, x27
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	lsl	x8, x28, #3
	ldr	x23, [x19, x8]
	str	xzr, [x19, x8]
	ldr	w24, [x26]
	add	x22, x21, x28, lsl #5
	ldr	x0, [x22, #24]
	bl	_le32_to_cpu
	mov	x25, x0
	ldr	x0, [x22, #8]
	bl	_le16_to_cpu
	mov	x2, x0
Lloh0:
	adrp	x8, _PCI_DMA_TODEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_DMA_TODEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x24
	mov	x1, x25
	bl	_pci_unmap_single
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x22]
	cbz	x23, LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	bl	_FREE_AFTER_TX
	cbz	x0, LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x1, x23
	bl	_p54_free_skb
	b	LBB0_1
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_DMA_TODEVICE,4,2           ; @PCI_DMA_TODEVICE
	.no_dead_strip	_p54p_check_tx_ring
.subsections_via_symbols
