	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tdsc_paint_cursor
_tdsc_paint_cursor:                     ## @tdsc_paint_cursor
	.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	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	40(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movslq	(%rdi), %rcx
	movslq	4(%rdi), %rsi
	movl	8(%rdi), %eax
	subl	12(%rdi), %eax
	subq	%rsi, %rcx
	movl	16(%rdi), %r9d
	leal	(%r9,%rcx), %r8d
	movl	24(%rdi), %esi
	movl	%esi, %ebx
	subl	%ecx, %ebx
	cmpl	%esi, %r8d
	cmovlel	%r9d, %ebx
	movl	20(%rdi), %r9d
	leal	(%r9,%rax), %r8d
	movl	28(%rdi), %edi
	movl	%edi, %esi
	subl	%eax, %esi
	cmpl	%edi, %r8d
	cmovlel	%r9d, %esi
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	js	LBB0_2
## %bb.3:
	leaq	(%rcx,%rcx,2), %rcx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rsi,%rcx,4), %rsi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	js	LBB0_5
LBB0_6:
	imull	%edx, %eax
	cltq
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	jns	LBB0_8
	jmp	LBB0_15
LBB0_2:
	addl	%ecx, %ebx
	leal	(,%rcx,4), %ecx
	negl	%ecx
	movslq	%ecx, %rcx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rsi,%rcx,4), %rsi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jns	LBB0_6
LBB0_5:
	addl	%eax, -60(%rbp)                 ## 4-byte Folded Spill
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	imull	32(%rcx), %eax
	negl	%eax
	cltq
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	js	LBB0_15
LBB0_8:
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	js	LBB0_15
## %bb.9:
	jle	LBB0_15
## %bb.10:
	movslq	%edx, %rax
	movl	%ebx, %r15d
	addq	$8, -48(%rbp)                   ## 8-byte Folded Spill
	shlq	$2, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%ecx, %ecx
	movl	%ebx, -76(%rbp)                 ## 4-byte Spill
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movslq	32(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	incl	%ecx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	addq	%rax, -48(%rbp)                 ## 8-byte Folded Spill
	cmpl	-60(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	-76(%rbp), %ebx                 ## 4-byte Reload
	jge	LBB0_15
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	12(%rax), %r14
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	-8(%r12), %edi
	movl	-12(%r14), %ebx
	movl	-8(%r14), %esi
	movl	%ebx, %edx
	callq	_APPLY_ALPHA
	movl	-4(%r12), %edi
	movl	-4(%r14), %esi
	movl	%ebx, %edx
	callq	_APPLY_ALPHA
	movl	(%r12), %edi
	movl	(%r14), %esi
	movl	%ebx, %edx
	callq	_APPLY_ALPHA
	incq	%r13
	addq	$12, %r12
	addq	$16, %r14
	cmpq	%r15, %r13
	jb	LBB0_13
	jmp	LBB0_14
LBB0_15:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_tdsc_paint_cursor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tdsc_paint_cursor
_tdsc_paint_cursor:                     ; @tdsc_paint_cursor
	.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
                                        ; kill: def $w2 killed $w2 def $x2
	ldr	x26, [x0]
	ldr	x8, [x26, #40]
	cbz	x8, LBB0_11
; %bb.1:
	ldp	w9, w10, [x26, #8]
	ldp	w11, w12, [x26]
	ldp	w14, w13, [x26, #16]
	sub	w11, w11, w12
	add	w12, w11, w14
	ldp	w15, w16, [x26, #24]
	sub	w17, w15, w11
	cmp	w12, w15
	csel	w12, w17, w14, gt
	sub	w9, w9, w10
	add	w10, w13, w9
	sub	w14, w16, w9
	cmp	w10, w16
	csel	w20, w14, w13, gt
	neg	w10, w11, lsl #2
	add	w13, w11, w11, lsl #1
	and	w10, w10, w11, asr #31
	add	x22, x8, w10, sxtw #2
	cmp	w11, #0
	csel	w8, w11, wzr, lt
	add	w23, w12, w8
	csel	w8, wzr, w13, lt
	add	x8, x1, w8, sxtw #2
	tbnz	w9, #31, LBB0_3
; %bb.2:
	mul	w9, w9, w2
	add	x8, x8, w9, sxtw #2
	tbz	w23, #31, LBB0_4
	b	LBB0_11
LBB0_3:
	add	w20, w20, w9
	ldr	w10, [x26, #32]
	mneg	w9, w9, w10
	add	x22, x22, w9, sxtw #2
	tbnz	w23, #31, LBB0_11
LBB0_4:
	tbnz	w20, #31, LBB0_11
; %bb.5:
	cmp	w20, #1
	b.lt	LBB0_11
; %bb.6:
	mov	w24, #0
	add	x21, x8, #4
	sbfiz	x8, x2, #2, #32
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldrsw	x8, [x26, #32]
	add	x22, x22, x8, lsl #2
	add	w24, w24, #1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x21, x21, x8
	cmp	w24, w20
	b.ge	LBB0_11
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	cbz	w23, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x27, #0
	add	x28, x22, #8
	mov	x25, x21
LBB0_10:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	w0, [x25, #-4]
	ldp	w19, w1, [x28, #-8]
	mov	x2, x19
	bl	_APPLY_ALPHA
	ldr	w0, [x25]
	ldr	w1, [x28]
	mov	x2, x19
	bl	_APPLY_ALPHA
	ldr	w0, [x25, #4]
	ldr	w1, [x28, #4]
	mov	x2, x19
	bl	_APPLY_ALPHA
	add	x27, x27, #1
	add	x28, x28, #16
	add	x25, x25, #12
	cmp	x27, x23
	b.lo	LBB0_10
	b	LBB0_7
LBB0_11:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_tdsc_paint_cursor
.subsections_via_symbols
