	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpga_sync
_mpga_sync:                             ## @mpga_sync
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movq	(%rax), %r13
	movq	_MPGA_HEADER_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %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	_PEEK_BYTES
	movq	_VC_CONTAINER_ERROR_EOS@GOTPCREL(%rip), %rcx
	cmpl	(%r14), %eax
	jne	LBB0_18
## %bb.1:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r13
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_MPGA_MAX_BAD_FRAMES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jge	LBB0_19
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	subq	$8, %rsp
	movq	%rbx, %rdi
	leaq	-88(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	leaq	-76(%rbp), %rcx
	leaq	-52(%rbp), %r8
	leaq	-72(%rbp), %r9
	leaq	-68(%rbp), %rax
	pushq	%rax
	leaq	-92(%rbp), %rax
	pushq	%rax
	leaq	-96(%rbp), %rax
	pushq	%rax
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
	addq	$32, %rsp
	movq	(%r13), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, -88(%rbp)
	je	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-76(%rbp), %edx
	movl	-52(%rbp), %ecx
	movl	-80(%rbp), %r8d
	movl	-72(%rbp), %r9d
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	movl	-88(%rbp), %esi
	movl	(%r14), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_PEEK_BYTES_AT
	cmpl	(%r14), %eax
	jne	LBB0_19
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_mpga_check_frame_header
	cmpq	(%r13), %rax
	je	LBB0_19
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movzbl	(%rbx), %eax
	cmpb	$84, %al
	je	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$73, %al
	jne	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$68, 1(%rbx)
	jne	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$51, 2(%rbx)
	jne	LBB0_15
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rcx, %rax
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	jmp	LBB0_15
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$65, 1(%rbx)
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$71, 2(%rbx)
	je	LBB0_19
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_SKIP_BYTES
	cmpl	$1, %eax
	jne	LBB0_25
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_PEEK_BYTES
	incl	%r12d
	cmpl	(%r14), %eax
	je	LBB0_2
LBB0_25:
	movq	_VC_CONTAINER_ERROR_EOS@GOTPCREL(%rip), %r13
	jmp	LBB0_31
LBB0_18:
	movq	%rcx, %r13
	jmp	LBB0_31
LBB0_19:
	movq	_MPGA_MAX_BAD_FRAMES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jge	LBB0_24
## %bb.20:
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	8(%rdx), %eax
	movl	-76(%rbp), %ecx
	testl	%eax, %eax
	je	LBB0_26
## %bb.21:
	cmpl	%eax, %ecx
	jne	LBB0_23
## %bb.22:
	movl	-52(%rbp), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpl	12(%rcx), %eax
	je	LBB0_27
LBB0_23:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	movq	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPCREL(%rip), %r13
	jmp	LBB0_31
LBB0_24:
	movq	_VC_CONTAINER_ERROR_FORMAT_INVALID@GOTPCREL(%rip), %r13
	jmp	LBB0_31
LBB0_26:
	movl	%ecx, 8(%rdx)
	movl	-52(%rbp), %eax
	movl	%eax, 12(%rdx)
	movl	-72(%rbp), %eax
	movl	%eax, 16(%rdx)
	movl	-96(%rbp), %eax
	movl	%eax, 20(%rdx)
	movl	-92(%rbp), %eax
	movl	%eax, 24(%rdx)
LBB0_27:
	movl	-68(%rbp), %esi
	testl	%esi, %esi
	je	LBB0_29
## %bb.28:
	movq	%r15, %rdi
	callq	_SKIP_BYTES
	movl	-68(%rbp), %eax
	jmp	LBB0_30
LBB0_29:
	xorl	%eax, %eax
LBB0_30:
	movq	-88(%rbp), %rcx
	subq	%rax, %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rcx, 32(%rdx)
	movq	%rcx, 40(%rdx)
	movl	-80(%rbp), %eax
	movl	%eax, 28(%rdx)
LBB0_31:
	movq	(%r13), %rax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_33
## %bb.32:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_33:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MPGA_HEADER_SIZE,4,2           ## @MPGA_HEADER_SIZE
	.comm	_VC_CONTAINER_ERROR_EOS,8,3     ## @VC_CONTAINER_ERROR_EOS
	.comm	_MPGA_MAX_BAD_FRAMES,4,2        ## @MPGA_MAX_BAD_FRAMES
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MPEGv%d, layer %d, %d bps, %d Hz"

L_.str.1:                               ## @.str.1
	.asciz	"free format not supported"

	.comm	_VC_CONTAINER_ERROR_FORMAT_INVALID,8,3 ## @VC_CONTAINER_ERROR_FORMAT_INVALID
L_.str.2:                               ## @.str.2
	.asciz	"version or layer not allowed to change mid-stream"

	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,8,3 ## @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.no_dead_strip	_mpga_sync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpga_sync
_mpga_sync:                             ; @mpga_sync
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #48
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x8, [x0]
	ldr	x19, [x8]
Lloh3:
	adrp	x24, _MPGA_HEADER_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MPGA_HEADER_SIZE@GOTPAGEOFF]
	ldr	w2, [x24]
	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	x21, x8, x9
	mov	sp, x21
	mov	x1, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_PEEK_BYTES
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_16
; %bb.1:
	mov	w26, #0
Lloh7:
	adrp	x27, _MPGA_MAX_BAD_FRAMES@GOTPAGE
Lloh8:
	ldr	x27, [x27, _MPGA_MAX_BAD_FRAMES@GOTPAGEOFF]
	sub	x28, x29, #124
