	.file	"extr_registry.c_check_user_privs.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Software"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"expected success or access denied, got %i\n"
	.align 8
.LC2:
	.string	"RegOpenKeyExA succeeded but returned NULL hkey\n"
	.align 8
.LC3:
	.string	"RegOpenKeyExA failed but returned hkey %p\n"
	.section	.rodata.str1.1
.LC4:
	.string	"running as limited user\n"
	.text
	.p2align 4
	.type	check_user_privs, @function
check_user_privs:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	xor	edx, edx
	lea	rsi, .LC0[rip]
	sub	rsp, 16
	.cfi_def_cfa_offset 32
	mov	edi, DWORD PTR HKEY_LOCAL_MACHINE[rip]
	mov	ecx, DWORD PTR KEY_READ[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	or	ecx, DWORD PTR KEY_WRITE[rip]
	mov	eax, 3735928559
	mov	r8, rsp
	mov	QWORD PTR [rsp], rax
	call	RegOpenKeyExA@PLT
	cmp	QWORD PTR ERROR_SUCCESS[rip], rax
	mov	edi, 1
	mov	rbx, rax
	je	.L2
	xor	edi, edi
	cmp	QWORD PTR ERROR_ACCESS_DENIED[rip], rax
	sete	dil
.L2:
	xor	eax, eax
	mov	rdx, rbx
	lea	rsi, .LC1[rip]
	call	ok@PLT
	cmp	QWORD PTR ERROR_SUCCESS[rip], rbx
	je	.L10
	mov	rdx, QWORD PTR [rsp]
	xor	edi, edi
	lea	rsi, .LC3[rip]
	test	rdx, rdx
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	eax, DWORD PTR TRUE[rip]
	lea	rdi, .LC4[rip]
	mov	DWORD PTR limited_user[rip], eax
	call	trace@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	xor	edi, edi
	cmp	QWORD PTR [rsp], 0
	lea	rsi, .LC2[rip]
	setne	dil
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR [rsp]
	call	RegCloseKey@PLT
	jmp	.L1
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	check_user_privs, .-check_user_privs
	.comm	limited_user,4,4
	.comm	TRUE,4,4
	.comm	KEY_WRITE,4,4
	.comm	KEY_READ,4,4
	.comm	HKEY_LOCAL_MACHINE,4,4
	.comm	ERROR_SUCCESS,8,8
	.comm	ERROR_ACCESS_DENIED,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_registry.c_check_user_privs.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Software\000"
	.align	2
.LC1:
	.ascii	"expected success or access denied, got %i\012\000"
	.align	2
.LC2:
	.ascii	"RegOpenKeyExA succeeded but returned NULL hkey\012\000"
	.align	2
.LC3:
	.ascii	"RegOpenKeyExA failed but returned hkey %p\012\000"
	.align	2
.LC4:
	.ascii	"running as limited user\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_user_privs, %function
check_user_privs:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r2, .L11
	ldr	r3, .L11+4
	sub	sp, sp, #20
	ldr	r0, [r2]
	ldr	r3, [r3]
	ldr	r1, .L11+8
	ldr	ip, .L11+12
	ldr	lr, .L11+16
	add	r2, sp, #8
	orr	r3, r0, r3
	ldr	r0, [r1]
	str	r2, [sp]
	ldr	r1, .L11+20
	mov	r2, #0
	ldr	lr, [lr]
	str	lr, [sp, #12]
	mov	lr,#0
	str	ip, [sp, #8]
	bl	RegOpenKeyExA
	mov	r4, r0
	ldr	r5, .L11+24
	mov	r2, r4
	ldr	r3, [r5]
	ldr	r1, .L11+28
	cmp	r3, r0
	ldrne	r3, .L11+32
	moveq	r0, #1
	ldrne	r0, [r3]
	subne	r0, r0, r4
	clzne	r0, r0
	lsrne	r0, r0, #5
	bl	ok
	ldr	r3, [r5]
	cmp	r3, r4
	beq	.L9
	ldr	r2, [sp, #8]
	ldr	r1, .L11+36
	clz	r0, r2
	lsr	r0, r0, #5
	bl	ok
	ldr	r2, .L11+40
	ldr	r3, .L11+44
	ldr	r2, [r2]
	ldr	r0, .L11+48
	str	r2, [r3]
	bl	trace
.L1:
	ldr	r3, .L11+16
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, pc}
.L9:
	ldr	r0, [sp, #8]
	ldr	r1, .L11+52
	subs	r0, r0, #0
	movne	r0, #1
	bl	ok
	ldr	r0, [sp, #8]
	bl	RegCloseKey
	b	.L1
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	KEY_READ
	.word	KEY_WRITE
	.word	HKEY_LOCAL_MACHINE
	.word	-559038737
	.word	.LC5
	.word	.LC0
	.word	ERROR_SUCCESS
	.word	.LC1
	.word	ERROR_ACCESS_DENIED
	.word	.LC3
	.word	TRUE
	.word	limited_user
	.word	.LC4
	.word	.LC2
	.size	check_user_privs, .-check_user_privs
	.comm	limited_user,4,4
	.comm	TRUE,4,4
	.comm	KEY_WRITE,4,4
	.comm	KEY_READ,4,4
	.comm	HKEY_LOCAL_MACHINE,4,4
	.comm	ERROR_SUCCESS,4,4
	.comm	ERROR_ACCESS_DENIED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
