	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function remove_dbtablespaces
_remove_dbtablespaces:                  ## @remove_dbtablespaces
	.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
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_TableSpaceRelationId@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_AccessShareLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_table_open
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_table_beginscan_catalog
	movl	%eax, %r15d
	movq	_ForwardScanDirection@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%eax, %edi
	callq	_heap_getnext
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	_GLOBALTABLESPACE_OID@GOTPCREL(%rip), %r12
	jmp	LBB0_2
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -72(%rbp)
	movq	%r13, -80(%rbp)
	xorl	%eax, %eax
	callq	_XLogBeginInsert
	leaq	-80(%rbp), %rdi
	movl	$16, %esi
	callq	_XLogRegisterData
	movq	_RM_DBASE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XLR_SPECIAL_REL_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_XLOG_DBASE_DROP@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	callq	_XLogInsert
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_pfree
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %esi
	movl	%r15d, %edi
	callq	_heap_getnext
	testq	%rax, %rax
	je	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rdi
	callq	_GETSTRUCT
	cltq
	movq	(%rax), %r13
	cmpq	(%r12), %r13
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_GetDatabasePath
	movq	%rax, %r14
	movq	%rax, %rdi
	leaq	-48(%rbp), %rsi
	callq	_lstat
	testq	%rax, %rax
	js	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-48(%rbp), %edi
	callq	_S_ISDIR
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_rmtree
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_errmsg
	movl	%ebx, %edi
	movq	_ForwardScanDirection@GOTPCREL(%rip), %rbx
	movl	%eax, %esi
	callq	_ereport
	jmp	LBB0_7
LBB0_10:
	movl	%r15d, %edi
	callq	_table_endscan
	movq	_AccessShareLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_table_close
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TableSpaceRelationId,4,2       ## @TableSpaceRelationId
	.comm	_AccessShareLock,4,2            ## @AccessShareLock
	.comm	_ForwardScanDirection,4,2       ## @ForwardScanDirection
	.comm	_GLOBALTABLESPACE_OID,8,3       ## @GLOBALTABLESPACE_OID
	.comm	_WARNING,4,2                    ## @WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"some useless files may be left behind in old database directory \"%s\""

	.comm	_RM_DBASE_ID,4,2                ## @RM_DBASE_ID
	.comm	_XLOG_DBASE_DROP,4,2            ## @XLOG_DBASE_DROP
	.comm	_XLR_SPECIAL_REL_UPDATE,4,2     ## @XLR_SPECIAL_REL_UPDATE
	.no_dead_strip	_remove_dbtablespaces
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function remove_dbtablespaces
_remove_dbtablespaces:                  ; @remove_dbtablespaces
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _TableSpaceRelationId@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TableSpaceRelationId@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _AccessShareLock@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AccessShareLock@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_table_open
	str	w0, [sp, #4]                    ; 4-byte Folded Spill
	mov	w1, #0
	mov	x2, #0
	bl	_table_beginscan_catalog
	mov	x21, x0
Lloh6:
	adrp	x27, _ForwardScanDirection@GOTPAGE
Lloh7:
	ldr	x27, [x27, _ForwardScanDirection@GOTPAGEOFF]
	ldr	w1, [x27]
	bl	_heap_getnext
	cbz	x0, LBB0_10
; %bb.1:
Lloh8:
	adrp	x28, _GLOBALTABLESPACE_OID@GOTPAGE
Lloh9:
	ldr	x28, [x28, _GLOBALTABLESPACE_OID@GOTPAGEOFF]
Lloh10:
	adrp	x22, _RM_DBASE_ID@GOTPAGE
Lloh11:
	ldr	x22, [x22, _RM_DBASE_ID@GOTPAGEOFF]
Lloh12:
	adrp	x26, _XLOG_DBASE_DROP@GOTPAGE
Lloh13:
	ldr	x26, [x26, _XLOG_DBASE_DROP@GOTPAGEOFF]
Lloh14:
	adrp	x20, _XLR_SPECIAL_REL_UPDATE@GOTPAGE
Lloh15:
	ldr	x20, [x20, _XLR_SPECIAL_REL_UPDATE@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	stp	x24, x19, [sp, #8]
	bl	_XLogBeginInsert
	add	x0, sp, #8
	mov	w1, #16
	bl	_XLogRegisterData
	ldr	w0, [x22]
	ldr	w8, [x26]
	ldr	w9, [x20]
	orr	w1, w9, w8
	bl	_XLogInsert
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	bl	_pfree
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x27]
	mov	x0, x21
	bl	_heap_getnext
	cbz	x0, LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	bl	_GETSTRUCT
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	ldr	x24, [x8]
	ldr	x8, [x28]
	cmp	x24, x8
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x24
	bl	_GetDatabasePath
	mov	x23, x0
	add	x1, sp, #24
	bl	_lstat
	tbnz	x0, #63, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [sp, #24]
	bl	_S_ISDIR
	cbz	w0, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	mov	w1, #1
	bl	_rmtree
	cbnz	w0, LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh16:
	adrp	x8, _WARNING@GOTPAGE
Lloh17:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh18:
	ldr	w25, [x8]
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_errmsg
	mov	x1, x0
	mov	x0, x25
	bl	_ereport
	b	LBB0_2
LBB0_10:
	mov	x0, x21
	bl	_table_endscan
Lloh21:
	adrp	x8, _AccessShareLock@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AccessShareLock@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	ldr	w0, [sp, #4]                    ; 4-byte Folded Reload
	bl	_table_close
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_TableSpaceRelationId,4,2       ; @TableSpaceRelationId
	.comm	_AccessShareLock,4,2            ; @AccessShareLock
	.comm	_ForwardScanDirection,4,2       ; @ForwardScanDirection
	.comm	_GLOBALTABLESPACE_OID,8,3       ; @GLOBALTABLESPACE_OID
	.comm	_WARNING,4,2                    ; @WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"some useless files may be left behind in old database directory \"%s\""

	.comm	_RM_DBASE_ID,4,2                ; @RM_DBASE_ID
	.comm	_XLOG_DBASE_DROP,4,2            ; @XLOG_DBASE_DROP
	.comm	_XLR_SPECIAL_REL_UPDATE,4,2     ; @XLR_SPECIAL_REL_UPDATE
	.no_dead_strip	_remove_dbtablespaces
.subsections_via_symbols
