	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_buffer_control
_get_buffer_control:                    ## @get_buffer_control
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	%rsi, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_TXE_NUM_DATA_VL@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_SEND_CM_CREDIT_VL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	movq	8(%r15), %rdx
	addq	%rbx, %rdx
	movq	%r13, %rdi
	movq	%r15, %r13
	movq	%rcx, %r15
	callq	_read_one_cm_vl
	movq	%r15, %rcx
	movq	%r13, %r15
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	incq	%r14
	movslq	(%rcx), %rax
	addq	$8, %r12
	addq	$4, %rbx
	cmpq	%rax, %r14
	jl	LBB0_2
LBB0_3:
	movq	_SEND_CM_CREDIT_VL15@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	8(%r15), %rdx
	addq	$60, %rdx
	movq	%r13, %rdi
	callq	_read_one_cm_vl
	movq	_SEND_CM_GLOBAL_CREDIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_read_csr
	movl	%eax, %ebx
	movq	_SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %edi
	sarl	%cl, %edi
	movq	_SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	callq	_cpu_to_be16
	movl	%eax, (%r15)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.4:
	movq	_SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	movq	_SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movl	%ebx, (%rdx)
LBB0_5:
	movl	$16, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TXE_NUM_DATA_VL,4,2            ## @TXE_NUM_DATA_VL
	.comm	_SEND_CM_CREDIT_VL,8,3          ## @SEND_CM_CREDIT_VL
	.comm	_SEND_CM_CREDIT_VL15,8,3        ## @SEND_CM_CREDIT_VL15
	.comm	_SEND_CM_GLOBAL_CREDIT,4,2      ## @SEND_CM_GLOBAL_CREDIT
	.comm	_SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_SHIFT,4,2 ## @SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_SHIFT
	.comm	_SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_MASK,4,2 ## @SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_MASK
	.comm	_SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_SHIFT,4,2 ## @SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_SHIFT
	.comm	_SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_MASK,4,2 ## @SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_MASK
	.no_dead_strip	_get_buffer_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_buffer_control
_get_buffer_control:                    ; @get_buffer_control
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh0:
	adrp	x22, _TXE_NUM_DATA_VL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TXE_NUM_DATA_VL@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x23, #0
	mov	x24, #0
	mov	x25, #0
Lloh2:
	adrp	x26, _SEND_CM_CREDIT_VL@GOTPAGE
Lloh3:
	ldr	x26, [x26, _SEND_CM_CREDIT_VL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	add	x1, x24, x8
	ldr	x8, [x20, #8]
	add	x2, x8, x23
	mov	x0, x21
	bl	_read_one_cm_vl
	add	x25, x25, #1
	ldrsw	x8, [x22]
	add	x24, x24, #8
	add	x23, x23, #4
	cmp	x25, x8
	b.lt	LBB0_2
LBB0_3:
Lloh4:
	adrp	x8, _SEND_CM_CREDIT_VL15@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SEND_CM_CREDIT_VL15@GOTPAGEOFF]
Lloh6:
	ldr	x1, [x8]
	ldr	x8, [x20, #8]
	add	x2, x8, #60
	mov	x0, x21
	bl	_read_one_cm_vl
Lloh7:
	adrp	x8, _SEND_CM_GLOBAL_CREDIT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SEND_CM_GLOBAL_CREDIT@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_read_csr
	mov	x21, x0
Lloh10:
	adrp	x8, _SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_SHIFT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	asr	w8, w0, w8
Lloh13:
	adrp	x9, _SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_MASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	and	w0, w8, w9
	bl	_cpu_to_be16
	str	w0, [x20]
	cbz	x19, LBB0_5
; %bb.4:
Lloh16:
	adrp	x8, _SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_SHIFT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_SHIFT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	asr	w8, w21, w8
Lloh19:
	adrp	x9, _SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_MASK@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_MASK@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	and	w8, w8, w9
	str	w8, [x19]
LBB0_5:
	mov	w0, #16
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_TXE_NUM_DATA_VL,4,2            ; @TXE_NUM_DATA_VL
	.comm	_SEND_CM_CREDIT_VL,8,3          ; @SEND_CM_CREDIT_VL
	.comm	_SEND_CM_CREDIT_VL15,8,3        ; @SEND_CM_CREDIT_VL15
	.comm	_SEND_CM_GLOBAL_CREDIT,4,2      ; @SEND_CM_GLOBAL_CREDIT
	.comm	_SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_SHIFT,4,2 ; @SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_SHIFT
	.comm	_SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_MASK,4,2 ; @SEND_CM_GLOBAL_CREDIT_SHARED_LIMIT_MASK
	.comm	_SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_SHIFT,4,2 ; @SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_SHIFT
	.comm	_SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_MASK,4,2 ; @SEND_CM_GLOBAL_CREDIT_TOTAL_CREDIT_LIMIT_MASK
	.no_dead_strip	_get_buffer_control
.subsections_via_symbols
