	.file	"extr_d1_lib.c_dtls1_get_timeout.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	dtls1_get_timeout
	.type	dtls1_get_timeout, @function
dtls1_get_timeout:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 40
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rdi]
	cmp	QWORD PTR [rax], 0
	jne	.L2
	cmp	QWORD PTR 8[rax], 0
	je	.L8
.L2:
	mov	rdi, rsp
	call	get_current_time@PLT
	mov	rsi, QWORD PTR [rbx]
	mov	rax, QWORD PTR [rsp]
	cmp	QWORD PTR [rsi], rax
	jl	.L4
	jne	.L5
	mov	rax, QWORD PTR 8[rsp]
	cmp	QWORD PTR 8[rsi], rax
	jle	.L4
.L5:
	mov	edx, 16
	mov	rdi, r12
	call	memcpy@PLT
	mov	rax, QWORD PTR [r12]
	mov	rdx, QWORD PTR 8[r12]
	sub	rax, QWORD PTR [rsp]
	sub	rdx, QWORD PTR 8[rsp]
	mov	QWORD PTR [r12], rax
	mov	QWORD PTR 8[r12], rdx
	js	.L11
	test	rax, rax
	je	.L12
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	cmp	QWORD PTR 8[r12], 14999
	jg	.L3
.L4:
	mov	edx, 16
	xor	esi, esi
	mov	rdi, r12
	call	memset@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	sub	rax, 1
	add	rdx, 1000000
	mov	QWORD PTR [r12], rax
	mov	QWORD PTR 8[r12], rdx
	test	rax, rax
	jne	.L3
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L8:
	xor	r12d, r12d
	jmp	.L3
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	dtls1_get_timeout, .-dtls1_get_timeout
	.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_d1_lib.c_dtls1_get_timeout.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	dtls1_get_timeout
	.syntax unified
	.arm
	.fpu softvfp
	.type	dtls1_get_timeout, %function
dtls1_get_timeout:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, [r0]
	mov	r4, r1
	ldr	r2, [r3]
	ldr	r1, .L13
	sub	sp, sp, #16
	cmp	r2, #0
	mov	r5, r0
	ldr	r1, [r1]
	str	r1, [sp, #12]
	mov	r1,#0
	bne	.L2
	ldr	r3, [r3, #4]
	cmp	r3, #0
	moveq	r4, r3
	beq	.L3
.L2:
	add	r0, sp, #4
	bl	get_current_time
	ldr	r1, [r5]
	ldr	r5, [sp, #4]
	ldr	r3, [r1]
	cmp	r3, r5
	blt	.L4
	ldr	r6, [sp, #8]
	bne	.L5
	ldr	r3, [r1, #4]
	cmp	r3, r6
	ble	.L4
.L5:
	mov	r2, #8
	mov	r0, r4
	bl	memcpy
	ldm	r4, {r2, r3}
	sub	r3, r3, r6
	cmp	r3, #0
	sub	r2, r2, r5
	stm	r4, {r2, r3}
	addlt	r3, r3, #999424
	addlt	r3, r3, #576
	sublt	r2, r2, #1
	stmlt	r4, {r2, r3}
	cmp	r2, #0
	beq	.L11
.L3:
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	mov	r0, r4
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L11:
	ldr	r3, .L13+4
	ldr	r2, [r4, #4]
	cmp	r2, r3
	bgt	.L3
.L4:
	mov	r2, #8
	mov	r1, #0
	mov	r0, r4
	bl	memset
	b	.L3
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	14999
	.size	dtls1_get_timeout, .-dtls1_get_timeout
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
