	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nls_setlocale                  ## -- Begin function nls_setlocale
	.p2align	4, 0x90
_nls_setlocale:                         ## @nls_setlocale
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_LC_CTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_setlocale
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_nls_lower@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_nls_upper@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_tolower
	movl	%eax, (%r15,%rbx,4)
	movl	%ebx, %edi
	callq	_toupper
	movl	%eax, (%r12,%rbx,4)
	incq	%rbx
	cmpq	$256, %rbx                      ## imm = 0x100
	jne	LBB0_2
	jmp	LBB0_3
LBB0_4:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_warnx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_3:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LC_CTYPE,4,2                   ## @LC_CTYPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't set locale '%s'\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_nls_lower,8,3                  ## @nls_lower
	.comm	_nls_upper,8,3                  ## @nls_upper
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nls_setlocale                  ; -- Begin function nls_setlocale
	.p2align	2
_nls_setlocale:                         ; @nls_setlocale
	.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	x19, x0
Lloh0:
	adrp	x8, _LC_CTYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LC_CTYPE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_setlocale
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, #0
Lloh3:
	adrp	x8, _nls_lower@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nls_lower@GOTPAGEOFF]
Lloh5:
	ldr	x20, [x8]
Lloh6:
	adrp	x8, _nls_upper@GOTPAGE
Lloh7:
	ldr	x8, [x8, _nls_upper@GOTPAGEOFF]
Lloh8:
	ldr	x21, [x8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_tolower
	lsl	x22, x19, #2
	str	w0, [x20, x22]
	mov	x0, x19
	bl	_toupper
	str	w0, [x21, x22]
	add	x19, x19, #1
	cmp	x19, #256
	b.ne	LBB0_2
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_warnx
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
LBB0_5:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_LC_CTYPE,4,2                   ; @LC_CTYPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't set locale '%s'\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_nls_lower,8,3                  ; @nls_lower
	.comm	_nls_upper,8,3                  ; @nls_upper
.subsections_via_symbols
