	.file	"extr_DHT.c_cryptopacket_handle.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cryptopacket_handle, @function
cryptopacket_handle:
.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
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	mov	r13, rdi
	push	r12
	sub	rsp, 32
	.cfi_offset 12, -48
	mov	rdi, QWORD PTR NET_PACKET_CRYPTO[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	eax, 1
	cmp	QWORD PTR [rdx], rdi
	je	.L26
.L1:
	mov	rsi, QWORD PTR -40[rbp]
	xor	rsi, QWORD PTR fs:40
	jne	.L27
	lea	rsp, -32[rbp]
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	mov	edi, DWORD PTR crypto_box_PUBLICKEYBYTES[rip]
	mov	r12, rdx
	mov	edx, DWORD PTR crypto_box_NONCEBYTES[rip]
	mov	r14d, esi
	mov	esi, DWORD PTR crypto_box_MACBYTES[rip]
	lea	edx, 1[rdx+rdi*2]
	add	edx, esi
	cmp	edx, ecx
	jge	.L1
	add	esi, DWORD PTR MAX_CRYPTO_REQUEST_SIZE[rip]
	mov	DWORD PTR -56[rbp], ecx
	cmp	esi, ecx
	jl	.L1
	mov	esi, DWORD PTR 12[r13]
	lea	r15, 8[r12]
	mov	rdi, r15
	call	public_key_cmp@PLT
	mov	ecx, DWORD PTR -56[rbp]
	test	rax, rax
	jne	.L3
	movsx	rax, DWORD PTR crypto_box_PUBLICKEYBYTES[rip]
	mov	rsi, rsp
	mov	r15, rsp
	lea	rax, 15[0+rax*8]
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
.L4:
	cmp	rsp, rax
	je	.L5
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdx, r12
	mov	rsi, r15
	mov	rdi, r13
	mov	DWORD PTR -56[rbp], ecx
	call	route_packet@PLT
	mov	ecx, DWORD PTR -56[rbp]
	cmp	ecx, eax
	setne	al
	movzx	eax, al
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L6
	or	QWORD PTR -8[rsp+rdx], 0
.L6:
	movsx	rax, DWORD PTR MAX_CRYPTO_REQUEST_SIZE[rip]
	mov	rdi, rsp
	mov	rdx, rsp
	lea	rax, 15[0+rax*8]
	mov	rsi, rax
	and	rax, -4096
	sub	rdi, rax
	and	rsi, -16
	mov	rax, rdi
	cmp	rsp, rax
	je	.L8
.L28:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L28
.L8:
	and	esi, 4095
	sub	rsp, rsi
	test	rsi, rsi
	je	.L9
	or	QWORD PTR -8[rsp+rsi], 0
.L9:
	mov	r10, rsp
	sub	rsp, 8
	mov	esi, DWORD PTR 8[r13]
	mov	edi, DWORD PTR 12[r13]
	push	rcx
	lea	r8, -48[rbp]
	mov	rcx, r10
	mov	r9, r12
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], r10
	call	handle_request@PLT
	lea	ecx, 1[rax]
	mov	r8d, eax
	pop	rax
	mov	eax, 1
	pop	rdx
	cmp	ecx, 1
	jbe	.L10
	mov	rcx, QWORD PTR -48[rbp]
	sal	rcx, 4
	add	rcx, QWORD PTR 0[r13]
	mov	r9, QWORD PTR [rcx]
	test	r9, r9
	je	.L10
	mov	r10, QWORD PTR -64[rbp]
	mov	edi, DWORD PTR 8[rcx]
	mov	esi, r14d
	mov	rdx, QWORD PTR -56[rbp]
	mov	rcx, r10
	call	r9
.L10:
	mov	rsp, r15
	jmp	.L1
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cryptopacket_handle, .-cryptopacket_handle
	.comm	crypto_box_PUBLICKEYBYTES,4,4
	.comm	crypto_box_NONCEBYTES,4,4
	.comm	crypto_box_MACBYTES,4,4
	.comm	NET_PACKET_CRYPTO,8,8
	.comm	MAX_CRYPTO_REQUEST_SIZE,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_DHT.c_cryptopacket_handle.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cryptopacket_handle, %function
cryptopacket_handle:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #28
	mov	r6, r2
	ldr	r2, .L15
	ldr	ip, [r6]
	ldr	r2, [r2]
	mov	r7, r3
	ldr	r3, .L15+4
	cmp	ip, r2
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	beq	.L13
.L8:
	mov	r0, #1
.L1:
	ldr	r3, .L15+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	ldr	r3, .L15+8
	ldr	r8, .L15+12
	ldr	ip, [r3]
	ldr	r2, [r8]
	ldr	r3, .L15+16
	add	ip, ip, r2, lsl #1
	ldr	r3, [r3]
	add	ip, ip, #1
	add	ip, ip, r3
	cmp	ip, r7
	bge	.L8
	ldr	r9, .L15+20
	ldr	r2, [r9]
	add	r3, r3, r2
	cmp	r3, r7
	blt	.L8
	mov	r4, r0
	add	r10, r6, #4
	mov	r5, r1
	mov	r0, r10
	ldr	r1, [r4, #8]
	bl	public_key_cmp
	cmp	r0, #0
	bne	.L3
	ldr	r2, [r8]
	ldr	r3, [r9]
	lsl	r2, r2, #2
	add	r2, r2, #7
	lsl	r3, r3, #2
	bic	r2, r2, #7
	add	r3, r3, #7
	bic	r3, r3, #7
	mov	r8, sp
	sub	sp, sp, r2
	add	r9, sp, #16
	sub	sp, sp, r3
	add	r10, sp, #16
	sub	r3, fp, #44
	ldr	r1, [r4, #4]
	ldr	r0, [r4, #8]
	mov	r2, r9
	stm	sp, {r3, r6, r7}
	mov	r3, r10
	bl	handle_request
	add	r3, r0, #1
	cmp	r3, #1
	mov	r1, r0
	bls	.L10
	ldr	r3, [r4]
	ldr	r2, [fp, #-44]
	ldr	r4, [r3, r2, lsl #3]
	add	r3, r3, r2, lsl #3
	cmp	r4, #0
	beq	.L10
	ldr	r0, [r3, #4]
	mov	r2, r9
	str	r1, [sp]
	mov	r3, r10
	mov	r1, r5
	blx	r4
.L4:
	mov	sp, r8
	b	.L1
.L3:
	mov	r2, r6
	mov	r1, r10
	mov	r0, r4
	mov	r3, r7
	bl	route_packet
	subs	r0, r7, r0
	movne	r0, #1
	b	.L1
.L10:
	mov	r0, #1
	b	.L4
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	NET_PACKET_CRYPTO
	.word	.LC0
	.word	crypto_box_NONCEBYTES
	.word	crypto_box_PUBLICKEYBYTES
	.word	crypto_box_MACBYTES
	.word	MAX_CRYPTO_REQUEST_SIZE
	.size	cryptopacket_handle, .-cryptopacket_handle
	.comm	crypto_box_PUBLICKEYBYTES,4,4
	.comm	crypto_box_NONCEBYTES,4,4
	.comm	crypto_box_MACBYTES,4,4
	.comm	NET_PACKET_CRYPTO,4,4
	.comm	MAX_CRYPTO_REQUEST_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
