	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rs_send_credits
_rs_send_credits:                       ## @rs_send_credits
	.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	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	88(%rdi), %ecx
	leal	1(%rcx), %eax
	movl	%eax, 88(%rdi)
	movq	32(%rdi), %rsi
	movslq	(%rdi), %rdx
	movl	%edx, %eax
	sarl	%eax
	cltq
	addq	%rsi, %rax
	movq	%rax, 96(%rdi)
	movl	8(%rdi), %eax
	sarl	%eax
	cmpl	%eax, 4(%rdi)
	jge	LBB0_1
## %bb.10:
	movq	_RS_OP_SGL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	%rdx, %rsi
	callq	_rs_msg_set
	movq	%rbx, %rdi
	movl	%eax, %esi
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rs_post_msg                    ## TAILCALL
LBB0_1:
	movl	12(%rbx), %edx
	movq	_RS_OPT_MSG_SEND@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_3
## %bb.2:
	addl	$2, %ecx
	movl	%ecx, 88(%rbx)
LBB0_3:
	movq	_RS_OPT_SWAP_SGL@GOTPCREL(%rip), %rcx
	movq	16(%rbx), %r14
	shlq	$2, %r14
	addq	80(%rbx), %r14
	testl	%edx, (%rcx)
	je	LBB0_4
## %bb.5:
	movq	%r14, %rdi
	callq	_bswap_64
	movq	%rax, %r14
	movq	72(%rbx), %rax
	movl	(%rax), %edi
	callq	_bswap_32
	movq	%rax, %r15
	movl	8(%rbx), %edi
	sarl	%edi
	callq	_bswap_32
	jmp	LBB0_6
LBB0_4:
	movq	72(%rbx), %rcx
	movl	(%rcx), %r15d
LBB0_6:
	movq	%r14, -40(%rbp)
	movl	%r15d, -32(%rbp)
	movl	%eax, -28(%rbp)
	cmpl	$15, 24(%rbx)
	ja	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_rs_get_ctrl_buf
	movq	%rax, %r15
	leaq	-40(%rbp), %rsi
	movq	%rax, %rdi
	movl	$16, %edx
	callq	_memcpy
	movq	64(%rbx), %rax
	movq	(%rax), %rax
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_8:
	movq	_IBV_SEND_INLINE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	-40(%rbp), %r15
	xorl	%eax, %eax
LBB0_9:
	movq	%r15, -64(%rbp)
	movq	%rax, -48(%rbp)
	movl	$16, -56(%rbp)
	movq	_RS_OP_SGL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movslq	(%rbx), %rsi
	addq	32(%rbx), %rsi
	callq	_rs_msg_set
	movslq	28(%rbx), %r9
	shlq	$4, %r9
	addq	56(%rbx), %r9
	movl	48(%rbx), %ecx
	movl	%ecx, (%rsp)
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	movl	%eax, %ecx
	movl	%r14d, %r8d
	callq	_rs_post_write_msg
	movslq	8(%rbx), %rax
	movl	%eax, %ecx
	sarl	%ecx
	subl	%ecx, 4(%rbx)
	movslq	%ecx, %rcx
	addq	16(%rbx), %rcx
	xorl	%edx, %edx
	cmpq	%rax, %rcx
	cmovaeq	%rdx, %rcx
	movq	%rcx, 16(%rbx)
	movslq	28(%rbx), %rax
	incq	%rax
	cmpq	%rax, 40(%rbx)
	cmovnel	%eax, %edx
	movl	%edx, 28(%rbx)
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RS_OPT_MSG_SEND,4,2            ## @RS_OPT_MSG_SEND
	.comm	_RS_OPT_SWAP_SGL,4,2            ## @RS_OPT_SWAP_SGL
	.comm	_IBV_SEND_INLINE,4,2            ## @IBV_SEND_INLINE
	.comm	_RS_OP_SGL,4,2                  ## @RS_OP_SGL
	.no_dead_strip	_rs_send_credits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rs_send_credits
