	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scroll_next
_scroll_next:                           ## @scroll_next
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movslq	(%rcx), %rax
	movq	%r8, -104(%rbp)                 ## 8-byte Spill
	movl	(%r8), %r13d
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rax,2), %rax
	movl	16(%rsi,%rax,8), %esi
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	20(%r15,%rax,8), %edi
	callq	_MIN
	leal	(%rbx,%r13), %r12d
	testl	%ebx, %ebx
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	js	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	callq	_form_limit
	cmpl	%eax, %r12d
	setg	%al
	jmp	LBB0_3
LBB0_1:
	cmpl	%r13d, %eax
	cmovnel	%r13d, %r12d
	movl	%r12d, %eax
	shrl	$31, %eax
LBB0_3:
	movq	_FALSE@GOTPCREL(%rip), %rcx
	testb	%al, %al
	je	LBB0_5
## %bb.4:
	movl	(%rcx), %r14d
LBB0_5:
	testl	%r14d, %r14d
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	je	LBB0_18
## %bb.6:
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	cmpq	$0, (%rdx)
	je	LBB0_12
## %bb.7:
	leaq	24(%rdx), %r15
	xorl	%r13d, %r13d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	incl	%r13d
	cmpq	$0, (%r15)
	leaq	24(%r15), %r15
	je	LBB0_12
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, -16(%r15)
	jle	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	-8(%r15), %esi
	movl	-4(%r15), %edi
	callq	_MIN
	movl	%eax, %ebx
	movl	%eax, %edi
	subl	%r12d, %edi
	callq	_abs
	movq	%rax, %r14
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	subl	%r12d, %edi
	callq	_abs
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rax, %r14
	jge	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax)
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_11
LBB0_12:
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movl	%r12d, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpl	(%rcx), %r12d
	movq	-104(%rbp), %r14                ## 8-byte Reload
	je	LBB0_14
## %bb.13:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rdx,%rax,8), %rsi
	movl	(%r14), %edx
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_print_item
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
LBB0_14:
	movl	%eax, (%r14)
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	cmpl	%r15d, %eax
	je	LBB0_16
## %bb.15:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_scrollok
	movl	(%r14), %esi
	subl	%r15d, %esi
	movq	%rbx, %rdi
	callq	_wscrl
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_scrollok
LBB0_16:
	movl	$1, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	(%rax), %r12d
	jne	LBB0_19
## %bb.17:
	cmpl	(%r14), %r15d
	jne	LBB0_19
LBB0_18:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_beep
LBB0_19:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_scroll_next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scroll_next
_scroll_next:                           ; @scroll_next
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x4
	mov	x20, x3
	mov	x25, x2
	mov	x24, x1
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	ldrsw	x27, [x3]
Lloh0:
	adrp	x8, _TRUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	ldr	w26, [x4]
	mov	w8, #24
	madd	x22, x27, x8, x1
	ldp	w1, w0, [x22, #16]
	bl	_MIN
	mov	x23, x0
	add	w28, w26, w25
	tbnz	w25, #31, LBB0_2
; %bb.1:
	mov	x0, x24
	bl	_form_limit
	cmp	w28, w0
	cset	w8, gt
	b	LBB0_3
LBB0_2:
	cmp	w23, w26
	csel	w28, w28, w26, eq
	lsr	w8, w28, #31
LBB0_3:
Lloh3:
	adrp	x9, _FALSE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FALSE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w8, w9, w19, ne
	cbz	w8, LBB0_16
; %bb.4:
	str	x21, [sp]                       ; 8-byte Folded Spill
	ldr	x8, [x24]
	cbz	x8, LBB0_10
; %bb.5:
	mov	w21, #0
	add	x19, x24, #24
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19], #24
	add	w21, w21, #1
	cbz	x8, LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x8, [x19, #-16]
	cmp	x8, #1
	b.lt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldp	w1, w0, [x19, #-8]
	bl	_MIN
	mov	x24, x0
	sub	w0, w0, w28
	bl	_abs
	mov	x25, x0
	sub	w0, w23, w28
	bl	_abs
	cmp	x25, x0
	b.ge	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	str	w21, [x20]
	mov	x23, x24
	b	LBB0_6
LBB0_10:
	ldr	w9, [x20]
	mov	x8, x27
	cmp	w27, w9
	ldr	x19, [sp]                       ; 8-byte Folded Reload
	b.eq	LBB0_12
; %bb.11:
	ldr	w2, [x19]
Lloh6:
	adrp	x8, _FALSE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x1, x22
	bl	_print_item
	ldr	w8, [x20]
LBB0_12:
	str	w8, [x19]
	cmp	w8, w26
	b.eq	LBB0_14
; %bb.13:
Lloh9:
	adrp	x8, _TRUE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x21
	bl	_scrollok
	ldr	w8, [x19]
	sub	w1, w8, w26
	mov	x0, x21
	bl	_wscrl
Lloh12:
	adrp	x8, _FALSE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_scrollok
LBB0_14:
	ldr	w8, [x20]
	cmp	w27, w8
	b.ne	LBB0_17
; %bb.15:
	ldr	w8, [x19]
	cmp	w26, w8
	b.ne	LBB0_17
LBB0_16:
	bl	_beep
	mov	w0, #0
	b	LBB0_18
LBB0_17:
	mov	w0, #1
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_scroll_next
.subsections_via_symbols
