	.file	"extr_pidfd_test.c_test_pidfd_poll_leader_exit.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"pidfd_poll check for premature notification on non-emptygroup leader exit"
	.align 8
.LC1:
	.string	"%s test: mmap failed (errno %d)\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"Parent: pid: %d\n"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"%s test: pidfd_clone failed (ret %d, errno %d)\n"
	.align 8
.LC4:
	.string	"Parent: Waiting for Child (%d) to complete.\n"
	.section	.rodata.str1.1
.LC5:
	.string	"Parent: error\n"
	.section	.rodata.str1.8
	.align 8
.LC6:
	.string	"Parent: Child process waited for.\n"
	.section	.rodata.str1.1
.LC7:
	.string	"Time since child exit: %lu\n"
.LC8:
	.string	"%s test: Failed\n"
.LC9:
	.string	"%s test: Passed\n"
	.text
	.p2align 4
	.type	test_pidfd_poll_leader_exit, @function
test_pidfd_poll_leader_exit:
.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	ebp, edi
	xor	edi, edi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	DWORD PTR [rsp], 0
	call	time@PLT
	mov	ecx, DWORD PTR MAP_SHARED[rip]
	xor	r9d, r9d
	xor	edi, edi
	mov	edx, DWORD PTR PROT_READ[rip]
	or	ecx, DWORD PTR MAP_ANONYMOUS[rip]
	mov	esi, 4
	mov	r8d, -1
	or	edx, DWORD PTR PROT_WRITE[rip]
	call	mmap@PLT
	cmp	rax, QWORD PTR MAP_FAILED[rip]
	mov	QWORD PTR child_exit_secs[rip], rax
	je	.L13
.L2:
	xor	eax, eax
	call	getpid@PLT
	lea	rdi, .LC2[rip]
	mov	esi, eax
	xor	eax, eax
	call	ksft_print_msg@PLT
	mov	edx, DWORD PTR child_poll_leader_exit_test[rip]
	mov	edi, DWORD PTR CLONE_PIDFD[rip]
	mov	rsi, rsp
	call	pidfd_clone@PLT
	mov	ebx, eax
	test	eax, eax
	js	.L14
.L3:
	xor	eax, eax
	mov	esi, ebx
	lea	rdi, .LC4[rip]
	call	ksft_print_msg@PLT
	test	ebp, ebp
	je	.L4
	lea	rsi, 4[rsp]
	xor	edx, edx
	mov	edi, ebx
	call	waitpid@PLT
	mov	r12d, eax
	cmp	eax, -1
	je	.L15
.L5:
	cmp	r12d, ebx
	je	.L16
.L6:
	xor	edi, edi
	call	time@PLT
	mov	rdx, QWORD PTR child_exit_secs[rip]
	lea	rdi, .LC7[rip]
	sub	eax, DWORD PTR [rdx]
	mov	esi, eax
	mov	ebx, eax
	xor	eax, eax
	call	ksft_print_msg@PLT
	mov	edi, DWORD PTR [rsp]
	call	close@PLT
	mov	eax, DWORD PTR CHILD_THREAD_MIN_WAIT[rip]
	lea	rsi, .LC0[rip]
	cmp	eax, ebx
	jg	.L7
	add	eax, 2
	cmp	eax, ebx
	jge	.L8
.L7:
	lea	rdi, .LC8[rip]
	xor	eax, eax
	call	ksft_exit_fail_msg@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	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
.L8:
	.cfi_restore_state
	lea	rdi, .LC9[rip]
	call	ksft_test_result_pass@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, 1
	call	sleep@PLT
	mov	esi, DWORD PTR [rsp]
	lea	rdi, .LC0[rip]
	call	poll_pidfd@PLT
	cmp	r12d, ebx
	jne	.L6
.L16:
	lea	rdi, .LC6[rip]
	xor	eax, eax
	call	ksft_print_msg@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	mov	ecx, DWORD PTR errno[rip]
	mov	edx, eax
	xor	eax, eax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC3[rip]
	call	ksft_exit_fail_msg@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L15:
	lea	rdi, .LC5[rip]
	xor	eax, eax
	call	ksft_print_msg@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edx, DWORD PTR errno[rip]
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	ksft_exit_fail_msg@PLT
	jmp	.L2
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	test_pidfd_poll_leader_exit, .-test_pidfd_poll_leader_exit
	.comm	errno,4,4
	.comm	child_poll_leader_exit_test,4,4
	.comm	child_exit_secs,8,8
	.comm	PROT_WRITE,4,4
	.comm	PROT_READ,4,4
	.comm	MAP_SHARED,4,4
	.comm	MAP_FAILED,8,8
	.comm	MAP_ANONYMOUS,4,4
	.comm	CLONE_PIDFD,4,4
	.comm	CHILD_THREAD_MIN_WAIT,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_pidfd_test.c_test_pidfd_poll_leader_exit.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"pidfd_poll check for premature notification on non-"
	.ascii	"emptygroup leader exit\000"
	.align	2
.LC1:
	.ascii	"%s test: mmap failed (errno %d)\012\000"
	.align	2
.LC2:
	.ascii	"Parent: pid: %d\012\000"
	.align	2
