	.file	"extr_Server.c_SiLoadIPsec.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"IPsec_Secret"
.LC1:
	.string	"L2TP_DefaultHub"
.LC2:
	.string	"L2TP_Raw"
.LC3:
	.string	"L2TP_IPsec"
.LC4:
	.string	"EtherIP_IPsec"
.LC5:
	.string	"EtherIP_IDSettingsList"
.LC6:
	.string	"HubName"
.LC7:
	.string	"UserName"
.LC8:
	.string	"EncryptedPassword"
	.text
	.p2align 4
	.globl	SiLoadIPsec
	.type	SiLoadIPsec, @function
SiLoadIPsec:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 136
	.cfi_def_cfa_offset 192
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 120[rsp], rax
	xor	eax, eax
	test	rdi, rdi
	je	.L1
	mov	rbp, rsi
	test	rsi, rsi
	je	.L1
	lea	r13, 16[rsp]
	mov	esi, 48
	mov	r12, rdi
	mov	rdi, r13
	call	Zero@PLT
	mov	edx, DWORD PTR 60[rsp]
	mov	ecx, 4
	mov	rdi, rbp
	lea	rsi, .LC0[rip]
	call	CfgGetStr@PLT
	mov	edx, DWORD PTR 56[rsp]
	mov	ecx, 4
	mov	rdi, rbp
	lea	rsi, .LC1[rip]
	call	CfgGetStr@PLT
	mov	rax, QWORD PTR SERVER_TYPE_STANDALONE[rip]
	cmp	QWORD PTR [r12], rax
	je	.L25
.L4:
	mov	edi, DWORD PTR 8[r12]
	mov	rsi, r13
	call	IPsecServerSetServices@PLT
	lea	rsi, .LC5[rip]
	mov	rdi, rbp
	call	CfgGetFolder@PLT
	mov	r13, rax
	test	rax, rax
	je	.L1
	mov	rdi, rax
	call	CfgEnumFolderToTokenList@PLT
	mov	r15, rax
	test	rax, rax
	je	.L1
	cmp	QWORD PTR [rax], 0
	je	.L8
	lea	rax, 64[rsp]
	xor	ebx, ebx
	mov	QWORD PTR [rsp], rax
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR 8[r15]
	mov	rdi, r13
	mov	r14, QWORD PTR [rax+rbx*8]
	mov	rsi, r14
	call	CfgGetFolder@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L9
	mov	rdi, QWORD PTR [rsp]
	mov	esi, 48
	call	Zero@PLT
	mov	edi, DWORD PTR 76[rsp]
	mov	rdx, r14
	mov	esi, 4
	call	StrCpy@PLT
	mov	edx, DWORD PTR 72[rsp]
	mov	rdi, rbp
	mov	ecx, 4
	lea	rsi, .LC6[rip]
	call	CfgGetStr@PLT
	mov	edx, DWORD PTR 68[rsp]
	mov	rdi, rbp
	mov	ecx, 4
	lea	rsi, .LC7[rip]
	call	CfgGetStr@PLT
	mov	rdi, rbp
	lea	rsi, .LC8[rip]
	call	CfgGetBuf@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L9
	mov	rdi, rax
	call	DecryptPassword2@PLT
	mov	edi, DWORD PTR 64[rsp]
	mov	esi, 4
	mov	rdx, rax
	mov	QWORD PTR 8[rsp], rax
	call	StrCpy@PLT
	mov	r8, QWORD PTR 8[rsp]
	mov	rdi, r8
	call	Free@PLT
	mov	edi, DWORD PTR 8[r12]
	mov	rsi, QWORD PTR [rsp]
	call	AddEtherIPId@PLT
	mov	rdi, rbp
	call	FreeBuf@PLT
.L9:
	add	rbx, 1
	cmp	QWORD PTR [r15], rbx
	ja	.L11
