	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OpenTemporaryFile              ## -- Begin function OpenTemporaryFile
	.p2align	4, 0x90
_OpenTemporaryFile:                     ## @OpenTemporaryFile
	.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
	movl	%edi, %r14d
	testl	%edi, %edi
	je	LBB0_1
LBB0_4:
	movq	_MyDatabaseTableSpace@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	jne	LBB0_6
## %bb.5:
	movq	_DEFAULTTABLESPACE_OID@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
LBB0_6:
	movl	$1, %esi
	callq	_OpenTemporaryFileInTablespace
	movq	%rax, %rbx
LBB0_7:
	movq	_FD_DELETE_AT_CLOSE@GOTPCREL(%rip), %rax
	movq	_FD_TEMP_FILE_LIMIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_VfdCache@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	orl	%ecx, (%rax,%rbx,4)
	testl	%r14d, %r14d
	jne	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_RegisterTemporaryFile
LBB0_9:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	_CurrentResourceOwner@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ResourceOwnerEnlargeFiles
	movq	_numTempTableSpaces@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_4
## %bb.2:
	xorl	%eax, %eax
	callq	_GetNextTempTableSpace
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_OidIsValid
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_OpenTemporaryFileInTablespace
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_7
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_CurrentResourceOwner,4,2       ## @CurrentResourceOwner
	.comm	_numTempTableSpaces,8,3         ## @numTempTableSpaces
	.comm	_MyDatabaseTableSpace,8,3       ## @MyDatabaseTableSpace
	.comm	_DEFAULTTABLESPACE_OID,8,3      ## @DEFAULTTABLESPACE_OID
	.comm	_FD_DELETE_AT_CLOSE,4,2         ## @FD_DELETE_AT_CLOSE
	.comm	_FD_TEMP_FILE_LIMIT,4,2         ## @FD_TEMP_FILE_LIMIT
	.comm	_VfdCache,8,3                   ## @VfdCache
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OpenTemporaryFile              ; -- Begin function OpenTemporaryFile
	.p2align	2
_OpenTemporaryFile:                     ; @OpenTemporaryFile
	.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
	mov	x19, x0
	cbz	w0, LBB0_5
LBB0_1:
Lloh0:
	adrp	x8, _MyDatabaseTableSpace@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MyDatabaseTableSpace@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _DEFAULTTABLESPACE_OID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DEFAULTTABLESPACE_OID@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, #0
	csel	x0, x9, x8, eq
	mov	w1, #1
	bl	_OpenTemporaryFileInTablespace
	mov	x20, x0
LBB0_2:
Lloh6:
	adrp	x8, _FD_DELETE_AT_CLOSE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FD_DELETE_AT_CLOSE@GOTPAGEOFF]
Lloh8:
	adrp	x9, _FD_TEMP_FILE_LIMIT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FD_TEMP_FILE_LIMIT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _VfdCache@GOTPAGE
Lloh13:
	ldr	x9, [x9, _VfdCache@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	lsl	x10, x20, #2
	ldr	w11, [x9, x10]
	orr	w8, w8, w11
	str	w8, [x9, x10]
	cbnz	w19, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_RegisterTemporaryFile
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh15:
	adrp	x8, _CurrentResourceOwner@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CurrentResourceOwner@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_ResourceOwnerEnlargeFiles
Lloh18:
	adrp	x8, _numTempTableSpaces@GOTPAGE
Lloh19:
	ldr	x8, [x8, _numTempTableSpaces@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_1
; %bb.6:
	bl	_GetNextTempTableSpace
	mov	x20, x0
	bl	_OidIsValid
	cbz	x0, LBB0_1
; %bb.7:
	mov	x0, x20
	mov	w1, #0
	bl	_OpenTemporaryFileInTablespace
	mov	x20, x0
	cbnz	x0, LBB0_2
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CurrentResourceOwner,4,2       ; @CurrentResourceOwner
	.comm	_numTempTableSpaces,8,3         ; @numTempTableSpaces
	.comm	_MyDatabaseTableSpace,8,3       ; @MyDatabaseTableSpace
	.comm	_DEFAULTTABLESPACE_OID,8,3      ; @DEFAULTTABLESPACE_OID
	.comm	_FD_DELETE_AT_CLOSE,4,2         ; @FD_DELETE_AT_CLOSE
	.comm	_FD_TEMP_FILE_LIMIT,4,2         ; @FD_TEMP_FILE_LIMIT
	.comm	_VfdCache,8,3                   ; @VfdCache
.subsections_via_symbols
