	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tpg_precalculate_line
_tpg_precalculate_line:                 ## @tpg_precalculate_line
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_TPG_MAX_PLANES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$5, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movl	(%r15), %ecx
	cmpl	$129, %ecx
	jne	LBB0_1
## %bb.2:
	movq	_TPG_COLOR_CSC_GREEN@GOTPCREL(%rip), %rax
	cmpl	$128, %ecx
	je	LBB0_4
	jmp	LBB0_5
LBB0_1:
	movq	_TPG_COLOR_100_GREEN@GOTPCREL(%rip), %rax
	cmpl	$128, %ecx
	jne	LBB0_5
LBB0_4:
	movq	_TPG_COLOR_100_RED@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_tpg_get_pat_lines
	testl	%eax, %eax
	je	LBB0_18
## %bb.6:
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r12
	movq	%r15, %rdi
	callq	_tpg_get_pat_lines
	movl	%eax, %eax
	cmpq	%rax, %r12
	jae	LBB0_18
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
                                        ##       Child Loop BB0_15 Depth 3
	movl	4(%r15), %eax
	movl	8(%r15), %ecx
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, -84(%rbp)                 ## 4-byte Spill
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	testl	$2147483647, %ecx               ## imm = 0x7FFFFFFF
	je	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	xorl	%ecx, %ecx
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_9 Depth=2
	movl	-76(%rbp), %ebx                 ## 4-byte Reload
	subl	-92(%rbp), %ebx                 ## 4-byte Folded Reload
	addl	$2, %r14d
	movl	8(%r15), %eax
	addl	%eax, %eax
	cmpl	%eax, %r14d
	movl	$0, %r13d
	movl	%r14d, %ecx
	movl	-96(%rbp), %r14d                ## 4-byte Reload
	jae	LBB0_17
LBB0_9:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_15 Depth 3
	movl	%ecx, -100(%rbp)                ## 4-byte Spill
	cmpq	$0, 96(%r15)
	movl	%r14d, %edx
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movl	4(%r15), %edx
	addl	%edx, %edx
	subl	%r14d, %edx
	addl	$-2, %edx
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=2
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_tpg_get_color
	addl	-80(%rbp), %r14d                ## 4-byte Folded Reload
	addl	-84(%rbp), %ebx                 ## 4-byte Folded Reload
	movl	8(%r15), %ecx
	cmpl	%ecx, %ebx
	cmovbl	%r13d, %ecx
	sbbl	$-1, %r14d
	movl	%eax, %r13d
	subl	%ecx, %ebx
	movl	%ebx, -76(%rbp)                 ## 4-byte Spill
	cmpq	$0, 96(%r15)
	movl	%r14d, %edx
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=2
	movl	4(%r15), %edx
	addl	%edx, %edx
	subl	%r14d, %edx
	addl	$-2, %edx
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=2
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_tpg_get_color
	movl	%r14d, %ebx
	movl	%eax, %r14d
	addl	-80(%rbp), %ebx                 ## 4-byte Folded Reload
	movl	-76(%rbp), %eax                 ## 4-byte Reload
	addl	-84(%rbp), %eax                 ## 4-byte Folded Reload
	movl	8(%r15), %ecx
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	cmpl	%ecx, %eax
	movl	$0, %eax
	cmovbl	%eax, %ecx
	movl	%ecx, -92(%rbp)                 ## 4-byte Spill
	sbbl	$-1, %ebx
	movl	%ebx, -96(%rbp)                 ## 4-byte Spill
	cmpq	$0, 96(%r15)
	movl	%r14d, %edx
	cmovel	%r13d, %edx
	movq	%r15, %rdi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	callq	_gen_twopix
	cmpq	$0, 96(%r15)
	cmovel	%r14d, %r13d
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	movl	$1, %ecx
	callq	_gen_twopix
	cmpl	$0, 12(%r15)
	movl	-100(%rbp), %r14d               ## 4-byte Reload
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_7 Depth=1
                                        ##     Parent Loop BB0_9 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	16(%r15), %rax
	movq	24(%r15), %rsi
	movl	(%rax,%rbx,4), %eax
	movq	32(%r15), %rdx
	movq	(%rdx,%r12,8), %rdx
	movq	(%rdx,%rbx,8), %rdx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	xorl	%edx, %edx
	divl	(%rsi,%rbx,4)
	movl	%eax, %r12d
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_tpg_hdiv
	cltq
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	callq	_memcpy
	incq	%rbx
	movl	12(%r15), %eax
	addq	$32, %r13
	cmpq	%rax, %rbx
	jb	LBB0_15
	jmp	LBB0_16
