#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ LOG_INFO;
int /*<<< orphan*/ _log(int /*<<< orphan*/, char *, ...);
char *basename(char *);
int /*<<< orphan*/ exit(int);
void _usage(char *progname, int exit_status) {
  progname = basename(progname);
  _log(LOG_INFO, "Usage: ( runs as a daemon )\n");
  _log(LOG_INFO,
       "  %s [ -d devices ] [ -i idletime ] [ -c checktime ] [ -h --help ] [ "
       "-v --version ]\n",
       progname);
  _log(LOG_INFO, "    -d  [a-z]+   include where a => /dev/sda, b => /dev/sdb "
                 "(default is all disks)\n");
  _log(LOG_INFO, "       ![a-z]+   exclude\n");
  _log(LOG_INFO,
       "    -i n         n seconds a disk must be idle to spin it down "
       "(default %d, min %d)\n",
       900, 300);
  _log(LOG_INFO,
       "    -c n         n seconds to sleep between idle checks (default %d, "
       "min %d)\n",
       30, 5);
  _log(LOG_INFO, "    -h --help    usage\n");
  _log(LOG_INFO, "    -v --version version\n");
  _log(LOG_INFO, "  for example:\n");
  _log(LOG_INFO, "    %s        will manage all disks with default times\n",
       progname);
  _log(LOG_INFO,
       "    %s -d bc  will manage /dev/sdb, /dev/sdc with default times\n",
       progname);
  _log(LOG_INFO,
       "    %s -d !bc will manage all disks except /dev/sdb, /dev/sdc with "
       "default times\n",
       progname);
  _log(LOG_INFO,
       "    %s -i 600 will manage all disks spinning down after 600 seconds or "
       "10 minutes\n",
       progname);
  exit(exit_status);
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <basename@plt>
mov    %rax,-0x8(%rbp)
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
mov    $0x0,%al
call   1030 <_log@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea6(%rip),%rsi
mov    $0x0,%al
call   1030 <_log@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
lea    0xee4(%rip),%rsi
mov    $0x0,%al
call   1030 <_log@plt>
mov    0x2e44(%rip),%rax
mov    (%rax),%edi
lea    0xf21(%rip),%rsi
mov    $0x0,%al
call   1030 <_log@plt>
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
lea    0xf24(%rip),%rsi
mov    $0x384,%edx
mov    $0x12c,%ecx
mov    $0x0,%al
call   1030 <_log@plt>
mov    0x2e0c(%rip),%rax
mov    (%rax),%edi
lea    0xf58(%rip),%rsi
mov    $0x1e,%edx
mov    $0x5,%ecx
mov    $0x0,%al
call   1030 <_log@plt>
mov    0x2deb(%rip),%rax
mov    (%rax),%edi
lea    0xf85(%rip),%rsi
mov    $0x0,%al
call   1030 <_log@plt>
mov    0x2dd4(%rip),%rax
mov    (%rax),%edi
lea    0xf86(%rip),%rsi
mov    $0x0,%al
call   1030 <_log@plt>
mov    0x2dbd(%rip),%rax
mov    (%rax),%edi
lea    0xf89(%rip),%rsi
mov    $0x0,%al
call   1030 <_log@plt>
mov    0x2da6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xf7e(%rip),%rsi
mov    $0x0,%al
call   1030 <_log@plt>
mov    0x2d8b(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xf9b(%rip),%rsi
mov    $0x0,%al
call   1030 <_log@plt>
mov    0x2d70(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xfc1(%rip),%rsi
mov    $0x0,%al
call   1030 <_log@plt>
mov    0x2d55(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xff8(%rip),%rsi
mov    $0x0,%al
call   1030 <_log@plt>
mov    -0xc(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<_usage>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
call   1040 <basename@plt>
mov    %rax,%rbx
mov    0x2e9a(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xeb0(%rip),%rsi
xor    %eax,%eax
call   1030 <_log@plt>
mov    0x0(%rbp),%edi
lea    0xebc(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <_log@plt>
mov    0x0(%rbp),%edi
lea    0xefd(%rip),%rsi
xor    %eax,%eax
call   1030 <_log@plt>
mov    0x0(%rbp),%edi
lea    0xf40(%rip),%rsi
xor    %eax,%eax
call   1030 <_log@plt>
mov    0x0(%rbp),%edi
lea    0xf49(%rip),%rsi
mov    $0x384,%edx
mov    $0x12c,%ecx
xor    %eax,%eax
call   1030 <_log@plt>
mov    0x0(%rbp),%edi
lea    0xf83(%rip),%rsi
mov    $0x1e,%edx
mov    $0x5,%ecx
xor    %eax,%eax
call   1030 <_log@plt>
mov    0x0(%rbp),%edi
lea    0xfb6(%rip),%rsi
xor    %eax,%eax
call   1030 <_log@plt>
mov    0x0(%rbp),%edi
lea    0xfbd(%rip),%rsi
xor    %eax,%eax
call   1030 <_log@plt>
mov    0x0(%rbp),%edi
lea    0xfc6(%rip),%rsi
xor    %eax,%eax
call   1030 <_log@plt>
mov    0x0(%rbp),%edi
lea    0xfc5(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <_log@plt>
mov    0x0(%rbp),%edi
lea    0xfe9(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <_log@plt>
mov    0x0(%rbp),%edi
lea    0x1016(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <_log@plt>
mov    0x0(%rbp),%edi
lea    0x1054(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <_log@plt>
mov    %r14d,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@LOG_INFO = global i32 0
@.str = [29 x i8] c"Usage: ( runs as a daemon )\0A\00"
@.str.1 = [85 x i8] c" %s [ -d devices ] [ -i idletime ] [ -c checktime ] [ -h --help ] [ -v --version ]\0A\00"
@.str.2 = [84 x i8] c" -d [a-z]+ include where a => /dev/sda, b => /dev/sdb (default is all disks)\0A\00"
@.str.3 = [26 x i8] c" ![a-z]+ exclude\0A\00"
@.str.4 = [85 x i8] c" -i n n seconds a disk must be idle to spin it down (default %d, min %d)\0A\00"
@.str.5 = [78 x i8] c" -c n n seconds to sleep between idle checks (default %d, min %d)\0A\00"
@.str.6 = [24 x i8] c" -h --help usage\0A\00"
@.str.7 = [26 x i8] c" -v --version version\0A\00"
@.str.8 = [16 x i8] c" for example:\0A\00"
@.str.9 = [56 x i8] c" %s will manage all disks with default times\0A\00"
@.str.10 = [65 x i8] c" %s -d bc will manage /dev/sdb, /dev/sdc with default times\0A\00"
@.str.11 = [82 x i8] c" %s -d !bc will manage all disks except /dev/sdb, /dev/sdc with default times\0A\00"
@.str.12 = [83 x i8] c" %s -i 600 will manage all disks spinning down after 600 seconds or 10 minutes\0A\00"
define void @_usage(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i8* @basename(i8* %5)
store i8* %6, i8** %3
%7 = load i32, i32* @LOG_INFO
%8 = call i32 (i32, i8*, ...) @_log(i32 %7, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @LOG_INFO
%10 = load i8*, i8** %3
%11 = call i32 (i32, i8*, ...) @_log(i32 %9, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = load i32, i32* @LOG_INFO
%13 = call i32 (i32, i8*, ...) @_log(i32 %12, i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.2, i64 0, i64 0))
%14 = load i32, i32* @LOG_INFO
%15 = call i32 (i32, i8*, ...) @_log(i32 %14, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%16 = load i32, i32* @LOG_INFO
%17 = call i32 (i32, i8*, ...) @_log(i32 %16, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.4, i64 0, i64 0), i32 900, i32 300)
%18 = load i32, i32* @LOG_INFO
%19 = call i32 (i32, i8*, ...) @_log(i32 %18, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.5, i64 0, i64 0), i32 30, i32 5)
%20 = load i32, i32* @LOG_INFO
%21 = call i32 (i32, i8*, ...) @_log(i32 %20, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%22 = load i32, i32* @LOG_INFO
%23 = call i32 (i32, i8*, ...) @_log(i32 %22, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%24 = load i32, i32* @LOG_INFO
%25 = call i32 (i32, i8*, ...) @_log(i32 %24, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%26 = load i32, i32* @LOG_INFO
%27 = load i8*, i8** %3
%28 = call i32 (i32, i8*, ...) @_log(i32 %26, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.9, i64 0, i64 0), i8* %27)
%29 = load i32, i32* @LOG_INFO
%30 = load i8*, i8** %3
%31 = call i32 (i32, i8*, ...) @_log(i32 %29, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.10, i64 0, i64 0), i8* %30)
%32 = load i32, i32* @LOG_INFO
%33 = load i8*, i8** %3
%34 = call i32 (i32, i8*, ...) @_log(i32 %32, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.11, i64 0, i64 0), i8* %33)
%35 = load i32, i32* @LOG_INFO
%36 = load i8*, i8** %3
%37 = call i32 (i32, i8*, ...) @_log(i32 %35, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.12, i64 0, i64 0), i8* %36)
%38 = load i32, i32* %4
%39 = call i32 @exit(i32 %38)
unreachable
}

LLVM IR (-O2):
@LOG_INFO = global i32 0
@.str = [29 x i8] c"Usage: ( runs as a daemon )\0A\00"
@.str.1 = [85 x i8] c" %s [ -d devices ] [ -i idletime ] [ -c checktime ] [ -h --help ] [ -v --version ]\0A\00"
@.str.2 = [84 x i8] c" -d [a-z]+ include where a => /dev/sda, b => /dev/sdb (default is all disks)\0A\00"
@.str.3 = [26 x i8] c" ![a-z]+ exclude\0A\00"
@.str.4 = [85 x i8] c" -i n n seconds a disk must be idle to spin it down (default %d, min %d)\0A\00"
@.str.5 = [78 x i8] c" -c n n seconds to sleep between idle checks (default %d, min %d)\0A\00"
@.str.6 = [24 x i8] c" -h --help usage\0A\00"
@.str.7 = [26 x i8] c" -v --version version\0A\00"
@.str.8 = [16 x i8] c" for example:\0A\00"
@.str.9 = [56 x i8] c" %s will manage all disks with default times\0A\00"
@.str.10 = [65 x i8] c" %s -d bc will manage /dev/sdb, /dev/sdc with default times\0A\00"
@.str.11 = [82 x i8] c" %s -d !bc will manage all disks except /dev/sdb, /dev/sdc with default times\0A\00"
@.str.12 = [83 x i8] c" %s -i 600 will manage all disks spinning down after 600 seconds or 10 minutes\0A\00"
define void @_usage(i8* %0, i32 %1) {
%3 = tail call i8* @basename(i8* %0)
%4 = load i32, i32* @LOG_INFO
%5 = tail call i32 (i32, i8*, ...) @_log(i32 %4, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @LOG_INFO
%7 = tail call i32 (i32, i8*, ...) @_log(i32 %6, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%8 = load i32, i32* @LOG_INFO
%9 = tail call i32 (i32, i8*, ...) @_log(i32 %8, i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.2, i64 0, i64 0))
%10 = load i32, i32* @LOG_INFO
%11 = tail call i32 (i32, i8*, ...) @_log(i32 %10, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%12 = load i32, i32* @LOG_INFO
%13 = tail call i32 (i32, i8*, ...) @_log(i32 %12, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.4, i64 0, i64 0), i32 900, i32 300)
%14 = load i32, i32* @LOG_INFO
%15 = tail call i32 (i32, i8*, ...) @_log(i32 %14, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.5, i64 0, i64 0), i32 30, i32 5)
%16 = load i32, i32* @LOG_INFO
%17 = tail call i32 (i32, i8*, ...) @_log(i32 %16, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%18 = load i32, i32* @LOG_INFO
%19 = tail call i32 (i32, i8*, ...) @_log(i32 %18, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%20 = load i32, i32* @LOG_INFO
%21 = tail call i32 (i32, i8*, ...) @_log(i32 %20, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%22 = load i32, i32* @LOG_INFO
%23 = tail call i32 (i32, i8*, ...) @_log(i32 %22, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.9, i64 0, i64 0), i8* %3)
%24 = load i32, i32* @LOG_INFO
%25 = tail call i32 (i32, i8*, ...) @_log(i32 %24, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.10, i64 0, i64 0), i8* %3)
%26 = load i32, i32* @LOG_INFO
%27 = tail call i32 (i32, i8*, ...) @_log(i32 %26, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.11, i64 0, i64 0), i8* %3)
%28 = load i32, i32* @LOG_INFO
%29 = tail call i32 (i32, i8*, ...) @_log(i32 %28, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.12, i64 0, i64 0), i8* %3)
%30 = tail call i32 @exit(i32 %1)
unreachable
}