	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_get_credit                 ## -- Begin function qib_get_credit
	.p2align	4, 0x90
_qib_get_credit:                        ## @qib_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_QIB_AETH_CREDIT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	%rsi, %rdx
	shrq	%cl, %rdx
	movq	_QIB_AETH_CREDIT_MASK@GOTPCREL(%rip), %rax
	andq	(%rax), %rdx
	movq	_QIB_AETH_CREDIT_INVAL@GOTPCREL(%rip), %rsi
	movl	(%rdi), %ecx
	movq	_QIB_S_UNLIMITED_CREDIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpq	(%rsi), %rdx
	jne	LBB0_3
## %bb.1:
	testl	%ecx, %eax
	jne	LBB0_7
## %bb.2:
	orl	%ecx, %eax
	movl	%eax, (%r14)
	jmp	LBB0_6
LBB0_3:
	testl	%ecx, %eax
	jne	LBB0_7
## %bb.4:
	movq	_credit_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	(%rax,%rdx,8), %rbx
	movq	_QIB_MSN_MASK@GOTPCREL(%rip), %rax
	andq	(%rax), %rbx
	movq	8(%r14), %rsi
	movq	%rbx, %rdi
	callq	_qib_cmp24
	testq	%rax, %rax
	jle	LBB0_7
## %bb.5:
	movq	%rbx, 8(%r14)
	movl	(%r14), %eax
LBB0_6:
	movq	_QIB_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, (%r14)
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_qib_schedule_send              ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QIB_AETH_CREDIT_SHIFT,8,3      ## @QIB_AETH_CREDIT_SHIFT
	.comm	_QIB_AETH_CREDIT_MASK,8,3       ## @QIB_AETH_CREDIT_MASK
	.comm	_QIB_AETH_CREDIT_INVAL,8,3      ## @QIB_AETH_CREDIT_INVAL
	.comm	_QIB_S_UNLIMITED_CREDIT,4,2     ## @QIB_S_UNLIMITED_CREDIT
	.comm	_QIB_S_WAIT_SSN_CREDIT,4,2      ## @QIB_S_WAIT_SSN_CREDIT
	.comm	_credit_table,8,3               ## @credit_table
	.comm	_QIB_MSN_MASK,8,3               ## @QIB_MSN_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_get_credit                 ; -- Begin function qib_get_credit
	.p2align	2
_qib_get_credit:                        ; @qib_get_credit
	.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, _QIB_AETH_CREDIT_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QIB_AETH_CREDIT_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _QIB_AETH_CREDIT_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _QIB_AETH_CREDIT_MASK@GOTPAGEOFF]
	lsr	x8, x1, x8
Lloh5:
	ldr	x9, [x9]
	and	x8, x8, x9
Lloh6:
	adrp	x9, _QIB_AETH_CREDIT_INVAL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _QIB_AETH_CREDIT_INVAL@GOTPAGEOFF]
Lloh8:
	ldr	x12, [x9]
	ldr	w9, [x0]
Lloh9:
	adrp	x10, _QIB_S_UNLIMITED_CREDIT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _QIB_S_UNLIMITED_CREDIT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	and	w11, w10, w9
	cmp	x8, x12
	b.ne	LBB0_3
; %bb.1:
	cbnz	w11, LBB0_8
; %bb.2:
	orr	w8, w10, w9
	str	w8, [x19]
	b	LBB0_6
LBB0_3:
	cbnz	w11, LBB0_8
; %bb.4:
Lloh12:
	adrp	x9, _credit_table@GOTPAGE
Lloh13:
	ldr	x9, [x9, _credit_table@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	ldr	x8, [x9, x8, lsl #3]
Lloh15:
	adrp	x9, _QIB_MSN_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _QIB_MSN_MASK@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x8, x8, x1
	and	x20, x8, x9
	ldr	x1, [x19, #8]
	mov	x0, x20
	bl	_qib_cmp24
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.5:
	str	x20, [x19, #8]
	ldr	w8, [x19]
LBB0_6:
Lloh18:
	adrp	x9, _QIB_S_WAIT_SSN_CREDIT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _QIB_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]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_qib_schedule_send
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 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	_QIB_AETH_CREDIT_SHIFT,8,3      ; @QIB_AETH_CREDIT_SHIFT
	.comm	_QIB_AETH_CREDIT_MASK,8,3       ; @QIB_AETH_CREDIT_MASK
	.comm	_QIB_AETH_CREDIT_INVAL,8,3      ; @QIB_AETH_CREDIT_INVAL
	.comm	_QIB_S_UNLIMITED_CREDIT,4,2     ; @QIB_S_UNLIMITED_CREDIT
	.comm	_QIB_S_WAIT_SSN_CREDIT,4,2      ; @QIB_S_WAIT_SSN_CREDIT
	.comm	_credit_table,8,3               ; @credit_table
	.comm	_QIB_MSN_MASK,8,3               ; @QIB_MSN_MASK
.subsections_via_symbols
