	.file	"extr_info.c_test_query_process_debug_port.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"debuggee"
.LC1:
	.string	"%s %s %s"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"CreateProcess failed, last error %#x.\n"
	.align 8
.LC3:
	.string	"Expected STATUS_INFO_LENGTH_MISMATCH, got %#x.\n"
	.align 8
.LC4:
	.string	"Expected STATUS_INVALID_HANDLE, got %#x.\n"
	.align 8
.LC5:
	.string	"Expected STATUS_ACCESS_VIOLATION, got %#x.\n"
	.align 8
.LC6:
	.string	"NtQueryInformationProcess failed, status %#x.\n"
	.section	.rodata.str1.1
.LC7:
	.string	"Expected port 0, got %#lx.\n"
	.section	.rodata.str1.8
	.align 8
.LC8:
	.string	"Expected port %#lx, got %#lx.\n"
	.align 8
.LC9:
	.string	"WaitForDebugEvent failed, last error %#x.\n"
	.align 8
.LC10:
	.string	"ContinueDebugEvent failed, last error %#x.\n"
	.align 8
.LC11:
	.string	"CloseHandle failed, last error %#x.\n"
	.text
	.p2align 4
	.type	test_query_process_debug_port, @function
test_query_process_debug_port:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 64
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	eax, 3735928559
	mov	rcx, rsp
	mov	r14, rsp
	mov	QWORD PTR -96[rbp], rax
	movsx	rax, DWORD PTR MAX_PATH[rip]
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L24:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L24
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L25
.L4:
	mov	rcx, QWORD PTR 8[rsi]
	mov	rdx, QWORD PTR [rsi]
	mov	rdi, rsp
	mov	r12, rsp
	lea	r8, .LC0[rip]
	lea	rsi, .LC1[rip]
	mov	QWORD PTR -88[rbp], 0
	call	sprintf@PLT
	lea	rax, -80[rbp]
	xor	edx, edx
	xor	edi, edi
	mov	r9d, DWORD PTR DEBUG_PROCESS[rip]
	mov	r8d, DWORD PTR FALSE[rip]
	xor	ecx, ecx
	mov	rsi, r12
	mov	DWORD PTR -88[rbp], 8
	push	rax
	lea	rax, -88[rbp]
	push	rax
	push	0
	push	0
	call	CreateProcessA@PLT
	add	rsp, 32
	mov	ebx, eax
	xor	eax, eax
	call	GetLastError@PLT
	lea	rsi, .LC2[rip]
	mov	edi, ebx
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	test	ebx, ebx
	jne	.L5
