	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tts_buffer_heap_store_tuple
_tts_buffer_heap_store_tuple:           ## @tts_buffer_heap_store_tuple
	.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
	movl	%ecx, %r14d
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_TTS_SHOULDFREE
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rdi
	callq	_BufferIsValid
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_Assert
	movq	16(%rbx), %rdi
	callq	_heap_freetuple
LBB0_2:
	movq	%r12, 16(%rbx)
	movq	$0, 8(%rbx)
	movl	(%r12), %eax
	movl	%eax, (%rbx)
	movq	(%rbx), %rdi
	cmpq	%r15, %rdi
	jne	LBB0_3
## %bb.8:
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ReleaseBuffer                  ## TAILCALL
LBB0_3:
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	(%rbx), %rdi
	callq	_ReleaseBuffer
LBB0_5:
	movq	%r15, (%rbx)
	testl	%r14d, %r14d
	je	LBB0_6
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r15, %rdi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IncrBufferRefCount             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TTS_FLAG_SHOULDFREE,4,2        ## @TTS_FLAG_SHOULDFREE
	.comm	_TTS_FLAG_EMPTY,4,2             ## @TTS_FLAG_EMPTY
	.no_dead_strip	_tts_buffer_heap_store_tuple
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tts_buffer_heap_store_tuple
_tts_buffer_heap_store_tuple:           ; @tts_buffer_heap_store_tuple
	.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	x20, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	bl	_TTS_SHOULDFREE
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x0, [x21]
	bl	_BufferIsValid
	cmp	x0, #0
	cset	w0, eq
	bl	_Assert
	ldr	x0, [x21, #16]
	bl	_heap_freetuple
LBB0_2:
	stp	xzr, x22, [x21, #8]
	ldr	w8, [x22]
	str	w8, [x21]
	ldr	x0, [x21]
	cmp	x0, x19
	b.ne	LBB0_6
; %bb.3:
	cbz	w20, LBB0_9
; %bb.4:
	mov	x0, x19
	bl	_BufferIsValid
	cbz	x0, LBB0_9
; %bb.5:
	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
	b	_ReleaseBuffer
LBB0_6:
	bl	_BufferIsValid
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x0, [x21]
	bl	_ReleaseBuffer
LBB0_8:
	str	x19, [x21]
	cbz	w20, LBB0_10
LBB0_9:
	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
LBB0_10:
	mov	x0, x19
	bl	_BufferIsValid
	cbz	x0, LBB0_9
; %bb.11:
	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
	b	_IncrBufferRefCount
	.cfi_endproc
                                        ; -- End function
	.comm	_TTS_FLAG_SHOULDFREE,4,2        ; @TTS_FLAG_SHOULDFREE
	.comm	_TTS_FLAG_EMPTY,4,2             ; @TTS_FLAG_EMPTY
	.no_dead_strip	_tts_buffer_heap_store_tuple
.subsections_via_symbols
