	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function g2m_paint_cursor
_g2m_paint_cursor:                      ## @g2m_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, -72(%rbp)                 ## 8-byte Spill
	movq	40(%rdi), %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), %rax
	subq	%rax, %rcx
	movl	8(%rdi), %eax
	movl	16(%rdi), %r9d
	subl	12(%rdi), %eax
	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	%ebx, %ebx
	jns	LBB0_5
	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	%ebx, %ebx
	js	LBB0_15
LBB0_5:
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%eax, %ecx
	addl	%ecx, -60(%rbp)                 ## 4-byte Folded Spill
	js	LBB0_15
## %bb.6:
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	imull	%edx, %eax
	cltq
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_10
	jmp	LBB0_15
LBB0_7:
	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
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_15
LBB0_10:
	movslq	%edx, %rax
	movl	%ebx, %r14d
	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), %r15
	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(%r15), %ebx
	movl	-8(%r15), %esi
	movl	%ebx, %edx
	callq	_APPLY_ALPHA
	movl	-4(%r12), %edi
	movl	-4(%r15), %esi
	movl	%ebx, %edx
	callq	_APPLY_ALPHA
	movl	(%r12), %edi
	movl	(%r15), %esi
	movl	%ebx, %edx
	callq	_APPLY_ALPHA
	incq	%r13
	addq	$12, %r12
	addq	$16, %r15
	cmpq	%r14, %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	_g2m_paint_cursor
.subsections_via_symbols

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