	.file	"extr_cpfile.c_nilfs_cpfile_delete_checkpoints.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"cannot delete checkpoints: invalid range [%llu, %llu)"
	.align 8
.LC1:
	.string	"error %d deleting checkpoint block"
	.text
	.p2align 4
	.globl	nilfs_cpfile_delete_checkpoints
	.type	nilfs_cpfile_delete_checkpoints, @function
nilfs_cpfile_delete_checkpoints:
.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
	mov	r13, rdx
	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
	mov	rbx, rsi
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	call	NILFS_MDT@PLT
	test	rbx, rbx
	mov	rax, QWORD PTR [rax]
	sete	dil
	cmp	rbx, r13
	mov	QWORD PTR 8[rsp], rax
	setg	al
	or	edi, eax
	movzx	edi, dil
	call	unlikely@PLT
	test	rax, rax
	jne	.L32
	mov	rdi, rbp
	call	NILFS_MDT@PLT
	lea	rdi, 8[rax]
	call	down_write@PLT
	lea	rsi, 56[rsp]
	mov	rdi, rbp
	call	nilfs_cpfile_get_header_block@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L4
	cmp	rbx, r13
	jge	.L5
	lea	rax, 64[rsp]
	mov	DWORD PTR 32[rsp], 0
	mov	QWORD PTR 24[rsp], 0
	mov	QWORD PTR 16[rsp], rax
.L13:
	mov	rdx, r13
	mov	rsi, rbx
	mov	rdi, rbp
	call	nilfs_cpfile_checkpoints_in_block@PLT
	mov	rcx, QWORD PTR 16[rsp]
	xor	edx, edx
	mov	rsi, rbx
	mov	rdi, rbp
	mov	DWORD PTR 4[rsp], eax
	call	nilfs_cpfile_get_checkpoint_block@PLT
	mov	r12d, eax
	test	eax, eax
	jns	.L6
	add	eax, DWORD PTR ENOENT[rip]
	je	.L33
.L7:
	cmp	QWORD PTR 24[rsp], 0
	mov	rdi, QWORD PTR 56[rsp]
	je	.L14
	mov	edi, DWORD PTR [rdi]
	call	kmap_atomic@PLT
	mov	rsi, QWORD PTR 56[rsp]
	mov	rdi, rbp
	mov	rdx, rax
	mov	r13, rax
	call	nilfs_cpfile_block_get_header@PLT
	mov	esi, DWORD PTR 24[rsp]
	mov	rdi, rax
	neg	esi
	call	le64_add_cpu@PLT
	mov	rdi, QWORD PTR 56[rsp]
	call	mark_buffer_dirty@PLT
	mov	rdi, rbp
	call	nilfs_mdt_mark_dirty@PLT
	mov	rdi, r13
	call	kunmap_atomic@PLT
	mov	rdi, QWORD PTR 56[rsp]
.L14:
	call	brelse@PLT
	mov	eax, DWORD PTR 32[rsp]
	test	eax, eax
	je	.L4
	mov	r12d, DWORD PTR EBUSY[rip]
	neg	r12d
.L4:
	mov	rdi, rbp
	call	NILFS_MDT@PLT
	lea	rdi, 8[rax]
	call	up_write@PLT
.L1:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L34
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L32:
	.cfi_restore_state
	mov	esi, DWORD PTR KERN_ERR[rip]
	mov	edi, DWORD PTR 0[rbp]
	mov	r8, r13
	mov	ecx, ebx
	lea	rdx, .LC0[rip]
	xor	eax, eax
	call	nilfs_msg@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rax, QWORD PTR 64[rsp]
	mov	edi, DWORD PTR [rax]
	call	kmap_atomic@PLT
	mov	rdx, QWORD PTR 64[rsp]
	mov	rsi, rbx
	mov	rdi, rbp
	mov	rcx, rax
	mov	QWORD PTR 40[rsp], rax
	call	nilfs_cpfile_block_get_checkpoint@PLT
	mov	edx, DWORD PTR 4[rsp]
	mov	r15, rax
	test	edx, edx
	jle	.L9
	mov	DWORD PTR 36[rsp], 0
	xor	r14d, r14d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L36:
	add	DWORD PTR 32[rsp], 1
.L11:
	add	r14d, 1
	add	r15, QWORD PTR 8[rsp]
	cmp	DWORD PTR 4[rsp], r14d
	je	.L35
