	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flv_read_header
_flv_read_header:                       ## @flv_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	24(%rdi), %r14
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	8(%rbx), %edi
	movl	$14942208, %esi                 ## imm = 0xE40000
	callq	_avio_skip
LBB0_2:
	movl	8(%rbx), %edi
	movl	$4, %esi
	callq	_avio_skip
	movl	8(%rbx), %edi
	callq	_avio_r8
	movq	_FLV_HEADER_FLAG_HASVIDEO@GOTPCREL(%rip), %rcx
	movq	_FLV_HEADER_FLAG_HASAUDIO@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	andl	%eax, %edx
	movl	%edx, (%r14)
	movq	_AVFMTCTX_NOHEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 12(%rbx)
	movl	8(%rbx), %edi
	callq	_avio_rb32
	movl	8(%rbx), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %esi
	callq	_avio_seek
	movl	8(%rbx), %edi
	callq	_avio_rb32
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
LBB0_4:
	movq	$0, (%rbx)
	movq	$0, 8(%r14)
	movl	$-1, 4(%r14)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kux"

	.comm	_FLV_HEADER_FLAG_HASVIDEO,4,2   ## @FLV_HEADER_FLAG_HASVIDEO
	.comm	_FLV_HEADER_FLAG_HASAUDIO,4,2   ## @FLV_HEADER_FLAG_HASAUDIO
	.comm	_AVFMTCTX_NOHEADER,4,2          ## @AVFMTCTX_NOHEADER
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"Read FLV header error, input file is not a standard flv format, first PreviousTagSize0 always is 0\n"

	.no_dead_strip	_flv_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flv_read_header
_flv_read_header:                       ; @flv_read_header
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldp	x8, x20, [x0, #16]
	ldr	w0, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
	mov	w1, #14942208
	bl	_avio_skip
LBB0_2:
	ldr	w0, [x19, #8]
	mov	w1, #4
	bl	_avio_skip
	ldr	w0, [x19, #8]
	bl	_avio_r8
Lloh2:
	adrp	x8, _FLV_HEADER_FLAG_HASVIDEO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FLV_HEADER_FLAG_HASVIDEO@GOTPAGEOFF]
Lloh4:
	adrp	x9, _FLV_HEADER_FLAG_HASAUDIO@GOTPAGE
Lloh5:
	ldr	x9, [x9, _FLV_HEADER_FLAG_HASAUDIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	and	w8, w8, w0
Lloh8:
	adrp	x9, _AVFMTCTX_NOHEADER@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AVFMTCTX_NOHEADER@GOTPAGEOFF]
	str	w8, [x20]
Lloh10:
	ldr	w8, [x9]
	ldp	w0, w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #12]
	bl	_avio_rb32
	mov	x1, x0
	ldr	w0, [x19, #8]
Lloh11:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_avio_seek
	ldr	w0, [x19, #8]
	bl	_avio_rb32
	cbz	w0, LBB0_4
; %bb.3:
Lloh14:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_4:
	str	xzr, [x19]
	str	xzr, [x20, #8]
	mov	w8, #-1
	str	w8, [x20, #4]
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kux"

	.comm	_FLV_HEADER_FLAG_HASVIDEO,4,2   ; @FLV_HEADER_FLAG_HASVIDEO
	.comm	_FLV_HEADER_FLAG_HASAUDIO,4,2   ; @FLV_HEADER_FLAG_HASAUDIO
	.comm	_AVFMTCTX_NOHEADER,4,2          ; @AVFMTCTX_NOHEADER
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"Read FLV header error, input file is not a standard flv format, first PreviousTagSize0 always is 0\n"

	.no_dead_strip	_flv_read_header
.subsections_via_symbols
