	.file	"extr_stdio.c_WaitForSingleObjectWithMessages.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	WaitForSingleObjectWithMessages
	.type	WaitForSingleObjectWithMessages, @function
WaitForSingleObjectWithMessages:
.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
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	DWORD PTR 12[rsp], edi
	lea	rbx, 16[rsp]
	lea	r13, 12[rsp]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	GetTickCount64@PLT
	lea	r12, [rax+rbp]
	.p2align 4,,10
	.p2align 3
.L2:
	mov	r8d, DWORD PTR PM_REMOVE[rip]
	xor	ecx, ecx
	xor	edx, edx
	xor	esi, esi
	mov	rdi, rbx
	call	PeekMessage@PLT
	test	rax, rax
	je	.L13
	mov	rax, QWORD PTR 16[rsp]
	cmp	rax, QWORD PTR WM_QUIT[rip]
	je	.L3
	cmp	rax, QWORD PTR WM_CLOSE[rip]
	je	.L3
	mov	rdi, rbx
	call	DispatchMessage@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	mov	r8d, DWORD PTR QS_ALLINPUT[rip]
	mov	edx, DWORD PTR FALSE[rip]
	mov	rcx, rbp
	mov	rsi, r13
	mov	edi, 1
	call	MsgWaitForMultipleObjects@PLT
	cmp	QWORD PTR INFINITE[rip], rbp
	mov	r14, rax
	je	.L7
	xor	eax, eax
	call	GetTickCount64@PLT
	cmp	r12, rax
	jle	.L8
	mov	rbp, r12
	sub	rbp, rax
.L7:
	mov	rax, QWORD PTR WAIT_OBJECT_0[rip]
	add	rax, 1
	cmp	rax, r14
	je	.L2
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	rax, r14
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.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
.L8:
	.cfi_restore_state
	mov	r14, QWORD PTR WAIT_TIMEOUT[rip]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, DWORD PTR ERROR_CANCELLED[rip]
	call	SetLastError@PLT
	mov	r14, QWORD PTR WAIT_FAILED[rip]
	jmp	.L1
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	WaitForSingleObjectWithMessages, .-WaitForSingleObjectWithMessages
	.comm	WM_QUIT,8,8
	.comm	WM_CLOSE,8,8
	.comm	WAIT_TIMEOUT,8,8
	.comm	WAIT_OBJECT_0,8,8
	.comm	WAIT_FAILED,8,8
	.comm	QS_ALLINPUT,4,4
	.comm	PM_REMOVE,4,4
	.comm	INFINITE,8,8
	.comm	FALSE,4,4
	.comm	ERROR_CANCELLED,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_stdio.c_WaitForSingleObjectWithMessages.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	WaitForSingleObjectWithMessages
	.syntax unified
	.arm
	.fpu softvfp
	.type	WaitForSingleObjectWithMessages, %function
WaitForSingleObjectWithMessages:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L15
	sub	sp, sp, #28
	str	r0, [sp, #12]
	mov	r5, r1
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	GetTickCount64
	ldr	r4, .L15+4
	add	r3, r0, r5
	ldr	fp, .L15+8
	ldr	r10, .L15+12
	ldr	r9, .L15+16
	ldr	r8, .L15+20
	ldr	r6, .L15+24
	str	r3, [sp, #8]
.L2:
	mov	r3, #0
	ldr	r0, [r4]
	mov	r2, r3
	str	r0, [sp]
	mov	r1, r3
	add	r0, sp, #16
	bl	PeekMessage
	cmp	r0, #0
	beq	.L13
	ldr	r3, [sp, #16]
	ldr	r2, [r6]
	cmp	r3, r2
	beq	.L3
	ldr	r2, .L15+28
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L3
	add	r0, sp, #16
	bl	DispatchMessage
	b	.L2
.L13:
	ldr	r2, [r10]
	mov	r3, r5
	str	r2, [sp]
	mov	r0, #1
	ldr	r2, [fp]
	add	r1, sp, #12
	bl	MsgWaitForMultipleObjects
	ldr	r3, [r9]
	mov	r7, r0
	cmp	r3, r5
	beq	.L7
	bl	GetTickCount64
	ldr	r3, [sp, #8]
	cmp	r3, r0
	ldrle	r3, .L15+32
	subgt	r5, r3, r0
	ldrle	r7, [r3]
.L7:
	ldr	r3, [r8]
	add	r3, r3, #1
	cmp	r3, r7
	beq	.L2
.L1:
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r7
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	ldr	r3, .L15+36
	ldr	r0, [r3]
	bl	SetLastError
	ldr	r3, .L15+40
	ldr	r7, [r3]
	b	.L1
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC0
	.word	PM_REMOVE
	.word	FALSE
	.word	QS_ALLINPUT
	.word	INFINITE
	.word	WAIT_OBJECT_0
	.word	WM_QUIT
	.word	WM_CLOSE
	.word	WAIT_TIMEOUT
	.word	ERROR_CANCELLED
	.word	WAIT_FAILED
	.size	WaitForSingleObjectWithMessages, .-WaitForSingleObjectWithMessages
	.comm	WM_QUIT,4,4
	.comm	WM_CLOSE,4,4
	.comm	WAIT_TIMEOUT,4,4
	.comm	WAIT_OBJECT_0,4,4
	.comm	WAIT_FAILED,4,4
	.comm	QS_ALLINPUT,4,4
	.comm	PM_REMOVE,4,4
	.comm	INFINITE,4,4
	.comm	FALSE,4,4
	.comm	ERROR_CANCELLED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
