	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lxf_read_header
_lxf_read_header:                       ## @lxf_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r15
	movq	8(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_LXF_HEADER_DATA_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%r12, %rdi
	callq	_get_packet_header
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_12
## %bb.1:
	movl	(%r13), %ecx
	cmpl	%ecx, %ebx
	jne	LBB0_2
## %bb.3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_avio_read
	cmpl	(%r13), %eax
	jne	LBB0_4
## %bb.6:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %rbx
	leaq	128(%r14), %rdi
	callq	_AV_RL32
	movq	%rax, 16(%rbx)
	leaq	160(%r14), %rdi
	callq	_AV_RL32
	movq	%rax, %r13
	leaq	224(%r14), %rdi
	callq	_AV_RL16
	movl	%eax, %r15d
	leaq	232(%r14), %rdi
	callq	_AV_RL16
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	addq	$464, %r14                      ## imm = 0x1D0
	movq	%r14, %rdi
	callq	_AV_RL32
	movq	%rax, %r14
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rbx), %rcx
	movl	%eax, 16(%rcx)
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movl	%r13d, %eax
	shrl	$14, %eax
	movzbl	%al, %eax
	imull	$1000000, %eax, %eax            ## imm = 0xF4240
	movl	%eax, (%rcx)
	movl	%r13d, %esi
	andl	$15, %esi
	movl	%esi, 4(%rcx)
	movq	_lxf_tags@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ff_codec_get_id
	movq	(%rbx), %rcx
	movl	%eax, 20(%rcx)
	movq	_AVSTREAM_PARSE_HEADERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	%r15d, %r8d
	andl	$127, %r8d
	addl	$1900, %r8d                     ## imm = 0x76C
	movl	%r15d, %r9d
	shrl	$7, %r9d
	andl	$15, %r9d
	movl	%r15d, %ebx
	shrl	$11, %ebx
	andl	$31, %ebx
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	pushq	%rbx
	callq	_av_log
	addq	$16, %rsp
	movl	(%r13), %esi
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r8d
	andl	$127, %r8d
	addl	$1900, %r8d                     ## imm = 0x76C
	movl	%eax, %r9d
	shrl	$7, %r9d
	andl	$15, %r9d
	movl	%eax, %ebx
	movl	%eax, %ecx
	shrl	$11, %ebx
	andl	$31, %ebx
	subq	$8, %rsp
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	pushq	%rbx
	callq	_av_log
	addq	$16, %rsp
	testl	$4194304, -64(%rbp)             ## 4-byte Folded Reload
                                        ## imm = 0x400000
	je	LBB0_10
## %bb.9:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_10:
	shrb	$4, %r14b
	andb	$3, %r14b
	movl	$2, %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_7
## %bb.11:
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	(%rax), %rdx
	movl	%ecx, 16(%rdx)
	movq	_LXF_SAMPLERATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rdx)
	movl	(%r14), %esi
	movl	%esi, 8(%rdx)
	movq	%rax, %rdi
	movl	$64, %esi
	movl	$1, %edx
	callq	_avpriv_set_pts_info
	movq	(%r12), %rdi
	movl	4(%r14), %esi
	callq	_avio_skip
	jmp	LBB0_12
LBB0_2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_12
LBB0_4:
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_12
## %bb.5:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_12
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_LXF_HEADER_DATA_SIZE,4,2       ## @LXF_HEADER_DATA_SIZE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"expected %d B size header, got %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ## @AVMEDIA_TYPE_VIDEO
	.comm	_lxf_tags,4,2                   ## @lxf_tags
	.comm	_AVSTREAM_PARSE_HEADERS,4,2     ## @AVSTREAM_PARSE_HEADERS
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"record: %x = %i-%02i-%02i\n"

L_.str.2:                               ## @.str.2
	.asciz	"expire: %x = %i-%02i-%02i\n"

	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.3:                               ## @.str.3
	.asciz	"VBI data not yet supported\n"

	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_LXF_SAMPLERATE,4,2             ## @LXF_SAMPLERATE
	.no_dead_strip	_lxf_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lxf_read_header
_lxf_read_header:                       ; @lxf_read_header
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	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, #-72]
	ldp	x20, x25, [x0]
Lloh3:
	adrp	x22, _LXF_HEADER_DATA_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _LXF_HEADER_DATA_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	bl	_get_packet_header
	mov	x2, x0
	tbnz	w0, #31, LBB0_11
; %bb.1:
	ldr	w8, [x22]
	cmp	w2, w8
	b.ne	LBB0_8
