	.file	"extr_Cfg.c_NewCfgRwEx2W.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	NewCfgRwEx2W
	.type	NewCfgRwEx2W, @function
NewCfgRwEx2W:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	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
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	test	rsi, rsi
	je	.L8
	mov	rbx, rdi
	test	rdi, rdi
	je	.L8
	mov	rdi, rsi
	mov	rbp, rsi
	mov	r14d, edx
	mov	r12, rcx
	call	CfgReadW@PLT
	mov	r13, rax
	test	rax, rax
	je	.L11
	mov	edi, 40
	call	ZeroMalloc@PLT
	mov	rdi, rbp
	mov	r12, rax
	call	CopyUniStr@PLT
	mov	rdi, rbp
	mov	QWORD PTR 32[r12], rax
	call	CopyUniToStr@PLT
	xor	esi, esi
	mov	rdi, rbp
	mov	QWORD PTR 24[r12], rax
	call	FileOpenW@PLT
	mov	QWORD PTR 16[r12], rax
.L7:
	xor	eax, eax
	call	NewLock@PLT
	mov	QWORD PTR 8[r12], rax
	mov	rax, r12
	mov	QWORD PTR [rbx], r13
	mov	DWORD PTR [r12], r14d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L11:
	.cfi_restore_state
	mov	rdi, r12
	call	UniIsEmptyStr@PLT
	test	eax, eax
	jne	.L6
	mov	rdi, r12
	call	CfgReadW@PLT
	mov	r13, rax
	test	rax, rax
	je	.L6
	mov	edi, 40
	call	ZeroMalloc@PLT
	mov	rdi, rbp
	mov	r12, rax
	call	CopyUniStr@PLT
	mov	rdi, rbp
	mov	QWORD PTR 32[r12], rax
	call	CopyUniToStr@PLT
	mov	rdi, rbp
	mov	QWORD PTR 24[r12], rax
	call	FileCreateW@PLT
	mov	QWORD PTR 16[r12], rax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	xor	r12d, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	rax, r12
	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
.L6:
	.cfi_restore_state
	mov	edi, 40
	call	ZeroMalloc@PLT
	mov	r12, rax
	xor	eax, eax
	call	NewLock@PLT
	mov	rdi, rbp
	mov	QWORD PTR 8[r12], rax
	call	CopyUniStr@PLT
	mov	rdi, rbp
	mov	QWORD PTR 32[r12], rax
	call	CopyUniToStr@PLT
	mov	rdi, rbp
	mov	QWORD PTR 24[r12], rax
	call	FileCreateW@PLT
	mov	QWORD PTR 16[r12], rax
	mov	rax, r12
	mov	QWORD PTR [rbx], 0
	mov	DWORD PTR [r12], r14d
	pop	rbx
	.cfi_def_cfa_offset 40
	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
	.cfi_endproc
.LFE0:
	.size	NewCfgRwEx2W, .-NewCfgRwEx2W
	.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_Cfg.c_NewCfgRwEx2W.c"
	.text
	.align	2
	.global	NewCfgRwEx2W
	.syntax unified
	.arm
	.fpu softvfp
	.type	NewCfgRwEx2W, %function
NewCfgRwEx2W:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	clz	ip, r0
	cmp	r1, #0
	lsr	ip, ip, #5
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	movne	r7, ip
	moveq	r7, #1
	cmp	r7, #0
	movne	r4, #0
	bne	.L1
	mov	r6, r0
	mov	r0, r1
	mov	r8, r2
	mov	r4, r3
	mov	r5, r1
	bl	CfgReadW
	subs	r9, r0, #0
	beq	.L11
	mov	r0, #20
	bl	ZeroMalloc
	mov	r4, r0
	mov	r0, r5
	bl	CopyUniStr
	str	r0, [r4, #16]
	mov	r0, r5
	bl	CopyUniToStr
	mov	r1, r7
	str	r0, [r4, #12]
	mov	r0, r5
	bl	FileOpenW
	str	r0, [r4, #8]
.L7:
	bl	NewLock
	str	r0, [r4, #4]
	str	r9, [r6]
	str	r8, [r4]
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	mov	r0, r4
	bl	UniIsEmptyStr
	cmp	r0, #0
	bne	.L6
	mov	r0, r4
	bl	CfgReadW
	subs	r9, r0, #0
	beq	.L6
	mov	r0, #20
	bl	ZeroMalloc
	mov	r4, r0
	mov	r0, r5
	bl	CopyUniStr
	str	r0, [r4, #16]
	mov	r0, r5
	bl	CopyUniToStr
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #12]
	bl	FileCreateW
	str	r0, [r4, #8]
	b	.L7
.L6:
	mov	r0, #20
	bl	ZeroMalloc
	mov	r4, r0
	bl	NewLock
	str	r0, [r4, #4]
	mov	r0, r5
	bl	CopyUniStr
	str	r0, [r4, #16]
	mov	r0, r5
	bl	CopyUniToStr
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #12]
	bl	FileCreateW
	mov	r3, #0
	str	r0, [r4, #8]
	str	r3, [r6]
	mov	r0, r4
	str	r8, [r4]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
	.size	NewCfgRwEx2W, .-NewCfgRwEx2W
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
