	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvt_get_credit                 ## -- Begin function rvt_get_credit
	.p2align	4, 0x90
_rvt_get_credit:                        ## @rvt_get_credit
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	20(%rdi), %edi
	callq	_ib_to_rvt
	movq	%rax, %r12
	movq	_IB_AETH_CREDIT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	%r14, %rbx
	shrq	%cl, %rbx
	movq	_IB_AETH_CREDIT_MASK@GOTPCREL(%rip), %rax
	andq	(%rax), %rbx
	leaq	16(%r15), %rdi
	callq	_lockdep_assert_held
	movq	_IB_AETH_CREDIT_INVAL@GOTPCREL(%rip), %rdx
	movl	(%r15), %ecx
	movq	_RVT_S_UNLIMITED_CREDIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpq	(%rdx), %rbx
	jne	LBB0_3
## %bb.1:
	testl	%ecx, %eax
	jne	LBB0_7
## %bb.2:
	orl	%ecx, %eax
	movl	%eax, (%r15)
	jmp	LBB0_6
LBB0_3:
	testl	%ecx, %eax
	jne	LBB0_7
## %bb.4:
	movq	_credit_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	(%rax,%rbx,8), %r14
	movq	_IB_MSN_MASK@GOTPCREL(%rip), %rax
	andq	(%rax), %r14
	movq	8(%r15), %rsi
	movq	%r14, %rdi
	callq	_rvt_cmp_msn
	testq	%rax, %rax
	jle	LBB0_7
## %bb.5:
	movq	%r14, 8(%r15)
	movl	(%r15), %eax
LBB0_6:
	movq	_RVT_S_WAIT_SSN_CREDIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_7
## %bb.8:
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, (%r15)
	movq	%r15, %rdi
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*(%rax)                         ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_AETH_CREDIT_SHIFT,8,3       ## @IB_AETH_CREDIT_SHIFT
	.comm	_IB_AETH_CREDIT_MASK,8,3        ## @IB_AETH_CREDIT_MASK
	.comm	_IB_AETH_CREDIT_INVAL,8,3       ## @IB_AETH_CREDIT_INVAL
	.comm	_RVT_S_UNLIMITED_CREDIT,4,2     ## @RVT_S_UNLIMITED_CREDIT
	.comm	_RVT_S_WAIT_SSN_CREDIT,4,2      ## @RVT_S_WAIT_SSN_CREDIT
	.comm	_credit_table,8,3               ## @credit_table
	.comm	_IB_MSN_MASK,8,3                ## @IB_MSN_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvt_get_credit                 ; -- Begin function rvt_get_credit
	.p2align	2
_rvt_get_credit:                        ; @rvt_get_credit
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #20]
	bl	_ib_to_rvt
	mov	x20, x0
Lloh0:
	adrp	x8, _IB_AETH_CREDIT_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_AETH_CREDIT_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	lsr	x8, x21, x8
Lloh3:
	adrp	x9, _IB_AETH_CREDIT_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IB_AETH_CREDIT_MASK@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	and	x22, x8, x9
	add	x0, x19, #16
	bl	_lockdep_assert_held
Lloh6:
	adrp	x8, _IB_AETH_CREDIT_INVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IB_AETH_CREDIT_INVAL@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x8]
	ldr	w8, [x19]
Lloh9:
	adrp	x9, _RVT_S_UNLIMITED_CREDIT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RVT_S_UNLIMITED_CREDIT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w10, w9, w8
	cmp	x22, x11
	b.ne	LBB0_3
; %bb.1:
	cbnz	w10, LBB0_8
; %bb.2:
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_6
LBB0_3:
	cbnz	w10, LBB0_8
; %bb.4:
Lloh12:
	adrp	x8, _credit_table@GOTPAGE
Lloh13:
	ldr	x8, [x8, _credit_table@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	x8, [x8, x22, lsl #3]
Lloh15:
	adrp	x9, _IB_MSN_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IB_MSN_MASK@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x8, x8, x21
	and	x21, x8, x9
	ldr	x1, [x19, #8]
	mov	x0, x21
	bl	_rvt_cmp_msn
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.5:
	str	x21, [x19, #8]
	ldr	w8, [x19]
LBB0_6:
Lloh18:
	adrp	x9, _RVT_S_WAIT_SSN_CREDIT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _RVT_S_WAIT_SSN_CREDIT@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	bic	w8, w8, w9
	str	w8, [x19]
	ldr	x1, [x20]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	br	x1
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_AETH_CREDIT_SHIFT,8,3       ; @IB_AETH_CREDIT_SHIFT
	.comm	_IB_AETH_CREDIT_MASK,8,3        ; @IB_AETH_CREDIT_MASK
	.comm	_IB_AETH_CREDIT_INVAL,8,3       ; @IB_AETH_CREDIT_INVAL
	.comm	_RVT_S_UNLIMITED_CREDIT,4,2     ; @RVT_S_UNLIMITED_CREDIT
	.comm	_RVT_S_WAIT_SSN_CREDIT,4,2      ; @RVT_S_WAIT_SSN_CREDIT
	.comm	_credit_table,8,3               ; @credit_table
	.comm	_IB_MSN_MASK,8,3                ; @IB_MSN_MASK
.subsections_via_symbols
