	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calculate_tablespace_size
_calculate_tablespace_size:             ## @calculate_tablespace_size
	.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, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPGPATH@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	leal	(%rbx,%rbx), %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_MyDatabaseTableSpace@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	je	LBB0_4
## %bb.1:
	xorl	%eax, %eax
	callq	_GetUserId
	movq	_DEFAULT_ROLE_READ_ALL_STATS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_is_member_of_role
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	xorl	%eax, %eax
	callq	_GetUserId
	movq	_ACL_CREATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_pg_tablespace_aclcheck
	movq	%rax, %rbx
	movq	_ACLCHECK_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_4
## %bb.3:
	movq	_OBJECT_TABLESPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_get_tablespace_name
	movq	%rbx, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_aclcheck_error
LBB0_4:
	movq	_DEFAULTTABLESPACE_OID@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jne	LBB0_6
## %bb.5:
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_8
LBB0_6:
	movq	_GLOBALTABLESPACE_OID@GOTPCREL(%rip), %rax
	movl	(%r14), %esi
	cmpq	%r13, (%rax)
	jne	LBB0_9
## %bb.7:
	leaq	L_.str.1(%rip), %rdx
LBB0_8:
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_snprintf
	jmp	LBB0_10
LBB0_9:
	movq	_TABLESPACE_VERSION_DIRECTORY@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	movq	%r13, %rcx
	xorl	%eax, %eax
	callq	_snprintf
LBB0_10:
	movq	%r12, %rdi
	callq	_AllocateDir
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%rax, %r13
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_ReadDir
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movq	%rax, %r14
	xorl	%ebx, %ebx
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_15 Depth=1
	addl	-80(%rbp), %ebx
LBB0_23:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_ReadDir
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_24
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movq	(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_23
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	(%r14), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_23
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	(%r14), %r8
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	leaq	L_.str.5(%rip), %rdx
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_snprintf
	movq	%r15, %rdi
	leaq	-80(%rbp), %rsi
	callq	_stat
	testq	%rax, %rax
	jns	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.6(%rip), %rdi
	movq	%r15, %rsi
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_20:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	-72(%rbp), %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	%r15, %rdi
	callq	_db_dir_size
	addl	%eax, %ebx
	jmp	LBB0_22
LBB0_11:
	movl	$-1, %ebx
	jmp	LBB0_25
LBB0_13:
	xorl	%ebx, %ebx
LBB0_24:
	movq	%r13, %rdi
	callq	_FreeDir
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.26:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.comm	_MyDatabaseTableSpace,8,3       ## @MyDatabaseTableSpace
	.comm	_DEFAULT_ROLE_READ_ALL_STATS,4,2 ## @DEFAULT_ROLE_READ_ALL_STATS
	.comm	_ACL_CREATE,4,2                 ## @ACL_CREATE
	.comm	_ACLCHECK_OK,8,3                ## @ACLCHECK_OK
	.comm	_OBJECT_TABLESPACE,4,2          ## @OBJECT_TABLESPACE
	.comm	_DEFAULTTABLESPACE_OID,8,3      ## @DEFAULTTABLESPACE_OID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"base"

	.comm	_GLOBALTABLESPACE_OID,8,3       ## @GLOBALTABLESPACE_OID
L_.str.1:                               ## @.str.1
	.asciz	"global"

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

	.comm	_TABLESPACE_VERSION_DIRECTORY,8,3 ## @TABLESPACE_VERSION_DIRECTORY
L_.str.3:                               ## @.str.3
	.asciz	"."

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

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

	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_ERROR,4,2                      ## @ERROR
L_.str.6:                               ## @.str.6
	.asciz	"could not stat file \"%s\": %m"

	.no_dead_strip	_calculate_tablespace_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calculate_tablespace_size
_calculate_tablespace_size:             ; @calculate_tablespace_size
	.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, #32
	mov	x22, 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	x25, _MAXPGPATH@GOTPAGE
Lloh4:
	ldr	x25, [x25, _MAXPGPATH@GOTPAGEOFF]
	ldr	w8, [x25]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x10, x10, #0x1fffffff0
	sub	x19, x9, x10
	mov	sp, x19
	lsl	w20, w8, #1
	mov	x9, x20
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x20, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
Lloh9:
	adrp	x8, _MyDatabaseTableSpace@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MyDatabaseTableSpace@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_4
; %bb.1:
	bl	_GetUserId
Lloh12:
	adrp	x8, _DEFAULT_ROLE_READ_ALL_STATS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DEFAULT_ROLE_READ_ALL_STATS@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_is_member_of_role
	cbnz	w0, LBB0_4
; %bb.2:
	bl	_GetUserId
	mov	x1, x0
Lloh15:
	adrp	x8, _ACL_CREATE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ACL_CREATE@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_pg_tablespace_aclcheck
Lloh18:
	adrp	x8, _ACLCHECK_OK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ACLCHECK_OK@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.3:
	mov	x23, x0
Lloh21:
	adrp	x8, _OBJECT_TABLESPACE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _OBJECT_TABLESPACE@GOTPAGEOFF]
Lloh23:
	ldr	w24, [x8]
	mov	x0, x22
	bl	_get_tablespace_name
	mov	x2, x0
	mov	x0, x23
	mov	x1, x24
	bl	_aclcheck_error
