	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___detect_path_locale           ## -- Begin function __detect_path_locale
	.p2align	4, 0x90
___detect_path_locale:                  ## @__detect_path_locale
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	__PathLocale@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	cmpq	$0, (%r15)
	jne	LBB0_9
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_issetugid
	testl	%eax, %eax
	je	LBB0_3
LBB0_8:
	movq	__PATH_LOCALE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, %rdi
	callq	_strlen
	movq	_ENCODING_LEN@GOTPCREL(%rip), %rcx
	movq	_CATEGORY_LEN@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	addq	(%rcx), %rax
	addq	%rdx, %rax
	addq	$2, %rax
	movq	_PATH_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_4
## %bb.5:
	movq	%r14, %rdi
	callq	_strdup
	movq	%rax, (%r15)
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.6:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	jne	LBB0_9
## %bb.7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_9
LBB0_4:
	movq	_ENAMETOOLONG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	__PathLocale,8,3                ## @_PathLocale
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PATH_LOCALE"

	.comm	_ENCODING_LEN,8,3               ## @ENCODING_LEN
	.comm	_CATEGORY_LEN,8,3               ## @CATEGORY_LEN
	.comm	_PATH_MAX,8,3                   ## @PATH_MAX
	.comm	_ENAMETOOLONG,4,2               ## @ENAMETOOLONG
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	__PATH_LOCALE,8,3               ## @_PATH_LOCALE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___detect_path_locale           ; -- Begin function __detect_path_locale
	.p2align	2
___detect_path_locale:                  ; @__detect_path_locale
	.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	x20, __PathLocale@GOTPAGE
Lloh1:
	ldr	x20, [x20, __PathLocale@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_5
LBB0_2:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_4
; %bb.3:
	mov	x19, x0
	bl	_issetugid
	cbz	w0, LBB0_6
LBB0_4:
	mov	w0, #0
Lloh4:
	adrp	x8, __PATH_LOCALE@GOTPAGE
Lloh5:
	ldr	x8, [x8, __PATH_LOCALE@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	str	x8, [x20]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	bl	_strlen
Lloh7:
	adrp	x8, _ENCODING_LEN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENCODING_LEN@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _CATEGORY_LEN@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CATEGORY_LEN@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x8, x0, x8
	add	x8, x8, x9
	add	x8, x8, #2
Lloh13:
	adrp	x9, _PATH_MAX@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PATH_MAX@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_strdup
	str	x0, [x20]
	cbnz	x0, LBB0_1
; %bb.8:
Lloh16:
	adrp	x8, _errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x9, [x9, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w0, w9, w8, eq
	b	LBB0_5
LBB0_9:
Lloh22:
	adrp	x8, _ENAMETOOLONG@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENAMETOOLONG@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	__PathLocale,8,3                ; @_PathLocale
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PATH_LOCALE"

	.comm	_ENCODING_LEN,8,3               ; @ENCODING_LEN
	.comm	_CATEGORY_LEN,8,3               ; @CATEGORY_LEN
	.comm	_PATH_MAX,8,3                   ; @PATH_MAX
	.comm	_ENAMETOOLONG,4,2               ; @ENAMETOOLONG
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	__PATH_LOCALE,8,3               ; @_PATH_LOCALE
.subsections_via_symbols
