	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_plane
_encode_plane:                          ## @encode_plane
	.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
	subq	$344, %rsp                      ## imm = 0x158
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -108(%rbp)                ## 4-byte Spill
	movl	%r8d, -120(%rbp)                ## 4-byte Spill
	movl	%ecx, %r15d
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	32(%rdi), %rax
	movq	%rax, -368(%rbp)                ## 8-byte Spill
	cmpq	$1, %rax
	movl	$3, %eax
	sbbl	$0, %eax
	movq	$0, 24(%rdi)
	movq	(%rdi), %rdi
	leal	6(%rbx), %edx
	movl	%edx, -144(%rbp)                ## 4-byte Spill
	movl	%eax, -148(%rbp)                ## 4-byte Spill
	imull	%eax, %edx
	shll	$2, %edx
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_memset
	testl	%r15d, %r15d
	jle	LBB0_57
## %bb.1:
	movl	16(%rbp), %eax
	movslq	%eax, %rcx
	movl	%ebx, %edx
	leaq	-1(%rdx), %r8
	movl	%edx, %esi
	andl	$-8, %esi
	movq	%rsi, -184(%rbp)                ## 8-byte Spill
	addq	$-8, %rsi
	movq	%rsi, -176(%rbp)                ## 8-byte Spill
	shrq	$3, %rsi
	incq	%rsi
	movl	%esi, %edi
	andl	$3, %edi
	movq	%rbx, %r9
	movq	%rsi, %rbx
	andq	$-4, %rbx
	movq	%rbx, -248(%rbp)                ## 8-byte Spill
	movl	%edx, %eax
	andl	$3, %eax
	movq	%rax, -192(%rbp)                ## 8-byte Spill
	movq	%r8, -160(%rbp)                 ## 8-byte Spill
	andq	$-8, %r8
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	negq	%rdx
	movq	%rdx, -256(%rbp)                ## 8-byte Spill
	cmpl	$8, %r9d
	movl	$16, %eax
	movd	%eax, %xmm0
	movdqa	%xmm0, -384(%rbp)               ## 16-byte Spill
	setb	%al
	cmpl	$1, %ecx
	setne	%dl
	orb	%al, %dl
	movb	%dl, -81(%rbp)                  ## 1-byte Spill
	leal	-1(%r9), %eax
	cltq
	movq	%rax, -360(%rbp)                ## 8-byte Spill
	movslq	-120(%rbp), %r11                ## 4-byte Folded Reload
	movabsq	$4611686018427387900, %rdx      ## imm = 0x3FFFFFFFFFFFFFFC
	orq	$2, %rdx
	movq	%rsi, %rax
	movq	%rsi, -304(%rbp)                ## 8-byte Spill
	andq	%rsi, %rdx
	movq	%rdx, -280(%rbp)                ## 8-byte Spill
	movq	%rdi, -288(%rbp)                ## 8-byte Spill
	shlq	$5, %rdi
	movq	%rdi, -168(%rbp)                ## 8-byte Spill
	movq	%rcx, %rax
	shlq	$5, %rax
	movq	%rax, -272(%rbp)                ## 8-byte Spill
	movq	%rcx, %rax
	shlq	$6, %rax
	movq	%rax, -264(%rbp)                ## 8-byte Spill
	movq	%rcx, %rbx
	shlq	$4, %rbx
	movq	%r12, %rsi
	movslq	%r9d, %r12
	movl	%r15d, -140(%rbp)               ## 4-byte Spill
	movl	%r15d, %eax
	movq	%rax, -336(%rbp)                ## 8-byte Spill
	leaq	(,%r11,4), %rax
	leaq	8(%r13), %rdx
	movq	%rdx, -240(%rbp)                ## 8-byte Spill
	movq	%r8, -232(%rbp)                 ## 8-byte Spill
	leaq	1(%r8), %rdx
	movq	%rdx, -224(%rbp)                ## 8-byte Spill
	leaq	112(%rsi), %r15
	leaq	16(%rsi), %rdx
	movq	%rdx, -200(%rbp)                ## 8-byte Spill
	movq	%rcx, -128(%rbp)                ## 8-byte Spill
	leaq	(,%rcx,4), %rcx
	movq	%rcx, -296(%rbp)                ## 8-byte Spill
	xorl	%ecx, %ecx
	movq	%rcx, -208(%rbp)                ## 8-byte Spill
	xorl	%ecx, %ecx
	movq	%rcx, -216(%rbp)                ## 8-byte Spill
	movq	%r13, %rdi
	movq	%rsi, %r13
	xorl	%edx, %edx
	movq	%r9, %rcx
	movq	%r9, %r14
	movq	%r9, -352(%rbp)                 ## 8-byte Spill
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movq	%rdi, -136(%rbp)                ## 8-byte Spill
	movq	%r11, -344(%rbp)                ## 8-byte Spill
	movq	%rbx, -312(%rbp)                ## 8-byte Spill
	movq	%r12, -320(%rbp)                ## 8-byte Spill
	movq	%rax, -328(%rbp)                ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	8(%rdi), %r8d
	movl	%r14d, %esi
	leaq	-80(%rbp), %rdx
	movl	-108(%rbp), %ecx                ## 4-byte Reload
	callq	_encode_line
	testl	%eax, %eax
	js	LBB0_56
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-120(%rbp), %rdx                ## 8-byte Reload
	incq	%rdx
	movq	-328(%rbp), %rax                ## 8-byte Reload
	addq	%rax, %r15
	addq	%rax, %r13
	addq	%rax, -200(%rbp)                ## 8-byte Folded Spill
	movq	-344(%rbp), %r11                ## 8-byte Reload
	addq	%r11, -216(%rbp)                ## 8-byte Folded Spill
	addq	%rax, -208(%rbp)                ## 8-byte Folded Spill
	cmpq	-336(%rbp), %rdx                ## 8-byte Folded Reload
	movq	-352(%rbp), %r14                ## 8-byte Reload
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	je	LBB0_54
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_40 Depth 2
                                        ##     Child Loop BB0_43 Depth 2
                                        ##     Child Loop BB0_46 Depth 2
                                        ##     Child Loop BB0_48 Depth 2
                                        ##     Child Loop BB0_22 Depth 2
                                        ##     Child Loop BB0_53 Depth 2
                                        ##     Child Loop BB0_26 Depth 2
                                        ##     Child Loop BB0_32 Depth 2
                                        ##     Child Loop BB0_35 Depth 2
	movq	%rax, %r8
	imulq	%rdx, %r8
	movq	(%rdi), %rbx
	movl	-140(%rbp), %eax                ## 4-byte Reload
	movl	%eax, %ecx
	movq	%rdx, -120(%rbp)                ## 8-byte Spill
	subl	%edx, %ecx
	movl	%ecx, %eax
	cltd
	movl	-148(%rbp), %r9d                ## 4-byte Reload
	idivl	%r9d
	movl	%edx, %esi
	movl	-144(%rbp), %r10d               ## 4-byte Reload
	imull	%r10d, %esi
	leal	1(%rcx), %eax
	cltd
	idivl	%r9d
	imull	%r10d, %edx
	movslq	%esi, %rax
	leaq	(%rbx,%rax,4), %rax
	addq	$12, %rax
	movq	%rax, -80(%rbp)
	movslq	%edx, %rax
	leaq	(%rbx,%rax,4), %rax
	addq	$12, %rax
	movq	%rax, -72(%rbp)
	cmpq	$0, -368(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	addq	$12, %rbx
	addl	$2, %ecx
	movl	%ecx, %eax
	cltd
	idivl	%r9d
	imull	%r10d, %edx
	movslq	%edx, %rax
	leaq	(%rbx,%rax,4), %rax
	movq	%rax, -64(%rbp)
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-120(%rbp), %r10                ## 8-byte Reload
	imulq	%r11, %r10
	addq	-104(%rbp), %r8                 ## 8-byte Folded Reload
	movq	-80(%rbp), %rax
	movq	-72(%rbp), %rcx
	movl	(%rcx), %esi
	movl	%esi, -4(%rax)
	movq	-360(%rbp), %rsi                ## 8-byte Reload
	movl	(%rcx,%rsi,4), %esi
	movl	%esi, (%rcx,%r12,4)
	movl	8(%rdi), %esi
	cmpl	$8, %esi
	jg	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	testl	%r14d, %r14d
	jle	LBB0_36
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rcx
	subq	%r8, %rcx
	cmpq	$32, %rcx
	setb	%cl
	orb	-81(%rbp), %cl                  ## 1-byte Folded Reload
	je	LBB0_24
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%ecx, %ecx
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_30
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 16(%rdi)
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	testl	%r14d, %r14d
	movq	-96(%rbp), %r9                  ## 8-byte Reload
	jle	LBB0_2
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$8, %r14d
	jb	LBB0_38
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rdx
	subq	%r8, %rdx
	movl	$0, %ecx
	cmpq	$32, %rdx
	jb	LBB0_45
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$24, -176(%rbp)                 ## 8-byte Folded Reload
	jae	LBB0_39
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	xorl	%ecx, %ecx
	movq	-168(%rbp), %rbx                ## 8-byte Reload
	jmp	LBB0_41
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	testl	%r14d, %r14d
	movq	-96(%rbp), %r9                  ## 8-byte Reload
	jle	LBB0_2
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movl	(%rcx,%r10,4), %ebx
	movb	$16, %cl
	subb	%sil, %cl
	sarl	%cl, %ebx
	movl	%ebx, (%rax)
	cmpl	$1, %r14d
	je	LBB0_2
## %bb.18:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %r8d
	cmpq	$8, -160(%rbp)                  ## 8-byte Folded Reload
	jb	LBB0_50
## %bb.19:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	(%r10,%r9), %rcx
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	leaq	(%rdx,%r10,4), %rsi
	addq	$4, %rsi
	leaq	(%rdx,%rcx,4), %rdx
	leaq	4(%rax), %rcx
	leaq	(%rax,%r9,4), %rdi
	movq	-240(%rbp), %rbx                ## 8-byte Reload
	cmpq	%rbx, %rax
	setb	%r9b
	cmpq	%rdi, %rbx
	setb	%bl
	cmpq	%rdx, %rcx
	setb	%cl
	cmpq	%rdi, %rsi
	setb	%dil
	testb	%bl, %r9b
	jne	LBB0_49
## %bb.20:                              ##   in Loop: Header=BB0_4 Depth=1
	andb	%dil, %cl
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	movq	-96(%rbp), %r9                  ## 8-byte Reload
	jne	LBB0_50
## %bb.21:                              ##   in Loop: Header=BB0_4 Depth=1
	movd	8(%rdi), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	movdqa	-384(%rbp), %xmm0               ## 16-byte Reload
	psubd	%xmm1, %xmm0
	xorl	%ecx, %ecx
	movq	-232(%rbp), %rsi                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_22:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	4(%r13,%rcx,4), %xmm1
	movdqu	20(%r13,%rcx,4), %xmm2
	pmovzxdq	%xmm0, %xmm3                    ## xmm3 = xmm0[0],zero,xmm0[1],zero
	psrad	%xmm3, %xmm1
	psrad	%xmm3, %xmm2
	movdqu	%xmm1, 4(%rax,%rcx,4)
	movdqu	%xmm2, 20(%rax,%rcx,4)
	addq	$8, %rcx
	cmpq	%rcx, %rsi
	jne	LBB0_22
## %bb.23:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-224(%rbp), %r8                 ## 8-byte Reload
	cmpq	%rsi, -160(%rbp)                ## 8-byte Folded Reload
	je	LBB0_2
	jmp	LBB0_50
LBB0_24:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, -176(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_37
## %bb.25:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-280(%rbp), %rsi                ## 8-byte Reload
	movq	-200(%rbp), %rbx                ## 8-byte Reload
	xorl	%ecx, %ecx
	movq	-96(%rbp), %r8                  ## 8-byte Reload
	movq	-272(%rbp), %rdx                ## 8-byte Reload
	movq	-264(%rbp), %r9                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_26:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rbx), %xmm0
	movups	(%rbx), %xmm1
	movups	%xmm0, (%rax,%rcx,4)
	movups	%xmm1, 16(%rax,%rcx,4)
	movdqu	-16(%rbx,%rdx), %xmm0
	movdqu	(%rbx,%rdx), %xmm1
	movdqu	%xmm0, 32(%rax,%rcx,4)
	movdqu	%xmm1, 48(%rax,%rcx,4)
	addq	$16, %rcx
	addq	%r9, %rbx
	addq	$-2, %rsi
	jne	LBB0_26
## %bb.27:                              ##   in Loop: Header=BB0_4 Depth=1
	testb	$1, -304(%rbp)                  ## 1-byte Folded Reload
	je	LBB0_29
LBB0_28:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%rcx, %rsi
	imulq	-128(%rbp), %rsi                ## 8-byte Folded Reload
	addq	%r10, %rsi
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	movdqu	(%rdx,%rsi,4), %xmm0
	movdqu	16(%rdx,%rsi,4), %xmm1
	movdqu	%xmm0, (%rax,%rcx,4)
	movdqu	%xmm1, 16(%rax,%rcx,4)
LBB0_29:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-184(%rbp), %rdx                ## 8-byte Reload
	movq	%rdx, %rcx
	cmpq	%r8, %rdx
	movq	%r8, %rdx
	je	LBB0_36
LBB0_30:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%rcx, %r8
	notq	%r8
	addq	%rdx, %r8
	testb	$3, %dl
	je	LBB0_33
## %bb.31:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	imulq	%rcx, %rsi
	addq	-216(%rbp), %rsi                ## 8-byte Folded Reload
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	leaq	(%rdx,%rsi,4), %rsi
	movq	-192(%rbp), %rdx                ## 8-byte Reload
	movq	-296(%rbp), %r9                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_32:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rsi), %ebx
	movl	%ebx, (%rax,%rcx,4)
	incq	%rcx
	addq	%r9, %rsi
	decq	%rdx
	jne	LBB0_32