LBB0_4:
Lloh24:
	adrp	x8, _DEFAULTTABLESPACE_OID@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DEFAULTTABLESPACE_OID@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cmp	x8, x22
	b.ne	LBB0_6
; %bb.5:
	ldr	w1, [x25]
Lloh27:
	adrp	x2, l_.str@PAGE
Lloh28:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_8
LBB0_6:
Lloh29:
	adrp	x8, _GLOBALTABLESPACE_OID@GOTPAGE
Lloh30:
	ldr	x8, [x8, _GLOBALTABLESPACE_OID@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	ldr	w1, [x25]
	cmp	x8, x22
	b.ne	LBB0_9
; %bb.7:
Lloh32:
	adrp	x2, l_.str.1@PAGE
Lloh33:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_8:
	mov	x0, x19
	bl	_snprintf
	b	LBB0_10
LBB0_9:
Lloh34:
	adrp	x8, _TABLESPACE_VERSION_DIRECTORY@GOTPAGE
Lloh35:
	ldr	x8, [x8, _TABLESPACE_VERSION_DIRECTORY@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	stp	x22, x8, [sp, #-16]!
Lloh37:
	adrp	x2, l_.str.2@PAGE
Lloh38:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_snprintf
	add	sp, sp, #16
LBB0_10:
	mov	x0, x19
	bl	_AllocateDir
	cbz	x0, LBB0_22
; %bb.11:
	mov	x23, x0
	mov	x1, x19
	bl	_ReadDir
	cbz	x0, LBB0_23
; %bb.12:
	mov	x28, x0
	mov	w22, #0
Lloh39:
	adrp	x24, l_.str.3@PAGE
Lloh40:
	add	x24, x24, l_.str.3@PAGEOFF
Lloh41:
	adrp	x25, l_.str.4@PAGE
Lloh42:
	add	x25, x25, l_.str.4@PAGEOFF
Lloh43:
	adrp	x26, l_.str.5@PAGE
Lloh44:
	add	x26, x26, l_.str.5@PAGEOFF
Lloh45:
	adrp	x27, _ENOENT@GOTPAGE
Lloh46:
	ldr	x27, [x27, _ENOENT@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	ldur	w8, [x29, #-104]
	add	w22, w22, w8
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x23
	mov	x1, x19
	bl	_ReadDir
	mov	x28, x0
	cbz	x0, LBB0_24
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	bl	_CHECK_FOR_INTERRUPTS
	ldr	x0, [x28]
	mov	x1, x24
	bl	_strcmp
	cbz	x0, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x0, [x28]
	mov	x1, x25
	bl	_strcmp
	cbz	x0, LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x28]
	stp	x19, x8, [sp, #-16]!
	mov	x0, x21
	mov	x1, x20
	mov	x2, x26
	bl	_snprintf
	add	sp, sp, #16
	sub	x1, x29, #104
	mov	x0, x21
	bl	_stat
	tbz	x0, #63, LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
Lloh47:
	adrp	x8, _errno@GOTPAGE
Lloh48:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh49:
	ldr	x8, [x8]
	ldr	x9, [x27]
	cmp	x8, x9
	b.eq	LBB0_14
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
Lloh50:
	adrp	x8, _ERROR@GOTPAGE
Lloh51:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh52:
	ldr	w28, [x8]
	bl	_errcode_for_file_access
Lloh53:
	adrp	x0, l_.str.6@PAGE
Lloh54:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x1, x21
	bl	_errmsg
	mov	x1, x0
	mov	x0, x28
	bl	_ereport
LBB0_20:                                ;   in Loop: Header=BB0_15 Depth=1
	ldur	w0, [x29, #-96]
	bl	_S_ISDIR
	cbz	x0, LBB0_13
; %bb.21:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x21
	bl	_db_dir_size
	add	w22, w22, w0
	b	LBB0_13
LBB0_22:
	mov	w22, #-1
	b	LBB0_25
LBB0_23:
	mov	w22, #0
LBB0_24:
	mov	x0, x23
	bl	_FreeDir
LBB0_25:
	ldur	x8, [x29, #-88]
Lloh55:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh56:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh57:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.26:
	mov	x0, x22
	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_27:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.comm	_MyDatabaseTableSpace,8,3       ; @MyDatabaseTableSpace
	.comm	_DEFAULT_ROLE_READ_ALL_STATS,4,2 ; @DEFAULT_ROLE_READ_ALL_STATS
	.comm	_ACL_CREATE,4,2                 ; @ACL_CREATE
	.comm	_ACLCHECK_OK,8,3                ; @ACLCHECK_OK
	.comm	_OBJECT_TABLESPACE,4,2          ; @OBJECT_TABLESPACE
	.comm	_DEFAULTTABLESPACE_OID,8,3      ; @DEFAULTTABLESPACE_OID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"base"

	.comm	_GLOBALTABLESPACE_OID,8,3       ; @GLOBALTABLESPACE_OID
l_.str.1:                               ; @.str.1
	.asciz	"global"

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

	.comm	_TABLESPACE_VERSION_DIRECTORY,8,3 ; @TABLESPACE_VERSION_DIRECTORY
l_.str.3:                               ; @.str.3
	.asciz	"."

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

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

	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_ERROR,4,2                      ; @ERROR
l_.str.6:                               ; @.str.6
	.asciz	"could not stat file \"%s\": %m"

	.no_dead_strip	_calculate_tablespace_size
.subsections_via_symbols
