	.file	"extr_fatdir.c__FAT_chdir_r.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	_FAT_chdir_r
	.type	_FAT_chdir_r, @function
_FAT_chdir_r:
.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, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	rdi, rsi
	call	_FAT_partition_getPartitionFromPath@PLT
	test	rax, rax
	je	.L12
	mov	esi, 58
	mov	rdi, rbp
	mov	r12, rax
	call	strchr@PLT
	test	rax, rax
	je	.L4
	mov	rdi, rbp
	mov	esi, 58
	call	strchr@PLT
	lea	rbp, 1[rax]
.L4:
	mov	esi, 58
	mov	rdi, rbp
	call	strchr@PLT
	test	rax, rax
	jne	.L13
	mov	rdi, r12
	call	_FAT_lock@PLT
	mov	rdi, r12
	mov	rsi, rbp
	call	_FAT_directory_chdir@PLT
	mov	rdi, r12
	test	rax, rax
	je	.L6
	call	_FAT_unlock@PLT
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	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 EINVAL[rip]
	mov	DWORD PTR [rbx], eax
	mov	eax, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	call	_FAT_unlock@PLT
	mov	eax, DWORD PTR ENOTDIR[rip]
	mov	DWORD PTR [rbx], eax
	mov	eax, -1
	jmp	.L1
.L12:
	mov	eax, DWORD PTR ENODEV[rip]
	mov	DWORD PTR [rbx], eax
	mov	eax, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	_FAT_chdir_r, .-_FAT_chdir_r
	.comm	ENOTDIR,4,4
	.comm	ENODEV,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_fatdir.c__FAT_chdir_r.c"
	.text
	.align	2
	.global	_FAT_chdir_r
	.syntax unified
	.arm
	.fpu softvfp
	.type	_FAT_chdir_r, %function
_FAT_chdir_r:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r0
	mov	r0, r1
	mov	r4, r1
	bl	_FAT_partition_getPartitionFromPath
	subs	r6, r0, #0
	beq	.L12
	mov	r1, #58
	mov	r0, r4
	bl	strchr
	cmp	r0, #0
	beq	.L4
	mov	r0, r4
	mov	r1, #58
	bl	strchr
	add	r4, r0, #1
.L4:
	mov	r1, #58
	mov	r0, r4
	bl	strchr
	subs	r5, r0, #0
	bne	.L13
	mov	r0, r6
	bl	_FAT_lock
	mov	r1, r4
	mov	r0, r6
	bl	_FAT_directory_chdir
	cmp	r0, #0
	mov	r0, r6
	beq	.L6
	bl	_FAT_unlock
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	ldr	r3, .L14
	mvn	r0, #0
	ldr	r3, [r3]
	str	r3, [r7]
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	bl	_FAT_unlock
	ldr	r3, .L14+4
	mvn	r0, #0
	ldr	r3, [r3]
	str	r3, [r7]
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r3, .L14+8
	mvn	r0, #0
	ldr	r3, [r3]
	str	r3, [r7]
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	.align	2
.L14:
	.word	EINVAL
	.word	ENOTDIR
	.word	ENODEV
	.size	_FAT_chdir_r, .-_FAT_chdir_r
	.comm	ENOTDIR,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
