	.file	"extr_32998.c_dtls_server.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"gethostbyname"
.LC1:
	.string	"[!] cannot create socket"
.LC2:
	.string	"bind()"
.LC3:
	.string	"[ error in malloc()"
.LC4:
	.string	"./server.crt"
.LC5:
	.string	"./server.key"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC6:
	.string	"[!] FATAL: private key does not match the certificate public key"
	.section	.rodata.str1.1
.LC7:
	.string	"[ SSL connection using %s\n"
	.section	.rodata.str1.8
	.align 8
.LC8:
	.string	"[ warning: heartbeat extension is unsupported (try anyway)"
	.text
	.p2align 4
	.globl	dtls_server
	.type	dtls_server, @function
dtls_server:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	edi, 4096
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	malloc@PLT
	mov	rdi, rbp
	mov	r13, rax
	call	gethostbyname@PLT
	mov	r12, rax
	test	rax, rax
	je	.L20
.L2:
	mov	edx, DWORD PTR IPPROTO_UDP[rip]
	mov	esi, DWORD PTR SOCK_DGRAM[rip]
	mov	edi, DWORD PTR AF_INET[rip]
	call	socket@PLT
	mov	ebp, eax
	cmp	eax, -1
	je	.L21
.L3:
	mov	eax, DWORD PTR AF_INET[rip]
	mov	edi, r14d
	mov	DWORD PTR 20[rsp], eax
	call	htons@PLT
	lea	rsi, 12[rsp]
	mov	edx, 12
	mov	edi, ebp
	mov	DWORD PTR 16[rsp], eax
	mov	rax, QWORD PTR [r12]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 12[rsp], eax
	call	bind@PLT
	test	rax, rax
	js	.L22
.L17:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	xor	edi, edi
	call	exit@PLT
	test	r13, r13
	je	.L23
.L6:
	mov	edx, 4096
	xor	esi, esi
	mov	rdi, r13
	call	memset@PLT
	mov	edi, 24
	call	malloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L24
.L7:
	mov	DWORD PTR [r12], ebp
	xor	eax, eax
	mov	QWORD PTR 8[r12], 0
	mov	QWORD PTR 16[r12], 0
	call	DTLSv1_server_method@PLT
	mov	edi, eax
	call	SSL_CTX_new@PLT
	mov	esi, 1
	mov	QWORD PTR 16[r12], rax
	mov	rdi, rax
	call	SSL_CTX_set_read_ahead@PLT
	mov	rdi, QWORD PTR 16[r12]
	test	rdi, rdi
	je	.L25
.L8:
	call	SSL_CTX_SRP_CTX_init@PLT
	mov	rdi, QWORD PTR 16[r12]
	mov	edx, DWORD PTR SSL_FILETYPE_PEM[rip]
	lea	rsi, .LC4[rip]
	call	SSL_CTX_use_certificate_file@PLT
	mov	rdi, QWORD PTR 16[r12]
	mov	edx, DWORD PTR SSL_FILETYPE_PEM[rip]
	lea	rsi, .LC5[rip]
	call	SSL_CTX_use_PrivateKey_file@PLT
	mov	rdi, QWORD PTR 16[r12]
	call	SSL_CTX_check_private_key@PLT
	test	eax, eax
	je	.L26
.L9:
	mov	rdi, QWORD PTR 16[r12]
	call	SSL_new@PLT
	mov	QWORD PTR 8[r12], rax
	mov	rdi, rax
	test	rax, rax
	je	.L27
.L10:
	mov	esi, DWORD PTR [r12]
	call	SSL_set_fd@PLT
	test	eax, eax
	je	.L28
