	.file	"extr_ccm.c_ccm_auth_crypt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ccm_auth_crypt, @function
ccm_auth_crypt:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 152
	.cfi_def_cfa_offset 208
	mov	rax, QWORD PTR 232[rsp]
	mov	r14, QWORD PTR 216[rsp]
	mov	r13, QWORD PTR 224[rsp]
	mov	QWORD PTR [rsp], rax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 136[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 240[rsp]
	sub	rax, 4
	cmp	rax, 12
	ja	.L32
	test	BYTE PTR 240[rsp], 1
	jne	.L32
	lea	rax, -7[r8]
	mov	rbp, r8
	cmp	rax, 6
	ja	.L32
	cmp	QWORD PTR 208[rsp], 65280
	ja	.L32
	mov	eax, 15
	mov	rbx, rdx
	mov	r10, rcx
	mov	r12d, esi
	sub	eax, r8d
	mov	rsi, r10
	mov	QWORD PTR 24[rsp], r10
	mov	r15, r9
	cmp	QWORD PTR 208[rsp], 0
	mov	rdx, QWORD PTR 240[rsp]
	mov	BYTE PTR 16[rsp], al
	setne	al
	mov	ecx, eax
	mov	eax, 14
	mov	edi, eax
	lea	rax, -2[rdx]
	sal	ecx, 6
	mov	rdx, rax
	sub	edi, r8d
	shr	rdx
	mov	BYTE PTR 39[rsp], dil
	lea	eax, 0[0+rdx*8]
	mov	rdx, r8
	or	eax, ecx
	or	eax, edi
	lea	rdi, 81[rsp]
	mov	BYTE PTR 80[rsp], al
	call	memcpy@PLT
	movzx	esi, BYTE PTR 16[rsp]
	lea	rax, 95[rsp]
	mov	rdx, rbx
	mov	rcx, rax
	mov	r10, QWORD PTR 24[rsp]
	mov	QWORD PTR 8[rsp], rsi
	sub	rcx, rsi
	.p2align 4,,10
	.p2align 3
.L6:
	mov	BYTE PTR [rax], dl
	sub	rax, 1
	shr	rdx, 8
	cmp	rax, rcx
	jne	.L6
	test	rdx, rdx
	jne	.L32
	lea	rax, 96[rsp]
	xor	esi, esi
	mov	edx, 16
	mov	QWORD PTR 40[rsp], r10
	mov	rdi, rax
	mov	QWORD PTR 24[rsp], rax
	call	memset@PLT
	mov	r10, QWORD PTR 40[rsp]
	cmp	QWORD PTR 208[rsp], 0
	jne	.L8
.L11:
	movzx	eax, BYTE PTR 39[rsp]
	mov	rdx, rbp
	mov	rsi, r10
	lea	rdi, 113[rsp]
	lea	r15, 112[rsp]
	mov	BYTE PTR 112[rsp], al
	call	memcpy@PLT
	movzx	edx, BYTE PTR 16[rsp]
	lea	rdi, 1[r15+rbp]
	xor	esi, esi
	mov	r15, r13
	lea	rbp, 127[rsp]
	mov	r13, rbx
	call	memset@PLT
	mov	BYTE PTR 127[rsp], 1
	test	rbx, rbx
	je	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	cmp	r13, 16
	mov	ebx, 16
	cmovbe	rbx, r13
	cmp	DWORD PTR CCM_ENCRYPT[rip], r12d
	je	.L34
.L14:
	mov	edx, ebx
	mov	rsi, r14
	mov	rdi, r15
	call	CTR_CRYPT@PLT
	cmp	DWORD PTR CCM_DECRYPT[rip], r12d
	je	.L35
.L15:
	mov	rcx, rbp
	add	r15, rbx
	add	r14, rbx
	sub	r13, rbx
	mov	rdx, rbp
	sub	rcx, QWORD PTR 8[rsp]
	.p2align 4,,10
	.p2align 3
.L17:
	add	BYTE PTR [rdx], 1
	jne	.L16
	sub	rdx, 1
	cmp	rcx, rdx
	jne	.L17
.L16:
	test	r13, r13
	jne	.L9
.L10:
	mov	rax, rbp
	sub	rax, QWORD PTR 8[rsp]
	.p2align 4,,10
	.p2align 3
.L13:
	mov	BYTE PTR 0[rbp], 0
	sub	rbp, 1
	cmp	rbp, rax
	jne	.L13
	mov	rbx, QWORD PTR 24[rsp]
	mov	edx, 16
	mov	rsi, rbx
	mov	rdi, rbx
	call	CTR_CRYPT@PLT
	mov	rdx, QWORD PTR 240[rsp]
	mov	rdi, QWORD PTR [rsp]
	mov	rsi, rbx
	call	memcpy@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L32:
	mov	eax, DWORD PTR MBEDTLS_ERR_CCM_BAD_INPUT[rip]
.L1:
	mov	rdi, QWORD PTR 136[rsp]
	xor	rdi, QWORD PTR fs:40
	jne	.L36
	add	rsp, 152
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L35:
	.cfi_restore_state
	lea	rdi, 80[rsp]
	xor	esi, esi
	mov	edx, 16
	mov	QWORD PTR 16[rsp], rdi
	call	memset@PLT
	mov	rdi, QWORD PTR 16[rsp]
	mov	rdx, rbx
	mov	rsi, r15
	call	memcpy@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L34:
	lea	rdi, 80[rsp]
	xor	esi, esi
	mov	edx, 16
	mov	QWORD PTR 16[rsp], rdi
	call	memset@PLT
	mov	rdi, QWORD PTR 16[rsp]
	mov	rdx, rbx
	mov	rsi, r14
	call	memcpy@PLT
	jmp	.L14
.L8:
	lea	rax, 80[rsp]
	xor	esi, esi
	mov	edx, 16
	mov	QWORD PTR 48[rsp], r10
	mov	rdi, rax
	mov	QWORD PTR 56[rsp], rax
	call	memset@PLT
	movzx	eax, WORD PTR 208[rsp]
	mov	edx, 14
	mov	rsi, r15
	lea	rdi, 82[rsp]
	rol	ax, 8
	cmp	QWORD PTR 208[rsp], 14
	cmovbe	rdx, QWORD PTR 208[rsp]
	mov	WORD PTR 80[rsp], ax
	mov	QWORD PTR 40[rsp], rdx
	call	memcpy@PLT
	mov	rdx, QWORD PTR 40[rsp]
	mov	r10, QWORD PTR 48[rsp]
	mov	rcx, QWORD PTR 208[rsp]
	lea	rsi, [r15+rdx]
	sub	rcx, rdx
	je	.L11
	mov	QWORD PTR 64[rsp], r10
	mov	r15, QWORD PTR 56[rsp]
	mov	QWORD PTR 72[rsp], rbp
	mov	DWORD PTR 40[rsp], r12d
	mov	r12, rsi
	mov	QWORD PTR 48[rsp], rbx
	mov	rbx, rcx
	.p2align 4,,10
	.p2align 3
.L12:
	cmp	rbx, 16
	mov	ebp, 16
	mov	edx, 16
	mov	rdi, r15
	cmovbe	rbp, rbx
	xor	esi, esi
	call	memset@PLT
	mov	rsi, r12
	mov	rdi, r15
	mov	rdx, rbp
	add	r12, rbp
	call	memcpy@PLT
	sub	rbx, rbp
	jne	.L12
	mov	r12d, DWORD PTR 40[rsp]
	mov	rbx, QWORD PTR 48[rsp]
	mov	r10, QWORD PTR 64[rsp]
	mov	rbp, QWORD PTR 72[rsp]
	jmp	.L11
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ccm_auth_crypt, .-ccm_auth_crypt
	.comm	UPDATE_CBC_MAC,4,4
	.comm	MBEDTLS_ERR_CCM_BAD_INPUT,4,4
	.comm	CCM_ENCRYPT,4,4
	.comm	CCM_DECRYPT,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_ccm.c_ccm_auth_crypt.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ccm_auth_crypt, %function
ccm_auth_crypt:
	@ args = 28, pretend = 0, frame = 72
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #76
	mov	r7, r1
	mov	r6, r3
	ldr	r1, [sp, #136]
	ldr	r3, .L38
	sub	r1, r1, #4
	ldr	r3, [r3]
	str	r3, [sp, #68]
	mov	r3,#0
	ldr	r3, [sp, #132]
	cmp	r1, #12
	ldr	r10, [sp, #116]
	ldr	r8, [sp, #124]
	ldr	r9, [sp, #128]
	str	r3, [sp]
	bhi	.L32
	ldr	r3, [sp, #136]
	tst	r3, #1
	bne	.L32
	ldr	r3, [sp, #112]
	mov	r5, r2
	sub	r2, r3, #7
	cmp	r2, #6
	bhi	.L32
	ldr	r3, [sp, #120]
	cmp	r3, #65280
	bhi	.L32
	cmp	r3, #0
	movne	ip, #64
	moveq	ip, #0
	mov	r4, r5
	ldr	r3, [sp, #136]
	add	r0, sp, #21
	sub	r1, r3, #2
	ldr	r3, [sp, #112]
	lsr	r1, r1, #1
	and	r2, r3, #255
	rsb	fp, r2, #14
	and	r3, fp, #255
	rsb	lr, r2, #15
	orr	ip, ip, r1, lsl #3
	and	fp, lr, #255
	mov	r1, r6
	ldr	r2, [sp, #112]
	orr	ip, ip, r3
	str	r3, [sp, #8]
	strb	ip, [sp, #20]
	str	fp, [sp, #4]
	bl	memcpy
	add	r2, sp, #36
	sub	r1, r2, fp
.L6:
	strb	r4, [r2, #-1]!
	cmp	r1, r2
	lsr	r4, r4, #8
	bne	.L6
	cmp	r4, #0
	bne	.L32
	ldr	r3, [sp, #120]
	str	r4, [sp, #36]
	cmp	r3, #0
	str	r4, [sp, #40]
	str	r4, [sp, #44]
	str	r4, [sp, #48]
	bne	.L8
.L11:
	mov	r4, #1
	ldr	r3, [sp, #8]
	mov	r1, r6
	ldr	r2, [sp, #112]
	add	r0, sp, #53
	strb	r3, [sp, #52]
	bl	memcpy
	ldr	r3, [sp, #112]
	mov	r1, #0
	add	r0, r3, #1
	add	r3, sp, #52
	add	r0, r3, r0
	ldr	r2, [sp, #4]
	bl	memset
	add	r3, sp, #68
	cmp	r5, #0
	strb	r4, [sp, #67]
	str	r3, [sp, #8]
	beq	.L10
	ldr	r2, [sp, #4]
	ldr	fp, .L38+4
	sub	r6, r3, r2
.L9:
	ldr	r3, [fp]
	cmp	r5, #16
	movcc	r10, r5
	movcs	r10, #16
	cmp	r3, r7
	beq	.L34
.L13:
	mov	r2, r10
	mov	r1, r8
	mov	r0, r9
	bl	CTR_CRYPT
	ldr	r3, .L38+8
	ldr	r3, [r3]
	cmp	r3, r7
	beq	.L35
.L14:
	mov	r3, r4
	add	r1, sp, #67
	add	r9, r9, r10
	add	r8, r8, r10
	sub	r5, r5, r10
	b	.L16
.L36:
	ldrb	r3, [r1, #-1]!	@ zero_extendqisi2
.L16:
	add	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	strb	r3, [r1]
	bne	.L15
	cmp	r1, r6
	bne	.L36
.L15:
	cmp	r5, #0
	beq	.L10
	ldrb	r4, [sp, #67]	@ zero_extendqisi2
	b	.L9
.L32:
	ldr	r3, .L38+12
	ldr	r0, [r3]
.L1:
	ldr	r3, .L38
	ldr	r2, [r3]
	ldr	r3, [sp, #68]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L37
	add	sp, sp, #76
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L35:
	mov	r3, #0
	mov	r2, r10
	mov	r1, r9
	add	r0, sp, #20
	str	r3, [sp, #20]
	str	r3, [sp, #24]
	str	r3, [sp, #28]
	str	r3, [sp, #32]
	bl	memcpy
	b	.L14
.L34:
	mov	r3, #0
	mov	r2, r10
	mov	r1, r8
	add	r0, sp, #20
	str	r3, [sp, #20]
	str	r3, [sp, #24]
	str	r3, [sp, #28]
	str	r3, [sp, #32]
	bl	memcpy
	b	.L13
.L10:
	mov	r1, #0
	ldr	r3, [sp, #8]
	ldr	r2, [sp, #4]
	sub	r2, r3, r2
.L17:
	strb	r1, [r3, #-1]!
	cmp	r2, r3
	bne	.L17
	add	r1, sp, #36
	mov	r2, #16
	mov	r0, r1
	bl	CTR_CRYPT
	ldr	r2, [sp, #136]
	ldr	r0, [sp]
	add	r1, sp, #36
	bl	memcpy
	mov	r0, #0
	b	.L1
.L8:
	ldr	r3, [sp, #120]
	mov	r1, r10
	cmp	r3, #14
	movcc	r2, r3
	movcs	r2, #14
	lsl	ip, r3, #16
	lsr	ip, ip, #24
	orr	ip, ip, r3, lsl #8
	add	r0, sp, #22
	str	r2, [sp, #12]
	str	r4, [sp, #20]
	str	r4, [sp, #24]
	strh	ip, [sp, #20]	@ movhi
	str	r4, [sp, #28]
	str	r4, [sp, #32]
	bl	memcpy
	ldr	r2, [sp, #12]
	ldr	r3, [sp, #120]
	add	r1, r10, r2
	subs	fp, r3, r2
	beq	.L11
	str	r5, [sp, #12]
	mov	r5, r1
.L12:
	cmp	fp, #16
	movcc	r10, fp
	movcs	r10, #16
	mov	r1, r5
	mov	r2, r10
	add	r0, sp, #20
	str	r4, [sp, #20]
	str	r4, [sp, #24]
	str	r4, [sp, #28]
	str	r4, [sp, #32]
	bl	memcpy
	subs	fp, fp, r10
	add	r5, r5, r10
	bne	.L12
	ldr	r5, [sp, #12]
	b	.L11
.L37:
	bl	__stack_chk_fail
.L39:
	.align	2
.L38:
	.word	.LC0
	.word	CCM_ENCRYPT
	.word	CCM_DECRYPT
	.word	MBEDTLS_ERR_CCM_BAD_INPUT
	.size	ccm_auth_crypt, .-ccm_auth_crypt
	.comm	UPDATE_CBC_MAC,4,4
	.comm	MBEDTLS_ERR_CCM_BAD_INPUT,4,4
	.comm	CCM_ENCRYPT,4,4
	.comm	CCM_DECRYPT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
