	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mov_read_tfhd
_mov_read_tfhd:                         ## @mov_read_tfhd
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_avio_r8
	movq	%r12, %rdi
	callq	_avio_rb24
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_avio_rb32
	testl	%eax, %eax
	je	LBB0_26
## %bb.1:
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	jle	LBB0_5
## %bb.2:
	movq	72(%r14), %r13
	shlq	$3, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%eax, (%r13,%rbx)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	$40, %rbx
	cmpq	%rbx, %rcx
	jne	LBB0_3
LBB0_5:
	movl	4(%r14), %edi
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movl	%eax, %ecx
	jmp	LBB0_24
LBB0_26:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_25
LBB0_6:
	movl	$1, 16(%r14)
	movl	%eax, 20(%r14)
	leaq	8(%r14), %rdi
	movl	%eax, %esi
	callq	_set_frag_stream
	movq	_MOV_TFHD_BASE_DATA_OFFSET@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	callq	_avio_rb64
	jmp	LBB0_11
LBB0_8:
	movq	_MOV_TFHD_DEFAULT_BASE_IS_MOOF@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_10
## %bb.9:
	movl	60(%r14), %eax
	jmp	LBB0_11
LBB0_10:
	movl	56(%r14), %eax
LBB0_11:
	movl	%eax, 64(%r14)
	movq	_MOV_TFHD_STSD_ID@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_13
## %bb.12:
	movq	%r12, %rdi
	callq	_avio_rb32
	jmp	LBB0_14
LBB0_13:
	movq	8(%r13,%rbx), %rax
LBB0_14:
	movq	%rax, 48(%r14)
	movq	_MOV_TFHD_DEFAULT_DURATION@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_16
## %bb.15:
	movq	%r12, %rdi
	callq	_avio_rb32
	jmp	LBB0_17
LBB0_16:
	movq	16(%r13,%rbx), %rax
LBB0_17:
	movq	%rax, 40(%r14)
	movq	_MOV_TFHD_DEFAULT_SIZE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_19
## %bb.18:
	movq	%r12, %rdi
	callq	_avio_rb32
	jmp	LBB0_20
LBB0_19:
	movq	24(%r13,%rbx), %rax
LBB0_20:
	movq	%rax, 32(%r14)
	movq	_MOV_TFHD_DEFAULT_FLAGS@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_22
## %bb.21:
	movq	%r12, %rdi
	callq	_avio_rb32
	movq	%rax, %rcx
	jmp	LBB0_23
LBB0_22:
	movq	32(%r13,%rbx), %rcx
LBB0_23:
	movl	%ecx, 24(%r14)
	movl	4(%r14), %edi
	movq	_AV_LOG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
LBB0_24:
	callq	_av_log
	xorl	%eax, %eax
LBB0_25:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not find corresponding trex (id %u)\n"

	.comm	_MOV_TFHD_BASE_DATA_OFFSET,4,2  ## @MOV_TFHD_BASE_DATA_OFFSET
	.comm	_MOV_TFHD_DEFAULT_BASE_IS_MOOF,4,2 ## @MOV_TFHD_DEFAULT_BASE_IS_MOOF
	.comm	_MOV_TFHD_STSD_ID,4,2           ## @MOV_TFHD_STSD_ID
	.comm	_MOV_TFHD_DEFAULT_DURATION,4,2  ## @MOV_TFHD_DEFAULT_DURATION
	.comm	_MOV_TFHD_DEFAULT_SIZE,4,2      ## @MOV_TFHD_DEFAULT_SIZE
	.comm	_MOV_TFHD_DEFAULT_FLAGS,4,2     ## @MOV_TFHD_DEFAULT_FLAGS
	.comm	_AV_LOG_TRACE,4,2               ## @AV_LOG_TRACE
L_.str.1:                               ## @.str.1
	.asciz	"frag flags 0x%x\n"

	.no_dead_strip	_mov_read_tfhd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mov_read_tfhd
