	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movl	$0, -44(%rbp)
	movq	(%rsi), %rdi
	callq	_pg_logging_init
	movq	(%rbx), %r15
	leaq	L_.str(%rip), %rdi
	callq	_PG_TEXTDOMAIN
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_set_pglocale_pgservice
	movq	_PG_MODE_MASK_OWNER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_umask
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_parseCommandLine
	xorl	%eax, %eax
	callq	_get_restricted_token
	movq	_old_cluster@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_adjust_data_dir
	movq	_new_cluster@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_adjust_data_dir
	movq	(%rbx), %rdi
	leaq	-44(%rbp), %rsi
	callq	_setup
	movl	-44(%rbp), %edi
	callq	_output_check_banner
	xorl	%eax, %eax
	callq	_check_cluster_versions
	movl	-44(%rbp), %esi
	movq	%r14, %rdi
	callq	_get_sock_dir
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_get_sock_dir
	movl	-44(%rbp), %edi
	callq	_check_cluster_compatibility
	movl	(%r15), %edi
	callq	_GetDataDirectoryCreatePerm
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	(%r15), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_pg_fatal
LBB0_2:
	movq	_pg_mode_mask@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_umask
	movl	-44(%rbp), %edi
	callq	_check_and_dump_old_cluster
	movq	_new_cluster@GOTPCREL(%rip), %r13
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_start_postmaster
	xorl	%eax, %eax
	callq	_check_new_cluster
	xorl	%eax, %eax
	callq	_report_clusters_compatible
	movq	_PG_REPORT@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_pg_log
	xorl	%eax, %eax
	callq	_prepare_new_cluster
	xorl	%edi, %edi
	callq	_stop_postmaster
	xorl	%eax, %eax
	callq	_copy_xact_xlog_xid
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_start_postmaster
	xorl	%eax, %eax
	callq	_prepare_new_globals
	xorl	%eax, %eax
	callq	_create_new_objects
	xorl	%edi, %edi
	callq	_stop_postmaster
	movq	_user_opts@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_TRANSFER_MODE_LINK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_disable_old_cluster
LBB0_4:
	movl	(%r14), %edx
	movl	(%r13), %ecx
	leaq	12(%r14), %rdi
	leaq	12(%r13), %rsi
	callq	_transfer_all_new_tablespaces
	leaq	L_.str.3(%rip), %rdi
	callq	_prep_status
	movq	_UTILITY_LOG_FILE@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movl	(%r13), %ebx
	movl	4(%r13), %r9d
	movl	8(%r14), %r10d
	leaq	L_.str.4(%rip), %r8
	xorl	%esi, %esi
	movl	$1, %edx
	movl	$1, %ecx
	xorl	%eax, %eax
	pushq	%rbx
	pushq	%r10
	callq	_exec_prog
	addq	$16, %rsp
	xorl	%eax, %eax
	callq	_check_ok
	leaq	L_.str.5(%rip), %rdi
	callq	_prep_status
	movl	(%r12), %edi
	movl	(%r13), %ebx
	movl	4(%r13), %r9d
	subq	$8, %rsp
	leaq	L_.str.6(%rip), %r8
	xorl	%esi, %esi
	movl	$1, %edx
	movl	$1, %ecx
	xorl	%eax, %eax
	pushq	%rbx
	callq	_exec_prog
	addq	$16, %rsp
	xorl	%eax, %eax
	callq	_check_ok
	leaq	-64(%rbp), %rdi
	callq	_create_script_for_cluster_analyze
	leaq	-56(%rbp), %rdi
	callq	_create_script_for_old_cluster_deletion
	xorl	%eax, %eax
	callq	_issue_warnings_and_set_wal_level
	movl	(%r15), %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_pg_log
	movq	-64(%rbp), %rdi
	movq	-56(%rbp), %rsi
	callq	_output_completion_banner
	movq	-64(%rbp), %rdi
	callq	_pg_free
	movq	-56(%rbp), %rdi
	callq	_pg_free
	xorl	%eax, %eax
	callq	_cleanup
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pg_upgrade"

	.comm	_PG_MODE_MASK_OWNER,4,2         ## @PG_MODE_MASK_OWNER
	.comm	_old_cluster,16,2               ## @old_cluster
	.comm	_new_cluster,16,2               ## @new_cluster
