	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vivid_vbi_gen_teletext
_vivid_vbi_gen_teletext:                ## @vivid_vbi_gen_teletext
	.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
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_hamming@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	%esi, %ecx
	andl	$1, %ecx
	leal	1(,%rcx,8), %ecx
	movl	(%rax,%rcx,4), %ecx
	movl	%ecx, (%rdi)
	movl	%esi, %ecx
	shrl	%ecx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 4(%rdi)
	addq	$8, %rdi
	movl	$32, %esi
	movl	$40, %edx
	callq	_memset
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	movl	%r12d, %eax
	movl	$3435973837, %r13d              ## imm = 0xCCCCCCCD
	imulq	%rax, %r13
	shrq	$35, %r13
	leal	(%r13,%r13), %eax
	leal	(%rax,%rax,4), %eax
	subl	%eax, %r12d
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	$2, %eax
	jmp	LBB0_3
LBB0_2:
	movq	(%r15), %rax
	movl	%r12d, %ecx
	movl	$3435973837, %r13d              ## imm = 0xCCCCCCCD
	imulq	%rcx, %r13
	shrq	$35, %r13
	leal	(%r13,%r13), %ecx
	leal	(%rcx,%rcx,4), %ecx
	subl	%ecx, %r12d
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	(%rax,%r12,4), %ecx
	movl	%ecx, 8(%rbx)
	movl	(%rax,%r13,4), %ecx
	movl	%ecx, 12(%rbx)
	movl	(%rax), %ecx
	movl	%ecx, 16(%rbx)
	movl	(%rax), %ecx
	movl	%ecx, 20(%rbx)
	movl	(%rax), %ecx
	movl	%ecx, 24(%rbx)
	movl	(%rax), %ecx
	movl	%ecx, 28(%rbx)
	movl	(%rax), %ecx
	movl	%ecx, 32(%rbx)
	movl	4(%rax), %eax
	movl	%eax, 36(%rbx)
	movl	$10, %eax
LBB0_3:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %r15d
	leaq	(%rbx,%r15,4), %r12
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	$17, %edx
	callq	_memcpy
	addl	$48, %r13d
	movl	%r13d, 28(%rbx,%r15,4)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	orl	$48, %eax
	movl	%eax, 32(%rbx,%r15,4)
	movl	%r14d, %eax
	movl	$3435973837, %ecx               ## imm = 0xCCCCCCCD
	imulq	%rax, %rcx
	shrq	$35, %rcx
	leal	48(%rcx), %eax
	movl	%eax, 60(%rbx,%r15,4)
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,4), %eax
	subl	%eax, %r14d
	orl	$48, %r14d
	movl	%r14d, 64(%rbx,%r15,4)
	movl	$42, %r14d
	subl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rbx,4), %edi
	callq	_calc_parity
	movl	%eax, (%r12,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_4
## %bb.5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hamming,8,3                    ## @hamming
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Page: 100 Row: 10"

	.no_dead_strip	_vivid_vbi_gen_teletext
.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
_vivid_vbi_gen_teletext:                ; @vivid_vbi_gen_teletext
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _hamming@GOTPAGE
Lloh1:
	ldr	x22, [x22, _hamming@GOTPAGEOFF]
	ldr	x8, [x22]
	mov	w9, #1
	bfi	w9, w1, #3, #1
	ldr	w9, [x8, w9, uxtw #2]
	str	w9, [x0]
	lsr	w9, w1, #1
	ldr	w8, [x8, w9, uxtw #2]
	str	w8, [x0, #4]
	add	x0, x0, #8
	mov	w1, #32
	mov	w2, #40
	bl	_memset
	cbz	w19, LBB0_2
; %bb.1:
	mov	w8, #52429
	movk	w8, #52428, lsl #16
	umull	x8, w21, w8
	lsr	x23, x8, #35
	mov	w8, #10
	msub	w21, w23, w8, w21
	mov	w22, #2
	b	LBB0_3
LBB0_2:
	ldr	x8, [x22]
	mov	w9, #52429
	movk	w9, #52428, lsl #16
	umull	x9, w21, w9
	lsr	x23, x9, #35
	mov	w22, #10
	msub	w21, w23, w22, w21
	ldr	w9, [x8, w21, uxtw #2]
	str	w9, [x20, #8]
	ldr	w9, [x8, x23, lsl #2]
	str	w9, [x20, #12]
	ldr	w9, [x8]
	str	w9, [x20, #16]
	ldr	w9, [x8]
	str	w9, [x20, #20]
	ldr	w9, [x8]
	str	w9, [x20, #24]
	ldr	w9, [x8]
	str	w9, [x20, #28]
	ldr	w9, [x8]
	str	w9, [x20, #32]
	ldr	w8, [x8, #4]
	str	w8, [x20, #36]
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
LBB0_3:
	add	x20, x20, w22, uxtw #2
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	w2, #17
	bl	_memcpy
	add	w8, w23, #48
	orr	w9, w21, #0x30
	stp	w8, w9, [x20, #28]
	mov	w8, #52429
	movk	w8, #52428, lsl #16
	umull	x8, w19, w8
	lsr	x8, x8, #35
	mov	w9, #10
	msub	w9, w8, w9, w19
	add	w8, w8, #48
	orr	w9, w9, #0x30
	stp	w8, w9, [x20, #60]
	mov	w8, #42
	sub	w19, w8, w22
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	bl	_calc_parity
	str	w0, [x20], #4
	subs	x19, x19, #1
	b.ne	LBB0_4
; %bb.5:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_hamming,8,3                    ; @hamming
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Page: 100 Row: 10"

	.no_dead_strip	_vivid_vbi_gen_teletext
.subsections_via_symbols
