	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function credit_update_needed
_credit_update_needed:                  ## @credit_update_needed
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_remote_credits
	movl	%eax, %ebx
	movq	_SDP_MIN_TX_CREDITS@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	(%rax), %ebx
	setg	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	%ebx, %eax
	shrl	$31, %eax
	addl	%ebx, %eax
	sarl	%eax
	addl	%eax, %ebx
LBB0_2:
	movq	%r14, %rdi
	callq	_rx_ring_posted
	xorl	%edi, %edi
	cmpl	%eax, %ebx
	setl	%dil
	callq	_unlikely
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	_tx_credits
	xorl	%edi, %edi
	testq	%rax, %rax
	setg	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_sdp_tx_ring_slots_left
	movl	%eax, %edi
	callq	_likely
	xorl	%ebx, %ebx
	testq	%rax, %rax
	setne	%bl
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDP_MIN_TX_CREDITS,4,2         ## @SDP_MIN_TX_CREDITS
	.no_dead_strip	_credit_update_needed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function credit_update_needed
_credit_update_needed:                  ; @credit_update_needed
	.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
	bl	_remote_credits
	mov	x20, x0
Lloh0:
	adrp	x8, _SDP_MIN_TX_CREDITS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDP_MIN_TX_CREDITS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	cset	w0, gt
	bl	_likely
	cbz	x0, LBB0_2
; %bb.1:
	cmp	w20, #0
	cinc	w8, w20, lt
	add	w20, w20, w8, asr #1
LBB0_2:
	mov	x0, x19
	bl	_rx_ring_posted
	cmp	w20, w0
	cset	w0, lt
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_tx_credits
	cmp	x0, #0
	cset	w0, gt
	bl	_likely
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_sdp_tx_ring_slots_left
	bl	_likely
	cmp	x0, #0
	cset	w0, ne
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SDP_MIN_TX_CREDITS,4,2         ; @SDP_MIN_TX_CREDITS
	.no_dead_strip	_credit_update_needed
.subsections_via_symbols
