	.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, %rbx
	movl	(%rdi), %edi
	callq	_avio_rl32
	movl	(%rbx), %edi
	callq	_avio_rl16
	movl	(%rbx), %edi
	callq	_avio_rl16
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r14
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%r14), %rcx
	movl	%eax, 28(%rcx)
	movl	(%rbx), %edi
	callq	_avio_rl32
	movq	16(%r14), %rcx
	movq	%rax, 16(%rcx)
	movq	_ff_codec_bmp_tags@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	%rax, %rsi
	callq	_ff_codec_get_id
	movq	16(%r14), %rcx
	movl	%eax, 24(%rcx)
	movl	(%rbx), %edi
	callq	_avio_rl16
	movq	16(%r14), %rcx
	movq	%rax, 8(%rcx)
	movl	(%rbx), %edi
	callq	_avio_rl16
	movq	16(%r14), %rcx
	movq	%rax, (%rcx)
	movl	(%rbx), %edi
	callq	_avio_rl32
	movq	%rax, %r15
	movl	(%rbx), %edi
	callq	_avio_rl32
	movq	%rax, %r12
	movl	(%rbx), %edi
	callq	_avio_rl32
	movq	%rax, 8(%r14)
	movl	(%rbx), %edi
	movl	$4, %esi
	callq	_avio_skip
	movq	_AVSTREAM_PARSE_HEADERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	testq	%r15, %r15
	je	LBB0_3
## %bb.2:
	testq	%r12, %r12
	je	LBB0_3
## %bb.4:
	movq	%r14, %rdi
	movl	$64, %esi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_avpriv_set_pts_info
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ## @AVMEDIA_TYPE_VIDEO
	.comm	_ff_codec_bmp_tags,4,2          ## @ff_codec_bmp_tags
	.comm	_AVSTREAM_PARSE_HEADERS,4,2     ## @AVSTREAM_PARSE_HEADERS
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid frame rate\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.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	w0, [x0]
	bl	_avio_rl32
	ldr	w0, [x19]
	bl	_avio_rl16
	ldr	w0, [x19]
	bl	_avio_rl16
	mov	x0, x19
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x0, #16]
	str	w8, [x9, #28]
	ldr	w0, [x19]
	bl	_avio_rl32
	mov	x1, x0
	ldr	x8, [x20, #16]
	str	x0, [x8, #16]
Lloh3:
	adrp	x8, _ff_codec_bmp_tags@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ff_codec_bmp_tags@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_ff_codec_get_id
	ldr	x8, [x20, #16]
	str	w0, [x8, #24]
	ldr	w0, [x19]
	bl	_avio_rl16
	ldr	x8, [x20, #16]
	str	x0, [x8, #8]
	ldr	w0, [x19]
	bl	_avio_rl16
	ldr	x8, [x20, #16]
	str	x0, [x8]
	ldr	w0, [x19]
	bl	_avio_rl32
	mov	x21, x0
	ldr	w0, [x19]
	bl	_avio_rl32
	mov	x22, x0
	ldr	w0, [x19]
	bl	_avio_rl32
	str	x0, [x20, #8]
	ldr	w0, [x19]
	mov	w1, #4
	bl	_avio_skip
Lloh6:
	adrp	x8, _AVSTREAM_PARSE_HEADERS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVSTREAM_PARSE_HEADERS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x20]
	cbz	x21, LBB0_5
; %bb.2:
	cbz	x22, LBB0_5
; %bb.3:
	mov	x0, x20
	mov	w1, #64
	mov	x2, x22
	mov	x3, x21
	bl	_avpriv_set_pts_info
	mov	w0, #0
	b	LBB0_6
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	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
LBB0_5:
Lloh12:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh17:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
LBB0_6:
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ; @AVMEDIA_TYPE_VIDEO
	.comm	_ff_codec_bmp_tags,4,2          ; @ff_codec_bmp_tags
	.comm	_AVSTREAM_PARSE_HEADERS,4,2     ; @AVSTREAM_PARSE_HEADERS
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid frame rate\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_read_header
.subsections_via_symbols
