	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dscc4_release_ring
_dscc4_release_ring:                    ## @dscc4_release_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	40(%rdi), %rax
	movq	(%rax), %r13
	movq	32(%rdi), %r12
	movq	24(%rdi), %r14
	movq	_TX_TOTAL_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	20(%rdi), %ecx
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_pci_free_consistent
	movq	_RX_TOTAL_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	16(%rbx), %ecx
	movq	%r13, %rdi
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdx
	callq	_pci_free_consistent
	movq	_TX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %r15
	xorl	%r14d, %r14d
	movq	_PCI_DMA_TODEVICE@GOTPCREL(%rip), %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	cmpl	%eax, %r14d
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r15,%r14,8)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12,%r14,4), %edi
	callq	_le32_to_cpu
	movq	(%r15,%r14,8), %rcx
	movl	(%rcx), %edx
	movl	(%rbx), %ecx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_pci_unmap_single
	movq	(%r15,%r14,8), %rdi
	callq	_dev_kfree_skb
	movq	_TX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_4
LBB0_5:
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jle	LBB0_10
## %bb.6:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %r15
	xorl	%r12d, %r12d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	incq	%r12
	cmpl	%eax, %r12d
	jge	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r15,%r12,8)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r14,%r12,4), %edi
	callq	_le32_to_cpu
	movl	%eax, %ebx
	movq	_HDLC_MAX_MRU@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RX_MAX
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_pci_unmap_single
	movq	(%r15,%r12,8), %rdi
	callq	_dev_kfree_skb
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TX_TOTAL_SIZE,4,2              ## @TX_TOTAL_SIZE
	.comm	_RX_TOTAL_SIZE,4,2              ## @RX_TOTAL_SIZE
	.comm	_TX_RING_SIZE,4,2               ## @TX_RING_SIZE
	.comm	_PCI_DMA_TODEVICE,4,2           ## @PCI_DMA_TODEVICE
	.comm	_RX_RING_SIZE,4,2               ## @RX_RING_SIZE
	.comm	_HDLC_MAX_MRU,4,2               ## @HDLC_MAX_MRU
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.no_dead_strip	_dscc4_release_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dscc4_release_ring
_dscc4_release_ring:                    ; @dscc4_release_ring
	.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	x21, x0
	ldp	x22, x8, [x0, #32]
	ldr	x19, [x8]
	ldr	x20, [x0, #24]
Lloh0:
	adrp	x8, _TX_TOTAL_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TX_TOTAL_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w3, [x0, #20]
	mov	x0, x19
	mov	x2, x22
	bl	_pci_free_consistent
Lloh3:
	adrp	x8, _RX_TOTAL_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RX_TOTAL_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w3, [x21, #16]
	mov	x0, x19
	mov	x2, x20
	bl	_pci_free_consistent
Lloh6:
	adrp	x23, _TX_RING_SIZE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _TX_RING_SIZE@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x24, #0
	ldr	x25, [x21, #8]
Lloh8:
	adrp	x26, _PCI_DMA_TODEVICE@GOTPAGE
Lloh9:
	ldr	x26, [x26, _PCI_DMA_TODEVICE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	cmp	w24, w8
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x25, x24, lsl #3]
	cbz	x9, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x22, x24, lsl #2]
	bl	_le32_to_cpu
	mov	x1, x0
	lsl	x27, x24, #3
	ldr	x8, [x25, x27]
	ldr	w2, [x8]
	ldr	w3, [x26]
	mov	x0, x19
	bl	_pci_unmap_single
	ldr	x0, [x25, x27]
	bl	_dev_kfree_skb
	ldr	w8, [x23]
	b	LBB0_2
LBB0_5:
Lloh10:
	adrp	x22, _RX_RING_SIZE@GOTPAGE
Lloh11:
	ldr	x22, [x22, _RX_RING_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.6:
	mov	x23, #0
	ldr	x24, [x21]
Lloh12:
	adrp	x25, _HDLC_MAX_MRU@GOTPAGE
Lloh13:
	ldr	x25, [x25, _HDLC_MAX_MRU@GOTPAGEOFF]
Lloh14:
	adrp	x26, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh15:
	ldr	x26, [x26, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x23, x23, #1
	cmp	w23, w8
	b.ge	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x24, x23, lsl #3]
	cbz	x9, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x20, x23, lsl #2]
	bl	_le32_to_cpu
	mov	x21, x0
	ldr	w0, [x25]
	bl	_RX_MAX
	mov	x2, x0
	ldr	w3, [x26]
	mov	x0, x19
	mov	x1, x21
	bl	_pci_unmap_single
	ldr	x0, [x24, x23, lsl #3]
	bl	_dev_kfree_skb
	ldr	w8, [x22]
	b	LBB0_7
LBB0_10:
	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
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_TX_TOTAL_SIZE,4,2              ; @TX_TOTAL_SIZE
	.comm	_RX_TOTAL_SIZE,4,2              ; @RX_TOTAL_SIZE
	.comm	_TX_RING_SIZE,4,2               ; @TX_RING_SIZE
	.comm	_PCI_DMA_TODEVICE,4,2           ; @PCI_DMA_TODEVICE
	.comm	_RX_RING_SIZE,4,2               ; @RX_RING_SIZE
	.comm	_HDLC_MAX_MRU,4,2               ; @HDLC_MAX_MRU
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.no_dead_strip	_dscc4_release_ring
.subsections_via_symbols
