	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sprite_op
_sprite_op:                             ## @sprite_op
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%edx, %edx
	js	LBB0_2
## %bb.1:
	cmpl	%edx, (%rdi)
	jbe	LBB0_13
LBB0_2:
	testl	%esi, %esi
	js	LBB0_4
## %bb.3:
	cmpl	%esi, 4(%rdi)
	jbe	LBB0_13
LBB0_4:
	movl	%edx, %eax
	negl	%eax
	movl	%edx, %ebx
	sarl	$31, %ebx
	andl	%eax, %ebx
	movl	%esi, %r13d
	negl	%r13d
	movl	(%rcx), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	4(%rcx), %r15d
	xorl	%r11d, %r11d
	testl	%esi, %esi
	movl	$0, %eax
	cmovgl	%esi, %eax
	testl	%edx, %edx
	cmovgl	%edx, %r11d
	movl	%r15d, %r12d
	imull	%ebx, %r12d
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	addl	%eax, %r12d
	subl	%esi, %r12d
	shll	$2, %r12d
	leal	(,%r15,4), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	incl	%ebx
	incl	%r11d
	addl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	cmpl	-52(%rbp), %ebx                 ## 4-byte Folded Reload
	jae	LBB0_13
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movl	%r12d, %ebx
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %esi
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=2
	movq	(%r8,%rbx,8), %rcx
	movq	%rcx, (%r9,%rax,8)
	movq	8(%r8,%rbx,8), %rcx
	movq	%rcx, 8(%r9,%rax,8)
	movq	16(%r8,%rbx,8), %rcx
	movq	%rcx, 16(%r9,%rax,8)
	movq	24(%r8,%rbx,8), %rcx
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	%rcx, 24(%r9,%rax,8)
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=2
	leal	(%rsi,%r13), %eax
	incl	%eax
	movl	%esi, %ecx
	incl	%ecx
	addl	$4, %ebx
	movl	%ecx, %esi
	cmpl	%r15d, %eax
	jae	LBB0_12
LBB0_6:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %ebx
	movq	24(%r8,%rbx,8), %r14
	testq	%r14, %r14
	jle	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	8(%rdi), %r9
	movl	4(%rdi), %eax
	imull	%r11d, %eax
	addl	%esi, %eax
	shll	$2, %eax
	cmpq	$65534, %r14                    ## imm = 0xFFFE
	ja	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	movl	$65535, %r10d                   ## imm = 0xFFFF
	subq	%r14, %r10
	movq	(%r9,%rax,8), %rdx
	imulq	%r10, %rdx
	movq	%rdx, %rcx
	sarq	$16, %rcx
	addq	%rdx, %rcx
	addq	$32769, %rcx                    ## imm = 0x8001
	sarq	$16, %rcx
	addq	(%r8,%rbx,8), %rcx
	movq	%rcx, (%r9,%rax,8)
	movq	8(%r9,%rax,8), %rcx
	imulq	%r10, %rcx
	movq	%rcx, %rdx
	sarq	$16, %rdx
	addq	%rdx, %rcx
	addq	$32769, %rcx                    ## imm = 0x8001
	sarq	$16, %rcx
	addq	8(%r8,%rbx,8), %rcx
	movq	%rcx, 8(%r9,%rax,8)
	movq	16(%r9,%rax,8), %rcx
	imulq	%r10, %rcx
	movq	%rcx, %rdx
	sarq	$16, %rdx
	addq	%rdx, %rcx
	addq	$32769, %rcx                    ## imm = 0x8001
	sarq	$16, %rcx
	addq	16(%r8,%rbx,8), %rcx
	movq	%rcx, 16(%r9,%rax,8)
	imulq	24(%r9,%rax,8), %r10
	movq	%r10, %rcx
	sarq	$16, %rcx
	addq	%r10, %rcx
	addq	$32769, %rcx                    ## imm = 0x8001
	sarq	$16, %rcx
	addq	24(%r8,%rbx,8), %rcx
	jmp	LBB0_10
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_sprite_op
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sprite_op
_sprite_op:                             ; @sprite_op
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	.cfi_offset w21, -24
	.cfi_offset w22, -32
	tbnz	w2, #31, LBB0_2
; %bb.1:
	ldr	w8, [x0]
	cmp	w8, w2
	b.ls	LBB0_13
LBB0_2:
	tbnz	w1, #31, LBB0_4
; %bb.3:
	ldr	w8, [x0, #4]
	cmp	w8, w1
	b.ls	LBB0_13
LBB0_4:
	neg	w8, w2
	and	w8, w8, w2, asr #31
	neg	w9, w1
	ldp	w11, w10, [x3]
	cmp	w1, #0
	csel	w12, w1, wzr, gt
	cmp	w2, #0
	csel	w13, w2, wzr, gt
	madd	w14, w10, w8, w12
	sub	w14, w14, w1
	lsl	w14, w14, #2
	lsl	w15, w10, #2
	mov	w16, #65534
	mov	w17, #65535
	mov	w1, #32769
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w8, w8, #1
	add	w13, w13, #1
	add	w14, w14, w15
	cmp	w8, w11
	b.hs	LBB0_13
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	mov	x2, x14
	mov	x3, x12
	b	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldr	x7, [x5]
	str	x7, [x6]
	ldr	x7, [x5, #8]
	str	x7, [x6, #8]
	ldr	x7, [x5, #16]
	str	x7, [x6, #16]
	ldr	x5, [x5, #24]
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=2
	str	x5, [x6, #24]
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	add	w3, w3, #1
	add	w2, w2, #4
	add	w5, w9, w3
	cmp	w5, w10
	b.hs	LBB0_5
LBB0_10:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x5, x4, w2, uxtw #3
	ldr	x7, [x5, #24]
	cmp	x7, #1
	b.lt	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	x6, [x0, #8]
	ldr	w19, [x0, #4]
	madd	w19, w13, w19, w3
	lsl	w19, w19, #2
	add	x6, x6, w19, uxtw #3
	cmp	x7, x16
	b.hi	LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	sub	x7, x17, x7
	ldp	x19, x20, [x6]
	mul	x19, x19, x7
	add	x19, x19, x19, asr #16
	add	x19, x19, x1
	ldr	x21, [x5]
	add	x19, x21, x19, asr #16
	str	x19, [x6]
	mul	x19, x20, x7
	add	x19, x19, x19, asr #16
	add	x19, x19, x1
	ldr	x20, [x5, #8]
	add	x19, x20, x19, asr #16
	str	x19, [x6, #8]
	ldp	x19, x20, [x6, #16]
	mul	x19, x19, x7
	add	x19, x19, x19, asr #16
	add	x19, x19, x1
	ldr	x21, [x5, #16]
	add	x19, x21, x19, asr #16
	str	x19, [x6, #16]
	mul	x7, x20, x7
	add	x7, x7, x7, asr #16
	add	x7, x7, x1
	ldr	x5, [x5, #24]
	add	x5, x5, x7, asr #16
	b	LBB0_8
LBB0_13:
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_sprite_op
.subsections_via_symbols
