	.file	"extr_socket.c_connection_allowed.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"checking %s... (allow_dns=%d)"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Incoming %s on '%s' does not match a numeric pattern, and host could not be resolved (err=%s)"
	.section	.rodata.str1.1
.LC2:
	.string	"UNKNOWN"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"LISTENER: cannot validate hostname '%s' from '%s' by resolving it"
	.align 8
.LC4:
	.string	"Incoming ip %s rev-resolved onto %s, validating against forward-resolution %s"
	.align 8
.LC5:
	.string	"LISTENER: Cannot validate '%s' as ip of '%s', not listed in DNS"
	.align 8
.LC6:
	.string	"Incoming connection on '%s' (%s) does not match allowed pattern for %s"
	.text
	.p2align 4
	.globl	connection_allowed
	.type	connection_allowed, @function
connection_allowed:
.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
	.cfi_offset 15, -24
	mov	r15, r9
	push	r14
	.cfi_offset 14, -32
	mov	r14, rdx
	mov	rdx, r9
	push	r13
	.cfi_offset 13, -40
	mov	r13, rsi
	lea	rsi, .LC0[rip]
	push	r12
	.cfi_offset 12, -48
	mov	r12, r8
	push	rbx
	.cfi_offset 3, -56
	mov	ebx, edi
	sub	rsp, 72
	mov	QWORD PTR -88[rbp], rcx
	mov	edi, DWORD PTR D_LISTENER[rip]
	mov	ecx, DWORD PTR 16[rbp]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	call	debug@PLT
	test	r12, r12
	je	.L4
	mov	rsi, r13
	mov	rdi, r12
	call	simple_pattern_matches@PLT
	test	rax, rax
	jne	.L4
	cmp	BYTE PTR [r14], 0
	jne	.L5
	mov	ecx, DWORD PTR 16[rbp]
	test	ecx, ecx
	jne	.L42
.L5:
	mov	rsi, r14
	mov	rdi, r12
	call	simple_pattern_matches@PLT
	test	rax, rax
	je	.L43
.L4:
	mov	eax, 1