Lloh9:
	adrp	x22, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh10:
	ldr	x22, [x22, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh11:
	adrp	x25, _VC_CONTAINER_ERROR_EOS@GOTPAGE
Lloh12:
	ldr	x25, [x25, _VC_CONTAINER_ERROR_EOS@GOTPAGEOFF]
Lloh13:
	adrp	x23, l_.str@PAGE
Lloh14:
	add	x23, x23, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x27]
	cmp	w26, w8
	b.ge	LBB0_17
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19]
	str	x28, [sp, #-16]!
	sub	x1, x29, #96
	sub	x2, x29, #100
	sub	x3, x29, #104
	sub	x4, x29, #108
	sub	x5, x29, #112
	sub	x6, x29, #116
	sub	x7, x29, #120
	mov	x0, x21
	blr	x8
	add	sp, sp, #16
	ldr	x8, [x22]
	ldur	x9, [x29, #-96]
	cmp	x0, x8
	ccmp	x9, #0, #4, eq
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_LOG_DEBUG
	b	LBB0_14
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldp	w9, w8, [x29, #-108]
	ldur	w10, [x29, #-100]
	ldur	w11, [x29, #-112]
	sub	sp, sp, #32
	stp	x10, x11, [sp, #16]
	stp	x8, x9, [sp]
	mov	x0, x20
	mov	x1, x23
	bl	_LOG_DEBUG
	add	sp, sp, #32
	ldur	w1, [x29, #-96]
	ldr	w3, [x24]
	mov	x0, x20
	mov	x2, x21
	bl	_PEEK_BYTES_AT
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_17
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_mpga_check_frame_header
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x21]
	cmp	w8, #84
	b.eq	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w8, #73
	b.ne	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x21, #1]
	cmp	w8, #68
	b.ne	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x21, #2]
	cmp	w8, #51
	b.ne	LBB0_14
	b	LBB0_17
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x21, #1]
	cmp	w8, #65
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x21, #2]
	cmp	w8, #71
	b.eq	LBB0_17
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	w1, #1
	bl	_SKIP_BYTES
	cmp	w0, #1
	b.ne	LBB0_28
; %bb.15:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w2, [x24]
	mov	x0, x20
	mov	x1, x21
	bl	_PEEK_BYTES
	ldr	w8, [x24]
	add	w26, w26, #1
	cmp	w0, w8
	b.eq	LBB0_2
	b	LBB0_28
LBB0_16:
Lloh17:
	adrp	x25, _VC_CONTAINER_ERROR_EOS@GOTPAGE
Lloh18:
	ldr	x25, [x25, _VC_CONTAINER_ERROR_EOS@GOTPAGEOFF]
	b	LBB0_28
LBB0_17:
	ldr	w8, [x27]
	cmp	w26, w8
	b.ge	LBB0_22
; %bb.18:
	ldr	w9, [x19, #8]
	ldur	w8, [x29, #-104]
	cbz	w9, LBB0_23
; %bb.19:
	cmp	w8, w9
	b.ne	LBB0_21
; %bb.20:
	ldur	w8, [x29, #-108]
	ldr	w9, [x19, #12]
	cmp	w8, w9
	b.eq	LBB0_24
LBB0_21:
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_LOG_DEBUG
Lloh21:
	adrp	x25, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGE
Lloh22:
	ldr	x25, [x25, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGEOFF]
	b	LBB0_28
LBB0_22:
Lloh23:
	adrp	x25, _VC_CONTAINER_ERROR_FORMAT_INVALID@GOTPAGE
Lloh24:
	ldr	x25, [x25, _VC_CONTAINER_ERROR_FORMAT_INVALID@GOTPAGEOFF]
	b	LBB0_28
LBB0_23:
	ldur	w9, [x29, #-108]
	stp	w8, w9, [x19, #8]
	ldp	w9, w8, [x29, #-116]
	stp	w8, w9, [x19, #16]
	ldur	w8, [x29, #-120]
	str	w8, [x19, #24]
LBB0_24:
	ldur	w1, [x29, #-124]
	cbz	w1, LBB0_26
; %bb.25:
	mov	x0, x20
	bl	_SKIP_BYTES
	ldur	w8, [x29, #-124]
	b	LBB0_27
LBB0_26:
	mov	x8, #0
LBB0_27:
	ldur	x9, [x29, #-96]
	sub	x8, x9, x8
	stp	x8, x8, [x19, #32]
	ldur	w8, [x29, #-100]
	str	w8, [x19, #28]
Lloh25:
	adrp	x25, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh26:
	ldr	x25, [x25, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
LBB0_28:
	ldr	x0, [x25]
	ldur	x8, [x29, #-88]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_30
; %bb.29:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_30:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MPGA_HEADER_SIZE,4,2           ; @MPGA_HEADER_SIZE
	.comm	_VC_CONTAINER_ERROR_EOS,8,3     ; @VC_CONTAINER_ERROR_EOS
	.comm	_MPGA_MAX_BAD_FRAMES,4,2        ; @MPGA_MAX_BAD_FRAMES
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MPEGv%d, layer %d, %d bps, %d Hz"

l_.str.1:                               ; @.str.1
	.asciz	"free format not supported"

	.comm	_VC_CONTAINER_ERROR_FORMAT_INVALID,8,3 ; @VC_CONTAINER_ERROR_FORMAT_INVALID
l_.str.2:                               ; @.str.2
	.asciz	"version or layer not allowed to change mid-stream"

	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,8,3 ; @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.no_dead_strip	_mpga_sync
.subsections_via_symbols