.L12:
	mov	rdi, r15
	call	nilfs_checkpoint_snapshot@PLT
	test	rax, rax
	jne	.L36
	mov	rdi, r15
	call	nilfs_checkpoint_invalid@PLT
	test	eax, eax
	jne	.L11
	mov	rdi, r15
	add	r14d, 1
	call	nilfs_checkpoint_set_invalid@PLT
	add	DWORD PTR 36[rsp], 1
	add	r15, QWORD PTR 8[rsp]
	cmp	DWORD PTR 4[rsp], r14d
	jne	.L12
	.p2align 4,,10
	.p2align 3
.L35:
	movsx	rax, DWORD PTR 36[rsp]
	test	eax, eax
	je	.L9
	mov	rdi, QWORD PTR 64[rsp]
	add	QWORD PTR 24[rsp], rax
	call	mark_buffer_dirty@PLT
	mov	rdi, rbp
	call	nilfs_mdt_mark_dirty@PLT
	mov	rsi, rbx
	mov	rdi, rbp
	call	nilfs_cpfile_is_in_first@PLT
	test	eax, eax
	je	.L37
.L9:
	mov	rdi, QWORD PTR 40[rsp]
	call	kunmap_atomic@PLT
	mov	rdi, QWORD PTR 64[rsp]
	call	brelse@PLT
.L8:
	movsx	rax, DWORD PTR 4[rsp]
	add	rbx, rax
	cmp	r13, rbx
	jg	.L13
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L33:
	xor	r12d, r12d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L37:
	mov	ecx, DWORD PTR 36[rsp]
	mov	rdx, QWORD PTR 40[rsp]
	mov	rdi, rbp
	mov	rsi, QWORD PTR 64[rsp]
	call	nilfs_cpfile_block_sub_valid_checkpoints@PLT
	test	eax, eax
	jne	.L9
	mov	rdi, QWORD PTR 40[rsp]
	call	kunmap_atomic@PLT
	mov	rdi, QWORD PTR 64[rsp]
	call	brelse@PLT
	mov	rsi, rbx
	mov	rdi, rbp
	call	nilfs_cpfile_delete_checkpoint_block@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L8
	mov	esi, DWORD PTR KERN_ERR[rip]
	mov	edi, DWORD PTR 0[rbp]
	mov	ecx, eax
	lea	rdx, .LC1[rip]
	xor	eax, eax
	call	nilfs_msg@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, QWORD PTR 56[rsp]
	call	brelse@PLT
	jmp	.L4
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	nilfs_cpfile_delete_checkpoints, .-nilfs_cpfile_delete_checkpoints
	.comm	KERN_ERR,4,4
	.comm	ENOENT,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,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_cpfile.c_nilfs_cpfile_delete_checkpoints.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"cannot delete checkpoints: invalid range [%llu, %ll"
	.ascii	"u)\000"
	.align	2
.LC1:
	.ascii	"error %d deleting checkpoint block\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	nilfs_cpfile_delete_checkpoints
	.syntax unified
	.arm
	.fpu softvfp
	.type	nilfs_cpfile_delete_checkpoints, %function
