	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function restore_rgb_planes_c
LCPI0_0:
	.quad	-128                            ## 0xffffffffffffff80
	.quad	-128                            ## 0xffffffffffffff80
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_restore_rgb_planes_c:                  ## @restore_rgb_planes_c
	.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, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	24(%rbp), %r10d
	testl	%r10d, %r10d
	jle	LBB0_17
## %bb.1:
	movl	16(%rbp), %ebx
	movslq	%ecx, %rax
	movslq	%r8d, %rcx
	movslq	%r9d, %rdx
	movl	%ebx, %r12d
	movl	%r12d, %esi
	andl	$-4, %esi
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	negq	%rsi
	movq	%rsi, -120(%rbp)                ## 8-byte Spill
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	leaq	(,%rax,8), %r15
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	leaq	(,%rcx,8), %r13
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	leaq	(,%rdx,8), %rax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	leaq	(,%r12,8), %r11
	andq	$-32, %r11
	xorl	%r8d, %r8d
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [18446744073709551488,18446744073709551488]
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	%r15, %rdi
	addq	%r13, %rsi
	addq	-128(%rbp), %rdx                ## 8-byte Folded Reload
	incq	%r8
	cmpl	%r10d, %r8d
	je	LBB0_17
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_15 Depth 2
	testl	%ebx, %ebx
	jle	LBB0_16
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$4, %ebx
	jae	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r8, %r9
	imulq	-112(%rbp), %r9                 ## 8-byte Folded Reload
	addq	%r12, %r9
	movq	%r8, %rbx
	imulq	-96(%rbp), %rbx                 ## 8-byte Folded Reload
	addq	%r12, %rbx
	movq	%r8, %rcx
	imulq	-104(%rbp), %rcx                ## 8-byte Folded Reload
	addq	%r12, %rcx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r9,8), %r9
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rbx,8), %rbx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rcx,8), %rcx
	cmpq	%rbx, %rdi
	setb	%r10b
	cmpq	%r9, %rdx
	setb	%r15b
	cmpq	%rcx, %rdi
	setb	%r13b
	cmpq	%r9, %rsi
	setb	%r14b
	cmpq	%rcx, %rdx
	setb	%al
	cmpq	%rbx, %rsi
	setb	%r9b
	testb	%r15b, %r10b
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	andb	%r14b, %r13b
	jne	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, %r14d
	andb	%r9b, %al
	movl	24(%rbp), %r10d
	movl	16(%rbp), %ebx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	(%rdi,%rax), %xmm1
	movdqu	16(%rdi,%rax), %xmm2
	movdqu	(%rsi,%rax), %xmm3
	movdqu	16(%rsi,%rax), %xmm4
	movdqu	(%rdx,%rax), %xmm5
	movdqu	16(%rdx,%rax), %xmm6
	paddq	%xmm0, %xmm3
	paddq	%xmm0, %xmm4
	paddq	%xmm3, %xmm1
	paddq	%xmm4, %xmm2
	movdqu	%xmm1, (%rdi,%rax)
	movdqu	%xmm2, 16(%rdi,%rax)
	paddq	%xmm5, %xmm3
	paddq	%xmm6, %xmm4
	movdqu	%xmm3, (%rdx,%rax)
	movdqu	%xmm4, 16(%rdx,%rax)
	addq	$32, %rax
	cmpq	%rax, %r11
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %r14
	cmpq	%r12, %rax
	je	LBB0_16
	jmp	LBB0_12
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r14d, %r14d
	movl	24(%rbp), %r10d
	movl	16(%rbp), %ebx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %r9
	testb	$1, %r12b
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rsi,%r14,8), %rax
	addq	$-128, %rax
	movq	(%rdx,%r14,8), %rcx
	addq	%rax, (%rdi,%r14,8)
	addq	%rax, %rcx
	movq	%rcx, (%rdx,%r14,8)
	movq	%r14, %r9
	orq	$1, %r9
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	notq	%r14
	cmpq	-120(%rbp), %r14                ## 8-byte Folded Reload
	je	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rsi,%r9,8), %rax
	addq	$-128, %rax
	movq	(%rdx,%r9,8), %rcx
	addq	%rax, (%rdi,%r9,8)
	addq	%rax, %rcx
	movq	%rcx, (%rdx,%r9,8)
	movq	8(%rsi,%r9,8), %rax
	addq	$-128, %rax
	movq	8(%rdx,%r9,8), %rcx
	addq	%rax, 8(%rdi,%r9,8)
	addq	%rax, %rcx
	movq	%rcx, 8(%rdx,%r9,8)
	addq	$2, %r9
	cmpq	%r9, %r12
	jne	LBB0_15
	jmp	LBB0_16
LBB0_17:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_restore_rgb_planes_c
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function restore_rgb_planes_c
_restore_rgb_planes_c:                  ; @restore_rgb_planes_c
	.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 $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_13
; %bb.1:
	mov	x8, #0
	sxtw	x9, w3
	sxtw	x10, w4
	sxtw	x11, w5
	mov	w12, w6
	and	x13, x12, #0xfffffffc
	lsl	x14, x12, #3
	and	x14, x14, #0x7ffffffe0
	sbfiz	x15, x3, #3, #32
	sbfiz	x16, x5, #3, #32
	mov	x17, #-128
	dup.2d	v0, x17
	mov	x17, x1
	mov	x3, x2
	mov	x5, x0
	sbfiz	x4, x4, #3, #32
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x5, x5, x15
	add	x17, x17, x4
	add	x3, x3, x16
	add	x8, x8, #1
	cmp	w8, w7
	b.eq	LBB0_13
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;     Child Loop BB0_12 Depth 2
	cmp	w6, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w6, #4
	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, x8, x9, x12
	add	x22, x0, x20, lsl #3
	madd	x20, x8, x11, x12
	add	x23, x2, x20, lsl #3
	madd	x20, x8, x10, x12
	add	x21, x1, x20, lsl #3
	cmp	x5, x21
	ccmp	x17, x22, #2, lo
	cset	w20, lo
	cmp	x3, x21
	ccmp	x17, x23, #2, lo
	cset	w21, lo
	cmp	x3, x22
	ccmp	x5, x23, #2, lo
	b.lo	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	tbnz	w20, #0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	tbnz	w21, #0, 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, x5, x19
	ldp	q1, q2, [x20]
	add	x21, x17, x19
	ldp	q3, q4, [x21]
	add	x21, x3, x19
	ldp	q5, q6, [x21]
	add.2d	v3, v3, v0
	add.2d	v4, v4, v0
	add.2d	v1, v3, v1
	add.2d	v2, v4, v2
	stp	q1, q2, [x20]
	add.2d	v1, v3, v5
	add.2d	v2, v4, v6
	stp	q1, q2, [x21]
	add	x19, x19, #32
	cmp	x14, x19
	b.ne	LBB0_10
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x19, x13
	cmp	x13, x12
	b.eq	LBB0_2
LBB0_12:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x20, x19, #3
	ldr	x21, [x5, x20]
	ldr	x22, [x17, x20]
	ldr	x23, [x3, x20]
	sub	x22, x22, #128
	add	x21, x22, x21
	str	x21, [x5, x20]
	add	x21, x22, x23
	str	x21, [x3, x20]
	add	x19, x19, #1
	cmp	x12, 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	_restore_rgb_planes_c
.subsections_via_symbols
