	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function roll_up
_roll_up:                               ## @roll_up
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	_CCMODE_TEXT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %r14
	callq	_get_writing_screen
	movq	%rax, %r12
	movl	8(%r14), %edi
	movl	12(%r14), %esi
	incl	%edi
	callq	_FFMIN
	movl	%eax, %r15d
	movq	_SCREEN_ROWS@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_7
## %bb.2:
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12), %rdi
	movl	%ebx, %esi
	callq	_UNSET_FLAG
	movl	(%r13), %eax
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	cmpl	%eax, %ebx
	jge	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r14), %ecx
	cmpl	%ecx, %ebx
	jg	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	subl	%r15d, %ecx
	cmpl	%ecx, %ebx
	jg	LBB0_6
	jmp	LBB0_5
LBB0_7:
	testl	%r15d, %r15d
	jle	LBB0_13
## %bb.8:
	movl	$1, %r13d
	subl	%r15d, %r13d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	incl	%r13d
	cmpl	$1, %r13d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r12)
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	8(%r14), %eax
	leal	(%rax,%r13), %edx
	movq	32(%r12), %rcx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movslq	%edx, %r14
	movl	(%rcx,%r14,4), %edi
	leal	1(%r13,%rax), %eax
	movslq	%eax, %rbx
	movl	(%rcx,%rbx,4), %esi
	movq	_SCREEN_COLUMNS@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	callq	_memcpy
	movq	24(%r12), %rax
	movl	(%rax,%r14,4), %edi
	movl	(%rax,%rbx,4), %esi
	movl	(%r15), %edx
	callq	_memcpy
	movq	16(%r12), %rax
	movl	(%rax,%r14,4), %edi
	movl	(%rax,%rbx,4), %esi
	movl	(%r15), %edx
	callq	_memcpy
	movq	8(%r12), %rax
	movl	(%rax,%r14,4), %edi
	movl	(%rax,%rbx,4), %esi
	movl	(%r15), %edx
	callq	_memcpy
	movq	(%r12), %rdi
	movl	%ebx, %esi
	callq	_CHECK_FLAG
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r12), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_SET_FLAG
	jmp	LBB0_12
LBB0_13:
	movq	(%r12), %rdi
	movl	8(%r14), %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_UNSET_FLAG                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CCMODE_TEXT,8,3                ## @CCMODE_TEXT
	.comm	_SCREEN_ROWS,4,2                ## @SCREEN_ROWS
	.comm	_SCREEN_COLUMNS,4,2             ## @SCREEN_COLUMNS
	.no_dead_strip	_roll_up
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function roll_up
_roll_up:                               ; @roll_up
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CCMODE_TEXT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CCMODE_TEXT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
	bl	_get_writing_screen
	mov	x20, x0
	ldp	w8, w1, [x19, #8]
	add	w0, w8, #1
	bl	_FFMIN
	mov	x21, x0
Lloh3:
	adrp	x23, _SCREEN_ROWS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SCREEN_ROWS@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	w22, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w22, w22, #1
	cmp	w22, w8
	b.ge	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x19, #8]
	sub	w10, w9, w21
	cmp	w22, w9
	ccmp	w22, w10, #4, le
	b.gt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x20]
	mov	x1, x22
	bl	_UNSET_FLAG
	ldr	w8, [x23]
	b	LBB0_4
LBB0_7:
	cmp	w21, #1
	b.lt	LBB0_13
; %bb.8:
	mov	w8, #1
	sub	w23, w8, w21
Lloh5:
	adrp	x24, _SCREEN_COLUMNS@GOTPAGE
Lloh6:
	ldr	x24, [x24, _SCREEN_COLUMNS@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w23, w23, #1
	cmp	w23, #1
	b.eq	LBB0_13
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	cbz	x8, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x19, #8]
	add	w21, w23, w8
	ldr	x8, [x20, #32]
	sbfiz	x25, x21, #2, #32
	ldr	w0, [x8, x25]
	add	w22, w21, #1
	sbfiz	x26, x22, #2, #32
	ldr	w1, [x8, x26]
	ldr	w2, [x24]
	bl	_memcpy
	ldr	x8, [x20, #24]
	ldr	w0, [x8, x25]
	ldr	w1, [x8, x26]
	ldr	w2, [x24]
	bl	_memcpy
	ldr	x8, [x20, #16]
	ldr	w0, [x8, x25]
	ldr	w1, [x8, x26]
	ldr	w2, [x24]
	bl	_memcpy
	ldr	x8, [x20, #8]
	ldr	w0, [x8, x25]
	ldr	w1, [x8, x26]
	ldr	w2, [x24]
	bl	_memcpy
	ldr	x0, [x20]
	mov	x1, x22
	bl	_CHECK_FLAG
	cbz	x0, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x0, [x20]
	mov	x1, x21
	bl	_SET_FLAG
	b	LBB0_9
LBB0_13:
	ldr	x0, [x20]
	ldr	w1, [x19, #8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_UNSET_FLAG
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_CCMODE_TEXT,8,3                ; @CCMODE_TEXT
	.comm	_SCREEN_ROWS,4,2                ; @SCREEN_ROWS
	.comm	_SCREEN_COLUMNS,4,2             ; @SCREEN_COLUMNS
	.no_dead_strip	_roll_up
.subsections_via_symbols
