	.file	"extr_spa_log_spacemap.c_spa_cleanup_old_sm_logs.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	spa_cleanup_old_sm_logs
	.type	spa_cleanup_old_sm_logs, @function
spa_cleanup_old_sm_logs:
.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, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	lea	r14, 4[rbx]
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	spa_meta_objset@PLT
	mov	edx, DWORD PTR DMU_POOL_LOG_SPACEMAP_ZAP[rip]
	mov	r9, rsp
	mov	esi, DWORD PTR DMU_POOL_DIRECTORY_OBJECT[rip]
	mov	r8d, 1
	mov	ecx, 8
	mov	rdi, rax
	mov	r12, rax
	call	zap_lookup@PLT
	cmp	DWORD PTR ENOENT[rip], eax
	je	.L15
	mov	edi, eax
	call	VERIFY0@PLT
	lea	rdi, 8[rbx]
	call	avl_first@PLT
	mov	rdi, rax
	call	metaslab_unflushed_txg@PLT
	mov	r15, rax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L16:
	cmp	QWORD PTR [rax], r15
	jge	.L1
	mov	edi, DWORD PTR 20[rbp]
	call	ASSERT0@PLT
	mov	rsi, rbp
	mov	rdi, r14
	call	avl_remove@PLT
	mov	esi, DWORD PTR 16[rbp]
	mov	rdx, r13
	mov	rdi, r12
	call	space_map_free_obj@PLT
	mov	rsi, QWORD PTR [rsp]
	mov	rdx, QWORD PTR 0[rbp]
	mov	rcx, r13
	mov	rdi, r12
	call	zap_remove_int@PLT
	mov	edi, eax
	call	VERIFY0@PLT
	mov	rax, QWORD PTR 8[rbp]
	sub	DWORD PTR [rbx], eax
	mov	esi, 24
	mov	rdi, rbp
	call	kmem_free@PLT
.L13:
	mov	rdi, r14
	call	avl_first@PLT
	mov	rbp, rax
	test	rax, rax
	jne	.L16
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L15:
	.cfi_restore_state
	mov	rdi, r14
	call	avl_is_empty@PLT
	mov	edi, eax
	call	ASSERT@PLT
	jmp	.L1
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	spa_cleanup_old_sm_logs, .-spa_cleanup_old_sm_logs
	.comm	ENOENT,4,4
	.comm	DMU_POOL_LOG_SPACEMAP_ZAP,4,4
	.comm	DMU_POOL_DIRECTORY_OBJECT,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_spa_log_spacemap.c_spa_cleanup_old_sm_logs.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	spa_cleanup_old_sm_logs
	.syntax unified
	.arm
	.fpu softvfp
	.type	spa_cleanup_old_sm_logs, %function
spa_cleanup_old_sm_logs:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L16
	sub	sp, sp, #20
	mov	r7, r1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r5, r0
	bl	spa_meta_objset
	mov	ip, #1
	ldr	r2, .L16+4
	ldr	r1, .L16+8
	str	ip, [sp]
	add	r3, sp, #8
	ldr	r2, [r2]
	ldr	r1, [r1]
	str	r3, [sp, #4]
	mov	r3, #4
	mov	r6, r0
	bl	zap_lookup
	ldr	r3, .L16+12
	add	r8, r5, #4
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L14
	bl	VERIFY0
	add	r0, r5, #8
	bl	avl_first
	bl	metaslab_unflushed_txg
	mov	r9, r0
	mov	r0, r8
	bl	avl_first
	subs	r4, r0, #0
	bne	.L4
	b	.L1
.L6:
	ldr	r0, [r4, #12]
	bl	ASSERT0
	mov	r1, r4
	mov	r0, r8
	bl	avl_remove
	ldr	r1, [r4, #8]
	mov	r2, r7
	mov	r0, r6
	bl	space_map_free_obj
	ldr	r2, [r4]
	mov	r3, r7
	ldr	r1, [sp, #8]
	mov	r0, r6
	bl	zap_remove_int
	bl	VERIFY0
	ldr	r2, [r4, #4]
	ldr	r3, [r5]
	mov	r0, r4
	sub	r3, r3, r2
	mov	r1, #16
	str	r3, [r5]
	bl	kmem_free
	mov	r0, r8
	bl	avl_first
	subs	r4, r0, #0
	beq	.L1
.L4:
	ldr	r3, [r4]
	cmp	r3, r9
	blt	.L6
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L14:
	mov	r0, r8
	bl	avl_is_empty
	bl	ASSERT
	b	.L1
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	DMU_POOL_LOG_SPACEMAP_ZAP
	.word	DMU_POOL_DIRECTORY_OBJECT
	.word	ENOENT
	.size	spa_cleanup_old_sm_logs, .-spa_cleanup_old_sm_logs
	.comm	ENOENT,4,4
	.comm	DMU_POOL_LOG_SPACEMAP_ZAP,4,4
	.comm	DMU_POOL_DIRECTORY_OBJECT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
