	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vivid_vbi_gen_teletext_raw
_vivid_vbi_gen_teletext_raw:            ## @vivid_vbi_gen_teletext_raw
	.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	$248, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	pxor	%xmm0, %xmm0
	movdqa	%xmm0, -240(%rbp)
	movdqa	%xmm0, -80(%rbp)
	movdqa	%xmm0, -96(%rbp)
	movdqa	%xmm0, -112(%rbp)
	movdqa	%xmm0, -128(%rbp)
	movdqa	%xmm0, -144(%rbp)
	movdqa	%xmm0, -160(%rbp)
	movdqa	%xmm0, -176(%rbp)
	movdqa	%xmm0, -192(%rbp)
	movdqa	%xmm0, -208(%rbp)
	movdqa	%xmm0, -224(%rbp)
	movl	$0, -64(%rbp)
	movabsq	$365072220245, %rax             ## imm = 0x5500000055
	movq	%rax, -240(%rbp)
	movl	$39, -232(%rbp)
	leaq	-228(%rbp), %rax
	movl	(%rdi), %esi
	movq	%rax, %rdi
	movl	$177, %edx
	callq	_memcpy
	movl	%r14d, %eax
	movl	$3435973837, %r12d              ## imm = 0xCCCCCCCD
	imulq	%rax, %r12
	shrq	$35, %r12
	leaq	112(%r15), %rax
	movq	%rax, -264(%rbp)                ## 8-byte Spill
	leaq	16(%r15), %rax
	movq	%rax, -272(%rbp)                ## 8-byte Spill
	xorl	%r9d, %r9d
	movl	$16, %r8d
	movl	%r12d, %r14d
	xorl	%ecx, %ecx
	movq	%r12, -256(%rbp)                ## 8-byte Spill
	jmp	LBB0_3
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	addl	$5, %r10d
	movl	%r10d, %ecx
	movl	$16, %r8d
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	addl	%r12d, %r14d
	cmpl	$1440, %r9d                     ## imm = 0x5A0
	je	LBB0_17
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##     Child Loop BB0_12 Depth 2
                                        ##     Child Loop BB0_16 Depth 2
	movl	%r9d, %eax
	leal	1(%rax), %r9d
	movl	%r9d, %edx
	imull	%r12d, %edx
	imulq	$1622918785, %rdx, %rdx         ## imm = 0x60BBC681
	shrq	$50, %rdx
	movl	%eax, %esi
	shrl	$3, %esi
	movl	-240(%rbp,%rsi,4), %esi
	movl	%eax, %ebx
	andb	$7, %bl
	movzbl	%bl, %edi
	btl	%edi, %esi
	movl	$192, %esi
	cmovael	%r8d, %esi
	cmpl	%edx, %ecx
	jae	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	imull	%r12d, %eax
	addl	%r12d, %eax
	imulq	$1622918785, %rax, %r11         ## imm = 0x60BBC681
	shrq	$50, %r11
	movslq	%ecx, %rax
	movl	%ecx, %r10d
	notl	%r10d
	addl	%r10d, %r11d
	cmpl	$7, %r11d
	jb	LBB0_16
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, %edi
	imulq	$1622918785, %rdi, %r8          ## imm = 0x60BBC681
	shrq	$50, %r8
	incq	%r11
	movq	%r11, %rdi
	andq	$-8, %rdi
	leaq	3(%rax), %rbx
	movq	%rbx, -248(%rbp)                ## 8-byte Spill
	movd	%esi, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movq	%rdi, -280(%rbp)                ## 8-byte Spill
	leaq	-8(%rdi), %rbx
	movq	%rbx, %rdi
	shrq	$3, %rdi
	incq	%rdi
	cmpq	$24, %rbx
	jae	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
                                        ## implicit-def: $r10
	xorl	%r13d, %r13d
	testb	$3, %dil
	jne	LBB0_11
	jmp	LBB0_14
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-264(%rbp), %rbx                ## 8-byte Reload
	leaq	(%rbx,%rax,4), %r12
	addl	%r8d, %r10d
	incq	%r10
	andq	$-8, %r10
	addq	$-8, %r10
	shrq	$3, %r10
	incq	%r10
	andq	$-4, %r10
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	%xmm0, -112(%r12)
	movdqu	%xmm0, -96(%r12)
	movdqu	%xmm0, -80(%r12)
	movdqu	%xmm0, -64(%r12)
	movdqu	%xmm0, -48(%r12)
	movdqu	%xmm0, -32(%r12)
	movdqu	%xmm0, -16(%r12)
	movdqu	%xmm0, (%r12)
	subq	$-128, %r12
	addq	$-32, %r13
	addq	$-4, %r10
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r10
	subq	%r13, %r10
	addq	$-5, %r10
	subq	%r13, -248(%rbp)                ## 8-byte Folded Spill
	negq	%r13
	movq	-256(%rbp), %r12                ## 8-byte Reload
	testb	$3, %dil
	je	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	addq	%rax, %r13
	movq	-272(%rbp), %rdi                ## 8-byte Reload
	leaq	(%rdi,%r13,4), %rdi
	subl	%ecx, %r8d
	andb	$24, %r8b
	addb	$-8, %r8b
	shrb	$3, %r8b
	incb	%r8b
	movzbl	%r8b, %ecx
	andl	$3, %ecx
	shlq	$3, %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	%xmm0, -16(%rdi,%rbx,4)
	movdqu	%xmm0, (%rdi,%rbx,4)
	addq	$8, %rbx
	cmpq	%rbx, %rcx
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-248(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rbx), %r10
	addq	$-8, %r10
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-280(%rbp), %rcx                ## 8-byte Reload
	cmpq	%rcx, %r11
	je	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	addq	%rcx, %rax
	movl	$16, %r8d
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%esi, (%r15,%rax,4)
	incq	%rax
	cmpl	%eax, %edx
	ja	LBB0_16
