	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function octeon_droq_refill
_octeon_droq_refill:                    ## @octeon_droq_refill
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 16(%rsi)
	je	LBB0_12
## %bb.1:
	movq	%rsi, %rbx
	movq	40(%rsi), %r15
	cmpq	$0, (%rsi)
	jle	LBB0_13
## %bb.2:
	movq	%rdi, %r12
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rcx
	movq	24(%rbx), %rax
	leaq	(%rcx,%rcx,2), %rcx
	movq	(%rax,%rcx,8), %rdi
	testq	%rdi, %rdi
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%rax,%rcx,8), %rsi
	addq	$16, %rsi
	cmpq	$0, 16(%rax,%rcx,8)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	callq	_recv_buffer_reuse
	jmp	LBB0_7
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	callq	_recv_buffer_alloc
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rdi
	testq	%rax, %rax
	je	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rax
	movq	24(%rbx), %rcx
	leaq	(%rax,%rax,2), %rax
	movq	%rdi, (%rcx,%rax,8)
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	callq	_get_rbd
	movq	8(%rbx), %rcx
	movq	24(%rbx), %rdx
	leaq	(%rcx,%rcx,2), %rcx
	movq	%rax, 8(%rdx,%rcx,8)
	movq	(%rdx,%rcx,8), %rdi
	callq	_lio_map_ring
	movq	8(%rbx), %rdi
	movl	%eax, (%r15,%rdi,4)
	movq	(%rbx), %rdx
	movl	$1, %esi
	callq	_incr_index
	movq	%rax, 8(%rbx)
	decq	16(%rbx)
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	cmpq	(%rbx), %r14
	jl	LBB0_3
	jmp	LBB0_11
LBB0_12:
	xorl	%r14d, %r14d
	jmp	LBB0_17
LBB0_13:
	xorl	%r14d, %r14d
LBB0_11:
	xorl	%eax, %eax
	testb	%al, %al
	jne	LBB0_17
LBB0_16:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_octeon_droq_refill_pullup_descs
	addq	%rax, %r14
	jmp	LBB0_17
LBB0_14:
	incq	%r14
LBB0_17:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	incl	32(%rbx)
	cmpq	$0, 16(%rbx)
	sete	%al
	testb	%al, %al
	jne	LBB0_17
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_octeon_droq_refill
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function octeon_droq_refill
_octeon_droq_refill:                    ; @octeon_droq_refill
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x1, #16]
	cbz	x8, LBB0_11
; %bb.1:
	mov	x20, x1
	ldr	x21, [x1, #40]
	ldr	x8, [x1]
	cmp	x8, #1
	b.lt	LBB0_12
; %bb.2:
	mov	x22, x0
	mov	x19, #0
	mov	w23, #24
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	ldr	x9, [x20, #8]
	mul	x10, x9, x23
	ldr	x0, [x8, x10]
	cbnz	x0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	madd	x1, x9, x23, x8
	ldr	x8, [x1, #16]!
	cbz	x8, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_recv_buffer_reuse
	cbnz	x0, LBB0_7
	b	LBB0_15
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_recv_buffer_alloc
	cbz	x0, LBB0_15
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20, #24]
	ldr	x9, [x20, #8]
	mul	x9, x9, x23
	str	x0, [x8, x9]
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_get_rbd
	ldr	x8, [x20, #24]
	ldr	x9, [x20, #8]
	madd	x8, x9, x23, x8
	str	x0, [x8, #8]
	ldr	x0, [x8]
	bl	_lio_map_ring
	ldp	x2, x8, [x20]
	str	w0, [x21, x8, lsl #2]
	mov	x0, x8
	mov	w1, #1
	bl	_incr_index
	add	x19, x19, #1
	ldr	x8, [x20, #16]
	subs	x8, x8, #1
	stp	x0, x8, [x20, #8]
	b.eq	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20]
	cmp	x19, x8
	b.lt	LBB0_3
; %bb.10:
	mov	w8, #0
	tbz	w8, #0, LBB0_13
	b	LBB0_14
LBB0_11:
	mov	x19, #0
	b	LBB0_14
LBB0_12:
	mov	x19, #0
	mov	w8, #0
	tbnz	w8, #0, LBB0_14
LBB0_13:
	mov	x0, x20
	mov	x1, x21
	bl	_octeon_droq_refill_pullup_descs
	add	x19, x0, x19
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
	ldr	w8, [x20, #32]
	add	w8, w8, #1
	str	w8, [x20, #32]
	ldr	x8, [x20, #16]
	cmp	x8, #0
	cset	w8, eq
	tbz	w8, #0, LBB0_13
	b	LBB0_14
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_octeon_droq_refill
.subsections_via_symbols
