	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aes_ctr_encrypt                ## -- Begin function aes_ctr_encrypt
	.p2align	4, 0x90
_aes_ctr_encrypt:                       ## @aes_ctr_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %rbx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_AES_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	shlq	$3, %r12
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%r13, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_aes_encrypt_init
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	_AES_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_os_memcpy
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
                                        ##     Child Loop BB0_16 Depth 2
	testq	%r14, %r14
	je	LBB0_18
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_aes_encrypt
	movq	_AES_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	cmpq	%rcx, %r14
	movq	%rcx, %rax
	cmovbq	%r14, %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$4, %rax
	jae	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edx, %edx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rdx
	andq	$-4, %rdx
	leaq	-4(%rdx), %rsi
	movq	%rsi, %r8
	shrq	$2, %r8
	incq	%r8
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r8, %rsi
	andq	$-2, %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%rbx,%rdi,8), %xmm0
	movups	16(%rbx,%rdi,8), %xmm1
	movups	32(%rbx,%rdi,8), %xmm2
	movups	48(%rbx,%rdi,8), %xmm3
	xorps	(%r12,%rdi,8), %xmm0
	xorps	16(%r12,%rdi,8), %xmm1
	movups	%xmm0, (%rbx,%rdi,8)
	movups	%xmm1, 16(%rbx,%rdi,8)
	xorps	32(%r12,%rdi,8), %xmm2
	xorps	48(%r12,%rdi,8), %xmm3
	movups	%xmm2, 32(%rbx,%rdi,8)
	movups	%xmm3, 48(%rbx,%rdi,8)
	addq	$8, %rdi
	addq	$-2, %rsi
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, %r8b
	jne	LBB0_13
	jmp	LBB0_14
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edi, %edi
	testb	$1, %r8b
	je	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movups	(%rbx,%rdi,8), %xmm0
	movups	16(%rbx,%rdi,8), %xmm1
	xorps	(%r12,%rdi,8), %xmm0
	xorps	16(%r12,%rdi,8), %xmm1
	movups	%xmm0, (%rbx,%rdi,8)
	movups	%xmm1, 16(%rbx,%rdi,8)
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12,%rdx,8), %rsi
	xorq	%rsi, (%rbx,%rdx,8)
	incq	%rdx
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%rdx, %rax
	jne	LBB0_7
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%ecx, %ecx
	leaq	(%rbx,%rax,8), %rbx
	subq	%rax, %r14
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testl	%ecx, %ecx
	jle	LBB0_3
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=2
	incq	-8(%r15,%rcx,8)
	leaq	-1(%rcx), %rcx
	je	LBB0_16
	jmp	LBB0_3
LBB0_18:
	movq	%r13, %rdi
	callq	_aes_encrypt_deinit
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_1:
	movl	$-1, %eax
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_21
## %bb.20:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.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	_aes_ctr_encrypt                ; -- Begin function aes_ctr_encrypt
	.p2align	2
_aes_ctr_encrypt:                       ; @aes_ctr_encrypt
	.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
	sub	sp, sp, #16
	mov	x19, x4
	mov	x20, x3
	mov	x24, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x25, _AES_BLOCK_SIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _AES_BLOCK_SIZE@GOTPAGEOFF]
	ldr	w8, [x25]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0xffffffff0
	sub	x21, x9, x12
	mov	sp, x21
	mov	x9, x8
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x22, x8, x12
	mov	sp, x22
	bl	_aes_encrypt_init
	cbz	x0, LBB0_16
; %bb.1:
	mov	x23, x0
	ldr	w2, [x25]
	mov	x0, x21
	mov	x1, x24
	bl	_os_memcpy
	cbz	x19, LBB0_15
; %bb.2:
	add	x24, x22, #32
	sub	x26, x21, #8
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbz	x19, LBB0_15
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;     Child Loop BB0_11 Depth 2
                                        ;     Child Loop BB0_13 Depth 2
	mov	x0, x23
	mov	x1, x21
	mov	x2, x22
	bl	_aes_encrypt
	ldrsw	x9, [x25]
	cmp	x19, x9
	csel	x8, x19, x9, lo
	cbz	x8, LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x8, #8
	b.hs	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x10, #0
	b	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	and	x10, x8, #0xfffffffffffffff8
	add	x11, x20, #32
	mov	x12, x24
	mov	x13, x10
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x12, #-32]
	ldp	q2, q3, [x12], #64
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11]
	eor.16b	v0, v4, v0
	eor.16b	v1, v5, v1
	eor.16b	v2, v6, v2
	eor.16b	v3, v7, v3
	stp	q0, q1, [x11, #-32]
	stp	q2, q3, [x11], #64
	subs	x13, x13, #8
	b.ne	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x8, x10
	b.eq	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	x11, x8, x10
	lsl	x12, x10, #3
	add	x10, x20, x12
	add	x12, x22, x12
LBB0_11:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x13, [x12], #8
	ldr	x14, [x10]
	eor	x13, x14, x13
	str	x13, [x10], #8
	subs	x11, x11, #1
	b.ne	LBB0_11
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	and	x9, x9, #0xffffffff
	add	x20, x20, x8, lsl #3
	sub	x19, x19, x8
LBB0_13:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	lsl	x8, x9, #3
	sub	x9, x9, #1
	ldr	x10, [x26, x8]
	adds	x10, x10, #1
	str	x10, [x26, x8]
	b.hs	LBB0_13
	b	LBB0_3
LBB0_15:
	mov	x0, x23
	bl	_aes_encrypt_deinit
	mov	w0, #0
	b	LBB0_17
LBB0_16:
	mov	w0, #-1
LBB0_17:
	ldur	x8, [x29, #-72]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	sub	sp, x29, #64
	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
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AES_BLOCK_SIZE,4,2             ; @AES_BLOCK_SIZE
.subsections_via_symbols
