	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setup_pgdata                   ## -- Begin function setup_pgdata
	.p2align	4, 0x90
_setup_pgdata:                          ## @setup_pgdata
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_pg_data@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	jne	LBB0_4
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	cmpb	$0, (%rax)
	je	LBB0_5
## %bb.3:
	movq	%rax, %rdi
	callq	_pg_strdup
	movq	%rax, %rdi
	movq	%rax, (%rbx)
LBB0_4:
	callq	_pg_strdup
	movq	_pgdata_native@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	(%rbx), %rdi
	callq	_canonicalize_path
	movq	(%rbx), %rsi
	leaq	L_.str.3(%rip), %rdi
	callq	_psprintf
	movq	%rax, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_putenv                         ## TAILCALL
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	callq	_pg_log_error
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_pg_data,8,3                    ## @pg_data
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PGDATA"

L_.str.1:                               ## @.str.1
	.asciz	"no data directory specified"

	.comm	_stderr,4,2                     ## @stderr
L_.str.2:                               ## @.str.2
	.asciz	"You must identify the directory where the data for this database system\nwill reside.  Do this with either the invocation option -D or the\nenvironment variable PGDATA.\n"

	.comm	_pgdata_native,8,3              ## @pgdata_native
L_.str.3:                               ## @.str.3
	.asciz	"PGDATA=%s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setup_pgdata                   ; -- Begin function setup_pgdata
	.p2align	2
_setup_pgdata:                          ; @setup_pgdata
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _pg_data@GOTPAGE
Lloh1:
	ldr	x19, [x19, _pg_data@GOTPAGEOFF]
	ldr	x0, [x19]
	cbnz	x0, LBB0_4
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_5
; %bb.2:
	ldrb	w8, [x0]
	cbz	w8, LBB0_5
; %bb.3:
	bl	_pg_strdup
	str	x0, [x19]
LBB0_4:
	bl	_pg_strdup
Lloh4:
	adrp	x8, _pgdata_native@GOTPAGE
Lloh5:
	ldr	x8, [x8, _pgdata_native@GOTPAGEOFF]
Lloh6:
	str	x0, [x8]
	ldr	x0, [x19]
	bl	_canonicalize_path
	ldr	x1, [x19]
Lloh7:
	adrp	x0, l_.str.3@PAGE
Lloh8:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_psprintf
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_putenv
LBB0_5:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pg_log_error
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w19, [x8]
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	mov	x1, x0
	mov	x0, x19
	bl	_fprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_pg_data,8,3                    ; @pg_data
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PGDATA"

l_.str.1:                               ; @.str.1
	.asciz	"no data directory specified"

	.comm	_stderr,4,2                     ; @stderr
l_.str.2:                               ; @.str.2
	.asciz	"You must identify the directory where the data for this database system\nwill reside.  Do this with either the invocation option -D or the\nenvironment variable PGDATA.\n"

	.comm	_pgdata_native,8,3              ; @pgdata_native
l_.str.3:                               ; @.str.3
	.asciz	"PGDATA=%s"

.subsections_via_symbols