; %bb.2:
	mov	x0, x20
	mov	x1, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_avio_read
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.3:
	mov	x0, x19
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_10
; %bb.4:
	mov	x23, x0
	add	x0, x21, #128
	bl	_AV_RL32
	str	x0, [x23, #16]
	add	x0, x21, #160
	bl	_AV_RL32
	mov	x20, x0
	add	x0, x21, #224
	bl	_AV_RL16
	mov	x24, x0
	add	x0, x21, #232
	bl	_AV_RL16
	mov	x22, x0
	add	x0, x21, #464
	bl	_AV_RL32
	mov	x21, x0
Lloh7:
	adrp	x8, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	x9, [x23]
	str	w8, [x9, #16]
	ubfx	w8, w20, #14, #8
	mov	w10, #16960
	movk	w10, #15, lsl #16
	mul	w8, w8, w10
	and	w1, w20, #0xf
	stp	w8, w1, [x9]
Lloh10:
	adrp	x8, _lxf_tags@GOTPAGE
Lloh11:
	ldr	x8, [x8, _lxf_tags@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_ff_codec_get_id
	ldr	x8, [x23]
	str	w0, [x8, #20]
Lloh13:
	adrp	x8, _AVSTREAM_PARSE_HEADERS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AVSTREAM_PARSE_HEADERS@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x26, _AV_LOG_DEBUG@GOTPAGE
Lloh17:
	ldr	x26, [x26, _AV_LOG_DEBUG@GOTPAGEOFF]
	str	w8, [x23, #8]
	ldr	w1, [x26]
	and	w8, w24, #0x7f
	add	w8, w8, #1900
	ubfx	w9, w24, #7, #4
	ubfx	w10, w24, #11, #5
	sub	sp, sp, #32
	stp	x9, x10, [sp, #16]
	stp	x24, x8, [sp]
Lloh18:
	adrp	x2, l_.str.1@PAGE
Lloh19:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	add	sp, sp, #32
	ldr	w1, [x26]
	and	w8, w22, #0x7f
	add	w8, w8, #1900
	ubfx	w9, w22, #7, #4
	ubfx	w10, w22, #11, #5
	sub	sp, sp, #32
	stp	x9, x10, [sp, #16]
	stp	x22, x8, [sp]
Lloh20:
	adrp	x2, l_.str.2@PAGE
Lloh21:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_av_log
	add	sp, sp, #32
	tbz	w20, #22, LBB0_6
; %bb.5:
Lloh22:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
Lloh25:
	adrp	x2, l_.str.3@PAGE
Lloh26:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_6:
	ubfx	w8, w21, #4, #2
	mov	w9, #2
	lsl	w8, w9, w8
	str	w8, [x25]
	mov	x0, x19
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_10
; %bb.7:
Lloh27:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	ldr	x9, [x0]
	str	w8, [x9, #16]
Lloh30:
	adrp	x8, _LXF_SAMPLERATE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _LXF_SAMPLERATE@GOTPAGEOFF]
Lloh32:
	ldr	w3, [x8]
	ldr	w8, [x25]
	stp	w8, w3, [x9, #8]
	mov	w1, #64
	mov	w2, #1
	bl	_avpriv_set_pts_info
	ldr	x0, [x19]
	ldr	w1, [x25, #4]
	bl	_avio_skip
	mov	w2, #0
	b	LBB0_11
LBB0_8:
Lloh33:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh34:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x9]
	stp	x8, x2, [sp, #-16]!
Lloh36:
	adrp	x2, l_.str@PAGE
Lloh37:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	add	sp, sp, #16
Lloh38:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
	b	LBB0_11
LBB0_9:
Lloh41:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh42:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w2, w0, w8, lt
	b	LBB0_11
LBB0_10:
Lloh44:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh45:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x2, x0
LBB0_11:
	ldur	x8, [x29, #-72]
Lloh47:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh48:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh49:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x2
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_LXF_HEADER_DATA_SIZE,4,2       ; @LXF_HEADER_DATA_SIZE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"expected %d B size header, got %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ; @AVMEDIA_TYPE_VIDEO
	.comm	_lxf_tags,4,2                   ; @lxf_tags
	.comm	_AVSTREAM_PARSE_HEADERS,4,2     ; @AVSTREAM_PARSE_HEADERS
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"record: %x = %i-%02i-%02i\n"

l_.str.2:                               ; @.str.2
	.asciz	"expire: %x = %i-%02i-%02i\n"

	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.3:                               ; @.str.3
	.asciz	"VBI data not yet supported\n"

	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_LXF_SAMPLERATE,4,2             ; @LXF_SAMPLERATE
	.no_dead_strip	_lxf_read_header
.subsections_via_symbols