LBB0_33:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$3, %r8
	movq	-96(%rbp), %r11                 ## 8-byte Reload
	movq	-312(%rbp), %r12                ## 8-byte Reload
	jb	LBB0_36
## %bb.34:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	3(%rcx), %rdx
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	imulq	%rsi, %rdx
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	leaq	(%rbx,%rdx,4), %r8
	leaq	2(%rcx), %rdx
	imulq	%rsi, %rdx
	leaq	(%rbx,%rdx,4), %r9
	movq	%rsi, %rdx
	imulq	%rcx, %rdx
	leaq	(%rbx,%rdx,4), %r10
	leaq	1(%rcx), %rdx
	imulq	%rsi, %rdx
	leaq	(%rbx,%rdx,4), %rbx
	movq	-208(%rbp), %rdx                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_35:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r10,%rdx), %esi
	movl	%esi, (%rax,%rcx,4)
	movl	(%rbx,%rdx), %esi
	movl	%esi, 4(%rax,%rcx,4)
	movl	(%r9,%rdx), %esi
	movl	%esi, 8(%rax,%rcx,4)
	movl	(%r8,%rdx), %esi
	movl	%esi, 12(%rax,%rcx,4)
	addq	$4, %rcx
	addq	%r12, %rdx
	cmpq	%rcx, %r11
	jne	LBB0_35
