	.file	"extr_newfileops_on_fork_test.c_do_fork.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"fork"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"file descriptor still open in child"
	.section	.rodata.str1.1
.LC2:
	.string	"unexpected error"
.LC3:
	.string	"ftruncate succeeded"
	.text
	.p2align 4
	.type	do_fork, @function
do_fork:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	call	fork@PLT
	test	eax, eax
	js	.L12
	je	.L3
	mov	edi, eax
	xor	edx, edx
	xor	esi, esi
	call	waitpid@PLT
	xor	edi, edi
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR listen_fd[rip]
	xor	esi, esi
	lea	rdi, 1[rax]
	call	ftruncate@PLT
	test	rax, rax
	jns	.L4
	mov	rax, QWORD PTR errno[rip]
	cmp	rax, QWORD PTR EBADF[rip]
	je	.L13
	cmp	rax, QWORD PTR EINVAL[rip]
	je	.L14
	lea	rsi, .LC2[rip]
	mov	edi, 1
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	err@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	lea	rsi, .LC3[rip]
	mov	edi, 1
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	errx@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	lea	rsi, .LC0[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	xor	edi, edi
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	exit@PLT
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	lea	rsi, .LC1[rip]
	mov	edi, 1
	add	rsp, 8
	.cfi_def_cfa_offset 8
	jmp	errx@PLT
	.cfi_endproc
.LFE0:
	.size	do_fork, .-do_fork
	.comm	listen_fd,8,8
	.comm	errno,8,8
	.comm	EINVAL,8,8
	.comm	EBADF,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_newfileops_on_fork_test.c_do_fork.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"fork\000"
	.align	2
.LC1:
	.ascii	"file descriptor still open in child\000"
	.align	2
.LC2:
	.ascii	"unexpected error\000"
	.align	2
.LC3:
	.ascii	"ftruncate succeeded\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_fork, %function
do_fork:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	bl	fork
	cmp	r0, #0
	blt	.L9
	beq	.L3
	mov	r2, #0
	mov	r1, r2
	bl	waitpid
	mov	r0, #0
	bl	exit
.L3:
	ldr	r3, .L12
	mov	r1, #0
	ldr	r0, [r3]
	add	r0, r0, #1
	bl	ftruncate
	cmp	r0, #0
	bge	.L4
	ldr	r3, .L12+4
	ldr	r2, .L12+8
	ldr	r3, [r3]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L10
	ldr	r2, .L12+12
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L11
	pop	{r4, lr}
	mov	r0, #1
	ldr	r1, .L12+16
	b	err
.L4:
	mov	r0, #1
	pop	{r4, lr}
	ldr	r1, .L12+20
	b	errx
.L9:
	ldr	r1, .L12+24
	mov	r0, #1
	bl	err
	b	.L3
.L10:
	mov	r0, #0
	pop	{r4, lr}
	b	exit
.L11:
	mov	r0, #1
	pop	{r4, lr}
	ldr	r1, .L12+28
	b	errx
.L13:
	.align	2
.L12:
	.word	listen_fd
	.word	errno
	.word	EBADF
	.word	EINVAL
	.word	.LC2
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.size	do_fork, .-do_fork
	.comm	listen_fd,4,4
	.comm	errno,4,4
	.comm	EINVAL,4,4
	.comm	EBADF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