L_.str.1:                               ## @.str.1
	.asciz	"could not read permissions of directory \"%s\": %s\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_pg_mode_mask,4,2               ## @pg_mode_mask
	.comm	_PG_REPORT,4,2                  ## @PG_REPORT
L_.str.2:                               ## @.str.2
	.asciz	"\nPerforming Upgrade\n------------------\n"

	.comm	_user_opts,8,3                  ## @user_opts
	.comm	_TRANSFER_MODE_LINK,8,3         ## @TRANSFER_MODE_LINK
L_.str.3:                               ## @.str.3
	.asciz	"Setting next OID for new cluster"

	.comm	_UTILITY_LOG_FILE,4,2           ## @UTILITY_LOG_FILE
L_.str.4:                               ## @.str.4
	.asciz	"\"%s/pg_resetwal\" -o %u \"%s\""

L_.str.5:                               ## @.str.5
	.asciz	"Sync data directory to disk"

L_.str.6:                               ## @.str.6
	.asciz	"\"%s/initdb\" --sync-only \"%s\""

L_.str.7:                               ## @.str.7
	.asciz	"\nUpgrade Complete\n----------------\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x1
	mov	x19, x0
	stp	xzr, xzr, [sp, #16]
	str	wzr, [sp, #12]
	ldr	x0, [x1]
	bl	_pg_logging_init
	ldr	x20, [x21]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_PG_TEXTDOMAIN
	mov	x1, x0
	mov	x0, x20
	bl	_set_pglocale_pgservice
Lloh2:
	adrp	x8, _PG_MODE_MASK_OWNER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PG_MODE_MASK_OWNER@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_umask
	mov	x0, x19
	mov	x1, x21
	bl	_parseCommandLine
	bl	_get_restricted_token
Lloh5:
	adrp	x19, _old_cluster@GOTPAGE
Lloh6:
	ldr	x19, [x19, _old_cluster@GOTPAGEOFF]
	mov	x0, x19
	bl	_adjust_data_dir
Lloh7:
	adrp	x20, _new_cluster@GOTPAGE
Lloh8:
	ldr	x20, [x20, _new_cluster@GOTPAGEOFF]
	mov	x0, x20
	bl	_adjust_data_dir
	ldr	x0, [x21]
	add	x1, sp, #12
	bl	_setup
	ldr	w0, [sp, #12]
	bl	_output_check_banner
	bl	_check_cluster_versions
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_get_sock_dir
	mov	x0, x20
	mov	w1, #0
	bl	_get_sock_dir
	ldr	w0, [sp, #12]
	bl	_check_cluster_compatibility
	ldr	w0, [x20]
	bl	_GetDataDirectoryCreatePerm
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w20, [x20]
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_pg_fatal
LBB0_2:
Lloh14:
	adrp	x8, _pg_mode_mask@GOTPAGE
Lloh15:
	ldr	x8, [x8, _pg_mode_mask@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_umask
	ldr	w0, [sp, #12]
	bl	_check_and_dump_old_cluster
Lloh17:
	adrp	x20, _new_cluster@GOTPAGE
Lloh18:
	ldr	x20, [x20, _new_cluster@GOTPAGEOFF]
	mov	x0, x20
	mov	w1, #1
	bl	_start_postmaster
	bl	_check_new_cluster
	bl	_report_clusters_compatible
Lloh19:
	adrp	x21, _PG_REPORT@GOTPAGE
Lloh20:
	ldr	x21, [x21, _PG_REPORT@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_pg_log
	bl	_prepare_new_cluster
	mov	w0, #0
	bl	_stop_postmaster
	bl	_copy_xact_xlog_xid
	mov	x0, x20
	mov	w1, #1
	bl	_start_postmaster
	bl	_prepare_new_globals
	bl	_create_new_objects
	mov	w0, #0
	bl	_stop_postmaster
Lloh23:
	adrp	x8, _user_opts@GOTPAGE
Lloh24:
	ldr	x8, [x8, _user_opts@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
Lloh26:
	adrp	x9, _TRANSFER_MODE_LINK@GOTPAGE
Lloh27:
	ldr	x9, [x9, _TRANSFER_MODE_LINK@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	bl	_disable_old_cluster
LBB0_4:
	ldr	w2, [x19]
	ldr	w3, [x20]
	add	x0, x19, #12
	add	x1, x20, #12
	bl	_transfer_all_new_tablespaces
Lloh29:
	adrp	x0, l_.str.3@PAGE
Lloh30:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_prep_status
Lloh31:
	adrp	x22, _UTILITY_LOG_FILE@GOTPAGE
Lloh32:
	ldr	x22, [x22, _UTILITY_LOG_FILE@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w6, [x19, #8]
	ldp	w8, w5, [x20]
	str	x8, [sp]
Lloh33:
	adrp	x4, l_.str.4@PAGE
Lloh34:
	add	x4, x4, l_.str.4@PAGEOFF
	mov	x1, #0
	mov	w2, #1
	mov	w3, #1
	bl	_exec_prog
	bl	_check_ok
Lloh35:
	adrp	x0, l_.str.5@PAGE
Lloh36:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_prep_status
	ldr	w0, [x22]
	ldp	w6, w5, [x20]
Lloh37:
	adrp	x4, l_.str.6@PAGE
Lloh38:
	add	x4, x4, l_.str.6@PAGEOFF
	mov	x1, #0
	mov	w2, #1
	mov	w3, #1
	bl	_exec_prog
	bl	_check_ok
	add	x0, sp, #24
	bl	_create_script_for_cluster_analyze
	add	x0, sp, #16
	bl	_create_script_for_old_cluster_deletion
	bl	_issue_warnings_and_set_wal_level
	ldr	w0, [x21]
Lloh39:
	adrp	x1, l_.str.7@PAGE
Lloh40:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_pg_log
	ldp	x1, x0, [sp, #16]
	bl	_output_completion_banner
	ldr	x0, [sp, #24]
	bl	_pg_free
	ldr	x0, [sp, #16]
	bl	_pg_free
	bl	_cleanup
	mov	w0, #0
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pg_upgrade"

	.comm	_PG_MODE_MASK_OWNER,4,2         ; @PG_MODE_MASK_OWNER
	.comm	_old_cluster,16,2               ; @old_cluster
	.comm	_new_cluster,16,2               ; @new_cluster
l_.str.1:                               ; @.str.1
	.asciz	"could not read permissions of directory \"%s\": %s\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_pg_mode_mask,4,2               ; @pg_mode_mask
	.comm	_PG_REPORT,4,2                  ; @PG_REPORT
l_.str.2:                               ; @.str.2
	.asciz	"\nPerforming Upgrade\n------------------\n"

	.comm	_user_opts,8,3                  ; @user_opts
	.comm	_TRANSFER_MODE_LINK,8,3         ; @TRANSFER_MODE_LINK
l_.str.3:                               ; @.str.3
	.asciz	"Setting next OID for new cluster"

	.comm	_UTILITY_LOG_FILE,4,2           ; @UTILITY_LOG_FILE
l_.str.4:                               ; @.str.4
	.asciz	"\"%s/pg_resetwal\" -o %u \"%s\""

l_.str.5:                               ; @.str.5
	.asciz	"Sync data directory to disk"

l_.str.6:                               ; @.str.6
	.asciz	"\"%s/initdb\" --sync-only \"%s\""

l_.str.7:                               ; @.str.7
	.asciz	"\nUpgrade Complete\n----------------\n"

.subsections_via_symbols
