	.file	"extr_mmp.c_mmp_next_leaf.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mmp_next_leaf, @function
mmp_next_leaf:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rdi
	add	rdi, 24
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	lea	rbx, 32[r14]
	call	MUTEX_HELD@PLT
	mov	edi, eax
	call	ASSERT@PLT
	mov	edx, DWORD PTR RW_READER[rip]
	mov	esi, DWORD PTR SCL_STATE[rip]
	mov	rdi, r14
	call	spa_config_held@PLT
	mov	edi, eax
	call	ASSERT@PLT
	mov	rdi, rbx
	call	list_link_active@PLT
	xor	edi, edi
	cmp	QWORD PTR B_TRUE[rip], rax
	sete	dil
	call	ASSERT@PLT
	mov	rdi, rbx
	call	list_is_empty@PLT
	xor	edi, edi
	test	eax, eax
	sete	dil
	call	ASSERT@PLT
	mov	rax, QWORD PTR [r14]
	cmp	QWORD PTR 8[r14], rax
	jne	.L2
	mov	r13, QWORD PTR 16[r14]
	test	r13, r13
	je	.L14
.L4:
	mov	rbp, r13
	xor	r12d, r12d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L17:
	or	r12d, DWORD PTR MMP_FAIL_NOT_WRITABLE[rip]
	cmp	r13, rbp
	je	.L15
.L10:
	mov	rsi, rbp
	mov	rdi, rbx
	call	list_next@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L16
.L5:
	mov	rdi, rbp
	call	vdev_writeable@PLT
	test	eax, eax
	je	.L17
	cmp	QWORD PTR 0[rbp], 0
	je	.L8
	or	r12d, DWORD PTR MMP_FAIL_WRITE_PENDING[rip]
	cmp	r13, rbp
	jne	.L10
.L15:
	mov	edi, r12d
	call	ASSERT@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	rdi, rbx
	call	list_head@PLT
	mov	rbp, rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdi, rbx
	call	list_head@PLT
	mov	QWORD PTR 16[r14], rax
	mov	r13, rax
	mov	rax, QWORD PTR [r14]
	mov	QWORD PTR 8[r14], rax
	test	r13, r13
	jne	.L4
.L14:
	mov	rdi, rbx
	call	list_head@PLT
	mov	r13, rax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	xor	r12d, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	QWORD PTR 16[r14], rbp
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	mmp_next_leaf, .-mmp_next_leaf
	.comm	SCL_STATE,4,4
	.comm	RW_READER,4,4
	.comm	MMP_FAIL_WRITE_PENDING,4,4
	.comm	MMP_FAIL_NOT_WRITABLE,4,4
	.comm	B_TRUE,8,8
	.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_mmp.c_mmp_next_leaf.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mmp_next_leaf, %function
mmp_next_leaf:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r8, r0
	add	r0, r0, #12
	bl	MUTEX_HELD
	bl	ASSERT
	ldr	r3, .L18
	ldr	r2, .L18+4
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r0, r8
	bl	spa_config_held
	add	r6, r8, #16
	bl	ASSERT
	mov	r0, r6
	bl	list_link_active
	ldr	r3, .L18+8
	ldr	r3, [r3]
	sub	r0, r3, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ASSERT
	mov	r0, r6
	bl	list_is_empty
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ASSERT
	ldr	r2, [r8, #4]
	ldr	r3, [r8]
	cmp	r2, r3
	bne	.L2
	ldr	r7, [r8, #8]
	cmp	r7, #0
	beq	.L14
.L4:
	mov	r4, r7
	mov	r5, #0
	ldr	r10, .L18+12
	ldr	r9, .L18+16
	b	.L10
.L17:
	ldr	r3, [r9]
	cmp	r7, r4
	orr	r5, r5, r3
	beq	.L15
.L10:
	mov	r1, r4
	mov	r0, r6
	bl	list_next
	subs	r4, r0, #0
	beq	.L16
.L5:
	mov	r0, r4
	bl	vdev_writeable
	cmp	r0, #0
	beq	.L17
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [r10]
	cmp	r7, r4
	orr	r5, r5, r3
	bne	.L10
.L15:
	mov	r0, r5
	bl	ASSERT
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L16:
	mov	r0, r6
	bl	list_head
	mov	r4, r0
	b	.L5
.L2:
	mov	r0, r6
	bl	list_head
	mov	r7, r0
	ldr	r3, [r8]
	cmp	r7, #0
	stmib	r8, {r3, r7}
	bne	.L4
.L14:
	mov	r0, r6
	bl	list_head
	mov	r7, r0
	b	.L4
.L8:
	mov	r5, r3
	str	r4, [r8, #8]
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L19:
	.align	2
.L18:
	.word	SCL_STATE
	.word	RW_READER
	.word	B_TRUE
	.word	MMP_FAIL_WRITE_PENDING
	.word	MMP_FAIL_NOT_WRITABLE
	.size	mmp_next_leaf, .-mmp_next_leaf
	.comm	SCL_STATE,4,4
	.comm	RW_READER,4,4
	.comm	MMP_FAIL_WRITE_PENDING,4,4
	.comm	MMP_FAIL_NOT_WRITABLE,4,4
	.comm	B_TRUE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
