	.file	"25770.c"
	.intel_syntax noprefix
	.text
	.type	sys_waitpid, @function
sys_waitpid:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -8[rbp], edx
	mov	edx, DWORD PTR -8[rbp]
	mov	rsi, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	wait4@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sys_waitpid, .-sys_waitpid
	.section	.rodata
	.align 8
.LC0:
	.string	"ERROR: This test must be run as root - assuming ftruncate doesn't need root.\n"
.LC1:
	.string	"conftest.truncroot"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1056
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, 0
	call	getuid@PLT
	test	eax, eax
	je	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 77
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	edx, 438
	mov	esi, 578
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -1048[rbp], eax
	cmp	DWORD PTR -1048[rbp], 0
	jne	.L5
	mov	edi, 1
	call	exit@PLT
.L5:
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1048[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	cmp	eax, 1024
	je	.L6
	mov	edi, 1
	call	exit@PLT
.L6:
	call	fork@PLT
	mov	DWORD PTR -1044[rbp], eax
	cmp	DWORD PTR -1044[rbp], 0
	jns	.L7
	mov	edi, 1
	call	exit@PLT
.L7:
	cmp	DWORD PTR -1044[rbp], 0
	je	.L8
	mov	DWORD PTR -1052[rbp], 1
	lea	rcx, -1052[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	sys_waitpid
	cmp	DWORD PTR -1044[rbp], eax
	je	.L9
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	unlink@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	unlink@PLT
	mov	eax, DWORD PTR -1052[rbp]
	sar	eax, 8
	movzx	eax, al
	mov	edi, eax
	call	exit@PLT
.L8:
	mov	edi, 500
	mov	eax, 0
	call	setuid@PLT
	test	eax, eax
	jns	.L10
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	eax, DWORD PTR -1048[rbp]
	mov	esi, 0
	mov	edi, eax
	mov	eax, 0
	call	ftruncate@PLT
	test	eax, eax
	jns	.L11
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 1
	je	.L12
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 13
	jne	.L11
.L12:
	mov	edi, 0
	call	exit@PLT
.L11:
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"25770.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sys_waitpid, %function
sys_waitpid:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	mov	r3, #0
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	wait4
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	sys_waitpid, .-sys_waitpid
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ERROR: This test must be run as root - assuming ftr"
	.ascii	"uncate doesn't need root.\012\000"
	.align	2
.LC1:
	.ascii	"conftest.truncroot\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	getuid
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r2, #77
	mov	r1, #1
	ldr	r0, .L14+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L4:
	ldr	r2, .L14+12
	ldr	r1, .L14+16
	ldr	r0, .L14+20
	bl	open
	str	r0, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	bne	.L5
	mov	r0, #1
	bl	exit
.L5:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1040]
	bl	write
	mov	r3, r0
	cmp	r3, #1024
	beq	.L6
	mov	r0, #1
	bl	exit
.L6:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	bge	.L7
	mov	r0, #1
	bl	exit
.L7:
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	beq	.L8
	mov	r3, #1
	str	r3, [fp, #-1044]
	sub	r3, fp, #1040
	sub	r3, r3, #4
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-1036]
	bl	sys_waitpid
	mov	r2, r0
	ldr	r3, [fp, #-1036]
	cmp	r3, r2
	beq	.L9
	ldr	r0, .L14+20
	bl	unlink
	mov	r0, #1
	bl	exit
.L9:
	ldr	r0, .L14+20
	bl	unlink
	ldr	r3, [fp, #-1044]
	asr	r3, r3, #8
	and	r3, r3, #255
	mov	r0, r3
	bl	exit
.L8:
	mov	r0, #500
	bl	setuid
	mov	r3, r0
	cmp	r3, #0
	bge	.L10
	mov	r0, #1
	bl	exit
.L10:
	mov	r1, #0
	ldr	r0, [fp, #-1040]
	bl	ftruncate
	mov	r3, r0
	cmp	r3, #0
	bge	.L11
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L12
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #13
	bne	.L11
.L12:
	mov	r0, #0
	bl	exit
.L11:
	mov	r0, #1
	bl	exit
.L15:
	.align	2
.L14:
	.word	.LC2
	.word	stderr
	.word	.LC0
	.word	438
	.word	578
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
