	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scrdown
_scrdown:                               ## @scrdown
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $ecx killed $ecx def $rcx
	movl	%esi, %r15d
	leal	(%rcx,%r15), %eax
	movl	%esi, %ebx
	notl	%ebx
	addl	%edx, %ebx
	cmpl	%edx, %eax
	cmovbl	%ecx, %ebx
	cmpl	%edx, (%rdi)
	jae	LBB0_1
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%edx, %r12d
	cmpl	%r15d, %edx
	jbe	LBB0_5
## %bb.2:
	testl	%ebx, %ebx
	jle	LBB0_5
## %bb.3:
	movq	%rdi, %r14
	callq	_CON_IS_VISIBLE
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	24(%r14), %rax
	movq	_SM_DOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%ebx, %r8d
	callq	*(%rax)
	testq	%rax, %rax
	jne	LBB0_5
LBB0_6:
	movl	4(%r14), %eax
	movl	8(%r14), %r13d
	imull	%ebx, %r13d
	addl	%r15d, %ebx
	subl	%ebx, %r12d
	imull	%eax, %r12d
	movl	%eax, %ebx
	imull	%r15d, %ebx
	addq	16(%r14), %rbx
	leaq	(%rbx,%r13,2), %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_scr_memmovew
	movl	12(%r14), %esi
	addl	%r13d, %r13d
	movq	%rbx, %rdi
	movl	%r13d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_scr_memsetw                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SM_DOWN,4,2                    ## @SM_DOWN
	.no_dead_strip	_scrdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scrdown
_scrdown:                               ; @scrdown
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mvn	w8, w1
	add	w8, w8, w2
	add	w9, w3, w1
	cmp	w9, w2
	csel	w22, w3, w8, lo
	ldr	w8, [x0]
	cmp	w8, w2
	ccmp	w2, w1, #0, hs
	ccmp	w22, #1, #8, hi
	b.ge	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_CON_IS_VISIBLE
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _SM_DOWN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SM_DOWN@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x9]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	x4, x22
	blr	x8
	cbnz	x0, LBB0_1
LBB0_4:
	ldr	x8, [x19, #16]
	ldp	w9, w10, [x19, #4]
	mul	w11, w9, w21
	add	x23, x8, x11
	mul	w24, w10, w22
	add	x0, x23, w24, uxtw #1
	add	w8, w22, w21
	sub	w8, w20, w8
	mul	w2, w9, w8
	mov	x1, x23
	bl	_scr_memmovew
	ldr	w1, [x19, #12]
	lsl	w2, w24, #1
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_scr_memsetw
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SM_DOWN,4,2                    ; @SM_DOWN
	.no_dead_strip	_scrdown
.subsections_via_symbols
