	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function newTempFile
_newTempFile:                           ## @newTempFile
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_clearTempFile
	movq	(%rbx), %rdi
	callq	_sqlite3_free
	movq	$0, (%rbx)
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	_SQLITE_FCNTL_TEMPFILENAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movq	%rbx, %rcx
	callq	_sqlite3_file_control
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_2:
	leaq	-24(%rbp), %rsi
	movl	$8, %edi
	callq	_sqlite3_randomness
	movq	-24(%rbp), %rsi
	leaq	L_.str(%rip), %rdi
LBB0_4:
	movq	%r14, %rdx
	callq	_sqlite3_mprintf
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_raw_printf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_FCNTL_TEMPFILENAME,4,2  ## @SQLITE_FCNTL_TEMPFILENAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"temp%llx.%s"

L_.str.1:                               ## @.str.1
	.asciz	"%z.%s"

	.comm	_stderr,4,2                     ## @stderr
L_.str.2:                               ## @.str.2
	.asciz	"out of memory\n"

	.no_dead_strip	_newTempFile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function newTempFile
_newTempFile:                           ; @newTempFile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_clearTempFile
	ldr	x0, [x19]
	bl	_sqlite3_free
	str	xzr, [x19]
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _SQLITE_FCNTL_TEMPFILENAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_FCNTL_TEMPFILENAME@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #0
	mov	x3, x19
	bl	_sqlite3_file_control
	ldr	x1, [x19]
	cbz	x1, LBB0_3
; %bb.2:
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
	add	x1, sp, #8
	mov	w0, #8
	bl	_sqlite3_randomness
	ldr	x1, [sp, #8]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
LBB0_4:
	mov	x2, x20
	bl	_sqlite3_mprintf
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_6:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_raw_printf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_FCNTL_TEMPFILENAME,4,2  ; @SQLITE_FCNTL_TEMPFILENAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"temp%llx.%s"

l_.str.1:                               ; @.str.1
	.asciz	"%z.%s"

	.comm	_stderr,4,2                     ; @stderr
l_.str.2:                               ; @.str.2
	.asciz	"out of memory\n"

	.no_dead_strip	_newTempFile
.subsections_via_symbols
