	.file	"608400.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"sethostname"
.LC1:
	.string	"uname"
.LC2:
	.string	"uts.nodename in child:  %s\n"
	.text
	.type	childFunc, @function
childFunc:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 416
	mov	QWORD PTR -408[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -408[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -408[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	sethostname@PLT
	cmp	eax, -1
	jne	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	lea	rax, -400[rbp]
	mov	rdi, rax
	call	uname@PLT
	cmp	eax, -1
	jne	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rax, -400[rbp]
	add	rax, 65
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1000
	call	sleep@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	childFunc, .-childFunc
	.section	.rodata
.LC3:
	.string	"Usage: %s <child-hostname>\n"
.LC4:
	.string	"mmap"
.LC5:
	.string	"clone"
	.align 8
.LC6:
	.string	"PID of child created by clone() is %ld\n"
.LC7:
	.string	"uts.nodename in parent: %s\n"
.LC8:
	.string	"waitpid"
.LC9:
	.string	"child has terminated"
	.text
	.globl	main
	.type	main, @function
main:
.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, 432
	mov	DWORD PTR -420[rbp], edi
	mov	QWORD PTR -432[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -420[rbp], 1
	jg	.L7
	mov	rax, QWORD PTR -432[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 0
	call	exit@PLT
.L7:
	mov	r9d, 0
	mov	r8d, -1
	mov	ecx, 131106
	mov	edx, 3
	mov	esi, 1048576
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -408[rbp], rax
	cmp	QWORD PTR -408[rbp], -1
	jne	.L8
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	rax, QWORD PTR -432[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -408[rbp]
	lea	rsi, 1048576[rdx]
	mov	rcx, rax
	mov	edx, 67108881
	lea	rdi, childFunc[rip]
	mov	eax, 0
	call	clone@PLT
	mov	DWORD PTR -412[rbp], eax
	cmp	DWORD PTR -412[rbp], -1
	jne	.L9
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	eax, DWORD PTR -412[rbp]
	cdqe
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	sleep@PLT
	lea	rax, -400[rbp]
	mov	rdi, rax
	call	uname@PLT
	cmp	eax, -1
	jne	.L10
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	lea	rax, -400[rbp]
	add	rax, 65
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -412[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	waitpid@PLT
	cmp	eax, -1
	jne	.L11
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.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	"608400.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"sethostname\000"
	.align	2
.LC1:
	.ascii	"uname\000"
	.align	2
.LC2:
	.ascii	"uts.nodename in child:  %s\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	childFunc, %function
childFunc:
	@ args = 0, pretend = 0, frame = 408
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #408
	str	r0, [fp, #-408]
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, [fp, #-408]
	bl	strlen
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-408]
	bl	sethostname
	mov	r3, r0
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L6+4
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #400
	mov	r0, r3
	bl	uname
	mov	r3, r0
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L6+8
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	sub	r3, fp, #400
	add	r3, r3, #65
	mov	r1, r3
	ldr	r0, .L6+12
	bl	printf
	mov	r0, #1000
	bl	sleep
	mov	r3, #0
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	childFunc, .-childFunc
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Usage: %s <child-hostname>\012\000"
	.align	2
.LC5:
	.ascii	"mmap\000"
	.align	2
.LC6:
	.ascii	"clone\000"
	.align	2
.LC7:
	.ascii	"PID of child created by clone() is %ld\012\000"
	.align	2
.LC8:
	.ascii	"uts.nodename in parent: %s\012\000"
	.align	2
.LC9:
	.ascii	"waitpid\000"
	.align	2
.LC10:
	.ascii	"child has terminated\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 416
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #424
	str	r0, [fp, #-416]
	str	r1, [fp, #-420]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-416]
	cmp	r3, #1
	bgt	.L9
	ldr	r3, .L15+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-420]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L15+8
	bl	fprintf
	mov	r0, #0
	bl	exit
.L9:
	mov	r3, #0
	str	r3, [sp, #4]
	mvn	r3, #0
	str	r3, [sp]
	ldr	r3, .L15+12
	mov	r2, #3
	mov	r1, #1048576
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-408]
	ldr	r3, [fp, #-408]
	cmn	r3, #1
	bne	.L10
	ldr	r0, .L15+16
	bl	perror
	mov	r0, #1
	bl	exit
.L10:
	ldr	r3, [fp, #-408]
	add	r1, r3, #1048576
	ldr	r3, [fp, #-420]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, .L15+20
	ldr	r0, .L15+24
	bl	clone
	str	r0, [fp, #-404]
	ldr	r3, [fp, #-404]
	cmn	r3, #1
	bne	.L11
	ldr	r0, .L15+28
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	ldr	r1, [fp, #-404]
	ldr	r0, .L15+32
	bl	printf
	mov	r0, #1
	bl	sleep
	sub	r3, fp, #400
	mov	r0, r3
	bl	uname
	mov	r3, r0
	cmn	r3, #1
	bne	.L12
	ldr	r0, .L15+36
	bl	perror
	mov	r0, #1
	bl	exit
.L12:
	sub	r3, fp, #400
	add	r3, r3, #65
	mov	r1, r3
	ldr	r0, .L15+40
	bl	printf
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-404]
	bl	waitpid
	mov	r3, r0
	cmn	r3, #1
	bne	.L13
	ldr	r0, .L15+44
	bl	perror
	mov	r0, #1
	bl	exit
.L13:
	ldr	r0, .L15+48
	bl	puts
	mov	r0, #0
	bl	exit
.L16:
	.align	2
.L15:
	.word	.LC11
	.word	stderr
	.word	.LC4
	.word	131106
	.word	.LC5
	.word	67108881
	.word	childFunc
	.word	.LC6
	.word	.LC7
	.word	.LC1
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
