	.file	"extr_ccaption_dec.c_roll_up.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	roll_up, @function
roll_up:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR CCMODE_TEXT[rip]
	cmp	QWORD PTR [rdi], rax
	je	.L1
	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, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	get_writing_screen@PLT
	mov	esi, DWORD PTR 12[r13]
	mov	rbp, rax
	mov	eax, DWORD PTR 8[r13]
	lea	edi, 1[rax]
	call	FFMIN@PLT
	mov	esi, DWORD PTR 8[r13]
	mov	rdi, QWORD PTR 0[rbp]
	mov	r12d, eax
	mov	eax, DWORD PTR SCREEN_ROWS[rip]
	test	eax, eax
	jle	.L7
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, esi
	sub	eax, r12d
	cmp	eax, ebx
	jge	.L13
	cmp	ebx, esi
	jle	.L4
.L13:
	mov	esi, ebx
	call	UNSET_FLAG@PLT
	mov	esi, DWORD PTR 8[r13]
	mov	rdi, QWORD PTR 0[rbp]
.L4:
	add	ebx, 1
	cmp	DWORD PTR SCREEN_ROWS[rip], ebx
	jg	.L6
.L7:
	xor	ecx, ecx
	test	r12d, r12d
	jg	.L8
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	add	ecx, 1
	mov	esi, DWORD PTR 8[r13]
	mov	rdi, QWORD PTR 0[rbp]
	cmp	r12d, ecx
	je	.L9
.L8:
	test	rdi, rdi
	je	.L9
	sub	esi, r12d
	mov	rax, QWORD PTR 32[rbp]
	mov	edx, DWORD PTR SCREEN_COLUMNS[rip]
	mov	DWORD PTR 12[rsp], ecx
	lea	ebx, [rsi+rcx]
	lea	r8d, 1[rbx]
	movsx	r14, r8d
	mov	DWORD PTR 8[rsp], r8d
	add	r14, 1
	lea	r15, 0[0+r14*4]
	mov	esi, DWORD PTR [rax+r14*4]
	mov	edi, DWORD PTR -4[rax+r15]
	call	memcpy@PLT
	mov	rax, QWORD PTR 24[rbp]
	mov	edx, DWORD PTR SCREEN_COLUMNS[rip]
	mov	esi, DWORD PTR [rax+r14*4]
	mov	edi, DWORD PTR -4[rax+r15]
	call	memcpy@PLT
	mov	rax, QWORD PTR 16[rbp]
	mov	edx, DWORD PTR SCREEN_COLUMNS[rip]
	mov	esi, DWORD PTR [rax+r14*4]
	mov	edi, DWORD PTR -4[rax+r15]
	call	memcpy@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	edx, DWORD PTR SCREEN_COLUMNS[rip]
	mov	esi, DWORD PTR [rax+r14*4]
	mov	edi, DWORD PTR -4[rax+r15]
	call	memcpy@PLT
	mov	rdi, QWORD PTR 0[rbp]
	lea	esi, 2[rbx]
	call	CHECK_FLAG@PLT
	mov	r8d, DWORD PTR 8[rsp]
	mov	ecx, DWORD PTR 12[rsp]
	test	rax, rax
	je	.L10
	mov	rdi, QWORD PTR 0[rbp]
	mov	esi, r8d
	mov	DWORD PTR 8[rsp], ecx
	call	SET_FLAG@PLT
	mov	ecx, DWORD PTR 8[rsp]
	mov	esi, DWORD PTR 8[r13]
	mov	rdi, QWORD PTR 0[rbp]
	add	ecx, 1
	cmp	r12d, ecx
	jne	.L8
.L9:
	add	rsp, 24
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_restore 15
	.cfi_def_cfa_offset 8
	jmp	UNSET_FLAG@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	ret
	.cfi_endproc
.LFE0:
	.size	roll_up, .-roll_up
	.comm	SCREEN_ROWS,4,4
	.comm	SCREEN_COLUMNS,4,4
	.comm	CCMODE_TEXT,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_ccaption_dec.c_roll_up.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	roll_up, %function
roll_up:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L20
	ldr	r2, [r0]
	ldr	r3, [r3]
	cmp	r2, r3
	bxeq	lr
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r8, r0
	bl	get_writing_screen
	mov	r5, r0
	ldmib	r8, {r0, r1}
	add	r0, r0, #1
	bl	FFMIN
	ldr	r6, .L20+4
	mov	r7, r0
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L3
	mov	r4, #0
	ldr	r1, [r8, #4]
	ldr	r0, [r5]
.L5:
	sub	r3, r1, r7
	cmp	r4, r1
	cmple	r3, r4
	blt	.L4
	mov	r1, r4
	bl	UNSET_FLAG
	ldr	r1, [r8, #4]
	ldr	r0, [r5]
.L4:
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L5
.L6:
	cmp	r7, #0
	movgt	r10, #0
	ldrgt	r9, .L20+8
	bgt	.L7
	b	.L8
.L9:
	cmp	r7, r10
	ldr	r0, [r5]
	ldr	r1, [r8, #4]
	beq	.L8
.L7:
	sub	r4, r1, r7
	add	r4, r4, r10
	cmp	r0, #0
	add	r6, r4, #1
	add	r10, r10, #1
	add	r4, r4, #2
	beq	.L8
	ldr	r3, [r5, #16]
	ldr	r2, [r9]
	ldr	r1, [r3, r4, lsl #2]
	ldr	r0, [r3, r6, lsl #2]
	bl	memcpy
	ldr	r3, [r5, #12]
	ldr	r2, [r9]
	ldr	r1, [r3, r4, lsl #2]
	ldr	r0, [r3, r6, lsl #2]
	bl	memcpy
	ldr	r3, [r5, #8]
	ldr	r2, [r9]
	ldr	r1, [r3, r4, lsl #2]
	ldr	r0, [r3, r6, lsl #2]
	bl	memcpy
	ldr	r3, [r5, #4]
	ldr	r2, [r9]
	ldr	r1, [r3, r4, lsl #2]
	ldr	r0, [r3, r6, lsl #2]
	bl	memcpy
	mov	r1, r4
	ldr	r0, [r5]
	bl	CHECK_FLAG
	cmp	r0, #0
	beq	.L9
	mov	r1, r6
	ldr	r0, [r5]
	bl	SET_FLAG
	cmp	r7, r10
	ldr	r0, [r5]
	ldr	r1, [r8, #4]
	bne	.L7
.L8:
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	UNSET_FLAG
.L3:
	ldr	r1, [r8, #4]
	ldr	r0, [r5]
	b	.L6
.L21:
	.align	2
.L20:
	.word	CCMODE_TEXT
	.word	SCREEN_ROWS
	.word	SCREEN_COLUMNS
	.size	roll_up, .-roll_up
	.comm	SCREEN_ROWS,4,4
	.comm	SCREEN_COLUMNS,4,4
	.comm	CCMODE_TEXT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
