	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function premultiply16yuv
LCPI0_0:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_premultiply16yuv:                      ## @premultiply16yuv
	.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	%ecx, %r11d
	movl	40(%rbp), %ecx
	movl	32(%rbp), %r14d
	movl	16(%rbp), %eax
	movl	%r9d, %edx
	shrl	$31, %edx
	addl	%r9d, %edx
	movl	%eax, %r9d
	sarl	%edx
	movslq	%edx, %rax
	movl	%r11d, %edx
	shrl	$31, %edx
	addl	%r11d, %edx
	sarl	%edx
	movslq	%edx, %r11
	movl	%r8d, %edx
	shrl	$31, %edx
	addl	%r8d, %edx
	sarl	%edx
	movslq	%edx, %rdx
	movl	%r9d, %r12d
	shlq	$2, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	shlq	$2, %r11
	shlq	$2, %rdx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%r12d, %eax
	andl	$-8, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movd	%r14d, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movd	%ecx, %xmm2
	movq	%r12, %rax
	negq	%rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	(,%r12,4), %r13
	andq	$-32, %r13
	xorl	%r15d, %r15d
	movdqa	LCPI0_0(%rip), %xmm8            ## xmm8 = [1,1,1,1]
	pmovzxdq	%xmm2, %xmm2                    ## xmm2 = xmm2[0],zero,xmm2[1],zero
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	-80(%rbp), %rdx                 ## 8-byte Folded Reload
	addq	%r11, %rdi
	addq	-72(%rbp), %rsi                 ## 8-byte Folded Reload
	incq	%r15
	cmpl	24(%rbp), %r15d
	je	LBB0_16
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
                                        ##     Child Loop BB0_14 Depth 2
	testl	%r9d, %r9d
	jle	LBB0_15
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$8, %r9d
	jae	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r8d, %r8d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	imulq	%r15, %r9
	addq	-64(%rbp), %r9                  ## 8-byte Folded Reload
	movq	%r11, %rbx
	imulq	%r15, %rbx
	addq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	movq	%r9, %r10
	subq	%rbx, %r10
	cmpq	$32, %r10
	jb	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	imulq	%r15, %rbx
	addq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	subq	%rbx, %r9
	movl	$0, %r8d
	cmpq	$32, %r9
	movl	16(%rbp), %r9d
	jb	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	(%rdi,%rbx), %xmm3
	movdqu	16(%rdi,%rbx), %xmm4
	psubd	%xmm0, %xmm3
	psubd	%xmm0, %xmm4
	movdqu	(%rsi,%rbx), %xmm5
	movdqu	16(%rsi,%rbx), %xmm1
	movdqa	%xmm5, %xmm7
	psrld	$1, %xmm7
	movdqa	%xmm1, %xmm6
	psrld	$1, %xmm6
	pand	%xmm8, %xmm7
	pand	%xmm8, %xmm6
	paddd	%xmm5, %xmm7
	pmulld	%xmm3, %xmm7
	paddd	%xmm1, %xmm6
	pmulld	%xmm4, %xmm6
	psrad	%xmm2, %xmm7
	psrad	%xmm2, %xmm6
	paddd	%xmm0, %xmm7
	paddd	%xmm0, %xmm6
	movdqu	%xmm7, (%rdx,%rbx)
	movdqu	%xmm6, 16(%rdx,%rbx)
	addq	$32, %rbx
	cmpq	%rbx, %r13
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %r8
	cmpq	%r12, %rax
	je	LBB0_15
	jmp	LBB0_11
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r8d, %r8d
	movl	16(%rbp), %r9d
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r8, %r10
	testb	$1, %r12b
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rdi,%r8,4), %r9d
	subl	%r14d, %r9d
	movl	(%rsi,%r8,4), %ebx
	btl	$1, %ebx
	adcl	$0, %ebx
	imull	%r9d, %ebx
	movl	16(%rbp), %r9d
	sarl	%cl, %ebx
	addl	%r14d, %ebx
	movl	%ebx, (%rdx,%r8,4)
	movq	%r8, %r10
	orq	$1, %r10
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	notq	%r8
	cmpq	-96(%rbp), %r8                  ## 8-byte Folded Reload
	je	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rdi,%r10,4), %ebx
	subl	%r14d, %ebx
	movl	(%rsi,%r10,4), %eax
	btl	$1, %eax
	adcl	$0, %eax
	imull	%ebx, %eax
	sarl	%cl, %eax
	addl	%r14d, %eax
	movl	%eax, (%rdx,%r10,4)
	movl	4(%rdi,%r10,4), %eax
	subl	%r14d, %eax
	movl	4(%rsi,%r10,4), %ebx
	btl	$1, %ebx
	adcl	$0, %ebx
	imull	%eax, %ebx
	sarl	%cl, %ebx
	addl	%r14d, %ebx
	movl	%ebx, 4(%rdx,%r10,4)
	addq	$2, %r10
	cmpq	%r10, %r12
	jne	LBB0_14
	jmp	LBB0_15
