	.file	"extr_info.c_test_mapprotection.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Invalid Parameter on ProcessExecuteFlags query?\n"
	.align 8
.LC1:
	.string	"Expected STATUS_SUCCESS, got %08x\n"
	.align 8
.LC2:
	.string	"trying to execute code in the readwrite only mapped anon file...\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"...done.\n"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"addr.Protect is not PAGE_READWRITE, but 0x%x\n"
	.text
	.p2align 4
	.type	test_mapprotection, @function
test_mapprotection:
.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
	sub	rsp, 96
	.cfi_def_cfa_offset 128
	mov	r13d, DWORD PTR ProcessExecuteFlags[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 88[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR MEM_EXECUTE_OPTION_ENABLE[rip]
	lea	r12, 20[rsp]
	mov	DWORD PTR 28[rsp], eax
	xor	eax, eax
	call	GetCurrentProcess@PLT
	lea	r8, 24[rsp]
	mov	rdx, r12
	mov	esi, r13d
	mov	edi, eax
	mov	ecx, 4
	call	pNtQueryInformationProcess@PLT
	cmp	DWORD PTR STATUS_INVALID_PARAMETER[rip], eax
	je	.L11
	cmp	DWORD PTR STATUS_SUCCESS[rip], eax
	mov	edx, eax
	mov	edi, 1
	je	.L4
	xor	edi, edi
	cmp	DWORD PTR STATUS_INVALID_INFO_CLASS[rip], eax
	sete	dil
.L4:
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	ok@PLT
	mov	r13d, DWORD PTR ProcessExecuteFlags[rip]
	xor	eax, eax
	call	GetCurrentProcess@PLT
	lea	rdx, 28[rsp]
	mov	ecx, 4
	mov	edi, eax
	mov	esi, r13d
	call	pNtSetInformationProcess@PLT
	cmp	DWORD PTR STATUS_SUCCESS[rip], eax
	mov	edi, 1
	mov	edx, eax
	je	.L5
	xor	edi, edi
	cmp	DWORD PTR STATUS_INVALID_INFO_CLASS[rip], eax
	sete	dil
.L5:
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	ok@PLT
	mov	DWORD PTR 48[rsp], 8192
	xor	edx, edx
	lea	rcx, 48[rsp]
	mov	QWORD PTR 56[rsp], 0
	lea	rdi, 12[rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 136
	mov	r8d, DWORD PTR PAGE_READWRITE[rip]
	mov	esi, DWORD PTR STANDARD_RIGHTS_REQUIRED[rip]
	mov	r9d, DWORD PTR SEC_COMMIT[rip]
	push	0
	.cfi_def_cfa_offset 144
	or	r9d, DWORD PTR SEC_NOCACHE[rip]
	or	esi, DWORD PTR SECTION_QUERY[rip]
	or	esi, DWORD PTR SECTION_MAP_READ[rip]
	or	esi, DWORD PTR SECTION_MAP_WRITE[rip]
	or	esi, DWORD PTR SECTION_MAP_EXECUTE[rip]
	call	pNtCreateSection@PLT
	xor	edi, edi
	cmp	DWORD PTR STATUS_SUCCESS[rip], eax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	edx, eax
	xor	eax, eax
	call	ok@PLT
	mov	r14d, DWORD PTR PAGE_READWRITE[rip]
	xor	eax, eax
	mov	r13d, DWORD PTR ViewShare[rip]
	mov	DWORD PTR 80[rsp], 0
	mov	QWORD PTR 88[rsp], 0
	mov	DWORD PTR 52[rsp], 8192
	mov	QWORD PTR 56[rsp], 0
	call	GetCurrentProcess@PLT
	lea	rdx, 56[rsp]
	push	r14
	.cfi_def_cfa_offset 152
	xor	r8d, r8d
	push	0
	.cfi_def_cfa_offset 160
	mov	esi, eax
	xor	ecx, ecx
	push	r13
	.cfi_def_cfa_offset 168
	lea	rax, 76[rsp]
	push	rax
	.cfi_def_cfa_offset 176
	mov	edi, DWORD PTR 60[rsp]
	lea	r9, 112[rsp]
	call	pNtMapViewOfSection@PLT
	add	rsp, 48
	.cfi_def_cfa_offset 128
	xor	edi, edi
	cmp	DWORD PTR STATUS_SUCCESS[rip], eax
	sete	dil
	mov	edx, eax
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	ok@PLT
	mov	rax, QWORD PTR 40[rsp]
	lea	rdi, .LC2[rip]
	mov	BYTE PTR [rax], -61
	call	trace@PLT
	call	[QWORD PTR 40[rsp]]
	lea	rdi, .LC3[rip]
	call	trace@PLT
	mov	r13, QWORD PTR 40[rsp]
	mov	r14d, DWORD PTR MemoryBasicInformation[rip]
	xor	eax, eax
	call	GetCurrentProcess@PLT
	lea	rcx, 16[rsp]
	lea	r9, 32[rsp]
	mov	r8d, 4
	mov	rsi, r13
	mov	edi, eax
	mov	edx, r14d
	call	pNtQueryVirtualMemory@PLT
	xor	edi, edi
	cmp	DWORD PTR STATUS_SUCCESS[rip], eax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	r13d, eax
	mov	edx, eax
	xor	eax, eax
	call	ok@PLT
	xor	edi, edi
	mov	edx, r13d
	cmp	DWORD PTR 32[rsp], 4
	sete	dil
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	ok@PLT
	mov	eax, DWORD PTR PAGE_NOCACHE[rip]
	mov	edx, DWORD PTR 16[rsp]
	xor	edi, edi
	lea	rsi, .LC4[rip]
	not	eax
	and	eax, edx
	cmp	eax, DWORD PTR PAGE_READWRITE[rip]
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	rax, QWORD PTR 40[rsp]
	lea	r13, 4176[rax]
	xor	eax, eax
	call	GetCurrentProcess@PLT
	mov	rsi, r13
	mov	edi, eax
	call	pNtUnmapViewOfSection@PLT
	xor	edi, edi
	cmp	DWORD PTR STATUS_SUCCESS[rip], eax
	lea	rsi, .LC1[rip]
	sete	dil
	mov	edx, eax
	xor	eax, eax
	call	ok@PLT
	mov	edi, DWORD PTR 12[rsp]
	call	pNtClose@PLT
	mov	r13d, DWORD PTR ProcessExecuteFlags[rip]
	xor	eax, eax
	call	GetCurrentProcess@PLT
	mov	ecx, 4
	mov	rdx, r12
	mov	edi, eax
	mov	esi, r13d
	call	pNtSetInformationProcess@PLT
.L1:
	mov	rax, QWORD PTR 88[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L12
	add	rsp, 96
	.cfi_remember_state
	.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
	lea	rdi, .LC0[rip]
	call	skip@PLT
	jmp	.L1
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	test_mapprotection, .-test_mapprotection
	.comm	ViewShare,4,4
	.comm	STATUS_SUCCESS,4,4
	.comm	STATUS_INVALID_PARAMETER,4,4
	.comm	STATUS_INVALID_INFO_CLASS,4,4
	.comm	STANDARD_RIGHTS_REQUIRED,4,4
	.comm	SEC_NOCACHE,4,4
	.comm	SEC_COMMIT,4,4
	.comm	SECTION_QUERY,4,4
	.comm	SECTION_MAP_WRITE,4,4
	.comm	SECTION_MAP_READ,4,4
	.comm	SECTION_MAP_EXECUTE,4,4
	.comm	ProcessExecuteFlags,4,4
	.comm	PAGE_READWRITE,4,4
	.comm	PAGE_NOCACHE,4,4
	.comm	MemoryBasicInformation,4,4
	.comm	MEM_EXECUTE_OPTION_ENABLE,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_info.c_test_mapprotection.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Invalid Parameter on ProcessExecuteFlags query?\012"
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"Expected STATUS_SUCCESS, got %08x\012\000"
	.align	2
.LC2:
	.ascii	"trying to execute code in the readwrite only mapped"
	.ascii	" anon file...\012\000"
	.align	2
.LC3:
	.ascii	"...done.\012\000"
	.align	2
.LC4:
	.ascii	"addr.Protect is not PAGE_READWRITE, but 0x%x\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_mapprotection, %function
test_mapprotection:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L13
	ldr	r2, .L13+4
	ldr	r3, [r3]
	sub	sp, sp, #84
	ldr	r5, .L13+8
	ldr	r2, [r2]
	str	r2, [sp, #76]
	mov	r2,#0
	str	r3, [sp, #48]
	bl	GetCurrentProcess
	add	r3, sp, #44
	str	r3, [sp]
	ldr	r1, [r5]
	mov	r3, #4
	add	r2, sp, #40
	bl	pNtQueryInformationProcess
	ldr	r3, .L13+12
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L11
	mov	r2, r0
	ldr	r6, .L13+16
	ldr	r1, .L13+20
	ldr	r3, [r6]
	mov	r4, #0
	cmp	r3, r0
	ldrne	r3, .L13+24
	moveq	r0, #1
	ldrne	r0, [r3]
	mov	r7, #8192
	subne	r0, r0, r2
	clzne	r0, r0
	lsrne	r0, r0, #5
	bl	ok
	bl	GetCurrentProcess
	mov	r3, #4
	ldr	r1, [r5]
	add	r2, sp, #48
	bl	pNtSetInformationProcess
	mov	r2, r0
	ldr	r3, [r6]
	ldr	r1, .L13+20
	cmp	r3, r0
	ldrne	r3, .L13+24
	moveq	r0, #1
	ldrne	r0, [r3]
	ldr	r8, .L13+28
	subne	r0, r0, r2
	clzne	r0, r0
	lsrne	r0, r0, #5
	bl	ok
	ldr	r2, .L13+32
	ldr	r3, .L13+36
	ldr	r1, .L13+40
	ldr	lr, [r2]
	ldr	r3, [r3]
	ldr	r0, .L13+44
	ldr	r1, [r1]
	ldr	r2, .L13+48
	ldr	ip, .L13+52
	ldr	r0, [r0]
	orr	r3, r3, lr
	ldr	lr, .L13+56
	ldr	ip, [ip]
	ldr	r2, [r2]
	orr	r3, r3, r1
	orr	r3, r3, r0
	ldr	r1, [lr]
	ldr	r0, [r8]
	orr	r2, r2, ip
	stm	sp, {r0, r2, r4}
	orr	r1, r3, r1
	mov	r2, r4
	add	r3, sp, #60
	add	r0, sp, #28
	str	r4, [sp, #64]
	str	r7, [sp, #60]
	bl	pNtCreateSection
	mov	r2, r0
	ldr	r0, [r6]
	ldr	r1, .L13+20
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r9, [sp, #28]
	str	r7, [sp, #56]
	str	r4, [sp, #68]
	str	r4, [sp, #72]
	str	r4, [sp, #32]
	bl	GetCurrentProcess
	ldr	r3, .L13+60
	ldr	r7, [r8]
	ldr	lr, [r3]
	add	ip, sp, #56
	add	r2, sp, #68
	stmib	sp, {r2, ip, lr}
	mov	r3, r4
	mov	r1, r0
	str	r4, [sp, #16]
	str	r4, [sp]
	str	r7, [sp, #20]
	add	r2, sp, #32
	mov	r0, r9
	bl	pNtMapViewOfSection
	mov	r2, r0
	ldr	r0, [r6]
	mov	r7, #4
	sub	r0, r0, r2
	clz	r0, r0
	ldr	r1, .L13+20
	lsr	r0, r0, #5
	bl	ok
	ldr	r2, .L13+64
	ldr	r3, [sp, #32]
	ldr	r0, .L13+68
	str	r2, [r3]
	bl	trace
	ldr	r3, [sp, #32]
	blx	r3
	ldr	r0, .L13+72
	bl	trace
	bl	GetCurrentProcess
	ldr	r2, .L13+76
	add	r3, sp, #52
	str	r7, [sp]
	ldr	r2, [r2]
	ldr	r1, [sp, #32]
	str	r3, [sp, #4]
	add	r3, sp, #36
	bl	pNtQueryVirtualMemory
	mov	r4, r0
	ldr	r0, [r6]
	mov	r2, r4
	sub	r0, r0, r4
	clz	r0, r0
	ldr	r1, .L13+20
	lsr	r0, r0, #5
	bl	ok
	ldr	r0, [sp, #52]
	mov	r2, r4
	sub	r0, r0, r7
	clz	r0, r0
	ldr	r1, .L13+20
	lsr	r0, r0, #5
	bl	ok
	ldr	r3, .L13+80
	ldr	r2, [sp, #36]
	ldr	r3, [r3]
	ldr	r0, [r8]
	bic	r3, r2, r3
	sub	r0, r3, r0
	clz	r0, r0
	ldr	r1, .L13+84
	lsr	r0, r0, #5
	bl	ok
	bl	GetCurrentProcess
	ldr	r1, [sp, #32]
	add	r1, r1, #4160
	add	r1, r1, #16
	bl	pNtUnmapViewOfSection
	mov	r2, r0
	ldr	r0, [r6]
	ldr	r1, .L13+20
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r0, [sp, #28]
	bl	pNtClose
	bl	GetCurrentProcess
	mov	r3, r7
	ldr	r1, [r5]
	add	r2, sp, #40
	bl	pNtSetInformationProcess
.L1:
	ldr	r3, .L13+4
	ldr	r2, [r3]
	ldr	r3, [sp, #76]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	add	sp, sp, #84
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L11:
	ldr	r0, .L13+88
	bl	skip
	b	.L1
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	MEM_EXECUTE_OPTION_ENABLE
	.word	.LC5
	.word	ProcessExecuteFlags
	.word	STATUS_INVALID_PARAMETER
	.word	STATUS_SUCCESS
	.word	.LC1
	.word	STATUS_INVALID_INFO_CLASS
	.word	PAGE_READWRITE
	.word	SECTION_QUERY
	.word	STANDARD_RIGHTS_REQUIRED
	.word	SECTION_MAP_READ
	.word	SECTION_MAP_WRITE
	.word	SEC_COMMIT
	.word	SEC_NOCACHE
	.word	SECTION_MAP_EXECUTE
	.word	ViewShare
	.word	-516948194
	.word	.LC2
	.word	.LC3
	.word	MemoryBasicInformation
	.word	PAGE_NOCACHE
	.word	.LC4
	.word	.LC0
	.size	test_mapprotection, .-test_mapprotection
	.comm	ViewShare,4,4
	.comm	STATUS_SUCCESS,4,4
	.comm	STATUS_INVALID_PARAMETER,4,4
	.comm	STATUS_INVALID_INFO_CLASS,4,4
	.comm	STANDARD_RIGHTS_REQUIRED,4,4
	.comm	SEC_NOCACHE,4,4
	.comm	SEC_COMMIT,4,4
	.comm	SECTION_QUERY,4,4
	.comm	SECTION_MAP_WRITE,4,4
	.comm	SECTION_MAP_READ,4,4
	.comm	SECTION_MAP_EXECUTE,4,4
	.comm	ProcessExecuteFlags,4,4
	.comm	PAGE_READWRITE,4,4
	.comm	PAGE_NOCACHE,4,4
	.comm	MemoryBasicInformation,4,4
	.comm	MEM_EXECUTE_OPTION_ENABLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
