	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sqlite3_value_dup              ## -- Begin function sqlite3_value_dup
	.p2align	4, 0x90
_sqlite3_value_dup:                     ## @sqlite3_value_dup
	.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
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	movq	%rdi, %r14
	movl	$16, %edi
	callq	_sqlite3_malloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_MEMCELLSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_memcpy
	movq	_MEM_Dyn@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	notl	%eax
	andl	(%rbx), %eax
	movl	%eax, (%rbx)
	movq	$0, 8(%rbx)
	movq	_MEM_Str@GOTPCREL(%rip), %rdx
	movq	_MEM_Blob@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rdx), %esi
	testl	%eax, %esi
	je	LBB0_6
## %bb.3:
	movq	_MEM_Static@GOTPCREL(%rip), %rdx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%rbx)
	movq	_MEM_Ephem@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_sqlite3VdbeMemMakeWriteable
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	callq	_sqlite3ValueFree
LBB0_5:
	xorl	%ebx, %ebx
LBB0_6:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEMCELLSIZE,4,2                ## @MEMCELLSIZE
	.comm	_MEM_Dyn,4,2                    ## @MEM_Dyn
	.comm	_MEM_Str,4,2                    ## @MEM_Str
	.comm	_MEM_Blob,4,2                   ## @MEM_Blob
	.comm	_MEM_Static,4,2                 ## @MEM_Static
	.comm	_MEM_Ephem,4,2                  ## @MEM_Ephem
	.comm	_SQLITE_OK,8,3                  ## @SQLITE_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sqlite3_value_dup              ; -- Begin function sqlite3_value_dup
	.p2align	2
_sqlite3_value_dup:                     ; @sqlite3_value_dup
	.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
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	mov	w0, #16
	bl	_sqlite3_malloc
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.2:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh0:
	adrp	x8, _MEMCELLSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MEMCELLSIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_memcpy
Lloh3:
	adrp	x8, _MEM_Dyn@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MEM_Dyn@GOTPAGEOFF]
	ldr	w9, [x8]
	ldr	w10, [x19]
	bic	w9, w10, w9
	str	w9, [x19]
	str	xzr, [x19, #8]
Lloh5:
	adrp	x10, _MEM_Str@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MEM_Str@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
Lloh8:
	adrp	x11, _MEM_Blob@GOTPAGE
Lloh9:
	ldr	x11, [x11, _MEM_Blob@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	orr	w10, w11, w10
	tst	w10, w9
	b.eq	LBB0_6
; %bb.3:
Lloh11:
	adrp	x10, _MEM_Static@GOTPAGE
Lloh12:
	ldr	x10, [x10, _MEM_Static@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	ldr	w8, [x8]
	orr	w8, w8, w10
	bic	w8, w9, w8
	str	w8, [x19]
Lloh14:
	adrp	x9, _MEM_Ephem@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MEM_Ephem@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19]
	mov	x0, x19
	bl	_sqlite3VdbeMemMakeWriteable
Lloh17:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_sqlite3ValueFree
LBB0_5:
	mov	x19, #0
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MEMCELLSIZE,4,2                ; @MEMCELLSIZE
	.comm	_MEM_Dyn,4,2                    ; @MEM_Dyn
	.comm	_MEM_Str,4,2                    ; @MEM_Str
	.comm	_MEM_Blob,4,2                   ; @MEM_Blob
	.comm	_MEM_Static,4,2                 ; @MEM_Static
	.comm	_MEM_Ephem,4,2                  ; @MEM_Ephem
	.comm	_SQLITE_OK,8,3                  ; @SQLITE_OK
.subsections_via_symbols
