	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_rtsp_tcp_write_packet       ## -- Begin function ff_rtsp_tcp_write_packet
	.p2align	4, 0x90
_ff_rtsp_tcp_write_packet:              ## @ff_rtsp_tcp_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	%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	%rsi, %r15
	movq	8(%rdi), %r14
	movq	8(%rsi), %r12
	movq	(%r12), %rdi
	leaq	-48(%rbp), %rsi
	callq	_avio_close_dyn_buf
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	$0, (%r12)
	cmpl	$5, %eax
	jl	LBB0_5
## %bb.1:
	movl	%eax, %ebx
	movq	-48(%rbp), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_AV_RB32
	addl	$-4, %ebx
	subl	%eax, %ebx
	jl	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r13d
	cmpl	$2, %eax
	jl	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movsbl	5(%r12), %edi
	callq	_RTP_PT_IS_RTCP
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	movzbl	(%r15,%rcx,4), %eax
	movb	$36, (%r12)
	movb	%al, 1(%r12)
	leaq	2(%r12), %rdi
	movl	%r13d, %esi
	callq	_AV_WB16
	movl	(%r14), %edi
	leal	4(%r13), %edx
	movq	%r12, %rsi
	callq	_ffurl_write
	movl	%r13d, %eax
	addq	%rax, %r12
	addq	$4, %r12
	cmpl	$4, %ebx
	jg	LBB0_2
LBB0_5:
	movq	-48(%rbp), %rdi
	callq	_av_free
	movq	_RTSP_TCP_MAX_PACKET_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_ffio_open_dyn_packet_buf
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTSP_TCP_MAX_PACKET_SIZE,4,2   ## @RTSP_TCP_MAX_PACKET_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_rtsp_tcp_write_packet       ; -- Begin function ff_rtsp_tcp_write_packet
	.p2align	2
_ff_rtsp_tcp_write_packet:              ; @ff_rtsp_tcp_write_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x1
	ldr	x24, [x0, #8]
	ldr	x19, [x1, #8]
	ldr	x0, [x19]
	add	x1, sp, #8
	bl	_avio_close_dyn_buf
	str	xzr, [x19]
	cmp	w0, #5
	b.lt	LBB0_5
; %bb.1:
	mov	x21, x0
	ldr	x22, [sp, #8]
	mov	w25, #36
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_AV_RB32
	sub	w8, w21, #4
	subs	w21, w8, w0
	b.lt	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x23, x0
	cmp	w0, #2
	b.lt	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x26, x22, w23, uxtw
	ldrsb	w0, [x22, #5]
	bl	_RTP_PT_IS_RTCP
	cmp	x0, #0
	cset	w8, eq
	ldr	w8, [x20, w8, uxtw #2]
	strb	w25, [x22]
	strb	w8, [x22, #1]
	add	x0, x22, #2
	mov	x1, x23
	bl	_AV_WB16
	ldr	w0, [x24]
	add	w2, w23, #4
	mov	x1, x22
	bl	_ffurl_write
	add	x22, x26, #4
	cmp	w21, #4
	b.gt	LBB0_2
LBB0_5:
	ldr	x0, [sp, #8]
	bl	_av_free
Lloh0:
	adrp	x8, _RTSP_TCP_MAX_PACKET_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTSP_TCP_MAX_PACKET_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ffio_open_dyn_packet_buf
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RTSP_TCP_MAX_PACKET_SIZE,4,2   ; @RTSP_TCP_MAX_PACKET_SIZE
.subsections_via_symbols