LBB0_36:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%r14d, %esi
	leaq	-80(%rbp), %rdx
	movl	-108(%rbp), %ecx                ## 4-byte Reload
	movl	$8, %r8d
	callq	_encode_line
	testl	%eax, %eax
	movq	-320(%rbp), %r12                ## 8-byte Reload
	jns	LBB0_3
	jmp	LBB0_56
LBB0_37:                                ##   in Loop: Header=BB0_4 Depth=1
	xorl	%ecx, %ecx
	movq	-96(%rbp), %r8                  ## 8-byte Reload
	testb	$1, -304(%rbp)                  ## 1-byte Folded Reload
	jne	LBB0_28
	jmp	LBB0_29
LBB0_38:                                ##   in Loop: Header=BB0_4 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_45
LBB0_39:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-248(%rbp), %rdx                ## 8-byte Reload
	xorl	%ecx, %ecx
	movq	-168(%rbp), %rbx                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_40:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-112(%r15,%rcx,4), %xmm0
	movups	-96(%r15,%rcx,4), %xmm1
	movups	%xmm0, (%rax,%rcx,4)
	movups	%xmm1, 16(%rax,%rcx,4)
	movups	-80(%r15,%rcx,4), %xmm0
	movups	-64(%r15,%rcx,4), %xmm1
	movups	%xmm0, 32(%rax,%rcx,4)
	movups	%xmm1, 48(%rax,%rcx,4)
	movups	-48(%r15,%rcx,4), %xmm0
	movups	-32(%r15,%rcx,4), %xmm1
	movups	%xmm0, 64(%rax,%rcx,4)
	movups	%xmm1, 80(%rax,%rcx,4)
	movdqu	-16(%r15,%rcx,4), %xmm0
	movdqu	(%r15,%rcx,4), %xmm1
	movdqu	%xmm0, 96(%rax,%rcx,4)
	movdqu	%xmm1, 112(%rax,%rcx,4)
	addq	$32, %rcx
	addq	$-4, %rdx
	jne	LBB0_40
