	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_yuv4mpeg2_frame_header
_read_yuv4mpeg2_frame_header:           ## @read_yuv4mpeg2_frame_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r13
	movq	_FRAME_HEADER_SIZE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	$-5, %eax
	movl	%eax, -44(%rbp)
	leaq	-53(%rbp), %rsi
	movl	$5, %edx
	callq	_READ_BYTES
	cmpl	$5, %eax
	jne	LBB0_11
## %bb.1:
	leaq	L_.str(%rip), %rsi
	leaq	-53(%rbp), %rdi
	movl	$5, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_2
LBB0_11:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_LOG_ERROR
	movq	%rbx, %rdi
	callq	_STREAM_STATUS
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.12:
	movq	%rbx, %rdi
	callq	_STREAM_STATUS
	jmp	LBB0_14
LBB0_2:
	leaq	-44(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_read_yuv4mpeg2_option
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_8
## %bb.3:
	leaq	-44(%rbp), %r14
	leaq	-48(%rbp), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_read_yuv4mpeg2_option
	cmpq	(%r15), %rax
	jne	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 16(%r13)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	8(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdx
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-48(%rbp), %eax
	movl	%eax, (%r13)
	jmp	LBB0_7
LBB0_8:
	movq	%rbx, %rdi
	callq	__READ_U8
	cmpl	$10, %eax
	jne	LBB0_9
## %bb.13:
	movl	-44(%rbp), %eax
	notl	%eax
	movq	_FRAME_HEADER_SIZE_MAX@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	movl	%eax, 4(%r13)
	movq	(%r15), %rax
	jmp	LBB0_14
LBB0_9:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_LOG_ERROR
LBB0_10:
	movq	_VC_CONTAINER_ERROR_CORRUPTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FRAME_HEADER_SIZE_MAX,4,2      ## @FRAME_HEADER_SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FRAME"

L_.str.1:                               ## @.str.1
	.asciz	"missing frame marker"

	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_ERROR_CORRUPTED,8,3 ## @VC_CONTAINER_ERROR_CORRUPTED
L_.str.2:                               ## @.str.2
	.asciz	"S%i"

L_.str.3:                               ## @.str.3
	.asciz	"missing end of frame header marker"

	.no_dead_strip	_read_yuv4mpeg2_frame_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_yuv4mpeg2_frame_header
_read_yuv4mpeg2_frame_header:           ; @read_yuv4mpeg2_frame_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x21, [x8]
Lloh0:
	adrp	x22, _FRAME_HEADER_SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _FRAME_HEADER_SIZE_MAX@GOTPAGEOFF]
	ldr	w8, [x22]
	sub	w8, w8, #5
	str	w8, [sp, #12]
	add	x1, sp, #3
	mov	w2, #5
	bl	_READ_BYTES
	cmp	w0, #5
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #3
	mov	w2, #5
	bl	_memcmp
	cbz	x0, LBB0_4
LBB0_2:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_LOG_ERROR
	mov	x0, x19
	bl	_STREAM_STATUS
Lloh6:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_13
; %bb.3:
	mov	x0, x19
	bl	_STREAM_STATUS
	b	LBB0_14
LBB0_4:
	add	x1, sp, #12
	mov	x0, x19
	bl	_read_yuv4mpeg2_option
Lloh9:
	adrp	x23, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh10:
	ldr	x23, [x23, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.5:
Lloh11:
	adrp	x20, l_.str.2@PAGE
Lloh12:
	add	x20, x20, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x1, sp, #12
	mov	x0, x19
	bl	_read_yuv4mpeg2_option
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x21, #8]
	add	x2, sp, #8
	mov	x1, x20
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [sp, #8]
	str	w8, [x21]
	b	LBB0_6
LBB0_10:
	mov	x0, x19
	bl	__READ_U8
	cmp	w0, #10
	b.ne	LBB0_12
; %bb.11:
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	mvn	w9, w9
	add	w8, w8, w9
	str	w8, [x21, #4]
	ldr	x0, [x23]
	b	LBB0_14
LBB0_12:
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_LOG_ERROR
LBB0_13:
Lloh15:
	adrp	x8, _VC_CONTAINER_ERROR_CORRUPTED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_CORRUPTED@GOTPAGEOFF]
Lloh17:
	ldr	x0, [x8]
LBB0_14:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_FRAME_HEADER_SIZE_MAX,4,2      ; @FRAME_HEADER_SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FRAME"

l_.str.1:                               ; @.str.1
	.asciz	"missing frame marker"

	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_ERROR_CORRUPTED,8,3 ; @VC_CONTAINER_ERROR_CORRUPTED
l_.str.2:                               ; @.str.2
	.asciz	"S%i"

l_.str.3:                               ; @.str.3
	.asciz	"missing end of frame header marker"

	.no_dead_strip	_read_yuv4mpeg2_frame_header
.subsections_via_symbols
