	.file	"extr_actctx.c_find_query_actctx.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	find_query_actctx, @function
find_query_actctx:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	r12d, DWORD PTR STATUS_SUCCESS[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rdi]
	test	DWORD PTR RTL_QUERY_ACTIVATION_CONTEXT_FLAG_USE_ACTIVE_ACTIVATION_CONTEXT[rip], esi
	je	.L2
	test	rax, rax
	je	.L3
.L15:
	mov	r12d, DWORD PTR STATUS_INVALID_PARAMETER[rip]
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	xor	eax, eax
	call	NtCurrentTeb@PLT
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR [rax], 0
	je	.L1
	xor	eax, eax
	call	NtCurrentTeb@PLT
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 0[rbp], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	ecx, DWORD PTR RTL_QUERY_ACTIVATION_CONTEXT_FLAG_IS_ADDRESS[rip]
	or	ecx, DWORD PTR RTL_QUERY_ACTIVATION_CONTEXT_FLAG_IS_HMODULE[rip]
	mov	ebx, esi
	test	ecx, esi
	je	.L5
	test	rax, rax
	je	.L15
	xor	esi, esi
	xor	edi, edi
	lea	rdx, 12[rsp]
	call	LdrLockLoaderLock@PLT
	mov	rdi, QWORD PTR 0[rbp]
	lea	rsi, 16[rsp]
	call	LdrFindEntryForAddress@PLT
	test	eax, eax
	jne	.L7
	mov	rax, QWORD PTR 16[rsp]
	test	DWORD PTR RTL_QUERY_ACTIVATION_CONTEXT_FLAG_IS_HMODULE[rip], ebx
	je	.L8
	mov	rcx, QWORD PTR [rax]
	cmp	QWORD PTR 0[rbp], rcx
	je	.L8
.L7:
	mov	r12d, DWORD PTR STATUS_DLL_NOT_FOUND[rip]
.L9:
	mov	esi, DWORD PTR 12[rsp]
	xor	edi, edi
	call	LdrUnlockLoaderLock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	test	rax, rax
	jne	.L1
	cmp	QWORD PTR ActivationContextBasicInformation[rip], rdx
	je	.L1
	mov	rax, QWORD PTR process_actctx[rip]
	mov	QWORD PTR [rdi], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR 0[rbp], rax
	jmp	.L9
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	find_query_actctx, .-find_query_actctx
	.comm	process_actctx,8,8
	.comm	STATUS_SUCCESS,4,4
	.comm	STATUS_INVALID_PARAMETER,4,4
	.comm	STATUS_DLL_NOT_FOUND,4,4
	.comm	RTL_QUERY_ACTIVATION_CONTEXT_FLAG_USE_ACTIVE_ACTIVATION_CONTEXT,4,4
	.comm	RTL_QUERY_ACTIVATION_CONTEXT_FLAG_IS_HMODULE,4,4
	.comm	RTL_QUERY_ACTIVATION_CONTEXT_FLAG_IS_ADDRESS,4,4
	.comm	ActivationContextBasicInformation,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_actctx.c_find_query_actctx.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_query_actctx, %function
find_query_actctx:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, r1
	mov	r5, r0
	ldr	r3, .L21
	ldr	r0, .L21+4
	ldr	r1, [r3]
	ldr	r3, .L21+8
	sub	sp, sp, #20
	ands	r1, r4, r1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r6, [r0]
	ldr	r3, [r5]
	beq	.L2
	cmp	r3, #0
	beq	.L3
.L18:
	ldr	r3, .L21+12
	ldr	r6, [r3]
.L1:
	ldr	r3, .L21+8
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L3:
	bl	NtCurrentTeb
	ldr	r3, [r0]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L1
	bl	NtCurrentTeb
	ldr	r3, [r0]
	ldr	r3, [r3]
	ldr	r3, [r3]
	str	r3, [r5]
	b	.L1
.L2:
	ldr	r0, .L21+16
	ldr	r7, .L21+20
	ldr	r0, [r0]
	ldr	ip, [r7]
	orr	r0, r0, ip
	tst	r0, r4
	beq	.L5
	cmp	r3, #0
	beq	.L18
	mov	r0, r1
	add	r2, sp, #4
	bl	LdrLockLoaderLock
	ldr	r0, [r5]
	add	r1, sp, #8
	bl	LdrFindEntryForAddress
	cmp	r0, #0
	bne	.L7
	ldr	r2, [r7]
	ldr	r3, [sp, #8]
	tst	r4, r2
	beq	.L8
	ldr	r1, [r5]
	ldr	r2, [r3]
	cmp	r1, r2
	beq	.L8
.L7:
	ldr	r3, .L21+24
	ldr	r6, [r3]
.L9:
	ldr	r1, [sp, #4]
	mov	r0, #0
	bl	LdrUnlockLoaderLock
	b	.L1
.L5:
	cmp	r3, #0
	bne	.L1
	ldr	r3, .L21+28
	ldr	r3, [r3]
	cmp	r3, r2
	ldrne	r3, .L21+32
	ldrne	r3, [r3]
	strne	r3, [r5]
	b	.L1
.L8:
	ldr	r3, [r3, #4]
	str	r3, [r5]
	b	.L9
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	RTL_QUERY_ACTIVATION_CONTEXT_FLAG_USE_ACTIVE_ACTIVATION_CONTEXT
	.word	STATUS_SUCCESS
	.word	.LC0
	.word	STATUS_INVALID_PARAMETER
	.word	RTL_QUERY_ACTIVATION_CONTEXT_FLAG_IS_ADDRESS
	.word	RTL_QUERY_ACTIVATION_CONTEXT_FLAG_IS_HMODULE
	.word	STATUS_DLL_NOT_FOUND
	.word	ActivationContextBasicInformation
	.word	process_actctx
	.size	find_query_actctx, .-find_query_actctx
	.comm	process_actctx,4,4
	.comm	STATUS_SUCCESS,4,4
	.comm	STATUS_INVALID_PARAMETER,4,4
	.comm	STATUS_DLL_NOT_FOUND,4,4
	.comm	RTL_QUERY_ACTIVATION_CONTEXT_FLAG_USE_ACTIVE_ACTIVATION_CONTEXT,4,4
	.comm	RTL_QUERY_ACTIVATION_CONTEXT_FLAG_IS_HMODULE,4,4
	.comm	RTL_QUERY_ACTIVATION_CONTEXT_FLAG_IS_ADDRESS,4,4
	.comm	ActivationContextBasicInformation,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