nilfs_cpfile_delete_checkpoints:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L38
	sub	sp, sp, #52
	mov	r5, r1
	mov	r8, r2
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	mov	r7, r0
	bl	NILFS_MDT
	mov	r3, r0
	cmp	r5, r8
	movle	r0, #0
	movgt	r0, #1
	ldr	r3, [r3]
	cmp	r5, #0
	moveq	r0, #1
	str	r3, [sp, #16]
	bl	unlikely
	subs	r6, r0, #0
	bne	.L33
	mov	r0, r7
	bl	NILFS_MDT
	add	r0, r0, #4
	bl	down_write
	mov	r0, r7
	add	r1, sp, #36
	bl	nilfs_cpfile_get_header_block
	subs	r4, r0, #0
	blt	.L4
	cmp	r5, r8
	bge	.L5
	str	r6, [sp, #12]
.L13:
	mov	r2, r8
	mov	r1, r5
	mov	r0, r7
	bl	nilfs_cpfile_checkpoints_in_block
	mov	r2, #0
	mov	r9, r0
	mov	r1, r5
	mov	r0, r7
	add	r3, sp, #40
	bl	nilfs_cpfile_get_checkpoint_block
	subs	r4, r0, #0
	bge	.L6
	ldr	r3, .L38+4
	ldr	r3, [r3]
	cmn	r4, r3
	beq	.L34
.L7:
	ldr	r3, [sp, #12]
	ldr	r0, [sp, #36]
	cmp	r3, #0
	beq	.L14
	ldr	r0, [r0]
	bl	kmap_atomic
	mov	r5, r0
	mov	r2, r0
	ldr	r1, [sp, #36]
	mov	r0, r7
	bl	nilfs_cpfile_block_get_header
	ldr	r3, [sp, #12]
	rsb	r1, r3, #0
	bl	le64_add_cpu
	ldr	r0, [sp, #36]
	bl	mark_buffer_dirty
	mov	r0, r7
	bl	nilfs_mdt_mark_dirty
	mov	r0, r5
	bl	kunmap_atomic
	ldr	r0, [sp, #36]
.L14:
	bl	brelse
	cmp	r6, #0
	ldrne	r3, .L38+8
	ldrne	r4, [r3]
	rsbne	r4, r4, #0
.L4:
	mov	r0, r7
	bl	NILFS_MDT
	add	r0, r0, #4
	bl	up_write
.L1:
	ldr	r3, .L38
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L35
	mov	r0, r4
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L33:
	asr	r9, r8, #31
	ldr	r0, [r7]
	stm	sp, {r8-r9}
	ldr	r1, .L38+12
	mov	r3, r5
	ldr	r1, [r1]
	ldr	r2, .L38+16
	bl	nilfs_msg
	ldr	r3, .L38+20
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L6:
	ldr	r3, [sp, #40]
	ldr	r0, [r3]
	bl	kmap_atomic
	mov	r1, r5
	mov	r3, r0
	str	r0, [sp, #24]
	ldr	r2, [sp, #40]
	mov	r0, r7
	bl	nilfs_cpfile_block_get_checkpoint
	cmp	r9, #0
	mov	fp, r0
	ble	.L9
	mov	r10, #0
	str	r4, [sp, #28]
	str	r10, [sp, #20]
	mov	r4, r10
	ldr	r10, [sp, #16]
	b	.L12
.L11:
	add	r4, r4, #1
	cmp	r9, r4
	add	fp, fp, r10
	beq	.L36
.L12:
	mov	r0, fp
	bl	nilfs_checkpoint_snapshot
	cmp	r0, #0
	addne	r6, r6, #1
	bne	.L11
	mov	r0, fp
	bl	nilfs_checkpoint_invalid
	cmp	r0, #0
	bne	.L11
	mov	r0, fp
	bl	nilfs_checkpoint_set_invalid
	ldr	r3, [sp, #20]
	add	r4, r4, #1
	add	r3, r3, #1
	cmp	r9, r4
	str	r3, [sp, #20]
	add	fp, fp, r10
	bne	.L12
.L36:
	ldr	r10, [sp, #20]
	ldr	r4, [sp, #28]
	cmp	r10, #0
	beq	.L9
	ldr	r0, [sp, #40]
	bl	mark_buffer_dirty
	mov	r0, r7
	bl	nilfs_mdt_mark_dirty
	mov	r1, r5
	mov	r0, r7
	bl	nilfs_cpfile_is_in_first
	ldr	r3, [sp, #12]
	cmp	r0, #0
	add	r3, r3, r10
	str	r3, [sp, #12]
	beq	.L37
.L9:
	ldr	r0, [sp, #24]
	bl	kunmap_atomic
	ldr	r0, [sp, #40]
	bl	brelse
.L8:
	add	r5, r5, r9
	cmp	r8, r5
	bgt	.L13
	b	.L7
.L34:
	mov	r4, #0
	b	.L8
.L37:
	mov	r0, r7
	ldr	r3, [sp, #20]
	ldr	r2, [sp, #24]
	ldr	r1, [sp, #40]
	bl	nilfs_cpfile_block_sub_valid_checkpoints
	cmp	r0, #0
	bne	.L9
	ldr	r0, [sp, #24]
	bl	kunmap_atomic
	ldr	r0, [sp, #40]
	bl	brelse
	mov	r1, r5
	mov	r0, r7
	bl	nilfs_cpfile_delete_checkpoint_block
	subs	r4, r0, #0
	beq	.L8
	ldr	r2, .L38+12
	mov	r3, r4
	ldr	r1, [r2]
	ldr	r0, [r7]
	ldr	r2, .L38+24
	bl	nilfs_msg
	b	.L7
.L5:
	ldr	r0, [sp, #36]
	bl	brelse
	b	.L4
.L35:
	bl	__stack_chk_fail
.L39:
	.align	2
.L38:
	.word	.LC2
	.word	ENOENT
	.word	EBUSY
	.word	KERN_ERR
	.word	.LC0
	.word	EINVAL
	.word	.LC1
	.size	nilfs_cpfile_delete_checkpoints, .-nilfs_cpfile_delete_checkpoints
	.comm	KERN_ERR,4,4
	.comm	ENOENT,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
