	.file	"extr_onion.c_handle_recv_2.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	handle_recv_2, @function
handle_recv_2:
.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, 24
	.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
	cmp	DWORD PTR ONION_MAX_PACKET_SIZE[rip], ecx
	jl	.L4
	mov	eax, DWORD PTR RETURN_2[rip]
	mov	ebx, ecx
	add	eax, 1
	cmp	eax, ecx
	jge	.L4
	cdqe
	mov	r12, rdi
	mov	r13, rdx
	mov	rax, QWORD PTR [rdx+rax*8]
	cmp	rax, QWORD PTR NET_PACKET_ANNOUNCE_RESPONSE[rip]
	je	.L5
	cmp	rax, QWORD PTR NET_PACKET_ONION_DATA_RESPONSE[rip]
	je	.L5
.L4:
	mov	eax, 1
.L1:
	mov	rsi, QWORD PTR -56[rbp]
	xor	rsi, QWORD PTR fs:40
	jne	.L24
	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
.L5:
	.cfi_restore_state
	mov	rdi, r12
	call	change_symmetric_key@PLT
	mov	ecx, DWORD PTR RETURN_1[rip]
	mov	rsi, rsp
	add	ecx, DWORD PTR SIZE_IPPORT[rip]
	movsx	r14, ecx
	sal	r14, 3
	lea	rax, 15[r14]
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
.L6:
	cmp	rsp, rax
	je	.L7
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L25
.L8:
	movsx	rax, DWORD PTR crypto_box_NONCEBYTES[rip]
	mov	edi, DWORD PTR 4[r12]
	mov	r15, rsp
	lea	rsi, 8[r13]
	add	ecx, DWORD PTR crypto_box_MACBYTES[rip]
	mov	r8, r15
	lea	rdx, 8[r13+rax*8]
	call	decrypt_data_symmetric@PLT
	mov	edx, eax
	cdqe
	cmp	rax, r14
	jne	.L4
	xor	ecx, ecx
	lea	rdi, -60[rbp]
	mov	rsi, r15
	call	ipport_unpack@PLT
	cmp	eax, -1
	je	.L4
	movsx	rax, DWORD PTR ONION_MAX_PACKET_SIZE[rip]
	mov	rsi, rsp
	lea	rax, 15[0+rax*8]
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
.L9:
	cmp	rsp, rax
	je	.L10
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L25:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L10:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L11
	or	QWORD PTR -8[rsp+rdx], 0
.L11:
	lea	r14, 7[rsp]
	mov	rdx, QWORD PTR NET_PACKET_ONION_RECV_1[rip]
	mov	rax, r14
	and	r14, -8
	shr	rax, 3
	lea	rdi, 8[r14]
	mov	QWORD PTR 0[0+rax*8], rdx
	movsx	rax, DWORD PTR SIZE_IPPORT[rip]
	mov	edx, DWORD PTR RETURN_1[rip]
	lea	rsi, [r15+rax*8]
	call	memcpy@PLT
	movsx	rax, DWORD PTR RETURN_2[rip]
	mov	esi, ebx
	lea	edx, 1[rax]
	sub	esi, edx
	mov	edx, esi
	lea	rsi, 8[r13+rax*8]
	movsx	rax, DWORD PTR RETURN_1[rip]
	lea	rdi, 8[r14+rax*8]
	call	memcpy@PLT
	mov	esi, DWORD PTR -60[rbp]
	mov	edi, DWORD PTR [r12]
	mov	rdx, r14
	sub	ebx, DWORD PTR RETURN_2[rip]
	add	ebx, DWORD PTR RETURN_1[rip]
	mov	ecx, ebx
	call	sendpacket@PLT
	cmp	ebx, eax
	setne	al
	movzx	eax, al
	jmp	.L1
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	handle_recv_2, .-handle_recv_2
	.comm	crypto_box_NONCEBYTES,4,4
	.comm	crypto_box_MACBYTES,4,4
	.comm	SIZE_IPPORT,4,4
	.comm	RETURN_2,4,4
	.comm	RETURN_1,4,4
	.comm	ONION_MAX_PACKET_SIZE,4,4
	.comm	NET_PACKET_ONION_RECV_1,8,8
	.comm	NET_PACKET_ONION_DATA_RESPONSE,8,8
	.comm	NET_PACKET_ANNOUNCE_RESPONSE,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_onion.c_handle_recv_2.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_recv_2, %function
