	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function maskedmerge8
LCPI0_0:
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_maskedmerge8:                          ## @maskedmerge8
	.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
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	cmpl	$0, 40(%rbp)
	jle	LBB0_18
## %bb.1:
	movslq	24(%rbp), %r14
	movslq	%r8d, %r13
	movslq	%r9d, %rax
	movslq	16(%rbp), %r9
	movl	32(%rbp), %r8d
	shlq	$2, %r14
	shlq	$2, %r13
	shlq	$2, %r9
	shlq	$2, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	%r8d, %eax
	andl	$-8, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r8, %rax
	negq	%rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	(,%r8,4), %r11
	andq	$-32, %r11
	xorl	%r15d, %r15d
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [128,128,128,128]
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	%r14, %rcx
	addq	%r13, %rdi
	addq	-80(%rbp), %rsi                 ## 8-byte Folded Reload
	addq	%r9, %rdx
	incq	%r15
	cmpl	40(%rbp), %r15d
	je	LBB0_18
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_17 Depth 2
	cmpl	$0, 32(%rbp)
	jle	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$8, 32(%rbp)
	jae	LBB0_6
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r12d, %r12d
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %r10
	testb	$1, %r8b
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rdi,%r12,4), %eax
	movl	(%rsi,%r12,4), %ebx
	subl	%eax, %ebx
	imull	(%rdx,%r12,4), %ebx
	subl	$-128, %ebx
	sarl	$8, %ebx
	addl	%eax, %ebx
	movl	%ebx, (%rcx,%r12,4)
	movq	%r12, %r10
	orq	$1, %r10
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	notq	%r12
	cmpq	-96(%rbp), %r12                 ## 8-byte Folded Reload
	je	LBB0_2
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rdi,%r10,4), %eax
	movl	(%rsi,%r10,4), %ebx
	subl	%eax, %ebx
	imull	(%rdx,%r10,4), %ebx
	subl	$-128, %ebx
	sarl	$8, %ebx
	addl	%eax, %ebx
	movl	%ebx, (%rcx,%r10,4)
	movl	4(%rdi,%r10,4), %eax
	movl	4(%rsi,%r10,4), %ebx
	subl	%eax, %ebx
	imull	4(%rdx,%r10,4), %ebx
	subl	$-128, %ebx
	sarl	$8, %ebx
	addl	%eax, %ebx
	movl	%ebx, 4(%rcx,%r10,4)
	addq	$2, %r10
	cmpq	%r10, %r8
	jne	LBB0_17
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %r10
	imulq	%r15, %r10
	addq	-72(%rbp), %r10                 ## 8-byte Folded Reload
	movq	%r13, %rbx
	imulq	%r15, %rbx
	addq	-64(%rbp), %rbx                 ## 8-byte Folded Reload
	movq	%r10, %rax
	subq	%rbx, %rax
	cmpq	$32, %rax
	jb	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r9, %rax
	imulq	%r15, %rax
	addq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	movq	%r10, %rbx
	subq	%rax, %rbx
	cmpq	$32, %rbx
	jb	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	imulq	%r15, %rax
	addq	-48(%rbp), %rax                 ## 8-byte Folded Reload
	subq	%rax, %r10
	movl	$0, %r12d
	cmpq	$32, %r10
	jb	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	(%rdi,%rax), %xmm1
	movdqu	16(%rdi,%rax), %xmm2
	movdqu	(%rdx,%rax), %xmm3
	movdqu	16(%rdx,%rax), %xmm4
	movdqu	(%rsi,%rax), %xmm5
	movdqu	16(%rsi,%rax), %xmm6
	psubd	%xmm1, %xmm5
	pmulld	%xmm3, %xmm5
	psubd	%xmm2, %xmm6
	pmulld	%xmm4, %xmm6
	paddd	%xmm0, %xmm5
	paddd	%xmm0, %xmm6
	psrad	$8, %xmm5
	psrad	$8, %xmm6
	paddd	%xmm1, %xmm5
	paddd	%xmm2, %xmm6
	movdqu	%xmm5, (%rcx,%rax)
	movdqu	%xmm6, 16(%rcx,%rax)
	addq	$32, %rax
	cmpq	%rax, %r11
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %r12
	cmpq	%r8, %rax
	je	LBB0_2
	jmp	LBB0_14
