	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function new_pes_packet
_new_pes_packet:                        ## @new_pes_packet
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_av_init_packet
	movq	40(%rbx), %rax
	movq	%rax, 40(%r14)
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	(%rbx), %rdi
	movq	%rdi, 8(%r14)
	movq	8(%rbx), %rcx
	movq	_MAX_PES_PAYLOAD@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_3
## %bb.1:
	movq	16(%rbx), %rdx
	addq	%rdi, %rdx
	movq	_PES_START_SIZE@GOTPCREL(%rip), %rsi
	addq	(%rsi), %rcx
	cmpq	%rcx, %rdx
	je	LBB0_3
## %bb.2:
	movl	80(%rbx), %edi
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
	movq	_AV_PKT_FLAG_CORRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 48(%rbx)
	movq	(%r14), %rax
	movq	8(%r14), %rdi
LBB0_3:
	addq	%rax, %rdi
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_memset
	movq	72(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	cmpl	$131, 24(%rbx)
	jne	LBB0_6
## %bb.5:
	cmpl	$118, 28(%rbx)
	je	LBB0_7
LBB0_6:
	movq	64(%rbx), %rax
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	movups	48(%rbx), %xmm0
	movups	%xmm0, 16(%r14)
	movq	$0, 40(%rbx)
	movq	%rbx, %rdi
	callq	_reset_pes_packet_state
	movq	_AV_PKT_DATA_MPEGTS_STREAM_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_av_packet_new_side_data
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	32(%rbx), %ecx
	movl	%ecx, (%rax)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PES_PAYLOAD,8,3            ## @MAX_PES_PAYLOAD
	.comm	_PES_START_SIZE,8,3             ## @PES_START_SIZE
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PES packet size mismatch\n"

	.comm	_AV_PKT_FLAG_CORRUPT,4,2        ## @AV_PKT_FLAG_CORRUPT
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ## @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_AV_PKT_DATA_MPEGTS_STREAM_ID,4,2 ## @AV_PKT_DATA_MPEGTS_STREAM_ID
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_new_pes_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function new_pes_packet
_new_pes_packet:                        ; @new_pes_packet
	.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	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_av_init_packet
	ldr	x8, [x19, #40]
	str	x8, [x20, #40]
	ldr	x8, [x8]
	ldp	x9, x10, [x19]
	stp	x8, x9, [x20]
Lloh0:
	adrp	x11, _MAX_PES_PAYLOAD@GOTPAGE
Lloh1:
	ldr	x11, [x11, _MAX_PES_PAYLOAD@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
	cmp	x10, x11
	b.eq	LBB0_3
; %bb.1:
	ldr	x11, [x19, #16]
	add	x11, x11, x9
Lloh3:
	adrp	x12, _PES_START_SIZE@GOTPAGE
Lloh4:
	ldr	x12, [x12, _PES_START_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x12, [x12]
	add	x10, x12, x10
	cmp	x11, x10
	b.eq	LBB0_3
; %bb.2:
	ldr	w0, [x19, #80]
Lloh6:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
Lloh11:
	adrp	x8, _AV_PKT_FLAG_CORRUPT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_PKT_FLAG_CORRUPT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x19, #48]
	orr	w8, w9, w8
	str	w8, [x19, #48]
	ldp	x8, x9, [x20]
LBB0_3:
	add	x0, x9, x8
Lloh14:
	adrp	x8, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
	ldr	x8, [x19, #72]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	w9, [x19, #24]
	cmp	w9, #131
	b.ne	LBB0_6
; %bb.5:
	ldr	w9, [x19, #28]
	cmp	w9, #118
	b.eq	LBB0_7
LBB0_6:
	ldr	x8, [x19, #64]
LBB0_7:
	ldr	w8, [x8]
	str	w8, [x20, #32]
	ldr	q0, [x19, #48]
	str	q0, [x20, #16]
	str	xzr, [x19, #40]
	mov	x0, x19
	bl	_reset_pes_packet_state
Lloh17:
	adrp	x8, _AV_PKT_DATA_MPEGTS_STREAM_ID@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_PKT_DATA_MPEGTS_STREAM_ID@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_av_packet_new_side_data
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w8, [x19, #32]
	str	w8, [x0]
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PES_PAYLOAD,8,3            ; @MAX_PES_PAYLOAD
	.comm	_PES_START_SIZE,8,3             ; @PES_START_SIZE
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PES packet size mismatch\n"

	.comm	_AV_PKT_FLAG_CORRUPT,4,2        ; @AV_PKT_FLAG_CORRUPT
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ; @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_AV_PKT_DATA_MPEGTS_STREAM_ID,4,2 ; @AV_PKT_DATA_MPEGTS_STREAM_ID
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_new_pes_packet
.subsections_via_symbols