.L22:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	mov	rsp, r14
	jne	.L26
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	esi, DWORD PTR ProcessDebugPort[rip]
	xor	r8d, r8d
	xor	ecx, ecx
	xor	edx, edx
	xor	edi, edi
	call	pNtQueryInformationProcess@PLT
	xor	edi, edi
	cmp	QWORD PTR STATUS_INFO_LENGTH_MISMATCH[rip], rax
	lea	rsi, .LC3[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	esi, DWORD PTR ProcessDebugPort[rip]
	xor	edx, edx
	xor	edi, edi
	xor	r8d, r8d
	mov	ecx, 8
	call	pNtQueryInformationProcess@PLT
	cmp	QWORD PTR STATUS_INVALID_HANDLE[rip], rax
	mov	edi, 1
	mov	rdx, rax
	je	.L7
	xor	edi, edi
	cmp	QWORD PTR STATUS_ACCESS_VIOLATION[rip], rax
	sete	dil
.L7:
	lea	rsi, .LC4[rip]
	xor	eax, eax
	call	ok@PLT
	mov	r12d, DWORD PTR ProcessDebugPort[rip]
	xor	eax, eax
	call	GetCurrentProcess@PLT
	xor	r8d, r8d
	mov	ecx, 8
	xor	edx, edx
	mov	esi, r12d
	mov	rdi, rax
	lea	r12, -96[rbp]
	call	pNtQueryInformationProcess@PLT
	xor	edi, edi
	cmp	QWORD PTR STATUS_ACCESS_VIOLATION[rip], rax
	lea	rsi, .LC5[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	esi, DWORD PTR ProcessDebugPort[rip]
	xor	r8d, r8d
	xor	edi, edi
	mov	ecx, 8
	mov	rdx, r12
	call	pNtQueryInformationProcess@PLT
	xor	edi, edi
	cmp	QWORD PTR STATUS_INVALID_HANDLE[rip], rax
	lea	rsi, .LC4[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	r13d, DWORD PTR ProcessDebugPort[rip]
	xor	eax, eax
	call	GetCurrentProcess@PLT
	xor	r8d, r8d
	mov	ecx, 7
	mov	rdx, r12
	mov	esi, r13d
	mov	rdi, rax
	call	pNtQueryInformationProcess@PLT
	xor	edi, edi
	cmp	QWORD PTR STATUS_INFO_LENGTH_MISMATCH[rip], rax
	lea	rsi, .LC3[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	r13d, DWORD PTR ProcessDebugPort[rip]
	xor	eax, eax
	call	GetCurrentProcess@PLT
	xor	r8d, r8d
	mov	ecx, 9
	mov	rdx, r12
	mov	esi, r13d
	mov	rdi, rax
	call	pNtQueryInformationProcess@PLT
	xor	edi, edi
	cmp	QWORD PTR STATUS_INFO_LENGTH_MISMATCH[rip], rax
	lea	rsi, .LC3[rip]
	sete	dil
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	r13d, DWORD PTR ProcessDebugPort[rip]
	xor	eax, eax
	call	GetCurrentProcess@PLT
	xor	r8d, r8d
	mov	ecx, 8
	mov	rdx, r12
	mov	esi, r13d
	mov	rdi, rax
	lea	r13, -64[rbp]
	call	pNtQueryInformationProcess@PLT
	xor	edi, edi
	lea	rsi, .LC6[rip]
	test	rax, rax
	mov	rdx, rax
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	rdx, QWORD PTR -96[rbp]
	xor	edi, edi
	lea	rsi, .LC7[rip]
	test	rdx, rdx
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR -80[rbp]
	xor	r8d, r8d
	mov	rdx, r12
	mov	esi, DWORD PTR ProcessDebugPort[rip]
	mov	ecx, 8
	lea	r12, .LC9[rip]
	call	pNtQueryInformationProcess@PLT
	xor	edi, edi
	lea	rsi, .LC6[rip]
	test	rax, rax
	mov	rdx, rax
	sete	dil
	xor	eax, eax
	call	ok@PLT
	mov	rcx, QWORD PTR -96[rbp]
	xor	edi, edi
	mov	rdx, -1
	lea	rsi, .LC8[rip]
	cmp	rcx, -1
	sete	dil
	xor	eax, eax
	call	ok@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rax, QWORD PTR EXIT_PROCESS_DEBUG_EVENT[rip]
	cmp	QWORD PTR -64[rbp], rax
	je	.L8
	mov	edx, DWORD PTR DBG_CONTINUE[rip]
	mov	esi, DWORD PTR -56[rbp]
	mov	edi, DWORD PTR -52[rbp]
	call	ContinueDebugEvent@PLT
	mov	ebx, eax
	xor	eax, eax
	call	GetLastError@PLT
	lea	rsi, .LC10[rip]
	mov	edi, ebx
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	test	ebx, ebx
	je	.L8
.L9:
	mov	esi, DWORD PTR INFINITE[rip]
	mov	rdi, r13
	call	WaitForDebugEvent@PLT
	mov	ebx, eax
	xor	eax, eax
	call	GetLastError@PLT
	mov	rsi, r12
	mov	edi, ebx
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	test	ebx, ebx
	jne	.L27
.L8:
	mov	rdi, QWORD PTR -72[rbp]
	call	CloseHandle@PLT
	mov	r12d, eax
	xor	eax, eax
	call	GetLastError@PLT
	lea	rsi, .LC11[rip]
	mov	edi, r12d
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	mov	rdi, QWORD PTR -80[rbp]
	call	CloseHandle@PLT
	mov	r12d, eax
	xor	eax, eax
	call	GetLastError@PLT
	lea	rsi, .LC11[rip]
	mov	edi, r12d
	mov	rdx, rax
	xor	eax, eax
	call	ok@PLT
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L25:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	test_query_process_debug_port, .-test_query_process_debug_port
	.comm	STATUS_INVALID_HANDLE,8,8
	.comm	STATUS_INFO_LENGTH_MISMATCH,8,8
	.comm	STATUS_ACCESS_VIOLATION,8,8
	.comm	ProcessDebugPort,4,4
	.comm	MAX_PATH,4,4
	.comm	INFINITE,4,4
	.comm	FALSE,4,4
	.comm	EXIT_PROCESS_DEBUG_EVENT,8,8
	.comm	DEBUG_PROCESS,4,4
	.comm	DBG_CONTINUE,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_query_process_debug_port.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s %s %s\000"
	.align	2
.LC1:
	.ascii	"debuggee\000"
	.align	2
.LC2:
	.ascii	"CreateProcess failed, last error %#x.\012\000"
	.align	2
.LC3:
	.ascii	"Expected STATUS_INFO_LENGTH_MISMATCH, got %#x.\012\000"
	.align	2
.LC4:
	.ascii	"Expected STATUS_INVALID_HANDLE, got %#x.\012\000"
	.align	2
.LC5:
	.ascii	"Expected STATUS_ACCESS_VIOLATION, got %#x.\012\000"
	.align	2
.LC6:
	.ascii	"NtQueryInformationProcess failed, status %#x.\012\000"
	.align	2
.LC7:
	.ascii	"Expected port 0, got %#lx.\012\000"
	.align	2
.LC8:
	.ascii	"Expected port %#lx, got %#lx.\012\000"
	.align	2
.LC9:
	.ascii	"WaitForDebugEvent failed, last error %#x.\012\000"
	.align	2
.LC10:
	.ascii	"ContinueDebugEvent failed, last error %#x.\012\000"
	.align	2
.LC11:
	.ascii	"CloseHandle failed, last error %#x.\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_query_process_debug_port, %function
test_query_process_debug_port:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #68
	ldr	r3, .L20
	mov	r10, sp
	ldr	r3, [r3]
	mov	r4, #0
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r5, sp
	ldm	r1, {r2, r3}
	ldr	ip, .L20+4
	ldr	r0, .L20+8
	ldr	r1, .L20+12
	sub	r6, fp, #60
	ldr	r1, [r1]
	str	r1, [fp, #-40]
	mov	r1,#0
	str	ip, [fp, #-72]
	str	r4, [fp, #-60]
	str	r4, [fp, #-56]
	str	r0, [r5], #24
	mov	r0, r5
	ldr	r1, .L20+16
	bl	sprintf
	mov	r1, #8
	ldr	r3, .L20+20
	sub	r2, fp, #68
	str	r1, [fp, #-60]
	str	r6, [sp, #16]
	str	r4, [sp, #12]
	str	r4, [sp, #8]
	str	r2, [sp, #20]
	ldr	r2, [r3]
	ldr	r3, .L20+24
	str	r2, [sp, #4]
	ldr	r3, [r3]
	mov	r1, r5
	mov	r2, r4
	str	r3, [sp]
	mov	r0, r4
	mov	r3, r4
	bl	CreateProcessA
	mov	r5, r0
	bl	GetLastError
	ldr	r1, .L20+28
	mov	r2, r0
	mov	r0, r5
	bl	ok
	cmp	r5, r4
	bne	.L2
.L16:
	ldr	r3, .L20+12
	mov	sp, r10
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r5, .L20+32
	mov	r3, r4
	ldr	r1, [r5]
	mov	r2, r4
	mov	r0, r4
	str	r4, [sp]
	bl	pNtQueryInformationProcess
	mov	r2, r0
	ldr	r6, .L20+36
	ldr	r1, .L20+40
	ldr	r0, [r6]
	ldr	r7, .L20+44
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r1, [r5]
	mov	r2, r4
	mov	r3, #4
	mov	r0, r4
	str	r4, [sp]
	bl	pNtQueryInformationProcess
	mov	r2, r0
	ldr	r3, [r7]
	mov	r4, #0
	cmp	r3, r0
	ldrne	r8, .L20+48
	moveq	r0, #1
	ldrne	r0, [r8]
	ldr	r1, .L20+52
	subne	r0, r0, r2
	clzne	r0, r0
	lsrne	r0, r0, #5
	ldreq	r8, .L20+48
	bl	ok
	bl	GetCurrentProcess
	ldr	r1, [r5]
	mov	r3, #4
	mov	r2, r4
	str	r4, [sp]
	bl	pNtQueryInformationProcess
	mov	r2, r0
	ldr	r0, [r8]
	ldr	r1, .L20+56
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	mov	r3, #4
	ldr	r1, [r5]
	sub	r2, fp, #72
	mov	r0, r4
	str	r4, [sp]
	bl	pNtQueryInformationProcess
	mov	r2, r0
	ldr	r0, [r7]
	ldr	r1, .L20+52
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	bl	GetCurrentProcess
	mov	r3, #3
	ldr	r1, [r5]
	sub	r2, fp, #72
	str	r4, [sp]
	bl	pNtQueryInformationProcess
	mov	r2, r0
	ldr	r0, [r6]
	ldr	r1, .L20+40
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	bl	GetCurrentProcess
	mov	r3, #5
	ldr	r1, [r5]
	sub	r2, fp, #72
	str	r4, [sp]
	bl	pNtQueryInformationProcess
	mov	r2, r0
	ldr	r0, [r6]
	ldr	r1, .L20+40
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	bl	GetCurrentProcess
	mov	r3, #4
	ldr	r1, [r5]
	sub	r2, fp, #72
	str	r4, [sp]
	bl	pNtQueryInformationProcess
	mov	r2, r0
	clz	r0, r0
	ldr	r1, .L20+60
	lsr	r0, r0, #5
	bl	ok
	ldr	r2, [fp, #-72]
	ldr	r1, .L20+64
	clz	r0, r2
	lsr	r0, r0, #5
	bl	ok
	ldr	r1, [r5]
	mov	r3, #4
	ldr	r0, [fp, #-68]
	sub	r2, fp, #72
	str	r4, [sp]
	bl	pNtQueryInformationProcess
	mov	r2, r0
	clz	r0, r0
	ldr	r1, .L20+60
	lsr	r0, r0, #5
	bl	ok
	mvn	r2, #0
	ldr	r3, [fp, #-72]
	ldr	r1, .L20+68
	sub	r0, r3, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ok
	ldr	r6, .L20+72
	ldr	r5, .L20+76
	ldr	r7, .L20+80
	ldr	r9, .L20+84
	ldr	r8, .L20+88
	b	.L6
.L19:
	ldr	r2, [fp, #-52]
	ldr	r3, [r7]
	cmp	r2, r3
	beq	.L5
	ldr	r2, [r9]
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-44]
	bl	ContinueDebugEvent
	mov	r4, r0
	bl	GetLastError
	mov	r1, r8
	mov	r2, r0
	mov	r0, r4
	bl	ok
	cmp	r4, #0
	beq	.L5
.L6:
	ldr	r1, [r6]
	sub	r0, fp, #52
	bl	WaitForDebugEvent
	mov	r4, r0
	bl	GetLastError
	mov	r1, r5
	mov	r2, r0
	mov	r0, r4
	bl	ok
	cmp	r4, #0
	bne	.L19
.L5:
	ldr	r0, [fp, #-64]
	bl	CloseHandle
	mov	r4, r0
	bl	GetLastError
	ldr	r1, .L20+92
	mov	r2, r0
	mov	r0, r4
	bl	ok
	ldr	r0, [fp, #-68]
	bl	CloseHandle
	mov	r4, r0
	bl	GetLastError
	ldr	r1, .L20+92
	mov	r2, r0
	mov	r0, r4
	bl	ok
	b	.L16
.L18:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	MAX_PATH
	.word	-559038737
	.word	.LC1
	.word	.LC12
	.word	.LC0
	.word	DEBUG_PROCESS
	.word	FALSE
	.word	.LC2
	.word	ProcessDebugPort
	.word	STATUS_INFO_LENGTH_MISMATCH
	.word	.LC3
	.word	STATUS_INVALID_HANDLE
	.word	STATUS_ACCESS_VIOLATION
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	INFINITE
	.word	.LC9
	.word	EXIT_PROCESS_DEBUG_EVENT
	.word	DBG_CONTINUE
	.word	.LC10
	.word	.LC11
	.size	test_query_process_debug_port, .-test_query_process_debug_port
	.comm	STATUS_INVALID_HANDLE,4,4
	.comm	STATUS_INFO_LENGTH_MISMATCH,4,4
	.comm	STATUS_ACCESS_VIOLATION,4,4
	.comm	ProcessDebugPort,4,4
	.comm	MAX_PATH,4,4
	.comm	INFINITE,4,4
	.comm	FALSE,4,4
	.comm	EXIT_PROCESS_DEBUG_EVENT,4,4
	.comm	DEBUG_PROCESS,4,4
	.comm	DBG_CONTINUE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
