	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mov_read_mdhd
_mov_read_mdhd:                         ## @mov_read_mdhd
	.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	%rdi, %rbx
	movl	$0, -48(%rbp)
	movq	(%rdi), %rdi
	movl	(%rdi), %eax
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jle	LBB0_16
## %bb.1:
	movq	8(%rdi), %rcx
	decl	%eax
	movq	(%rcx,%rax,8), %r15
	movq	16(%r15), %r13
	cmpl	$0, (%r13)
	je	LBB0_3
## %bb.2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_16
LBB0_3:
	movq	%rsi, %r14
	movq	%rsi, %rdi
	callq	_avio_r8
	cmpl	$2, %eax
	jl	LBB0_5
## %bb.4:
	movq	(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_avpriv_request_sample
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_16
LBB0_5:
	movq	%r14, %rdi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	callq	_avio_rb24
	cmpl	$1, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_avio_rb64
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_avio_rb64
	jmp	LBB0_8
LBB0_7:
	movq	%r14, %rdi
	callq	_avio_rb32
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_avio_rb32
LBB0_8:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	(%rbx), %rdx
	movq	%r15, %rdi
	callq	_mov_metadata_creation_time
	movq	%r14, %rdi
	callq	_avio_rb32
	movl	%eax, (%r13)
	testl	%eax, %eax
	jle	LBB0_9
## %bb.10:
	cmpl	$1, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_12
LBB0_11:
	movq	%r14, %rdi
	callq	_avio_rb64
	jmp	LBB0_13
LBB0_9:
	movq	(%rbx), %rdi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.2(%rip), %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movl	$1, (%r13)
	cmpl	$1, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_11
LBB0_12:
	movq	%r14, %rdi
	callq	_avio_rb32
LBB0_13:
	movq	%rax, 8(%r15)
	movq	%r14, %rdi
	callq	_avio_rb16
	leaq	-48(%rbp), %rsi
	movl	%eax, %edi
	callq	_ff_mov_lang_to_iso639
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	leaq	L_.str.3(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_av_dict_set
LBB0_15:
	movq	%r14, %rdi
	callq	_avio_rb16
LBB0_16:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Multiple mdhd?\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Version %d"

	.comm	_AVERROR_PATCHWELCOME,4,2       ## @AVERROR_PATCHWELCOME
L_.str.2:                               ## @.str.2
	.asciz	"Invalid mdhd time scale %d, defaulting to 1\n"

L_.str.3:                               ## @.str.3
	.asciz	"language"

	.no_dead_strip	_mov_read_mdhd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mov_read_mdhd
_mov_read_mdhd:                         ; @mov_read_mdhd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x0
	str	wzr, [sp, #12]
	ldr	x0, [x0]
	ldr	w8, [x0]
	subs	w8, w8, #1
	b.lt	LBB0_16
; %bb.1:
	ldr	x9, [x0, #8]
	ldr	x20, [x9, w8, uxtw #3]
	ldr	x24, [x20, #16]
	ldr	w8, [x24]
	cbz	w8, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
Lloh5:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_17
LBB0_3:
	mov	x19, x1
	mov	x0, x1
	bl	_avio_r8
	mov	x21, x0
	cmp	w0, #2
	b.lt	LBB0_5
; %bb.4:
	ldr	x0, [x22]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_avpriv_request_sample
Lloh10:
	adrp	x8, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	b	LBB0_17
LBB0_5:
	mov	x0, x19
	bl	_avio_rb24
	mov	x0, x19
	cmp	w21, #1
	b.ne	LBB0_7
; %bb.6:
	bl	_avio_rb64
	mov	x23, x0
	mov	x0, x19
	bl	_avio_rb64
	b	LBB0_8
LBB0_7:
	bl	_avio_rb32
	mov	x23, x0
	mov	x0, x19
	bl	_avio_rb32
LBB0_8:
	ldr	x2, [x22]
	mov	x0, x20
	mov	x1, x23
	bl	_mov_metadata_creation_time
	mov	x0, x19
	bl	_avio_rb32
	str	w0, [x24]
	cmp	w0, #0
	b.gt	LBB0_10
; %bb.9:
	ldr	x8, [x22]
Lloh13:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x9]
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	str	x0, [sp]
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x8
	bl	_av_log
	mov	w8, #1
	str	w8, [x24]
LBB0_10:
	mov	x0, x19
	cmp	w21, #1
	b.ne	LBB0_12
; %bb.11:
	bl	_avio_rb64
	b	LBB0_13
LBB0_12:
	bl	_avio_rb32
LBB0_13:
	str	x0, [x20, #8]
	mov	x0, x19
	bl	_avio_rb16
	add	x1, sp, #12
	bl	_ff_mov_lang_to_iso639
	cbz	x0, LBB0_15
; %bb.14:
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #0
	bl	_av_dict_set
LBB0_15:
	mov	x0, x19
	bl	_avio_rb16
LBB0_16:
	mov	w0, #0
LBB0_17:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Multiple mdhd?\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Version %d"

	.comm	_AVERROR_PATCHWELCOME,4,2       ; @AVERROR_PATCHWELCOME
l_.str.2:                               ; @.str.2
	.asciz	"Invalid mdhd time scale %d, defaulting to 1\n"

l_.str.3:                               ; @.str.3
	.asciz	"language"

	.no_dead_strip	_mov_read_mdhd
.subsections_via_symbols
