	.file	"extr_package.c_test_appsearch.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"failed to create package database\n"
	.align 8
.LC1:
	.string	"'WEBBROWSERPROG', 'NewSignature1'"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"'NOTEPAD', 'NewSignature2'"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"'REGEXPANDVAL', 'NewSignature3'"
	.section	.rodata.str1.1
.LC4:
	.string	""
.LC5:
	.string	"htmlfile\\shell\\open\\command"
.LC6:
	.string	"NewSignature1"
.LC7:
	.string	"Software\\Winetest_msi"
.LC8:
	.string	"Could not create key: %d.\n"
.LC9:
	.string	"Could not set key value: %d.\n"
.LC10:
	.string	"NewSignature3"
	.section	.rodata.str1.8
	.align 8
.LC11:
	.string	"'NewSignature2', 0, 'c:\\windows\\system32', 0"
	.align 8
.LC12:
	.string	"'NewSignature1', 'FileName', '', '', '', '', '', '', ''"
	.align 8
.LC13:
	.string	"'NewSignature2', 'NOTEPAD.EXE|notepad.exe', '', '', '', '', '', '', ''"
	.align 8
.LC14:
	.string	"'NewSignature3', 'NOTEPAD.EXE|notepad.exe', '', '', '', '', '', '', ''"
	.align 8
.LC15:
	.string	"Not enough rights to perform tests\n"
	.section	.rodata.str1.1
.LC16:
	.string	"failed to create package %u\n"
.LC17:
	.string	"AppSearch"
.LC18:
	.string	"AppSearch failed: %d\n"
.LC19:
	.string	"WEBBROWSERPROG"
.LC20:
	.string	"get property failed: %d\n"
.LC21:
	.string	"Expected non-zero length\n"
.LC22:
	.string	"NOTEPAD"
.LC23:
	.string	"REGEXPANDVAL"
	.text
	.p2align 4
	.type	test_appsearch, @function
test_appsearch:
.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
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 72
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAX_PATH[rip]
	mov	rcx, rsp
	mov	r13, rsp
	mov	rbx, rax
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L18:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L18
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L19
.L4:
	movdqa	xmm0, XMMWORD PTR .LC24[rip]
	mov	eax, 101
	mov	r14, rsp
	mov	WORD PTR -64[rbp], ax
	xor	eax, eax
	movaps	XMMWORD PTR -96[rbp], xmm0
	movdqa	xmm0, XMMWORD PTR .LC25[rip]
	movaps	XMMWORD PTR -80[rbp], xmm0
	call	create_package_db@PLT
	lea	rsi, .LC0[rip]
	mov	r12d, eax
	mov	edi, eax
	xor	eax, eax
	call	ok@PLT
	mov	edi, r12d
	call	create_appsearch_table@PLT
	lea	rsi, .LC1[rip]
	mov	edi, r12d
	call	add_appsearch_entry@PLT
	lea	rsi, .LC2[rip]
	mov	edi, r12d
	call	add_appsearch_entry@PLT
	lea	rsi, .LC3[rip]
	mov	edi, r12d
	call	add_appsearch_entry@PLT
	mov	edi, r12d
	call	create_reglocator_table@PLT
	xor	edx, edx
	mov	r9d, 1
	mov	edi, r12d
	lea	r8, .LC4[rip]
	lea	rcx, .LC5[rip]
	lea	rsi, .LC6[rip]
	call	add_reglocator_entry@PLT
	sub	rsp, 8
	lea	rax, -100[rbp]
	xor	r8d, r8d
	mov	r9d, DWORD PTR KEY_ALL_ACCESS[rip]
	mov	edi, DWORD PTR HKEY_CURRENT_USER[rip]
	push	0
	xor	ecx, ecx
	push	rax
	xor	edx, edx
	lea	rsi, .LC7[rip]
	push	0
	call	RegCreateKeyExA@PLT
	add	rsp, 32
	xor	edi, edi
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	mov	rdx, rax
	sete	dil
	lea	rsi, .LC8[rip]
	xor	eax, eax
	call	ok@PLT
	lea	r8, -96[rbp]
	mov	rdx, r8
