	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_pglocale_pgservice         ## -- Begin function set_pglocale_pgservice
	.p2align	4, 0x90
_set_pglocale_pgservice:                ## @set_pglocale_pgservice
	.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, %r14
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPGPATH@GOTPCREL(%rip), %rax
	movslq	(%rax), %r15
	movl	%r15d, %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	addq	$14, %r15
	movq	%r15, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_PG_TEXTDOMAIN
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_LC_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_setlocale
LBB0_2:
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_find_my_exec
	testq	%rax, %rax
	js	LBB0_6
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:
	movq	%r12, %rdi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_get_etc_path
	leaq	L_.str.3(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movq	%r14, %rcx
	callq	_snprintf
	movq	%rbx, %rdi
	addq	$13, %rdi
	callq	_canonicalize_path
	movq	%rbx, %rdi
	callq	_strdup
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rax, %rdi
	callq	_putenv
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"postgres"

	.comm	_LC_ALL,4,2                     ## @LC_ALL
L_.str.1:                               ## @.str.1
	.space	1

L_.str.2:                               ## @.str.2
	.asciz	"PGSYSCONFDIR"

L_.str.3:                               ## @.str.3
	.asciz	"PGSYSCONFDIR=%s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_pglocale_pgservice         ; -- Begin function set_pglocale_pgservice
	.p2align	2
_set_pglocale_pgservice:                ; @set_pglocale_pgservice
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #16
	mov	x24, x1
	mov	x23, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _MAXPGPATH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPGPATH@GOTPAGEOFF]
Lloh5:
	ldrsw	x12, [x8]
	and	x8, x12, #0xffffffff
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x13, x10, #0x1fffffff0
	sub	x19, x9, x13
	mov	sp, x19
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x22, x8, x13
	mov	sp, x22
	add	x21, x12, #14
	mov	x9, x21
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x12, #29
	and	x9, x9, #0xfffffffffffffff0
	sub	x20, x8, x9
	mov	sp, x20
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_PG_TEXTDOMAIN
	mov	x1, x0
	mov	x0, x24
	bl	_strcmp
	cbz	x0, LBB0_2
; %bb.1:
Lloh14:
	adrp	x8, _LC_ALL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LC_ALL@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_setlocale
LBB0_2:
	mov	x0, x23
	mov	x1, x22
	bl	_find_my_exec
	tbnz	x0, #63, LBB0_6
; %bb.3:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_getenv
	cbnz	x0, LBB0_6
; %bb.4:
	mov	x0, x22
	mov	x1, x19
	bl	_get_etc_path
Lloh21:
	adrp	x2, l_.str.3@PAGE
Lloh22:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	mov	x3, x19
	bl	_snprintf
	add	x0, x20, #13
	bl	_canonicalize_path
	mov	x0, x20
	bl	_strdup
	cbz	x0, LBB0_6
; %bb.5:
	bl	_putenv
LBB0_6:
	ldur	x8, [x29, #-56]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"postgres"

	.comm	_LC_ALL,4,2                     ; @LC_ALL
l_.str.1:                               ; @.str.1
	.space	1

l_.str.2:                               ; @.str.2
	.asciz	"PGSYSCONFDIR"

l_.str.3:                               ; @.str.3
	.asciz	"PGSYSCONFDIR=%s"

.subsections_via_symbols
