	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vivid_overlay
_vivid_overlay:                         ## @vivid_overlay
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %rbx
	addq	$72, %rdi
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	xorl	%esi, %esi
	callq	_tpg_g_twopixelsize
	movl	%eax, %r14d
	movq	64(%rbx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	8(%r13), %rdi
	xorl	%esi, %esi
	callq	_vb2_plane_vaddr
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	72(%rbx), %rax
	cmpq	$0, 56(%rbx)
	jne	LBB0_2
## %bb.1:
	cmpq	$0, (%rbx)
	sete	%cl
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
LBB0_2:
	movl	(%rax), %r12d
	movl	36(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	40(%rbx), %r15d
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	leal	1(%r14), %eax
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	xorl	%edi, %edi
	cmpl	$3, %eax
	setb	%dil
	callq	_WARN_ON
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_3
LBB0_20:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	8(%rdi), %rax
	movq	_V4L2_FIELD_TOP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_V4L2_FIELD_BOTTOM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
LBB0_5:
	cmpq	(%r13), %rax
	jne	LBB0_20
LBB0_6:
	movl	16(%rdi), %ecx
	testl	%ecx, %ecx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	js	LBB0_7
## %bb.8:
	movl	24(%rdi), %eax
	subl	%ecx, %eax
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	cmpl	%r13d, %eax
	cmovbl	%eax, %r13d
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, %eax
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	testl	%r13d, %r13d
	jg	LBB0_10
	jmp	LBB0_20
LBB0_7:
	movl	%ecx, %eax
	negl	%eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	addl	%ecx, %r13d
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	testl	%r13d, %r13d
	jle	LBB0_20
LBB0_10:
	movl	%r13d, %esi
	movslq	20(%rdi), %rax
	testq	%rax, %rax
	js	LBB0_12
## %bb.11:
	movslq	28(%rdi), %rcx
	imulq	%rax, %rcx
	addq	%rcx, -72(%rbp)                 ## 8-byte Folded Spill
LBB0_12:
	testl	%r15d, %r15d
	jle	LBB0_20
## %bb.13:
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, %ebx
	shrl	$31, %ebx
	addl	%ecx, %ebx
	sarl	%ebx
	movl	44(%rdi), %ecx
	imull	%ebx, %ecx
	movl	48(%rdi), %edx
	imull	%r12d, %edx
	addl	%ecx, %edx
	addq	%rdx, -80(%rbp)                 ## 8-byte Folded Spill
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $ecx killed $ecx def $rcx
	imull	%ebx, %ecx
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	imull	%ebx, %ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %edx
	movl	%ebx, -88(%rbp)                 ## 4-byte Spill
	imull	%ebx, %esi
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	negl	%ecx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	decq	%rdx
	movq	%rdx, -120(%rbp)                ## 8-byte Spill
	movl	%eax, %ebx
	movq	%r12, -136(%rbp)                ## 8-byte Spill
	movq	%r15, -128(%rbp)                ## 8-byte Spill
	jmp	LBB0_14
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rax,%rcx), %rdi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_memcpy
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movslq	28(%rdi), %rax
	addq	%rax, -72(%rbp)                 ## 8-byte Folded Spill
	movq	-136(%rbp), %r12                ## 8-byte Reload
	movq	-128(%rbp), %r15                ## 8-byte Reload
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=1
	incl	%ebx
	addq	%r12, -80(%rbp)                 ## 8-byte Folded Spill
	movl	20(%rdi), %eax
	leal	(%rax,%r15), %ecx
	cmpl	%ecx, %ebx
	jge	LBB0_20
LBB0_14:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_21 Depth 2
	testl	%ebx, %ebx
	js	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpl	32(%rdi), %ebx
	jg	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	-120(%rbp), %r14                ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, %r12d
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movl	%ecx, %r13d
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %r15d
	cmpb	$0, -60(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_17
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %esi
	subl	%eax, %esi
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%r15), %edx
	movl	%ebx, %ecx
	movl	%r15d, %r8d
	callq	_valid_pix
	testl	%eax, %eax
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=2
	movl	%r13d, %edi
	addq	-72(%rbp), %rdi                 ## 8-byte Folded Reload
	movl	%r12d, %esi
	addq	-80(%rbp), %rsi                 ## 8-byte Folded Reload
	movl	-88(%rbp), %edx                 ## 4-byte Reload
	callq	_memcpy
LBB0_23:                                ##   in Loop: Header=BB0_21 Depth=2
	subq	$1, %r14
	jb	LBB0_18
## %bb.24:                              ##   in Loop: Header=BB0_21 Depth=2
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	20(%rdi), %eax
	incl	%r15d
	movl	-88(%rbp), %ecx                 ## 4-byte Reload
	addl	%ecx, %r13d
	addl	%ecx, %r12d
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_FIELD_TOP,8,3             ## @V4L2_FIELD_TOP
	.comm	_V4L2_FIELD_BOTTOM,8,3          ## @V4L2_FIELD_BOTTOM
	.no_dead_strip	_vivid_overlay
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vivid_overlay
_vivid_overlay:                         ; @vivid_overlay
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x20, x1
	mov	x19, x0
	add	x0, x0, #72
	mov	w1, #0
	bl	_tpg_g_twopixelsize
	mov	x22, x0
	cmp	w0, #0
	cinc	w23, w0, lt
	ldr	x8, [x19, #64]
	str	x8, [sp, #40]                   ; 8-byte Folded Spill
	add	x0, x20, #8
	mov	w1, #0
	bl	_vb2_plane_vaddr
	mov	x21, x0
	mov	w27, #0
	ldr	x8, [x19, #72]
	ldr	x9, [x19, #56]
	cbnz	x9, LBB0_2
; %bb.1:
	ldr	x9, [x19]
	cmp	x9, #0
	cset	w27, eq
LBB0_2:
	ldr	w25, [x8]
	ldp	w24, w26, [x19, #36]
	add	w8, w22, #1
	cmp	w8, #3
	cset	w0, lo
	bl	_WARN_ON
	cbz	x0, LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_4:
	mov	x16, x26
	mov	x15, x25
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _V4L2_FIELD_TOP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_FIELD_TOP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _V4L2_FIELD_BOTTOM@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_FIELD_BOTTOM@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.5:
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_3
LBB0_6:
	ldr	w9, [x19, #16]
	tbnz	w9, #31, LBB0_8
; %bb.7:
	mov	w10, #0
	ldr	w8, [x19, #24]
	sub	w8, w8, w9
	cmp	w8, w24
	csel	w11, w8, w24, lo
	str	w9, [sp, #16]                   ; 4-byte Folded Spill
	cmp	w11, #1
	b.ge	LBB0_9
	b	LBB0_3
LBB0_8:
	str	wzr, [sp, #16]                  ; 4-byte Folded Spill
	neg	w10, w9
	add	w11, w9, w24
	cmp	w11, #1
	b.lt	LBB0_3
LBB0_9:
	ldr	w8, [x19, #20]
	tbnz	w8, #31, LBB0_11
; %bb.10:
	sxtw	x12, w8
	ldrsw	x13, [x19, #28]
	ldr	x14, [sp, #40]                  ; 8-byte Folded Reload
	madd	x14, x13, x12, x14
	str	x14, [sp, #40]                  ; 8-byte Folded Spill
LBB0_11:
	cmp	w16, #1
	b.lt	LBB0_3
; %bb.12:
	asr	w20, w23, #1
	ldp	w12, w13, [x19, #44]
	mul	w12, w12, w20
	madd	w12, w13, w15, w12
	add	x21, x21, x12
	ldr	w12, [sp, #16]                  ; 4-byte Folded Reload
	mul	w28, w12, w20
	mul	w25, w10, w20
	mul	w10, w11, w20
	str	w10, [sp, #12]                  ; 4-byte Folded Spill
	mov	w10, w11
	neg	w26, w9
	sub	x9, x10, #1
	str	x9, [sp]                        ; 8-byte Folded Spill
	mov	x22, x8
	str	w27, [sp, #36]                  ; 4-byte Folded Spill
	str	x15, [sp, #24]                  ; 8-byte Folded Spill
	str	w16, [sp, #20]                  ; 4-byte Folded Spill
	b	LBB0_16
LBB0_13:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	add	x0, x8, x28
	add	x1, x21, x25
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	bl	_memcpy
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	ldrsw	x8, [x19, #28]
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	add	x9, x9, x8
	str	x9, [sp, #40]                   ; 8-byte Folded Spill
	ldr	w27, [sp, #36]                  ; 4-byte Folded Reload
	ldr	x15, [sp, #24]                  ; 8-byte Folded Reload
	ldr	w16, [sp, #20]                  ; 4-byte Folded Reload
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	add	w22, w22, #1
	add	x21, x21, x15
	ldr	w8, [x19, #20]
	add	w9, w8, w16
	cmp	w22, w9
	b.ge	LBB0_3
LBB0_16:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
	tbnz	w22, #31, LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	w9, [x19, #32]
	cmp	w22, w9
	b.gt	LBB0_15
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	tbnz	w27, #0, LBB0_13
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	w27, #0
	ldr	x24, [sp]                       ; 8-byte Folded Reload
	ldr	w23, [sp, #16]                  ; 4-byte Folded Reload
LBB0_20:                                ;   Parent Loop BB0_16 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w1, w22, w8
	add	w2, w26, w23
	mov	x0, x19
	mov	x3, x22
	mov	x4, x23
	bl	_valid_pix
	cbz	w0, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	add	w8, w28, w27
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	add	x0, x9, x8
	add	w8, w25, w27
	add	x1, x21, x8
	mov	x2, x20
	bl	_memcpy
LBB0_22:                                ;   in Loop: Header=BB0_20 Depth=2
	cbz	x24, LBB0_14
; %bb.23:                               ;   in Loop: Header=BB0_20 Depth=2
	ldr	w8, [x19, #20]
	add	w23, w23, #1
	add	w27, w27, w20
	sub	x24, x24, #1
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_FIELD_TOP,8,3             ; @V4L2_FIELD_TOP
	.comm	_V4L2_FIELD_BOTTOM,8,3          ; @V4L2_FIELD_BOTTOM
	.no_dead_strip	_vivid_overlay
.subsections_via_symbols