_mov_read_tfhd:                         ; @mov_read_tfhd
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_avio_r8
	mov	x0, x20
	bl	_avio_rb24
	mov	x21, x0
	mov	x0, x20
	bl	_avio_rb32
	mov	x3, x0
	cbz	w3, LBB0_6
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	ldr	x9, [x19, #72]
	add	x22, x9, #16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w9, [x22, #-16]
	cmp	w9, w3
	b.eq	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #40
	subs	x8, x8, #1
	b.ne	LBB0_3
LBB0_5:
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_25
LBB0_6:
Lloh5:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_26
LBB0_7:
	mov	w8, #1
	stp	w8, w3, [x19, #16]
	add	x0, x19, #8
	mov	x1, x3
	bl	_set_frag_stream
Lloh8:
	adrp	x8, _MOV_TFHD_BASE_DATA_OFFSET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MOV_TFHD_BASE_DATA_OFFSET@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_avio_rb64
	b	LBB0_12
LBB0_9:
Lloh11:
	adrp	x8, _MOV_TFHD_DEFAULT_BASE_IS_MOOF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MOV_TFHD_DEFAULT_BASE_IS_MOOF@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_11
; %bb.10:
	ldr	w0, [x19, #60]
	b	LBB0_12
LBB0_11:
	ldr	w0, [x19, #56]
LBB0_12:
	str	w0, [x19, #64]
Lloh14:
	adrp	x8, _MOV_TFHD_STSD_ID@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MOV_TFHD_STSD_ID@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_14
; %bb.13:
	mov	x0, x20
	bl	_avio_rb32
	b	LBB0_15
LBB0_14:
	ldur	x0, [x22, #-8]
LBB0_15:
	str	x0, [x19, #48]
Lloh17:
	adrp	x8, _MOV_TFHD_DEFAULT_DURATION@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MOV_TFHD_DEFAULT_DURATION@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_17
; %bb.16:
	mov	x0, x20
	bl	_avio_rb32
	b	LBB0_18
LBB0_17:
	ldr	x0, [x22]
LBB0_18:
	str	x0, [x19, #40]
Lloh20:
	adrp	x8, _MOV_TFHD_DEFAULT_SIZE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MOV_TFHD_DEFAULT_SIZE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_20
; %bb.19:
	mov	x0, x20
	bl	_avio_rb32
	b	LBB0_21
LBB0_20:
	ldr	x0, [x22, #8]
LBB0_21:
	str	x0, [x19, #32]
Lloh23:
	adrp	x8, _MOV_TFHD_DEFAULT_FLAGS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MOV_TFHD_DEFAULT_FLAGS@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_23
; %bb.22:
	mov	x0, x20
	bl	_avio_rb32
	mov	x3, x0
	b	LBB0_24
LBB0_23:
	ldr	x3, [x22, #16]
LBB0_24:
	str	w3, [x19, #24]
	ldr	w0, [x19, #4]
Lloh26:
	adrp	x8, _AV_LOG_TRACE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AV_LOG_TRACE@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x2, l_.str.1@PAGE
Lloh30:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_25:
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_av_log
	mov	w0, #0
LBB0_26:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not find corresponding trex (id %u)\n"

	.comm	_MOV_TFHD_BASE_DATA_OFFSET,4,2  ; @MOV_TFHD_BASE_DATA_OFFSET
	.comm	_MOV_TFHD_DEFAULT_BASE_IS_MOOF,4,2 ; @MOV_TFHD_DEFAULT_BASE_IS_MOOF
	.comm	_MOV_TFHD_STSD_ID,4,2           ; @MOV_TFHD_STSD_ID
	.comm	_MOV_TFHD_DEFAULT_DURATION,4,2  ; @MOV_TFHD_DEFAULT_DURATION
	.comm	_MOV_TFHD_DEFAULT_SIZE,4,2      ; @MOV_TFHD_DEFAULT_SIZE
	.comm	_MOV_TFHD_DEFAULT_FLAGS,4,2     ; @MOV_TFHD_DEFAULT_FLAGS
	.comm	_AV_LOG_TRACE,4,2               ; @AV_LOG_TRACE
l_.str.1:                               ; @.str.1
	.asciz	"frag flags 0x%x\n"

	.no_dead_strip	_mov_read_tfhd
.subsections_via_symbols
