	.file	"extr_tnc.c_ubifs_tnc_replace.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"old LEB %d:%d, new LEB %d:%d, len %d, key "
	.align 8
.LC1:
	.string	"rc returned %d, znode %p, n %d, LEB %d:%d"
	.text
	.p2align 4
	.globl	ubifs_tnc_replace
	.type	ubifs_tnc_replace, @function
ubifs_tnc_replace:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, r9d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, r8d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edx
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	DWORD PTR 28[rsp], r9d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	mutex_lock@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 136
	mov	r9d, r15d
	mov	r8d, r12d
	mov	eax, DWORD PTR 136[rsp]
	mov	ecx, r13d
	mov	edx, ebx
	mov	rdi, rbp
	lea	rsi, .LC0[rip]
	push	rax
	.cfi_def_cfa_offset 144
	call	dbg_tnck@PLT
	lea	rcx, 60[rsp]
	mov	rsi, rbp
	mov	rdi, r14
	lea	rdx, 64[rsp]
	mov	QWORD PTR 32[rsp], rcx
	mov	QWORD PTR 24[rsp], rdx
	call	lookup_level0_dirty@PLT
	pop	rdx
	.cfi_def_cfa_offset 136
	pop	rcx
	.cfi_def_cfa_offset 128
	mov	r15d, eax
	test	eax, eax
	js	.L2
	cmp	eax, 1
	mov	rdx, QWORD PTR 8[rsp]
	mov	rcx, QWORD PTR 16[rsp]
	je	.L26
	test	eax, eax
	je	.L8
.L5:
	xor	esi, esi
	mov	rdi, r14
	call	dbg_check_tnc@PLT
	mov	r15d, eax
.L2:
	mov	rdi, r14
	call	mutex_unlock@PLT
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	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
.L26:
	.cfi_restore_state
	movsx	rax, DWORD PTR 44[rsp]
	lea	rsi, [rax+rax*2]
	mov	rax, QWORD PTR 48[rsp]
	mov	rax, QWORD PTR [rax]
	lea	r8, [rax+rsi*4]
	cmp	DWORD PTR [r8], ebx
	jne	.L4
	cmp	DWORD PTR 4[r8], r13d
	je	.L28
.L4:
	mov	rsi, rbp
	mov	rdi, r14
	mov	QWORD PTR 16[rsp], rdx
	mov	QWORD PTR 8[rsp], rcx
	call	is_hash_key@PLT
	mov	rcx, QWORD PTR 8[rsp]
	mov	rdx, QWORD PTR 16[rsp]
	test	rax, rax
	jne	.L6
.L8:
	mov	edx, DWORD PTR 128[rsp]
	mov	esi, r12d
	mov	rdi, r14
	call	ubifs_add_dirt@PLT
	mov	r15d, eax
	test	eax, eax
	jne	.L2
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r9d, r13d
	mov	r8d, ebx
	mov	rsi, rbp
	mov	rdi, r14
	call	resolve_collision_directly@PLT
	mov	ecx, DWORD PTR 44[rsp]
	mov	r9d, r13d
	mov	r8d, ebx
	mov	rdx, QWORD PTR 48[rsp]
	mov	r15d, eax
	mov	esi, eax
	lea	rdi, .LC1[rip]
	call	dbg_tnc@PLT
	test	r15d, r15d
	js	.L2
	je	.L8
	mov	rsi, QWORD PTR 48[rsp]
	cmp	QWORD PTR 8[rsi], 0
	jne	.L9
	mov	rdi, rsi
	call	ubifs_zn_dirty@PLT
	test	eax, eax
	jne	.L10
	mov	rsi, QWORD PTR 48[rsp]
.L9:
	mov	rdi, r14
	call	dirty_cow_bottom_up@PLT
	mov	rdi, rax
	mov	QWORD PTR 48[rsp], rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L29
.L10:
	movsx	rax, DWORD PTR 44[rsp]
	lea	rdx, [rax+rax*2]
	mov	rax, QWORD PTR 48[rsp]
	mov	rax, QWORD PTR [rax]
	lea	rbx, [rax+rdx*4]
	mov	rdi, rbx
	call	lnc_free@PLT
	mov	edx, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR [rbx]
	mov	rdi, r14
	call	ubifs_add_dirt@PLT
	mov	r15d, eax
	test	eax, eax
	jne	.L2
	mov	eax, DWORD PTR 28[rsp]
	mov	DWORD PTR [rbx], r12d
	mov	DWORD PTR 4[rbx], eax
	mov	eax, DWORD PTR 128[rsp]
	mov	DWORD PTR 8[rbx], eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L28:
	mov	rdi, r8
	mov	QWORD PTR 8[rsp], r8
	call	lnc_free@PLT
	mov	r8, QWORD PTR 8[rsp]
	mov	rdi, r14
	mov	edx, DWORD PTR 8[r8]
	mov	esi, DWORD PTR [r8]
	call	ubifs_add_dirt@PLT
	mov	r15d, eax
	test	eax, eax
	jne	.L2
	mov	r8, QWORD PTR 8[rsp]
	mov	eax, DWORD PTR 28[rsp]
	mov	DWORD PTR 4[r8], eax
	mov	eax, DWORD PTR 128[rsp]
	mov	DWORD PTR [r8], r12d
	mov	DWORD PTR 8[r8], eax
	jmp	.L5
