	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mangle_rgb_planes
_mangle_rgb_planes:                     ## @mangle_rgb_planes
	.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
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	cmpl	$0, 16(%rbp)
	jle	LBB0_14
## %bb.1:
	movq	24(%rdx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rdx), %r13
	movq	(%rdx), %r11
	movq	8(%rdx), %r14
	leal	(%rsi,%rsi), %edx
	subl	%r9d, %esi
	movl	%r9d, %r15d
	xorl	%edi, %edi
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	jmp	LBB0_2
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movslq	12(%r8), %rax
	leaq	(%rbx,%rax,4), %rbx
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	addl	%esi, %edx
	movslq	(%r8), %rax
	leaq	(%r11,%rax,4), %r11
	movslq	4(%r8), %rax
	leaq	(%r14,%rax,4), %r14
	movslq	8(%r8), %rax
	leaq	(%r13,%rax,4), %r13
	incl	%edi
	cmpl	16(%rbp), %edi
	je	LBB0_14
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_7 Depth 2
	cmpl	$3, %ecx
	jne	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r9d, %r9d
	jle	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	movslq	%edx, %r12
	shlq	$2, %r12
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %r10
	addq	%r12, %r10
	movq	8(%rdx), %rax
	addq	%r12, %rax
	addq	16(%rdx), %r12
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r11,%rdi,4), %ebx
	movl	%ebx, (%r10,%rdi,4)
	subl	$-128, %ebx
	movl	(%r14,%rdi,4), %edx
	subl	%ebx, %edx
	movl	%edx, (%rax,%rdi,4)
	movl	(%r13,%rdi,4), %edx
	subl	%ebx, %edx
	movl	%edx, (%r12,%rdi,4)
	incq	%rdi
	cmpq	%rdi, %r15
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	addl	%edi, %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%r9d, %r9d
	jle	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	%r9d, %r8d
	movl	%edx, %edi
	movslq	%edx, %rax
	shlq	$2, %rax
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %r10
	addq	%rax, %r10
	movq	8(%rdx), %r12
	addq	%rax, %r12
	movq	16(%rdx), %rcx
	addq	%rax, %rcx
	addq	24(%rdx), %rax
	xorl	%r9d, %r9d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r11,%r9,4), %edx
	movl	%edx, (%r10,%r9,4)
	subl	$-128, %edx
	movl	(%r14,%r9,4), %esi
	subl	%edx, %esi
	movl	%esi, (%r12,%r9,4)
	movl	(%r13,%r9,4), %esi
	subl	%edx, %esi
	movl	%esi, (%rcx,%r9,4)
	movl	(%rbx,%r9,4), %edx
	movl	%edx, (%rax,%r9,4)
	incq	%r9
	cmpq	%r9, %r15
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%edi, %edx
	addl	%r9d, %edx
	movl	%r8d, %r9d
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_12
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mangle_rgb_planes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mangle_rgb_planes
_mangle_rgb_planes:                     ; @mangle_rgb_planes
	.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	w6, #1
	b.lt	LBB0_13
; %bb.1:
	mov	w8, #0
	ldp	x10, x9, [x2, #16]
	lsl	w11, w1, #1
	sub	w12, w1, w5
	mov	w13, w5
	ldp	x15, x14, [x2]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldrsw	x16, [x4, #12]
	add	x9, x9, x16, lsl #2
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w11, w12, w11
	ldpsw	x16, x17, [x4]
	add	x15, x15, x16, lsl #2
	add	x14, x14, x17, lsl #2
	ldrsw	x16, [x4, #8]
	add	x10, x10, x16, lsl #2
	add	w8, w8, #1
	cmp	w8, w6
	b.eq	LBB0_13
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
                                        ;     Child Loop BB0_7 Depth 2
	cmp	w3, #3
	b.ne	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w5, #1
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x16, #0
	ldp	x17, x1, [x0]
	ldr	x2, [x0, #16]
	mov	x7, x11
	sbfiz	x7, x7, #2, #32
	add	x17, x17, x7
	add	x1, x1, x7
	add	x2, x2, x7
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x7, x16, #2
	ldr	w19, [x15, x7]
	str	w19, [x17, x7]
	ldr	w20, [x14, x7]
	add	w19, w19, #128
	sub	w20, w20, w19
	str	w20, [x1, x7]
	ldr	w20, [x10, x7]
	sub	w19, w20, w19
	str	w19, [x2, x7]
	add	x16, x16, #1
	cmp	x13, x16
	b.ne	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w11, w11, w16
	b	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w5, #1
	b.lt	LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x16, #0
	ldp	x17, x1, [x0]
	sbfiz	x7, x11, #2, #32
	ldp	x2, x19, [x0, #16]
	add	x17, x17, x7
	add	x1, x1, x7
	add	x2, x2, x7
	add	x7, x19, x7
LBB0_11:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x19, x16, #2
	ldr	w20, [x15, x19]
	str	w20, [x17, x19]
	add	w20, w20, #128
	ldr	w21, [x14, x19]
	sub	w21, w21, w20
	str	w21, [x1, x19]
	ldr	w21, [x10, x19]
	sub	w20, w21, w20
	str	w20, [x2, x19]
	ldr	w20, [x9, x19]
	str	w20, [x7, x19]
	add	x16, x16, #1
	cmp	x13, x16
	b.ne	LBB0_11
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	add	w11, w11, w16
	b	LBB0_2
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	_mangle_rgb_planes
.subsections_via_symbols