LBB0_18:
	movq	40(%r15), %rax
	movl	12(%r15), %ecx
	decl	%ecx
	cmpl	$2, (%rax,%rcx,4)
	jl	LBB0_39
## %bb.19:
	movq	%r15, %rdi
	callq	_tpg_get_pat_lines
	testl	%eax, %eax
	je	LBB0_39
## %bb.20:
	movl	%eax, %ecx
	movl	12(%r15), %eax
	xorl	%edx, %edx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_38:                                ##   in Loop: Header=BB0_22 Depth=1
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
LBB0_21:                                ##   in Loop: Header=BB0_22 Depth=1
	cmpq	%rcx, %rdx
	je	LBB0_39
LBB0_22:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_24 Depth 2
                                        ##       Child Loop BB0_30 Depth 3
                                        ##       Child Loop BB0_36 Depth 3
	movq	%rdx, %r13
	incq	%rdx
	cmpl	$2, %eax
	jb	LBB0_21
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	cmpq	%rcx, %rdx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, %eax
	movl	$0, %r14d
	cmovneq	%rax, %r14
	movl	$1, %r12d
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_37:                                ##   in Loop: Header=BB0_24 Depth=2
	incq	%r12
	movl	12(%r15), %eax
	cmpq	%rax, %r12
	jae	LBB0_38
LBB0_24:                                ##   Parent Loop BB0_22 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_30 Depth 3
                                        ##       Child Loop BB0_36 Depth 3
	movl	8(%r15), %edx
	addl	%edx, %edx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_tpg_hdiv
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	je	LBB0_37
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=2
	movq	32(%r15), %rsi
	movq	48(%r15), %rcx
	movq	(%rcx,%r13,8), %rcx
	movq	(%rcx,%r12,8), %rcx
	movq	(%rsi,%r14,8), %rdx
	movq	(%rdx,%r12,8), %rdx
	movq	(%rsi,%r13,8), %rsi
	movq	(%rsi,%r12,8), %rbx
	leal	-1(%rax), %r10d
	xorl	%r8d, %r8d
	cmpl	$7, %r10d
	jb	LBB0_26
## %bb.27:                              ##   in Loop: Header=BB0_24 Depth=2
	movq	%rcx, %rsi
	subq	%rbx, %rsi
	cmpq	$32, %rsi
	jb	LBB0_26
## %bb.28:                              ##   in Loop: Header=BB0_24 Depth=2
	movq	%rcx, %rsi
	subq	%rdx, %rsi
	cmpq	$32, %rsi
	jb	LBB0_26
## %bb.29:                              ##   in Loop: Header=BB0_24 Depth=2
	incq	%r10
	movq	%r10, %r8
	andq	$-8, %r8
	leaq	(%rcx,%r8,4), %r9
	leaq	(%rdx,%r8,4), %r11
	leaq	(%rbx,%r8,4), %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_30:                                ##   Parent Loop BB0_22 Depth=1
                                        ##     Parent Loop BB0_24 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movdqu	(%rbx,%rdi,4), %xmm0
	movdqu	16(%rbx,%rdi,4), %xmm1
	movdqu	(%rdx,%rdi,4), %xmm2
	paddd	%xmm0, %xmm2
	movdqu	16(%rdx,%rdi,4), %xmm0
	paddd	%xmm1, %xmm0
	movdqa	%xmm2, %xmm1
	psrld	$31, %xmm1
	paddd	%xmm2, %xmm1
	psrad	$1, %xmm1
	movdqa	%xmm0, %xmm2
	psrld	$31, %xmm2
	paddd	%xmm0, %xmm2
	psrad	$1, %xmm2
	movdqu	%xmm1, (%rcx,%rdi,4)
	movdqu	%xmm2, 16(%rcx,%rdi,4)
	addq	$8, %rdi
	cmpq	%rdi, %r8
	jne	LBB0_30
