	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_rbr_refill
_niu_rbr_refill:                        ## @niu_rbr_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edx, %r8d
	movl	(%rsi), %ecx
	movl	4(%rsi), %eax
	incl	%eax
	movl	%eax, 4(%rsi)
	cltd
	idivl	8(%rsi)
	testl	%edx, %edx
	jne	LBB0_8
## %bb.1:
	movq	%rsi, %rbx
	movl	%r8d, %edx
	callq	_niu_rbr_add_page
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	4(%rbx), %eax
	decl	%eax
	jmp	LBB0_7
LBB0_3:
	movl	(%rbx), %eax
	addl	8(%rbx), %eax
	movl	%eax, (%rbx)
	xorl	%edi, %edi
	cmpl	12(%rbx), %eax
	setg	%dil
	callq	_BUG_ON
	movl	(%rbx), %eax
	cmpl	12(%rbx), %eax
	jne	LBB0_5
## %bb.4:
	movl	$0, (%rbx)
LBB0_5:
	movl	4(%rbx), %eax
	cmpl	16(%rbx), %eax
	jl	LBB0_8
## %bb.6:
	movl	20(%rbx), %edi
	callq	_RBR_KICK
	movl	4(%rbx), %esi
	movl	%eax, %edi
	callq	_nw64
	xorl	%eax, %eax
LBB0_7:
	movl	%eax, 4(%rbx)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_niu_rbr_refill
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_rbr_refill
_niu_rbr_refill:                        ; @niu_rbr_refill
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldp	w3, w8, [x1]
	add	w8, w8, #1
	str	w8, [x1, #4]
	ldr	w9, [x1, #8]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	cbnz	w8, LBB0_8
; %bb.1:
	mov	x19, x1
	bl	_niu_rbr_add_page
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w8, [x19, #4]
	sub	w8, w8, #1
	b	LBB0_7
LBB0_3:
	ldr	w8, [x19]
	ldp	w9, w10, [x19, #8]
	add	w8, w8, w9
	cmp	w8, w10
	str	w8, [x19]
	cset	w0, gt
	bl	_BUG_ON
	ldr	w8, [x19]
	ldr	w9, [x19, #12]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.4:
	str	wzr, [x19]
LBB0_5:
	ldr	w8, [x19, #4]
	ldr	w9, [x19, #16]
	cmp	w8, w9
	b.lt	LBB0_8
; %bb.6:
	ldr	w0, [x19, #20]
	bl	_RBR_KICK
	ldr	w1, [x19, #4]
	bl	_nw64
	mov	w8, #0
LBB0_7:
	str	w8, [x19, #4]
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_niu_rbr_refill
.subsections_via_symbols
