	.file	"extr_crypto_core.c_encrypt_data_symmetric.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	encrypt_data_symmetric
	.type	encrypt_data_symmetric, @function
encrypt_data_symmetric:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 40
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	test	rcx, rcx
	je	.L5
	mov	r13, rdi
	test	rdi, rdi
	je	.L5
	mov	r15, rdx
	test	rsi, rsi
	mov	r14, rsi
	sete	dl
	test	r15, r15
	sete	al
	or	dl, al
	jne	.L5
	mov	r12, r8
	test	r8, r8
	je	.L5
	mov	r8, QWORD PTR crypto_box_ZEROBYTES[rip]
	mov	rbx, rcx
	lea	rax, [r8+rcx]
	mov	rcx, rsp
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L7
.L21:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L21
.L7:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L22
.L8:
	mov	rax, QWORD PTR crypto_box_MACBYTES[rip]
	mov	rdi, rsp
	mov	r10, rsp
	add	rax, rbx
	add	rax, QWORD PTR crypto_box_BOXZEROBYTES[rip]
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rdi, rax
	and	rdx, -16
	mov	rax, rdi
	cmp	rsp, rax
	je	.L10
.L23:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L23
.L10:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L24
.L11:
	mov	r9, rsp
	mov	rdx, r8
	xor	esi, esi
	mov	rdi, r10
	mov	QWORD PTR -80[rbp], r9
	mov	QWORD PTR -72[rbp], r10
	call	memset@PLT
	mov	r10, QWORD PTR -72[rbp]
	mov	rdx, rbx
	mov	rsi, r15
	mov	rax, QWORD PTR crypto_box_ZEROBYTES[rip]
	lea	rdi, [r10+rax*4]
	call	memcpy@PLT
	mov	r10, QWORD PTR -72[rbp]
	mov	r9, QWORD PTR -80[rbp]
	mov	r8, r13
	mov	rdx, QWORD PTR crypto_box_ZEROBYTES[rip]
	mov	rcx, r14
	mov	rsi, r10
	mov	rdi, r9
	mov	QWORD PTR -72[rbp], r9
	add	rdx, rbx
	call	crypto_box_afternm@PLT
	test	rax, rax
	jne	.L5
	mov	rdx, QWORD PTR crypto_box_MACBYTES[rip]
	mov	rax, QWORD PTR crypto_box_BOXZEROBYTES[rip]
	mov	rdi, r12
	mov	r9, QWORD PTR -72[rbp]
	add	rdx, rbx
	lea	rsi, [r9+rax*4]
	call	memcpy@PLT
	mov	eax, DWORD PTR crypto_box_MACBYTES[rip]
	add	eax, ebx
.L1:
	mov	rdi, QWORD PTR -56[rbp]
	xor	rdi, QWORD PTR fs:40
	jne	.L25
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L24:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L5:
	mov	eax, -1
	jmp	.L1
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	encrypt_data_symmetric, .-encrypt_data_symmetric
	.comm	crypto_box_ZEROBYTES,8,8
	.comm	crypto_box_MACBYTES,8,8
	.comm	crypto_box_BOXZEROBYTES,8,8
	.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_crypto_core.c_encrypt_data_symmetric.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	encrypt_data_symmetric
	.syntax unified
	.arm
	.fpu softvfp
	.type	encrypt_data_symmetric, %function
encrypt_data_symmetric:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #36
	cmp	r0, #0
	cmpne	r3, #0
	mov	r4, r3
	ldr	r3, .L9
	str	r0, [fp, #-52]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	ldr	r3, [fp, #4]
	str	r3, [fp, #-48]
	beq	.L4
	mov	r9, r1
	clz	r1, r2
	ldr	r3, [fp, #-48]
	cmp	r9, #0
	lsr	r1, r1, #5
	moveq	r1, #1
	cmp	r3, #0
	moveq	r1, #1
	cmp	r1, #0
	mov	r5, r2
	bne	.L4
	ldr	r3, .L9+4
	ldr	r8, .L9+8
	ldr	r7, [r3]
	ldr	r10, .L9+12
	ldr	r2, [r8]
	add	r3, r7, r4
	ldr	ip, [r10]
	lsl	r0, r3, #2
	add	r2, r4, r2
	add	r2, r2, ip
	add	r0, r0, #7
	bic	r0, r0, #7
	lsl	r2, r2, #2
	sub	sp, sp, r0
	add	r2, r2, #7
	add	r6, sp, #8
	bic	r2, r2, #7
	sub	sp, sp, r2
	mov	r0, r6
	mov	r2, r7
	str	r3, [fp, #-56]
	bl	memset
	mov	r1, r5
	mov	r2, r4
	add	r0, r6, r7, lsl #2
	bl	memcpy
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-56]
	add	r5, sp, #8
	str	r2, [sp]
	mov	r1, r6
	mov	r2, r3
	mov	r0, r5
	mov	r3, r9
	bl	crypto_box_afternm
	cmp	r0, #0
	bne	.L4
	ldr	r1, [r10]
	ldr	r2, [r8]
	ldr	r0, [fp, #-48]
	add	r1, r5, r1, lsl #2
	add	r2, r4, r2
	bl	memcpy
	ldr	r0, [r8]
	add	r0, r4, r0
.L1:
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mvn	r0, #0
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	.LC0
	.word	crypto_box_ZEROBYTES
	.word	crypto_box_MACBYTES
	.word	crypto_box_BOXZEROBYTES
	.size	encrypt_data_symmetric, .-encrypt_data_symmetric
	.comm	crypto_box_ZEROBYTES,4,4
	.comm	crypto_box_MACBYTES,4,4
	.comm	crypto_box_BOXZEROBYTES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