## %bb.31:                              ##   in Loop: Header=BB0_24 Depth=2
	cmpq	%r8, %r10
	je	LBB0_37
	jmp	LBB0_32
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_24 Depth=2
	movq	%rcx, %r9
	movq	%rdx, %r11
	movq	%rbx, %rsi
LBB0_32:                                ##   in Loop: Header=BB0_24 Depth=2
	movl	%eax, %edx
	subl	%r8d, %edx
	leal	1(%r8), %ecx
	testb	$1, %dl
	je	LBB0_34
## %bb.33:                              ##   in Loop: Header=BB0_24 Depth=2
	movl	(%r11), %edx
	addl	(%rsi), %edx
	movl	%edx, %edi
	shrl	$31, %edi
	addl	%edx, %edi
	sarl	%edi
	movl	%edi, (%r9)
	addq	$4, %rsi
	addq	$4, %r11
	addq	$4, %r9
	movl	%ecx, %r8d
LBB0_34:                                ##   in Loop: Header=BB0_24 Depth=2
	cmpl	%ecx, %eax
	je	LBB0_37
## %bb.35:                              ##   in Loop: Header=BB0_24 Depth=2
	subl	%r8d, %eax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_36:                                ##   Parent Loop BB0_22 Depth=1
                                        ##     Parent Loop BB0_24 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	(%r11,%rcx,4), %edx
	addl	(%rsi,%rcx,4), %edx
	movl	%edx, %edi
	shrl	$31, %edi
	addl	%edx, %edi
	sarl	%edi
	movl	%edi, (%r9,%rcx,4)
	movl	4(%r11,%rcx,4), %edx
	addl	4(%rsi,%rcx,4), %edx
	movl	%edx, %edi
	shrl	$31, %edi
	addl	%edx, %edi
	sarl	%edi
	movl	%edi, 4(%r9,%rcx,4)
	addq	$2, %rcx
	cmpl	%ecx, %eax
	jne	LBB0_36
	jmp	LBB0_37
