	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_rtmp_packet_write           ## -- Begin function ff_rtmp_packet_write
	.p2align	4, 0x90
_ff_rtmp_packet_write:                  ## @ff_rtmp_packet_write
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movl	%edx, -140(%rbp)                ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-112(%rbp), %rax
	movq	%rax, -136(%rbp)
	movq	_RTMP_PS_TWELVEBYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	(%rsi), %rdx
	movq	%rcx, %rdi
	movq	%r8, %rsi
	callq	_ff_rtmp_check_alloc_array
	testl	%eax, %eax
	js	LBB0_40
## %bb.1:
	movq	(%rbx), %rbx
	movq	(%r12), %rsi
	leaq	(%rsi,%rsi,2), %rax
	shlq	$4, %rax
	cmpq	$0, (%rbx,%rax)
	je	LBB0_4
## %bb.2:
	movq	8(%r12), %rcx
	cmpq	8(%rbx,%rax), %rcx
	jne	LBB0_4
## %bb.3:
	movq	16(%r12), %rdi
	movq	16(%rbx,%rax), %r8
	xorl	%edx, %edx
	cmpq	%r8, %rdi
	setge	%cl
	cmovgeq	%r8, %rdx
	subq	%rdx, %rdi
	jmp	LBB0_5
LBB0_4:
	movq	16(%r12), %rdi
	xorl	%ecx, %ecx
LBB0_5:
	cmpl	$16777215, %edi                 ## imm = 0xFFFFFF
	movl	$16777215, %edx                 ## imm = 0xFFFFFF
	cmovll	%edi, %edx
	movl	%edx, 24(%r12)
	testb	%cl, %cl
	je	LBB0_13
## %bb.6:
	movl	28(%r12), %ecx
	cmpl	28(%rbx,%rax), %ecx
	jne	LBB0_11
## %bb.7:
	movl	32(%r12), %ecx
	cmpl	32(%rbx,%rax), %ecx
	jne	LBB0_11
## %bb.8:
	cmpl	24(%rbx,%rax), %edx
	jne	LBB0_39
## %bb.9:
	movq	_RTMP_PS_ONEBYTE@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_RTMP_PS_EIGHTBYTES@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %r14d
LBB0_13:
	cmpq	$63, %rsi
	movq	%rdi, -152(%rbp)                ## 8-byte Spill
	movl	%r14d, %eax
	ja	LBB0_15
## %bb.14:
	shll	$6, %eax
	orl	%eax, %esi
	leaq	-136(%rbp), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_bytestream_put_byte
	jmp	LBB0_18
LBB0_15:
	shll	$6, %eax
	cmpq	$319, %rsi                      ## imm = 0x13F
	ja	LBB0_17
## %bb.16:
	leaq	-136(%rbp), %r13
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_bytestream_put_byte
	movl	(%r12), %esi
	addl	$-64, %esi
	movq	%r13, %rdi
	callq	_bytestream_put_byte
	jmp	LBB0_18
LBB0_17:
	orl	$1, %eax
	leaq	-136(%rbp), %r13
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_bytestream_put_byte
	movl	(%r12), %esi
	addl	$-64, %esi
	movq	%r13, %rdi
	callq	_bytestream_put_le16
LBB0_18:
	movq	_RTMP_PS_ONEBYTE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_22
## %bb.19:
	movl	24(%r12), %esi
	leaq	-136(%rbp), %rdi
	callq	_bytestream_put_be24
	movq	_RTMP_PS_FOURBYTES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_22
## %bb.20:
	movl	32(%r12), %esi
	leaq	-136(%rbp), %r13
	movq	%r13, %rdi
	callq	_bytestream_put_be24
	movl	28(%r12), %esi
	movq	%r13, %rdi
	callq	_bytestream_put_byte
	movq	_RTMP_PS_TWELVEBYTES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_22
## %bb.21:
	movq	8(%r12), %rsi
	leaq	-136(%rbp), %rdi
	callq	_bytestream_put_le32
LBB0_22:
	movl	24(%r12), %eax
	cmpl	$16777215, %eax                 ## imm = 0xFFFFFF
	jne	LBB0_24
