	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scan_buffer
_scan_buffer:                           ## @scan_buffer
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	testl	%esi, %esi
	jle	LBB0_17
## %bb.1:
	movq	%rcx, %r15
	movq	%rdx, %r13
	movslq	%esi, %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	%rax, %rbx
	movl	%eax, %ecx
	negl	%ecx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leaq	-44(%rbp), %r12
	movq	_USER_DATA_STARTCODE@GOTPCREL(%rip), %r14
	jmp	LBB0_2
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	addl	%eax, %edx
	addl	%edx, %ecx
	movl	%ecx, (%r13)
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rbx, %rax
	jae	LBB0_17
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movl	$-1, -44(%rbp)
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_avpriv_find_start_code
	movl	-44(%rbp), %ecx
	testq	%r13, %r13
	je	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	(%r14), %ecx
	jne	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	1(%rax), %rdx
	cmpq	%rbx, %rdx
	jae	LBB0_16
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpb	$112, -1(%rdx,%rcx)
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	cmpb	$0, (%rdx,%rcx)
	je	LBB0_8
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=2
	cmpq	$253, %rcx
	ja	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=2
	leaq	(%rdx,%rcx), %rsi
	decq	%rsi
	addq	$2, %rsi
	incq	%rcx
	cmpq	%rbx, %rsi
	jb	LBB0_6
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	testq	%r15, %r15
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_VOP_STARTCODE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %ecx
	incl	%ecx
	movl	%ecx, (%r15)
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$2, %ecx
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ecx
	subl	-56(%rbp), %ecx                 ## 4-byte Folded Reload
	addl	$-4, %ecx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, (%rdx)
	jmp	LBB0_16
LBB0_17:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USER_DATA_STARTCODE,4,2        ## @USER_DATA_STARTCODE
	.comm	_VOP_STARTCODE,4,2              ## @VOP_STARTCODE
	.no_dead_strip	_scan_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scan_buffer
_scan_buffer:                           ; @scan_buffer
	.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
	cmp	w1, #1
	b.lt	LBB0_17
; %bb.1:
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x0
	neg	w24, w22
	mov	w25, #-1
Lloh0:
	adrp	x26, _USER_DATA_STARTCODE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _USER_DATA_STARTCODE@GOTPAGEOFF]
Lloh2:
	adrp	x27, _VOP_STARTCODE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _VOP_STARTCODE@GOTPAGEOFF]
	add	x23, x0, w1, sxtw
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w9, w24, w0
	add	w8, w9, w8
	str	w8, [x21]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	x0, x23
	b.hs	LBB0_17
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	str	w25, [sp, #12]
	add	x2, sp, #12
	mov	x1, x23
	bl	_avpriv_find_start_code
	ldr	w8, [sp, #12]
	cbz	x21, LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x26]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x0, #1
	cmp	x8, x23
	b.hs	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x8, #0
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x9, x0, x8
	ldrb	w10, [x9]
	cmp	w10, #112
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldrb	w10, [x9, #1]
	cbz	w10, LBB0_2
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=2
	cmp	x8, #253
	b.hi	LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=2
	add	x9, x9, #2
	add	x8, x8, #1
	cmp	x9, x23
	b.lo	LBB0_8
	b	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	x20, LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x27]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	cbz	x19, LBB0_3
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	w8, #2
	b.ne	LBB0_3
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	w8, w0, w22
	sub	w8, w8, #4
	str	w8, [x19]
	b	LBB0_3
LBB0_17:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_USER_DATA_STARTCODE,4,2        ; @USER_DATA_STARTCODE
	.comm	_VOP_STARTCODE,4,2              ; @VOP_STARTCODE
	.no_dead_strip	_scan_buffer
.subsections_via_symbols
