	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tpg_fill_plane_extras
_tpg_fill_plane_extras:                 ## @tpg_fill_plane_extras
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	(%rsi), %r8d
	movl	4(%rsi), %r15d
	movl	8(%rsi), %r13d
	cmpq	$0, 40(%rsi)
	je	LBB0_4
## %bb.1:
	movl	32(%r12), %eax
	orl	%r13d, %eax
	jne	LBB0_4
## %bb.2:
	movl	12(%r12), %edx
	testl	%edx, %edx
	je	LBB0_4
## %bb.3:
	movq	(%rbx), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movslq	16(%r12), %rsi
	shlq	$2, %rsi
	addq	(%rax,%rcx,8), %rsi
	movl	%r15d, -56(%rbp)                ## 4-byte Spill
	movq	%r14, %rdi
	movq	%r14, %r15
	movq	%r8, %r14
	callq	_memcpy
	movq	%r14, %r8
	movq	%r15, %r14
	movl	-56(%rbp), %r15d                ## 4-byte Reload
LBB0_4:
	cmpq	$0, 64(%rbx)
	je	LBB0_19
## %bb.5:
	movl	96(%rbx), %edx
	cmpl	%edx, %r13d
	jb	LBB0_19
## %bb.6:
	movl	100(%rbx), %ecx
	addl	%edx, %ecx
	cmpl	%ecx, %r13d
	jae	LBB0_19
## %bb.7:
	movl	20(%r12), %eax
	movl	24(%r12), %r9d
	cmpl	%edx, %r13d
	je	LBB0_11
## %bb.8:
	incl	%edx
	cmpl	%edx, %r13d
	je	LBB0_11
## %bb.9:
	leal	-1(%rcx), %edx
	cmpl	%edx, %r13d
	je	LBB0_11
## %bb.10:
	addl	$-2, %ecx
	cmpl	%ecx, %r13d
	je	LBB0_11
## %bb.12:
	movq	80(%rbx), %rcx
	movq	104(%rbx), %rdx
	cmpq	%rcx, %rdx
	jl	LBB0_15
## %bb.13:
	movq	88(%rbx), %rsi
	addq	%rcx, %rsi
	cmpq	%rsi, %rdx
	jge	LBB0_15
## %bb.14:
	movl	%r15d, -56(%rbp)                ## 4-byte Spill
	leaq	(%r14,%rax,4), %rdi
	movq	8(%rbx), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	(%rax,%rcx,8), %rsi
	movl	%r8d, %edx
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r8, %r14
	movq	%r9, %r15
	callq	_memcpy
	movq	%r15, %r9
	movq	%r14, %r8
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	movq	80(%rbx), %rcx
	movq	104(%rbx), %rdx
LBB0_15:
	addq	112(%rbx), %rdx
	cmpq	%rcx, %rdx
	jle	LBB0_19
## %bb.16:
	addq	88(%rbx), %rcx
	cmpq	%rcx, %rdx
	jg	LBB0_19
## %bb.17:
	leaq	(%r14,%r9,4), %rdi
	movq	%r8, %rax
	shlq	$2, %rax
	subq	%rax, %rdi
	movq	8(%rbx), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	(%rax,%rcx,8), %rsi
	movl	%r8d, %edx
	jmp	LBB0_18
LBB0_11:
	leaq	(%r14,%rax,4), %rdi
	movq	8(%rbx), %rcx
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	(%rcx,%rdx,8), %rsi
	subl	%eax, %r9d
	movl	%r9d, %edx
LBB0_18:
	callq	_memcpy
LBB0_19:
	movq	16(%rbx), %rax
	movq	_TPG_QUAL_NOISE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_23
## %bb.20:
	movl	96(%rbx), %eax
	cmpl	%eax, %r13d
	jb	LBB0_23
## %bb.21:
	addl	100(%rbx), %eax
	cmpl	%eax, %r13d
	jae	LBB0_23
## %bb.22:
	movq	24(%rbx), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax,%rcx,8), %rsi
	movl	20(%r12), %edx
	movq	%r14, %rdi
	callq	_memcpy
	movl	24(%r12), %eax
	leaq	(%r14,%rax,4), %rdi
	movq	24(%rbx), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rcx,%rdx,8), %rsi
	subl	%eax, %r15d
	movl	%r15d, %edx
	callq	_memcpy
LBB0_23:
	cmpq	$0, 56(%rbx)
	je	LBB0_29
## %bb.24:
	movl	120(%rbx), %eax
	cmpl	%eax, %r13d
	jb	LBB0_29
## %bb.25:
	addl	124(%rbx), %eax
	cmpl	%eax, %r13d
	jae	LBB0_29
## %bb.26:
	movq	80(%rbx), %rax
	movq	128(%rbx), %rdx
	movq	88(%rbx), %rcx
	addq	%rax, %rcx
	cmpq	%rcx, %rdx
	jge	LBB0_29
## %bb.27:
	movq	136(%rbx), %rsi
	leaq	(%rsi,%rdx), %rdi
	cmpq	%rax, %rdi
	jl	LBB0_29