.L29:
	mov	rdi, QWORD PTR 48[rsp]
	call	PTR_ERR@PLT
	mov	r15d, eax
	jmp	.L2
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ubifs_tnc_replace, .-ubifs_tnc_replace
	.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_ubifs_tnc_replace.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"old LEB %d:%d, new LEB %d:%d, len %d, key \000"
	.align	2
.LC1:
	.ascii	"rc returned %d, znode %p, n %d, LEB %d:%d\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ubifs_tnc_replace
	.syntax unified
	.arm
	.fpu softvfp
	.type	ubifs_tnc_replace, %function
ubifs_tnc_replace:
	@ args = 12, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r1
	mov	r7, r2
	mov	r8, r3
	mov	r5, r0
	ldr	r3, .L27
	sub	sp, sp, #44
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	ldr	r9, [sp, #80]
	ldr	r10, [sp, #88]
	bl	mutex_lock
	ldr	r3, [sp, #84]
	mov	r2, r7
	ldr	r1, .L27+4
	str	r3, [sp, #4]
	mov	r0, r6
	mov	r3, r8
	str	r10, [sp, #8]
	str	r9, [sp]
	bl	dbg_tnck
	mov	r1, r6
	mov	r0, r5
	add	r3, sp, #28
	add	r2, sp, #32
	bl	lookup_level0_dirty
	subs	r4, r0, #0
	blt	.L2
	cmp	r4, #1
	beq	.L23
	cmp	r4, #0
	beq	.L8
.L5:
	mov	r1, #0
	mov	r0, r5
	bl	dbg_check_tnc
	mov	r4, r0
.L2:
	mov	r0, r5
	bl	mutex_unlock
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	mov	r0, r4
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L23:
	ldr	r3, [sp, #32]
	ldr	r2, [sp, #28]
	ldr	fp, [r3]
	add	r2, r2, r2, lsl #1
	lsl	r3, r2, #2
	ldr	r1, [fp, r3]
	add	r2, fp, r2, lsl #2
	cmp	r1, r7
	mov	r0, r2
	bne	.L4
	ldr	r2, [r2, #4]
	cmp	r2, r8
	beq	.L25
.L4:
	mov	r1, r6
	mov	r0, r5
	bl	is_hash_key
	cmp	r0, #0
	bne	.L6
.L8:
	mov	r2, r10
	mov	r1, r9
	mov	r0, r5
	bl	ubifs_add_dirt
	subs	r4, r0, #0
	bne	.L2
	b	.L5
.L6:
	mov	r1, r6
	add	r3, sp, #28
	add	r2, sp, #32
	mov	r0, r5
	stm	sp, {r7, r8}
	bl	resolve_collision_directly
	mov	r4, r0
	mov	r1, r0
	stm	sp, {r7, r8}
	ldr	r3, [sp, #28]
	ldr	r2, [sp, #32]
	ldr	r0, .L27+8
	bl	dbg_tnc
	cmp	r4, #0
	blt	.L2
	beq	.L8
	ldr	r1, [sp, #32]
	ldr	r3, [r1, #4]
	cmp	r3, #0
	bne	.L9
	mov	r0, r1
	bl	ubifs_zn_dirty
	cmp	r0, #0
	bne	.L10
	ldr	r1, [sp, #32]
.L9:
	mov	r0, r5
	bl	dirty_cow_bottom_up
	str	r0, [sp, #32]
	bl	IS_ERR
	cmp	r0, #0
	bne	.L26
.L10:
	ldr	r2, [sp, #32]
	ldr	r3, [sp, #28]
	ldr	r6, [r2]
	add	r3, r3, r3, lsl #1
	add	r8, r6, r3, lsl #2
	lsl	r7, r3, #2
	mov	r0, r8
	bl	lnc_free
	mov	r0, r5
	ldr	r2, [r8, #8]
	ldr	r1, [r6, r7]
	bl	ubifs_add_dirt
	subs	r4, r0, #0
	bne	.L2
	ldr	r3, [sp, #84]
	str	r9, [r6, r7]
	stmib	r8, {r3, r10}
	b	.L5
.L25:
	mov	r6, r0
	str	r3, [sp, #20]
	bl	lnc_free
	ldr	r3, [sp, #20]
	mov	r0, r5
	ldr	r2, [r6, #8]
	ldr	r1, [fp, r3]
	bl	ubifs_add_dirt
	subs	r4, r0, #0
	bne	.L2
	ldr	r3, [sp, #20]
	str	r9, [fp, r3]
	ldr	r3, [sp, #84]
	stmib	r6, {r3, r10}
	b	.L5
.L26:
	ldr	r0, [sp, #32]
	bl	PTR_ERR
	mov	r4, r0
	b	.L2
.L24:
	bl	__stack_chk_fail
.L28:
	.align	2
.L27:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	ubifs_tnc_replace, .-ubifs_tnc_replace
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