LBB0_41:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, -288(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_44
## %bb.42:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	(%rax,%rcx,4), %rdx
	addq	$16, %rdx
	leaq	(,%rcx,4), %rcx
	addq	%r13, %rcx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_43:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	(%rcx,%rsi), %xmm0
	movdqu	16(%rcx,%rsi), %xmm1
	movdqu	%xmm0, -16(%rdx,%rsi)
	movdqu	%xmm1, (%rdx,%rsi)
	addq	$32, %rsi
	cmpq	%rsi, %rbx
	jne	LBB0_43
LBB0_44:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-184(%rbp), %rdx                ## 8-byte Reload
	movq	%rdx, %rcx
	cmpq	%r9, %rdx
	je	LBB0_2
LBB0_45:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%rcx, %rdx
	notq	%rdx
	addq	%r9, %rdx
	movq	-192(%rbp), %rsi                ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_47
	.p2align	4, 0x90
LBB0_46:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13,%rcx,4), %ebx
	movl	%ebx, (%rax,%rcx,4)
	incq	%rcx
	decq	%rsi
	jne	LBB0_46
LBB0_47:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$3, %rdx
	jb	LBB0_2
	.p2align	4, 0x90
LBB0_48:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13,%rcx,4), %edx
	movl	%edx, (%rax,%rcx,4)
	movl	4(%r13,%rcx,4), %edx
	movl	%edx, 4(%rax,%rcx,4)
	movl	8(%r13,%rcx,4), %edx
	movl	%edx, 8(%rax,%rcx,4)
	movl	12(%r13,%rcx,4), %edx
	movl	%edx, 12(%rax,%rcx,4)
	addq	$4, %rcx
	cmpq	%rcx, %r9
	jne	LBB0_48
	jmp	LBB0_2
