	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_srtp_encrypt                ## -- Begin function ff_srtp_encrypt
	.p2align	4, 0x90
_ff_srtp_encrypt:                       ## @ff_srtp_encrypt
	.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	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	cmpl	$7, %edx
	jg	LBB0_2
LBB0_1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_19
LBB0_2:
	movl	%r8d, %r12d
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rcx, -208(%rbp)                ## 8-byte Spill
	movl	4(%rsi), %edi
	callq	_RTP_PT_IS_RTCP
	movl	%eax, %r13d
	xorl	%eax, %eax
	testl	%r13d, %r13d
	sete	%al
	movl	(%r15,%rax,4), %edx
	leal	4(%rdx), %ecx
	testl	%r13d, %r13d
	cmovel	%edx, %ecx
	addl	%r14d, %ecx
	xorl	%eax, %eax
	cmpl	%r12d, %ecx
	jg	LBB0_19
## %bb.3:
	movq	%rdx, -216(%rbp)                ## 8-byte Spill
	movq	-208(%rbp), %r12                ## 8-byte Reload
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	testl	%r13d, %r13d
	je	LBB0_5
## %bb.4:
	leaq	16(%r12), %rdi
	callq	_AV_RB32
	movl	48(%r15), %edx
	leal	1(%rdx), %ecx
	movl	%ecx, 48(%r15)
	leaq	32(%r12), %rcx
	movq	%rcx, -200(%rbp)                ## 8-byte Spill
	addl	$-8, %r14d
