	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function niu_rbr_free
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_niu_rbr_free:                          ## @niu_rbr_free
	.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	%rsi, %r13
	movq	_MAX_RBR_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_7
## %bb.1:
	movq	%rdi, %r15
	xorl	%edx, %edx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %r14
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdx
	movslq	%eax, %rcx
	cmpq	%rcx, %rdx
	jge	LBB0_7
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	24(%r13), %rcx
	movq	(%rcx,%rdx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx), %r13
	movq	8(%rbx), %rsi
	movq	8(%r15), %rax
	movl	(%r15), %edi
	movl	(%r12), %edx
	movl	(%r14), %ecx
	callq	*(%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
	movq	%rbx, %rdi
	callq	___free_page
	movq	%r13, %rbx
	testq	%r13, %r13
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_MAX_RBR_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_6
LBB0_7:
	cmpl	$0, (%r13)
	jle	LBB0_10
## %bb.8:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	callq	_cpu_to_le32
	movq	16(%r13), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_10:
	movq	$0, 8(%r13)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_RBR_RING_SIZE,4,2          ## @MAX_RBR_RING_SIZE
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_niu_rbr_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_rbr_free
_niu_rbr_free:                          ; @niu_rbr_free
	.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
	mov	x19, x1
Lloh0:
	adrp	x22, _MAX_RBR_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAX_RBR_RING_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x20, x0
	mov	x23, #0
Lloh2:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x25, _DMA_FROM_DEVICE@GOTPAGE
Lloh5:
	ldr	x25, [x25, _DMA_FROM_DEVICE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	cmp	x23, w8, sxtw
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	ldr	x9, [x19, #24]
	ldr	x21, [x9, x23, lsl #3]
	cbz	x21, LBB0_2
LBB0_4:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	x26, x1, [x21]
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	w0, [x20]
	ldr	w2, [x24]
	ldr	w3, [x25]
	blr	x8
	stp	xzr, xzr, [x21]
	mov	x0, x21
	bl	___free_page
	mov	x21, x26
	cbnz	x26, LBB0_4
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x22]
	b	LBB0_2
LBB0_6:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x20, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #0
	bl	_cpu_to_le32
	ldr	x8, [x19, #16]
	str	w0, [x8, x20, lsl #2]
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.lt	LBB0_8
LBB0_9:
	str	xzr, [x19, #8]
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_RBR_RING_SIZE,4,2          ; @MAX_RBR_RING_SIZE
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_niu_rbr_free
.subsections_via_symbols