.L5:
	mov	ecx, DWORD PTR [rdx]
	add	rdx, 4
	lea	eax, -16843009[rcx]
	not	ecx
	and	eax, ecx
	and	eax, -2139062144
	je	.L5
	mov	ecx, eax
	mov	edi, DWORD PTR -100[rbp]
	shr	ecx, 16
	test	eax, 32896
	cmove	eax, ecx
	lea	rcx, 2[rdx]
	cmove	rdx, rcx
	mov	ecx, DWORD PTR REG_EXPAND_SZ[rip]
	mov	esi, eax
	add	sil, al
	sbb	rdx, 3
	xor	esi, esi
	sub	rdx, r8
	lea	r9, 1[rdx]
	xor	edx, edx
	call	RegSetValueExA@PLT
	xor	edi, edi
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	lea	rsi, .LC9[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	edi, DWORD PTR -100[rbp]
	call	RegCloseKey@PLT
	mov	r9d, 1
	mov	edx, 1
	mov	edi, r12d
	lea	r8, .LC4[rip]
	lea	rcx, .LC7[rip]
	lea	rsi, .LC10[rip]
	call	add_reglocator_entry@PLT
	mov	edi, r12d
	call	create_drlocator_table@PLT
	lea	rsi, .LC11[rip]
	mov	edi, r12d
	call	add_drlocator_entry@PLT
	mov	edi, r12d
	call	create_signature_table@PLT
	lea	rsi, .LC12[rip]
	mov	edi, r12d
	call	add_signature_entry@PLT
	lea	rsi, .LC13[rip]
	mov	edi, r12d
	call	add_signature_entry@PLT
	lea	rsi, .LC14[rip]
	mov	edi, r12d
	call	add_signature_entry@PLT
	lea	rsi, -108[rbp]
	mov	edi, r12d
	call	package_from_db@PLT
	cmp	QWORD PTR ERROR_INSTALL_PACKAGE_REJECTED[rip], rax
	mov	r15, rax
	je	.L20
	xor	edi, edi
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	mov	rdx, rax
	sete	dil
	lea	rsi, .LC16[rip]
	xor	eax, eax
	call	ok@PLT
	mov	edi, r12d
	call	MsiCloseHandle@PLT
	cmp	QWORD PTR ERROR_SUCCESS[rip], r15
	je	.L21
.L9:
	mov	edi, DWORD PTR -108[rbp]
	call	MsiCloseHandle@PLT
	mov	edi, DWORD PTR msifile[rip]
	call	DeleteFileA@PLT
	mov	edi, DWORD PTR HKEY_CURRENT_USER[rip]
	lea	rsi, .LC7[rip]
	call	RegDeleteKeyA@PLT
	mov	rsp, r13
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L22
	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
.L21:
	.cfi_restore_state
	mov	edi, DWORD PTR INSTALLUILEVEL_NONE[rip]
	xor	esi, esi
	lea	r12, -104[rbp]
	call	MsiSetInternalUI@PLT
	mov	edi, DWORD PTR -108[rbp]
	lea	rsi, .LC17[rip]
	call	MsiDoActionA@PLT
	xor	edi, edi
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	lea	rsi, .LC18[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	sal	ebx, 2
	call	ok@PLT
	mov	edi, DWORD PTR -108[rbp]
	mov	rcx, r12
	mov	rdx, r14
	lea	rsi, .LC19[rip]
	mov	DWORD PTR -104[rbp], ebx
	call	MsiGetPropertyA@PLT
	xor	edi, edi
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	lea	rsi, .LC20[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	rdi, r14
	call	lstrlenA@PLT
	xor	edi, edi
	lea	rsi, .LC21[rip]
	test	rax, rax
	setne	dil
	xor	eax, eax
	call	ok@PLT
	mov	edi, DWORD PTR -108[rbp]
	mov	rcx, r12
	mov	rdx, r14
	lea	rsi, .LC22[rip]
	mov	DWORD PTR -104[rbp], ebx
	call	MsiGetPropertyA@PLT
	xor	edi, edi
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	lea	rsi, .LC20[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	edi, DWORD PTR -108[rbp]
	mov	rcx, r12
	mov	rdx, r14
	lea	rsi, .LC23[rip]
	mov	DWORD PTR -104[rbp], ebx
	call	MsiGetPropertyA@PLT
	xor	edi, edi
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	lea	rsi, .LC20[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	rdi, r14
	call	lstrlenA@PLT
	xor	edi, edi
	lea	rsi, .LC21[rip]
	test	rax, rax
	setne	dil
	xor	eax, eax
	call	ok@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L20:
	lea	rdi, .LC15[rip]
	call	skip@PLT
	mov	edi, DWORD PTR msifile[rip]
	call	DeleteFileA@PLT
	mov	rsp, r13
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	test_appsearch, .-test_appsearch
	.comm	msifile,4,4
	.comm	REG_EXPAND_SZ,4,4
	.comm	MAX_PATH,4,4
	.comm	KEY_ALL_ACCESS,4,4
	.comm	INSTALLUILEVEL_NONE,4,4
	.comm	HKEY_CURRENT_USER,4,4
	.comm	ERROR_SUCCESS,8,8
	.comm	ERROR_INSTALL_PACKAGE_REJECTED,8,8
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC24:
	.quad	8245358043613197093
	.quad	8320808626146275183
	.align 16
.LC25:
	.quad	8029456556329100660
	.quad	8675391265865491828
	.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_package.c_test_appsearch.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC1:
	.ascii	"failed to create package database\012\000"
	.align	2
.LC2:
	.ascii	"'WEBBROWSERPROG', 'NewSignature1'\000"
	.align	2
.LC3:
	.ascii	"'NOTEPAD', 'NewSignature2'\000"
	.align	2
.LC4:
	.ascii	"'REGEXPANDVAL', 'NewSignature3'\000"
	.align	2
.LC5:
	.ascii	"htmlfile\\shell\\open\\command\000"
	.align	2
.LC6:
	.ascii	"NewSignature1\000"
	.align	2
.LC7:
	.ascii	"\000"
	.align	2
.LC8:
	.ascii	"Software\\Winetest_msi\000"
	.align	2
.LC9:
	.ascii	"Could not create key: %d.\012\000"
	.align	2
.LC10:
	.ascii	"Could not set key value: %d.\012\000"
	.align	2
.LC11:
	.ascii	"NewSignature3\000"
	.align	2
.LC12:
	.ascii	"'NewSignature2', 0, 'c:\\windows\\system32', 0\000"
	.align	2
.LC13:
	.ascii	"'NewSignature1', 'FileName', '', '', '', '', '', ''"
	.ascii	", ''\000"
	.align	2
.LC14:
	.ascii	"'NewSignature2', 'NOTEPAD.EXE|notepad.exe', '', '',"
	.ascii	" '', '', '', '', ''\000"
	.align	2
.LC15:
	.ascii	"'NewSignature3', 'NOTEPAD.EXE|notepad.exe', '', '',"
	.ascii	" '', '', '', '', ''\000"
	.align	2
.LC16:
	.ascii	"Not enough rights to perform tests\012\000"
	.align	2
.LC17:
	.ascii	"failed to create package %u\012\000"
	.align	2
.LC18:
	.ascii	"AppSearch\000"
	.align	2
.LC19:
	.ascii	"AppSearch failed: %d\012\000"
	.align	2
.LC20:
	.ascii	"WEBBROWSERPROG\000"
	.align	2
.LC21:
	.ascii	"get property failed: %d\012\000"
	.align	2
.LC22:
	.ascii	"Expected non-zero length\012\000"
	.align	2
.LC23:
	.ascii	"NOTEPAD\000"
	.align	2
.LC24:
	.ascii	"REGEXPANDVAL\000"
	.align	2
.LC0:
	.ascii	"%systemroot%\\system32\\notepad.exe\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC25:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_appsearch, %function
test_appsearch:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #92
	ldr	lr, .L11
	sub	ip, fp, #76
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	ldr	r4, .L11+4
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [r4]
	ldr	r2, [lr]
	lsl	r3, r3, #2
	str	r3, [fp, #-96]
	add	r3, r3, #7
	bic	r3, r3, #7
	mov	r10, sp
	sub	sp, sp, r3
	ldr	r3, .L11+8
	mov	r5, #0
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	strh	r2, [ip]	@ movhi
	bl	create_package_db
	mov	r4, r0
	mov	r7, #1
	ldr	r1, .L11+12
	bl	ok
	mov	r0, r4
	bl	create_appsearch_table
	ldr	r1, .L11+16
	mov	r0, r4
	bl	add_appsearch_entry
	ldr	r1, .L11+20
	mov	r0, r4
	bl	add_appsearch_entry
	ldr	r8, .L11+24
	ldr	r1, .L11+28
	mov	r0, r4
	bl	add_appsearch_entry
	mov	r0, r4
	bl	create_reglocator_table
	mov	r2, r5
	ldr	r3, .L11+32
	ldr	r1, .L11+36
	mov	r0, r4
	str	r7, [sp, #4]
	str	r8, [sp]
	bl	add_reglocator_entry
	ldr	r1, .L11+40
	sub	r2, fp, #80
	ldr	r3, .L11+44
	ldr	r0, [r1]
	str	r2, [sp, #12]
	str	r5, [sp, #16]
	str	r5, [sp, #8]
	ldr	r3, [r3]
	mov	r2, r5
	ldr	r1, .L11+48
	str	r3, [sp, #4]
	str	r5, [sp]
	mov	r3, r5
	bl	RegCreateKeyExA
	mov	r2, r0
	ldr	r6, .L11+52
	ldr	r1, .L11+56
	ldr	r0, [r6]
	sub	r9, fp, #76
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	mov	r0, r9
	bl	strlen
	mov	r2, r0
	ldr	r3, .L11+60
	add	r2, r2, r7
	ldr	r3, [r3]
	ldr	r0, [fp, #-80]
	mov	r1, r5
	str	r2, [sp, #4]
	str	r9, [sp]
	mov	r2, r5
	bl	RegSetValueExA
	mov	r2, r0
	ldr	r0, [r6]
	ldr	r1, .L11+64
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r0, [fp, #-80]
	bl	RegCloseKey
	ldr	r3, .L11+48
	mov	r2, r7
	ldr	r1, .L11+68
	mov	r0, r4
	str	r7, [sp, #4]
	str	r8, [sp]
	bl	add_reglocator_entry
	mov	r0, r4
	bl	create_drlocator_table
	ldr	r1, .L11+72
	mov	r0, r4
	bl	add_drlocator_entry
	mov	r0, r4
	bl	create_signature_table
	ldr	r1, .L11+76
	mov	r0, r4
	bl	add_signature_entry
	ldr	r1, .L11+80
	mov	r0, r4
	bl	add_signature_entry
	ldr	r1, .L11+84
	mov	r0, r4
	bl	add_signature_entry
	mov	r0, r4
	sub	r1, fp, #88
	bl	package_from_db
	ldr	r3, .L11+88
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L8
	mov	r8, r0
	ldr	r0, [r6]
	mov	r2, r8
	sub	r0, r0, r8
	clz	r0, r0
	ldr	r1, .L11+92
	lsr	r0, r0, #5
	bl	ok
	mov	r0, r4
	bl	MsiCloseHandle
	ldr	r3, [r6]
	cmp	r3, r8
	beq	.L9
.L4:
	ldr	r0, [fp, #-88]
	bl	MsiCloseHandle
	ldr	r3, .L11+96
	ldr	r0, [r3]
	bl	DeleteFileA
	ldr	r3, .L11+40
	ldr	r1, .L11+48
	ldr	r0, [r3]
	bl	RegDeleteKeyA
	mov	sp, r10
.L1:
	ldr	r3, .L11+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	ldr	r3, .L11+100
	mov	r1, r5
	ldr	r0, [r3]
	bl	MsiSetInternalUI
	ldr	r1, .L11+104
	ldr	r0, [fp, #-88]
	bl	MsiDoActionA
	mov	r2, r0
	ldr	r0, [r6]
	ldr	r1, .L11+108
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	add	r7, sp, #24
	ldr	r4, [fp, #-96]
	sub	r3, fp, #84
	mov	r2, r7
	ldr	r1, .L11+112
	ldr	r0, [fp, #-88]
	str	r4, [fp, #-84]
	bl	MsiGetPropertyA
	mov	r2, r0
	ldr	r0, [r6]
	ldr	r1, .L11+116
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	mov	r0, r7
	bl	lstrlenA
	subs	r0, r0, #0
	movne	r0, #1
	ldr	r1, .L11+120
	bl	ok
	sub	r3, fp, #84
	mov	r2, r7
	ldr	r1, .L11+124
	ldr	r0, [fp, #-88]
	str	r4, [fp, #-84]
	bl	MsiGetPropertyA
	mov	r2, r0
	ldr	r0, [r6]
	ldr	r1, .L11+116
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	sub	r3, fp, #84
	mov	r2, r7
	ldr	r1, .L11+128
	ldr	r0, [fp, #-88]
	str	r4, [fp, #-84]
	bl	MsiGetPropertyA
	mov	r2, r0
	ldr	r0, [r6]
	ldr	r1, .L11+116
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	mov	r0, r7
	bl	lstrlenA
	subs	r0, r0, #0
	movne	r0, #1
	ldr	r1, .L11+120
	bl	ok
	b	.L4
.L8:
	ldr	r0, .L11+132
	bl	skip
	ldr	r3, .L11+96
	ldr	r0, [r3]
	bl	DeleteFileA
	mov	sp, r10
	b	.L1
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC0
	.word	MAX_PATH
	.word	.LC25
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC7
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	HKEY_CURRENT_USER
	.word	KEY_ALL_ACCESS
	.word	.LC8
	.word	ERROR_SUCCESS
	.word	.LC9
	.word	REG_EXPAND_SZ
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	ERROR_INSTALL_PACKAGE_REJECTED
	.word	.LC17
	.word	msifile
	.word	INSTALLUILEVEL_NONE
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC16
	.size	test_appsearch, .-test_appsearch
	.comm	msifile,4,4
	.comm	REG_EXPAND_SZ,4,4
	.comm	MAX_PATH,4,4
	.comm	KEY_ALL_ACCESS,4,4
	.comm	INSTALLUILEVEL_NONE,4,4
	.comm	HKEY_CURRENT_USER,4,4
	.comm	ERROR_SUCCESS,4,4
	.comm	ERROR_INSTALL_PACKAGE_REJECTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
