	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtp_mpegts_write_packet
_rtp_mpegts_write_packet:               ## @rtp_mpegts_write_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	8(%r12), %rdi
	cmpq	$0, 8(%rdi)
	jne	LBB0_3
## %bb.1:
	addq	$8, %rdi
	callq	_avio_open_dyn_buf
	testl	%eax, %eax
	js	LBB0_13
## %bb.2:
	movq	8(%r12), %rdi
LBB0_3:
	movq	%r15, %rsi
	callq	_av_write_frame
	testl	%eax, %eax
	js	LBB0_13
## %bb.4:
	movq	8(%r12), %rax
	movq	8(%rax), %rdi
	leaq	-40(%rbp), %rsi
	callq	_avio_close_dyn_buf
	movl	%eax, %ebx
	movq	8(%r12), %rax
	movq	$0, 8(%rax)
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.5:
	leaq	-80(%rbp), %rdi
	callq	_av_init_packet
	movq	-40(%rbp), %rax
	movq	%rax, -48(%rbp)
	movl	%ebx, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	16(%r15), %rdi
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rdi
	je	LBB0_7
## %bb.6:
	movq	(%r14), %rax
	movq	8(%r15), %rcx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax), %esi
	movq	(%r12), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	callq	_av_rescale_q
	movq	%rax, -64(%rbp)
	movq	(%rbx), %rdi
LBB0_7:
	movq	24(%r15), %rax
	cmpq	%rdi, %rax
	je	LBB0_9
## %bb.8:
	movq	(%r14), %rcx
	movq	8(%r15), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movl	(%rcx), %esi
	movq	(%r12), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	callq	_av_rescale_q
	movq	%rax, -56(%rbp)
LBB0_9:
	movq	(%r12), %rdi
	leaq	-80(%rbp), %rsi
	callq	_av_write_frame
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_13:
	movl	%eax, %ebx
	jmp	LBB0_14
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movq	-40(%rbp), %rdi
	callq	_av_free
LBB0_14:
	movl	%ebx, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.no_dead_strip	_rtp_mpegts_write_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtp_mpegts_write_packet
_rtp_mpegts_write_packet:               ; @rtp_mpegts_write_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldr	x0, [x22, #8]
	mov	x8, x0
	ldr	x9, [x8, #8]!
	cbnz	x9, LBB0_3
; %bb.1:
	mov	x0, x8
	bl	_avio_open_dyn_buf
	tbnz	w0, #31, LBB0_11
; %bb.2:
	ldr	x0, [x22, #8]
LBB0_3:
	mov	x1, x19
	bl	_av_write_frame
	tbnz	w0, #31, LBB0_11
; %bb.4:
	ldr	x8, [x22, #8]
	ldr	x0, [x8, #8]
	add	x1, sp, #40
	bl	_avio_close_dyn_buf
	mov	x21, x0
	ldr	x8, [x22, #8]
	str	xzr, [x8, #8]
	cbz	w0, LBB0_10
; %bb.5:
	mov	x0, sp
	bl	_av_init_packet
	ldr	x8, [sp, #40]
	str	w21, [sp]
	str	x8, [sp, #32]
	str	xzr, [sp, #8]
	ldr	x0, [x19, #16]
Lloh0:
	adrp	x21, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AV_NOPTS_VALUE@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.6:
	ldr	x8, [x20]
	ldr	x9, [x19, #8]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w1, [x8]
	ldr	x8, [x22]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w2, [x8]
	bl	_av_rescale_q
	str	x0, [sp, #16]
	ldr	x0, [x21]
LBB0_7:
	ldr	x8, [x19, #24]
	cmp	x8, x0
	b.eq	LBB0_9
; %bb.8:
	ldr	x9, [x20]
	ldr	x10, [x19, #8]
	ldr	x9, [x9, x10, lsl #3]
	ldr	w1, [x9]
	ldr	x9, [x22]
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldr	w2, [x9]
	mov	x0, x8
	bl	_av_rescale_q
	str	x0, [sp, #24]
LBB0_9:
	ldr	x0, [x22]
	mov	x1, sp
	bl	_av_write_frame
	mov	x21, x0
LBB0_10:
	ldr	x0, [sp, #40]
	bl	_av_free
	b	LBB0_12
LBB0_11:
	mov	x21, x0
LBB0_12:
	mov	x0, x21
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.no_dead_strip	_rtp_mpegts_write_packet
.subsections_via_symbols