.L11:
	mov	esi, DWORD PTR BIO_NOCLOSE[rip]
	mov	edi, ebp
	call	BIO_new_dgram@PLT
	mov	rdi, QWORD PTR 8[r12]
	mov	rdx, rax
	mov	rsi, rax
	call	SSL_set_bio@PLT
	mov	rdi, QWORD PTR 8[r12]
	call	SSL_set_accept_state@PLT
	mov	rdi, QWORD PTR 8[r12]
	call	SSL_accept@PLT
	mov	rdi, QWORD PTR 8[r12]
	call	SSL_get_cipher@PLT
	lea	rdi, .LC7[rip]
	mov	rsi, rax
	xor	eax, eax
	call	printf@PLT
	mov	rax, QWORD PTR 8[r12]
	xor	edx, edx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	sete	dl
	and	eax, DWORD PTR SSL_TLSEXT_HB_DONT_SEND_REQUESTS[rip]
	and	edx, DWORD PTR SSL_TLSEXT_HB_ENABLED[rip]
	or	edx, eax
	je	.L1
	lea	rdi, .LC8[rip]
	call	puts@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L29
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	mov	edi, DWORD PTR stderr[rip]
	call	ERR_print_errors_fp@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L26:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	xor	edi, edi
	call	exit@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L22:
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L21:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	xor	edi, edi
	call	exit@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	xor	edi, edi
	call	exit@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L27:
	mov	edi, DWORD PTR stderr[rip]
	call	ERR_print_errors_fp@PLT
	mov	rdi, QWORD PTR 8[r12]
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L24:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	xor	edi, edi
	call	exit@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edi, DWORD PTR stderr[rip]
	call	ERR_print_errors_fp@PLT
	mov	rdi, QWORD PTR 16[r12]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L20:
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L2
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	dtls_server, .-dtls_server
	.comm	stderr,4,4
	.comm	SSL_TLSEXT_HB_ENABLED,4,4
	.comm	SSL_TLSEXT_HB_DONT_SEND_REQUESTS,4,4
	.comm	SSL_FILETYPE_PEM,4,4
	.comm	SOCK_DGRAM,4,4
	.comm	IPPROTO_UDP,4,4
	.comm	BIO_NOCLOSE,4,4
	.comm	AF_INET,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_32998.c_dtls_server.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"gethostbyname\000"
	.align	2
.LC1:
	.ascii	"[!] cannot create socket\000"
	.align	2
.LC2:
	.ascii	"bind()\000"
	.align	2
.LC3:
	.ascii	"[ error in malloc()\000"
	.align	2
.LC4:
	.ascii	"./server.crt\000"
	.align	2
.LC5:
	.ascii	"./server.key\000"
	.align	2
.LC6:
	.ascii	"[!] FATAL: private key does not match the certifica"
	.ascii	"te public key\000"
	.align	2
.LC7:
	.ascii	"[ SSL connection using %s\012\000"
	.align	2
.LC8:
	.ascii	"[ warning: heartbeat extension is unsupported (try "
	.ascii	"anyway)\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	dtls_server
	.syntax unified
	.arm
	.fpu softvfp
	.type	dtls_server, %function
dtls_server:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L30
	sub	sp, sp, #16
	mov	r0, #4096
	mov	r4, r1
	mov	r8, r2
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	malloc
	mov	r7, r0
	mov	r0, r4
	bl	gethostbyname
	subs	r6, r0, #0
	beq	.L20
.L2:
	ldr	r3, .L30+4
	ldr	r2, .L30+8
	ldr	r4, .L30+12
	ldr	r2, [r2]
	ldr	r1, [r3]
	ldr	r0, [r4]
	bl	socket
	cmn	r0, #1
	mov	r5, r0
	beq	.L21
