	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxf_get_next_track_edit_unit
_mxf_get_next_track_edit_unit:          ## @mxf_get_next_track_edit_unit
	.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
	movq	%rcx, %r12
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rbx
	movl	12(%rsi), %esi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_mxf_find_index_table
	movq	%rax, %r14
	movl	$-1, %eax
	testq	%r14, %r14
	je	LBB0_8
## %bb.1:
	movq	(%rbx), %r15
	testq	%r15, %r15
	jle	LBB0_8
## %bb.2:
	testl	%r15d, %r15d
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_7
## %bb.3:
	movl	$-1, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r12,%r15), %r13d
	sarl	%r13d
	movl	8(%rbx), %ecx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%r13d, %edx
	xorl	%r8d, %r8d
	leaq	-48(%rbp), %r9
	pushq	$0
	pushq	$0
	callq	_mxf_edit_unit_absolute_offset
	addq	$16, %rsp
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, -48(%rbp)
	cmovgel	%r13d, %r15d
	cmovll	%r13d, %r12d
	movl	%r15d, %eax
	subl	%r12d, %eax
	cmpl	$1, %eax
	jg	LBB0_4
LBB0_7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_5:
	movl	$-1, %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mxf_get_next_track_edit_unit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxf_get_next_track_edit_unit
_mxf_get_next_track_edit_unit:          ; @mxf_get_next_track_edit_unit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	w1, [x1, #12]
	bl	_mxf_find_index_table
	cbz	x0, LBB0_7
; %bb.1:
	ldr	x25, [x21]
	cmp	x25, #1
	b.lt	LBB0_7
; %bb.2:
	cmp	w25, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x23, x0
	mov	w26, #-1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w26, w25
	asr	w24, w8, #1
	ldr	w3, [x21, #8]
	add	x5, sp, #12
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	mov	x4, #0
	mov	x6, #0
	mov	w7, #0
	bl	_mxf_edit_unit_absolute_offset
	tbnz	x0, #63, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #12]
	cmp	w8, w20
	csel	w25, w25, w24, lt
	csel	w26, w24, w26, lt
	sub	w8, w25, w26
	cmp	w8, #1
	b.gt	LBB0_4
LBB0_6:
	mov	w0, #0
	str	w25, [x19]
	b	LBB0_8
LBB0_7:
	mov	w0, #-1
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mxf_get_next_track_edit_unit
.subsections_via_symbols
