	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_aes_ctr_crypt               ## -- Begin function av_aes_ctr_crypt
	.p2align	4, 0x90
_av_aes_ctr_crypt:                      ## @av_aes_ctr_crypt
	.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	%rdi, -48(%rbp)                 ## 8-byte Spill
	testl	%ecx, %ecx
	jle	LBB0_18
## %bb.1:
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movslq	%ecx, %rax
	leaq	(%rdx,%rax,4), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r11
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	jae	LBB0_18
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
                                        ##     Child Loop BB0_17 Depth 2
	movq	%r11, %r15
	testq	%r11, %r11
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	24(%r15), %edi
	movq	8(%r15), %rsi
	movq	16(%r15), %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_av_aes_crypt
	movq	16(%r15), %rdi
	addq	$8, %rdi
	callq	_av_aes_ctr_increment_be64
	movq	(%r15), %r15
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r12), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_AES_BLOCK_SIZE@GOTPCREL(%rip), %r13
	movslq	(%r13), %rax
	leaq	(%rbx,%rax,4), %rdi
	leaq	(,%r15,4), %rax
	subq	%rax, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_FFMIN
	movq	%rax, %rcx
	subq	%rbx, %rcx
	sarq	$2, %rcx
	addq	(%r12), %rcx
	movslq	(%r13), %r11
	decq	%r11
	andq	%rcx, %r11
	movq	%r11, (%r12)
	cmpq	%rbx, %rax
	jbe	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	4(%rbx), %rcx
	cmpq	%rcx, %rax
	cmovaq	%rax, %rcx
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	leaq	(,%r15,4), %rdx
	addq	%r13, %rdx
	movq	%rbx, %r10
	notq	%r10
	addq	%rcx, %r10
	cmpq	$28, %r10
	jae	LBB0_7
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rdx), %ecx
	addq	$4, %rdx
	xorl	(%rbx), %ecx
	addq	$4, %rbx
	movl	%ecx, (%r14)
	addq	$4, %r14
	cmpq	%rax, %rbx
	jb	LBB0_17
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rcx
	subq	%rbx, %rcx
	cmpq	$32, %rcx
	jb	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(,%r15,4), %rcx
	addq	%r13, %rcx
	movq	%r14, %rsi
	subq	%rcx, %rsi
	cmpq	$32, %rsi
	jb	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	shrq	$2, %r10
	incq	%r10
	movq	%r10, %r8
	andq	$-8, %r8
	leaq	-8(%r8), %rcx
	movq	%rcx, %r9
	shrq	$3, %r9
	incq	%r9
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r9, %rsi
	andq	$-2, %rsi
	leaq	48(,%r15,4), %rcx
	addq	%r13, %rcx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%rbx,%rdi,4), %xmm0
	movups	16(%rbx,%rdi,4), %xmm1
	movups	-48(%rcx,%rdi,4), %xmm2
	xorps	%xmm0, %xmm2
	movups	-32(%rcx,%rdi,4), %xmm0
	xorps	%xmm1, %xmm0
	movups	%xmm2, (%r14,%rdi,4)
	movups	%xmm0, 16(%r14,%rdi,4)
	movups	32(%rbx,%rdi,4), %xmm0
	movups	48(%rbx,%rdi,4), %xmm1
	movups	-16(%rcx,%rdi,4), %xmm2
	xorps	%xmm0, %xmm2
	movups	(%rcx,%rdi,4), %xmm0
	xorps	%xmm1, %xmm0
	movups	%xmm2, 32(%r14,%rdi,4)
	movups	%xmm0, 48(%r14,%rdi,4)
	addq	$16, %rdi
	addq	$-2, %rsi
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, %r9b
	je	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movups	(%rbx,%rdi,4), %xmm0
	movups	16(%rbx,%rdi,4), %xmm1
	movups	(%rdx,%rdi,4), %xmm2
	xorps	%xmm0, %xmm2
	movups	16(%rdx,%rdi,4), %xmm0
	xorps	%xmm1, %xmm0
	movups	%xmm2, (%r14,%rdi,4)
	movups	%xmm0, 16(%r14,%rdi,4)
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r14,%r8,4), %r14
	leaq	(%rbx,%r8,4), %rbx
	cmpq	%r8, %r10
	je	LBB0_2
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%rdx,%r8,4), %rdx
	jmp	LBB0_17
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edi, %edi
	testb	$1, %r9b
	jne	LBB0_14
	jmp	LBB0_15
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AES_BLOCK_SIZE,4,2             ## @AES_BLOCK_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_aes_ctr_crypt               ; -- Begin function av_aes_ctr_crypt
	.p2align	2
_av_aes_ctr_crypt:                      ; @av_aes_ctr_crypt
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cmp	w3, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	add	x20, x2, w3, sxtw #2
	ldr	x8, [x0]
Lloh0:
	adrp	x23, _AES_BLOCK_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _AES_BLOCK_SIZE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x11, x22
	mov	x10, x21
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x10
	mov	x22, x11
	cmp	x11, x20
	b.hs	LBB0_15
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
                                        ;     Child Loop BB0_9 Depth 2
	mov	x24, x8
	cbnz	x8, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #24]
	ldp	x1, x2, [x19, #8]
	mov	w3, #1
	mov	x4, #0
	mov	w5, #0
	bl	_av_aes_crypt
	ldr	x8, [x19, #16]
	add	x0, x8, #8
	bl	_av_aes_ctr_increment_be64
	ldr	x24, [x19]
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x25, [x19, #8]
	ldrsw	x8, [x23]
	add	x8, x22, x8, lsl #2
	sub	x0, x8, x24, lsl #2
	mov	x1, x20
	bl	_FFMIN
	ldrsw	x8, [x23]
	sub	x8, x8, #1
	ldr	x9, [x19]
	subs	x10, x0, x22
	add	x9, x9, x10, asr #2
	and	x8, x9, x8
	str	x8, [x19]
	b.ls	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x25, x24, lsl #2
	add	x10, x22, #4
	cmp	x0, x10
	csel	x10, x0, x10, hi
	mvn	x11, x22
	add	x10, x10, x11
	cmp	x10, #60
	b.hs	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x10, x21
	mov	x11, x22
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w12, [x11], #4
	ldr	w13, [x9], #4
	eor	w12, w13, w12
	str	w12, [x10], #4
	cmp	x11, x0
	b.lo	LBB0_9
	b	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	x11, x21, x22
	cmp	x11, #64
	b.lo	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	x11, x21, x9
	cmp	x11, #64
	b.lo	LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	lsr	x10, x10, #2
	add	x12, x10, #1
	and	x13, x12, #0x7ffffffffffffff0
	lsl	x11, x13, #2
	add	x9, x9, x11
	add	x10, x21, x11
	add	x11, x22, x11
	add	x14, x25, x24, lsl #2
	add	x14, x14, #32
	add	x15, x22, #32
	add	x16, x21, #32
	mov	x17, x13
LBB0_13:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x15, #-32]
	ldp	q2, q3, [x15], #64
	ldp	q4, q5, [x14, #-32]
	ldp	q6, q7, [x14], #64
	eor.16b	v0, v4, v0
	eor.16b	v1, v5, v1
	eor.16b	v2, v6, v2
	eor.16b	v3, v7, v3
	stp	q0, q1, [x16, #-32]
	stp	q2, q3, [x16], #64
	subs	x17, x17, #16
	b.ne	LBB0_13
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	x12, x13
	b.ne	LBB0_9
	b	LBB0_3
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AES_BLOCK_SIZE,4,2             ; @AES_BLOCK_SIZE
.subsections_via_symbols
