	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function roq_read_header
_roq_read_header:                       ## @roq_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, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r15
	movq	16(%rdi), %r13
	movq	_RoQ_CHUNK_PREAMBLE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_avio_read
	movq	_RoQ_CHUNK_PREAMBLE_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.2:
	addq	$6, %rbx
	movq	%rbx, %rdi
	callq	_AV_RL16
	movl	%eax, 48(%r13)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r13)
	movups	%xmm0, 24(%r13)
	movq	$0, 40(%r13)
	movq	$-1, (%r13)
	movq	_AVFMTCTX_NOHEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RoQ_CHUNK_PREAMBLE_SIZE,4,2    ## @RoQ_CHUNK_PREAMBLE_SIZE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AVFMTCTX_NOHEADER,4,2          ## @AVFMTCTX_NOHEADER
	.no_dead_strip	_roq_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function roq_read_header
_roq_read_header:                       ; @roq_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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldp	x0, x21, [x0, #8]
Lloh3:
	adrp	x22, _RoQ_CHUNK_PREAMBLE_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _RoQ_CHUNK_PREAMBLE_SIZE@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x9, x2
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
	mov	x1, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_avio_read
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
	add	x0, x20, #6
	bl	_AV_RL16
	mov	x8, x0
	mov	w0, #0
	str	w8, [x21, #48]
	movi.2d	v0, #0000000000000000
	stur	q0, [x21, #8]
	stur	q0, [x21, #24]
	str	xzr, [x21, #40]
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x21]
Lloh7:
	adrp	x8, _AVFMTCTX_NOHEADER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AVFMTCTX_NOHEADER@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_3
LBB0_2:
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_3:
	ldur	x8, [x29, #-40]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	sub	sp, x29, #32
	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_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_RoQ_CHUNK_PREAMBLE_SIZE,4,2    ; @RoQ_CHUNK_PREAMBLE_SIZE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AVFMTCTX_NOHEADER,4,2          ; @AVFMTCTX_NOHEADER
	.no_dead_strip	_roq_read_header
.subsections_via_symbols
