	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LinkPaPutPacket                ## -- Begin function LinkPaPutPacket
	.p2align	4, 0x90
_LinkPaPutPacket:                       ## @LinkPaPutPacket
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	testq	%rdi, %rdi
	je	LBB0_23
## %bb.1:
	movq	16(%rdi), %rcx
	movq	(%rcx), %rbx
	testq	%rbx, %rbx
	je	LBB0_23
## %bb.2:
	movq	%rdx, %r15
	movq	%rsi, %r13
	movb	$1, %r12b
	cmpq	$0, 48(%rbx)
	jne	LBB0_4
## %bb.3:
	movq	40(%rbx), %rax
	cmpq	$0, (%rax)
	setne	%r12b
LBB0_4:
	movq	32(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %r14
	movl	(%rbx), %eax
	incl	%eax
	movl	%eax, (%rbx)
	testb	$31, %al
	je	LBB0_5
## %bb.6:
	testq	%r13, %r13
	je	LBB0_16
LBB0_7:
	testb	%r12b, %r12b
	je	LBB0_9
## %bb.8:
	xorl	%r15d, %r15d
	cmpl	$0, 4(%rbx)
	jne	LBB0_12
	jmp	LBB0_11
LBB0_5:
	movl	(%r14), %edi
	callq	_GetQueueNum
	movl	24(%rbx), %ecx
	movq	%rax, 24(%rbx)
	movl	%eax, %esi
	subl	%ecx, %esi
	movl	16(%rbx), %edi
	callq	_CedarAddQueueBudget
	testq	%r13, %r13
	jne	LBB0_7
LBB0_16:
	movl	(%r14), %edi
	callq	_GetQueueNum
	movl	24(%rbx), %ecx
	movq	%rax, 24(%rbx)
	movl	%eax, %esi
	subl	%ecx, %esi
	movl	16(%rbx), %edi
	callq	_CedarAddQueueBudget
	cmpl	$0, 4(%rbx)
	je	LBB0_18
## %bb.17:
	movl	$0, 4(%rbx)
	movl	(%r14), %edi
	callq	_UnlockQueue
LBB0_18:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_Cancel
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_22
## %bb.19:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_22
## %bb.20:
	cmpq	$0, (%rax)
	je	LBB0_22
## %bb.21:
	xorl	%eax, %eax
	callq	_YieldCpu
	jmp	LBB0_22
LBB0_9:
	movq	%r13, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_NewBlock
	movq	%rax, %r15
	cmpl	$0, 4(%rbx)
	jne	LBB0_12
LBB0_11:
	movl	$1, 4(%rbx)
	movl	(%r14), %edi
	callq	_LockQueue
	movl	(%r14), %edi
	callq	_GetQueueNum
	movl	24(%rbx), %ecx
	movq	%rax, 24(%rbx)
	movl	%eax, %esi
	subl	%ecx, %esi
	movl	16(%rbx), %edi
	callq	_CedarAddQueueBudget
LBB0_12:
	testb	%r12b, %r12b
	jne	LBB0_22
## %bb.13:
	movl	16(%rbx), %edi
	callq	_CedarGetFifoBudgetBalance
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_InsertReceivedBlockToQueue
	jmp	LBB0_22
LBB0_14:
	movq	%r15, %rdi
	callq	_FreeBlock
LBB0_22:
	xorb	$1, %r12b
	movzbl	%r12b, %eax
LBB0_23:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LinkPaPutPacket                ; -- Begin function LinkPaPutPacket
	.p2align	2
_LinkPaPutPacket:                       ; @LinkPaPutPacket
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	x0, LBB0_24
; %bb.1:
	ldr	x8, [x0, #16]
	ldr	x23, [x8]
	cbz	x23, LBB0_4
; %bb.2:
	mov	x20, x2
	mov	x21, x1
	ldr	x8, [x23, #48]
	cbz	x8, LBB0_5
; %bb.3:
	mov	w22, #1
	b	LBB0_6
LBB0_4:
	mov	w0, #0
	b	LBB0_24
LBB0_5:
	ldr	x8, [x23, #40]
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w22, ne
LBB0_6:
	ldr	x24, [x23, #32]
	ldr	x19, [x24, #8]
	ldr	w8, [x23]
	add	w8, w8, #1
	str	w8, [x23]
	tst	w8, #0x1f
	b.eq	LBB0_10
; %bb.7:
	cbz	x21, LBB0_11
LBB0_8:
	tbz	w22, #0, LBB0_17
; %bb.9:
	mov	x20, #0
	ldr	w8, [x23, #4]
	cbnz	w8, LBB0_19
	b	LBB0_18
LBB0_10:
	ldr	w0, [x19]
	bl	_GetQueueNum
	ldr	w8, [x23, #24]
	sub	w1, w0, w8
	str	x0, [x23, #24]
	ldr	w0, [x23, #16]
	bl	_CedarAddQueueBudget
	cbnz	x21, LBB0_8
LBB0_11:
	ldr	w0, [x19]
	bl	_GetQueueNum
	ldr	w8, [x23, #24]
	sub	w1, w0, w8
	str	x0, [x23, #24]
	ldr	w0, [x23, #16]
	bl	_CedarAddQueueBudget
	ldr	w8, [x23, #4]
	cbz	w8, LBB0_13
; %bb.12:
	str	wzr, [x23, #4]
	ldr	w0, [x19]
	bl	_UnlockQueue
LBB0_13:
	ldr	w0, [x24]
	bl	_Cancel
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_23
; %bb.14:
	ldr	x8, [x8]
	cbz	x8, LBB0_23
; %bb.15:
	ldr	x8, [x8]
	cbz	x8, LBB0_23
; %bb.16:
	bl	_YieldCpu
	b	LBB0_23
LBB0_17:
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	bl	_NewBlock
	mov	x20, x0
	ldr	w8, [x23, #4]
	cbnz	w8, LBB0_19
LBB0_18:
	mov	w8, #1
	str	w8, [x23, #4]
	ldr	w0, [x19]
	bl	_LockQueue
	ldr	w0, [x19]
	bl	_GetQueueNum
	ldr	w8, [x23, #24]
	sub	w1, w0, w8
	str	x0, [x23, #24]
	ldr	w0, [x23, #16]
	bl	_CedarAddQueueBudget
LBB0_19:
	tbnz	w22, #0, LBB0_23
; %bb.20:
	ldr	w0, [x23, #16]
	bl	_CedarGetFifoBudgetBalance
	cbz	x0, LBB0_22
; %bb.21:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_InsertReceivedBlockToQueue
	b	LBB0_23
LBB0_22:
	mov	x0, x20
	bl	_FreeBlock
LBB0_23:
	eor	w0, w22, #0x1
LBB0_24:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
