	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tab_next
_tab_next:                              ## @tab_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movl	%ecx, %r13d
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rsi, %r12
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	(%r8), %r14d
	movslq	%r14d, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movl	(%r9), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	%rdx, %rax
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	leal	-1(%rdx), %r15d
	movl	%r14d, %ecx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movslq	%eax, %rdi
	shlq	$4, %rdi
	addq	%r12, %rdi
	callq	_is_readonly
	movl	(%rbx), %ecx
	testq	%rax, %rax
	je	LBB0_6
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %eax
	addl	%r13d, %eax
	movl	%eax, (%rbx)
	movl	%r15d, %ecx
	js	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%ecx, %ecx
	cmpl	-88(%rbp), %eax                 ## 4-byte Folded Reload
	jl	LBB0_4
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%ecx, (%rbx)
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	%ecx, %eax
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, %ecx
	cmpl	%r14d, %eax
	jne	LBB0_5
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movslq	%ecx, %rax
	shlq	$4, %rax
	cmpq	$0, (%r12,%rax)
	jg	LBB0_7
## %bb.17:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	%r14d, %ecx
	jne	LBB0_1
	jmp	LBB0_18
LBB0_7:
	movl	8(%r12,%rax), %esi
	movl	12(%r12,%rax), %edi
	callq	_MIN
	movl	%eax, %r15d
	movslq	(%rbx), %rax
	shlq	$4, %rax
	movl	8(%r12,%rax), %esi
	movl	12(%r12,%rax), %edi
	callq	_MAX
	cmpl	(%rbx), %r14d
	je	LBB0_18
## %bb.8:
	movl	%eax, -88(%rbp)                 ## 4-byte Spill
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	shlq	$4, %rax
	addq	%rax, %r12
	movl	%r15d, -72(%rbp)                ## 4-byte Spill
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %edx
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_print_item
	movl	(%r15), %r12d
	movl	-72(%rbp), %r15d                ## 4-byte Reload
	incl	%r15d
	movq	%r13, %rdi
	callq	_getmaxy
	movl	%r15d, %ecx
	subl	%eax, %ecx
	cmpl	%ecx, %r12d
	jge	LBB0_9
## %bb.10:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_getmaxy
	subl	%eax, %r15d
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	%r15d, (%r13)
	jmp	LBB0_11
LBB0_9:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13), %r15d
LBB0_11:
	movl	-88(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, %r15d
	jle	LBB0_13
## %bb.12:
	movl	%eax, (%r13)
	movl	%eax, %r15d
LBB0_13:
	cmpl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	je	LBB0_18
## %bb.14:
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_16
## %bb.15:
	xorl	%eax, %eax
	callq	_beep
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	movl	%r14d, (%rbx)
	jmp	LBB0_18
LBB0_16:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_scrollok
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	subl	-44(%rbp), %esi                 ## 4-byte Folded Reload
	movq	%r15, %rdi
	callq	_wscrl
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_scrollok
LBB0_18:
	movl	$1, %eax
	cmpl	(%rbx), %r14d
	jne	LBB0_20
## %bb.19:
	xorl	%eax, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	cmpl	(%rcx), %edx
	setne	%al
LBB0_20:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_tab_next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tab_next
_tab_next:                              ; @tab_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	x19, x5
	mov	x20, x4
	mov	x23, x3
	mov	x24, x2
	mov	x22, x1
	str	x0, [sp]                        ; 8-byte Folded Spill
	ldr	w25, [x4]
	sxtw	x26, w25
Lloh0:
	adrp	x9, _FALSE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FALSE@GOTPAGEOFF]
	ldr	w8, [x5]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh2:
	ldr	w27, [x9]
	sub	w21, w2, #1
Lloh3:
	adrp	x28, _TRUE@GOTPAGE
Lloh4:
	ldr	x28, [x28, _TRUE@GOTPAGEOFF]
	mov	x8, x25
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x0, x22, w9, sxtw #4
	bl	_is_readonly
	ldr	w8, [x20]
	cbz	x0, LBB0_7
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x10, x21
	adds	w9, w8, w23
	str	w9, [x20]
	b.mi	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w9, w24
	b.lt	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w10, #0
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	str	w10, [x20]
	ldr	w27, [x28]
	mov	x9, x10
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x8, x25
	cmp	w9, w25
	b.ne	LBB0_1
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	sbfiz	x9, x8, #4, #32
	ldr	x9, [x22, x9]
	cmp	x9, #1
	b.ge	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w8, w25
	b.ne	LBB0_2
	b	LBB0_18
LBB0_9:
	sxtw	x8, w8
	add	x8, x22, x8, lsl #4
	ldp	w1, w0, [x8, #8]
	bl	_MIN
	mov	x24, x0
	ldrsw	x8, [x20]
	add	x8, x22, x8, lsl #4
	ldp	w1, w0, [x8, #8]
	bl	_MAX
	ldr	w8, [x20]
	cmp	w25, w8
	b.eq	LBB0_18
; %bb.10:
	mov	x23, x0
	add	x1, x22, x26, lsl #4
	ldr	w2, [x19]
Lloh5:
	adrp	x8, _FALSE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	ldr	x26, [sp]                       ; 8-byte Folded Reload
	mov	x0, x26
	bl	_print_item
	ldr	w22, [x19]
	add	w21, w24, #1
	mov	x0, x26
	bl	_getmaxy
	sub	w8, w21, w0
	cmp	w22, w8
	b.ge	LBB0_12
; %bb.11:
	mov	x0, x26
	bl	_getmaxy
	sub	w8, w21, w0
	str	w8, [x19]
	cmp	w8, w23
	b.gt	LBB0_13
	b	LBB0_14
LBB0_12:
	ldr	w8, [x19]
	cmp	w8, w23
	b.le	LBB0_14
LBB0_13:
	str	w23, [x19]
	mov	x8, x23
LBB0_14:
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w8, w9
	b.eq	LBB0_18
; %bb.15:
	cbz	w27, LBB0_17
; %bb.16:
	bl	_beep
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	str	w8, [x19]
	str	w25, [x20]
	b	LBB0_18
LBB0_17:
	ldr	w1, [x28]
	ldr	x21, [sp]                       ; 8-byte Folded Reload
	mov	x0, x21
	bl	_scrollok
	ldr	w8, [x19]
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	sub	w1, w8, w9
	mov	x0, x21
	bl	_wscrl
Lloh8:
	adrp	x8, _FALSE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_scrollok
LBB0_18:
	ldr	w8, [x20]
	cmp	w25, w8
	b.ne	LBB0_20
; %bb.19:
	ldr	w8, [x19]
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w9, w8
	cset	w0, ne
	b	LBB0_21
LBB0_20:
	mov	w0, #1
LBB0_21:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_tab_next
.subsections_via_symbols
