	.file	"832085.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"child terminate"
	.text
	.globl	sigchld_handler
	.type	sigchld_handler, @function
sigchld_handler:
.LFB0:
	.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
	lea	rdi, .LC0[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	sigchld_handler, .-sigchld_handler
	.section	.rodata
	.align 8
.LC1:
	.string	"sleep 30 seconds now, can see its chile process is zombie status"
	.align 8
.LC2:
	.string	"sleep one is interapted by signal, need another one"
.LC3:
	.string	"waiting.."
	.align 8
.LC4:
	.string	"in child process, just exit, to become zombie process"
.LC5:
	.string	"in child process %d\n"
.LC6:
	.string	"fork error"
.LC7:
	.string	"main process return"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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
	lea	rsi, sigchld_handler[rip]
	mov	edi, 17
	call	signal@PLT
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jle	.L3
	mov	DWORD PTR -12[rbp], 0
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, 30
	call	sleep@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, 3
	call	sleep@PLT
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L4
.L5:
	mov	edi, 1
	call	sleep@PLT
	mov	edi, 46
	call	putchar@PLT
	mov	edi, 0
	call	fflush@PLT
.L4:
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -12[rbp], edx
	cmp	eax, 9
	jle	.L5
	mov	edi, 10
	call	putchar@PLT
	jmp	.L6
.L3:
	cmp	DWORD PTR -4[rbp], 0
	jne	.L7
	mov	DWORD PTR -8[rbp], 0
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L8
.L9:
	mov	edi, 1
	call	sleep@PLT
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -8[rbp], 1
.L8:
	cmp	DWORD PTR -8[rbp], 9
	jle	.L9
	mov	edi, 0
	call	_exit@PLT
.L7:
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L6:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"832085.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"child terminate\000"
	.text
	.align	2
	.global	sigchld_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	sigchld_handler, %function
sigchld_handler:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, .L2
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	sigchld_handler, .-sigchld_handler
	.section	.rodata
	.align	2
.LC1:
	.ascii	"sleep 30 seconds now, can see its chile process is "
	.ascii	"zombie status\000"
	.align	2
.LC2:
	.ascii	"sleep one is interapted by signal, need another one"
	.ascii	"\000"
	.align	2
.LC3:
	.ascii	"waiting..\000"
	.align	2
.LC4:
	.ascii	"in child process, just exit, to become zombie proce"
	.ascii	"ss\000"
	.align	2
.LC5:
	.ascii	"in child process %d\012\000"
	.align	2
.LC6:
	.ascii	"fork error\000"
	.align	2
.LC7:
	.ascii	"main process return\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r1, .L13
	mov	r0, #17
	bl	signal
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L5
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r0, .L13+4
	bl	puts
	mov	r0, #30
	bl	sleep
	ldr	r0, .L13+8
	bl	puts
	mov	r0, #3
	bl	sleep
	ldr	r0, .L13+12
	bl	printf
	b	.L6
.L7:
	mov	r0, #1
	bl	sleep
	mov	r0, #46
	bl	putchar
	mov	r0, #0
	bl	fflush
.L6:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	cmp	r3, #9
	ble	.L7
	mov	r0, #10
	bl	putchar
	b	.L8
.L5:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L9
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r0, .L13+16
	bl	puts
	b	.L10
.L11:
	mov	r0, #1
	bl	sleep
	ldr	r1, [fp, #-12]
	ldr	r0, .L13+20
	bl	printf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L10:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	ble	.L11
	mov	r0, #0
	bl	_exit
.L9:
	ldr	r0, .L13+24
	bl	printf
.L8:
	ldr	r0, .L13+28
	bl	puts
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	sigchld_handler
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