.L8:
	mov	rdi, r15
	call	FreeToken@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 120[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L26
	add	rsp, 136
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	lea	rsi, .LC2[rip]
	mov	rdi, rbp
	call	CfgGetBool@PLT
	lea	rsi, .LC3[rip]
	mov	rdi, rbp
	mov	QWORD PTR 48[rsp], rax
	call	CfgGetBool@PLT
	lea	rsi, .LC4[rip]
	mov	rdi, rbp
	mov	QWORD PTR 40[rsp], rax
	call	CfgGetBool@PLT
	mov	QWORD PTR 32[rsp], rax
	jmp	.L4
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	SiLoadIPsec, .-SiLoadIPsec
	.comm	SERVER_TYPE_STANDALONE,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_Server.c_SiLoadIPsec.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"IPsec_Secret\000"
	.align	2
.LC1:
	.ascii	"L2TP_DefaultHub\000"
	.align	2
.LC2:
	.ascii	"L2TP_Raw\000"
	.align	2
.LC3:
	.ascii	"L2TP_IPsec\000"
	.align	2
.LC4:
	.ascii	"EtherIP_IPsec\000"
	.align	2
.LC5:
	.ascii	"EtherIP_IDSettingsList\000"
	.align	2
.LC6:
	.ascii	"HubName\000"
	.align	2
.LC7:
	.ascii	"UserName\000"
	.align	2
.LC8:
	.ascii	"EncryptedPassword\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	SiLoadIPsec
	.syntax unified
	.arm
	.fpu softvfp
	.type	SiLoadIPsec, %function
SiLoadIPsec:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #0
	cmpne	r0, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L30
	sub	sp, sp, #92
	ldr	r3, [r3]
	str	r3, [sp, #84]
	mov	r3,#0
	bne	.L27
.L1:
	ldr	r3, .L30
	ldr	r2, [r3]
	ldr	r3, [sp, #84]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L28
	add	sp, sp, #92
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L27:
	mov	r4, r1
	mov	r5, r0
	mov	r1, #36
	add	r0, sp, #12
	bl	Zero
	mov	r3, #4
	ldr	r2, [sp, #44]
	ldr	r1, .L30+4
	mov	r0, r4
	bl	CfgGetStr
	mov	r3, #4
	ldr	r2, [sp, #40]
	mov	r0, r4
	ldr	r1, .L30+8
	bl	CfgGetStr
	ldr	r3, .L30+12
	ldr	r2, [r5]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L29
.L3:
	add	r1, sp, #12
	ldr	r0, [r5, #4]
	bl	IPsecServerSetServices
	mov	r0, r4
	ldr	r1, .L30+16
	bl	CfgGetFolder
	subs	r7, r0, #0
	beq	.L1
	bl	CfgEnumFolderToTokenList
	subs	r6, r0, #0
	beq	.L1
	ldr	r3, [r6]
	cmp	r3, #0
	beq	.L7
	mov	r4, #0
	ldr	r10, .L30+20
	ldr	r9, .L30+24
.L10:
	ldr	r3, [r6, #4]
	mov	r0, r7
	ldr	r8, [r3, r4, lsl #2]
	mov	r1, r8
	bl	CfgGetFolder
	subs	fp, r0, #0
	beq	.L8
	mov	r1, #36
	add	r0, sp, #48
	bl	Zero
	mov	r2, r8
	mov	r1, #4
	ldr	r0, [sp, #60]
	bl	StrCpy
	mov	r3, #4
	mov	r1, r10
	mov	r0, fp
	ldr	r2, [sp, #56]
	bl	CfgGetStr
	mov	r3, #4
	mov	r1, r9
	mov	r0, fp
	ldr	r2, [sp, #52]
	bl	CfgGetStr
	mov	r0, fp
	ldr	r1, .L30+28
	bl	CfgGetBuf
	subs	fp, r0, #0
	beq	.L8
	bl	DecryptPassword2
	mov	r1, #4
	mov	r2, r0
	str	r0, [sp, #4]
	ldr	r0, [sp, #48]
	bl	StrCpy
	ldr	r2, [sp, #4]
	mov	r0, r2
	bl	Free
	ldr	r0, [r5, #4]
	add	r1, sp, #48
	bl	AddEtherIPId
	mov	r0, fp
	bl	FreeBuf
.L8:
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	bhi	.L10
.L7:
	mov	r0, r6
	bl	FreeToken
	b	.L1
.L29:
	ldr	r1, .L30+32
	mov	r0, r4
	bl	CfgGetBool
	mov	r3, r0
	ldr	r1, .L30+36
	mov	r0, r4
	str	r3, [sp, #36]
	bl	CfgGetBool
	mov	r3, r0
	ldr	r1, .L30+40
	mov	r0, r4
	str	r3, [sp, #32]
	bl	CfgGetBool
	str	r0, [sp, #28]
	b	.L3
.L28:
	bl	__stack_chk_fail
.L31:
	.align	2
.L30:
	.word	.LC9
	.word	.LC0
	.word	.LC1
	.word	SERVER_TYPE_STANDALONE
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	SiLoadIPsec, .-SiLoadIPsec
	.comm	SERVER_TYPE_STANDALONE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
