	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vivid_g_fmt_vid_out            ## -- Begin function vivid_g_fmt_vid_out
	.p2align	4, 0x90
_vivid_g_fmt_vid_out:                   ## @vivid_g_fmt_vid_out
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	callq	_video_drvdata
	movq	40(%rax), %r9
	movl	32(%rax), %ecx
	movl	%ecx, 40(%r14)
	movl	28(%rax), %r15d
	movl	%r15d, (%r14)
	movl	24(%rax), %ecx
	movl	%ecx, 36(%r14)
	movl	24(%r9), %ecx
	movl	%ecx, 32(%r14)
	movups	8(%rax), %xmm0
	movups	%xmm0, 16(%r14)
	movl	(%r9), %ebx
	movl	%ebx, 4(%r14)
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.1:
	movq	(%rax), %rdx
	movq	8(%r14), %r8
	movq	16(%r9), %r11
	cmpl	$1, %ebx
	jne	LBB0_12
## %bb.2:
	xorl	%ecx, %ecx
	jmp	LBB0_3
LBB0_12:
	movl	%ebx, %r10d
	andl	$-2, %r10d
	leaq	24(%r8), %rdi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rcx,4), %esi
	movl	%esi, -24(%rdi)
	imull	%r15d, %esi
	addq	(%r11,%rcx,8), %rsi
	movq	%rsi, -16(%rdi)
	movl	4(%rdx,%rcx,4), %esi
	movl	%esi, -8(%rdi)
	imull	%r15d, %esi
	addq	8(%r11,%rcx,8), %rsi
	movq	%rsi, (%rdi)
	addq	$2, %rcx
	addq	$32, %rdi
	cmpq	%rcx, %r10
	jne	LBB0_13
LBB0_3:
	testb	$1, %bl
	je	LBB0_5
## %bb.4:
	movl	(%rdx,%rcx,4), %edx
	movq	%rcx, %rdi
	shlq	$4, %rdi
	movl	%edx, (%r8,%rdi)
	imull	%r15d, %edx
	addq	(%r11,%rcx,8), %rdx
	movq	%rdx, 8(%r8,%rdi)
LBB0_5:
	movl	4(%r9), %r8d
	cmpl	%r8d, %ebx
	jae	LBB0_11
## %bb.6:
	movq	(%rax), %r10
	movq	8(%r9), %r11
	movq	8(%r14), %r9
	movq	8(%r9), %rcx
	movl	%r8d, %eax
	subl	%ebx, %eax
	movq	%rbx, %rsi
	notq	%rsi
	testb	$1, %al
	je	LBB0_8
## %bb.7:
	movl	(%r10,%rbx,4), %eax
	imull	%r15d, %eax
	xorl	%edx, %edx
	divl	(%r11,%rbx,4)
                                        ## kill: def $eax killed $eax def $rax
	addq	%rax, %rcx
	incq	%rbx
LBB0_8:
	addq	%r8, %rsi
	je	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r10,%rbx,4), %eax
	imull	%r15d, %eax
	xorl	%edx, %edx
	divl	(%r11,%rbx,4)
	movl	%eax, %esi
	movl	4(%r10,%rbx,4), %eax
	imull	%r15d, %eax
	xorl	%edx, %edx
	divl	4(%r11,%rbx,4)
	addq	%rcx, %rsi
	movl	%eax, %ecx
	addq	%rsi, %rcx
	addq	$2, %rbx
	cmpq	%rbx, %r8
	jne	LBB0_9
LBB0_10:
	movq	%rcx, 8(%r9)
LBB0_11:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vivid_g_fmt_vid_out            ; -- Begin function vivid_g_fmt_vid_out
	.p2align	2
_vivid_g_fmt_vid_out:                   ; @vivid_g_fmt_vid_out
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	bl	_video_drvdata
	ldr	x9, [x0, #40]
	ldr	w8, [x0, #32]
	str	w8, [x19, #40]
	ldp	w10, w8, [x0, #24]
	str	w8, [x19]
	ldr	w11, [x9, #24]
	stp	w11, w10, [x19, #32]
	ldur	q0, [x0, #8]
	str	q0, [x19, #16]
	ldr	w2, [x9]
	str	w2, [x19, #4]
	cbz	w2, LBB0_3
; %bb.1:
	ldr	x10, [x0]
	ldr	x12, [x19, #8]
	ldr	x11, [x9, #16]
	add	x12, x12, #8
	mov	x13, x2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x10], #4
	stur	w14, [x12, #-8]
	mul	w14, w14, w8
	ldr	x15, [x11], #8
	add	x14, x15, x14
	str	x14, [x12], #16
	subs	x13, x13, #1
	b.ne	LBB0_2
LBB0_3:
	ldr	w11, [x9, #4]
	cmp	w2, w11
	b.hs	LBB0_12
; %bb.4:
	ldr	x13, [x0]
	ldr	x12, [x9, #8]
	ldr	x9, [x19, #8]
	ldr	x10, [x9, #8]
	sub	x15, x11, x2
	cmp	x15, #4
	b.hs	LBB0_6
; %bb.5:
	mov	x14, x2
	b	LBB0_9
LBB0_6:
	mov	x1, #0
	mov	x0, #0
	mov	x17, #0
	and	x16, x15, #0xfffffffffffffffc
	add	x14, x16, x2
	lsl	x2, x2, #2
	add	x3, x2, #8
	add	x2, x13, x3
	add	x3, x12, x3
	mov	x4, x16
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w5, w6, [x2, #-8]
	ldp	w7, w19, [x2], #16
	mul	w5, w5, w8
	mul	w6, w6, w8
	mul	w7, w7, w8
	mul	w19, w19, w8
	ldp	w20, w21, [x3, #-8]
	ldp	w22, w23, [x3], #16
	udiv	w5, w5, w20
	udiv	w6, w6, w21
	udiv	w7, w7, w22
	add	x10, x10, x5
	udiv	w5, w19, w23
	add	x1, x1, x6
	add	x0, x0, x7
	add	x17, x17, x5
	subs	x4, x4, #4
	b.ne	LBB0_7
; %bb.8:
	add	x10, x1, x10
	add	x10, x0, x10
	add	x10, x17, x10
	cmp	x15, x16
	b.eq	LBB0_11
LBB0_9:
	lsl	x15, x14, #2
	add	x13, x13, x15
	add	x12, x12, x15
	sub	x11, x11, x14
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x13], #4
	mul	w14, w14, w8
	ldr	w15, [x12], #4
	udiv	w14, w14, w15
	add	x10, x10, x14
	subs	x11, x11, #1
	b.ne	LBB0_10
LBB0_11:
	str	x10, [x9, #8]
LBB0_12:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
