	.file	"42794.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"pid: %d\n"
.LC1:
	.string	"ppid: %d\n"
.LC2:
	.string	"this is %d - (%d).\n"
	.text
	.globl	thread_master
	.type	thread_master, @function
thread_master:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -12[rbp], 0
	call	getpid@PLT
	mov	DWORD PTR -8[rbp], eax
	call	getppid@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L2:
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -12[rbp], edx
	mov	ecx, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	sleep@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	thread_master, .-thread_master
	.globl	thread_primary
	.type	thread_primary, @function
thread_primary:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -12[rbp], 0
	call	getpid@PLT
	mov	DWORD PTR -8[rbp], eax
	call	getppid@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L4:
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -12[rbp], edx
	mov	ecx, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	sleep@PLT
	jmp	.L4
	.cfi_endproc
.LFE1:
	.size	thread_primary, .-thread_primary
	.section	.rodata
.LC3:
	.string	"fork error"
.LC4:
	.string	"pid = %d\n"
.LC5:
	.string	"Parent thread!"
.LC6:
	.string	"Child thread!"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.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	BYTE PTR -5[rbp], 0
	jmp	.L6
.L11:
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L7
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L8
.L7:
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -4[rbp], 0
	jne	.L9
	lea	rdi, .LC5[rip]
	call	puts@PLT
	jmp	.L10
.L9:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	thread_primary
.L10:
	movzx	eax, BYTE PTR -5[rbp]
	add	eax, 1
	mov	BYTE PTR -5[rbp], al
.L6:
	cmp	BYTE PTR -5[rbp], 3
	jbe	.L11
	mov	eax, 0
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"42794.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"pid: %d\012\000"
	.align	2
.LC1:
	.ascii	"ppid: %d\012\000"
	.align	2
.LC2:
	.ascii	"this is %d - (%d).\012\000"
	.text
	.align	2
	.global	thread_master
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_master, %function
thread_master:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-16]
	bl	getpid
	str	r0, [fp, #-12]
	bl	getppid
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, .L3
	bl	printf
	ldr	r1, [fp, #-8]
	ldr	r0, .L3+4
	bl	printf
.L2:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	mov	r2, r3
	ldr	r1, [fp, #-24]
	ldr	r0, .L3+8
	bl	printf
	mov	r0, #1
	bl	sleep
	b	.L2
.L4:
	.align	2
.L3:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	thread_master, .-thread_master
	.align	2
	.global	thread_primary
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_primary, %function
thread_primary:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-16]
	bl	getpid
	str	r0, [fp, #-12]
	bl	getppid
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, .L7
	bl	printf
	ldr	r1, [fp, #-8]
	ldr	r0, .L7+4
	bl	printf
.L6:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	mov	r2, r3
	ldr	r1, [fp, #-24]
	ldr	r0, .L7+8
	bl	printf
	mov	r0, #1
	bl	sleep
	b	.L6
.L8:
	.align	2
.L7:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	thread_primary, .-thread_primary
	.section	.rodata
	.align	2
.LC3:
	.ascii	"fork error\000"
	.align	2
.LC4:
	.ascii	"pid = %d\012\000"
	.align	2
.LC5:
	.ascii	"Parent thread!\000"
	.align	2
.LC6:
	.ascii	"Child thread!\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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	strb	r3, [fp, #-9]
	b	.L10
.L15:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L11
	ldr	r0, .L16
	bl	perror
	mvn	r3, #0
	b	.L12
.L11:
	ldr	r1, [fp, #-8]
	ldr	r0, .L16+4
	bl	printf
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L13
	ldr	r0, .L16+8
	bl	puts
	b	.L14
.L13:
	ldr	r0, .L16+12
	bl	puts
	ldr	r0, [fp, #-8]
	bl	thread_primary
.L14:
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-9]
.L10:
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #3
	bls	.L15
	mov	r3, #0
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
