	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function OpenTemporaryFileInTablespace
_OpenTemporaryFileInTablespace:         ## @OpenTemporaryFileInTablespace
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movl	%edi, %r13d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPGPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_TempTablespacePath
	movq	_PG_TEMP_FILE_PREFIX@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	_MyProcPid@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_tempFileCounter@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	leal	1(%rax), %edx
	movl	%edx, (%rcx)
	subq	$8, %rsp
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r12, %rcx
	pushq	%rax
	callq	_snprintf
	addq	$16, %rsp
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_TRUNC@GOTPCREL(%rip), %r13
	orl	(%r13), %esi
	movq	_PG_BINARY@GOTPCREL(%rip), %r14
	orl	(%r14), %esi
	movq	%r15, %rdi
	callq	_PathNameOpenFile
	movq	%rax, %rbx
	testq	%rax, %rax
	jg	LBB0_4
## %bb.1:
	movq	%r12, %rdi
	callq	_MakePGDirectory
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	orl	(%r13), %esi
	orl	(%r14), %esi
	movq	%r15, %rdi
	callq	_PathNameOpenFile
	movq	%rax, %rbx
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_4
## %bb.2:
	testq	%rbx, %rbx
	jg	LBB0_4
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdx
	callq	_elog
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movq	%rbx, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/%s%d.%ld"

	.comm	_PG_TEMP_FILE_PREFIX,8,3        ## @PG_TEMP_FILE_PREFIX
	.comm	_MyProcPid,4,2                  ## @MyProcPid
	.comm	_tempFileCounter,4,2            ## @tempFileCounter
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_PG_BINARY,4,2                  ## @PG_BINARY
	.comm	_ERROR,4,2                      ## @ERROR
L_.str.1:                               ## @.str.1
	.asciz	"could not create temporary file \"%s\": %m"

	.no_dead_strip	_OpenTemporaryFileInTablespace
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function OpenTemporaryFileInTablespace
_OpenTemporaryFileInTablespace:         ; @OpenTemporaryFileInTablespace
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x19, x1
	mov	x1, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _MAXPGPATH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPGPATH@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	mov	x9, x22
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x22, #15
	and	x12, x9, #0x1fffffff0
	sub	x21, x8, x12
	mov	sp, x21
	mov	x9, x22
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x20, x8, x12
	mov	sp, x20
	mov	x0, x21
	bl	_TempTablespacePath
Lloh10:
	adrp	x8, _PG_TEMP_FILE_PREFIX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PG_TEMP_FILE_PREFIX@GOTPAGEOFF]
Lloh12:
	ldr	x4, [x8]
Lloh13:
	adrp	x8, _MyProcPid@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MyProcPid@GOTPAGEOFF]
Lloh15:
	ldr	w5, [x8]
Lloh16:
	adrp	x8, _tempFileCounter@GOTPAGE
Lloh17:
	ldr	x8, [x8, _tempFileCounter@GOTPAGEOFF]
	ldr	w6, [x8]
	add	w9, w6, #1
	str	w9, [x8]
Lloh18:
	adrp	x2, l_.str@PAGE
Lloh19:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x22
	mov	x3, x21
	bl	_snprintf
Lloh20:
	adrp	x23, _O_RDWR@GOTPAGE
Lloh21:
	ldr	x23, [x23, _O_RDWR@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh22:
	adrp	x24, _O_CREAT@GOTPAGE
Lloh23:
	ldr	x24, [x24, _O_CREAT@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w8, w9, w8
Lloh24:
	adrp	x25, _O_TRUNC@GOTPAGE
Lloh25:
	ldr	x25, [x25, _O_TRUNC@GOTPAGEOFF]
	ldr	w9, [x25]
	orr	w8, w8, w9
Lloh26:
	adrp	x26, _PG_BINARY@GOTPAGE
Lloh27:
	ldr	x26, [x26, _PG_BINARY@GOTPAGEOFF]
	ldr	w9, [x26]
	orr	w1, w8, w9
	mov	x0, x20
	bl	_PathNameOpenFile
	mov	x22, x0
	cmp	x0, #0
	b.gt	LBB0_4
; %bb.1:
	mov	x0, x21
	bl	_MakePGDirectory
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w9, w8
	ldr	w9, [x25]
	orr	w8, w8, w9
	ldr	w9, [x26]
	orr	w1, w8, w9
	mov	x0, x20
	bl	_PathNameOpenFile
	mov	x22, x0
	cbz	w19, LBB0_4
; %bb.2:
	cmp	x22, #0
	b.gt	LBB0_4
; %bb.3:
Lloh28:
	adrp	x8, _ERROR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_elog
LBB0_4:
	ldur	x8, [x29, #-72]
Lloh33:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh34:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x22
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/%s%d.%ld"

	.comm	_PG_TEMP_FILE_PREFIX,8,3        ; @PG_TEMP_FILE_PREFIX
	.comm	_MyProcPid,4,2                  ; @MyProcPid
	.comm	_tempFileCounter,4,2            ; @tempFileCounter
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_PG_BINARY,4,2                  ; @PG_BINARY
	.comm	_ERROR,4,2                      ; @ERROR
l_.str.1:                               ; @.str.1
	.asciz	"could not create temporary file \"%s\": %m"

	.no_dead_strip	_OpenTemporaryFileInTablespace
.subsections_via_symbols
