	.file	"extr_dirent.c_opendir.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"\\"
.LC1:
	.string	"*"
	.text
	.p2align 4
	.globl	opendir
	.type	opendir, @function
opendir:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	GetFileAttributes@PLT
	cmp	DWORD PTR INVALID_FILE_ATTRIBUTES[rip], eax
	je	.L12
	mov	edx, DWORD PTR FILE_ATTRIBUTE_DIRECTORY[rip]
	and	eax, edx
	cmp	edx, eax
	jne	.L13
	mov	edi, 32
	call	malloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L14
	mov	rdi, rbp
	call	strlen@PLT
	lea	edi, 4[rax]
	call	malloc@PLT
	mov	QWORD PTR [r12], rax
	mov	rdi, rax
	test	rax, rax
	je	.L15
	mov	rsi, rbp
	call	strcpy@PLT
	mov	rbp, QWORD PTR [r12]
	mov	rdi, rbp
	call	strlen@PLT
	cdqe
	cmp	BYTE PTR -1[rbp+rax], 47
	jne	.L16
.L8:
	mov	rdi, QWORD PTR [r12]
	lea	rsi, .LC1[rip]
	call	strcat@PLT
	mov	eax, DWORD PTR INVALID_HANDLE_VALUE[rip]
	mov	QWORD PTR 16[r12], 0
	mov	QWORD PTR 8[r12], 0
	mov	DWORD PTR 24[r12], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rax, r12
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	eax, DWORD PTR ENOTDIR[rip]
	xor	r12d, r12d
	mov	DWORD PTR errno[rip], eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rax, r12
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	rbp, QWORD PTR [r12]
	mov	rdi, rbp
	call	strlen@PLT
	cdqe
	cmp	BYTE PTR -1[rbp+rax], 92
	je	.L8
	mov	rdi, QWORD PTR [r12]
	lea	rsi, .LC0[rip]
	call	strcat@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L12:
	mov	eax, DWORD PTR ENOENT[rip]
	xor	r12d, r12d
	mov	DWORD PTR errno[rip], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	eax, DWORD PTR ENOMEM[rip]
	mov	DWORD PTR errno[rip], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	eax, DWORD PTR ENOMEM[rip]
	mov	rdi, r12
	xor	r12d, r12d
	mov	DWORD PTR errno[rip], eax
	call	free@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	opendir, .-opendir
	.comm	errno,4,4
	.comm	INVALID_HANDLE_VALUE,4,4
	.comm	INVALID_FILE_ATTRIBUTES,4,4
	.comm	FILE_ATTRIBUTE_DIRECTORY,4,4
	.comm	ENOTDIR,4,4
	.comm	ENOMEM,4,4
	.comm	ENOENT,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_dirent.c_opendir.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"\\\000"
	.align	2
.LC1:
	.ascii	"*\000"
	.text
	.align	2
	.global	opendir
	.syntax unified
	.arm
	.fpu softvfp
	.type	opendir, %function
opendir:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r6, r0
	bl	GetFileAttributes
	ldr	r3, .L18
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L13
	ldr	r3, .L18+4
	ldr	r3, [r3]
	bics	r3, r3, r0
	bne	.L14
	mov	r0, #16
	bl	malloc
	subs	r4, r0, #0
	beq	.L15
	mov	r0, r6
	bl	strlen
	add	r0, r0, #4
	bl	malloc
	cmp	r0, #0
	mov	r5, r0
	str	r0, [r4]
	beq	.L16
	mov	r1, r6
	bl	strcpy
	mov	r0, r5
	bl	strlen
	add	r0, r5, r0
	ldrb	r3, [r0, #-1]	@ zero_extendqisi2
	cmp	r3, #92
	cmpne	r3, #47
	bne	.L17
.L7:
	mov	r0, r5
	bl	strlen
	mov	r2, #2
	ldr	r1, .L18+8
	add	r0, r5, r0
	bl	memcpy
	mov	r3, #0
	ldr	r2, .L18+12
	str	r3, [r4, #8]
	ldr	r2, [r2]
	str	r3, [r4, #4]
	str	r2, [r4, #12]
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L14:
	mov	r4, #0
	ldr	r2, .L18+16
	ldr	r3, .L18+20
	ldr	r2, [r2]
	mov	r0, r4
	str	r2, [r3]
	pop	{r4, r5, r6, pc}
.L17:
	mov	r0, r5
	bl	strlen
	mov	r2, #2
	ldr	r1, .L18+24
	add	r0, r5, r0
	bl	memcpy
	b	.L7
.L13:
	ldr	r2, .L18+28
	ldr	r3, .L18+20
	ldr	r2, [r2]
	mov	r4, #0
	str	r2, [r3]
	b	.L1
.L16:
	ldr	r2, .L18+32
	ldr	r3, .L18+20
	ldr	r2, [r2]
	mov	r0, r4
	str	r2, [r3]
	mov	r4, r5
	bl	free
	b	.L1
.L15:
	ldr	r2, .L18+32
	ldr	r3, .L18+20
	ldr	r2, [r2]
	str	r2, [r3]
	b	.L1
.L19:
	.align	2
.L18:
	.word	INVALID_FILE_ATTRIBUTES
	.word	FILE_ATTRIBUTE_DIRECTORY
	.word	.LC1
	.word	INVALID_HANDLE_VALUE
	.word	ENOTDIR
	.word	errno
	.word	.LC0
	.word	ENOENT
	.word	ENOMEM
	.size	opendir, .-opendir
	.comm	errno,4,4
	.comm	INVALID_HANDLE_VALUE,4,4
	.comm	INVALID_FILE_ATTRIBUTES,4,4
	.comm	FILE_ATTRIBUTE_DIRECTORY,4,4
	.comm	ENOTDIR,4,4
	.comm	ENOMEM,4,4
	.comm	ENOENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