handle_recv_2:
	@ args = 0, pretend = 0, frame = 16
	@ 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	r4, r3
	ldr	r7, .L13
	ldr	r3, [r7]
	cmp	r3, r4
	ldr	r3, .L13+4
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	blt	.L4
	ldr	r8, .L13+8
	ldr	r3, [r8]
	add	r3, r3, #1
	cmp	r3, r4
	bge	.L4
	mov	r5, r2
	ldr	r2, .L13+12
	ldr	r3, [r5, r3, lsl #2]
	ldr	r2, [r2]
	mov	r6, r0
	cmp	r3, r2
	beq	.L5
	ldr	r2, .L13+16
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L5
.L4:
	mov	r0, #1
.L1:
	ldr	r3, .L13+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	ldr	r9, .L13+20
	ldr	r10, .L13+24
	mov	r0, r6
	bl	change_symmetric_key
	ldr	r1, [r9]
	ldr	r3, [r10]
	ldr	r2, .L13+28
	add	r3, r1, r3
	lsl	r1, r3, #2
	str	r1, [fp, #-48]
	add	r1, r1, #7
	bic	r1, r1, #7
	ldr	r0, .L13+32
	sub	sp, sp, r1
	ldr	r2, [r2]
	ldr	r0, [r0]
	add	ip, sp, #8
	str	ip, [sp]
	add	r2, r2, #1
	add	r3, r3, r0
	add	r1, r5, #4
	ldr	r0, [r6, #4]
	add	r2, r5, r2, lsl #2
	str	ip, [fp, #-52]
	bl	decrypt_data_symmetric
	ldr	r1, [fp, #-48]
	cmp	r0, r1
	bne	.L4
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-52]
	sub	r0, fp, #44
	bl	ipport_unpack
	cmn	r0, #1
	beq	.L4
	ldr	r3, [r7]
	ldr	r2, .L13+36
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	add	r7, sp, #8
	mov	r0, r7
	ldr	r3, [r2]
	ldr	r10, [r10]
	ldr	r1, [r9]
	str	r3, [r0], #4
	ldr	r3, [fp, #-52]
	mov	r2, r10
	add	r1, r3, r1, lsl #2
	bl	memcpy
	ldr	r1, [r8]
	add	r10, r10, #1
	add	r1, r1, #1
	sub	r2, r4, r1
	add	r0, r7, r10, lsl #2
	add	r1, r5, r1, lsl #2
	add	r10, r10, r2
	bl	memcpy
	mov	r2, r7
	mov	r3, r10
	ldr	r0, [r6]
	ldr	r1, [fp, #-44]
	bl	sendpacket
	subs	r0, r0, r10
	movne	r0, #1
	b	.L1
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	ONION_MAX_PACKET_SIZE
	.word	.LC0
	.word	RETURN_2
	.word	NET_PACKET_ANNOUNCE_RESPONSE
	.word	NET_PACKET_ONION_DATA_RESPONSE
	.word	SIZE_IPPORT
	.word	RETURN_1
	.word	crypto_box_NONCEBYTES
	.word	crypto_box_MACBYTES
	.word	NET_PACKET_ONION_RECV_1
	.size	handle_recv_2, .-handle_recv_2
	.comm	crypto_box_NONCEBYTES,4,4
	.comm	crypto_box_MACBYTES,4,4
	.comm	SIZE_IPPORT,4,4
	.comm	RETURN_2,4,4
	.comm	RETURN_1,4,4
	.comm	ONION_MAX_PACKET_SIZE,4,4
	.comm	NET_PACKET_ONION_RECV_1,4,4
	.comm	NET_PACKET_ONION_DATA_RESPONSE,4,4
	.comm	NET_PACKET_ANNOUNCE_RESPONSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