## %bb.1:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ecx
	jmp	LBB0_2
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.18:
	addq	$248, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_vivid_vbi_gen_teletext_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vivid_vbi_gen_teletext_raw
_vivid_vbi_gen_teletext_raw:            ; @vivid_vbi_gen_teletext_raw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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
	mov	x20, x2
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	mov	x21, sp
	stur	xzr, [x21, #172]
	movi.2d	v0, #0000000000000000
	stur	q0, [x21, #156]
	mov	w22, #38390
	movk	w22, #10, lsl #16
	stur	q0, [x21, #140]
	add	x8, x21, #12
	stur	q0, [sp, #124]
	stur	q0, [sp, #108]
	stur	q0, [sp, #92]
	stur	q0, [sp, #76]
	stur	q0, [sp, #60]
	stur	q0, [sp, #44]
	stur	q0, [sp, #28]
	stur	q0, [sp, #12]
	movi.2s	v0, #85
	str	d0, [sp]
	mov	w9, #39
	str	w9, [sp, #8]
	ldr	w1, [x0]
	mov	x0, x8
	mov	w2, #177
	bl	_memcpy
	mov	w17, #0
	mov	w13, #0
	mov	w8, #52429
	movk	w8, #52428, lsl #16
	umull	x8, w20, w8
	lsr	x8, x8, #35
	add	x9, x19, #32
	mov	w10, #192
	mov	w11, #16
	mov	x12, x8
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	w12, w12, w8
	mov	x17, x14
	cmp	w14, #1440
	b.eq	LBB0_9
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;     Child Loop BB0_7 Depth 2
	add	w14, w17, #1
	mul	w15, w14, w8
	lsr	w16, w17, #3
	ldr	w16, [x21, w16, uxtw #2]
	udiv	w15, w15, w22
	and	w0, w17, #0x7
	lsr	w16, w16, w0
	tst	w16, #0x1
	csel	w16, w11, w10, eq
	cmp	w13, w15
	b.hs	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	madd	w17, w8, w17, w8
	udiv	w17, w17, w22
	sxtw	x3, w13
	mvn	w2, w13
	add	w0, w17, w2
	mov	x17, x3
	cmp	w0, #15
	b.lo	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	udiv	w4, w12, w22
	add	x0, x0, #1
	and	x1, x0, #0x1fffffff0
	add	x17, x1, x3
	dup.4s	v0, w16
	add	w2, w2, w4
	add	x2, x2, #1
	and	x2, x2, #0x1fffffff0
	add	x3, x9, x3, lsl #2
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	stp	q0, q0, [x3, #-32]
	add	w13, w13, #16
	stp	q0, q0, [x3], #64
	subs	x2, x2, #16
	b.ne	LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	x0, x1
	b.eq	LBB0_1
LBB0_7:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	str	w16, [x19, x17, lsl #2]
	add	x17, x17, #1
	cmp	w15, w17
	b.hi	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x13, x17
	b	LBB0_1
LBB0_9:
	ldur	x8, [x29, #-40]
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_11
; %bb.10:
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_vivid_vbi_gen_teletext_raw
.subsections_via_symbols
