	.file	"98575453.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"usage: shutdown [-hpr]\n"
	.text
	.type	usage, @function
usage:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 2
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	usage, .-usage
	.section	.rodata
.LC1:
	.string	"must be session leader\n"
.LC2:
	.string	"r"
.LC3:
	.string	"/proc/mounts"
.LC4:
	.string	"setmntent"
.LC5:
	.string	"realloc"
.LC6:
	.string	"strdup"
.LC7:
	.string	"umount %s: %s\n"
.LC8:
	.string	"reboot"
	.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
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	DWORD PTR -52[rbp], 1126301404
	jmp	.L3
.L9:
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cmp	eax, 114
	je	.L4
	cmp	eax, 114
	jg	.L5
	cmp	eax, 104
	je	.L6
	cmp	eax, 112
	je	.L7
	jmp	.L5
.L6:
	mov	DWORD PTR -52[rbp], -839974621
	jmp	.L3
.L7:
	mov	DWORD PTR -52[rbp], 1126301404
	jmp	.L3
.L4:
	mov	DWORD PTR -52[rbp], 19088743
	jmp	.L3
.L5:
	mov	eax, 0
	call	usage
.L3:
	add	QWORD PTR -80[rbp], 8
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L8
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 45
	jne	.L8
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L9
.L8:
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L10
	mov	eax, 0
	call	usage
.L10:
	mov	edi, 0
	call	getsid@PLT
	mov	ebx, eax
	call	getpid@PLT
	cmp	ebx, eax
	je	.L11
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L12
.L11:
	call	sync@PLT
	mov	esi, 15
	mov	edi, -1
	call	kill@PLT
	mov	edi, 2
	call	sleep@PLT
	mov	esi, 9
	mov	edi, -1
	call	kill@PLT
	call	sync@PLT
	lea	rsi, .LC2[rip]
	lea	rdi, .LC3[rip]
	call	setmntent@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L15
	lea	rdi, .LC4[rip]
	call	perror@PLT
	jmp	.L14
.L18:
	add	QWORD PTR -40[rbp], 1
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -48[rbp], rax
	cmp	QWORD PTR -48[rbp], 0
	jne	.L16
	lea	rdi, .LC5[rip]
	call	perror@PLT
	jmp	.L17
.L16:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -40[rbp]
	sal	rdx, 3
	lea	rcx, -8[rdx]
	mov	rdx, QWORD PTR -48[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR [rbx]
	test	rax, rax
	jne	.L15
	lea	rdi, .LC6[rip]
	call	perror@PLT
	jmp	.L17
.L15:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	getmntent@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L18
.L17:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	endmntent@PLT
	jmp	.L19
.L21:
	sub	QWORD PTR -40[rbp], 1
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	umount@PLT
	test	eax, eax
	jns	.L20
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L20:
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
.L19:
	cmp	QWORD PTR -40[rbp], 0
	jne	.L21
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	free@PLT
.L14:
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	reboot@PLT
	test	eax, eax
	jns	.L22
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L12
.L22:
	mov	eax, 0
.L12:
	mov	rbx, QWORD PTR -8[rbp]
	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	"98575453.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: shutdown [-hpr]\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L2
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L2+4
	bl	fwrite
	mov	r0, #2
	bl	exit
.L3:
	.align	2
.L2:
	.word	stderr
	.word	.LC0
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC1:
	.ascii	"must be session leader\012\000"
	.align	2
.LC2:
	.ascii	"r\000"
	.align	2
.LC3:
	.ascii	"/proc/mounts\000"
	.align	2
.LC4:
	.ascii	"setmntent\000"
	.align	2
.LC5:
	.ascii	"realloc\000"
	.align	2
.LC6:
	.ascii	"strdup\000"
	.align	2
.LC7:
	.ascii	"umount %s: %s\012\000"
	.align	2
.LC8:
	.ascii	"reboot\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #32
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r3, .L25
	str	r3, [fp, #-24]
	b	.L5
.L11:
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #114
	beq	.L6
	cmp	r3, #114
	bgt	.L7
	cmp	r3, #104
	beq	.L8
	cmp	r3, #112
	beq	.L9
	b	.L7
.L8:
	ldr	r3, .L25+4
	str	r3, [fp, #-24]
	b	.L5
.L9:
	ldr	r3, .L25
	str	r3, [fp, #-24]
	b	.L5
.L6:
	ldr	r3, .L25+8
	str	r3, [fp, #-24]
	b	.L5
.L7:
	bl	usage
.L5:
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	bne	.L10
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L11
.L10:
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L12
	bl	usage
.L12:
	mov	r0, #0
	bl	getsid
	mov	r4, r0
	bl	getpid
	mov	r3, r0
	cmp	r4, r3
	beq	.L13
	ldr	r3, .L25+12
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L25+16
	bl	fwrite
	mov	r3, #1
	b	.L14
.L13:
	bl	sync
	mov	r1, #15
	mvn	r0, #0
	bl	kill
	mov	r0, #2
	bl	sleep
	mov	r1, #9
	mvn	r0, #0
	bl	kill
	bl	sync
	ldr	r1, .L25+20
	ldr	r0, .L25+24
	bl	setmntent
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L17
	ldr	r0, .L25+28
	bl	perror
	b	.L16
.L20:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	realloc
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L18
	ldr	r0, .L25+32
	bl	perror
	b	.L19
.L18:
	ldr	r3, [fp, #-16]
	ldr	r1, [r3, #4]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r4, r2, r3
	mov	r0, r1
	bl	strdup
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L17
	ldr	r0, .L25+36
	bl	perror
	b	.L19
.L17:
	ldr	r0, [fp, #-20]
	bl	getmntent
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L20
.L19:
	ldr	r0, [fp, #-20]
	bl	endmntent
	b	.L21
.L23:
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	umount
	mov	r3, r0
	cmp	r3, #0
	bge	.L22
	ldr	r3, .L25+12
	ldr	r4, [r3]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L25+40
	mov	r0, r4
	bl	fprintf
.L22:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
.L21:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L23
	ldr	r0, [fp, #-32]
	bl	free
.L16:
	ldr	r0, [fp, #-24]
	bl	reboot
	mov	r3, r0
	cmp	r3, #0
	bge	.L24
	ldr	r0, .L25+44
	bl	perror
	mov	r3, #1
	b	.L14
.L24:
	mov	r3, #0
.L14:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L26:
	.align	2
.L25:
	.word	1126301404
	.word	-839974621
	.word	19088743
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
