	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rs_give_credits
_rs_give_credits:                       ## @rs_give_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_RS_OPT_MSG_SEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%rdi), %eax
	movl	8(%rdi), %ecx
	sarl	%ecx
	testl	%edx, (%rdi)
	je	LBB0_5
## %bb.1:
	cmpl	%ecx, %eax
	jge	LBB0_3
## %bb.2:
	movl	24(%rbx), %ecx
	subl	16(%rbx), %ecx
	xorl	%eax, %eax
	testl	$32768, %ecx                    ## imm = 0x8000
	jne	LBB0_9
LBB0_3:
	movq	%rbx, %rdi
	callq	_rs_2ctrl_avail
	testq	%rax, %rax
	je	LBB0_10
LBB0_8:
	movq	_rs_connected@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	testl	%ecx, 12(%rbx)
	setne	%al
	jmp	LBB0_9
LBB0_5:
	cmpl	%ecx, %eax
	jge	LBB0_7
## %bb.6:
	movl	24(%rbx), %ecx
	subl	16(%rbx), %ecx
	xorl	%eax, %eax
	testl	$32768, %ecx                    ## imm = 0x8000
	jne	LBB0_9
LBB0_7:
	movq	%rbx, %rdi
	callq	_rs_ctrl_avail
	testq	%rax, %rax
	jne	LBB0_8
LBB0_10:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RS_OPT_MSG_SEND,4,2            ## @RS_OPT_MSG_SEND
	.comm	_rs_connected,4,2               ## @rs_connected
	.no_dead_strip	_rs_give_credits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rs_give_credits
_rs_give_credits:                       ; @rs_give_credits
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _RS_OPT_MSG_SEND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RS_OPT_MSG_SEND@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x8]
	ldp	w11, w8, [x0]
	ldr	w9, [x0, #8]
	asr	w9, w9, #1
	tst	w10, w11
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, w9
	b.ge	LBB0_3
; %bb.2:
	ldr	w8, [x19, #24]
	ldr	w9, [x19, #16]
	sub	w8, w8, w9
	tbnz	w8, #15, LBB0_8
LBB0_3:
	mov	x0, x19
	bl	_rs_2ctrl_avail
	cbnz	x0, LBB0_7
	b	LBB0_9
LBB0_4:
	cmp	w8, w9
	b.ge	LBB0_6
; %bb.5:
	ldr	w8, [x19, #24]
	ldr	w9, [x19, #16]
	sub	w8, w8, w9
	tbnz	w8, #15, LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_rs_ctrl_avail
	cbz	x0, LBB0_9
LBB0_7:
	ldr	w8, [x19, #12]
Lloh3:
	adrp	x9, _rs_connected@GOTPAGE
Lloh4:
	ldr	x9, [x9, _rs_connected@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, ne
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RS_OPT_MSG_SEND,4,2            ; @RS_OPT_MSG_SEND
	.comm	_rs_connected,4,2               ; @rs_connected
	.no_dead_strip	_rs_give_credits
.subsections_via_symbols
