	.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	%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	(%rdi), %rbx
	movq	_AVIO_SEEKABLE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_5
## %bb.1:
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	%rbx, %rdi
	callq	_avio_size
	leaq	-36(%rax), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_avio_seek
	movq	%rbx, %rdi
	callq	_avio_rb32
	movq	_RAND_TAG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.2:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_avio_rb32
	movq	%rax, 8(%r15)
	movq	%rbx, %rdi
	callq	_avio_rb16
	testq	%rax, %rax
	je	LBB0_12
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_avpriv_request_sample
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_6:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
LBB0_7:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %r12d
LBB0_9:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_12:
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_avio_skip
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	movl	%eax, 32(%rcx)
	movq	_AV_CODEC_ID_RAWVIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rcx)
	movq	_AV_PIX_FMT_RGBA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rcx)
	movq	$0, 16(%rcx)
	movq	%rbx, %rdi
	callq	_avio_rb16
	movq	(%r15), %rcx
	movq	%rax, 8(%rcx)
	movq	%rbx, %rdi
	callq	_avio_rb16
	movq	(%r15), %rcx
	movq	%rax, (%rcx)
	movq	%rbx, %rdi
	callq	_avio_rb16
	movq	%rax, (%r12)
	movq	(%r15), %rax
	movq	(%rax), %rsi
	movq	8(%rax), %rdi
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	movq	%r14, %rcx
	callq	_av_image_check_size
	testq	%rax, %rax
	js	LBB0_7
## %bb.13:
	movq	%rbx, %rdi
	callq	_avio_rb16
	movq	%r15, %rdi
	movl	$64, %esi
	movl	$1, %edx
	movq	%rax, %rcx
	callq	_avpriv_set_pts_info
	movl	(%r13), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_seek
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ## @AVIO_SEEKABLE_NORMAL
	.comm	_EIO,4,2                        ## @EIO
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_RAND_TAG,8,3                   ## @RAND_TAG
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"magic number not found\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported packing method"

	.comm	_AVERROR_PATCHWELCOME,4,2       ## @AVERROR_PATCHWELCOME
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ## @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_RAWVIDEO,4,2       ## @AV_CODEC_ID_RAWVIDEO
	.comm	_AV_PIX_FMT_RGBA,4,2            ## @AV_PIX_FMT_RGBA
	.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x19, [x0]
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _AVIO_SEEKABLE_NORMAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AVIO_SEEKABLE_NORMAL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x23, [x0, #8]
	mov	x0, x19
	bl	_avio_size
	sub	x1, x0, #36
Lloh3:
	adrp	x22, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_avio_seek
	mov	x0, x19
	bl	_avio_rb32
Lloh5:
	adrp	x8, _RAND_TAG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RAND_TAG@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.2:
	mov	x0, x20
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_10
; %bb.3:
	mov	x21, x0
	mov	x0, x19
	bl	_avio_rb32
	str	x0, [x21, #8]
	mov	x0, x19
	bl	_avio_rb16
	cbz	x0, LBB0_12
; %bb.4:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_avpriv_request_sample
Lloh10:
	adrp	x8, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_11
LBB0_6:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
LBB0_7:
Lloh19:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_12:
	mov	x0, x19
	mov	w1, #2
	bl	_avio_skip
Lloh23:
	adrp	x8, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ldr	x9, [x21]
	str	w8, [x9, #32]
Lloh26:
	adrp	x8, _AV_CODEC_ID_RAWVIDEO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AV_CODEC_ID_RAWVIDEO@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x10, _AV_PIX_FMT_RGBA@GOTPAGE
Lloh30:
	ldr	x10, [x10, _AV_PIX_FMT_RGBA@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #24]
	str	xzr, [x9, #16]
	mov	x0, x19
	bl	_avio_rb16
	ldr	x8, [x21]
	str	x0, [x8, #8]
	mov	x0, x19
	bl	_avio_rb16
	ldr	x8, [x21]
	str	x0, [x8]
	mov	x0, x19
	bl	_avio_rb16
	str	x0, [x23]
	ldr	x8, [x21]
	ldp	x1, x0, [x8]
	mov	w2, #0
	mov	x3, x20
	bl	_av_image_check_size
	tbnz	x0, #63, LBB0_7
; %bb.13:
	mov	x0, x19
	bl	_avio_rb16
	mov	x3, x0
	mov	x0, x21
	mov	w1, #64
	mov	w2, #1
	bl	_avpriv_set_pts_info
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, #0
	bl	_avio_seek
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ; @AVIO_SEEKABLE_NORMAL
	.comm	_EIO,4,2                        ; @EIO
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_RAND_TAG,8,3                   ; @RAND_TAG
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"magic number not found\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported packing method"

	.comm	_AVERROR_PATCHWELCOME,4,2       ; @AVERROR_PATCHWELCOME
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ; @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_RAWVIDEO,4,2       ; @AV_CODEC_ID_RAWVIDEO
	.comm	_AV_PIX_FMT_RGBA,4,2            ; @AV_PIX_FMT_RGBA
	.no_dead_strip	_read_header
.subsections_via_symbols