LBB0_18:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_maskedmerge8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function maskedmerge8
_maskedmerge8:                          ; @maskedmerge8
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	.cfi_offset w21, -24
	.cfi_offset w22, -32
	.cfi_offset w23, -40
	.cfi_offset w24, -48
                                        ; kill: def $w7 killed $w7 def $x7
                                        ; kill: def $w6 killed $w6 def $x6
                                        ; kill: def $w5 killed $w5 def $x5
                                        ; kill: def $w4 killed $w4 def $x4
	ldr	w8, [sp, #52]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x9, #0
	sbfiz	x10, x7, #2, #32
	sbfiz	x11, x4, #2, #32
	sbfiz	x12, x6, #2, #32
	sbfiz	x13, x5, #2, #32
	ldr	w14, [sp, #48]
	and	x15, x14, #0xfffffff0
	lsl	x16, x14, #2
	and	x16, x16, #0x3ffffffc0
	orr	w17, wzr, #0x80
	mov	x4, x2
	mov	x5, x1
	mov	x6, x0
	mov	x7, x3
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #1
	add	x7, x7, x10
	add	x6, x6, x11
	add	x5, x5, x13
	add	x4, x4, x12
	cmp	w9, w8
	b.eq	LBB0_13
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;     Child Loop BB0_12 Depth 2
	cmp	w14, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w14, #16
	b.hs	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x19, #0
	b	LBB0_12
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x19, #0
	madd	x20, x10, x9, x3
	madd	x21, x11, x9, x0
	sub	x21, x20, x21
	cmp	x21, #64
	b.lo	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	madd	x21, x12, x9, x2
	sub	x21, x20, x21
	cmp	x21, #64
	b.lo	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	madd	x21, x13, x9, x1
	sub	x20, x20, x21
	cmp	x20, #64
	b.lo	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x19, #0
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x20, x6, x19
	ldp	q0, q1, [x20]
	ldp	q2, q3, [x20, #32]
	add	x20, x4, x19
	ldp	q4, q5, [x20]
	ldp	q6, q7, [x20, #32]
	add	x20, x5, x19
	ldp	q16, q17, [x20]
	ldp	q18, q19, [x20, #32]
	sub.4s	v16, v16, v0
	sub.4s	v17, v17, v1
	sub.4s	v18, v18, v2
	sub.4s	v19, v19, v3
	movi.4s	v20, #128
	mla.4s	v20, v16, v4
	movi.4s	v4, #128
	mla.4s	v4, v17, v5
	movi.4s	v5, #128
	mla.4s	v5, v18, v6
	movi.4s	v6, #128
	mla.4s	v6, v19, v7
	ssra.4s	v0, v20, #8
	ssra.4s	v1, v4, #8
	ssra.4s	v2, v5, #8
	ssra.4s	v3, v6, #8
	add	x20, x7, x19
	stp	q0, q1, [x20]
	stp	q2, q3, [x20, #32]
	add	x19, x19, #64
	cmp	x16, x19
	b.ne	LBB0_10
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x19, x15
	cmp	x15, x14
	b.eq	LBB0_2
LBB0_12:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x20, x19, #2
	ldr	w21, [x6, x20]
	ldr	w22, [x4, x20]
	ldr	w23, [x5, x20]
	sub	w23, w23, w21
	madd	w22, w23, w22, w17
	add	w21, w21, w22, asr #8
	str	w21, [x7, x20]
	add	x19, x19, #1
	cmp	x14, x19
	b.ne	LBB0_12
	b	LBB0_2
LBB0_13:
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_maskedmerge8
.subsections_via_symbols