LBB0_16:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_premultiply16yuv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function premultiply16yuv
_premultiply16yuv:                      ; @premultiply16yuv
	.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
	cmp	w7, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x8, #0
	ldp	w10, w9, [sp, #32]
	cmp	w5, #0
	cinc	w11, w5, lt
	asr	w12, w11, #1
	cmp	w3, #0
	cinc	w11, w3, lt
	asr	w13, w11, #1
	cmp	w4, #0
	cinc	w11, w4, lt
	asr	w14, w11, #1
	mov	w11, w6
	sbfiz	x12, x12, #2, #32
	sbfiz	x13, x13, #2, #32
	sbfiz	x14, x14, #2, #32
	and	x15, x11, #0xfffffff0
	dup.4s	v0, w10
	dup.4s	v2, w9
	lsl	x16, x11, #2
	and	x16, x16, #0x3ffffffc0
	movi.4s	v1, #1
	neg.4s	v2, v2
	mov	x17, x1
	mov	x3, x0
	mov	x4, x2
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #1
	add	x4, x4, x12
	add	x3, x3, x13
	add	x17, x17, x14
	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	x5, #0
	b	LBB0_11
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x5, #0
	madd	x19, x12, x8, x2
	madd	x20, x13, x8, x0
	sub	x20, x19, x20
	cmp	x20, #64
	b.lo	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	madd	x20, x14, x8, x1
	sub	x19, x19, x20
	cmp	x19, #64
	b.lo	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x5, #0
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x19, x3, x5
	ldp	q3, q4, [x19]
	ldp	q5, q6, [x19, #32]
	sub.4s	v3, v3, v0
	sub.4s	v4, v4, v0
	sub.4s	v5, v5, v0
	sub.4s	v6, v6, v0
	add	x19, x17, x5
	ldp	q7, q16, [x19]
	ldp	q17, q18, [x19, #32]
	ushr.4s	v19, v7, #1
	ushr.4s	v20, v16, #1
	ushr.4s	v21, v17, #1
	ushr.4s	v22, v18, #1
	and.16b	v19, v19, v1
	and.16b	v20, v20, v1
	and.16b	v21, v21, v1
	and.16b	v22, v22, v1
	add.4s	v7, v19, v7
	add.4s	v16, v20, v16
	add.4s	v17, v21, v17
	add.4s	v18, v22, v18
	mul.4s	v3, v7, v3
	mul.4s	v4, v16, v4
	mul.4s	v5, v17, v5
	mul.4s	v6, v18, v6
	sshl.4s	v3, v3, v2
	sshl.4s	v4, v4, v2
	sshl.4s	v5, v5, v2
	sshl.4s	v6, v6, v2
	add.4s	v3, v3, v0
	add.4s	v4, v4, v0
	add.4s	v5, v5, v0
	add.4s	v6, v6, v0
	add	x19, x4, x5
	stp	q3, q4, [x19]
	stp	q5, q6, [x19, #32]
	add	x5, x5, #64
	cmp	x16, x5
	b.ne	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x5, x15
	cmp	x15, x11
	b.eq	LBB0_2
LBB0_11:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x19, x5, #2
	ldr	w20, [x3, x19]
	sub	w20, w20, w10
	ldr	w21, [x17, x19]
	ubfx	w22, w21, #1, #1
	add	w21, w22, w21
	mul	w20, w21, w20
	asr	w20, w20, w9
	add	w20, w20, w10
	str	w20, [x4, x19]
	add	x5, x5, #1
	cmp	x11, x5
	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	_premultiply16yuv
.subsections_via_symbols