.LC3:
	.ascii	"%s test: pidfd_clone failed (ret %d, errno %d)\012\000"
	.align	2
.LC4:
	.ascii	"Parent: Waiting for Child (%d) to complete.\012\000"
	.align	2
.LC5:
	.ascii	"Parent: error\012\000"
	.align	2
.LC6:
	.ascii	"Parent: Child process waited for.\012\000"
	.align	2
.LC7:
	.ascii	"Time since child exit: %lu\012\000"
	.align	2
.LC8:
	.ascii	"%s test: Failed\012\000"
	.align	2
.LC9:
	.ascii	"%s test: Passed\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_pidfd_poll_leader_exit, %function
test_pidfd_poll_leader_exit:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, #0
	ldr	r3, .L18
	sub	sp, sp, #28
	mov	r5, r0
	mov	r0, r4
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	str	r4, [sp, #12]
	bl	time
	mvn	r1, #0
	ldr	ip, .L18+4
	ldr	r0, .L18+8
	ldr	r3, .L18+12
	ldr	r2, .L18+16
	ldr	lr, [ip]
	ldr	r3, [r3]
	ldr	ip, [r0]
	ldr	r2, [r2]
	orr	r3, lr, r3
	str	r1, [sp]
	mov	r0, r4
	mov	r1, #4
	str	r4, [sp, #4]
	orr	r2, ip, r2
	bl	mmap
	ldr	r3, .L18+20
	ldr	r6, .L18+24
	ldr	r3, [r3]
	str	r0, [r6]
	cmp	r0, r3
	beq	.L13
.L2:
	bl	getpid
	mov	r1, r0
	ldr	r0, .L18+28
	bl	ksft_print_msg
	ldr	r3, .L18+32
	ldr	r2, .L18+36
	ldr	r0, [r3]
	ldr	r2, [r2]
	add	r1, sp, #12
	bl	pidfd_clone
	subs	r4, r0, #0
	blt	.L14
.L3:
	mov	r1, r4
	ldr	r0, .L18+40
	bl	ksft_print_msg
	cmp	r5, #0
	beq	.L4
	mov	r2, #0
	mov	r0, r4
	add	r1, sp, #16
	bl	waitpid
	cmn	r0, #1
	mov	r7, r0
	beq	.L15
.L5:
	cmp	r7, r4
	beq	.L16
.L6:
	mov	r0, #0
	bl	time
	mov	r4, r0
	ldr	r3, [r6]
	ldr	r0, .L18+44
	ldr	r1, [r3]
	sub	r4, r4, r1
	mov	r1, r4
	bl	ksft_print_msg
	ldr	r0, [sp, #12]
	bl	close
	ldr	r3, .L18+48
	ldr	r1, .L18+52
	ldr	r3, [r3]
	cmp	r3, r4
	bgt	.L7
	add	r3, r3, #2
	cmp	r3, r4
	bge	.L8
.L7:
	ldr	r0, .L18+56
	bl	ksft_exit_fail_msg
.L1:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L8:
	ldr	r0, .L18+60
	bl	ksft_test_result_pass
	b	.L1
.L4:
	mov	r0, #1
	bl	sleep
	ldr	r1, [sp, #12]
	ldr	r0, .L18+52
	bl	poll_pidfd
	cmp	r7, r4
	bne	.L6
.L16:
	ldr	r0, .L18+64
	bl	ksft_print_msg
	b	.L6
.L14:
	ldr	r3, .L18+68
	mov	r2, r4
	ldr	r3, [r3]
	ldr	r1, .L18+52
	ldr	r0, .L18+72
	bl	ksft_exit_fail_msg
	b	.L3
.L15:
	ldr	r0, .L18+76
	bl	ksft_print_msg
	b	.L5
.L13:
	ldr	r3, .L18+68
	ldr	r1, .L18+52
	ldr	r2, [r3]
	ldr	r0, .L18+80
	bl	ksft_exit_fail_msg
	b	.L2
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC10
	.word	MAP_SHARED
	.word	PROT_READ
	.word	MAP_ANONYMOUS
	.word	PROT_WRITE
	.word	MAP_FAILED
	.word	child_exit_secs
	.word	.LC2
	.word	CLONE_PIDFD
	.word	child_poll_leader_exit_test
	.word	.LC4
	.word	.LC7
	.word	CHILD_THREAD_MIN_WAIT
	.word	.LC0
	.word	.LC8
	.word	.LC9
	.word	.LC6
	.word	errno
	.word	.LC3
	.word	.LC5
	.word	.LC1
	.size	test_pidfd_poll_leader_exit, .-test_pidfd_poll_leader_exit
	.comm	errno,4,4
	.comm	child_poll_leader_exit_test,4,4
	.comm	child_exit_secs,4,4
	.comm	PROT_WRITE,4,4
	.comm	PROT_READ,4,4
	.comm	MAP_SHARED,4,4
	.comm	MAP_FAILED,4,4
	.comm	MAP_ANONYMOUS,4,4
	.comm	CLONE_PIDFD,4,4
	.comm	CHILD_THREAD_MIN_WAIT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