.L1:
	mov	rbx, QWORD PTR -56[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L44
	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
.L42:
	.cfi_restore_state
	lea	r10, -72[rbp]
	mov	edi, ebx
	lea	rdx, -68[rbp]
	mov	DWORD PTR -68[rbp], 4
	mov	rsi, r10
	mov	QWORD PTR -96[rbp], r10
	call	getpeername@PLT
	mov	edi, eax
	test	eax, eax
	jne	.L6
	mov	eax, DWORD PTR NI_NAMEREQD[rip]
	sub	rsp, 8
	mov	esi, DWORD PTR -68[rbp]
	mov	rdx, r14
	mov	r10, QWORD PTR -96[rbp]
	mov	ecx, DWORD PTR -88[rbp]
	xor	r9d, r9d
	xor	r8d, r8d
	push	rax
	mov	rdi, r10
	call	getnameinfo@PLT
	mov	edi, eax
	pop	rax
	pop	rdx
	test	edi, edi
	je	.L7
.L6:
	call	gai_strerror@PLT
	mov	rdx, r13
	mov	rsi, r15
	lea	rdi, .LC1[rip]
	mov	ecx, eax
	xor	eax, eax
	call	error@PLT
	cmp	QWORD PTR -88[rbp], 7
	ja	.L11
.L40:
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L43:
	mov	edi, DWORD PTR D_LISTENER[rip]
	mov	r8, r15
	mov	rcx, r14
	mov	rdx, r13
	lea	rsi, .LC6[rip]
	call	debug@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	xor	edx, edx
	xor	esi, esi
	lea	rcx, -64[rbp]
	mov	rdi, r14
	mov	QWORD PTR -64[rbp], 0
	call	getaddrinfo@PLT
	test	rax, rax
	jne	.L45
	mov	r9, QWORD PTR -64[rbp]
	test	r9, r9
	je	.L12
	.p2align 4,,10
	.p2align 3
.L20:
	movsx	rax, DWORD PTR INET6_ADDRSTRLEN[rip]
	mov	rsi, rsp
	mov	rbx, rsp
	mov	rcx, rax
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L14
.L46:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L46
.L14:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L15
	or	QWORD PTR -8[rsp+rdx], 0
.L15:
	mov	BYTE PTR [rsp], 0
	mov	rsi, QWORD PTR 8[r9]
	mov	r8, rsp
	mov	eax, DWORD PTR [rsi]
	cmp	eax, 128
	je	.L16
	cmp	eax, 129
	jne	.L17
	mov	rdx, rsp
	mov	edi, 129
	mov	QWORD PTR -104[rbp], r8
	mov	QWORD PTR -96[rbp], r9
	call	inet_ntop@PLT
	mov	r9, QWORD PTR -96[rbp]
	mov	r8, QWORD PTR -104[rbp]
.L17:
	mov	edi, DWORD PTR D_LISTENER[rip]
	mov	rcx, r14
	mov	rdx, r13
	xor	eax, eax
	lea	rsi, .LC4[rip]
	mov	QWORD PTR -104[rbp], r9
	mov	QWORD PTR -96[rbp], r8
	call	debug@PLT
	mov	r8, QWORD PTR -96[rbp]
	mov	rdi, r13
	mov	rsi, r8
	call	strcmp@PLT
	mov	r9, QWORD PTR -104[rbp]
	test	eax, eax
	je	.L47
	mov	r9, QWORD PTR [r9]
	mov	rsp, rbx
	test	r9, r9
	jne	.L20
.L12:
	xor	eax, eax
	mov	rdx, r14
	lea	rdi, .LC5[rip]
	mov	rsi, r13
	call	error@PLT
	cmp	QWORD PTR -88[rbp], 7
	ja	.L48
.L19:
	mov	rdi, QWORD PTR -64[rbp]
	test	rdi, rdi
	je	.L5
	call	freeaddrinfo@PLT
	jmp	.L5
.L45:
	xor	eax, eax
	mov	rdx, r13
	lea	rdi, .LC3[rip]
	mov	rsi, r14
	call	error@PLT
	cmp	QWORD PTR -88[rbp], 7
	jbe	.L40
	.p2align 4,,10
	.p2align 3
.L11:
	lea	rsi, .LC2[rip]
	mov	rdi, r14
	call	strcpy@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdx, rsp
	mov	edi, 128
	mov	QWORD PTR -104[rbp], r8
	mov	QWORD PTR -96[rbp], r9
	call	inet_ntop@PLT
	mov	r8, QWORD PTR -104[rbp]
	mov	r9, QWORD PTR -96[rbp]
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L47:
	mov	rsp, rbx
	jmp	.L19
.L48:
	lea	rsi, .LC2[rip]
	mov	rdi, r14
	call	strcpy@PLT
	jmp	.L19
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	connection_allowed, .-connection_allowed
	.comm	NI_NAMEREQD,4,4
	.comm	INET6_ADDRSTRLEN,4,4
	.comm	D_LISTENER,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_socket.c_connection_allowed.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"checking %s... (allow_dns=%d)\000"
	.align	2
.LC1:
	.ascii	"Incoming %s on '%s' does not match a numeric patter"
	.ascii	"n, and host could not be resolved (err=%s)\000"
	.align	2
.LC2:
	.ascii	"UNKNOWN\000"
	.align	2
.LC3:
	.ascii	"LISTENER: cannot validate hostname '%s' from '%s' b"
	.ascii	"y resolving it\000"
	.align	2
.LC4:
	.ascii	"Incoming ip %s rev-resolved onto %s, validating aga"
	.ascii	"inst forward-resolution %s\000"
	.align	2
.LC5:
	.ascii	"LISTENER: Cannot validate '%s' as ip of '%s', not l"
	.ascii	"isted in DNS\000"
	.align	2
.LC6:
	.ascii	"Incoming connection on '%s' (%s) does not match all"
	.ascii	"owed pattern for %s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	connection_allowed
	.syntax unified
	.arm
	.fpu softvfp
	.type	connection_allowed, %function
connection_allowed:
	@ args = 12, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	ip, r3
	add	fp, sp, #32
	sub	sp, sp, #44
	ldr	r10, [fp, #8]
	ldr	r7, [fp, #12]
	mov	r5, r1
	ldr	r1, .L36
	str	ip, [fp, #-56]
	ldr	r9, [fp, #4]
	ldr	ip, .L36+4
	mov	r8, r0
	mov	r6, r2
	ldr	r0, [r1]
	mov	r2, r10
	mov	r3, r7
	ldr	r1, .L36+8
	ldr	ip, [ip]
	str	ip, [fp, #-40]
	mov	ip,#0
	bl	debug
	cmp	r9, #0
	beq	.L4
	mov	r1, r5
	mov	r0, r9
	bl	simple_pattern_matches
	subs	r4, r0, #0
	bne	.L4
	ldrb	r3, [r6]	@ zero_extendqisi2
	subs	r7, r7, #0
	movne	r7, #1
	cmp	r3, #0
	movne	r7, #0
	cmp	r7, #0
	bne	.L32
.L5:
	mov	r0, r9
	mov	r1, r6
	bl	simple_pattern_matches
	subs	r4, r0, #0
	beq	.L33
.L4:
	mov	r4, #1
.L1:
	ldr	r3, .L36+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L34
	mov	r0, r4
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L33:
	ldr	r3, .L36
	mov	r2, r5
	ldr	r0, [r3]
	ldr	r1, .L36+12
	mov	r3, r6
	str	r10, [sp]
	bl	debug
	b	.L1
.L32:
	mov	r3, #4
	mov	r0, r8
	sub	r1, fp, #52
	sub	r2, fp, #48
	str	r3, [fp, #-48]
	bl	getpeername
	cmp	r0, #0
	bne	.L6
	ldr	r3, .L36+16
	ldr	r1, [fp, #-48]
	ldr	r3, [r3]
	str	r4, [sp, #4]
	str	r3, [sp, #8]
	str	r4, [sp]
	mov	r2, r6
	ldr	r3, [fp, #-56]
	sub	r0, fp, #52
	bl	getnameinfo
	cmp	r0, #0
	beq	.L7
.L6:
	bl	gai_strerror
	mov	r2, r5
	mov	r3, r0
	mov	r1, r10
	ldr	r0, .L36+20
	bl	error
	ldr	r3, [fp, #-56]
	cmp	r3, #7
	bls	.L1
.L11:
	mov	r0, r6
	mov	r2, #8
	ldr	r1, .L36+24
	bl	memcpy
	b	.L1
.L7:
	mov	r2, r4
	mov	r1, r4
	mov	r0, r6
	sub	r3, fp, #44
	str	r4, [fp, #-44]
	bl	getaddrinfo
	cmp	r0, #0
	bne	.L35
	ldr	r7, [fp, #-44]
	cmp	r7, #0
	beq	.L12
	str	r0, [fp, #-60]
	b	.L17
.L15:
	ldr	r7, [r7]
	mov	sp, r8
	cmp	r7, #0
	beq	.L12
.L17:
	ldr	r3, .L36+28
	mov	r8, sp
	ldr	r3, [r3]
	add	r2, r3, #7
	bic	r2, r2, #7
	sub	sp, sp, r2
	ldr	r2, [fp, #-60]
	add	r4, sp, #16
	strb	r2, [sp, #16]
	ldr	r1, [r7, #4]
	ldr	r0, [r1]
	cmp	r0, #128
	beq	.L13
	cmp	r0, #129
	bne	.L14
.L13:
	mov	r2, r4
	bl	inet_ntop
.L14:
	ldr	r3, .L36
	mov	r2, r5
	ldr	r0, [r3]
	ldr	r1, .L36+32
	mov	r3, r6
	str	r4, [sp]
	bl	debug
	mov	r1, r4
	mov	r0, r5
	bl	strcmp
	cmp	r0, #0
	bne	.L15
	mov	sp, r8
.L16:
	ldr	r0, [fp, #-44]
	cmp	r0, #0
	beq	.L5
	bl	freeaddrinfo
	b	.L5
.L12:
	mov	r2, r6
	mov	r1, r5
	ldr	r0, .L36+36
	bl	error
	ldr	r3, [fp, #-56]
	cmp	r3, #7
	bls	.L16
	mov	r2, #8
	mov	r0, r6
	ldr	r1, .L36+24
	bl	memcpy
	b	.L16
.L35:
	mov	r2, r5
	mov	r1, r6
	ldr	r0, .L36+40
	bl	error
	ldr	r3, [fp, #-56]
	cmp	r3, #7
	bls	.L1
	b	.L11
.L34:
	bl	__stack_chk_fail
.L37:
	.align	2
.L36:
	.word	D_LISTENER
	.word	.LC7
	.word	.LC0
	.word	.LC6
	.word	NI_NAMEREQD
	.word	.LC1
	.word	.LC2
	.word	INET6_ADDRSTRLEN
	.word	.LC4
	.word	.LC5
	.word	.LC3
	.size	connection_allowed, .-connection_allowed
	.comm	NI_NAMEREQD,4,4
	.comm	INET6_ADDRSTRLEN,4,4
	.comm	D_LISTENER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
