	.file	"extr_tnc.c_insert_zbranch.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	insert_zbranch, @function
insert_zbranch:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, edx
	call	ubifs_zn_dirty@PLT
	mov	edi, eax
	call	ubifs_assert@PLT
	cmp	QWORD PTR 16[rbp], 0
	je	.L2
	movsx	rax, DWORD PTR 0[rbp]
	mov	rdi, QWORD PTR 8[rbp]
	mov	r8, rax
	cmp	ebx, eax
	jge	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rcx, QWORD PTR -8[rdi+rax*8]
	mov	QWORD PTR [rdi+rax*8], rcx
	test	rcx, rcx
	je	.L6
	mov	DWORD PTR [rcx], eax
.L6:
	sub	rax, 1
	cmp	ebx, eax
	jl	.L7
.L8:
	mov	rax, QWORD PTR [r12]
	test	rax, rax
	je	.L5
	mov	DWORD PTR [rax], ebx
.L5:
	mov	rdx, QWORD PTR [r12]
	movsx	rax, ebx
	add	r8d, 1
	mov	QWORD PTR [rdi+rax*8], rdx
	mov	DWORD PTR 0[rbp], r8d
	test	ebx, ebx
	jne	.L1
	mov	DWORD PTR 4[rbp], 1
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	r8d, DWORD PTR 0[rbp]
	mov	rdi, QWORD PTR 8[rbp]
	cmp	r8d, ebx
	jle	.L5
	movsx	rdx, r8d
	sal	rdx, 3
	lea	rcx, -8[rdi+rdx]
	lea	rax, [rdi+rdx]
	mov	edx, ebx
	not	edx
	add	edx, r8d
	sal	rdx, 3
	sub	rcx, rdx
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdx, QWORD PTR -8[rax]
	sub	rax, 8
	mov	QWORD PTR 8[rax], rdx
	cmp	rax, rcx
	jne	.L9
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	insert_zbranch, .-insert_zbranch
	.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_tnc.c_insert_zbranch.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert_zbranch, %function
insert_zbranch:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	mov	r5, r2
	mov	r6, r1
	bl	ubifs_zn_dirty
	bl	ubifs_assert
	ldr	r3, [r4, #12]
	ldr	r2, [r4]
	cmp	r3, #0
	ldr	r0, [r4, #8]
	beq	.L2
	cmp	r5, r2
	movlt	ip, r2
	addlt	r3, r0, r2, lsl #2
	addlt	r1, r0, r5, lsl #2
	bge	.L8
.L7:
	ldr	lr, [r3, #-4]
	str	lr, [r3]
	ldr	lr, [r3], #-4
	cmp	lr, #0
	strne	ip, [lr]
	cmp	r1, r3
	sub	ip, ip, #1
	bne	.L7
.L8:
	ldr	r3, [r6]
	cmp	r3, #0
	strne	r5, [r3]
.L5:
	ldr	r3, [r6]
	cmp	r5, #0
	str	r3, [r0, r5, lsl #2]
	moveq	r3, #1
	add	r2, r2, #1
	str	r2, [r4]
	streq	r3, [r4, #4]
	pop	{r4, r5, r6, pc}
.L2:
	cmp	r2, r5
	ble	.L5
	add	r3, r0, r2, lsl #2
	add	r1, r0, r5, lsl #2
.L9:
	ldr	ip, [r3, #-4]
	str	ip, [r3], #-4
	cmp	r3, r1
	bne	.L9
	b	.L5
	.size	insert_zbranch, .-insert_zbranch
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
