	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vs_sm_insert
_vs_sm_insert:                          ## @vs_sm_insert
	.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	%rsi, %r13
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_HMAP@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	(%r12), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rax
	addq	$24, %r14
	cmpq	%r13, 8(%r12,%rax)
	jne	LBB0_1
## %bb.2:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_vs_screens
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_HANDLE_WEIRDNESS
	movq	_TMAP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	subq	%r12, %rax
	subq	%r14, %rax
	addq	$24, %rax
	sarq	$3, %rax
	movabsq	$-6148914691236517205, %rcx     ## imm = 0xAAAAAAAAAAAAAAAB
	imulq	%rax, %rcx
	incq	%rcx
	cmpq	%rcx, %rbx
	cmovbq	%rbx, %rcx
	movq	%rcx, %rbx
	movq	%r12, %rax
	movq	_HMAP@GOTPCREL(%rip), %rcx
	subq	(%rcx), %rax
	movq	(%r15), %rcx
	addq	%r14, %rax
	addq	$-24, %rax
	shrq	$3, %rax
	imull	$-1431655765, %eax, %esi        ## imm = 0xAAAAAAAB
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	*(%rcx)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_vs_insertln
	movl	$1, %ecx
	testq	%rax, %rax
	jne	LBB0_12
## %bb.3:
	leaq	(%r12,%r14), %r15
	addq	$-24, %r15
	leaq	(%rbx,%rbx,2), %rax
	leaq	(%r12,%rax,8), %rax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%rax), %rbx
	addq	$-24, %rbx
	movq	_TMAP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	subq	%r12, %rax
	subq	%r14, %rax
	addq	$24, %rax
	shrq	$3, %rax
	imull	$-1431655765, %eax, %eax        ## imm = 0xAAAAAAAB
	subl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	leal	(%rax,%rax,2), %eax
	leal	24(,%rax,8), %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_memmove
	movq	_TMAP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rbx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	ja	LBB0_6
## %bb.4:
	leaq	(,%rdi,8), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	%r15, %rdx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	incq	8(%rdx,%rcx)
	leaq	(%rdx,%rcx), %rsi
	addq	$24, %rsi
	addq	$24, %rdx
	cmpq	%rax, %rsi
	jbe	LBB0_5
LBB0_6:
	testq	%rdi, %rdi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_11
## %bb.7:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, 8(%r15)
	movq	%r12, (%r15)
	movq	%rbx, 16(%r15)
	movq	%r15, %rdi
	callq	_SMAP_FLUSH
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_vs_line
	testq	%rax, %rax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	addq	$24, %r15
	incq	%rbx
	cmpq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	jbe	LBB0_8
LBB0_11:
	xorl	%ecx, %ecx
	jmp	LBB0_12
LBB0_9:
	movl	$1, %ecx
LBB0_12:
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HMAP,8,3                       ## @HMAP
	.comm	_TMAP,8,3                       ## @TMAP
	.no_dead_strip	_vs_sm_insert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vs_sm_insert
