	.file	"683279.c"
	.intel_syntax noprefix
	.text
	.globl	globvar
	.data
	.align 4
	.type	globvar, @object
	.size	globvar, 4
globvar:
	.long	6
	.globl	buf
	.align 16
	.type	buf, @object
	.size	buf, 19
buf:
	.string	"a write to stdout\n"
	.section	.rodata
.LC0:
	.string	"write error: %s\n"
.LC1:
	.string	"before fork"
.LC2:
	.string	"fork error: %s\n"
	.align 8
.LC3:
	.string	"pid = %ld, glob = %d, var = %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	DWORD PTR -24[rbp], 88
	mov	edx, 18
	lea	rsi, buf[rip]
	mov	edi, 1
	call	write@PLT
	cmp	rax, 18
	je	.L2
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L2:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	call	fork@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jns	.L3
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L4
.L3:
	cmp	DWORD PTR -20[rbp], 0
	jne	.L5
	mov	eax, DWORD PTR globvar[rip]
	add	eax, 1
	mov	DWORD PTR globvar[rip], eax
	add	DWORD PTR -24[rbp], 1
	jmp	.L4
.L5:
	mov	edi, 2
	call	sleep@PLT
.L4:
	mov	ebx, DWORD PTR globvar[rip]
	call	getpid@PLT
	cdqe
	mov	edx, DWORD PTR -24[rbp]
	mov	ecx, edx
	mov	edx, ebx
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.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	"683279.c"
	.text
	.global	globvar
	.data
	.align	2
	.type	globvar, %object
	.size	globvar, 4
globvar:
	.word	6
	.global	buf
	.align	2
	.type	buf, %object
	.size	buf, 19
buf:
	.ascii	"a write to stdout\012\000"
	.section	.rodata
	.align	2
.LC0:
	.ascii	"write error: %s\012\000"
	.align	2
.LC1:
	.ascii	"before fork\000"
	.align	2
.LC2:
	.ascii	"fork error: %s\012\000"
	.align	2
.LC3:
	.ascii	"pid = %ld, glob = %d, var = %d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	mov	r3, #88
	str	r3, [fp, #-20]
	mov	r2, #18
	ldr	r1, .L6
	mov	r0, #1
	bl	write
	mov	r3, r0
	cmp	r3, #18
	beq	.L2
	ldr	r3, .L6+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L6+8
	mov	r0, r4
	bl	fprintf
.L2:
	ldr	r0, .L6+12
	bl	puts
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L3
	ldr	r3, .L6+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L6+16
	mov	r0, r4
	bl	fprintf
	b	.L4
.L3:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L6+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L6+20
	str	r3, [r2]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	b	.L4
.L5:
	mov	r0, #2
	bl	sleep
.L4:
	bl	getpid
	mov	r1, r0
	ldr	r3, .L6+20
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r0, .L6+24
	bl	printf
	mov	r0, #0
	bl	exit
.L7:
	.align	2
.L6:
	.word	buf
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	globvar
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
