	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RemovePgTempFilesInDir         ## -- Begin function RemovePgTempFilesInDir
	.p2align	4, 0x90
_RemovePgTempFilesInDir:                ## @RemovePgTempFilesInDir
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPGPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%r15, %rdi
	callq	_AllocateDir
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_1
LBB0_3:
	movq	_LOG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_ReadDirExtended
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	%rax, %r14
	jmp	LBB0_5
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_LOG@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rbx), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_ReadDirExtended
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r14), %r8
	movq	%r12, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rcx
	callq	_snprintf
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_12
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	leaq	-56(%rbp), %rsi
	callq	_lstat
	testq	%rax, %rax
	js	LBB0_20
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	-56(%rbp), %edi
	callq	_S_ISDIR
	movq	%r12, %rdi
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_RemovePgTempFilesInDir
	movq	%r12, %rdi
	callq	_rmdir
	leaq	L_.str.4(%rip), %rbx
	testq	%rax, %rax
	jns	LBB0_19
	jmp	LBB0_18
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r14), %r14
	movq	_PG_TEMP_FILE_PREFIX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_strlen
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_13
## %bb.21:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_22
LBB0_20:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.3(%rip), %rdi
LBB0_22:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rsi
	callq	_errmsg
	movl	%ebx, %edi
	movq	_LOG@GOTPCREL(%rip), %rbx
	movl	%eax, %esi
	callq	_ereport
	jmp	LBB0_7
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	callq	_unlink
	leaq	L_.str.5(%rip), %rbx
	testq	%rax, %rax
	jns	LBB0_19
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
	jmp	LBB0_19
LBB0_8:
	movq	%r13, %rdi
	callq	_FreeDir
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.23:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, (%rax)
	je	LBB0_9
	jmp	LBB0_3
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_LOG,4,2                        ## @LOG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"."

L_.str.1:                               ## @.str.1
	.asciz	".."

L_.str.2:                               ## @.str.2
	.asciz	"%s/%s"

	.comm	_PG_TEMP_FILE_PREFIX,4,2        ## @PG_TEMP_FILE_PREFIX
L_.str.3:                               ## @.str.3
	.asciz	"could not stat file \"%s\": %m"

L_.str.4:                               ## @.str.4
	.asciz	"could not remove directory \"%s\": %m"

L_.str.5:                               ## @.str.5
	.asciz	"could not remove file \"%s\": %m"

L_.str.6:                               ## @.str.6
	.asciz	"unexpected file found in temporary-files directory: \"%s\""

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RemovePgTempFilesInDir         ; -- Begin function RemovePgTempFilesInDir
	.p2align	2
_RemovePgTempFilesInDir:                ; @RemovePgTempFilesInDir
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x19, x2
	mov	x24, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAXPGPATH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPGPATH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w21, w8, #1
	mov	x9, x21
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x9, x9, #0x1fffffff0
	sub	x22, x8, x9
	mov	sp, x22
	bl	_AllocateDir
	mov	x23, x0
	cbz	x0, LBB0_22
LBB0_1:
Lloh8:
	adrp	x26, _LOG@GOTPAGE
Lloh9:
	ldr	x26, [x26, _LOG@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x23
	mov	x1, x20
	bl	_ReadDirExtended
	cbz	x0, LBB0_19
; %bb.2:
	mov	x27, x0
Lloh10:
	adrp	x24, l_.str@PAGE
Lloh11:
	add	x24, x24, l_.str@PAGEOFF
Lloh12:
	adrp	x25, l_.str.1@PAGE
Lloh13:
	add	x25, x25, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_3:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w27, [x26]
	bl	_errcode_for_file_access
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_4:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x1, x22
	bl	_errmsg
	mov	x1, x0
	mov	x0, x27
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	bl	_ereport
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w2, [x26]
	mov	x0, x23
	mov	x1, x20
	bl	_ReadDirExtended
	mov	x27, x0
	cbz	x0, LBB0_19
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x27]
	mov	x1, x24
	bl	_strcmp
	cbz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x27]
	mov	x1, x25
	bl	_strcmp
	cbz	x0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x4, [x27]
	mov	x0, x22
	mov	x1, x21
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x3, x20
	bl	_snprintf
	cbz	w19, LBB0_14
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	sub	x1, x29, #96
	mov	x0, x22
	bl	_lstat
	tbnz	x0, #63, LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldur	w0, [x29, #-96]
	bl	_S_ISDIR
	cbz	x0, LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x22
	mov	w1, #0
	mov	w2, #1
	bl	_RemovePgTempFilesInDir
	mov	x0, x22
	bl	_rmdir
	tbz	x0, #63, LBB0_6
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh18:
	adrp	x27, l_.str.4@PAGE
Lloh19:
	add	x27, x27, l_.str.4@PAGEOFF
	b	LBB0_18
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x27, [x27]
Lloh20:
	adrp	x8, _PG_TEMP_FILE_PREFIX@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PG_TEMP_FILE_PREFIX@GOTPAGEOFF]
Lloh22:
	ldr	w28, [x8]
	mov	x0, x28
	bl	_strlen
	mov	x2, x0
	mov	x0, x27
	mov	x1, x28
	bl	_strncmp
	cbz	x0, LBB0_10
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w27, [x26]
Lloh23:
	adrp	x0, l_.str.6@PAGE
Lloh24:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_4
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x22
	bl	_unlink
	tbz	x0, #63, LBB0_6
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh25:
	adrp	x27, l_.str.5@PAGE
Lloh26:
	add	x27, x27, l_.str.5@PAGEOFF
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w28, [x26]
	bl	_errcode_for_file_access
	mov	x0, x27
	mov	x1, x22
	bl	_errmsg
	mov	x1, x0
	mov	x0, x28
	b	LBB0_5
LBB0_19:
	mov	x0, x23
	bl	_FreeDir
LBB0_20:
	ldur	x8, [x29, #-88]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.21:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_22:
	cbz	w24, LBB0_1
; %bb.23:
Lloh30:
	adrp	x8, _errno@GOTPAGE
Lloh31:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
Lloh33:
	adrp	x9, _ENOENT@GOTPAGE
Lloh34:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_20
	b	LBB0_1
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_LOG,4,2                        ; @LOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"."

l_.str.1:                               ; @.str.1
	.asciz	".."

l_.str.2:                               ; @.str.2
	.asciz	"%s/%s"

	.comm	_PG_TEMP_FILE_PREFIX,4,2        ; @PG_TEMP_FILE_PREFIX
l_.str.3:                               ; @.str.3
	.asciz	"could not stat file \"%s\": %m"

l_.str.4:                               ; @.str.4
	.asciz	"could not remove directory \"%s\": %m"

l_.str.5:                               ; @.str.5
	.asciz	"could not remove file \"%s\": %m"

l_.str.6:                               ; @.str.6
	.asciz	"unexpected file found in temporary-files directory: \"%s\""

.subsections_via_symbols
