	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function compress_raw_buf
_compress_raw_buf:                      ## @compress_raw_buf
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movq	_VBI_ACTIVE_SAMPLES@GOTPCREL(%rip), %rax
	movslq	(%rax), %r12
	movl	(%rdi), %ecx
	leal	(%rcx,%rcx), %eax
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movslq	-60(%rbp), %rdx                 ## 4-byte Folded Reload
	leal	-1(%rax), %ecx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	leaq	-4(%r12), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
                                        ## kill: def $ecx killed $ecx killed $rcx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	leaq	(%rsi,%rdx,4), %r15
	addq	$16, %r15
	movl	%edx, %ecx
	notl	%ecx
	addl	%r12d, %ecx
	cmpl	$2, %eax
	movl	$1, %edx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmovgel	%eax, %edx
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movslq	%ecx, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	shlq	$2, %r12
	xorl	%r14d, %r14d
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_memcpy
	leaq	(%rbx,%r13,4), %rbx
	movq	-88(%rbp), %r12                 ## 8-byte Reload
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	addq	%r12, %r15
	cmpq	%r14, -96(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_12
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$255, -16(%r15)
	jne	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, -12(%r15)
	jne	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, -8(%r15)
	jne	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-4(%r15), %eax
	movq	_raw_vbi_sav_rp@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	4(%rcx), %eax
	jne	LBB0_12
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r14, -104(%rbp)                ## 8-byte Folded Reload
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_memcpy
	leaq	(%rbx,%r13,4), %rbx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	-16(%r15,%rax,4), %esi
	movq	%rbx, %rdi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_memset
	jmp	LBB0_11
LBB0_12:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_1:
	addl	$-4, %r12d
                                        ## kill: def $r12d killed $r12d killed $r12 def $r12
LBB0_13:
	imull	%r12d, %eax
                                        ## kill: def $eax killed $eax killed $rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VBI_ACTIVE_SAMPLES,4,2         ## @VBI_ACTIVE_SAMPLES
	.comm	_raw_vbi_sav_rp,8,3             ## @raw_vbi_sav_rp
	.no_dead_strip	_compress_raw_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function compress_raw_buf
_compress_raw_buf:                      ; @compress_raw_buf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x8, _VBI_ACTIVE_SAMPLES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VBI_ACTIVE_SAMPLES@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	ldr	w9, [x0]
	lsl	w10, w9, #1
	cmp	w9, #0
	b.le	LBB0_12
; %bb.1:
	mov	x20, x3
	mov	x21, x1
	sub	w19, w8, #4
	sub	w9, w19, w3
	subs	w24, w10, #1
	sxtw	x25, w19
	sxtw	x22, w9
	mvn	w9, w3
	add	w9, w8, w9
	sxtw	x9, w9
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	str	w10, [sp, #4]                   ; 4-byte Folded Spill
	csinc	w27, w10, wzr, gt
	lsl	x28, x8, #2
Lloh3:
	adrp	x26, _raw_vbi_sav_rp@GOTPAGE
Lloh4:
	ldr	x26, [x26, _raw_vbi_sav_rp@GOTPAGEOFF]
	add	x23, x1, w3, sxtw #2
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x1, x23, #16
	mov	x0, x21
	cbz	x24, LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x2, x19
	bl	_memcpy
	add	x21, x21, x25, lsl #2
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	sub	x24, x24, #1
	add	x23, x23, x28
	subs	x27, x27, #1
	b.eq	LBB0_11
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	cmp	w8, #255
	b.ne	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x23, #4]
	cbnz	w8, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x23, #8]
	cbnz	w8, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x23, #12]
	ldr	x9, [x26]
	ldr	w10, [x9]
	cmp	w8, w10
	b.eq	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x9, #4]
	cmp	w8, w9
	b.eq	LBB0_2
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x2, x22
	bl	_memcpy
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w1, [x23, x8, lsl #2]
	add	x21, x21, x22, lsl #2
	mov	x0, x21
	mov	x2, x20
	bl	_memset
	b	LBB0_4
LBB0_11:
	ldr	w10, [sp, #4]                   ; 4-byte Folded Reload
	b	LBB0_13
LBB0_12:
	sub	w19, w8, #4
LBB0_13:
	mul	w0, w10, w19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_VBI_ACTIVE_SAMPLES,4,2         ; @VBI_ACTIVE_SAMPLES
	.comm	_raw_vbi_sav_rp,8,3             ; @raw_vbi_sav_rp
	.no_dead_strip	_compress_raw_buf
.subsections_via_symbols