LBB0_39:
	movq	%r15, %rdi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	-88(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_gen_twopix
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movl	$1, %ecx
	callq	_gen_twopix
	movl	12(%r15), %ecx
	testl	%ecx, %ecx
	je	LBB0_46
## %bb.40:
	movl	8(%r15), %eax
	xorl	%r12d, %r12d
	jmp	LBB0_41
	.p2align	4, 0x90
LBB0_45:                                ##   in Loop: Header=BB0_41 Depth=1
	incq	%r12
	movl	%ecx, %edx
	cmpq	%rdx, %r12
	jae	LBB0_46
LBB0_41:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_43 Depth 2
	testl	%eax, %eax
	movl	$0, %eax
	je	LBB0_45
## %bb.42:                              ##   in Loop: Header=BB0_41 Depth=1
	movq	16(%r15), %rax
	movl	(%rax,%r12,4), %ecx
	movq	56(%r15), %rax
	movq	(%rax,%r12,8), %rbx
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	shlq	$5, %r12
	addq	-56(%rbp), %r12                 ## 8-byte Folded Reload
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leaq	(,%rcx,4), %r13
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_43:                                ##   Parent Loop BB0_41 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	addl	$2, %r14d
	movl	8(%r15), %eax
	addq	%r13, %rbx
	cmpl	%eax, %r14d
	jb	LBB0_43
## %bb.44:                              ##   in Loop: Header=BB0_41 Depth=1
	movl	12(%r15), %ecx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_45
LBB0_46:
	movq	_TPG_COLOR_100_BLACK@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%r15, %rdi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	callq	_gen_twopix
	movl	(%r14), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	_gen_twopix
	movl	12(%r15), %ecx
	testl	%ecx, %ecx
	je	LBB0_47
## %bb.56:
	movl	8(%r15), %eax
	xorl	%r12d, %r12d
	movl	%eax, %edx
	jmp	LBB0_57
	.p2align	4, 0x90
LBB0_61:                                ##   in Loop: Header=BB0_57 Depth=1
	incq	%r12
	movl	%ecx, %esi
	cmpq	%rsi, %r12
	jae	LBB0_48
LBB0_57:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_59 Depth 2
	testl	%edx, %edx
	movl	$0, %edx
	je	LBB0_61
## %bb.58:                              ##   in Loop: Header=BB0_57 Depth=1
	movq	16(%r15), %rax
	movl	(%rax,%r12,4), %ecx
	movq	64(%r15), %rax
	movq	(%rax,%r12,8), %rbx
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	shlq	$5, %r12
	addq	-56(%rbp), %r12                 ## 8-byte Folded Reload
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leaq	(,%rcx,4), %r13
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_59:                                ##   Parent Loop BB0_57 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	addl	$2, %r14d
	movl	8(%r15), %eax
	addq	%r13, %rbx
	cmpl	%eax, %r14d
	jb	LBB0_59
## %bb.60:                              ##   in Loop: Header=BB0_57 Depth=1
	movl	12(%r15), %ecx
	movl	%eax, %edx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_61
LBB0_47:
	movl	8(%r15), %eax
LBB0_48:
	testl	$2147483647, %eax               ## imm = 0x7FFFFFFF
	je	LBB0_54
## %bb.49:
	xorl	%r14d, %r14d
	movq	_TPG_COLOR_RANDOM@GOTPCREL(%rip), %r12
	jmp	LBB0_50
	.p2align	4, 0x90
LBB0_53:                                ##   in Loop: Header=BB0_50 Depth=1
	addl	$2, %r14d
	movl	8(%r15), %eax
	addl	%eax, %eax
	cmpl	%eax, %r14d
	jae	LBB0_54
LBB0_50:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_52 Depth 2
	movl	(%r12), %edx
	movq	%r15, %rdi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	callq	_gen_twopix
	movl	(%r12), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	_gen_twopix
	cmpl	$0, 12(%r15)
	je	LBB0_53
## %bb.51:                              ##   in Loop: Header=BB0_50 Depth=1
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_52:                                ##   Parent Loop BB0_50 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r15), %rax
	movq	72(%r15), %rcx
	movl	(%rax,%rbx,4), %edx
	movl	%edx, %edi
	imull	%r14d, %edi
	shrl	%edi
	shlq	$2, %rdi
	addq	(%rcx,%rbx,8), %rdi
	movq	%r13, %rsi
	callq	_memcpy
	incq	%rbx
	movl	12(%r15), %eax
	addq	$32, %r13
	cmpq	%rax, %rbx
	jb	LBB0_52
	jmp	LBB0_53
LBB0_54:
	movq	80(%r15), %rsi
	movq	_TPG_COLOR_TEXTBG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_gen_twopix
	movq	80(%r15), %rsi
	movl	(%rbx), %edx
	movq	%r15, %rdi
	movl	$1, %ecx
	callq	_gen_twopix
	movq	88(%r15), %rsi
	movq	_TPG_COLOR_TEXTFG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_gen_twopix
	movq	88(%r15), %rsi
	movl	(%rbx), %edx
	movq	%r15, %rdi
	movl	$1, %ecx
	callq	_gen_twopix
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_55
## %bb.62:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_55:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TPG_MAX_PLANES,4,2             ## @TPG_MAX_PLANES
	.comm	_TPG_COLOR_100_RED,4,2          ## @TPG_COLOR_100_RED
	.comm	_TPG_COLOR_CSC_GREEN,4,2        ## @TPG_COLOR_CSC_GREEN
	.comm	_TPG_COLOR_100_GREEN,4,2        ## @TPG_COLOR_100_GREEN
	.comm	_TPG_COLOR_100_BLACK,4,2        ## @TPG_COLOR_100_BLACK
	.comm	_TPG_COLOR_RANDOM,4,2           ## @TPG_COLOR_RANDOM
	.comm	_TPG_COLOR_TEXTBG,4,2           ## @TPG_COLOR_TEXTBG
	.comm	_TPG_COLOR_TEXTFG,4,2           ## @TPG_COLOR_TEXTFG
	.no_dead_strip	_tpg_precalculate_line
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tpg_precalculate_line
_tpg_precalculate_line:                 ; @tpg_precalculate_line
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _TPG_MAX_PLANES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TPG_MAX_PLANES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #5
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x8, x9, x8
	stur	x8, [x29, #-96]                 ; 8-byte Folded Spill
	mov	sp, x8
Lloh8:
	adrp	x8, _TPG_COLOR_100_RED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TPG_COLOR_100_RED@GOTPAGEOFF]
Lloh10:
	adrp	x9, _TPG_COLOR_CSC_GREEN@GOTPAGE
Lloh11:
	ldr	x9, [x9, _TPG_COLOR_CSC_GREEN@GOTPAGEOFF]
Lloh12:
	adrp	x10, _TPG_COLOR_100_GREEN@GOTPAGE
Lloh13:
	ldr	x10, [x10, _TPG_COLOR_100_GREEN@GOTPAGEOFF]
	ldr	w11, [x0]
	cmp	w11, #129
	csel	x9, x9, x10, eq
	cmp	w11, #128
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	stur	w8, [x29, #-108]                ; 4-byte Folded Spill
	bl	_tpg_get_pat_lines
	cbz	w0, LBB0_14
; %bb.1:
	mov	x22, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	mov	x0, x19
	bl	_tpg_get_pat_lines
	cmp	x22, w0, uxtw
	b.hs	LBB0_14
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_13 Depth 3
	ldr	w8, [x19, #8]
	tst	w8, #0x7fffffff
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w23, #0
	mov	w21, #0
	mov	w28, #0
	ldr	w9, [x19, #4]
	udiv	w20, w9, w8
	msub	w26, w20, w8, w9
	stp	w26, w20, [x29, #-104]          ; 8-byte Folded Spill
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	w23, w23, #2
	ldr	w8, [x19, #8]
	cmp	w23, w8, lsl #1
	ldp	w26, w20, [x29, #-104]          ; 8-byte Folded Reload
	b.hs	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_13 Depth 3
	ldr	x8, [x19, #96]
	mov	x2, x21
	cbz	x8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x19, #4]
	lsl	w8, w8, #1
	sub	w8, w8, w21
	sub	w2, w8, #2
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x19
	mov	x1, x22
	bl	_tpg_get_color
	mov	x24, x0
	add	w8, w21, w20
	ldr	w9, [x19, #8]
	add	w10, w28, w26
	cmp	w10, w9
	csel	w9, wzr, w9, lo
	cinc	w28, w8, hs
	sub	w21, w10, w9
	ldr	x8, [x19, #96]
	cbz	x8, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x19, #4]
	lsl	w8, w8, #1
	sub	w8, w8, w28
	sub	w2, w8, #2
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x2, x28
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x19
	mov	x1, x22
	bl	_tpg_get_color
	mov	x25, x0
	add	w8, w28, w20
	ldr	w9, [x19, #8]
	add	w10, w21, w26
	cmp	w10, w9
	csel	w9, wzr, w9, lo
	cinc	w21, w8, hs
	sub	w28, w10, w9
	ldr	x8, [x19, #96]
	cmp	x8, #0
	csel	w2, w24, w0, eq
	mov	x0, x19
	ldur	x20, [x29, #-96]                ; 8-byte Folded Reload
	mov	x1, x20
	mov	w3, #0
	bl	_gen_twopix
	ldr	x8, [x19, #96]
	cmp	x8, #0
	csel	w2, w25, w24, eq
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	_gen_twopix
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x24, #0
	ldur	x25, [x29, #-96]                ; 8-byte Folded Reload
LBB0_13:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	lsl	x8, x24, #2
	ldp	x9, x10, [x19, #16]
	ldr	w20, [x9, x8]
	ldr	w27, [x10, x8]
	ldr	x8, [x19, #32]
	ldr	x8, [x8, x22, lsl #3]
	ldr	x26, [x8, x24, lsl #3]
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_tpg_hdiv
	add	x0, x26, w0, sxtw #2
	udiv	w2, w20, w27
	mov	x1, x25
	bl	_memcpy
	add	x24, x24, #1
	ldr	w8, [x19, #12]
	add	x25, x25, #32
	cmp	x24, x8
	b.lo	LBB0_13
	b	LBB0_5
LBB0_14:
	ldr	x8, [x19, #40]
	ldr	w9, [x19, #12]
	sub	w9, w9, #1
	ldr	w8, [x8, w9, uxtw #2]
	cmp	w8, #2
	b.lt	LBB0_30
; %bb.15:
	mov	x0, x19
	bl	_tpg_get_pat_lines
	cbz	w0, LBB0_30
; %bb.16:
	mov	x24, #0
	mov	w23, w0
	ldr	w8, [x19, #12]
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	mov	x24, x25
	cmp	x25, x23
	b.eq	LBB0_30
LBB0_18:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_21 Depth 2
                                        ;       Child Loop BB0_28 Depth 3
                                        ;       Child Loop BB0_26 Depth 3
	add	x25, x24, #1
	cmp	w8, #2
	b.lo	LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	and	x8, x25, #0xffffffff
	cmp	x25, x23
	csel	x26, xzr, x8, eq
	mov	w22, #1
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=2
	add	x22, x22, #1
	ldr	w8, [x19, #12]
	cmp	x22, x8
	b.hs	LBB0_17
LBB0_21:                                ;   Parent Loop BB0_18 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_28 Depth 3
                                        ;       Child Loop BB0_26 Depth 3
	ldr	w8, [x19, #8]
	lsl	w2, w8, #1
	mov	x0, x19
	mov	x1, x22
	bl	_tpg_hdiv
	cbz	w0, LBB0_20
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=2
	ldr	x8, [x19, #48]
	lsl	x9, x24, #3
	ldr	x8, [x8, x9]
	lsl	x10, x22, #3
	ldr	x11, [x8, x10]
	ldr	x8, [x19, #32]
	ldr	x12, [x8, x26, lsl #3]
	ldr	x12, [x12, x10]
	ldr	x8, [x8, x9]
	ldr	x13, [x8, x10]
	sub	w8, w0, #1
	cmp	w8, #3
	b.lo	LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_21 Depth=2
	sub	x9, x11, x13
	sub	x10, x11, x12
	cmp	x9, #16
	ccmp	x10, #16, #0, hs
	b.hs	LBB0_27
LBB0_24:                                ;   in Loop: Header=BB0_21 Depth=2
	mov	w14, #0
	mov	x8, x11
	mov	x9, x12
	mov	x10, x13
LBB0_25:                                ;   in Loop: Header=BB0_21 Depth=2
	sub	w11, w0, w14
LBB0_26:                                ;   Parent Loop BB0_18 Depth=1
                                        ;     Parent Loop BB0_21 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w12, [x10], #4
	ldr	w13, [x9], #4
	add	w12, w13, w12
	cmp	w12, #0
	cinc	w12, w12, lt
	asr	w12, w12, #1
	str	w12, [x8], #4
	subs	w11, w11, #1
	b.ne	LBB0_26
	b	LBB0_20
LBB0_27:                                ;   in Loop: Header=BB0_21 Depth=2
	add	x15, x8, #1
	and	x14, x15, #0x1fffffffc
	lsl	x10, x14, #2
	add	x8, x11, x10
	add	x9, x12, x10
	add	x10, x13, x10
	mov	x16, x14
LBB0_28:                                ;   Parent Loop BB0_18 Depth=1
                                        ;     Parent Loop BB0_21 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	q0, [x13], #16
	ldr	q1, [x12], #16
	add.4s	v0, v1, v0
	usra.4s	v0, v0, #31
	sshr.4s	v0, v0, #1
	str	q0, [x11], #16
	subs	x16, x16, #4
	b.ne	LBB0_28
; %bb.29:                               ;   in Loop: Header=BB0_21 Depth=2
	cmp	x15, x14
	b.eq	LBB0_20
	b	LBB0_25
LBB0_30:
	mov	x0, x19
	ldur	x20, [x29, #-96]                ; 8-byte Folded Reload
	mov	x1, x20
	ldur	w21, [x29, #-108]               ; 4-byte Folded Reload
	mov	x2, x21
	mov	w3, #0
	bl	_gen_twopix
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	w3, #1
	bl	_gen_twopix
	ldr	w9, [x19, #12]
	cbz	w9, LBB0_37
; %bb.31:
	mov	x24, #0
	ldr	w8, [x19, #8]
	b	LBB0_33
LBB0_32:                                ;   in Loop: Header=BB0_33 Depth=1
	add	x24, x24, #1
	cmp	x24, w9, uxtw
	b.hs	LBB0_37
LBB0_33:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_35 Depth 2
	cbz	w8, LBB0_32
; %bb.34:                               ;   in Loop: Header=BB0_33 Depth=1
	mov	w25, #0
	ldr	x8, [x19, #16]
	ldr	w21, [x8, x24, lsl #2]
	ldr	x8, [x19, #56]
	ldr	x22, [x8, x24, lsl #3]
	ldur	x8, [x29, #-96]                 ; 8-byte Folded Reload
	add	x23, x8, x24, lsl #5
	lsl	x26, x21, #2
LBB0_35:                                ;   Parent Loop BB0_33 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	bl	_memcpy
	add	w25, w25, #2
	ldr	w8, [x19, #8]
	add	x22, x22, x26
	cmp	w25, w8
	b.lo	LBB0_35
; %bb.36:                               ;   in Loop: Header=BB0_33 Depth=1
	ldr	w9, [x19, #12]
	b	LBB0_32
LBB0_37:
Lloh14:
	adrp	x20, _TPG_COLOR_100_BLACK@GOTPAGE
Lloh15:
	ldr	x20, [x20, _TPG_COLOR_100_BLACK@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	ldur	x21, [x29, #-96]                ; 8-byte Folded Reload
	mov	x1, x21
	mov	w3, #0
	bl	_gen_twopix
	ldr	w2, [x20]
	mov	x0, x19
	mov	x1, x21
	mov	w3, #1
	bl	_gen_twopix
	ldr	w9, [x19, #12]
	cbz	w9, LBB0_44
; %bb.38:
	mov	x24, #0
	ldr	w8, [x19, #8]
	mov	x10, x8
	b	LBB0_40
LBB0_39:                                ;   in Loop: Header=BB0_40 Depth=1
	add	x24, x24, #1
	cmp	x24, w9, uxtw
	b.hs	LBB0_45
LBB0_40:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_42 Depth 2
	cbz	w10, LBB0_39
; %bb.41:                               ;   in Loop: Header=BB0_40 Depth=1
	mov	w25, #0
	ldr	x8, [x19, #16]
	ldr	w21, [x8, x24, lsl #2]
	ldr	x8, [x19, #64]
	ldr	x22, [x8, x24, lsl #3]
	ldur	x8, [x29, #-96]                 ; 8-byte Folded Reload
	add	x23, x8, x24, lsl #5
	lsl	x26, x21, #2
LBB0_42:                                ;   Parent Loop BB0_40 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	bl	_memcpy
	add	w25, w25, #2
	ldr	w8, [x19, #8]
	add	x22, x22, x26
	cmp	w25, w8
	b.lo	LBB0_42
; %bb.43:                               ;   in Loop: Header=BB0_40 Depth=1
	ldr	w9, [x19, #12]
	mov	x10, x8
	b	LBB0_39
LBB0_44:
	ldr	w8, [x19, #8]
LBB0_45:
	tst	w8, #0x7fffffff
	b.eq	LBB0_51
; %bb.46:
	mov	w22, #0
Lloh16:
	adrp	x23, _TPG_COLOR_RANDOM@GOTPAGE
Lloh17:
	ldr	x23, [x23, _TPG_COLOR_RANDOM@GOTPAGEOFF]
	ldur	x20, [x29, #-96]                ; 8-byte Folded Reload
	b	LBB0_48
LBB0_47:                                ;   in Loop: Header=BB0_48 Depth=1
	add	w22, w22, #2
	ldr	w8, [x19, #8]
	cmp	w22, w8, lsl #1
	b.hs	LBB0_51
LBB0_48:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_50 Depth 2
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_gen_twopix
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	_gen_twopix
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_47
; %bb.49:                               ;   in Loop: Header=BB0_48 Depth=1
	mov	x24, #0
	ldur	x21, [x29, #-96]                ; 8-byte Folded Reload
LBB0_50:                                ;   Parent Loop BB0_48 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #16]
	ldr	w2, [x8, x24, lsl #2]
	ldr	x8, [x19, #72]
	ldr	x8, [x8, x24, lsl #3]
	mul	w9, w2, w22
	lsr	w9, w9, #1
	add	x0, x8, w9, uxtw #2
	mov	x1, x21
	bl	_memcpy
	add	x24, x24, #1
	ldr	w8, [x19, #12]
	add	x21, x21, #32
	cmp	x24, x8
	b.lo	LBB0_50
	b	LBB0_47
LBB0_51:
	ldr	x1, [x19, #80]
Lloh18:
	adrp	x20, _TPG_COLOR_TEXTBG@GOTPAGE
Lloh19:
	ldr	x20, [x20, _TPG_COLOR_TEXTBG@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	mov	w3, #0
	bl	_gen_twopix
	ldr	x1, [x19, #80]
	ldr	w2, [x20]
	mov	x0, x19
	mov	w3, #1
	bl	_gen_twopix
	ldr	x1, [x19, #88]
Lloh20:
	adrp	x20, _TPG_COLOR_TEXTFG@GOTPAGE
Lloh21:
	ldr	x20, [x20, _TPG_COLOR_TEXTFG@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	mov	w3, #0
	bl	_gen_twopix
	ldr	x1, [x19, #88]
	ldr	w2, [x20]
	mov	x0, x19
	mov	w3, #1
	bl	_gen_twopix
	ldur	x8, [x29, #-88]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_53
; %bb.52:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_53:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_TPG_MAX_PLANES,4,2             ; @TPG_MAX_PLANES
	.comm	_TPG_COLOR_100_RED,4,2          ; @TPG_COLOR_100_RED
	.comm	_TPG_COLOR_CSC_GREEN,4,2        ; @TPG_COLOR_CSC_GREEN
	.comm	_TPG_COLOR_100_GREEN,4,2        ; @TPG_COLOR_100_GREEN
	.comm	_TPG_COLOR_100_BLACK,4,2        ; @TPG_COLOR_100_BLACK
	.comm	_TPG_COLOR_RANDOM,4,2           ; @TPG_COLOR_RANDOM
	.comm	_TPG_COLOR_TEXTBG,4,2           ; @TPG_COLOR_TEXTBG
	.comm	_TPG_COLOR_TEXTFG,4,2           ; @TPG_COLOR_TEXTFG
	.no_dead_strip	_tpg_precalculate_line
.subsections_via_symbols
