	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_check_locale                   ## -- Begin function check_locale
	.p2align	4, 0x90
_check_locale:                          ## @check_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	%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, %r12
	movl	%edi, %r14d
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movq	$0, (%r13)
LBB0_2:
	xorl	%ebx, %ebx
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_setlocale
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%rax, %rdi
	callq	_pstrdup
	movq	%rax, %r15
	movl	%r14d, %edi
	movq	%r12, %rsi
	callq	_setlocale
	movq	%rax, %r12
	testq	%r13, %r13
	je	LBB0_6
## %bb.4:
	testq	%r12, %r12
	je	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	callq	_pstrdup
	movq	%rax, (%r13)
LBB0_6:
	movl	%r14d, %edi
	movq	%r15, %rsi
	callq	_setlocale
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	callq	_elog
LBB0_8:
	xorl	%ebx, %ebx
	testq	%r12, %r12
	setne	%bl
	movq	%r15, %rdi
	callq	_pfree
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WARNING,4,2                    ## @WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to restore old locale \"%s\""

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_check_locale                   ; -- Begin function check_locale
	.p2align	2
_check_locale:                          ; @check_locale
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x2
	mov	x22, x1
	mov	x20, x0
	cbz	x2, LBB0_2
; %bb.1:
	str	xzr, [x21]
LBB0_2:
	mov	x0, x20
	mov	x1, #0
	bl	_setlocale
	cbz	x0, LBB0_9
; %bb.3:
	bl	_pstrdup
	mov	x19, x0
	mov	x0, x20
	mov	x1, x22
	bl	_setlocale
	mov	x22, x0
	cbz	x21, LBB0_6
; %bb.4:
	cbz	x22, LBB0_6
; %bb.5:
	mov	x0, x22
	bl	_pstrdup
	str	x0, [x21]
LBB0_6:
	mov	x0, x20
	mov	x1, x19
	bl	_setlocale
	cbnz	x0, LBB0_8
; %bb.7:
Lloh0:
	adrp	x8, _WARNING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_elog
LBB0_8:
	cmp	x22, #0
	cset	w20, ne
	mov	x0, x19
	bl	_pfree
	b	LBB0_10
LBB0_9:
	mov	w20, #0
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WARNING,4,2                    ; @WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to restore old locale \"%s\""

.subsections_via_symbols
