	.file	"extr_aes.c_aes_encrypt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	aes_encrypt, @function
aes_encrypt:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	cmp	QWORD PTR [rdi], 0
	setne	dil
	movzx	edi, dil
	call	ASSERT@PLT
	mov	eax, DWORD PTR CTR_MODE[rip]
	mov	r14, QWORD PTR [r12]
	or	al, -125
	test	DWORD PTR [r14], eax
	jne	.L2
	mov	eax, DWORD PTR AES_BLOCK_LEN[rip]
	sub	eax, 1
	test	DWORD PTR 0[rbp], eax
	jne	.L27
.L2:
	mov	rsi, rbx
	mov	rdi, rbp
	call	AES_ARG_INPLACE@PLT
	mov	eax, DWORD PTR [r14]
	and	eax, 131
	cmp	eax, 129
	je	.L4
	cmp	eax, 130
	je	.L5
	cmp	eax, 128
	je	.L28
	movsx	rdx, DWORD PTR [rbx]
	movsx	rax, DWORD PTR 0[rbp]
	mov	r15, rdx
	cmp	rdx, rax
	jnb	.L10
.L31:
	mov	DWORD PTR [rbx], eax
	mov	r13d, DWORD PTR CRYPTO_BUFFER_TOO_SMALL[rip]
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rbx]
	mov	ecx, r13d
	mov	rdx, rbx
	mov	rsi, rbp
	mov	rdi, r12
	mov	QWORD PTR 8[rsp], rax
	call	aes_encrypt_update@PLT
	cmp	DWORD PTR CRYPTO_SUCCESS[rip], eax
	mov	r13d, eax
	jne	.L1
	mov	eax, DWORD PTR [r14]
	test	al, -126
	jne	.L29
	test	al, -127
	jne	.L30