## %bb.28:
	movl	%edx, %r8d
	movl	%edx, %edi
	subl	%eax, %edi
	xorl	%r9d, %r9d
	cmpq	%r8, %rax
	cmovlel	%r9d, %edi
	cmovgl	%eax, %edx
	addl	%edi, %esi
	leal	(%rsi,%rdx), %edi
	movl	%ecx, %r13d
	subl	%edi, %r13d
	cmpq	%rdi, %rcx
	cmovgel	%r9d, %r13d
	addl	%esi, %r13d
	subl	%eax, %edx
	movq	%rbx, %rdi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_tpg_hscale_div
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	callq	_tpg_hscale_div
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	leaq	(%r14,%rcx,4), %rdi
	movq	8(%rbx), %rcx
	movl	%r15d, %edx
	movq	(%rcx,%rdx,8), %rsi
	movl	%eax, %edx
	callq	_memcpy
LBB0_29:
	cmpq	$0, 48(%rbx)
	je	LBB0_31
## %bb.30:
	movslq	32(%rbx), %rax
	imulq	$1431655766, %rax, %rdx         ## imm = 0x55555556
	movq	%rdx, %rax
	shrq	$63, %rax
	shrq	$32, %rdx
	addl	%eax, %edx
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_tpg_hdiv
	movl	%eax, %eax
	movq	$255, (%r14,%rax,4)
	movl	$0, 8(%r14,%rax,4)
	movl	28(%r12), %ecx
	leal	(,%rcx,4), %edx
	leal	(%rcx,%rcx), %esi
	orl	%ecx, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	shll	$6, %ecx
	orl	%ecx, %esi
	orl	%esi, %edx
	orl	$128, %edx
	movl	%edx, 12(%r14,%rax,4)
LBB0_31:
	cmpq	$0, 40(%rbx)
	je	LBB0_33
## %bb.32:
	movl	32(%rbx), %eax
	addl	%eax, %eax
	cltq
	imulq	$1431655766, %rax, %rdx         ## imm = 0x55555556
	movq	%rdx, %rax
	shrq	$63, %rax
	shrq	$32, %rdx
	addl	%eax, %edx
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_tpg_hdiv
	movl	%eax, %eax
	movq	$255, (%r14,%rax,4)
	movl	$0, 8(%r14,%rax,4)
	movl	28(%r12), %ecx
	movl	%ecx, %edx
	shll	$6, %edx
	movl	%ecx, %esi
	xorl	$1, %esi
	addl	%ecx, %ecx
	orl	%edx, %ecx
	orl	%esi, %ecx
	shll	$2, %esi
	orl	%ecx, %esi
	orl	$152, %esi
	movl	%esi, 12(%r14,%rax,4)
