	.file	"extr_net_crypto.c_open_cookie.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	open_cookie, @function
open_cookie:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	.cfi_offset 13, -24
	mov	r13, rdi
	mov	rdi, rdx
	push	r12
	push	rbx
	sub	rsp, 24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	movsx	r12, DWORD PTR COOKIE_CONTENTS_LENGTH[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	rbx, rsp
	sal	r12, 3
	lea	rax, 15[r12]
	mov	rdx, rax
	and	rax, -4096
	sub	rbx, rax
	and	rdx, -16
	mov	rax, rbx
	cmp	rsp, rax
	je	.L3
.L14:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L14
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L15
.L4:
	movsx	rax, DWORD PTR crypto_box_NONCEBYTES[rip]
	mov	ecx, DWORD PTR COOKIE_LENGTH[rip]
	mov	rbx, rsp
	mov	r8, rbx
	sub	ecx, eax
	lea	rdx, [rsi+rax*8]
	call	decrypt_data_symmetric@PLT
	cdqe
	cmp	rax, r12
	jne	.L7
	mov	edx, 8
	lea	rdi, -48[rbp]
	mov	rsi, rbx
	call	memcpy@PLT
	xor	eax, eax
	call	unix_time@PLT
	mov	rdx, QWORD PTR -48[rbp]
	mov	rcx, QWORD PTR COOKIE_TIMEOUT[rip]
	add	rcx, rdx
	cmp	rcx, rax
	jl	.L7
	cmp	rdx, rax
	jg	.L7
	mov	edx, DWORD PTR COOKIE_DATA_LENGTH[rip]
	lea	rsi, 64[rbx]
	mov	rdi, r13
	call	memcpy@PLT
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR -40[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L16
	lea	rsp, -24[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	mov	eax, -1
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	open_cookie, .-open_cookie
	.comm	crypto_box_NONCEBYTES,4,4
	.comm	COOKIE_TIMEOUT,8,8
	.comm	COOKIE_LENGTH,4,4
	.comm	COOKIE_DATA_LENGTH,4,4
	.comm	COOKIE_CONTENTS_LENGTH,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_net_crypto.c_open_cookie.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_cookie, %function
open_cookie:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #16
	ldr	r3, .L9
	mov	r5, r0
	ldr	r4, [r3]
	ldr	r0, .L9+4
	lsl	r4, r4, #2
	ldr	ip, .L9+8
	add	r3, r4, #7
	bic	r3, r3, #7
	ldr	ip, [ip]
	sub	sp, sp, r3
	ldr	r3, [r0]
	add	r6, sp, #8
	mov	r0, r2
	sub	r3, r3, ip
	add	r2, r1, ip, lsl #2
	ldr	ip, .L9+12
	str	r6, [sp]
	ldr	ip, [ip]
	str	ip, [fp, #-24]
	mov	ip,#0
	bl	decrypt_data_symmetric
	cmp	r0, r4
	bne	.L4
	ldr	r7, [r6]
	bl	unix_time
	ldr	r3, .L9+16
	ldr	r4, [r3]
	add	r4, r7, r4
	cmp	r0, r7
	cmpge	r4, r0
	movlt	r4, #1
	movge	r4, #0
	blt	.L4
	ldr	r3, .L9+20
	mov	r0, r5
	ldr	r2, [r3]
	add	r1, r6, #16
	bl	memcpy
	mov	r0, r4
.L1:
	ldr	r3, .L9+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L4:
	mvn	r0, #0
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	COOKIE_CONTENTS_LENGTH
	.word	COOKIE_LENGTH
	.word	crypto_box_NONCEBYTES
	.word	.LC0
	.word	COOKIE_TIMEOUT
	.word	COOKIE_DATA_LENGTH
	.size	open_cookie, .-open_cookie
	.comm	crypto_box_NONCEBYTES,4,4
	.comm	COOKIE_TIMEOUT,4,4
	.comm	COOKIE_LENGTH,4,4
	.comm	COOKIE_DATA_LENGTH,4,4
	.comm	COOKIE_CONTENTS_LENGTH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
