	.file	"extr_namei.c_hpfs_rmdir.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"there was error when removing dirent"
	.text
	.p2align 4
	.type	hpfs_rmdir, @function
hpfs_rmdir:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r12, QWORD PTR 8[rsi]
	mov	r14, QWORD PTR [rsi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR 16[rsi]
	lea	rsi, 8[rsp]
	mov	DWORD PTR 20[rsp], 0
	mov	rdi, r12
	lea	r15, 12[rsp]
	mov	DWORD PTR 8[rsp], eax
	call	hpfs_adjust_length@PLT
	xor	eax, eax
	call	lock_kernel@PLT
	mov	rdi, r14
	call	hpfs_i@PLT
	mov	rdi, rax
	call	mutex_lock@PLT
	mov	rdi, rbp
	call	hpfs_i@PLT
	lea	rdi, 4[rax]
	call	mutex_lock@PLT
	mov	rdi, rbp
	mov	ebx, DWORD PTR 8[rsp]
	mov	r13d, DWORD PTR ENOENT[rip]
	call	hpfs_i@PLT
	mov	r9, r15
	lea	r8, 16[rsp]
	mov	rdx, r12
	mov	esi, DWORD PTR 8[rax]
	mov	ecx, ebx
	mov	rdi, rbp
	call	map_dirent@PLT
	test	rax, rax
	je	.L14
	cmp	QWORD PTR 8[rax], 0
	mov	r12, rax
	jne	.L4
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	jne	.L5
	mov	r13d, DWORD PTR ENOTDIR[rip]
	neg	r13d
.L6:
	mov	rdi, r15
	call	hpfs_brelse4@PLT
.L3:
	mov	rdi, rbp
	call	hpfs_i@PLT
	lea	rdi, 4[rax]
	call	mutex_unlock@PLT
	mov	rdi, r14
	call	hpfs_i@PLT
	mov	rdi, rax
	call	mutex_unlock@PLT
	xor	eax, eax
	call	unlock_kernel@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rdi, r14
	call	hpfs_i@PLT
	mov	edi, DWORD PTR 0[rbp]
	lea	r8, 20[rsp]
	xor	ecx, ecx
	mov	esi, DWORD PTR 8[rax]
	xor	edx, edx
	call	hpfs_count_dnodes@PLT
	mov	r13d, DWORD PTR 20[rsp]
	test	r13d, r13d
	je	.L7
	mov	r13d, DWORD PTR ENOTEMPTY[rip]
	neg	r13d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	mov	r13d, DWORD PTR EPERM[rip]
	neg	r13d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	mov	esi, DWORD PTR 16[rsp]
	mov	r8d, 1
	mov	rcx, r15
	mov	rdx, r12
	mov	rdi, rbp
	call	hpfs_remove_dirent@PLT
	cmp	eax, 1
	je	.L8
	cmp	eax, 2
	jne	.L17
	mov	r13d, DWORD PTR ENOSPC[rip]
	.p2align 4,,10
	.p2align 3
.L14:
	neg	r13d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, rbp
	call	drop_nlink@PLT
	mov	rdi, r14
	call	clear_nlink@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edi, DWORD PTR 0[rbp]
	lea	rsi, .LC0[rip]
	call	hpfs_error@PLT
	mov	r13d, DWORD PTR EFSERROR[rip]
	neg	r13d
	jmp	.L3
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	hpfs_rmdir, .-hpfs_rmdir
	.comm	EPERM,4,4
	.comm	ENOTEMPTY,4,4
	.comm	ENOTDIR,4,4
	.comm	ENOSPC,4,4
	.comm	ENOENT,4,4
	.comm	EFSERROR,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_namei.c_hpfs_rmdir.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"there was error when removing dirent\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hpfs_rmdir, %function
hpfs_rmdir:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r0
	ldr	r6, [r1, #4]
	sub	sp, sp, #36
	ldr	r2, [r1, #8]
	ldr	ip, .L18
	ldr	r7, [r1]
	mov	r0, r6
	add	r1, sp, #12
	ldr	ip, [ip]
	str	ip, [sp, #28]
	mov	ip,#0
	str	r2, [sp, #12]
	str	r3, [sp, #24]
	bl	hpfs_adjust_length
	bl	lock_kernel
	mov	r0, r7
	bl	hpfs_i
	bl	mutex_lock
	mov	r0, r4
	bl	hpfs_i
	add	r0, r0, #4
	bl	mutex_lock
	ldr	r3, .L18+4
	mov	r0, r4
	ldr	r5, [r3]
	bl	hpfs_i
	add	r8, sp, #16
	add	r3, sp, #20
	ldr	r1, [r0, #8]
	mov	r2, r6
	stm	sp, {r3, r8}
	mov	r0, r4
	ldr	r3, [sp, #12]
	bl	map_dirent
	subs	r6, r0, #0
	beq	.L14
	ldr	r5, [r6, #8]
	cmp	r5, #0
	bne	.L4
	ldr	r3, [r6, #4]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L18+8
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L6:
	mov	r0, r8
	bl	hpfs_brelse4
.L3:
	mov	r0, r4
	bl	hpfs_i
	add	r0, r0, #4
	bl	mutex_unlock
	mov	r0, r7
	bl	hpfs_i
	bl	mutex_unlock
	bl	unlock_kernel
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	mov	r0, r5
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L5:
	mov	r0, r7
	ldr	r9, [r4]
	bl	hpfs_i
	add	r3, sp, #24
	ldr	r1, [r0, #8]
	mov	r2, r5
	str	r3, [sp]
	mov	r0, r9
	mov	r3, r5
	bl	hpfs_count_dnodes
	ldr	r5, [sp, #24]
	cmp	r5, #0
	beq	.L7
	ldr	r3, .L18+12
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L6
.L4:
	ldr	r3, .L18+16
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L6
.L7:
	mov	r1, #1
	mov	r3, r8
	str	r1, [sp]
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [sp, #20]
	bl	hpfs_remove_dirent
	cmp	r0, #1
	beq	.L8
	cmp	r0, #2
	bne	.L17
	ldr	r3, .L18+20
	ldr	r5, [r3]
.L14:
	rsb	r5, r5, #0
	b	.L3
.L17:
	mov	r0, r4
	bl	drop_nlink
	mov	r0, r7
	bl	clear_nlink
	b	.L3
.L8:
	ldr	r1, .L18+24
	ldr	r0, [r4]
	bl	hpfs_error
	ldr	r3, .L18+28
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L3
.L16:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC1
	.word	ENOENT
	.word	ENOTDIR
	.word	ENOTEMPTY
	.word	EPERM
	.word	ENOSPC
	.word	.LC0
	.word	EFSERROR
	.size	hpfs_rmdir, .-hpfs_rmdir
	.comm	EPERM,4,4
	.comm	ENOTEMPTY,4,4
	.comm	ENOTDIR,4,4
	.comm	ENOSPC,4,4
	.comm	ENOENT,4,4
	.comm	EFSERROR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
