	.file	"extr_stage.c_stage_update.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Failed to apply chunk"
.LC1:
	.string	"Failed to update files"
.LC2:
	.string	"Failed to update file"
	.text
	.p2align 4
	.type	stage_update, @function
stage_update:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	eax, eax
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	call	is_initial_commit@PLT
	test	eax, eax
	jne	.L2
	mov	rsi, QWORD PTR LINE_STAT_UNTRACKED[rip]
	cmp	QWORD PTR stage_line_type[rip], rsi
	jne	.L12
	mov	eax, DWORD PTR stage_status[rip]
	test	eax, eax
	je	.L13
.L8:
	lea	rdi, stage_status[rip]
	call	status_update_file@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L14
.L9:
	mov	r12d, 1
.L1:
	mov	eax, r12d
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	edx, DWORD PTR LINE_DIFF_CHUNK[rip]
	mov	rsi, r13
	mov	rdi, rbp
	call	find_prev_line_by_type@PLT
	mov	rsi, rax
	test	rax, rax
	jne	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR stage_status[rip]
	mov	rsi, QWORD PTR stage_line_type[rip]
	test	eax, eax
	jne	.L8
.L13:
	mov	rdi, rbp
	call	stage_update_files@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L9
	lea	rdi, .LC1[rip]
	call	report@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	test	r12d, r12d
	mov	eax, 0
	mov	rdi, rbp
	cmove	r13, rax
	xor	ecx, ecx
	mov	rdx, r13
	call	stage_apply_chunk@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L9
	lea	rdi, .LC0[rip]
	call	report@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	lea	rdi, .LC2[rip]
	call	report@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	stage_update, .-stage_update
	.comm	stage_status,4,4
	.comm	stage_line_type,8,8
	.comm	LINE_STAT_UNTRACKED,8,8
	.comm	LINE_DIFF_CHUNK,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_stage.c_stage_update.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to apply chunk\000"
	.align	2
.LC1:
	.ascii	"Failed to update files\000"
	.align	2
.LC2:
	.ascii	"Failed to update file\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stage_update, %function
stage_update:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	mov	r7, r1
	mov	r6, r2
	bl	is_initial_commit
	subs	r4, r0, #0
	bne	.L2
	ldr	r3, .L15
	ldr	r8, .L15+4
	ldr	r1, [r3]
	ldr	r3, [r8]
	cmp	r3, r1
	bne	.L12
.L3:
	ldr	r0, .L15+8
	ldr	r3, [r0]
	cmp	r3, #0
	beq	.L13
.L8:
	bl	status_update_file
	subs	r4, r0, #0
	beq	.L14
.L9:
	mov	r4, #1
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r3, .L15+4
	ldr	r0, .L15+8
	ldr	r1, [r3]
	ldr	r3, [r0]
	cmp	r3, #0
	bne	.L8
.L13:
	mov	r0, r5
	bl	stage_update_files
	subs	r4, r0, #0
	bne	.L9
	ldr	r0, .L15+12
	bl	report
	b	.L1
.L12:
	ldr	r3, .L15+16
	mov	r1, r7
	mov	r0, r5
	ldr	r2, [r3]
	bl	find_prev_line_by_type
	subs	r1, r0, #0
	ldreq	r1, [r8]
	beq	.L3
	cmp	r6, #0
	movne	r2, r7
	moveq	r2, #0
	mov	r3, r4
	mov	r0, r5
	bl	stage_apply_chunk
	subs	r4, r0, #0
	bne	.L9
	ldr	r0, .L15+20
	bl	report
	b	.L1
.L14:
	ldr	r0, .L15+24
	bl	report
	b	.L1
.L16:
	.align	2
.L15:
	.word	LINE_STAT_UNTRACKED
	.word	stage_line_type
	.word	stage_status
	.word	.LC1
	.word	LINE_DIFF_CHUNK
	.word	.LC0
	.word	.LC2
	.size	stage_update, .-stage_update
	.comm	stage_status,4,4
	.comm	stage_line_type,4,4
	.comm	LINE_STAT_UNTRACKED,4,4
	.comm	LINE_DIFF_CHUNK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
