	.file	"extr_iova.c_split_and_remove_iova.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	split_and_remove_iova
	.type	split_and_remove_iova, @function
split_and_remove_iova:
.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
	mov	r12, rcx
	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
	xor	esi, esi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	spin_lock_irqsave@PLT
	mov	rdi, QWORD PTR [rbx]
	cmp	rdi, r13
	jb	.L23
	mov	rsi, QWORD PTR 8[rbx]
	cmp	r12, rsi
	jnb	.L24
	lea	rdi, 1[r12]
	call	alloc_and_init_iova@PLT
	mov	r14, rax
	test	rax, rax
	je	.L25
	mov	rsi, rbx
	mov	rdi, rbp
	lea	r15, 4[rbp]
	call	__cached_rbnode_delete_update@PLT
	lea	rdi, 16[rbx]
	mov	rsi, r15
	call	rb_erase@PLT
.L7:
	xor	edx, edx
	mov	rsi, r14
	mov	rdi, r15
	call	iova_insert_rbtree@PLT
	mov	QWORD PTR 8[rbx], r12
.L8:
	xor	esi, esi
	mov	rdi, rbp
	mov	r14, rbx
	call	spin_unlock_irqrestore@PLT
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r14
	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
.L24:
	.cfi_restore_state
	mov	rsi, rbx
	mov	rdi, rbp
	call	__cached_rbnode_delete_update@PLT
	lea	rsi, 4[rbp]
	lea	rdi, 16[rbx]
	call	rb_erase@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rsi, -1[r13]
	call	alloc_and_init_iova@PLT
	mov	r8, rax
	test	rax, rax
	je	.L26
	mov	rsi, QWORD PTR 8[rbx]
	cmp	r12, rsi
	jb	.L27
	mov	rsi, rbx
	mov	rdi, rbp
	lea	r12, 4[rbp]
	mov	QWORD PTR 8[rsp], r8
	call	__cached_rbnode_delete_update@PLT
	lea	rdi, 16[rbx]
	mov	rsi, r12
	call	rb_erase@PLT
	mov	r8, QWORD PTR 8[rsp]
	xor	edx, edx
	mov	rdi, r12
	mov	rsi, r8
	call	iova_insert_rbtree@PLT
	mov	QWORD PTR [rbx], r13
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L26:
	xor	esi, esi
	mov	rdi, rbp
	xor	r14d, r14d
	call	spin_unlock_irqrestore@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L27:
	lea	rdi, 1[r12]
	mov	QWORD PTR 8[rsp], rax
	call	alloc_and_init_iova@PLT
	mov	r8, QWORD PTR 8[rsp]
	test	rax, rax
	mov	r14, rax
	je	.L28
	mov	rsi, rbx
	mov	rdi, rbp
	lea	r15, 4[rbp]
	mov	QWORD PTR 8[rsp], r8
	call	__cached_rbnode_delete_update@PLT
	lea	rdi, 16[rbx]
	mov	rsi, r15
	call	rb_erase@PLT
	mov	r8, QWORD PTR 8[rsp]
	xor	edx, edx
	mov	rdi, r15
	mov	rsi, r8
	call	iova_insert_rbtree@PLT
	mov	QWORD PTR [rbx], r13
	jmp	.L7
.L28:
.L6:
	endbr64
	mov	rdi, rbp
	xor	esi, esi
	mov	QWORD PTR 8[rsp], r8
	call	spin_unlock_irqrestore@PLT
	mov	r8, QWORD PTR 8[rsp]
	mov	rdi, r8
	call	free_iova_mem@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	xor	esi, esi
	mov	rdi, rbp
	call	spin_unlock_irqrestore@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	split_and_remove_iova, .-split_and_remove_iova
	.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_iova.c_split_and_remove_iova.c"
	.text
	.align	2
	.global	split_and_remove_iova
	.syntax unified
	.arm
	.fpu softvfp
	.type	split_and_remove_iova, %function
split_and_remove_iova:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r1
	mov	r8, r2
	mov	r1, #0
	mov	r7, r3
	mov	r5, r0
	bl	spin_lock_irqsave
	ldr	r0, [r4]
	cmp	r0, r8
	bcc	.L23
	ldr	r1, [r4, #4]
	cmp	r7, r1
	bcs	.L24
	add	r0, r7, #1
	bl	alloc_and_init_iova
	subs	r6, r0, #0
	beq	.L25
	mov	r1, r4
	mov	r0, r5
	add	r9, r5, #4
	bl	__cached_rbnode_delete_update
	mov	r1, r9
	add	r0, r4, #8
	bl	rb_erase
.L7:
	mov	r1, r6
	mov	r0, r9
	mov	r2, #0
	bl	iova_insert_rbtree
	str	r7, [r4, #4]
.L8:
	mov	r0, r5
	mov	r1, #0
	mov	r6, r4
	bl	spin_unlock_irqrestore
.L1:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L24:
	mov	r1, r4
	mov	r0, r5
	bl	__cached_rbnode_delete_update
	add	r1, r5, #4
	add	r0, r4, #8
	bl	rb_erase
	b	.L8
.L23:
	sub	r1, r8, #1
	bl	alloc_and_init_iova
	subs	r10, r0, #0
	beq	.L26
	ldr	r1, [r4, #4]
	cmp	r7, r1
	bcc	.L27
	mov	r1, r4
	add	r6, r5, #4
	mov	r0, r5
	bl	__cached_rbnode_delete_update
	mov	r1, r6
	add	r0, r4, #8
	bl	rb_erase
	mov	r0, r6
	mov	r1, r10
	mov	r2, #0
	bl	iova_insert_rbtree
	str	r8, [r4]
	b	.L8
.L26:
	mov	r0, r5
	mov	r1, #0
	mov	r6, r10
	bl	spin_unlock_irqrestore
	b	.L1
.L27:
	add	r0, r7, #1
	bl	alloc_and_init_iova
	subs	r6, r0, #0
	beq	.L28
	mov	r1, r4
	add	r9, r5, #4
	mov	r0, r5
	bl	__cached_rbnode_delete_update
	mov	r1, r9
	add	r0, r4, #8
	bl	rb_erase
	mov	r1, r10
	mov	r0, r9
	mov	r2, #0
	bl	iova_insert_rbtree
	str	r8, [r4]
	b	.L7
.L28:
.L6:
	mov	r0, r5
	mov	r1, #0
	bl	spin_unlock_irqrestore
	mov	r0, r10
	bl	free_iova_mem
	b	.L1
.L25:
	mov	r0, r5
	mov	r1, #0
	bl	spin_unlock_irqrestore
	b	.L1
	.size	split_and_remove_iova, .-split_and_remove_iova
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
