	.file	"extr_xfs_sync.c_xfs_reclaim_inodes_ag.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	xfs_reclaim_inodes_ag
	.type	xfs_reclaim_inodes_ag, @function
xfs_reclaim_inodes_ag:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	mov	r13, rdi
	push	r12
	push	rbx
	sub	rsp, 120
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -72[rbp], esi
	and	esi, DWORD PTR SYNC_TRYLOCK[rip]
	mov	QWORD PTR -112[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -120[rbp], esi
	mov	DWORD PTR -116[rbp], 0
.L2:
	mov	DWORD PTR -148[rbp], 0
	mov	QWORD PTR -136[rbp], 0
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, DWORD PTR XFS_ICI_RECLAIM_TAG[rip]
	mov	rsi, QWORD PTR -136[rbp]
	mov	rdi, r13
	call	xfs_perag_get_tag@PLT
	mov	r12, rax
	test	rax, rax
	je	.L57
	mov	rax, QWORD PTR [r12]
	mov	r10d, DWORD PTR -120[rbp]
	lea	rdi, 16[r12]
	mov	QWORD PTR -144[rbp], rdi
	add	rax, 1
	mov	QWORD PTR -136[rbp], rax
	test	r10d, r10d
	je	.L4
	call	mutex_trylock@PLT
	test	eax, eax
	je	.L58
	mov	rax, QWORD PTR 8[r12]
	mov	QWORD PTR -88[rbp], rax
.L7:
	lea	rax, 20[r12]
	mov	QWORD PTR -128[rbp], rax
	.p2align 4,,10
	.p2align 3
.L21:
	movsx	rax, DWORD PTR XFS_LOOKUP_BATCH[rip]
	mov	rcx, rsp
	mov	QWORD PTR -104[rbp], rsp
	lea	rax, 15[0+rax*8]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L9
.L59:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L59
.L9:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L10
	or	QWORD PTR -8[rsp+rdx], 0
.L10:
	xor	eax, eax
	mov	rbx, rsp
	call	rcu_read_lock@PLT
	mov	rdx, QWORD PTR -88[rbp]
	mov	rdi, QWORD PTR -128[rbp]
	mov	rsi, rbx
	mov	r8d, DWORD PTR XFS_ICI_RECLAIM_TAG[rip]
	mov	ecx, DWORD PTR XFS_LOOKUP_BATCH[rip]
	call	radix_tree_gang_lookup_tag@PLT
	mov	DWORD PTR -80[rbp], eax
	test	eax, eax
	je	.L11
	mov	DWORD PTR -68[rbp], 0
	mov	r14d, 0
	jg	.L12
	jmp	.L60
	.p2align 4,,10
	.p2align 3
.L15:
	mov	QWORD PTR [rbx+r8*8], 0
.L16:
	mov	rsi, QWORD PTR [r15]
	mov	rdi, r13
	add	r14d, 1
	call	XFS_INO_TO_AGNO@PLT
	cmp	rax, QWORD PTR [r12]
	je	.L61
.L17:
	cmp	DWORD PTR -80[rbp], r14d
	jle	.L18
.L12:
	mov	r9d, DWORD PTR -68[rbp]
	movsx	r8, r14d
	mov	r15, QWORD PTR [rbx+r8*8]
	test	r9d, r9d
	jne	.L15
	mov	esi, DWORD PTR -72[rbp]
	mov	rdi, r15
	mov	QWORD PTR -96[rbp], r8
	call	xfs_reclaim_inode_grab@PLT
	mov	r8, QWORD PTR -96[rbp]
	test	rax, rax
	je	.L16
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L61:
	mov	rax, QWORD PTR [r15]
	mov	rdi, r13
	lea	rsi, 1[rax]
	call	XFS_INO_TO_AGINO@PLT
	mov	rsi, QWORD PTR [r15]
	mov	rdi, r13
	mov	QWORD PTR -88[rbp], rax
	call	XFS_INO_TO_AGINO@PLT
	cmp	rax, QWORD PTR -88[rbp]
	jbe	.L17
	cmp	DWORD PTR -80[rbp], r14d
	jle	.L27
	movsx	r8, r14d
	mov	DWORD PTR -68[rbp], 1
	mov	r15, QWORD PTR [rbx+r8*8]
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L27:
	mov	DWORD PTR -68[rbp], 1
	.p2align 4,,10
	.p2align 3
.L18:
	xor	eax, eax
	call	rcu_read_unlock@PLT
	mov	eax, DWORD PTR -80[rbp]
	mov	r15d, DWORD PTR -116[rbp]
	mov	QWORD PTR -80[rbp], r13
	mov	r13, rbx
	sub	eax, 1
	lea	r14, 8[rbx+rax*8]
	mov	ebx, DWORD PTR -72[rbp]
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdi, QWORD PTR 0[r13]
	test	rdi, rdi
	je	.L19
	mov	edx, ebx
	mov	rsi, r12
	call	xfs_reclaim_inode@PLT
	test	eax, eax
	je	.L19
	cmp	DWORD PTR EFSCORRUPTED[rip], r15d
	cmovne	r15d, eax
.L19:
	add	r13, 8
	cmp	r14, r13
	jne	.L20
	mov	rcx, QWORD PTR -112[rbp]
	mov	eax, DWORD PTR XFS_LOOKUP_BATCH[rip]
	mov	DWORD PTR -116[rbp], r15d
	mov	r13, QWORD PTR -80[rbp]
	sub	DWORD PTR [rcx], eax
	mov	r8d, DWORD PTR -68[rbp]
	mov	rsp, QWORD PTR -104[rbp]
	test	r8d, r8d
	jne	.L28
.L24:
	mov	rax, QWORD PTR -112[rbp]
	mov	edi, DWORD PTR [rax]
	test	edi, edi
	jg	.L21
	mov	esi, DWORD PTR -120[rbp]
	mov	eax, 0
	test	esi, esi
	cmovne	rax, QWORD PTR -88[rbp]
	mov	QWORD PTR -88[rbp], rax
.L14:
	mov	rax, QWORD PTR -88[rbp]
	mov	rdi, QWORD PTR -144[rbp]
	mov	QWORD PTR 8[r12], rax
	call	mutex_unlock@PLT
	mov	rdi, r12
	call	xfs_perag_put@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L60:
	xor	eax, eax
	call	rcu_read_unlock@PLT
	mov	rcx, QWORD PTR -112[rbp]
	mov	eax, DWORD PTR XFS_LOOKUP_BATCH[rip]
	sub	DWORD PTR [rcx], eax
	mov	rsp, QWORD PTR -104[rbp]
	jmp	.L24
.L58:
	mov	rdi, r12
	add	DWORD PTR -148[rbp], 1
	call	xfs_perag_put@PLT
	jmp	.L3
.L4:
	mov	rdi, QWORD PTR -144[rbp]
	call	mutex_lock@PLT
	mov	QWORD PTR -88[rbp], 0
	jmp	.L7
.L11:
	xor	eax, eax
	call	rcu_read_unlock@PLT
	mov	QWORD PTR -88[rbp], 0
	mov	rsp, QWORD PTR -104[rbp]
	jmp	.L14
.L28:
	mov	QWORD PTR -88[rbp], 0
	jmp	.L14
.L57:
	mov	ecx, DWORD PTR -120[rbp]
	test	ecx, ecx
	je	.L23
	mov	edx, DWORD PTR -148[rbp]
	test	edx, edx
	je	.L23
	mov	rax, QWORD PTR -112[rbp]
	mov	DWORD PTR -120[rbp], 0
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jg	.L2
.L23:
	mov	edi, DWORD PTR -116[rbp]
	call	XFS_ERROR@PLT
	mov	rcx, QWORD PTR -56[rbp]
	xor	rcx, QWORD PTR fs:40
	jne	.L62
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L62:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	xfs_reclaim_inodes_ag, .-xfs_reclaim_inodes_ag
	.comm	XFS_LOOKUP_BATCH,4,4
	.comm	XFS_ICI_RECLAIM_TAG,4,4
	.comm	SYNC_TRYLOCK,4,4
	.comm	EFSCORRUPTED,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_xfs_sync.c_xfs_reclaim_inodes_ag.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	xfs_reclaim_inodes_ag
	.syntax unified
	.arm
	.fpu softvfp
	.type	xfs_reclaim_inodes_ag, %function
xfs_reclaim_inodes_ag:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r3, #0
	add	fp, sp, #32
	sub	sp, sp, #68
	mov	r8, r1
	mov	r9, r0
	str	r3, [fp, #-68]
	ldr	r3, .L52
	str	r2, [fp, #-64]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	ldr	r3, .L52+4
	ldr	r3, [r3]
	and	r3, r1, r3
	str	r3, [fp, #-84]
.L2:
	mov	r3, #0
	str	r3, [fp, #-88]
	str	r3, [fp, #-76]
.L3:
	ldr	r3, .L52+8
	mov	r0, r9
	ldr	r1, [fp, #-76]
	ldr	r2, [r3]
	bl	xfs_perag_get_tag
	subs	r10, r0, #0
	beq	.L46
	mov	r0, r10
	ldr	r2, [fp, #-84]
	ldr	r3, [r0], #8
	cmp	r2, #0
	add	r3, r3, #1
	str	r0, [fp, #-80]
	str	r3, [fp, #-76]
	beq	.L4
	bl	mutex_trylock
	cmp	r0, #0
	beq	.L47
	ldr	r3, [r10, #4]
	str	r3, [fp, #-56]
.L7:
	add	r3, r10, #12
	str	r3, [fp, #-72]
.L18:
	ldr	r4, .L52+12
	str	sp, [fp, #-60]
	ldr	r3, [r4]
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	bl	rcu_read_lock
	ldr	r2, .L52+8
	ldr	r3, [r4]
	ldr	r2, [r2]
	add	r4, sp, #8
	str	r2, [sp]
	mov	r1, r4
	ldr	r2, [fp, #-56]
	ldr	r0, [fp, #-72]
	bl	radix_tree_gang_lookup_tag
	subs	r5, r0, #0
	beq	.L8
	ble	.L48
	mov	r7, #0
	ldr	r6, [fp, #-56]
	str	r7, [fp, #-48]
	str	r8, [fp, #-52]
	b	.L9
.L12:
	mov	r3, #0
	str	r3, [r4, r7, lsl #2]
.L13:
	ldr	r1, [r8]
	mov	r0, r9
	bl	XFS_INO_TO_AGNO
	ldr	r1, [r10]
	add	r7, r7, #1
	cmp	r0, r1
	beq	.L49
.L14:
	cmp	r5, r7
	ble	.L50
.L9:
	ldr	r3, [fp, #-48]
	ldr	r8, [r4, r7, lsl #2]
	cmp	r3, #0
	bne	.L12
	mov	r0, r8
	ldr	r1, [fp, #-52]
	bl	xfs_reclaim_inode_grab
	cmp	r0, #0
	beq	.L13
	b	.L12
.L49:
	ldr	r1, [r8]
	mov	r0, r9
	add	r1, r1, #1
	bl	XFS_INO_TO_AGINO
	ldr	r1, [r8]
	mov	r6, r0
	mov	r0, r9
	bl	XFS_INO_TO_AGINO
	cmp	r0, r6
	bls	.L14
	cmp	r5, r7
	ble	.L25
	mov	r3, #1
	ldr	r8, [r4, r7, lsl #2]
	str	r3, [fp, #-48]
	b	.L12
.L50:
	ldr	r8, [fp, #-52]
	str	r6, [fp, #-56]
.L15:
	mov	r7, #0
	bl	rcu_read_unlock
	ldr	r6, [fp, #-68]
	sub	r4, r4, #4
.L17:
	ldr	r0, [r4, #4]!
	cmp	r0, #0
	beq	.L16
	mov	r2, r8
	mov	r1, r10
	bl	xfs_reclaim_inode
	cmp	r0, #0
	beq	.L16
	ldr	r3, .L52+16
	ldr	r3, [r3]
	cmp	r3, r6
	movne	r6, r0
.L16:
	add	r7, r7, #1
	cmp	r5, r7
	bne	.L17
	ldr	r1, [fp, #-64]
	ldr	r2, .L52+12
	ldr	r3, [r1]
	ldr	r2, [r2]
	ldr	r0, [fp, #-48]
	sub	r3, r3, r2
	cmp	r0, #0
	str	r6, [fp, #-68]
	str	r3, [r1]
	ldr	sp, [fp, #-60]
	bne	.L26
.L21:
	ldr	r3, [fp, #-64]
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L18
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	ldr	r3, [fp, #-56]
	moveq	r3, #0
	str	r3, [fp, #-56]
.L11:
	ldr	r3, [fp, #-56]
	ldr	r0, [fp, #-80]
	str	r3, [r10, #4]
	bl	mutex_unlock
	mov	r0, r10
	bl	xfs_perag_put
	b	.L3
.L25:
	mov	r3, #1
	ldr	r8, [fp, #-52]
	str	r6, [fp, #-56]
	str	r3, [fp, #-48]
	b	.L15
.L48:
	bl	rcu_read_unlock
	ldr	r1, [fp, #-64]
	ldr	r2, .L52+12
	ldr	r3, [r1]
	ldr	r2, [r2]
	sub	r3, r3, r2
	str	r3, [r1]
	ldr	sp, [fp, #-60]
	b	.L21
.L47:
	ldr	r3, [fp, #-88]
	mov	r0, r10
	add	r3, r3, #1
	str	r3, [fp, #-88]
	bl	xfs_perag_put
	b	.L3
.L4:
	ldr	r0, [fp, #-80]
	bl	mutex_lock
	ldr	r3, [fp, #-84]
	str	r3, [fp, #-56]
	b	.L7
.L8:
	bl	rcu_read_unlock
	str	r5, [fp, #-56]
	ldr	sp, [fp, #-60]
	b	.L11
.L26:
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L11
.L46:
	ldr	r3, [fp, #-84]
	ldr	r2, [fp, #-88]
	cmp	r3, #0
	cmpne	r2, #0
	beq	.L20
	ldr	r3, [fp, #-64]
	str	r10, [fp, #-84]
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L2
.L20:
	ldr	r0, [fp, #-68]
	bl	XFS_ERROR
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L51
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L51:
	bl	__stack_chk_fail
.L53:
	.align	2
.L52:
	.word	.LC0
	.word	SYNC_TRYLOCK
	.word	XFS_ICI_RECLAIM_TAG
	.word	XFS_LOOKUP_BATCH
	.word	EFSCORRUPTED
	.size	xfs_reclaim_inodes_ag, .-xfs_reclaim_inodes_ag
	.comm	XFS_LOOKUP_BATCH,4,4
	.comm	XFS_ICI_RECLAIM_TAG,4,4
	.comm	SYNC_TRYLOCK,4,4
	.comm	EFSCORRUPTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
