	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dnxhd_find_frame_end
_dnxhd_find_frame_end:                  ## @dnxhd_find_frame_end
	.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	%rsi, %r15
	movq	%rdi, %r12
	movl	16(%rdi), %ebx
	movl	20(%rdi), %edi
	testl	%edi, %edi
	je	LBB0_4
## %bb.1:
	leaq	4(%r12), %rsi
	movl	4(%r12), %eax
	testl	%eax, %eax
	je	LBB0_9
## %bb.2:
	movl	%eax, %ecx
	subl	%edx, %ecx
	jle	LBB0_18
## %bb.3:
	movl	%ecx, (%rsi)
	jmp	LBB0_23
LBB0_4:
	testl	%edx, %edx
	jle	LBB0_19
## %bb.5:
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	shll	$8, %ebx
	orl	(%r15,%r14,4), %ebx
	movl	%ebx, %edi
	andl	$-256, %edi
	callq	_ff_dnxhd_check_header_prefix
	testq	%rax, %rax
	jne	LBB0_20
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%r14
	cmpq	%r14, %r13
	jne	LBB0_6
LBB0_19:
	xorl	%edi, %edi
	jmp	LBB0_23
LBB0_9:
	xorl	%r14d, %r14d
	testl	%edx, %edx
	je	LBB0_21
LBB0_10:
	movl	%r14d, %eax
	subl	%edx, %eax
	jge	LBB0_23
## %bb.11:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	movl	%r14d, %eax
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %esi
	leaq	(%r15,%rax,4), %r13
	subq	%rax, %rsi
	xorl	%r15d, %r15d
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r15
	cmpq	%r15, %rsi
	je	LBB0_22
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %eax
	incl	%eax
	movl	%eax, (%r12)
	shll	$8, %ebx
	orl	(%r13,%r15,4), %ebx
	cmpl	$42, %eax
	jne	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	callq	_avpriv_dnxhd_get_frame_size
	testl	%eax, %eax
	jg	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	8(%r12), %edx
	movl	12(%r12), %esi
	callq	_avpriv_dnxhd_get_hr_frame_size
	testl	%eax, %eax
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	jle	LBB0_12
LBB0_16:
	movl	%eax, %ecx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, %edx
	leal	-47(%r14), %eax
	addq	%rdx, %rax
	addq	%r15, %rax
	movl	%eax, (%rbx)
	cmpl	%esi, %eax
	jle	LBB0_18
## %bb.17:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	%ecx, %eax
	addl	%r15d, %eax
	addl	$-47, %eax
	movl	%eax, 4(%r12)
	subl	%r14d, %esi
	addl	(%r12), %esi
	subl	%r15d, %esi
	movl	%esi, (%r12)
	movl	$-1, %ebx
	jmp	LBB0_23
LBB0_18:
	movl	$4294967295, %ecx               ## imm = 0xFFFFFFFF
	movq	%rcx, 16(%r12)
	movq	$0, (%r12)
	jmp	LBB0_24
LBB0_20:
	incl	%r14d
	movq	$0, (%r12)
	leaq	4(%r12), %rsi
	movl	$1, %edi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	testl	%edx, %edx
	jne	LBB0_10
LBB0_21:
	xorl	%eax, %eax
	jmp	LBB0_24
LBB0_22:
	movl	-48(%rbp), %edi                 ## 4-byte Reload
LBB0_23:
	movl	%edi, 20(%r12)
	movl	%ebx, 16(%r12)
	movq	_END_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_24:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_END_NOT_FOUND,4,2              ## @END_NOT_FOUND
	.no_dead_strip	_dnxhd_find_frame_end
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dnxhd_find_frame_end
_dnxhd_find_frame_end:                  ; @dnxhd_find_frame_end
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldp	w22, w23, [x0, #16]
	cbz	w23, LBB0_4
; %bb.1:
	mov	x24, x19
	ldr	w0, [x24, #4]!
	cbz	w0, LBB0_9
; %bb.2:
	subs	w8, w0, w20
	b.le	LBB0_19
; %bb.3:
	str	w8, [x24]
	b	LBB0_18
LBB0_4:
	cmp	w20, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x23, #0
	mov	w24, w20
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21, x23, lsl #2]
	orr	w22, w8, w22, lsl #8
	and	w0, w22, #0xffffff00
	bl	_ff_dnxhd_check_header_prefix
	cbnz	x0, LBB0_20
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	cmp	x24, x23
	b.ne	LBB0_6
LBB0_8:
	mov	w23, #0
	b	LBB0_18
LBB0_9:
	mov	w25, #0
	cbz	w20, LBB0_21
LBB0_10:
	subs	w8, w25, w20
	b.ge	LBB0_18
; %bb.11:
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	mov	x26, #0
	mov	w8, w20
	add	x21, x21, w25, uxtw #2
	sub	x28, x8, w25, uxtw
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	orr	w22, w27, w22, lsl #8
	add	x26, x26, #1
	cmp	x28, x26
	b.eq	LBB0_18
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldr	w27, [x21, x26, lsl #2]
	cmp	w8, #42
	b.ne	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	bl	_avpriv_dnxhd_get_frame_size
	cmp	w0, #0
	b.gt	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	ldp	w2, w1, [x19, #8]
	bl	_avpriv_dnxhd_get_hr_frame_size
	cmp	w0, #1
	b.lt	LBB0_12
LBB0_16:
	mov	x8, x0
	sub	w9, w25, #47
	add	x9, x9, w0, uxtw
	add	x0, x9, x26
	cmp	w0, w20
	str	w0, [x24]
	b.le	LBB0_19
; %bb.17:
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	add	w8, w9, w8
	add	w8, w8, w26
	sub	w8, w8, #47
	ldr	w9, [x19]
	sub	w10, w20, w25
	add	w9, w9, w10
	sub	w9, w9, w26
	stp	w9, w8, [x19]
	mov	w22, #-1
LBB0_18:
	stp	w22, w23, [x19, #16]
Lloh0:
	adrp	x8, _END_NOT_FOUND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _END_NOT_FOUND@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_22
LBB0_19:
	movi	d0, #0x000000ffffffff
	str	d0, [x19, #16]
	str	xzr, [x19]
	b	LBB0_22
LBB0_20:
	add	w25, w23, #1
	mov	x24, x19
	str	wzr, [x24, #4]!
	str	wzr, [x19]
	mov	w23, #1
	cbnz	w20, LBB0_10
LBB0_21:
	mov	w0, #0
LBB0_22:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_END_NOT_FOUND,4,2              ; @END_NOT_FOUND
	.no_dead_strip	_dnxhd_find_frame_end
.subsections_via_symbols