LBB0_14:
	xorl	%ebx, %ebx
	testl	%r13d, %r13d
	setne	%bl
	movl	40(%r15,%rbx,4), %esi
	leaq	-112(%rbp), %rdi
	movl	%eax, %ecx
	movq	%rdx, %r12
	callq	_create_iv
	movl	28(%r15), %edi
	movl	32(%r15,%rbx,4), %esi
	movl	$128, %edx
	xorl	%ecx, %ecx
	callq	_av_aes_init
	movl	28(%r15), %edi
	leaq	-112(%rbp), %rsi
	movq	-200(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdx
	movl	%r14d, %ecx
	callq	_encrypt_counter
	testl	%r13d, %r13d
	je	LBB0_16
## %bb.15:
	movslq	%r14d, %rax
	leaq	(%rbx,%rax,4), %rdi
	orl	$-2147483648, %r12d             ## imm = 0x80000000
	movl	%r12d, %esi
	callq	_AV_WB32
	addl	$4, %r14d
LBB0_16:
	xorl	%eax, %eax
	testl	%r13d, %r13d
	setne	%al
	movl	16(%r15), %edi
	movl	20(%r15,%rax,4), %esi
	movl	$4, %edx
	callq	_av_hmac_init
	movl	16(%r15), %edi
	movslq	%r14d, %rax
	movq	%rbx, -200(%rbp)                ## 8-byte Spill
	leaq	(%rbx,%rax,4), %rbx
	movq	%rbx, %rdx
	movq	-208(%rbp), %r12                ## 8-byte Reload
	subq	%r12, %rdx
	shrq	$2, %rdx
	movq	%r12, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_av_hmac_update
	testl	%r13d, %r13d
	jne	LBB0_18
## %bb.17:
	movl	12(%r15), %esi
	leaq	-192(%rbp), %r13
	movq	%r13, %rdi
	callq	_AV_WB32
	movl	16(%r15), %edi
	movq	%r13, %rsi
	movl	$4, %edx
	callq	_av_hmac_update
LBB0_18:
	movl	16(%r15), %edi
	leaq	-192(%rbp), %r15
	movq	%r15, %rsi
	movl	$80, %edx
	callq	_av_hmac_final
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	-216(%rbp), %rbx                ## 8-byte Reload
	movl	%ebx, %edx
	callq	_memcpy
	addl	%ebx, %r14d
	movq	-200(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%r14,4), %rax
	subq	%r12, %rax
	shrq	$2, %rax
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_21
## %bb.20:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	8(%r12), %rdi
	callq	_AV_RB16
	cmpl	$11, %r14d
	jbe	LBB0_1
## %bb.6:
	movl	%eax, %ebx
	leaq	32(%r12), %rdi
	callq	_AV_RB32
	movl	12(%r15), %edx
	cmpl	8(%r15), %ebx
	jge	LBB0_8
## %bb.7:
	incl	%edx
	movl	%edx, 12(%r15)
LBB0_8:
	movl	%ebx, 8(%r15)
	movq	-208(%rbp), %rsi                ## 8-byte Reload
	movl	(%rsi), %edi
	leal	(,%rdi,4), %ecx
	andl	$60, %ecx
	subl	%ecx, %r14d
	addl	$-12, %r14d
	js	LBB0_1
## %bb.9:
	shll	$16, %edx
	addl	%ebx, %edx
	leaq	(%rsi,%rcx,4), %rcx
	addq	$48, %rcx
	testb	$16, %dil
	jne	LBB0_11
## %bb.10:
	movq	%rcx, -200(%rbp)                ## 8-byte Spill
	jmp	LBB0_14
LBB0_11:
	cmpl	$3, %r14d
	jbe	LBB0_1
## %bb.12:
	movl	%eax, %r12d
	movq	%rdx, %rbx
	movq	%rcx, -200(%rbp)                ## 8-byte Spill
	leaq	8(%rcx), %rdi
	callq	_AV_RB16
                                        ## kill: def $eax killed $eax def $rax
	leal	4(,%rax,4), %eax
	subl	%eax, %r14d
	jl	LBB0_1
## %bb.13:
	cltq
	movq	-200(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rcx
	movq	%rcx, -200(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdx
	movl	%r12d, %eax
	jmp	LBB0_14
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_srtp_encrypt                ; -- Begin function ff_srtp_encrypt
	.p2align	2
_ff_srtp_encrypt:                       ; @ff_srtp_encrypt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #256
	.cfi_def_cfa_offset 256
	stp	x28, x27, [sp, #160]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #176]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #192]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #208]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #224]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #240]            ; 16-byte Folded Spill
	add	x29, sp, #240
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #112]
	stp	q0, q0, [sp, #80]
	cmp	w2, #7
	b.gt	LBB0_2
LBB0_1:
Lloh3:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_11
LBB0_2:
	mov	x25, x4
	mov	x19, x3
	mov	x23, x2
	mov	x24, x1
	mov	x20, x0
	ldr	w0, [x1, #4]
	bl	_RTP_PT_IS_RTCP
	cmp	w0, #0
	cset	w8, eq
	ldr	w21, [x20, w8, uxtw #2]
	add	w8, w21, #4
	csel	w8, w21, w8, eq
	add	w8, w8, w23
	cmp	w8, w25
	b.le	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_11
LBB0_4:
	mov	x22, x0
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_memcpy
	cbz	w22, LBB0_13
; %bb.5:
	add	x0, x19, #16
	bl	_AV_RB32
	mov	x25, x0
	ldr	w26, [x20, #48]
	add	w8, w26, #1
	str	w8, [x20, #48]
	add	x24, x19, #32
	sub	w23, w23, #8
LBB0_6:
	cmp	w22, #0
	mov	w8, #44
	mov	w9, #40
	csel	x8, x9, x8, eq
	ldr	w1, [x20, x8]
	mov	w8, #36
	mov	w9, #32
	csel	x27, x9, x8, eq
	add	x0, sp, #80
	mov	x2, x26
	mov	x3, x25
	bl	_create_iv
	ldr	w0, [x20, #28]
	ldr	w1, [x20, x27]
	mov	w2, #128
	mov	w3, #0
	bl	_av_aes_init
	ldr	w0, [x20, #28]
	add	x1, sp, #80
	mov	x2, x24
	mov	x3, x23
	bl	_encrypt_counter
	cbz	w22, LBB0_8
; %bb.7:
	add	x0, x24, w23, sxtw #2
	orr	w1, w26, #0x80000000
	bl	_AV_WB32
	add	w23, w23, #4
LBB0_8:
	ldr	w0, [x20, #16]
	cmp	w22, #0
	mov	w8, #24
	mov	w9, #20
	csel	x8, x9, x8, eq
	ldr	w1, [x20, x8]
	mov	w2, #4
	bl	_av_hmac_init
	ldr	w0, [x20, #16]
	add	x25, x24, w23, sxtw #2
	sub	x8, x25, x19
	lsr	x2, x8, #2
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_av_hmac_update
	cbnz	w22, LBB0_10
; %bb.9:
	ldr	w1, [x20, #12]
	mov	x0, sp
	bl	_AV_WB32
	ldr	w0, [x20, #16]
	mov	x1, sp
	mov	w2, #4
	bl	_av_hmac_update
LBB0_10:
	ldr	w0, [x20, #16]
	mov	x1, sp
	mov	w2, #80
	bl	_av_hmac_final
	mov	x1, sp
	mov	x0, x25
	mov	x2, x21
	bl	_memcpy
	add	w8, w23, w21
	add	x8, x24, w8, uxtw #2
	sub	x8, x8, x19
	lsr	x0, x8, #2
LBB0_11:
	ldur	x8, [x29, #-88]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.12:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #240]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #224]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #208]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #192]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #176]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #256
	ret
LBB0_13:
	add	x0, x19, #8
	bl	_AV_RB16
	cmp	w23, #11
	b.ls	LBB0_1
; %bb.14:
	mov	x24, x0
	add	x0, x19, #32
	bl	_AV_RB32
	mov	x25, x0
	ldp	w9, w8, [x20, #8]
	cmp	w24, w9
	b.ge	LBB0_16
; %bb.15:
	add	w8, w8, #1
	str	w8, [x20, #12]
LBB0_16:
	str	w24, [x20, #8]
	ldr	w9, [x19]
	lsl	w10, w9, #2
	and	x10, x10, #0x3c
	sub	w11, w23, w10
	subs	w23, w11, #12
	b.mi	LBB0_1
; %bb.17:
	add	w26, w24, w8, lsl #16
	add	x8, x19, x10, lsl #2
	add	x24, x8, #48
	tbz	w9, #4, LBB0_6
; %bb.18:
	cmp	w23, #3
	b.ls	LBB0_1
; %bb.19:
	add	x0, x24, #8
	bl	_AV_RB16
	lsl	w8, w0, #2
	add	w8, w8, #4
	subs	w23, w23, w8
	b.lt	LBB0_1
; %bb.20:
	add	x24, x24, w8, sxtw #2
	b	LBB0_6
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
.subsections_via_symbols