_vs_sm_insert:                          ; @vs_sm_insert
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _HMAP@GOTPAGE
Lloh1:
	ldr	x23, [x23, _HMAP@GOTPAGEOFF]
	ldr	x25, [x23]
	mov	x8, x25
	ldr	x24, [x8], #24
	mov	x9, #-24
	sub	x9, x9, x25
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x21, x25
	mov	x27, x8
	mov	x26, x9
	ldr	x10, [x25, #8]
	add	x25, x25, #24
	add	x8, x8, #24
	sub	x9, x9, #24
	cmp	x10, x19
	b.ne	LBB0_1
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	mov	x2, #0
	bl	_vs_screens
	mov	x22, x0
	bl	_HANDLE_WEIRDNESS
Lloh2:
	adrp	x8, _TMAP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TMAP@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	sub	x8, x8, x21
	asr	x8, x8, #3
	mov	x9, #-6148914691236517206
	movk	x9, #43691
	mul	x8, x8, x9
	add	x9, x8, #1
	cmp	x22, x9
	csinc	x22, x22, x8, lo
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x9, [x23]
	sub	x9, x21, x9
	lsr	x9, x9, #3
	mov	w28, #43691
	movk	w28, #43690, lsl #16
	mul	w1, w9, w28
	mov	x0, x20
	mov	w2, #0
	blr	x8
	mov	x0, x20
	mov	x1, x22
	bl	_vs_insertln
	cbz	x0, LBB0_4
LBB0_3:
	mov	w0, #1
	b	LBB0_15
LBB0_4:
	mov	w8, #24
	madd	x23, x22, x8, x21
Lloh5:
	adrp	x9, _TMAP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _TMAP@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	sub	x9, x9, x21
	lsr	x9, x9, #3
	mul	w9, w9, w28
	sub	w9, w9, w22
	orr	w10, wzr, #0x18
	madd	w2, w9, w8, w10
	mov	x0, x23
	mov	x1, x21
	bl	_memmove
Lloh8:
	adrp	x8, _TMAP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TMAP@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x23, x8
	b.hi	LBB0_10
; %bb.5:
	add	x10, x22, x22, lsl #1
	lsl	x9, x10, #3
	add	x11, x9, x21
	add	x11, x11, #24
	add	x12, x8, #1
	cmp	x11, x12
	csinc	x11, x11, x8, hi
	sub	x11, x11, x21
	sub	x11, x11, #24
	cmp	x11, x9
	cset	w13, ne
	mov	x14, x13
	bfi	x14, x10, #3, #61
	sub	x10, x11, x14
	cmp	x11, x9
	mov	x15, #-6148914691236517206
	movk	x15, #43691
	umulh	x10, x10, x15
	lsr	x10, x10, #4
	cinc	x10, x10, ne
	cmp	x10, #3
	b.lo	LBB0_9
; %bb.6:
	add	x10, x10, #1
	and	x11, x10, #0x3ffffffffffffffc
	mov	w16, #24
	madd	x23, x11, x16, x23
	add	x16, x9, x27
	cmp	x16, x12
	csel	x12, x16, x12, hi
	sub	x12, x12, x14
	add	x12, x12, x26
	umulh	x12, x12, x15
	add	x12, x13, x12, lsr #4
	add	x12, x12, #1
	and	x12, x12, #0x1ffffffffffffffc
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x13, x25, x9
	ldur	x14, [x13, #-16]
	ldr	x15, [x13, #8]
	ldr	x16, [x13, #32]
	ldr	x17, [x13, #56]
	add	x14, x14, #1
	add	x15, x15, #1
	add	x16, x16, #1
	add	x17, x17, #1
	stur	x14, [x13, #-16]
	str	x15, [x13, #8]
	str	x16, [x13, #32]
	str	x17, [x13, #56]
	add	x9, x9, #96
	subs	x12, x12, #4
	b.ne	LBB0_7
; %bb.8:
	cmp	x10, x11
	b.eq	LBB0_10
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x23, #8]
	add	x9, x9, #1
	str	x9, [x23, #8]
	add	x23, x23, #24
	cmp	x23, x8
	b.ls	LBB0_9
LBB0_10:
	cbz	x22, LBB0_14
; %bb.11:
	mov	w23, #1
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	stp	x24, x19, [x21]
	str	x23, [x21, #16]
	mov	x0, x21
	bl	_SMAP_FLUSH
	mov	x0, x20
	mov	x1, x21
	mov	x2, #0
	mov	x3, #0
	bl	_vs_line
	cbnz	x0, LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x21, x21, #24
	add	x23, x23, #1
	cmp	x23, x22
	b.ls	LBB0_12
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_HMAP,8,3                       ; @HMAP
	.comm	_TMAP,8,3                       ; @TMAP
	.no_dead_strip	_vs_sm_insert
.subsections_via_symbols
