	.file	"87638491.c"
	.intel_syntax noprefix
	.text
	.type	thread_func, @function
thread_func:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	thread_func, .-thread_func
	.section	.rodata
.LC0:
	.string	"the_stack_data/87638491.c"
.LC1:
	.string	"ret == 0"
	.text
	.type	fork_child, @function
fork_child:
.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, 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -104[rbp], 0
	jmp	.L4
.L6:
	lea	rdx, -96[rbp]
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	ecx, 0
	lea	rdx, thread_func[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -100[rbp], eax
	cmp	DWORD PTR -100[rbp], 0
	je	.L5
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 49
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	__assert_fail@PLT
.L5:
	add	DWORD PTR -104[rbp], 1
.L4:
	cmp	DWORD PTR -104[rbp], 9
	jle	.L6
	mov	DWORD PTR -104[rbp], 0
	jmp	.L7
.L9:
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	mov	rax, QWORD PTR -96[rbp+rax*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	DWORD PTR -100[rbp], eax
	cmp	DWORD PTR -100[rbp], 0
	je	.L8
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 55
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	__assert_fail@PLT
.L8:
	add	DWORD PTR -104[rbp], 1
.L7:
	cmp	DWORD PTR -104[rbp], 9
	jle	.L9
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fork_child, .-fork_child
	.section	.rodata
.LC2:
	.string	"fork"
.LC3:
	.string	"wait"
	.align 8
.LC4:
	.string	"Hmm, unexpected wait status 0x%x from child %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -60[rbp], 0
	mov	edi, 180
	call	alarm@PLT
	mov	DWORD PTR -64[rbp], 0
	jmp	.L12
.L17:
	call	fork@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	jle	.L13
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	mov	edx, DWORD PTR -52[rbp]
	mov	DWORD PTR -48[rbp+rax*4], edx
	jmp	.L24
.L13:
	cmp	DWORD PTR -52[rbp], 0
	jne	.L15
	call	fork_child
	mov	eax, 0
	jmp	.L22
.L15:
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L22
.L24:
	add	DWORD PTR -64[rbp], 1
.L12:
	cmp	DWORD PTR -64[rbp], 9
	jle	.L17
	jmp	.L18
.L21:
	lea	rax, -68[rbp]
	mov	rdi, rax
	call	wait@PLT
	mov	DWORD PTR -56[rbp], eax
	cmp	DWORD PTR -56[rbp], -1
	jne	.L19
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L22
.L19:
	mov	eax, DWORD PTR -68[rbp]
	and	eax, 127
	test	eax, eax
	jne	.L20
	add	DWORD PTR -60[rbp], 1
	jmp	.L18
.L20:
	mov	eax, DWORD PTR -68[rbp]
	mov	edx, DWORD PTR -56[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
.L18:
	cmp	DWORD PTR -60[rbp], 10
	jne	.L21
	mov	eax, 0
.L22:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.section	.rodata
	.align 8
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 11
__PRETTY_FUNCTION__.0:
	.string	"fork_child"
	.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	"87638491.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_func, %function
thread_func:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	mov	r3, #0
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	thread_func, .-thread_func
	.section	.rodata
	.align	2
.LC0:
	.ascii	"the_stack_data/87638491.c\000"
	.align	2
.LC1:
	.ascii	"ret == 0\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fork_child, %function
fork_child:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L4
.L6:
	sub	r2, fp, #48
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #2
	add	r0, r2, r3
	mov	r3, #0
	ldr	r2, .L11+4
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L5
	ldr	r3, .L11+8
	mov	r2, #49
	ldr	r1, .L11+12
	ldr	r0, .L11+16
	bl	__assert_fail
.L5:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L4:
	ldr	r3, [fp, #-56]
	cmp	r3, #9
	ble	.L6
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L7
.L9:
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-44]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L8
	ldr	r3, .L11+8
	mov	r2, #55
	ldr	r1, .L11+12
	ldr	r0, .L11+16
	bl	__assert_fail
.L8:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L7:
	ldr	r3, [fp, #-56]
	cmp	r3, #9
	ble	.L9
	nop
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC2
	.word	thread_func
	.word	__PRETTY_FUNCTION__.6275
	.word	.LC0
	.word	.LC1
	.size	fork_child, .-fork_child
	.section	.rodata
	.align	2
.LC3:
	.ascii	"fork\000"
	.align	2
.LC4:
	.ascii	"wait\000"
	.align	2
.LC5:
	.ascii	"Hmm, unexpected wait status 0x%x from child %d\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-60]
	mov	r0, #180
	bl	alarm
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L14
.L19:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	ble	.L15
	ldr	r3, [fp, #-64]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-52]
	str	r2, [r3, #-44]
	b	.L26
.L15:
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bne	.L17
	bl	fork_child
	mov	r3, #0
	b	.L24
.L17:
	ldr	r0, .L27+4
	bl	perror
	mov	r3, #1
	b	.L24
.L26:
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L14:
	ldr	r3, [fp, #-64]
	cmp	r3, #9
	ble	.L19
	b	.L20
.L23:
	sub	r3, fp, #68
	mov	r0, r3
	bl	wait
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmn	r3, #1
	bne	.L21
	ldr	r0, .L27+8
	bl	perror
	mov	r3, #1
	b	.L24
.L21:
	ldr	r3, [fp, #-68]
	and	r3, r3, #127
	cmp	r3, #0
	bne	.L22
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
	b	.L20
.L22:
	ldr	r3, [fp, #-68]
	ldr	r2, [fp, #-56]
	mov	r1, r3
	ldr	r0, .L27+12
	bl	printf
.L20:
	ldr	r3, [fp, #-60]
	cmp	r3, #10
	bne	.L23
	mov	r3, #0
.L24:
	ldr	r2, .L27
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC6
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.6275, %object
	.size	__PRETTY_FUNCTION__.6275, 11
__PRETTY_FUNCTION__.6275:
	.ascii	"fork_child\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