.L3:
	ldr	r3, [r4]
	mov	r0, r8
	str	r3, [sp, #8]
	bl	htons
	mov	r3, r0
	ldr	r1, [r6]
	mov	r2, #12
	ldr	r0, [r1]
	mov	r1, sp
	str	r0, [sp]
	mov	r0, r5
	str	r3, [sp, #4]
	bl	bind
	cmp	r0, #0
	blt	.L22
.L17:
	ldr	r0, .L30+16
	bl	puts
	mov	r0, #0
	bl	exit
	cmp	r7, #0
	beq	.L23
.L6:
	mov	r2, #4096
	mov	r1, #0
	mov	r0, r7
	bl	memset
	mov	r0, #12
	bl	malloc
	subs	r4, r0, #0
	beq	.L24
.L7:
	mov	r3, #0
	str	r5, [r4]
	str	r3, [r4, #4]
	str	r3, [r4, #8]
	bl	DTLSv1_server_method
	bl	SSL_CTX_new
	mov	r1, #1
	str	r0, [r4, #8]
	bl	SSL_CTX_set_read_ahead
	ldr	r0, [r4, #8]
	cmp	r0, #0
	beq	.L25
.L8:
	ldr	r6, .L30+20
	bl	SSL_CTX_SRP_CTX_init
	ldr	r2, [r6]
	ldr	r1, .L30+24
	ldr	r0, [r4, #8]
	bl	SSL_CTX_use_certificate_file
	ldr	r2, [r6]
	ldr	r1, .L30+28
	ldr	r0, [r4, #8]
	bl	SSL_CTX_use_PrivateKey_file
	ldr	r0, [r4, #8]
	bl	SSL_CTX_check_private_key
	subs	r6, r0, #0
	beq	.L26
.L9:
	ldr	r0, [r4, #8]
	bl	SSL_new
	cmp	r0, #0
	str	r0, [r4, #4]
	beq	.L27
.L10:
	ldr	r1, [r4]
	bl	SSL_set_fd
	cmp	r0, #0
	beq	.L28
.L11:
	ldr	r3, .L30+32
	mov	r0, r5
	ldr	r1, [r3]
	bl	BIO_new_dgram
	mov	r2, r0
	ldr	r0, [r4, #4]
	mov	r1, r2
	bl	SSL_set_bio
	ldr	r0, [r4, #4]
	bl	SSL_set_accept_state
	ldr	r0, [r4, #4]
	bl	SSL_accept
	ldr	r0, [r4, #4]
	bl	SSL_get_cipher
	mov	r1, r0
	ldr	r0, .L30+36
	bl	printf
	ldr	r3, [r4, #4]
	ldr	r2, .L30+40
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, .L30+44
	cmp	r3, #0
	movne	r2, #0
	andeq	r2, r2, #1
	ldr	r1, [r1]
	and	r3, r3, r1
	orrs	r3, r2, r3
	beq	.L1
	ldr	r0, .L30+48
	bl	puts
.L1:
	ldr	r3, .L30
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L29
	mov	r0, r4
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L28:
	ldr	r3, .L30+52
	ldr	r0, [r3]
	bl	ERR_print_errors_fp
	b	.L11
.L26:
	ldr	r0, .L30+56
	bl	puts
	mov	r0, r6
	bl	exit
	b	.L9
.L22:
	ldr	r0, .L30+60
	bl	perror
	mov	r0, #1
	bl	exit
	b	.L17
.L21:
	ldr	r0, .L30+64
	bl	puts
	mov	r0, #0
	bl	exit
	b	.L3
.L27:
	ldr	r3, .L30+52
	ldr	r0, [r3]
	bl	ERR_print_errors_fp
	ldr	r0, [r4, #4]
	b	.L10
.L25:
	ldr	r3, .L30+52
	ldr	r0, [r3]
	bl	ERR_print_errors_fp
	ldr	r0, [r4, #8]
	b	.L8
.L20:
	ldr	r0, .L30+68
	bl	perror
	mov	r0, #1
	bl	exit
	b	.L2
.L23:
	ldr	r0, .L30+16
	bl	puts
	mov	r0, r7
	bl	exit
	b	.L6
.L24:
	ldr	r0, .L30+16
	bl	puts
	mov	r0, r4
	bl	exit
	b	.L7
.L29:
	bl	__stack_chk_fail
.L31:
	.align	2
.L30:
	.word	.LC9
	.word	SOCK_DGRAM
	.word	IPPROTO_UDP
	.word	AF_INET
	.word	.LC3
	.word	SSL_FILETYPE_PEM
	.word	.LC4
	.word	.LC5
	.word	BIO_NOCLOSE
	.word	.LC7
	.word	SSL_TLSEXT_HB_ENABLED
	.word	SSL_TLSEXT_HB_DONT_SEND_REQUESTS
	.word	.LC8
	.word	stderr
	.word	.LC6
	.word	.LC2
	.word	.LC1
	.word	.LC0
	.size	dtls_server, .-dtls_server
	.comm	stderr,4,4
	.comm	SSL_TLSEXT_HB_ENABLED,4,4
	.comm	SSL_TLSEXT_HB_DONT_SEND_REQUESTS,4,4
	.comm	SSL_FILETYPE_PEM,4,4
	.comm	SOCK_DGRAM,4,4
	.comm	IPPROTO_UDP,4,4
	.comm	BIO_NOCLOSE,4,4
	.comm	AF_INET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
