	.file	"extr_aes.c_esp_aes_crypt_ctr.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	esp_aes_crypt_ctr
	.type	esp_aes_crypt_ctr, @function
esp_aes_crypt_ctr:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	eax, eax
	mov	r15, rcx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, r8
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, r9
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rbx, QWORD PTR [rdx]
	mov	QWORD PTR [rsp], rdi
	mov	r14, QWORD PTR 80[rsp]
	mov	QWORD PTR 8[rsp], rdx
	call	esp_aes_acquire_hardware@PLT
	mov	esi, DWORD PTR ESP_AES_ENCRYPT[rip]
	mov	rdi, QWORD PTR [rsp]
	call	esp_aes_setkey_hardware@PLT
	test	r13, r13
	je	.L2
	lea	rax, 15[r15]
	add	r13, rbp
	mov	QWORD PTR [rsp], rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	add	rbp, 1
	movzx	eax, BYTE PTR [r12+rbx]
	add	r14, 1
	add	rbx, 1
	xor	al, BYTE PTR -1[rbp]
	and	ebx, 15
	mov	BYTE PTR -1[r14], al
	cmp	r13, rbp
	je	.L2
.L5:
	test	rbx, rbx
	jne	.L3
	mov	rsi, r12
	mov	rdi, r15
	call	esp_aes_block@PLT
	mov	rdx, QWORD PTR [rsp]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdx, rax
.L4:
	add	BYTE PTR [rdx], 1
	jne	.L3
	lea	rax, -1[rdx]
	cmp	r15, rdx
	jne	.L6
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rax, QWORD PTR 8[rsp]
	mov	QWORD PTR [rax], rbx
	xor	eax, eax
	call	esp_aes_release_hardware@PLT
	add	rsp, 24
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	esp_aes_crypt_ctr, .-esp_aes_crypt_ctr
	.comm	ESP_AES_ENCRYPT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_aes.c_esp_aes_crypt_ctr.c"
	.text
	.align	2
	.global	esp_aes_crypt_ctr
	.syntax unified
	.arm
	.fpu softvfp
	.type	esp_aes_crypt_ctr, %function
esp_aes_crypt_ctr:
	@ args = 12, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	fp, r0
	mov	r9, r1
	mov	r8, r2
	mov	r7, r3
	ldr	r4, [r2]
	ldr	r10, [sp, #40]
	ldr	r5, [sp, #44]
	ldr	r6, [sp, #48]
	bl	esp_aes_acquire_hardware
	ldr	r3, .L13
	mov	r0, fp
	ldr	r1, [r3]
	bl	esp_aes_setkey_hardware
	cmp	r9, #0
	beq	.L2
	add	r9, r5, r9
	b	.L5
.L3:
	ldrb	r3, [r10, r4]	@ zero_extendqisi2
	ldrb	r2, [r5], #1	@ zero_extendqisi2
	add	r4, r4, #1
	eor	r3, r3, r2
	cmp	r5, r9
	and	r4, r4, #15
	strb	r3, [r6], #1
	beq	.L2
.L5:
	cmp	r4, #0
	bne	.L3
	mov	r1, r10
	mov	r0, r7
	bl	esp_aes_block
	add	r3, r7, #16
.L4:
	ldrb	r1, [r3, #-1]!	@ zero_extendqisi2
	add	r1, r1, #1
	and	r1, r1, #255
	cmp	r1, #0
	strb	r1, [r3]
	bne	.L3
	cmp	r7, r3
	bne	.L4
	b	.L3
.L2:
	str	r4, [r8]
	bl	esp_aes_release_hardware
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	.align	2
.L13:
	.word	ESP_AES_ENCRYPT
	.size	esp_aes_crypt_ctr, .-esp_aes_crypt_ctr
	.comm	ESP_AES_ENCRYPT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
