#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*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("ataidle version "
         "2.4"
         "\n\n"
         "usage: \n"
         "ataidle [-h] [-i] [-s] [-o] [-I idle] [-S standby] [-A acoustic] [-P "
         "apm]\n"
         "\tdevice\n\n"
         "Options:\n");
  printf("-h\t\tdisplay this help and exit\n"
         "-I\t\tset the idle timeout in minutes\n"
         "-i\t\tput the drive into idle mode\n"
         "-S\t\tset the standby timeout in minutes\n"
         "-s\t\tput the drive into standby mode\n"
         "-o\t\tput the drive into sleep mode\n"
         "-A\t\tset the acoustic level, values 1-127\n"
         "-P\t\tset the power management level, values 1-254\n"
         "device\t\tthe device node e.g /dev/ad0\n\n"
         "if no options are specified, information\n"
         "about the device will be displayed\n\n");
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf43(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf45(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [122 x i8] c"ataidle version 2.4\0A\0Ausage: \0Aataidle [-h] [-i] [-s] [-o] [-I idle] [-S standby] [-A acoustic] [-P apm]\0A\09device\0A\0AOptions:\0A\00"
@.str.1 = [415 x i8] c"-h\09\09display this help and exit\0A-I\09\09set the idle timeout in minutes\0A-i\09\09put the drive into idle mode\0A-S\09\09set the standby timeout in minutes\0A-s\09\09put the drive into standby mode\0A-o\09\09put the drive into sleep mode\0A-A\09\09set the acoustic level, values 1-127\0A-P\09\09set the power management level, values 1-254\0Adevice\09\09the device node e.g /dev/ad0\0A\0Aif no options are specified, information\0Aabout the device will be displayed\0A\0A\00"
@EX_USAGE = global i32 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([415 x i8], [415 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@EX_USAGE = global i32 0
@str = [121 x i8] c"ataidle version 2.4\0A\0Ausage: \0Aataidle [-h] [-i] [-s] [-o] [-I idle] [-S standby] [-A acoustic] [-P apm]\0A\09device\0A\0AOptions:\00"
@str.2 = [414 x i8] c"-h\09\09display this help and exit\0A-I\09\09set the idle timeout in minutes\0A-i\09\09put the drive into idle mode\0A-S\09\09set the standby timeout in minutes\0A-s\09\09put the drive into standby mode\0A-o\09\09put the drive into sleep mode\0A-A\09\09set the acoustic level, values 1-127\0A-P\09\09set the power management level, values 1-254\0Adevice\09\09the device node e.g /dev/ad0\0A\0Aif no options are specified, information\0Aabout the device will be displayed\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([121 x i8], [121 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([414 x i8], [414 x i8]* @str.2, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}