_rs_send_credits:                       ; @rs_send_credits
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
	ldr	w8, [x0, #88]
	add	w9, w8, #1
	str	w9, [x0, #88]
	ldr	x9, [x0, #32]
	ldp	w10, w11, [x0]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	asr	w12, w10, #1
	add	x12, x9, w12, sxtw
	str	x12, [x0, #96]
	ldr	w12, [x0, #8]
	asr	w0, w12, #1
	cmp	w11, w0
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _RS_OP_SGL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RS_OP_SGL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x9, x10
	bl	_rs_msg_set
	mov	x1, x0
	mov	x0, x19
	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
	add	sp, sp, #96
	b	_rs_post_msg
LBB0_2:
	ldr	w9, [x19, #12]
Lloh3:
	adrp	x10, _RS_OPT_MSG_SEND@GOTPAGE
Lloh4:
	ldr	x10, [x10, _RS_OPT_MSG_SEND@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.3:
	add	w8, w8, #2
	str	w8, [x19, #88]
LBB0_4:
Lloh6:
	adrp	x8, _RS_OPT_SWAP_SGL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RS_OPT_SWAP_SGL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	x10, [x19, #80]
	ldr	x11, [x19, #16]
	add	x20, x10, x11, lsl #2
	tst	w8, w9
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_bswap_64
	mov	x20, x0
	ldr	x8, [x19, #72]
	ldr	w0, [x8]
	bl	_bswap_32
	mov	x21, x0
	ldr	w8, [x19, #8]
	asr	w0, w8, #1
	bl	_bswap_32
	b	LBB0_7
LBB0_6:
	ldr	x8, [x19, #72]
	ldr	w21, [x8]
LBB0_7:
	str	x20, [sp, #8]
	stp	w21, w0, [sp, #16]
	ldr	w8, [x19, #24]
	cmp	w8, #15
	b.hi	LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_rs_get_ctrl_buf
	mov	x21, x0
	add	x1, sp, #8
	mov	w2, #16
	bl	_memcpy
	mov	w20, #0
	ldr	x8, [x19, #64]
	ldr	x8, [x8]
	b	LBB0_10
LBB0_9:
	mov	x8, #0
Lloh9:
	adrp	x9, _IBV_SEND_INLINE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IBV_SEND_INLINE@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x9]
	add	x21, sp, #8
LBB0_10:
	str	x21, [sp, #24]
	str	x8, [sp, #40]
	mov	w8, #16
	str	w8, [sp, #32]
Lloh12:
	adrp	x8, _RS_OP_SGL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RS_OP_SGL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	x8, [x19, #32]
	ldrsw	x9, [x19]
	add	x1, x8, x9
	bl	_rs_msg_set
	mov	x3, x0
	ldr	x8, [x19, #56]
	ldrsw	x9, [x19, #28]
	add	x5, x8, x9, lsl #4
	ldr	w6, [x19, #48]
	add	x1, sp, #24
	mov	x0, x19
	mov	w2, #1
	mov	x4, x20
	bl	_rs_post_write_msg
	ldp	w9, w8, [x19, #4]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	asr	w10, w8, #1
	sub	w9, w9, w10
	str	w9, [x19, #4]
	ldr	x9, [x19, #16]
	add	x9, x9, w10, sxtw
	cmp	x9, x8
	csel	x8, x9, xzr, lo
	str	x8, [x19, #16]
	ldrsw	x8, [x19, #28]
	add	x8, x8, #1
	ldr	x9, [x19, #40]
	cmp	x9, x8
	csel	w8, wzr, w8, eq
	str	w8, [x19, #28]
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RS_OPT_MSG_SEND,4,2            ; @RS_OPT_MSG_SEND
	.comm	_RS_OPT_SWAP_SGL,4,2            ; @RS_OPT_SWAP_SGL
	.comm	_IBV_SEND_INLINE,4,2            ; @IBV_SEND_INLINE
	.comm	_RS_OP_SGL,4,2                  ; @RS_OP_SGL
	.no_dead_strip	_rs_send_credits
.subsections_via_symbols