## %bb.23:
	leaq	-136(%rbp), %rdi
	movq	-152(%rbp), %rsi                ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_bytestream_put_be32
	movl	24(%r12), %eax
LBB0_24:
	movq	(%r12), %rcx
	leaq	(%rcx,%rcx,2), %rdx
	shlq	$4, %rdx
	movq	%rcx, (%rbx,%rdx)
	movl	28(%r12), %ecx
	movq	(%r12), %rdx
	leaq	(%rdx,%rdx,2), %rdx
	shlq	$4, %rdx
	movl	%ecx, 28(%rbx,%rdx)
	movl	32(%r12), %ecx
	movl	%ecx, 32(%rbx,%rdx)
	movq	16(%r12), %rcx
	movq	%rcx, 16(%rbx,%rdx)
	movl	%eax, 24(%rbx,%rdx)
	movq	8(%r12), %rax
	movq	%rax, 8(%rbx,%rdx)
	movq	-136(%rbp), %rdx
	leaq	-112(%rbp), %rbx
	subq	%rbx, %rdx
	shrq	$2, %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_ffurl_write
	testl	%eax, %eax
	js	LBB0_40
## %bb.25:
	movq	-136(%rbp), %r13
	subq	%rbx, %r13
	shrq	$2, %r13
	movl	32(%r12), %esi
	addl	%esi, %r13d
	testl	%esi, %esi
	jle	LBB0_41
## %bb.26:
	xorl	%r14d, %r14d
	jmp	LBB0_30
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_30 Depth=1
	incl	%r13d
LBB0_28:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	32(%r12), %esi
LBB0_29:                                ##   in Loop: Header=BB0_30 Depth=1
	cmpl	%r14d, %esi
	jle	LBB0_41
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	subl	%r14d, %esi
	movl	-140(%rbp), %edi                ## 4-byte Reload
	callq	_FFMIN
	movl	%eax, %ebx
	movslq	%r14d, %rsi
	shlq	$2, %rsi
	addq	40(%r12), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_ffurl_write
	testl	%eax, %eax
	js	LBB0_40
## %bb.31:                              ##   in Loop: Header=BB0_30 Depth=1
	addl	%ebx, %r14d
	movl	32(%r12), %esi
	cmpl	%esi, %r14d
	jge	LBB0_29
## %bb.32:                              ##   in Loop: Header=BB0_30 Depth=1
	movl	(%r12), %eax
	movl	$192, %ecx
	orl	%ecx, %eax
	movl	%eax, -144(%rbp)
	movq	%r15, %rdi
	leaq	-144(%rbp), %rsi
	movl	$1, %edx
	callq	_ffurl_write
	testl	%eax, %eax
	js	LBB0_40
## %bb.33:                              ##   in Loop: Header=BB0_30 Depth=1
	cmpl	$16777215, 24(%r12)             ## imm = 0xFFFFFF
	jne	LBB0_27
## %bb.34:                              ##   in Loop: Header=BB0_30 Depth=1
	leaq	-128(%rbp), %rbx
	movq	%rbx, %rdi
	movq	-152(%rbp), %rsi                ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_AV_WB32
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_ffurl_write
	testl	%eax, %eax
	js	LBB0_40
## %bb.35:                              ##   in Loop: Header=BB0_30 Depth=1
	addl	$5, %r13d
	jmp	LBB0_28
LBB0_40:
	movl	%eax, %r13d
LBB0_41:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_43
## %bb.42:
	movl	%r13d, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_39:
	movq	_RTMP_PS_FOURBYTES@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_43:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RTMP_PS_TWELVEBYTES,4,2        ## @RTMP_PS_TWELVEBYTES
	.comm	_RTMP_PS_FOURBYTES,4,2          ## @RTMP_PS_FOURBYTES
	.comm	_RTMP_PS_ONEBYTE,4,2            ## @RTMP_PS_ONEBYTE
	.comm	_RTMP_PS_EIGHTBYTES,4,2         ## @RTMP_PS_EIGHTBYTES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_rtmp_packet_write           ; -- Begin function ff_rtmp_packet_write
	.p2align	2
