	.file	"405439.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"\n  Metropolis Cluster Operating System\n  Copyright 2020-2021 The Monogon Project Authors\n\n"
.LC1:
	.string	"fork(): %s\n"
.LC2:
	.string	"setsid: %s\n"
.LC3:
	.string	"/core"
.LC4:
	.string	"execvpe(/core) failed: %s\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
	sub	rsp, 176
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -144[rbp]
	mov	rdi, rax
	call	sigfillset@PLT
	lea	rax, -144[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 0
	call	sigprocmask@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 90
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	call	fork@PLT
	mov	DWORD PTR -164[rbp], eax
	cmp	DWORD PTR -164[rbp], 0
	jns	.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, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L7
.L2:
	cmp	DWORD PTR -164[rbp], 0
	jne	.L4
	lea	rax, -144[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 1
	call	sigprocmask@PLT
	call	setsid@PLT
	cmp	eax, -1
	jne	.L5
	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
	mov	eax, 1
	jmp	.L7
.L5:
	lea	rax, .LC3[rip]
	mov	QWORD PTR -160[rbp], rax
	mov	QWORD PTR -152[rbp], 0
	mov	rax, QWORD PTR -160[rbp]
	lea	rdx, -160[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	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, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L7
.L4:
	lea	rdx, -168[rbp]
	lea	rax, -144[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	sigwait@PLT
	mov	edx, DWORD PTR -168[rbp]
	mov	eax, DWORD PTR -164[rbp]
	mov	esi, edx
	mov	edi, eax
	call	handle_signal
	jmp	.L4
.L7:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC5:
	.string	"child status not EXITED nor SIGNALED: %d\n"
	.align 8
.LC6:
	.string	"\n  Metropolis core exited with status: %d\n"
	.align 8
.LC7:
	.string	"  Disks synced, rebooting in 30 seconds...\n"
.LC8:
	.string	"  Rebooting...\n\n"
	.align 8
.LC9:
	.string	"  Disks synced, rebooting...\n\n"
	.text
	.globl	handle_signal
	.type	handle_signal, @function
handle_signal:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -40[rbp], 17
	je	.L10
	mov	eax, DWORD PTR -36[rbp]
	neg	eax
	mov	edx, eax
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, eax
	mov	edi, edx
	call	kill@PLT
	jmp	.L9
.L10:
	mov	DWORD PTR -16[rbp], -1
	jmp	.L12
.L16:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	je	.L13
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -20[rbp]
	and	eax, 127
	test	eax, eax
	jne	.L14
	mov	eax, DWORD PTR -20[rbp]
	sar	eax, 8
	and	eax, 255
	mov	DWORD PTR -16[rbp], eax
	jmp	.L12
.L14:
	mov	eax, DWORD PTR -20[rbp]
	and	eax, 127
	add	eax, 1
	sar	al
	test	al, al
	jle	.L15
	mov	eax, DWORD PTR -20[rbp]
	and	eax, 127
	sub	eax, -128
	mov	DWORD PTR -16[rbp], eax
	jmp	.L12
.L15:
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -16[rbp], 1
.L12:
	lea	rax, -20[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, -1
	call	waitpid@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jg	.L16
	cmp	DWORD PTR -16[rbp], 0
	js	.L9
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -16[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	sync@PLT
	cmp	DWORD PTR -16[rbp], 0
	je	.L18
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -16[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 30
	call	sleep@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -16[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L19
.L18:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 30
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
.L19:
	mov	edi, 19088743
	call	reboot@PLT
.L9:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	handle_signal, .-handle_signal
	.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	"405439.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012  Metropolis Cluster Operating System\012  Copy"
	.ascii	"right 2020-2021 The Monogon Project Authors\012\012"
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"fork(): %s\012\000"
	.align	2
.LC2:
	.ascii	"setsid: %s\012\000"
	.align	2
.LC3:
	.ascii	"/core\000"
	.align	2
.LC4:
	.ascii	"execvpe(/core) failed: %s\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #156
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #144
	mov	r0, r3
	bl	sigfillset
	sub	r3, fp, #144
	mov	r2, #0
	mov	r1, r3
	mov	r0, #0
	bl	sigprocmask
	ldr	r3, .L9+4
	ldr	r3, [r3]
	mov	r2, #90
	mov	r1, #1
	ldr	r0, .L9+8
	bl	fwrite
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-156]
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bge	.L2
	ldr	r3, .L9+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, .L9+12
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L7
.L2:
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L4
	sub	r3, fp, #144
	mov	r2, #0
	mov	r1, r3
	mov	r0, #1
	bl	sigprocmask
	bl	setsid
	mov	r3, r0
	cmn	r3, #1
	bne	.L5
	ldr	r3, .L9+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, .L9+16
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L7
.L5:
	ldr	r3, .L9+20
	str	r3, [fp, #-152]
	mov	r3, #0
	str	r3, [fp, #-148]
	ldr	r3, [fp, #-152]
	sub	r2, fp, #152
	mov	r1, r2
	mov	r0, r3
	bl	execvp
	ldr	r3, .L9+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, .L9+24
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L7
.L4:
	sub	r2, fp, #160
	sub	r3, fp, #144
	mov	r1, r2
	mov	r0, r3
	bl	sigwait
	ldr	r3, [fp, #-160]
	mov	r1, r3
	ldr	r0, [fp, #-156]
	bl	handle_signal
	b	.L4
.L7:
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC5
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.section	.rodata
	.align	2
.LC6:
	.ascii	"child status not EXITED nor SIGNALED: %d\012\000"
	.align	2
.LC7:
	.ascii	"\012  Metropolis core exited with status: %d\012\000"
	.align	2
.LC8:
	.ascii	"  Disks synced, rebooting in 30 seconds...\012\000"
	.align	2
.LC9:
	.ascii	"  Rebooting...\012\012\000"
	.align	2
.LC10:
	.ascii	"  Disks synced, rebooting...\012\012\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_signal
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_signal, %function
handle_signal:
	@ 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]
	str	r1, [fp, #-28]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-28]
	cmp	r3, #17
	beq	.L12
	ldr	r3, [fp, #-24]
	rsb	r3, r3, #0
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	kill
	b	.L11
.L12:
	mvn	r3, #0
	str	r3, [fp, #-16]
	b	.L14
.L18:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	beq	.L15
	b	.L14
.L15:
	ldr	r3, [fp, #-20]
	and	r3, r3, #127
	cmp	r3, #0
	bne	.L16
	ldr	r3, [fp, #-20]
	asr	r3, r3, #8
	and	r3, r3, #255
	str	r3, [fp, #-16]
	b	.L14
.L16:
	ldr	r3, [fp, #-20]
	and	r3, r3, #255
	and	r3, r3, #127
	and	r3, r3, #255
	add	r3, r3, #1
	and	r3, r3, #255
	lsl	r3, r3, #24
	asr	r3, r3, #24
	asr	r3, r3, #1
	lsl	r3, r3, #24
	asr	r3, r3, #24
	cmp	r3, #0
	ble	.L17
	ldr	r3, [fp, #-20]
	and	r3, r3, #127
	add	r3, r3, #128
	str	r3, [fp, #-16]
	b	.L14
.L17:
	ldr	r3, .L23+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	ldr	r1, .L23+8
	mov	r0, r3
	bl	fprintf
	mov	r3, #1
	str	r3, [fp, #-16]
.L14:
	sub	r3, fp, #20
	mov	r2, #1
	mov	r1, r3
	mvn	r0, #0
	bl	waitpid
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bgt	.L18
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	blt	.L11
	ldr	r3, .L23+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L23+12
	mov	r0, r3
	bl	fprintf
	bl	sync
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L20
	ldr	r3, .L23+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L23+16
	mov	r0, r3
	bl	fprintf
	mov	r0, #30
	bl	sleep
	ldr	r3, .L23+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L23+20
	mov	r0, r3
	bl	fprintf
	b	.L21
.L20:
	ldr	r3, .L23+4
	ldr	r3, [r3]
	mov	r2, #30
	mov	r1, #1
	ldr	r0, .L23+24
	bl	fwrite
.L21:
	ldr	r0, .L23+28
	bl	reboot
.L11:
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC11
	.word	stderr
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	19088743
	.size	handle_signal, .-handle_signal
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
