	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function premultiply8
LCPI0_0:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
LCPI0_1:
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_premultiply8:                          ## @premultiply8
	.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	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, 24(%rbp)
	jle	LBB0_16
## %bb.1:
	movl	16(%rbp), %r11d
	movslq	%r9d, %r15
	movslq	%ecx, %r12
	movslq	%r8d, %r8
	movl	%r11d, %eax
	shlq	$2, %r15
	shlq	$2, %r12
	shlq	$2, %r8
	movl	%eax, %ecx
	andl	$-8, %ecx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rcx
	negq	%rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	leaq	(,%rax,4), %r13
	andq	$-32, %r13
	xorl	%r10d, %r10d
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [1,1,1,1]
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = [128,128,128,128]
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	%r15, %rbx
	addq	%r12, %rdi
	addq	%r8, %rsi
	incq	%r10
	cmpl	24(%rbp), %r10d
	je	LBB0_16
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
                                        ##     Child Loop BB0_15 Depth 2
	testl	%r11d, %r11d
	jle	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$8, %r11d
	jb	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %r9
	imulq	%r10, %r9
	addq	-64(%rbp), %r9                  ## 8-byte Folded Reload
	movq	%r12, %rcx
	imulq	%r10, %rcx
	addq	-56(%rbp), %rcx                 ## 8-byte Folded Reload
	movq	%r9, %rdx
	subq	%rcx, %rdx
	cmpq	$32, %rdx
	jb	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r8, %rcx
	imulq	%r10, %rcx
	addq	-48(%rbp), %rcx                 ## 8-byte Folded Reload
	subq	%rcx, %r9
	movl	$0, %r14d
	cmpq	$32, %r9
	jb	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	(%rdi,%rdx), %xmm2
	movdqu	16(%rdi,%rdx), %xmm3
	movdqu	(%rsi,%rdx), %xmm4
	movdqu	16(%rsi,%rdx), %xmm5
	movdqa	%xmm4, %xmm6
	psrld	$1, %xmm6
	movdqa	%xmm5, %xmm7
	psrld	$1, %xmm7
	pand	%xmm0, %xmm6
	pand	%xmm0, %xmm7
	paddd	%xmm4, %xmm6
	pmulld	%xmm2, %xmm6
	paddd	%xmm5, %xmm7
	pmulld	%xmm3, %xmm7
	paddd	%xmm1, %xmm6
	paddd	%xmm1, %xmm7
	psrad	$8, %xmm6
	psrad	$8, %xmm7
	movdqu	%xmm6, (%rbx,%rdx)
	movdqu	%xmm7, 16(%rbx,%rdx)
	addq	$32, %rdx
	cmpq	%rdx, %r13
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, %r14
	cmpq	%rax, %rcx
	je	LBB0_2
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r14d, %r14d
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdx
	testb	$1, %al
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rsi,%r14,4), %ecx
	btl	$1, %ecx
	adcl	$0, %ecx
	imull	(%rdi,%r14,4), %ecx
	subl	$-128, %ecx
	sarl	$8, %ecx
	movl	%ecx, (%rbx,%r14,4)
	movq	%r14, %rdx
	orq	$1, %rdx
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	notq	%r14
	cmpq	-80(%rbp), %r14                 ## 8-byte Folded Reload
	je	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rsi,%rdx,4), %ecx
	btl	$1, %ecx
	adcl	$0, %ecx
	imull	(%rdi,%rdx,4), %ecx
	subl	$-128, %ecx
	sarl	$8, %ecx
	movl	%ecx, (%rbx,%rdx,4)
	movl	4(%rsi,%rdx,4), %ecx
	btl	$1, %ecx
	adcl	$0, %ecx
	imull	4(%rdi,%rdx,4), %ecx
	subl	$-128, %ecx
	sarl	$8, %ecx
	movl	%ecx, 4(%rbx,%rdx,4)
	addq	$2, %rdx
	cmpq	%rdx, %rax
	jne	LBB0_15
	jmp	LBB0_2
LBB0_16:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_premultiply8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function premultiply8
_premultiply8:                          ; @premultiply8
	.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
                                        ; kill: def $w5 killed $w5 def $x5
                                        ; kill: def $w4 killed $w4 def $x4
                                        ; kill: def $w3 killed $w3 def $x3
	cmp	w7, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x8, #0
	mov	w9, w6
	sbfiz	x10, x5, #2, #32
	sbfiz	x11, x3, #2, #32
	sbfiz	x12, x4, #2, #32
	and	x13, x9, #0xfffffff0
	lsl	x14, x9, #2
	and	x14, x14, #0x3ffffffc0
	orr	w15, wzr, #0x80
	movi.4s	v0, #1
	mov	x16, x1
	mov	x17, x0
	mov	x3, x2
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #1
	add	x3, x3, x10
	add	x17, x17, x11
	add	x16, x16, x12
	cmp	w8, w7
	b.eq	LBB0_12
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;     Child Loop BB0_11 Depth 2
	cmp	w6, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w6, #16
	b.hs	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x4, #0
	b	LBB0_11
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x4, #0
	madd	x5, x10, x8, x2
	madd	x19, x11, x8, x0
	sub	x19, x5, x19
	cmp	x19, #64
	b.lo	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	madd	x19, x12, x8, x1
	sub	x5, x5, x19
	cmp	x5, #64
	b.lo	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x4, #0
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x5, x17, x4
	ldp	q1, q2, [x5]
	ldp	q3, q4, [x5, #32]
	add	x5, x16, x4
	ldp	q5, q6, [x5]
	ldp	q7, q16, [x5, #32]
	ushr.4s	v17, v5, #1
	ushr.4s	v18, v6, #1
	ushr.4s	v19, v7, #1
	ushr.4s	v20, v16, #1
	and.16b	v17, v17, v0
	and.16b	v18, v18, v0
	and.16b	v19, v19, v0
	and.16b	v20, v20, v0
	add.4s	v5, v17, v5
	add.4s	v6, v18, v6
	add.4s	v7, v19, v7
	add.4s	v16, v20, v16
	movi.4s	v17, #128
	mla.4s	v17, v5, v1
	movi.4s	v1, #128
	mla.4s	v1, v6, v2
	movi.4s	v2, #128
	mla.4s	v2, v7, v3
	movi.4s	v3, #128
	mla.4s	v3, v16, v4
	sshr.4s	v4, v17, #8
	sshr.4s	v1, v1, #8
	sshr.4s	v2, v2, #8
	sshr.4s	v3, v3, #8
	add	x5, x3, x4
	stp	q4, q1, [x5]
	stp	q2, q3, [x5, #32]
	add	x4, x4, #64
	cmp	x14, x4
	b.ne	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x4, x13
	cmp	x13, x9
	b.eq	LBB0_2
LBB0_11:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x5, x4, #2
	ldr	w19, [x17, x5]
	ldr	w20, [x16, x5]
	ubfx	w21, w20, #1, #1
	add	w20, w21, w20
	madd	w19, w20, w19, w15
	asr	w19, w19, #8
	str	w19, [x3, x5]
	add	x4, x4, #1
	cmp	x9, x4
	b.ne	LBB0_11
	b	LBB0_2
LBB0_12:
	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	_premultiply8
.subsections_via_symbols
