	.file	"extr_setlocale.c_loadlocale.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	loadlocale, @function
loadlocale:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rdx, QWORD PTR new_categories[rip]
	movsx	rax, edi
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	lea	r12, 0[0+rax*8]
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbp, QWORD PTR [rdx+rax*8]
	mov	rbx, rax
	mov	rdx, QWORD PTR current_categories[rip]
	cmp	BYTE PTR 0[rbp], 46
	mov	r13, QWORD PTR [rdx+rax*8]
	jne	.L2
	movzx	eax, BYTE PTR 1[rbp]
	test	al, al
	je	.L7
	cmp	al, 46
	je	.L22
.L2:
	mov	esi, 47
	mov	rdi, rbp
	call	strchr@PLT
	test	rax, rax
	jne	.L7
	mov	r14d, DWORD PTR errno[rip]
	call	__detect_path_locale@PLT
	test	eax, eax
	jne	.L23
	add	ebx, -128
	mov	DWORD PTR errno[rip], r14d
	cmp	ebx, 5
	ja	.L7
	lea	rdx, .L9[rip]
	movsx	rax, DWORD PTR [rdx+rbx*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L9:
	.long	.L16-.L9
	.long	.L13-.L9
	.long	.L12-.L9
	.long	.L11-.L9
	.long	.L10-.L9
	.long	.L8-.L9
	.text
	.p2align 4,,10
	.p2align 3
.L22:
	cmp	BYTE PTR 2[rbp], 0
	jne	.L2
	.p2align 4,,10
	.p2align 3
.L7:
	mov	eax, DWORD PTR EINVAL[rip]
	xor	r13d, r13d
	mov	DWORD PTR errno[rip], eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r13
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	rbx, QWORD PTR __time_load_locale@GOTPCREL[rip]
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rsi, r13
	mov	rdi, rbp
	call	strcmp@PLT
	test	rax, rax
	je	.L1
	mov	rdi, rbp
	call	rbx
	cmp	eax, DWORD PTR _LDP_ERROR[rip]
	je	.L15
	mov	rsi, rbp
	mov	rdi, r13
	call	strcpy@PLT
	mov	rax, QWORD PTR __xlocale_global_locale[rip]
	mov	rsi, rbp
	mov	rax, QWORD PTR -8[rax+r12]
	mov	rdi, QWORD PTR [rax]
	call	strcpy@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r13
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	rbx, QWORD PTR __collate_load_tables@GOTPCREL[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rbx, QWORD PTR __messages_load_locale@GOTPCREL[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rbx, QWORD PTR __monetary_load_locale@GOTPCREL[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rbx, QWORD PTR __wrap_setrunelocale@GOTPCREL[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rbx, QWORD PTR __numeric_load_locale@GOTPCREL[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L23:
	mov	DWORD PTR errno[rip], eax
.L15:
	xor	r13d, r13d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	rax, r13
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	loadlocale, .-loadlocale
	.comm	new_categories,8,8
	.comm	errno,4,4
	.comm	current_categories,8,8
	.comm	__xlocale_global_locale,8,8
	.comm	_LDP_ERROR,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_setlocale.c_loadlocale.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	loadlocale, %function
loadlocale:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L21
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, [r3]
	ldr	r2, .L21+4
	ldr	r5, [r3, r0, lsl #2]
	ldr	r2, [r2]
	ldrb	r3, [r5]	@ zero_extendqisi2
	mov	r4, r0
	cmp	r3, #46
	ldr	r6, [r2, r0, lsl #2]
	lsl	r7, r0, #2
	bne	.L2
	ldrb	r3, [r5, #1]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L5
	cmp	r3, #46
	beq	.L19
.L2:
	mov	r1, #47
	mov	r0, r5
	bl	strchr
	cmp	r0, #0
	bne	.L5
	ldr	r9, .L21+8
	ldr	r8, [r9]
	bl	__detect_path_locale
	cmp	r0, #0
	bne	.L20
	sub	r4, r4, #128
	cmp	r4, #5
	str	r8, [r9]
	bhi	.L7
	mov	r1, r6
	mov	r0, r5
	bl	strcmp
	cmp	r0, #0
	beq	.L1
	ldr	r3, .L21+12
	mov	r0, r5
	ldr	r3, [r3, r4, lsl #2]
	blx	r3
	ldr	r3, .L21+16
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L9
	mov	r1, r5
	mov	r0, r6
	bl	strcpy
	ldr	r3, .L21+20
	mov	r1, r5
	ldr	r3, [r3]
	add	r7, r3, r7
	ldr	r3, [r7, #-4]
	ldr	r0, [r3]
	bl	strcpy
	b	.L1
.L19:
	ldrb	r3, [r5, #2]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L2
.L5:
	mov	r6, #0
	ldr	r2, .L21+24
	ldr	r3, .L21+8
	ldr	r2, [r2]
	str	r2, [r3]
.L1:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L20:
	str	r0, [r9]
.L9:
	mov	r6, #0
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L7:
	mov	r6, r0
	ldr	r3, .L21+24
	mov	r0, r6
	ldr	r3, [r3]
	str	r3, [r9]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L22:
	.align	2
.L21:
	.word	new_categories
	.word	current_categories
	.word	errno
	.word	.LANCHOR0
	.word	_LDP_ERROR
	.word	__xlocale_global_locale
	.word	EINVAL
	.size	loadlocale, .-loadlocale
	.comm	new_categories,4,4
	.comm	errno,4,4
	.comm	current_categories,4,4
	.comm	__xlocale_global_locale,4,4
	.comm	_LDP_ERROR,4,4
	.comm	EINVAL,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	CSWTCH.10, %object
	.size	CSWTCH.10, 24
CSWTCH.10:
	.word	__time_load_locale
	.word	__numeric_load_locale
	.word	__monetary_load_locale
	.word	__messages_load_locale
	.word	__wrap_setrunelocale
	.word	__collate_load_tables
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
