	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function count_nalus
_count_nalus:                           ## @count_nalus
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%esi, %edi
	callq	_CMSampleBufferGetTotalSampleSize
	movq	%rax, %r12
	movl	%r14d, %edi
	callq	_CMSampleBufferGetDataBuffer
	cmpq	$4, %rbx
	jbe	LBB0_1
## %bb.13:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
LBB0_1:
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movl	$0, %r15d
	testq	%r12, %r12
	je	LBB0_10
## %bb.2:
	movl	%eax, %r13d
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	%rbx, %r14
	addq	%rax, %r14
	incl	%r15d
	cmpq	%r12, %r14
	jae	LBB0_10
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	leaq	-80(%rbp), %rcx
	callq	_CMBlockBufferCopyDataBytes
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rax
	cmpq	$1, %rbx
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	shlq	$8, %rax
	orq	-72(%rbp), %rax
	cmpq	$2, %rbx
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	shlq	$8, %rax
	orq	-64(%rbp), %rax
	cmpq	$3, %rbx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	shlq	$8, %rax
	orq	-56(%rbp), %rax
	jmp	LBB0_9
LBB0_10:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
	xorl	%eax, %eax
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_14
## %bb.12:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_count_nalus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function count_nalus
_count_nalus:                           ; @count_nalus
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	mov	x0, x1
	bl	_CMSampleBufferGetTotalSampleSize
	mov	x21, x0
	mov	x0, x22
	bl	_CMSampleBufferGetDataBuffer
	cmp	x20, #4
	b.ls	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_13
LBB0_2:
	cbz	x21, LBB0_11
; %bb.3:
	mov	x22, x0
	mov	x23, #0
	mov	w24, #0
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x8, #0
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x9, x23, x20
	add	x23, x9, x8
	add	w24, w24, #1
	cmp	x23, x21
	b.hs	LBB0_12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x3, sp, #8
	mov	x0, x22
	mov	x1, x23
	mov	x2, x20
	bl	_CMBlockBufferCopyDataBytes
	cbz	x20, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [sp, #8]
	cmp	x20, #1
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [sp, #16]
	orr	x8, x9, x8, lsl #8
	cmp	x20, #2
	b.eq	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [sp, #24]
	orr	x8, x9, x8, lsl #8
	cmp	x20, #3
	b.eq	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [sp, #32]
	orr	x8, x9, x8, lsl #8
	b	LBB0_5
LBB0_11:
	mov	w24, #0
LBB0_12:
	mov	w0, #0
	str	w24, [x19]
LBB0_13:
	ldr	x8, [sp, #40]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	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
	add	sp, sp, #112
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_count_nalus
.subsections_via_symbols