LBB0_49:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	movq	-96(%rbp), %r9                  ## 8-byte Reload
LBB0_50:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r8, %rsi
	testb	$1, %r9b
	jne	LBB0_52
## %bb.51:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%r10,4), %rdx
	movb	$16, %cl
	subb	8(%rdi), %cl
	movl	(%rdx,%r8,4), %edx
	sarl	%cl, %edx
	movl	%edx, (%rax,%r8,4)
	leaq	1(%r8), %rsi
LBB0_52:                                ##   in Loop: Header=BB0_4 Depth=1
	notq	%r8
	cmpq	-256(%rbp), %r8                 ## 8-byte Folded Reload
	je	LBB0_2
	.p2align	4, 0x90
LBB0_53:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movb	$16, %cl
	subb	8(%rdi), %cl
	movl	(%r13,%rsi,4), %edx
	sarl	%cl, %edx
	movl	%edx, (%rax,%rsi,4)
	movb	$16, %cl
	subb	8(%rdi), %cl
	movl	4(%r13,%rsi,4), %edx
	sarl	%cl, %edx
	movl	%edx, 4(%rax,%rsi,4)
	addq	$2, %rsi
	cmpq	%rsi, %r9
	jne	LBB0_53
	jmp	LBB0_2
LBB0_56:
	movl	%eax, %r14d
	jmp	LBB0_57
