	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_header
_read_header:                           ## @read_header
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r12
	movq	16(%rax), %rax
	movq	$0, 16(%rax)
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rax)
	movq	_AV_CODEC_ID_ANSI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movl	20(%rbx), %ecx
	movl	%ecx, 4(%rax)
	movl	16(%rbx), %ecx
	movl	%ecx, (%rax)
	movl	8(%rbx), %ecx
	movl	12(%rbx), %edx
	movq	%r12, %rdi
	movl	$60, %esi
	callq	_avpriv_set_pts_info
	movq	8(%rbx), %rax
	movq	%rax, 8(%r12)
	movl	4(%r12), %edi
	callq	_av_q2d
	imull	(%rbx), %eax
	movl	%eax, %edi
	movl	$1, %esi
	callq	_FFMAX
	movl	%eax, (%rbx)
	movq	(%r14), %rdi
	movq	_AVIO_SEEKABLE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_5
## %bb.2:
	callq	_avio_size
                                        ## kill: def $eax killed $eax def $rax
	leaq	4(%rbx), %r15
	movl	%eax, 4(%rbx)
	movl	(%rbx), %ecx
	addl	%ecx, %eax
	decl	%eax
	cltd
	idivl	%ecx
	movl	%eax, (%r12)
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ff_sauce_read
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	movl	(%r15), %esi
	addl	$-51, %esi
	movq	%r14, %rdi
	callq	_efi_read
LBB0_4:
	movq	(%r14), %rdi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_avio_seek
LBB0_5:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ## @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_ANSI,4,2           ## @AV_CODEC_ID_ANSI
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ## @AVIO_SEEKABLE_NORMAL
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.no_dead_strip	_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_header
_read_header:                           ; @read_header
	.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	x19, x0
	ldr	x22, [x0, #8]
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0, #16]
	str	xzr, [x8, #16]
Lloh0:
	adrp	x9, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _AV_CODEC_ID_ANSI@GOTPAGE
Lloh4:
	ldr	x10, [x10, _AV_CODEC_ID_ANSI@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	stp	w10, w9, [x8, #8]
	ldr	d0, [x22, #16]
	str	d0, [x8]
	ldp	w3, w2, [x22, #8]
	mov	w1, #60
	bl	_avpriv_set_pts_info
	ldr	x8, [x22, #8]
	str	x8, [x20, #8]
	ldr	w0, [x20, #4]
	bl	_av_q2d
	ldr	w8, [x22]
	mul	w0, w8, w0
	mov	w1, #1
	bl	_FFMAX
	str	w0, [x22]
	ldr	x0, [x19]
	ldr	w8, [x0]
Lloh6:
	adrp	x9, _AVIO_SEEKABLE_NORMAL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AVIO_SEEKABLE_NORMAL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
	bl	_avio_size
	mov	x21, x22
	str	w0, [x21, #4]!
	ldr	w8, [x22]
	add	w9, w0, w8
	sub	w9, w9, #1
	sdiv	w8, w9, w8
	str	w8, [x20]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	mov	w3, #0
	bl	_ff_sauce_read
	tbz	x0, #63, LBB0_4
; %bb.3:
	ldr	w8, [x21]
	sub	w1, w8, #51
	mov	x0, x19
	bl	_efi_read
LBB0_4:
	ldr	x0, [x19]
Lloh9:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_avio_seek
LBB0_5:
	mov	w0, #0
	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
LBB0_6:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	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
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ; @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_ANSI,4,2           ; @AV_CODEC_ID_ANSI
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ; @AVIO_SEEKABLE_NORMAL
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.no_dead_strip	_read_header
.subsections_via_symbols
