	.file	"extr_registry.c_test_reg_create_key.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Subkey1"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"RegCreateKeyExA failed with error %d\n"
	.section	.rodata.str1.1
.LC2:
	.string	"Subkey2"
.LC3:
	.string	""
.LC4:
	.string	"Volatile"
.LC5:
	.string	"\\Subkey3"
	.section	.rodata.str1.8
	.align 8
.LC6:
	.string	"expected ERROR_BAD_PATHNAME, got %d\n"
	.section	.rodata.str1.1
.LC7:
	.string	"Subkey4\\\\"
	.section	.rodata.str1.8
	.align 8
.LC8:
	.string	"System\\CurrentControlSet\\Control\\Video\\Wine"
	.section	.rodata.str1.1
.LC9:
	.string	"Software"
	.section	.rodata.str1.8
	.align 8
.LC10:
	.string	"RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\n"
	.align 8
.LC11:
	.string	"RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\n"
	.align 8
.LC12:
	.string	"WOW64 flags are not recognized\n"
	.section	.rodata.str1.1
.LC13:
	.string	"Software\\Wine"
	.section	.rodata.str1.8
	.align 8
.LC14:
	.string	"RegCreateKeyEx with KEY_WOW64_32KEY failed (err=%d)\n"
	.align 8
.LC15:
	.string	"RegCreateKeyEx with KEY_WOW64_64KEY failed (err=%d)\n"
	.align 8
.LC16:
	.string	"Expected AllocateAndInitializeSid to return TRUE, got %d, last error %u\n"
	.align 8
.LC17:
	.string	"Expected SetEntriesInAclA to return ERROR_SUCCESS, got %u, last error %u\n"
	.align 8
.LC18:
	.string	"Expected InitializeSecurityDescriptor to return TRUE, got %d, last error %u\n"
	.align 8
.LC19:
	.string	"Expected SetSecurityDescriptorDacl to return TRUE, got %d, last error %u\n"
	.align 8
.LC20:
	.string	"not enough privileges to modify HKLM\n"
	.align 8
.LC21:
	.string	"Expected RegSetKeySecurity to return success, got error %u\n"
	.text
	.p2align 4
	.type	test_reg_create_key, @function