LBB0_54:
	xorl	%r14d, %r14d
LBB0_57:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_59
## %bb.58:
	movl	%r14d, %eax
	addq	$344, %rsp                      ## imm = 0x158
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_59:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_encode_plane
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_plane
_encode_plane:                          ; @encode_plane
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #256
	.cfi_def_cfa_offset 256
	stp	x28, x27, [sp, #160]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #176]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #192]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #208]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #224]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #240]            ; 16-byte Folded Spill
	add	x29, sp, #240
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x6
	str	w5, [sp, #108]                  ; 4-byte Folded Spill
	mov	x25, x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	ldr	x8, [x0, #32]
	str	x8, [sp, #112]                  ; 8-byte Folded Spill
	cmp	x8, #0
	mov	w8, #2
	cinc	w27, w8, ne
	str	xzr, [x0, #24]
	ldr	x0, [x0]
	add	w28, w2, #6
	mul	w8, w28, w27
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_memset
	cmp	w19, #1
	b.lt	LBB0_36
; %bb.1:
	mov	x9, x19
	mov	x19, #0
	mov	w26, w20
	sxtw	x8, w20
	str	x8, [sp, #96]                   ; 8-byte Folded Spill
	sub	x8, x8, #1
	str	x8, [sp, #88]                   ; 8-byte Folded Spill
	sxtw	x11, w25
	sbfiz	x25, x25, #2, #32
	add	x8, x23, #8
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	sub	x8, x26, #1
	and	x10, x26, #0xfffffff0
	stp	x8, x11, [sp, #24]              ; 16-byte Folded Spill
	and	x8, x8, #0xfffffffffffffff0
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	orr	x8, x8, #0x1
	str	x8, [sp]                        ; 8-byte Folded Spill
	cmp	w20, #16
	ccmp	w24, #1, #0, hs
	cset	w8, ne
	str	w8, [sp, #44]                   ; 4-byte Folded Spill
	mov	x1, x20
	add	x20, x21, #32
	sbfiz	x22, x24, #6, #32
	sbfiz	x24, x24, #2, #32
	mov	x13, x21
	mov	w8, w9
	stp	x10, x8, [sp, #48]              ; 16-byte Folded Spill
	str	w9, [sp, #84]                   ; 4-byte Folded Spill
	stp	x21, x1, [sp, #64]              ; 16-byte Folded Spill
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
                                        ;     Child Loop BB0_16 Depth 2
                                        ;     Child Loop BB0_30 Depth 2
                                        ;     Child Loop BB0_33 Depth 2
                                        ;     Child Loop BB0_22 Depth 2
                                        ;     Child Loop BB0_25 Depth 2
	ldr	x8, [x23]
	sub	w9, w9, w19
	add	x8, x8, #12
	sdiv	w10, w9, w27
	msub	w10, w10, w27, w9
	mul	w10, w10, w28
	add	x10, x8, w10, sxtw #2
	add	w11, w9, #1
	sdiv	w12, w11, w27
	msub	w11, w12, w27, w11
	mul	w11, w11, w28
	add	x11, x8, w11, sxtw #2
	stp	x10, x11, [sp, #120]
	ldr	x10, [sp, #112]                 ; 8-byte Folded Reload
	cbz	x10, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w9, w9, #2
	sdiv	w10, w9, w27
	msub	w9, w10, w27, w9
	mul	w9, w9, w28
	add	x8, x8, w9, sxtw #2
	str	x8, [sp, #136]
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	madd	x9, x25, x19, x13
	ldp	x8, x10, [sp, #120]
	ldr	w11, [x10]
	stur	w11, [x8, #-4]
	ldp	x11, x12, [sp, #88]             ; 16-byte Folded Reload
	ldr	w11, [x10, x11, lsl #2]
	str	w11, [x10, x12, lsl #2]
	ldr	w10, [x23, #8]
	cmp	w10, #8
	b.gt	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w1, #1
	b.lt	LBB0_26
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	x9, x8, x9
	cmp	x9, #64
	cset	w9, lo
	ldr	w10, [sp, #44]                  ; 4-byte Folded Reload
	orr	w9, w10, w9
	tbz	w9, #0, LBB0_21
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x10, #0
	b	LBB0_24
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x11, [x23, #16]
	cbz	x11, LBB0_17
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w1, #1
	b.lt	LBB0_34
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x10, #0
	cmp	w1, #16
	b.lo	LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	sub	x9, x8, x9
	cmp	x9, #64
	b.lo	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x8, #32
	mov	x10, x20
	ldr	x11, [sp, #48]                  ; 8-byte Folded Reload
LBB0_13:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x10, #-32]
	ldp	q2, q3, [x10], #64
	stp	q0, q1, [x9, #-32]
	stp	q2, q3, [x9], #64
	subs	x11, x11, #16
	b.ne	LBB0_13
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [sp, #48]                   ; 8-byte Folded Reload
	mov	x10, x9
	cmp	x9, x26
	b.eq	LBB0_34
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	lsl	x9, x10, #2
	add	x8, x8, x9
	add	x9, x21, x9
	sub	x10, x26, x10
LBB0_16:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w11, [x9], #4
	str	w11, [x8], #4
	subs	x10, x10, #1
	b.ne	LBB0_16
	b	LBB0_34
LBB0_17:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w1, #1
	b.lt	LBB0_34
; %bb.18:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	mul	x9, x19, x9
	ldr	w11, [x13, x9, lsl #2]
	mov	w12, #16
	sub	w10, w12, w10
	asr	w10, w11, w10
	str	w10, [x8]
	cmp	w1, #1
	b.eq	LBB0_34
; %bb.19:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x10, [sp, #24]                  ; 8-byte Folded Reload
	cmp	x10, #16
	b.hs	LBB0_27
; %bb.20:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	w9, #1
	b	LBB0_33
LBB0_21:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x8, #32
	mov	x10, x20
	ldr	x11, [sp, #48]                  ; 8-byte Folded Reload
LBB0_22:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x10, #-32]
	ldp	q2, q3, [x10]
	stp	q0, q1, [x9, #-32]
	stp	q2, q3, [x9], #64
	add	x10, x10, x22
	subs	x11, x11, #16
	b.ne	LBB0_22
; %bb.23:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [sp, #48]                   ; 8-byte Folded Reload
	mov	x10, x9
	cmp	x9, x26
	b.eq	LBB0_26
LBB0_24:                                ;   in Loop: Header=BB0_2 Depth=1
	mul	x9, x24, x10
	add	x8, x8, x10, lsl #2
	sub	x10, x26, x10
LBB0_25:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w11, [x21, x9]
	str	w11, [x8], #4
	add	x9, x9, x24
	subs	x10, x10, #1
	b.ne	LBB0_25
LBB0_26:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x2, sp, #120
	mov	x0, x23
                                        ; kill: def $w1 killed $w1 killed $x1
	ldr	w3, [sp, #108]                  ; 4-byte Folded Reload
	mov	w4, #8
	bl	_encode_line
	tbz	w0, #31, LBB0_35
	b	LBB0_37
LBB0_27:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x10, x13, x9, lsl #2
	add	x10, x10, #4
	add	x9, x9, x26
	add	x9, x13, x9, lsl #2
	add	x11, x8, #4
	add	x12, x8, x26, lsl #2
	cmp	x11, x9
	ccmp	x10, x12, #2, lo
	cset	w10, lo
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	cmp	x9, x12
	ccmp	x8, x9, #2, lo
	b.lo	LBB0_32
; %bb.28:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	w9, #1
	tbnz	w10, #0, LBB0_33
; %bb.29:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x9, #0
	ldr	s0, [x23, #8]
	movi.4s	v1, #16
	sub.4s	v0, v1, v0
	dup.4s	v0, v0[0]
	add	x10, x8, #52
	ldr	x11, [sp, #8]                   ; 8-byte Folded Reload
LBB0_30:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x12, x21, x9
	ldur	q1, [x12, #4]
	ldur	q2, [x12, #20]
	ldur	q3, [x12, #36]
	ldur	q4, [x12, #52]
	neg.4s	v5, v0
	sshl.4s	v1, v1, v5
	sshl.4s	v2, v2, v5
	sshl.4s	v3, v3, v5
	sshl.4s	v4, v4, v5
	add	x12, x10, x9
	stp	q1, q2, [x12, #-48]
	stp	q3, q4, [x12, #-16]
	add	x9, x9, #64
	subs	x11, x11, #16
	b.ne	LBB0_30
; %bb.31:                               ;   in Loop: Header=BB0_2 Depth=1
	ldp	x9, x11, [sp]                   ; 16-byte Folded Reload
	ldr	x10, [sp, #24]                  ; 8-byte Folded Reload
	cmp	x10, x11
	b.ne	LBB0_33
	b	LBB0_34
LBB0_32:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w9, #1
LBB0_33:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w10, [x23, #8]
	lsl	x11, x9, #2
	ldr	w12, [x21, x11]
	mov	w13, #16
	sub	w10, w13, w10
	asr	w10, w12, w10
	str	w10, [x8, x11]
	add	x9, x9, #1
	cmp	x26, x9
	b.ne	LBB0_33
LBB0_34:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w4, [x23, #8]
	add	x2, sp, #120
	mov	x0, x23
                                        ; kill: def $w1 killed $w1 killed $x1
	ldr	w3, [sp, #108]                  ; 4-byte Folded Reload
	bl	_encode_line
	tbnz	w0, #31, LBB0_37
LBB0_35:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x19, x19, #1
	add	x20, x20, x25
	add	x21, x21, x25
	ldp	x8, x13, [sp, #56]              ; 16-byte Folded Reload
	cmp	x19, x8
	ldr	w9, [sp, #84]                   ; 4-byte Folded Reload
	ldr	x1, [sp, #72]                   ; 8-byte Folded Reload
	b.ne	LBB0_2
LBB0_36:
	mov	w0, #0
LBB0_37:
	ldur	x8, [x29, #-96]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_39
; %bb.38:
	ldp	x29, x30, [sp, #240]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #224]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #208]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #192]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #176]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #256
	ret
LBB0_39:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_encode_plane
.subsections_via_symbols
