	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CopySnapshot
_CopySnapshot:                          ## @CopySnapshot
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_InvalidSnapshot@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%r14, (%rax)
	setne	%dil
	callq	_Assert
	movl	(%r14), %r15d
	movl	4(%r14), %eax
	shll	$6, %r15d
	movl	%eax, %ecx
	shll	$6, %ecx
	xorl	%edx, %edx
	testl	%eax, %eax
	cmovgl	%ecx, %edx
	leal	(%rdx,%r15), %esi
	addl	$4, %esi
	movq	_TopTransactionContext@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MemoryContextAlloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%rbx)
	movl	$1, 8(%rbx)
	movl	(%r14), %edx
	testl	%edx, %edx
	jle	LBB0_2
## %bb.1:
	leaq	64(%rbx), %rdi
	movq	%rdi, 40(%rbx)
	movq	40(%r14), %rsi
	shll	$6, %edx
	callq	_memcpy
	jmp	LBB0_3
LBB0_2:
	movq	$0, 40(%rbx)
LBB0_3:
	movl	4(%r14), %edx
	testl	%edx, %edx
	jle	LBB0_7
## %bb.4:
	cmpl	$0, 32(%r14)
	je	LBB0_6
## %bb.5:
	cmpq	$0, 24(%r14)
	je	LBB0_7
LBB0_6:
	orl	$4, %r15d
	movslq	%r15d, %rax
	movq	%rbx, %rdi
	addq	%rax, %rdi
	movq	%rdi, 16(%rbx)
	movq	16(%r14), %rsi
	shll	$6, %edx
	callq	_memcpy
	jmp	LBB0_8
LBB0_7:
	movq	$0, 16(%rbx)
LBB0_8:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_InvalidSnapshot,8,3            ## @InvalidSnapshot
	.comm	_TopTransactionContext,4,2      ## @TopTransactionContext
	.no_dead_strip	_CopySnapshot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CopySnapshot
_CopySnapshot:                          ; @CopySnapshot
	.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	x19, x0
Lloh0:
	adrp	x8, _InvalidSnapshot@GOTPAGE
Lloh1:
	ldr	x8, [x8, _InvalidSnapshot@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	cset	w0, ne
	bl	_Assert
	mov	w21, #4
	ldp	w8, w9, [x19]
	bfi	w21, w8, #6, #26
	lsl	w8, w9, #6
	cmp	w9, #0
	csel	w8, w8, wzr, gt
	add	w1, w8, w21
Lloh3:
	adrp	x8, _TopTransactionContext@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TopTransactionContext@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_MemoryContextAlloc
	mov	x20, x0
	mov	x1, x19
	mov	w2, #4
	bl	_memcpy
	stp	xzr, xzr, [x20, #48]
	mov	w8, #1
	str	w8, [x20, #8]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.1:
	add	x0, x20, #64
	str	x0, [x20, #40]
	ldr	x1, [x19, #40]
	lsl	w2, w8, #6
	bl	_memcpy
	b	LBB0_3
LBB0_2:
	str	xzr, [x20, #40]
LBB0_3:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.4:
	ldr	w9, [x19, #32]
	cbz	w9, LBB0_6
; %bb.5:
	ldr	x9, [x19, #24]
	cbz	x9, LBB0_7
LBB0_6:
	add	x0, x20, w21, sxtw
	str	x0, [x20, #16]
	ldr	x1, [x19, #16]
	lsl	w2, w8, #6
	bl	_memcpy
	b	LBB0_8
LBB0_7:
	str	xzr, [x20, #16]
LBB0_8:
	mov	x0, x20
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_InvalidSnapshot,8,3            ; @InvalidSnapshot
	.comm	_TopTransactionContext,4,2      ; @TopTransactionContext
	.no_dead_strip	_CopySnapshot
.subsections_via_symbols
