	.file	"extr_249.c_search_valid_language.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"/usr/share/locale"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"failed to opendir /usr/share/locale"
	.section	.rodata.str1.1
.LC2:
	.string	"aborting"
.LC3:
	.string	"malloc failed\naborting"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"LANGUAGE=%s/../../../../../../tmp"
	.section	.rodata.str1.1
.LC5:
	.string	" [using %s] "
	.section	.rodata.str1.8
	.align 8
.LC6:
	.string	"failed to find a valid language\naborting"
	.text
	.p2align 4
	.globl	search_valid_language
	.type	search_valid_language, @function
search_valid_language:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	rdi, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	opendir@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L10
.L3:
	mov	rdi, rbp
	call	readdir@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L11
.L5:
	mov	rdi, QWORD PTR [rbx]
	mov	esi, 95
	call	strchr@PLT
	test	eax, eax
	je	.L3
	mov	rdi, QWORD PTR [rbx]
	call	strlen@PLT
	lea	rdi, 40[rax]
	call	malloc@PLT
	mov	QWORD PTR language[rip], rax
	mov	r12, rax
	test	rax, rax
	je	.L12
.L4:
	mov	rdi, QWORD PTR [rbx]
	call	strlen@PLT
	mov	rdi, r12
	xor	esi, esi
	lea	rdx, 40[rax]
	call	memset@PLT
	mov	rdx, QWORD PTR [rbx]
	mov	rdi, QWORD PTR language[rip]
	lea	rsi, .LC4[rip]
	call	sprintf@PLT
	mov	rdi, rbp
	call	closedir@PLT
	mov	rsi, QWORD PTR [rbx]
	lea	rdi, .LC5[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	printf@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	lea	rdi, .LC1[rip]
	call	perror@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	xor	edi, edi
	call	exit@PLT
	mov	rdi, rbp
	call	readdir@PLT
	mov	rbx, rax
	test	rax, rax
	jne	.L5
.L11:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	edi, edi
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	exit@PLT
.L12:
	.cfi_restore_state
	lea	rdi, .LC3[rip]
	call	puts@PLT
	xor	edi, edi
	call	exit@PLT
	mov	r12, QWORD PTR language[rip]
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	search_valid_language, .-search_valid_language
	.comm	language,8,8
	.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_249.c_search_valid_language.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"/usr/share/locale\000"
	.align	2
.LC1:
	.ascii	"failed to opendir /usr/share/locale\000"
	.align	2
.LC2:
	.ascii	"aborting\000"
	.align	2
.LC3:
	.ascii	"malloc failed\012aborting\000"
	.align	2
.LC4:
	.ascii	"LANGUAGE=%s/../../../../../../tmp\000"
	.align	2
.LC5:
	.ascii	" [using %s] \000"
	.align	2
.LC6:
	.ascii	"failed to find a valid language\012aborting\000"
	.text
	.align	2
	.global	search_valid_language
	.syntax unified
	.arm
	.fpu softvfp
	.type	search_valid_language, %function
search_valid_language:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r0, .L13
	bl	opendir
	subs	r5, r0, #0
	beq	.L10
.L3:
	mov	r0, r5
	bl	readdir
	subs	r4, r0, #0
	beq	.L11
.L5:
	mov	r1, #95
	ldr	r0, [r4]
	bl	strchr
	cmp	r0, #0
	beq	.L3
	ldr	r0, [r4]
	bl	strlen
	add	r0, r0, #40
	bl	malloc
	ldr	r7, .L13+4
	cmp	r0, #0
	mov	r6, r0
	str	r0, [r7]
	beq	.L12
.L4:
	ldr	r0, [r4]
	bl	strlen
	mov	r1, #0
	add	r2, r0, #40
	mov	r0, r6
	bl	memset
	ldr	r2, [r4]
	ldr	r1, .L13+8
	ldr	r0, [r7]
	bl	sprintf
	mov	r0, r5
	bl	closedir
	ldr	r1, [r4]
	ldr	r0, .L13+12
	pop	{r4, r5, r6, r7, r8, lr}
	b	printf
.L10:
	ldr	r0, .L13+16
	bl	perror
	ldr	r0, .L13+20
	bl	puts
	mov	r0, r5
	bl	exit
	mov	r0, r5
	bl	readdir
	subs	r4, r0, #0
	bne	.L5
.L11:
	ldr	r0, .L13+24
	bl	puts
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	exit
.L12:
	ldr	r0, .L13+28
	bl	puts
	mov	r0, r6
	bl	exit
	ldr	r6, [r7]
	b	.L4
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	language
	.word	.LC4
	.word	.LC5
	.word	.LC1
	.word	.LC2
	.word	.LC6
	.word	.LC3
	.size	search_valid_language, .-search_valid_language
	.comm	language,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