_ff_rtmp_packet_write:                  ; @ff_rtmp_packet_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x22, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	add	x8, sp, #40
	str	x8, [sp, #16]
Lloh3:
	adrp	x24, _RTMP_PS_TWELVEBYTES@GOTPAGE
Lloh4:
	ldr	x24, [x24, _RTMP_PS_TWELVEBYTES@GOTPAGEOFF]
	ldr	w25, [x24]
	ldr	x2, [x1]
	mov	x0, x3
	mov	x1, x4
	bl	_ff_rtmp_check_alloc_array
	tbnz	w0, #31, LBB0_35
; %bb.1:
	ldr	x23, [x22]
	ldr	x8, [x20]
	mov	w9, #48
	mul	x9, x8, x9
	ldr	x9, [x23, x9]
	cbz	x9, LBB0_4
; %bb.2:
	ldr	x9, [x20, #8]
	mov	w10, #48
	madd	x10, x8, x10, x23
	ldr	x10, [x10, #8]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.3:
	ldr	x9, [x20, #16]
	mov	w10, #48
	madd	x10, x8, x10, x23
	ldr	x10, [x10, #16]
	cmp	x9, x10
	csel	x11, xzr, x10, lt
	cset	w10, ge
	sub	x22, x9, x11
	b	LBB0_5
LBB0_4:
	mov	w10, #0
	ldr	x22, [x20, #16]
LBB0_5:
	mov	w9, #16777215
	cmp	w22, w9
	csel	w9, w22, w9, lt
	str	w9, [x20, #24]
Lloh5:
	adrp	x26, _RTMP_PS_ONEBYTE@GOTPAGE
Lloh6:
	ldr	x26, [x26, _RTMP_PS_ONEBYTE@GOTPAGEOFF]
	cbz	w10, LBB0_11
; %bb.6:
	ldr	w10, [x20, #28]
	mov	w11, #48
	madd	x11, x8, x11, x23
	ldr	w11, [x11, #28]
	cmp	w10, w11
	b.ne	LBB0_9
; %bb.7:
	ldr	w10, [x20, #32]
	mov	w11, #48
	madd	x11, x8, x11, x23
	ldr	w11, [x11, #32]
	cmp	w10, w11
	b.ne	LBB0_9
; %bb.8:
Lloh7:
	adrp	x10, _RTMP_PS_FOURBYTES@GOTPAGE
Lloh8:
	ldr	x10, [x10, _RTMP_PS_FOURBYTES@GOTPAGEOFF]
	mov	w11, #48
	madd	x11, x8, x11, x23
	ldr	w11, [x11, #24]
	cmp	w9, w11
	csel	x9, x26, x10, eq
	b	LBB0_10
LBB0_9:
Lloh9:
	adrp	x9, _RTMP_PS_EIGHTBYTES@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RTMP_PS_EIGHTBYTES@GOTPAGEOFF]
LBB0_10:
	ldr	w25, [x9]
LBB0_11:
	cmp	x8, #63
	b.hi	LBB0_13
; %bb.12:
	orr	w1, w8, w25, lsl #6
	b	LBB0_15
LBB0_13:
	lsl	w1, w25, #6
	cmp	x8, #319
	b.hi	LBB0_16
; %bb.14:
	add	x0, sp, #16
	bl	_bytestream_put_byte
	ldr	w8, [x20]
	sub	w1, w8, #64
LBB0_15:
	add	x0, sp, #16
	bl	_bytestream_put_byte
	b	LBB0_17
LBB0_16:
	orr	w1, w1, #0x1
	add	x0, sp, #16
	bl	_bytestream_put_byte
	ldr	w8, [x20]
	sub	w1, w8, #64
	add	x0, sp, #16
	bl	_bytestream_put_le16
LBB0_17:
	ldr	w8, [x26]
	cmp	w25, w8
	b.eq	LBB0_21
; %bb.18:
	ldr	w1, [x20, #24]
	add	x0, sp, #16
	bl	_bytestream_put_be24
Lloh11:
	adrp	x8, _RTMP_PS_FOURBYTES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RTMP_PS_FOURBYTES@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w25, w8
	b.eq	LBB0_21
; %bb.19:
	ldr	w1, [x20, #32]
	add	x0, sp, #16
	bl	_bytestream_put_be24
	ldr	w1, [x20, #28]
	add	x0, sp, #16
	bl	_bytestream_put_byte
	ldr	w8, [x24]
	cmp	w25, w8
	b.ne	LBB0_21
; %bb.20:
	ldr	x1, [x20, #8]
	add	x0, sp, #16
	bl	_bytestream_put_le32
LBB0_21:
	ldr	w8, [x20, #24]
	mov	w9, #16777215
	cmp	w8, w9
	b.ne	LBB0_23
; %bb.22:
	add	x0, sp, #16
	mov	x1, x22
	bl	_bytestream_put_be32
	ldr	w8, [x20, #24]
LBB0_23:
	ldr	x9, [x20]
	mov	w10, #48
	mul	x11, x9, x10
	str	x9, [x23, x11]
	ldr	x9, [x20]
	madd	x9, x9, x10, x23
	ldur	d0, [x20, #28]
	stur	d0, [x9, #28]
	ldr	x10, [x20, #16]
	str	x10, [x9, #16]
	str	w8, [x9, #24]
	ldr	x8, [x20, #8]
	str	x8, [x9, #8]
	ldr	x8, [sp, #16]
	add	x24, sp, #40
	sub	x8, x8, x24
	lsr	x2, x8, #2
	add	x1, sp, #40
	mov	x0, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_ffurl_write
	tbnz	w0, #31, LBB0_35
; %bb.24:
	ldr	x8, [sp, #16]
	sub	x8, x8, x24
	lsr	x9, x8, #2
	ldr	w8, [x20, #32]
	add	w23, w8, w9
	cmp	w8, #1
	b.lt	LBB0_36
; %bb.25:
	mov	w25, #0
	mov	w26, #16777215
	b	LBB0_29
LBB0_26:                                ;   in Loop: Header=BB0_29 Depth=1
	add	w23, w23, #1
LBB0_27:                                ;   in Loop: Header=BB0_29 Depth=1
	ldr	w8, [x20, #32]
LBB0_28:                                ;   in Loop: Header=BB0_29 Depth=1
	cmp	w8, w25
	b.le	LBB0_36
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	sub	w1, w8, w25
	mov	x0, x19
	bl	_FFMIN
	mov	x24, x0
	ldr	x8, [x20, #40]
	add	x1, x8, w25, sxtw #2
	mov	x0, x21
	mov	x2, x24
	bl	_ffurl_write
	tbnz	w0, #31, LBB0_35
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=1
	ldr	w8, [x20, #32]
	add	w25, w24, w25
	cmp	w25, w8
	b.ge	LBB0_28
; %bb.31:                               ;   in Loop: Header=BB0_29 Depth=1
	ldr	w8, [x20]
	orr	w8, w8, #0xc0
	str	w8, [sp, #12]
	add	x1, sp, #12
	mov	x0, x21
	mov	w2, #1
	bl	_ffurl_write
	tbnz	w0, #31, LBB0_35
; %bb.32:                               ;   in Loop: Header=BB0_29 Depth=1
	ldr	w8, [x20, #24]
	cmp	w8, w26
	b.ne	LBB0_26
; %bb.33:                               ;   in Loop: Header=BB0_29 Depth=1
	add	x0, sp, #24
	mov	x1, x22
	bl	_AV_WB32
	add	x1, sp, #24
	mov	x0, x21
	mov	w2, #4
	bl	_ffurl_write
	tbnz	w0, #31, LBB0_35
; %bb.34:                               ;   in Loop: Header=BB0_29 Depth=1
	add	w23, w23, #5
	b	LBB0_27
LBB0_35:
	mov	x23, x0
LBB0_36:
	ldur	x8, [x29, #-72]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_38
; %bb.37:
	mov	x0, x23
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_38:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_RTMP_PS_TWELVEBYTES,4,2        ; @RTMP_PS_TWELVEBYTES
	.comm	_RTMP_PS_FOURBYTES,4,2          ; @RTMP_PS_FOURBYTES
	.comm	_RTMP_PS_ONEBYTE,4,2            ; @RTMP_PS_ONEBYTE
	.comm	_RTMP_PS_EIGHTBYTES,4,2         ; @RTMP_PS_EIGHTBYTES
.subsections_via_symbols