test_reg_create_key:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	r8d, r8d
	xor	ecx, ecx
	xor	edx, edx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	lea	rsi, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	add	rsp, -128
	.cfi_def_cfa_offset 168
	mov	r9d, DWORD PTR KEY_NOTIFY[rip]
	mov	rdi, QWORD PTR hkey_main[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 112[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR SECURITY_WORLD_SID_AUTHORITY[rip]
	mov	QWORD PTR 32[rsp], 0
	mov	QWORD PTR 40[rsp], 0
	mov	DWORD PTR 8[rsp], eax
	push	0
	.cfi_def_cfa_offset 176
	lea	rbx, 24[rsp]
	push	rbx
	.cfi_def_cfa_offset 184
	push	0
	.cfi_def_cfa_offset 192
	call	RegCreateKeyExA@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 160
	xor	edi, edi
	lea	rsi, .LC1[rip]
	test	rax, rax
	mov	rdx, rax
	sete	dil
	xor	eax, eax
	call	ok@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	xor	r8d, r8d
	xor	ecx, ecx
	push	0
	.cfi_def_cfa_offset 176
	mov	r9d, DWORD PTR KEY_SET_VALUE[rip]
	xor	edx, edx
	lea	rsi, .LC2[rip]
	lea	r12, 32[rsp]
	push	r12
	.cfi_def_cfa_offset 184
	push	0
	.cfi_def_cfa_offset 192
	mov	rdi, QWORD PTR 40[rsp]
	call	RegCreateKeyExA@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 160
	xor	edi, edi
	lea	rsi, .LC1[rip]
	test	rax, rax
	mov	rdx, rax
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR 16[rsp]
	lea	rsi, .LC3[rip]
	call	RegDeleteKeyA@PLT
	mov	rdi, QWORD PTR 8[rsp]
	lea	rsi, .LC3[rip]
	call	RegDeleteKeyA@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	RegCloseKey@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	RegCloseKey@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	xor	ecx, ecx
	xor	edx, edx
	push	0
	.cfi_def_cfa_offset 176
	mov	r9d, DWORD PTR KEY_ALL_ACCESS[rip]
	lea	rsi, .LC4[rip]
	mov	r8d, DWORD PTR REG_OPTION_VOLATILE[rip]
	mov	rdi, QWORD PTR hkey_main[rip]
	push	rbx
	.cfi_def_cfa_offset 184
	push	0
	.cfi_def_cfa_offset 192
	call	RegCreateKeyExA@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 160
	xor	edi, edi
	lea	rsi, .LC1[rip]
	test	rax, rax
	mov	rdx, rax
	sete	dil
	xor	eax, eax
	call	ok@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	xor	edx, edx
	xor	r8d, r8d
	push	0
	.cfi_def_cfa_offset 176
	mov	r9d, DWORD PTR KEY_ALL_ACCESS[rip]
	xor	ecx, ecx
	lea	rsi, .LC2[rip]
	push	r12
	.cfi_def_cfa_offset 184
	push	0
	.cfi_def_cfa_offset 192
	mov	rdi, QWORD PTR 40[rsp]
	call	RegCreateKeyExA@PLT
	xor	edi, edi
	add	rsp, 32
	.cfi_def_cfa_offset 160
	cmp	QWORD PTR ERROR_CHILD_MUST_BE_VOLATILE[rip], rax
	mov	rbp, rax
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	lea	rsi, .LC1[rip]
	call	ok@PLT
	test	rbp, rbp
	je	.L34
.L2:
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	mov	r9d, DWORD PTR KEY_ALL_ACCESS[rip]
	xor	ecx, ecx
	xor	edx, edx
	push	0
	.cfi_def_cfa_offset 176
	mov	r8d, DWORD PTR REG_OPTION_VOLATILE[rip]
	lea	rsi, .LC2[rip]
	push	r12
	.cfi_def_cfa_offset 184
	push	0
	.cfi_def_cfa_offset 192
	mov	rdi, QWORD PTR 40[rsp]
	call	RegCreateKeyExA@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 160
	xor	edi, edi
	lea	rsi, .LC1[rip]
	test	rax, rax
	mov	rdx, rax
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	RegCloseKey@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	xor	r8d, r8d
	xor	ecx, ecx
	push	0
	.cfi_def_cfa_offset 176
	mov	r9d, DWORD PTR KEY_ALL_ACCESS[rip]
	xor	edx, edx
	lea	rsi, .LC2[rip]
	push	r12
	.cfi_def_cfa_offset 184
	push	0
	.cfi_def_cfa_offset 192
	mov	rdi, QWORD PTR 40[rsp]
	call	RegCreateKeyExA@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 160
	xor	edi, edi
	lea	rsi, .LC1[rip]
	test	rax, rax
	mov	rdx, rax
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR 16[rsp]
	lea	rsi, .LC3[rip]
	call	RegDeleteKeyA@PLT
	mov	rdi, QWORD PTR 8[rsp]
	lea	rsi, .LC3[rip]
	call	RegDeleteKeyA@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	RegCloseKey@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	RegCloseKey@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	xor	r8d, r8d
	xor	ecx, ecx
	push	0
	.cfi_def_cfa_offset 176
	mov	r9d, DWORD PTR KEY_NOTIFY[rip]
	xor	edx, edx
	lea	rsi, .LC5[rip]
	push	rbx
	.cfi_def_cfa_offset 184
	mov	rdi, QWORD PTR hkey_main[rip]
	push	0
	.cfi_def_cfa_offset 192
	call	RegCreateKeyExA@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 160
	mov	r12, rax
	xor	eax, eax
	call	GetVersion@PLT
	test	eax, eax
	js	.L3
	xor	edi, edi
	cmp	QWORD PTR ERROR_BAD_PATHNAME[rip], r12
	mov	rdx, r12
	sete	dil
	lea	rsi, .LC6[rip]
	xor	eax, eax
	call	ok@PLT
.L4:
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	mov	r9d, DWORD PTR KEY_NOTIFY[rip]
	xor	r8d, r8d
	xor	ecx, ecx
	push	0
	.cfi_def_cfa_offset 176
	mov	rdi, QWORD PTR hkey_main[rip]
	xor	edx, edx
	lea	rsi, .LC7[rip]
	push	rbx
	.cfi_def_cfa_offset 184
	push	0
	.cfi_def_cfa_offset 192
	call	RegCreateKeyExA@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 160
	xor	edi, edi
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	sete	dil
	mov	rdx, rax
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR 8[rsp]
	lea	rsi, .LC3[rip]
	call	RegDeleteKeyA@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	RegCloseKey@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	xor	r8d, r8d
	xor	ecx, ecx
	push	0
	.cfi_def_cfa_offset 176
	mov	r9d, DWORD PTR KEY_NOTIFY[rip]
	xor	edx, edx
	lea	rsi, .LC8[rip]
	push	rbx
	.cfi_def_cfa_offset 184
	mov	rdi, QWORD PTR HKEY_LOCAL_MACHINE[rip]
	push	0
	.cfi_def_cfa_offset 192
	call	RegCreateKeyExA@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 160
	xor	edi, edi
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	sete	dil
	mov	rdx, rax
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR 8[rsp]
	lea	rsi, .LC3[rip]
	call	RegDeleteKeyA@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	RegCloseKey@PLT
	mov	rdi, QWORD PTR HKEY_LOCAL_MACHINE[rip]
	xor	ecx, ecx
	xor	edx, edx
	mov	QWORD PTR 8[rsp], 0
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	mov	r9d, DWORD PTR KEY_READ[rip]
	xor	r8d, r8d
	push	0
	.cfi_def_cfa_offset 176
	or	r9d, DWORD PTR KEY_WOW64_32KEY[rip]
	lea	rsi, .LC9[rip]
	push	rbx
	.cfi_def_cfa_offset 184
	push	0
	.cfi_def_cfa_offset 192
	call	RegCreateKeyExA@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 160
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	mov	r12, rax
	jne	.L5
	cmp	QWORD PTR 8[rsp], 0
	mov	edi, 1
	je	.L5
.L6:
	mov	rdx, r12
	lea	rsi, .LC10[rip]
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	RegCloseKey@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	xor	r8d, r8d
	xor	ecx, ecx
	mov	rdi, QWORD PTR HKEY_LOCAL_MACHINE[rip]
	mov	r9d, DWORD PTR KEY_READ[rip]
	xor	edx, edx
	mov	QWORD PTR 16[rsp], 0
	push	0
	.cfi_def_cfa_offset 176
	or	r9d, DWORD PTR KEY_WOW64_64KEY[rip]
	lea	rsi, .LC9[rip]
	push	rbx
	.cfi_def_cfa_offset 184
	push	0
	.cfi_def_cfa_offset 192
	call	RegCreateKeyExA@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 160
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	mov	r12, rax
	jne	.L7
	cmp	QWORD PTR 8[rsp], 0
	mov	edi, 1
	je	.L7
.L8:
	mov	rdx, r12
	lea	rsi, .LC11[rip]
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	RegCloseKey@PLT
	mov	eax, DWORD PTR pIsWow64Process[rip]
	test	eax, eax
	je	.L35
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	mov	rdi, QWORD PTR HKEY_LOCAL_MACHINE[rip]
	xor	edx, edx
	xor	r8d, r8d
	push	0
	.cfi_def_cfa_offset 176
	mov	r9d, DWORD PTR KEY_WOW64_32KEY[rip]
	xor	ecx, ecx
	lea	rsi, .LC13[rip]
	or	r9d, DWORD PTR KEY_ALL_ACCESS[rip]
	lea	rax, 48[rsp]
	push	rax
	.cfi_def_cfa_offset 184
	push	0
	.cfi_def_cfa_offset 192
	call	RegCreateKeyExA@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 160
	xor	edi, edi
	cmp	QWORD PTR limited_user[rip], 0
	mov	rdx, rax
	je	.L11
	cmp	QWORD PTR ERROR_ACCESS_DENIED[rip], rax
	jne	.L14
	xor	edi, edi
	cmp	QWORD PTR 32[rsp], 0
	sete	dil
	.p2align 4,,10
	.p2align 3
.L14:
	lea	rsi, .LC14[rip]
	xor	eax, eax
	call	ok@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	xor	edx, edx
	xor	r8d, r8d
	push	0
	.cfi_def_cfa_offset 176
	mov	rdi, QWORD PTR HKEY_LOCAL_MACHINE[rip]
	xor	ecx, ecx
	lea	rsi, .LC13[rip]
	mov	r9d, DWORD PTR KEY_WOW64_64KEY[rip]
	or	r9d, DWORD PTR KEY_ALL_ACCESS[rip]
	lea	rax, 40[rsp]
	push	rax
	.cfi_def_cfa_offset 184
	push	0
	.cfi_def_cfa_offset 192
	call	RegCreateKeyExA@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 160
	xor	edi, edi
	cmp	QWORD PTR limited_user[rip], 0
	mov	rdx, rax
	je	.L15
	cmp	QWORD PTR ERROR_ACCESS_DENIED[rip], rax
	jne	.L18
	xor	edi, edi
	cmp	QWORD PTR 24[rsp], 0
	sete	dil
	.p2align 4,,10
	.p2align 3
.L18:
	lea	rsi, .LC15[rip]
	xor	eax, eax
	call	ok@PLT
	mov	rdi, rsp
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	xor	r9d, r9d
	lea	rax, 48[rsp]
	mov	edx, DWORD PTR SECURITY_WORLD_RID[rip]
	xor	r8d, r8d
	xor	ecx, ecx
	push	rax
	.cfi_def_cfa_offset 176
	mov	esi, 1
	push	0
	.cfi_def_cfa_offset 184
	push	0
	.cfi_def_cfa_offset 192
	push	0
	.cfi_def_cfa_offset 200
	push	0
	.cfi_def_cfa_offset 208
	call	AllocateAndInitializeSid@PLT
	add	rsp, 48
	.cfi_def_cfa_offset 160
	mov	r12, rax
	xor	eax, eax
	call	GetLastError@PLT
	xor	edi, edi
	mov	rdx, r12
	cmp	QWORD PTR TRUE[rip], r12
	sete	dil
	mov	ecx, eax
	lea	rsi, .LC16[rip]
	xor	eax, eax
	call	ok@PLT
	mov	eax, DWORD PTR GENERIC_ALL[rip]
	or	eax, DWORD PTR STANDARD_RIGHTS_ALL[rip]
	xor	edx, edx
	mov	DWORD PTR 48[rsp], eax
	mov	eax, DWORD PTR SET_ACCESS[rip]
	lea	rcx, 4[rsp]
	lea	rsi, 48[rsp]
	mov	QWORD PTR 80[rsp], 0
	mov	edi, 1
	mov	DWORD PTR 92[rsp], eax
	mov	eax, DWORD PTR SUB_CONTAINERS_AND_OBJECTS_INHERIT[rip]
	mov	DWORD PTR 88[rsp], eax
	mov	eax, DWORD PTR NO_MULTIPLE_TRUSTEE[rip]
	mov	DWORD PTR 72[rsp], eax
	mov	eax, DWORD PTR TRUSTEE_IS_SID[rip]
	mov	DWORD PTR 68[rsp], eax
	mov	eax, DWORD PTR TRUSTEE_IS_WELL_KNOWN_GROUP[rip]
	mov	DWORD PTR 64[rsp], eax
	mov	rax, QWORD PTR 40[rsp]
	mov	QWORD PTR 56[rsp], rax
	call	SetEntriesInAclA@PLT
	mov	r12, rax
	xor	eax, eax
	call	GetLastError@PLT
	xor	edi, edi
	mov	rdx, r12
	cmp	QWORD PTR ERROR_SUCCESS[rip], r12
	sete	dil
	mov	ecx, eax
	lea	rsi, .LC17[rip]
	xor	eax, eax
	call	ok@PLT
	mov	r12d, DWORD PTR SECURITY_DESCRIPTOR_MIN_LENGTH[rip]
	xor	eax, eax
	call	GetProcessHeap@PLT
	xor	esi, esi
	mov	edx, r12d
	mov	edi, eax
	call	HeapAlloc@PLT
	mov	esi, DWORD PTR SECURITY_DESCRIPTOR_REVISION[rip]
	mov	rdi, rax
	mov	r12, rax
	call	InitializeSecurityDescriptor@PLT
	mov	r13, rax
	xor	eax, eax
	call	GetLastError@PLT
	xor	edi, edi
	mov	rdx, r13
	cmp	QWORD PTR TRUE[rip], r13
	sete	dil
	mov	ecx, eax
	lea	rsi, .LC18[rip]
	xor	eax, eax
	call	ok@PLT
	mov	ecx, DWORD PTR FALSE[rip]
	mov	edx, DWORD PTR 4[rsp]
	mov	rdi, r12
	mov	rsi, QWORD PTR TRUE[rip]
	call	SetSecurityDescriptorDacl@PLT
	mov	r13, rax
	xor	eax, eax
	call	GetLastError@PLT
	xor	edi, edi
	mov	rdx, r13
	cmp	QWORD PTR TRUE[rip], r13
	sete	dil
	mov	ecx, eax
	lea	rsi, .LC19[rip]
	xor	eax, eax
	call	ok@PLT
	cmp	QWORD PTR limited_user[rip], 0
	je	.L19
	lea	rdi, .LC20[rip]
	call	skip@PLT
.L20:
	xor	eax, eax
	call	GetProcessHeap@PLT
	mov	rdx, r12
	xor	esi, esi
	mov	edi, eax
	call	HeapFree@PLT
	mov	edi, DWORD PTR 4[rsp]
	call	LocalFree@PLT
	mov	rdi, QWORD PTR 40[rsp]
	call	FreeSid@PLT
	mov	rdi, QWORD PTR 24[rsp]
	lea	rsi, .LC3[rip]
	call	RegDeleteKeyA@PLT
	mov	rdi, QWORD PTR 24[rsp]
	call	RegCloseKey@PLT
	mov	rdi, QWORD PTR 32[rsp]
	lea	rsi, .LC3[rip]
	call	RegDeleteKeyA@PLT
	mov	rdi, QWORD PTR 32[rsp]
	call	RegCloseKey@PLT
.L1:
	mov	rax, QWORD PTR 104[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L36
	add	rsp, 120
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	xor	edi, edi
	cmp	QWORD PTR ERROR_ACCESS_DENIED[rip], r12
	sete	dil
	call	broken@PLT
	xor	edi, edi
	test	rax, rax
	setne	dil
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	xor	edi, edi
	cmp	QWORD PTR ERROR_ACCESS_DENIED[rip], r12
	sete	dil
	call	broken@PLT
	xor	edi, edi
	test	rax, rax
	setne	dil
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	jne	.L14
	xor	edi, edi
	cmp	QWORD PTR 32[rsp], 0
	setne	dil
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L3:
	xor	edi, edi
	test	r12, r12
	lea	rsi, .LC1[rip]
	mov	rdx, r12
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR 8[rsp]
	lea	rsi, .LC3[rip]
	call	RegDeleteKeyA@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	RegCloseKey@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L35:
	lea	rdi, .LC12[rip]
	call	win_skip@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	jne	.L18
	xor	edi, edi
	cmp	QWORD PTR 24[rsp], 0
	setne	dil
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L34:
	mov	rdi, QWORD PTR 16[rsp]
	call	RegCloseKey@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, QWORD PTR 24[rsp]
	mov	esi, DWORD PTR DACL_SECURITY_INFORMATION[rip]
	mov	rdx, r12
	call	RegSetKeySecurity@PLT
	xor	edi, edi
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	lea	rsi, .LC21[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR 32[rsp]
	mov	esi, DWORD PTR DACL_SECURITY_INFORMATION[rip]
	mov	rdx, r12
	call	RegSetKeySecurity@PLT
	xor	edi, edi
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	lea	rsi, .LC21[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	xor	edx, edx
	xor	r8d, r8d
	mov	rdi, QWORD PTR HKEY_LOCAL_MACHINE[rip]
	mov	r9d, DWORD PTR KEY_WOW64_64KEY[rip]
	xor	ecx, ecx
	mov	QWORD PTR 16[rsp], 0
	push	0
	.cfi_def_cfa_offset 176
	or	r9d, DWORD PTR KEY_READ[rip]
	lea	rsi, .LC13[rip]
	push	rbx
	.cfi_def_cfa_offset 184
	push	0
	.cfi_def_cfa_offset 192
	call	RegCreateKeyExA@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 160
	xor	edi, edi
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	mov	rdx, rax
	jne	.L21
	xor	edi, edi
	cmp	QWORD PTR 8[rsp], 0
	setne	dil
.L21:
	lea	rsi, .LC11[rip]
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	RegCloseKey@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	xor	edx, edx
	xor	r8d, r8d
	mov	rdi, QWORD PTR HKEY_LOCAL_MACHINE[rip]
	mov	r9d, DWORD PTR KEY_WOW64_32KEY[rip]
	xor	ecx, ecx
	mov	QWORD PTR 16[rsp], 0
	push	0
	.cfi_def_cfa_offset 176
	or	r9d, DWORD PTR KEY_READ[rip]
	lea	rsi, .LC13[rip]
	push	rbx
	.cfi_def_cfa_offset 184
	push	0
	.cfi_def_cfa_offset 192
	call	RegCreateKeyExA@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 160
	xor	edi, edi
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	mov	rdx, rax
	jne	.L22
	xor	edi, edi
	cmp	QWORD PTR 8[rsp], 0
	setne	dil
.L22:
	lea	rsi, .LC10[rip]
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	RegCloseKey@PLT
	jmp	.L20
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	test_reg_create_key, .-test_reg_create_key
	.comm	pIsWow64Process,4,4
	.comm	limited_user,8,8
	.comm	hkey_main,8,8
	.comm	TRUSTEE_IS_WELL_KNOWN_GROUP,4,4
	.comm	TRUSTEE_IS_SID,4,4
	.comm	TRUE,8,8
	.comm	SUB_CONTAINERS_AND_OBJECTS_INHERIT,4,4
	.comm	STANDARD_RIGHTS_ALL,4,4
	.comm	SET_ACCESS,4,4
	.comm	SECURITY_WORLD_SID_AUTHORITY,4,4
	.comm	SECURITY_WORLD_RID,4,4
	.comm	SECURITY_DESCRIPTOR_REVISION,4,4
	.comm	SECURITY_DESCRIPTOR_MIN_LENGTH,4,4
	.comm	REG_OPTION_VOLATILE,4,4
	.comm	NO_MULTIPLE_TRUSTEE,4,4
	.comm	KEY_WOW64_64KEY,4,4
	.comm	KEY_WOW64_32KEY,4,4
	.comm	KEY_SET_VALUE,4,4
	.comm	KEY_READ,4,4
	.comm	KEY_NOTIFY,4,4
	.comm	KEY_ALL_ACCESS,4,4
	.comm	HKEY_LOCAL_MACHINE,8,8
	.comm	GENERIC_ALL,4,4
	.comm	FALSE,4,4
	.comm	ERROR_SUCCESS,8,8
	.comm	ERROR_CHILD_MUST_BE_VOLATILE,8,8
	.comm	ERROR_BAD_PATHNAME,8,8
	.comm	ERROR_ACCESS_DENIED,8,8
	.comm	DACL_SECURITY_INFORMATION,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_registry.c_test_reg_create_key.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Subkey1\000"
	.align	2
.LC1:
	.ascii	"RegCreateKeyExA failed with error %d\012\000"
	.align	2
.LC2:
	.ascii	"Subkey2\000"
	.align	2
.LC3:
	.ascii	"\000"
	.align	2
.LC4:
	.ascii	"Volatile\000"
	.align	2
.LC5:
	.ascii	"\\Subkey3\000"
	.align	2
.LC6:
	.ascii	"expected ERROR_BAD_PATHNAME, got %d\012\000"
	.align	2
.LC7:
	.ascii	"Subkey4\\\\\000"
	.align	2
.LC8:
	.ascii	"System\\CurrentControlSet\\Control\\Video\\Wine\000"
	.align	2
.LC9:
	.ascii	"Software\000"
	.align	2
.LC10:
	.ascii	"RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\012"
	.ascii	"\000"
	.align	2
.LC11:
	.ascii	"RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\012"
	.ascii	"\000"
	.align	2
.LC12:
	.ascii	"WOW64 flags are not recognized\012\000"
	.align	2
.LC13:
	.ascii	"Software\\Wine\000"
	.align	2
.LC14:
	.ascii	"RegCreateKeyEx with KEY_WOW64_32KEY failed (err=%d)"
	.ascii	"\012\000"
	.align	2
.LC15:
	.ascii	"RegCreateKeyEx with KEY_WOW64_64KEY failed (err=%d)"
	.ascii	"\012\000"
	.align	2
.LC16:
	.ascii	"Expected AllocateAndInitializeSid to return TRUE, g"
	.ascii	"ot %d, last error %u\012\000"
	.align	2
.LC17:
	.ascii	"Expected SetEntriesInAclA to return ERROR_SUCCESS, "
	.ascii	"got %u, last error %u\012\000"
	.align	2
.LC18:
	.ascii	"Expected InitializeSecurityDescriptor to return TRU"
	.ascii	"E, got %d, last error %u\012\000"
	.align	2
.LC19:
	.ascii	"Expected SetSecurityDescriptorDacl to return TRUE, "
	.ascii	"got %d, last error %u\012\000"
	.align	2
.LC20:
	.ascii	"not enough privileges to modify HKLM\012\000"
	.align	2
.LC21:
	.ascii	"Expected RegSetKeySecurity to return success, got e"
	.ascii	"rror %u\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC22:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_reg_create_key, %function
test_reg_create_key:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, #0
	ldr	r8, .L35
	ldr	r2, .L35+4
	ldr	r3, [r8]
	sub	sp, sp, #108
	ldr	r7, .L35+8
	ldr	ip, [r2]
	ldr	lr, .L35+12
	str	r3, [sp, #4]
	str	r5, [sp, #16]
	str	r5, [sp, #8]
	str	r5, [sp]
	add	r4, sp, #40
	mov	r3, r5
	mov	r2, r5
	ldr	r0, [r7]
	ldr	r1, .L35+16
	str	r4, [sp, #12]
	ldr	lr, [lr]
	str	lr, [sp, #100]
	mov	lr,#0
	str	ip, [sp, #56]
	str	r5, [sp, #48]
	str	r5, [sp, #52]
	bl	RegCreateKeyExA
	mov	r2, r0
	clz	r0, r0
	ldr	r1, .L35+20
	lsr	r0, r0, #5
	bl	ok
	ldr	r3, .L35+24
	add	r9, sp, #44
	ldr	r3, [r3]
	mov	r2, r5
	ldr	r1, .L35+28
	str	r5, [sp, #16]
	str	r5, [sp, #8]
	str	r5, [sp]
	str	r3, [sp, #4]
	ldr	r0, [sp, #40]
	mov	r3, r5
	str	r9, [sp, #12]
	bl	RegCreateKeyExA
	mov	r2, r0
	clz	r0, r0
	ldr	r1, .L35+20
	lsr	r0, r0, #5
	bl	ok
	ldr	r1, .L35+32
	ldr	r0, [sp, #44]
	bl	RegDeleteKeyA
	ldr	r1, .L35+32
	ldr	r0, [sp, #40]
	bl	RegDeleteKeyA
	ldr	r6, .L35+36
	ldr	r0, [sp, #44]
	bl	RegCloseKey
	ldr	r0, [sp, #40]
	bl	RegCloseKey
	ldr	r10, .L35+40
	ldr	r2, [r6]
	ldr	r3, [r10]
	stmib	sp, {r2, r5}
	str	r5, [sp, #16]
	str	r3, [sp]
	str	r4, [sp, #12]
	mov	r3, r5
	mov	r2, r5
	ldr	r1, .L35+44
	ldr	r0, [r7]
	bl	RegCreateKeyExA
	mov	r2, r0
	clz	r0, r0
	ldr	r1, .L35+20
	lsr	r0, r0, #5
	bl	ok
	ldr	r3, [r6]
	mov	r2, r5
	ldr	r1, .L35+28
	str	r5, [sp, #16]
	str	r5, [sp, #8]
	str	r5, [sp]
	str	r3, [sp, #4]
	ldr	r0, [sp, #40]
	mov	r3, r5
	str	r9, [sp, #12]
	bl	RegCreateKeyExA
	mov	r5, r0
	ldr	r3, .L35+48
	mov	r2, r0
	ldr	r0, [r3]
	ldr	r1, .L35+20
	sub	r0, r0, r5
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	cmp	r5, #0
	beq	.L32
.L2:
	mov	r5, #0
	ldr	r3, [r10]
	ldr	r1, [r6]
	mov	r2, r5
	str	r3, [sp]
	str	r5, [sp, #16]
	mov	r3, r5
	str	r5, [sp, #8]
	str	r1, [sp, #4]
	ldr	r0, [sp, #40]
	ldr	r1, .L35+28
	str	r9, [sp, #12]
	bl	RegCreateKeyExA
	mov	r2, r0
	clz	r0, r0
	ldr	r1, .L35+20
	lsr	r0, r0, #5
	bl	ok
	ldr	r0, [sp, #44]
	bl	RegCloseKey
	ldr	r1, [r6]
	mov	r3, r5
	mov	r2, r5
	str	r5, [sp, #16]
	str	r5, [sp, #8]
	str	r5, [sp]
	str	r1, [sp, #4]
	ldr	r0, [sp, #40]
	ldr	r1, .L35+28
	str	r9, [sp, #12]
	bl	RegCreateKeyExA
	mov	r2, r0
	clz	r0, r0
	ldr	r1, .L35+20
	lsr	r0, r0, #5
	bl	ok
	ldr	r1, .L35+32
	ldr	r0, [sp, #44]
	bl	RegDeleteKeyA
	ldr	r1, .L35+32
	ldr	r0, [sp, #40]
	bl	RegDeleteKeyA
	ldr	r0, [sp, #44]
	bl	RegCloseKey
	ldr	r0, [sp, #40]
	bl	RegCloseKey
	ldr	r1, [r8]
	str	r5, [sp, #16]
	str	r5, [sp, #8]
	str	r5, [sp]
	str	r1, [sp, #4]
	str	r4, [sp, #12]
	mov	r3, r5
	mov	r2, r5
	ldr	r1, .L35+52
	ldr	r0, [r7]
	bl	RegCreateKeyExA
	mov	r5, r0
	bl	GetVersion
	cmp	r0, #0
	blt	.L3
	ldr	r3, .L35+56
	mov	r2, r5
	ldr	r0, [r3]
	ldr	r1, .L35+60
	sub	r0, r0, r5
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
.L4:
	mov	r9, #0
	ldr	r1, [r8]
	str	r4, [sp, #12]
	mov	r3, r9
	ldr	r0, [r7]
	mov	r2, r9
	str	r9, [sp, #16]
	str	r9, [sp, #8]
	str	r9, [sp]
	str	r1, [sp, #4]
	ldr	r1, .L35+64
	bl	RegCreateKeyExA
	mov	r2, r0
	ldr	r5, .L35+68
	ldr	r1, .L35+20
	ldr	r0, [r5]
	ldr	r7, .L35+72
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r1, .L35+32
	ldr	r0, [sp, #40]
	bl	RegDeleteKeyA
	ldr	r0, [sp, #40]
	bl	RegCloseKey
	ldr	r3, [r8]
	str	r9, [sp, #16]
	str	r9, [sp, #8]
	str	r9, [sp]
	str	r3, [sp, #4]
	str	r4, [sp, #12]
	mov	r3, r9
	mov	r2, r9
	ldr	r1, .L35+76
	ldr	r0, [r7]
	bl	RegCreateKeyExA
	mov	r2, r0
	ldr	r0, [r5]
	ldr	r1, .L35+20
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r8, .L35+80
	ldr	r1, .L35+32
	ldr	r0, [sp, #40]
	ldr	r10, .L35+84
	bl	RegDeleteKeyA
	ldr	r0, [sp, #40]
	bl	RegCloseKey
	ldr	r2, [r10]
	ldr	r3, [r8]
	str	r9, [sp, #16]
	orr	r3, r3, r2
	str	r9, [sp, #8]
	str	r9, [sp]
	str	r3, [sp, #4]
	str	r4, [sp, #12]
	mov	r3, r9
	mov	r2, r9
	ldr	r0, [r7]
	ldr	r1, .L35+88
	str	r9, [sp, #40]
	bl	RegCreateKeyExA
	ldr	r3, [r5]
	mov	r9, r0
	cmp	r3, r0
	bne	.L5
	ldr	r3, [sp, #40]
	cmp	r3, #0
	movne	r0, #1
	beq	.L5
.L6:
	mov	r2, r9
	ldr	r1, .L35+92
	bl	ok
	ldr	r0, [sp, #40]
	bl	RegCloseKey
	mov	r3, #0
	ldr	fp, .L35+96
	ldr	r2, [r8]
	ldr	r1, [fp]
	str	r3, [sp, #16]
	orr	r2, r2, r1
	str	r2, [sp, #4]
	str	r3, [sp, #8]
	str	r3, [sp]
	str	r4, [sp, #12]
	mov	r2, r3
	ldr	r1, .L35+88
	ldr	r0, [r7]
	str	r3, [sp, #40]
	bl	RegCreateKeyExA
	ldr	r3, [r5]
	mov	r9, r0
	cmp	r3, r0
	bne	.L7
	ldr	r3, [sp, #40]
	cmp	r3, #0
	movne	r0, #1
	beq	.L7
.L8:
	mov	r2, r9
	ldr	r1, .L35+100
	bl	ok
	ldr	r0, [sp, #40]
	bl	RegCloseKey
	ldr	r3, .L35+104
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L33
	mov	r9, #0
	ldr	r2, [r6]
	ldr	r3, [r10]
	add	r1, sp, #52
	orr	r3, r3, r2
	str	r3, [sp, #4]
	str	r1, [sp, #12]
	str	r9, [sp, #16]
	str	r9, [sp, #8]
	str	r9, [sp]
	mov	r3, r9
	mov	r2, r9
	ldr	r1, .L35+108
	ldr	r0, [r7]
	bl	RegCreateKeyExA
	ldr	r3, .L35+112
	mov	r2, r0
	ldr	r0, [r3]
	cmp	r0, r9
	beq	.L11
	ldr	r3, .L35+116
	ldr	r3, [r3]
	cmp	r3, r2
	ldreq	r9, [sp, #52]
	movne	r0, r9
	clzeq	r0, r9
	lsreq	r0, r0, #5
.L14:
	mov	r9, #0
	ldr	r1, .L35+120
	bl	ok
	ldr	r2, [r6]
	ldr	r3, [fp]
	add	r1, sp, #48
	orr	r3, r3, r2
	str	r3, [sp, #4]
	str	r1, [sp, #12]
	str	r9, [sp, #16]
	str	r9, [sp, #8]
	str	r9, [sp]
	mov	r3, r9
	mov	r2, r9
	ldr	r1, .L35+108
	ldr	r0, [r7]
	bl	RegCreateKeyExA
	ldr	r3, .L35+112
	mov	r2, r0
	ldr	r3, [r3]
	cmp	r3, r9
	beq	.L15
	ldr	r3, .L35+116
	ldr	r3, [r3]
	cmp	r3, r0
	ldreq	r9, [sp, #48]
	movne	r0, r9
	clzeq	r0, r9
	lsreq	r0, r0, #5
.L30:
	mov	r6, #0
	ldr	r1, .L35+124
	bl	ok
	ldr	r2, .L35+128
	str	r6, [sp, #20]
	str	r6, [sp, #16]
	str	r6, [sp, #12]
	str	r6, [sp, #8]
	str	r6, [sp, #4]
	str	r6, [sp]
	add	r1, sp, #60
	mov	r3, r6
	ldr	r2, [r2]
	add	r0, sp, #56
	str	r1, [sp, #24]
	mov	r1, #1
	bl	AllocateAndInitializeSid
	ldr	r9, .L35+132
	str	r0, [sp, #36]
	ldr	r1, [r9]
	sub	r1, r1, r0
	clz	r1, r1
	lsr	r1, r1, #5
	str	r1, [sp, #32]
	bl	GetLastError
	ldr	r1, [sp, #32]
	mov	r3, r0
	ldr	r2, [sp, #36]
	mov	r0, r1
	ldr	r1, .L35+136
	bl	ok
	ldr	r1, .L35+140
	ldr	r3, .L35+144
	ldr	r0, [r1]
	ldr	r3, [r3]
	ldr	ip, .L35+148
	orr	r3, r0, r3
	ldr	r2, .L35+152
	ldr	r1, .L35+156
	ldr	r0, .L35+160
	ldr	ip, [ip]
	ldr	lr, .L35+164
	ldr	r2, [r2]
	ldr	r1, [r1]
	ldr	r0, [r0]
	ldr	lr, [lr]
	str	ip, [sp, #96]
	ldr	ip, [sp, #60]
	str	r3, [sp, #68]
	str	r2, [sp, #92]
	add	r3, sp, #64
	mov	r2, r6
	str	r1, [sp, #80]
	str	r0, [sp, #76]
	add	r1, sp, #68
	mov	r0, #1
	str	lr, [sp, #84]
	str	ip, [sp, #72]
	str	r6, [sp, #88]
	bl	SetEntriesInAclA
	ldr	r1, [r5]
	str	r0, [sp, #36]
	sub	r1, r1, r0
	clz	r1, r1
	lsr	r1, r1, #5
	str	r1, [sp, #32]
	bl	GetLastError
	ldr	r1, [sp, #32]
	mov	r3, r0
	ldr	r2, [sp, #36]
	mov	r0, r1
	ldr	r1, .L35+168
	bl	ok
	bl	GetProcessHeap
	ldr	r3, .L35+172
	mov	r1, r6
	ldr	r2, [r3]
	bl	HeapAlloc
	ldr	r3, .L35+176
	mov	r6, r0
	ldr	r1, [r3]
	bl	InitializeSecurityDescriptor
	ldr	r1, [r9]
	str	r0, [sp, #36]
	sub	r1, r1, r0
	clz	r1, r1
	lsr	r1, r1, #5
	str	r1, [sp, #32]
	bl	GetLastError
	ldr	r1, [sp, #32]
	mov	r3, r0
	ldr	r2, [sp, #36]
	mov	r0, r1
	ldr	r1, .L35+180
	bl	ok
	ldr	r3, .L35+184
	ldr	r1, [r9]
	ldr	r3, [r3]
	ldr	r2, [sp, #64]
	mov	r0, r6
	bl	SetSecurityDescriptorDacl
	ldr	r9, [r9]
	str	r0, [sp, #32]
	sub	r9, r9, r0
	clz	r9, r9
	bl	GetLastError
	lsr	r9, r9, #5
	mov	r3, r0
	ldr	r2, [sp, #32]
	mov	r0, r9
	ldr	r1, .L35+188
	bl	ok
	ldr	r3, .L35+112
	ldr	r9, [r3]
	cmp	r9, #0
	beq	.L19
	ldr	r0, .L35+192
	bl	skip
.L20:
	bl	GetProcessHeap
	mov	r2, r6
	mov	r1, #0
	bl	HeapFree
	ldr	r0, [sp, #64]
	bl	LocalFree
	ldr	r0, [sp, #60]
	bl	FreeSid
	ldr	r1, .L35+32
	ldr	r0, [sp, #48]
	bl	RegDeleteKeyA
	ldr	r0, [sp, #48]
	bl	RegCloseKey
	ldr	r1, .L35+32
	ldr	r0, [sp, #52]
	bl	RegDeleteKeyA
	ldr	r0, [sp, #52]
	bl	RegCloseKey
.L1:
	ldr	r3, .L35+12
	ldr	r2, [r3]
	ldr	r3, [sp, #100]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L34
	add	sp, sp, #108
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	ldr	r3, .L35+116
	ldr	r0, [r3]
	sub	r0, r0, r9
	clz	r0, r0
	lsr	r0, r0, #5
	bl	broken
	subs	r0, r0, #0
	movne	r0, #1
	b	.L8
.L5:
	ldr	r3, .L35+116
	ldr	r0, [r3]
	sub	r0, r0, r9
	clz	r0, r0
	lsr	r0, r0, #5
	bl	broken
	subs	r0, r0, #0
	movne	r0, #1
	b	.L6
.L11:
	ldr	r3, [r5]
	cmp	r3, r2
	bne	.L14
	ldr	r0, [sp, #52]
	subs	r0, r0, #0
	movne	r0, #1
	b	.L14
.L3:
	clz	r0, r5
	mov	r2, r5
	ldr	r1, .L35+20
	lsr	r0, r0, #5
	bl	ok
	ldr	r1, .L35+32
	ldr	r0, [sp, #40]
	bl	RegDeleteKeyA
	ldr	r0, [sp, #40]
	bl	RegCloseKey
	b	.L4
.L33:
	ldr	r0, .L35+196
	bl	win_skip
	b	.L1
.L32:
	ldr	r0, [sp, #44]
	bl	RegCloseKey
	b	.L2
.L19:
	ldr	r3, .L35+200
	mov	r2, r6
	ldr	r1, [r3]
	ldr	r0, [sp, #48]
	bl	RegSetKeySecurity
	mov	r2, r0
	ldr	r0, [r5]
	ldr	r1, .L35+204
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r3, .L35+200
	mov	r2, r6
	ldr	r1, [r3]
	ldr	r0, [sp, #52]
	bl	RegSetKeySecurity
	mov	r2, r0
	ldr	r0, [r5]
	ldr	r1, .L35+204
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r2, [r8]
	ldr	r3, [fp]
	str	r9, [sp, #16]
	orr	r3, r3, r2
	str	r3, [sp, #4]
	str	r4, [sp, #12]
	str	r9, [sp, #8]
	str	r9, [sp]
	mov	r3, r9
	mov	r2, r9
	ldr	r1, .L35+108
	ldr	r0, [r7]
	str	r9, [sp, #40]
	bl	RegCreateKeyExA
	ldr	r3, [r5]
	mov	r2, r0
	cmp	r3, r0
	movne	r0, r9
	bne	.L21
	ldr	r0, [sp, #40]
	subs	r0, r0, #0
	movne	r0, #1
.L21:
	ldr	r1, .L35+100
	bl	ok
	ldr	r0, [sp, #40]
	bl	RegCloseKey
	mov	r3, #0
	ldr	r1, [r8]
	ldr	r2, [r10]
	str	r4, [sp, #12]
	orr	r2, r2, r1
	str	r2, [sp, #4]
	ldr	r0, [r7]
	mov	r2, r3
	str	r3, [sp, #16]
	str	r3, [sp, #8]
	str	r3, [sp]
	ldr	r1, .L35+108
	str	r3, [sp, #40]
	bl	RegCreateKeyExA
	ldr	r3, [r5]
	mov	r2, r0
	cmp	r3, r0
	bne	.L22
	ldr	r9, [sp, #40]
	subs	r9, r9, #0
	movne	r9, #1
.L22:
	mov	r0, r9
	ldr	r1, .L35+92
	bl	ok
	ldr	r0, [sp, #40]
	bl	RegCloseKey
	b	.L20
.L15:
	ldr	r1, [r5]
	cmp	r1, r0
	bne	.L18
	ldr	r3, [sp, #48]
	subs	r3, r3, #0
	movne	r3, #1
.L18:
	mov	r0, r3
	b	.L30
.L34:
	bl	__stack_chk_fail
.L36:
	.align	2
.L35:
	.word	KEY_NOTIFY
	.word	SECURITY_WORLD_SID_AUTHORITY
	.word	hkey_main
	.word	.LC22
	.word	.LC0
	.word	.LC1
	.word	KEY_SET_VALUE
	.word	.LC2
	.word	.LC3
	.word	KEY_ALL_ACCESS
	.word	REG_OPTION_VOLATILE
	.word	.LC4
	.word	ERROR_CHILD_MUST_BE_VOLATILE
	.word	.LC5
	.word	ERROR_BAD_PATHNAME
	.word	.LC6
	.word	.LC7
	.word	ERROR_SUCCESS
	.word	HKEY_LOCAL_MACHINE
	.word	.LC8
	.word	KEY_READ
	.word	KEY_WOW64_32KEY
	.word	.LC9
	.word	.LC10
	.word	KEY_WOW64_64KEY
	.word	.LC11
	.word	pIsWow64Process
	.word	.LC13
	.word	limited_user
	.word	ERROR_ACCESS_DENIED
	.word	.LC14
	.word	.LC15
	.word	SECURITY_WORLD_RID
	.word	TRUE
	.word	.LC16
	.word	GENERIC_ALL
	.word	STANDARD_RIGHTS_ALL
	.word	SET_ACCESS
	.word	SUB_CONTAINERS_AND_OBJECTS_INHERIT
	.word	TRUSTEE_IS_SID
	.word	TRUSTEE_IS_WELL_KNOWN_GROUP
	.word	NO_MULTIPLE_TRUSTEE
	.word	.LC17
	.word	SECURITY_DESCRIPTOR_MIN_LENGTH
	.word	SECURITY_DESCRIPTOR_REVISION
	.word	.LC18
	.word	FALSE
	.word	.LC19
	.word	.LC20
	.word	.LC12
	.word	DACL_SECURITY_INFORMATION
	.word	.LC21
	.size	test_reg_create_key, .-test_reg_create_key
	.comm	pIsWow64Process,4,4
	.comm	limited_user,4,4
	.comm	hkey_main,4,4
	.comm	TRUSTEE_IS_WELL_KNOWN_GROUP,4,4
	.comm	TRUSTEE_IS_SID,4,4
	.comm	TRUE,4,4
	.comm	SUB_CONTAINERS_AND_OBJECTS_INHERIT,4,4
	.comm	STANDARD_RIGHTS_ALL,4,4
	.comm	SET_ACCESS,4,4
	.comm	SECURITY_WORLD_SID_AUTHORITY,4,4
	.comm	SECURITY_WORLD_RID,4,4
	.comm	SECURITY_DESCRIPTOR_REVISION,4,4
	.comm	SECURITY_DESCRIPTOR_MIN_LENGTH,4,4
	.comm	REG_OPTION_VOLATILE,4,4
	.comm	NO_MULTIPLE_TRUSTEE,4,4
	.comm	KEY_WOW64_64KEY,4,4
	.comm	KEY_WOW64_32KEY,4,4
	.comm	KEY_SET_VALUE,4,4
	.comm	KEY_READ,4,4
	.comm	KEY_NOTIFY,4,4
	.comm	KEY_ALL_ACCESS,4,4
	.comm	HKEY_LOCAL_MACHINE,4,4
	.comm	GENERIC_ALL,4,4
	.comm	FALSE,4,4
	.comm	ERROR_SUCCESS,4,4
	.comm	ERROR_CHILD_MUST_BE_VOLATILE,4,4
	.comm	ERROR_BAD_PATHNAME,4,4
	.comm	ERROR_ACCESS_DENIED,4,4
	.comm	DACL_SECURITY_INFORMATION,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