LBB0_33:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TPG_QUAL_NOISE,8,3             ## @TPG_QUAL_NOISE
	.no_dead_strip	_tpg_fill_plane_extras
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tpg_fill_plane_extras
_tpg_fill_plane_extras:                 ; @tpg_fill_plane_extras
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x4
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	ldp	w23, w25, [x1]
	ldr	w24, [x1, #8]
	ldr	x8, [x1, #40]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w8, [x19, #32]
	orr	w8, w8, w24
	cbnz	w8, LBB0_4
; %bb.2:
	ldr	w2, [x19, #12]
	cbz	w2, LBB0_4
; %bb.3:
	ldr	x8, [x22]
	ldr	x8, [x8, w21, uxtw #3]
	ldrsw	x9, [x19, #16]
	add	x1, x8, x9, lsl #2
	mov	x0, x20
	bl	_memcpy
LBB0_4:
	ldr	x8, [x22, #64]
	cbz	x8, LBB0_19
; %bb.5:
	ldr	w10, [x22, #96]
	cmp	w24, w10
	b.lo	LBB0_19
; %bb.6:
	ldr	w8, [x22, #100]
	add	w9, w8, w10
	cmp	w24, w9
	b.hs	LBB0_19
; %bb.7:
	ldp	w8, w26, [x19, #20]
	cmp	w24, w10
	b.eq	LBB0_17
; %bb.8:
	add	w10, w10, #1
	cmp	w24, w10
	b.eq	LBB0_17
; %bb.9:
	sub	w10, w9, #1
	cmp	w24, w10
	b.eq	LBB0_17
; %bb.10:
	sub	w9, w9, #2
	cmp	w24, w9
	b.eq	LBB0_17
; %bb.11:
	ldr	x10, [x22, #104]
	ldr	x9, [x22, #80]
	cmp	x10, x9
	b.lt	LBB0_14
; %bb.12:
	ldr	x11, [x22, #88]
	add	x11, x11, x9
	cmp	x10, x11
	b.ge	LBB0_14
; %bb.13:
	add	x0, x20, x8, lsl #2
	ldr	x8, [x22, #8]
	ldr	x1, [x8, w21, uxtw #3]
	mov	x2, x23
	bl	_memcpy
	ldr	x10, [x22, #104]
	ldr	x9, [x22, #80]
LBB0_14:
	ldr	x8, [x22, #112]
	add	x8, x8, x10
	cmp	x8, x9
	b.le	LBB0_19
; %bb.15:
	ldr	x10, [x22, #88]
	add	x9, x10, x9
	cmp	x8, x9
	b.gt	LBB0_19
; %bb.16:
	add	x8, x20, x26, lsl #2
	sub	x0, x8, x23, lsl #2
	ldr	x8, [x22, #8]
	ldr	x1, [x8, w21, uxtw #3]
	mov	x2, x23
	b	LBB0_18
LBB0_17:
	add	x0, x20, x8, lsl #2
	ldr	x9, [x22, #8]
	ldr	x1, [x9, w21, uxtw #3]
	sub	w2, w26, w8
LBB0_18:
	bl	_memcpy
LBB0_19:
	ldr	x8, [x22, #16]
Lloh0:
	adrp	x9, _TPG_QUAL_NOISE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TPG_QUAL_NOISE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_23
; %bb.20:
	ldr	w8, [x22, #96]
	cmp	w24, w8
	b.lo	LBB0_23
; %bb.21:
	ldr	w9, [x22, #100]
	add	w8, w9, w8
	cmp	w24, w8
	b.hs	LBB0_23
; %bb.22:
	ldr	x8, [x22, #24]
	mov	w9, w21
	lsl	x23, x9, #3
	ldr	x1, [x8, x23]
	ldr	w2, [x19, #20]
	mov	x0, x20
	bl	_memcpy
	ldr	w8, [x19, #24]
	add	x0, x20, x8, lsl #2
	ldr	x9, [x22, #24]
	ldr	x1, [x9, x23]
	sub	w2, w25, w8
	bl	_memcpy
LBB0_23:
	ldr	x8, [x22, #56]
	cbz	x8, LBB0_29
; %bb.24:
	ldr	w8, [x22, #120]
	cmp	w24, w8
	b.lo	LBB0_29
; %bb.25:
	ldr	w9, [x22, #124]
	add	w8, w9, w8
	cmp	w24, w8
	b.hs	LBB0_29
; %bb.26:
	ldr	x10, [x22, #128]
	ldp	x8, x9, [x22, #80]
	add	x9, x9, x8
	cmp	x10, x9
	b.ge	LBB0_29
; %bb.27:
	ldr	x11, [x22, #136]
	add	x12, x11, x10
	cmp	x12, x8
	b.lt	LBB0_29
; %bb.28:
	sub	w12, w10, w8
	cmp	x8, w10, uxtw
	csel	w12, w12, wzr, gt
	csel	w10, w8, w10, gt
	add	w11, w11, w12
	add	w12, w11, w10
	sub	w13, w9, w12
	cmp	x9, x12
	csel	w9, w13, wzr, lt
	add	w23, w9, w11
	sub	w2, w10, w8
	mov	x0, x22
	mov	x1, x21
	bl	_tpg_hscale_div
	mov	x24, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_tpg_hscale_div
	mov	x2, x0
	add	x0, x20, w24, uxtw #2
	ldr	x8, [x22, #8]
	ldr	x1, [x8, w21, uxtw #3]
	bl	_memcpy
LBB0_29:
	ldr	x8, [x22, #48]
	cbz	x8, LBB0_31
; %bb.30:
	ldrsw	x8, [x22, #32]
	mov	w9, #21846
	movk	w9, #21845, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w2, w8, w9
	mov	x0, x22
	mov	x1, x21
	bl	_tpg_hdiv
	add	x8, x20, w0, uxtw #2
	movi	d0, #0x000000000000ff
	str	d0, [x8]
	str	wzr, [x8, #8]
	ldr	w9, [x19, #28]
	orr	w10, w9, w9, lsl #2
	orr	w10, w10, w9, lsl #6
	orr	w9, w10, w9, lsl #1
	orr	w9, w9, #0x80
	str	w9, [x8, #12]
LBB0_31:
	ldr	x8, [x22, #40]
	cbz	x8, LBB0_33
; %bb.32:
	ldr	w8, [x22, #32]
	lsl	w8, w8, #1
	mov	w9, #21846
	movk	w9, #21845, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w2, w8, w9
	mov	x0, x22
	mov	x1, x21
	bl	_tpg_hdiv
	add	x8, x20, w0, uxtw #2
	movi	d0, #0x000000000000ff
	str	d0, [x8]
	str	wzr, [x8, #8]
	ldr	w9, [x19, #28]
	lsl	w10, w9, #6
	eor	w11, w9, #0x1
	orr	w9, w10, w9, lsl #1
	orr	w9, w9, w11
	orr	w9, w9, w11, lsl #2
	mov	w10, #152
	orr	w9, w9, w10
	str	w9, [x8, #12]
LBB0_33:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TPG_QUAL_NOISE,8,3             ; @TPG_QUAL_NOISE
	.no_dead_strip	_tpg_fill_plane_extras
.subsections_via_symbols
