	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_locale_name
_check_locale_name:                     ## @check_locale_name
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movl	%edi, %r15d
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movq	$0, (%r13)
LBB0_2:
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_setlocale
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%rax, %rdi
	callq	_pg_strdup
	movq	%rax, %r12
	testq	%rbx, %rbx
	leaq	L_.str.1(%rip), %r14
	cmovneq	%rbx, %r14
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_setlocale
	movq	%rax, %rbx
	testq	%r13, %r13
	je	LBB0_6
## %bb.4:
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_pg_strdup
	movq	%rax, (%r13)
LBB0_6:
	movl	%r15d, %edi
	movq	%r12, %rsi
	callq	_setlocale
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	%r12, %rdi
	callq	_free
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_13
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	movq	%r12, %rsi
	jmp	LBB0_15
LBB0_11:
	cmpb	$0, (%r14)
	jne	LBB0_14
## %bb.12:
	leaq	L_.str.4(%rip), %rdi
LBB0_13:
	xorl	%eax, %eax
	callq	_pg_log_error
	movl	$1, %edi
	callq	_exit
LBB0_14:
	leaq	L_.str.3(%rip), %rdi
	movq	%r14, %rsi
LBB0_15:
	xorl	%eax, %eax
	callq	_pg_log_error
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setlocale() failed"

L_.str.1:                               ## @.str.1
	.space	1

L_.str.2:                               ## @.str.2
	.asciz	"failed to restore old locale \"%s\""

L_.str.3:                               ## @.str.3
	.asciz	"invalid locale name \"%s\""

L_.str.4:                               ## @.str.4
	.asciz	"invalid locale settings; check LANG and LC_* environment variables"

	.no_dead_strip	_check_locale_name
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_locale_name
_check_locale_name:                     ; @check_locale_name
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	cbz	x2, LBB0_2
; %bb.1:
	str	xzr, [x20]
LBB0_2:
	mov	x0, x19
	mov	x1, #0
	bl	_setlocale
	cbz	x0, LBB0_9
; %bb.3:
	bl	_pg_strdup
	mov	x22, x0
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
	cmp	x21, #0
	csel	x21, x8, x21, eq
	mov	x0, x19
	mov	x1, x21
	bl	_setlocale
	mov	x23, x0
	cbz	x20, LBB0_6
; %bb.4:
	cbz	x23, LBB0_6
; %bb.5:
	mov	x0, x23
	bl	_pg_strdup
	str	x0, [x20]
LBB0_6:
	mov	x0, x19
	mov	x1, x22
	bl	_setlocale
	cbz	x0, LBB0_10
; %bb.7:
	mov	x0, x22
	bl	_free
	cbz	x23, LBB0_11
; %bb.8:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_14
LBB0_10:
	str	x22, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_11:
	ldrb	w8, [x21]
	cbnz	w8, LBB0_13
; %bb.12:
Lloh6:
	adrp	x0, l_.str.4@PAGE
Lloh7:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_14
LBB0_13:
	str	x21, [sp]
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_14:
	bl	_pg_log_error
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setlocale() failed"

l_.str.1:                               ; @.str.1
	.space	1

l_.str.2:                               ; @.str.2
	.asciz	"failed to restore old locale \"%s\""

l_.str.3:                               ; @.str.3
	.asciz	"invalid locale name \"%s\""

l_.str.4:                               ; @.str.4
	.asciz	"invalid locale settings; check LANG and LC_* environment variables"

	.no_dead_strip	_check_locale_name
.subsections_via_symbols
