	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpegts_resync
_mpegts_resync:                         ## @mpegts_resync
	.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	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	(%rdi), %r13
	movq	8(%rdi), %r12
	movq	%r12, %rdi
	callq	_avio_tell
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_FFMIN
	negl	%eax
	movq	_SEEK_CUR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_avio_seek
	cmpl	$128, (%r15)
	jne	LBB0_3
## %bb.1:
	cmpl	$71, 48(%r15)
	jne	LBB0_3
## %bb.2:
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	$12, %esi
	callq	_avio_seek
	jmp	LBB0_12
LBB0_3:
	cmpl	$0, (%r13)
	jle	LBB0_8
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_avio_r8
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$71, %r15d
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%ebx
	cmpl	(%r13), %ebx
	jl	LBB0_5
LBB0_8:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	jmp	LBB0_13
LBB0_11:
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$-1, %esi
	callq	_avio_seek
	movq	(%r14), %rdi
	callq	_reanalyze
LBB0_12:
	xorl	%eax, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"max resync size reached, could not find sync byte\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_mpegts_resync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpegts_resync
_mpegts_resync:                         ; @mpegts_resync
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldp	x23, x20, [x0]
	mov	x0, x20
	bl	_avio_tell
	mov	x1, x0
	mov	x0, x22
	bl	_FFMIN
	neg	w1, w0
Lloh0:
	adrp	x22, _SEEK_CUR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SEEK_CUR@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_avio_seek
	ldr	w8, [x21]
	cmp	w8, #128
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x21, #48]
	cmp	w8, #71
	b.ne	LBB0_3
; %bb.2:
	ldr	w2, [x22]
	mov	x0, x20
	mov	w1, #12
	bl	_avio_seek
	b	LBB0_12
LBB0_3:
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.4:
	mov	w24, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_avio_r8
	mov	x21, x0
	mov	x0, x20
	bl	_avio_feof
	cbnz	x0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w21, #71
	b.eq	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w24, w24, #1
	ldr	w8, [x23]
	cmp	w24, w8
	b.lt	LBB0_5
LBB0_8:
Lloh2:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh7:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh9:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
	b	LBB0_13
LBB0_11:
	ldr	w2, [x22]
	mov	x0, x20
	mov	w1, #-1
	bl	_avio_seek
	ldr	x0, [x19]
	bl	_reanalyze
LBB0_12:
	mov	w0, #0
LBB0_13:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"max resync size reached, could not find sync byte\n"

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