	.file	"590984.c"
	.intel_syntax noprefix
	.text
	.globl	v_hddown
	.section	.rodata
	.align 8
.LC0:
	.string	"@(#)hddown.c  1.02  22-Apr-2003  miquels@cistron.nl"
	.section	.data.rel.local,"aw"
	.align 8
	.type	v_hddown, @object
	.size	v_hddown, 8
v_hddown:
	.quad	.LC0
	.section	.rodata
.LC1:
	.string	"/proc/ide"
.LC2:
	.string	"hd"
.LC3:
	.string	"/proc/ide/%s/media"
.LC4:
	.string	"r"
.LC5:
	.string	"disk\n"
.LC6:
	.string	"/dev/%s"
	.text
	.type	find_idedisks, @function
find_idedisks:
.LFB6:
	.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, 328
	.cfi_offset 3, -24
	mov	QWORD PTR -328[rbp], rdi
	mov	DWORD PTR -332[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -316[rbp], 0
	lea	rdi, .LC1[rip]
	call	opendir@PLT
	mov	QWORD PTR -312[rbp], rax
	cmp	QWORD PTR -312[rbp], 0
	jne	.L4
	mov	eax, -1
	jmp	.L12
.L10:
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 19
	mov	edx, 2
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	je	.L5
	jmp	.L4
.L5:
	mov	BYTE PTR -288[rbp], 0
	mov	rax, QWORD PTR -304[rbp]
	lea	rdx, 19[rax]
	lea	rax, -288[rbp]
	mov	rcx, rdx
	lea	rdx, .LC3[rip]
	mov	esi, 256
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	lea	rax, -288[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -296[rbp], rax
	cmp	QWORD PTR -296[rbp], 0
	jne	.L6
	jmp	.L4
.L6:
	mov	rdx, QWORD PTR -296[rbp]
	lea	rax, -288[rbp]
	mov	esi, 256
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	je	.L7
	lea	rax, -288[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L8
.L7:
	mov	rax, QWORD PTR -296[rbp]
	mov	rdi, rax
	call	fclose@PLT
	jmp	.L4
.L8:
	mov	rax, QWORD PTR -296[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -304[rbp]
	lea	rdx, 19[rax]
	lea	rax, -288[rbp]
	mov	rcx, rdx
	lea	rdx, .LC6[rip]
	mov	esi, 256
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	mov	eax, DWORD PTR -316[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -316[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -328[rbp]
	lea	rbx, [rdx+rax]
	lea	rax, -288[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR -316[rbp]
	cmp	eax, DWORD PTR -332[rbp]
	jge	.L14
.L4:
	mov	rax, QWORD PTR -312[rbp]
	mov	rdi, rax
	call	readdir@PLT
	mov	QWORD PTR -304[rbp], rax
	cmp	QWORD PTR -304[rbp], 0
	jne	.L10
	jmp	.L9
.L14:
	nop
.L9:
	mov	rax, QWORD PTR -312[rbp]
	mov	rdi, rax
	call	closedir@PLT
	mov	eax, DWORD PTR -316[rbp]
	cmp	eax, DWORD PTR -332[rbp]
	jge	.L11
	mov	eax, DWORD PTR -316[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -328[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
.L11:
	mov	eax, 0
.L12:
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	find_idedisks, .-find_idedisks
	.type	do_standby_idedisk, @function
do_standby_idedisk:
.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	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -16[rbp], 224
	mov	DWORD PTR -12[rbp], 148
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jns	.L16
	mov	eax, -1
	jmp	.L19
.L16:
	lea	rdx, -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 799
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	je	.L18
	lea	rdx, -12[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 799
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	je	.L18
	mov	eax, -1
	jmp	.L19
.L18:
	mov	eax, 0
.L19:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	do_standby_idedisk, .-do_standby_idedisk
	.globl	hddown
	.type	hddown, @function
hddown:
.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, 544
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -528[rbp]
	mov	esi, 64
	mov	rdi, rax
	call	find_idedisks
	test	eax, eax
	jns	.L22
	mov	eax, -1
	jmp	.L27
.L22:
	mov	DWORD PTR -532[rbp], 0
	jmp	.L24
.L26:
	mov	eax, DWORD PTR -532[rbp]
	cdqe
	mov	rax, QWORD PTR -528[rbp+rax*8]
	mov	rdi, rax
	call	do_standby_idedisk
	add	DWORD PTR -532[rbp], 1
.L24:
	mov	eax, DWORD PTR -532[rbp]
	cdqe
	mov	rax, QWORD PTR -528[rbp+rax*8]
	test	rax, rax
	je	.L25
	cmp	DWORD PTR -532[rbp], 63
	jle	.L26
.L25:
	mov	eax, 0
.L27:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	hddown, .-hddown
	.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	"590984.c"
	.text
	.global	v_hddown
	.section	.rodata
	.align	2
.LC0:
	.ascii	"@(#)hddown.c  1.02  22-Apr-2003  miquels@cistron.nl"
	.ascii	"\000"
	.data
	.align	2
	.type	v_hddown, %object
	.size	v_hddown, 4
v_hddown:
	.word	.LC0
	.section	.rodata
	.align	2
.LC1:
	.ascii	"/proc/ide\000"
	.align	2
.LC2:
	.ascii	"hd\000"
	.align	2
.LC3:
	.ascii	"/proc/ide/%s/media\000"
	.align	2
.LC4:
	.ascii	"r\000"
	.align	2
.LC5:
	.ascii	"disk\012\000"
	.align	2
.LC6:
	.ascii	"/dev/%s\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_idedisks, %function
find_idedisks:
	@ args = 0, pretend = 0, frame = 288
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #292
	str	r0, [fp, #-296]
	str	r1, [fp, #-300]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-288]
	ldr	r0, .L15+4
	bl	opendir
	str	r0, [fp, #-284]
	ldr	r3, [fp, #-284]
	cmp	r3, #0
	bne	.L4
	mvn	r3, #0
	b	.L12
.L10:
	ldr	r3, [fp, #-280]
	add	r3, r3, #11
	mov	r2, #2
	ldr	r1, .L15+8
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	b	.L4
.L5:
	mov	r3, #0
	strb	r3, [fp, #-272]
	ldr	r3, [fp, #-280]
	add	r3, r3, #11
	sub	r0, fp, #272
	ldr	r2, .L15+12
	mov	r1, #256
	bl	snprintf
	sub	r3, fp, #272
	ldr	r1, .L15+16
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-276]
	ldr	r3, [fp, #-276]
	cmp	r3, #0
	bne	.L6
	b	.L4
.L6:
	sub	r3, fp, #272
	ldr	r2, [fp, #-276]
	mov	r1, #256
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	sub	r3, fp, #272
	ldr	r1, .L15+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
.L7:
	ldr	r0, [fp, #-276]
	bl	fclose
	b	.L4
.L8:
	ldr	r0, [fp, #-276]
	bl	fclose
	ldr	r3, [fp, #-280]
	add	r3, r3, #11
	sub	r0, fp, #272
	ldr	r2, .L15+24
	mov	r1, #256
	bl	snprintf
	ldr	r3, [fp, #-288]
	add	r2, r3, #1
	str	r2, [fp, #-288]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-296]
	add	r4, r2, r3
	sub	r3, fp, #272
	mov	r0, r3
	bl	strdup
	mov	r3, r0
	str	r3, [r4]
	ldr	r2, [fp, #-288]
	ldr	r3, [fp, #-300]
	cmp	r2, r3
	bge	.L14
.L4:
	ldr	r0, [fp, #-284]
	bl	readdir
	str	r0, [fp, #-280]
	ldr	r3, [fp, #-280]
	cmp	r3, #0
	bne	.L10
	b	.L9
.L14:
	nop
.L9:
	ldr	r0, [fp, #-284]
	bl	closedir
	ldr	r2, [fp, #-288]
	ldr	r3, [fp, #-300]
	cmp	r2, r3
	bge	.L11
	ldr	r3, [fp, #-288]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-296]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
.L11:
	mov	r3, #0
.L12:
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC7
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	find_idedisks, .-find_idedisks
	.section	.rodata
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_standby_idedisk, %function
do_standby_idedisk:
	@ 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]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #224
	str	r3, [fp, #-16]
	mov	r3, #148
	str	r3, [fp, #-12]
	mov	r1, #2
	ldr	r0, [fp, #-24]
	bl	open
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bge	.L18
	mvn	r3, #0
	b	.L21
.L18:
	sub	r3, fp, #16
	mov	r2, r3
	ldr	r1, .L23+4
	ldr	r0, [fp, #-20]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	beq	.L20
	sub	r3, fp, #12
	mov	r2, r3
	ldr	r1, .L23+4
	ldr	r0, [fp, #-20]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	beq	.L20
	mvn	r3, #0
	b	.L21
.L20:
	mov	r3, #0
.L21:
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC8
	.word	799
	.size	do_standby_idedisk, .-do_standby_idedisk
	.section	.rodata
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	hddown
	.syntax unified
	.arm
	.fpu softvfp
	.type	hddown, %function
hddown:
	@ args = 0, pretend = 0, frame = 272
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #272
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #268
	mov	r1, #64
	mov	r0, r3
	bl	find_idedisks
	mov	r3, r0
	cmp	r3, #0
	bge	.L26
	mvn	r3, #0
	b	.L31
.L26:
	mov	r3, #0
	str	r3, [fp, #-272]
	b	.L28
.L30:
	ldr	r3, [fp, #-272]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-264]
	mov	r0, r3
	bl	do_standby_idedisk
	ldr	r3, [fp, #-272]
	add	r3, r3, #1
	str	r3, [fp, #-272]
.L28:
	ldr	r3, [fp, #-272]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-264]
	cmp	r3, #0
	beq	.L29
	ldr	r3, [fp, #-272]
	cmp	r3, #63
	ble	.L30
.L29:
	mov	r3, #0
.L31:
	ldr	r2, .L33
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L32
	bl	__stack_chk_fail
.L32:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC9
	.size	hddown, .-hddown
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