.L13:
	xor	edi, edi
	cmp	QWORD PTR 16[r14], 0
	sete	dil
	call	ASSERT@PLT
	mov	rdi, r12
	call	aes_free_context@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L27:
	mov	r13d, DWORD PTR CRYPTO_DATA_LEN_RANGE[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	movsx	rdx, DWORD PTR [rbx]
	movsx	rax, DWORD PTR 0[rbp]
	add	rax, QWORD PTR 8[r14]
	mov	r15, rdx
	cmp	rdx, rax
	jb	.L31
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L5:
	mov	eax, DWORD PTR 24[r14]
	movsx	rdx, DWORD PTR [rbx]
	add	eax, DWORD PTR 0[rbp]
	cdqe
	mov	r15, rdx
	cmp	rdx, rax
	jb	.L31
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L28:
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	jne	.L32
	movsx	rdx, DWORD PTR [rbx]
	mov	rax, QWORD PTR 8[r14]
	mov	r15, rdx
	cmp	rdx, rax
	jb	.L31
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L32:
	mov	r13d, DWORD PTR CRYPTO_ARGUMENTS_BAD[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L29:
	movsx	rdx, DWORD PTR [rbx]
	mov	r8d, r15d
	mov	ecx, DWORD PTR aes_encrypt_block[rip]
	mov	rsi, rbx
	mov	rdi, r14
	sub	r8d, edx
	mov	QWORD PTR 8[rbx], rdx
	mov	edx, DWORD PTR AES_BLOCK_LEN[rip]
	mov	DWORD PTR [rbx], r8d
	mov	r8d, DWORD PTR aes_xor_block[rip]
	call	ccm_encrypt_final@PLT
	cmp	DWORD PTR CRYPTO_SUCCESS[rip], eax
	mov	r13d, eax
	jne	.L1
.L25:
	cmp	rbp, rbx
	je	.L14
	mov	eax, DWORD PTR 8[rbx]
	sub	eax, DWORD PTR 8[rsp]
	mov	DWORD PTR [rbx], eax
.L14:
	mov	rax, QWORD PTR 8[rsp]
	mov	QWORD PTR 8[rbx], rax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L30:
	movsx	rdx, DWORD PTR [rbx]
	mov	r8d, r15d
	mov	r9d, DWORD PTR aes_xor_block[rip]
	mov	rsi, rbx
	mov	ecx, DWORD PTR aes_encrypt_block[rip]
	mov	rdi, r14
	sub	r8d, edx
	mov	QWORD PTR 8[rbx], rdx
	mov	edx, DWORD PTR AES_BLOCK_LEN[rip]
	mov	DWORD PTR [rbx], r8d
	mov	r8d, DWORD PTR aes_copy_block[rip]
	call	gcm_encrypt_final@PLT
	cmp	DWORD PTR CRYPTO_SUCCESS[rip], eax
	mov	r13d, eax
	jne	.L1
	jmp	.L25
	.cfi_endproc
.LFE0:
	.size	aes_encrypt, .-aes_encrypt
	.comm	aes_xor_block,4,4
	.comm	aes_encrypt_block,4,4
	.comm	aes_copy_block,4,4
	.comm	CTR_MODE,4,4
	.comm	CRYPTO_SUCCESS,4,4
	.comm	CRYPTO_FAILED,4,4
	.comm	CRYPTO_DATA_LEN_RANGE,4,4
	.comm	CRYPTO_BUFFER_TOO_SMALL,4,4
	.comm	CRYPTO_ARGUMENTS_BAD,4,4
	.comm	AES_BLOCK_LEN,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_aes_encrypt.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	aes_encrypt, %function
aes_encrypt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r0
	ldr	r0, [r0]
	sub	sp, sp, #12
	subs	r0, r0, #0
	movne	r0, #1
	mov	r4, r2
	mov	r8, r3
	mov	r5, r1
	bl	ASSERT
	ldr	r3, .L31
	ldr	r7, [r6]
	ldr	r2, [r3]
	ldr	r3, [r7]
	orr	r2, r2, #131
	tst	r2, r3
	bne	.L2
	ldr	r3, .L31+4
	ldr	r2, [r5]
	ldr	r3, [r3]
	sub	r3, r3, #1
	tst	r3, r2
	bne	.L27
.L2:
	mov	r1, r4
	mov	r0, r5
	bl	AES_ARG_INPLACE
	ldr	r2, [r7]
	and	r2, r2, #131
	cmp	r2, #129
	beq	.L4
	cmp	r2, #130
	beq	.L5
	cmp	r2, #128
	ldrne	r3, [r5]
	beq	.L28
.L8:
	ldr	r9, [r4]
	cmp	r9, r3
	bcs	.L10
	ldr	r2, .L31+8
	str	r3, [r4]
	ldr	r8, [r2]
.L1:
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	mov	r3, r8
	mov	r2, r4
	mov	r1, r5
	mov	r0, r6
	ldr	fp, [r4, #4]
	bl	aes_encrypt_update
	ldr	r10, .L31+12
	mov	r8, r0
	ldr	r3, [r10]
	cmp	r3, r0
	bne	.L1
	ldr	r3, [r7]
	tst	r3, #130
	bne	.L29
	tst	r3, #129
	bne	.L30
.L13:
	ldr	r0, [r7, #8]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ASSERT
	mov	r0, r6
	bl	aes_free_context
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L27:
	ldr	r3, .L31+16
	ldr	r8, [r3]
	mov	r0, r8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	ldr	r3, [r5]
	ldr	r2, [r7, #4]
	add	r3, r3, r2
	b	.L8
.L5:
	ldr	r3, [r5]
	ldr	r2, [r7, #12]
	add	r3, r3, r2
	b	.L8
.L28:
	ldr	r3, [r5]
	cmp	r3, #0
	ldreq	r3, [r7, #4]
	beq	.L8
	ldr	r3, .L31+20
	ldr	r8, [r3]
	b	.L1
.L29:
	ldr	r2, .L31+24
	ldr	r3, [r4]
	ldr	r0, [r2]
	ldr	r1, .L31+28
	ldr	r2, .L31+4
	str	r0, [sp]
	sub	r9, r9, r3
	str	r3, [r4, #4]
	mov	r0, r7
	ldr	r3, [r1]
	ldr	r2, [r2]
	mov	r1, r4
	str	r9, [r4]
	bl	ccm_encrypt_final
	ldr	r3, [r10]
	mov	r8, r0
	cmp	r3, r0
	bne	.L1
.L25:
	cmp	r5, r4
	ldrne	r3, [r4, #4]
	str	fp, [r4, #4]
	subne	r3, r3, fp
	strne	r3, [r4]
	b	.L13
.L30:
	ldr	r2, .L31+24
	ldr	r1, .L31+32
	ldr	r2, [r2]
	ldr	r3, [r4]
	ldr	r0, [r1]
	str	r2, [sp, #4]
	ldr	r1, .L31+28
	ldr	r2, .L31+4
	str	r0, [sp]
	sub	r9, r9, r3
	str	r3, [r4, #4]
	mov	r0, r7
	ldr	r3, [r1]
	ldr	r2, [r2]
	mov	r1, r4
	str	r9, [r4]
	bl	gcm_encrypt_final
	ldr	r3, [r10]
	mov	r8, r0
	cmp	r3, r0
	bne	.L1
	b	.L25
.L32:
	.align	2
.L31:
	.word	CTR_MODE
	.word	AES_BLOCK_LEN
	.word	CRYPTO_BUFFER_TOO_SMALL
	.word	CRYPTO_SUCCESS
	.word	CRYPTO_DATA_LEN_RANGE
	.word	CRYPTO_ARGUMENTS_BAD
	.word	aes_xor_block
	.word	aes_encrypt_block
	.word	aes_copy_block
	.size	aes_encrypt, .-aes_encrypt
	.comm	aes_xor_block,4,4
	.comm	aes_encrypt_block,4,4
	.comm	aes_copy_block,4,4
	.comm	CTR_MODE,4,4
	.comm	CRYPTO_SUCCESS,4,4
	.comm	CRYPTO_FAILED,4,4
	.comm	CRYPTO_DATA_LEN_RANGE,4,4
	.comm	CRYPTO_BUFFER_TOO_SMALL,4,4
	.comm	CRYPTO_ARGUMENTS_BAD,4,4
	.comm	AES_BLOCK_LEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
