#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*/ printf(char *, ...);
void printUsage(char *appName) {
  printf("Usage: %s [options]\n", appName);
  printf("OPTIONS:\n");
  printf("  -h, --help\t\t\tPrint this message.\n");
  printf("  -b, --blue\t\t\tSet color to blue.\n");
  printf("  -r, --red\t\t\tSet color to red.\n");
  printf("  -p, --purple\t\t\tSet color to purple.\n");
  printf("      --blue-red\t\tSet blinking blue to red.\n");
  printf("      --red-blue\t\tSet blinking from red to blue.\n");
  printf("      --purple-blue\t\tSet color from purple to blue.\n");
  printf("      --purple-red\t\tSet color from purple to red.\n");
  printf("      --disable\t\t\tDisable the LEDs.\n");
  printf("  -s, --still\t\t\tMake the LED still.\n");
  printf("  -a, --audio\t\t\tMake the red LED react to audio.\n");
  printf("  -v, --volume\t\t\tMake the red LED behaviour volume dependent.\n");
  printf("  -d, --duty-cycle <value>\tSpecify time spent on vs time spent off "
         "in %%.\n");
  printf("      --period <value>\tSpecify time spent off vs time spent on in "
         "ms (max 255).\n");
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfc2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1014(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1045(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1082(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf27(%rip),%rdi
call   1030 <puts@plt>
lea    0xf24(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf51(%rip),%rdi
call   1030 <puts@plt>
lea    0xf65(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9f(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc4(%rip),%rdi
call   1030 <puts@plt>
lea    0xfec(%rip),%rdi
call   1030 <puts@plt>
lea    0x1012(%rip),%rdi
call   1030 <puts@plt>
lea    0x102a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1042(%rip),%rdi
call   1030 <puts@plt>
lea    0x1067(%rip),%rdi
call   1030 <puts@plt>
lea    0xe40(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x108b(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.1 = [10 x i8] c"OPTIONS:\0A\00"
@.str.2 = [36 x i8] c" -h, --help\09\09\09Print this message.\0A\00"
@.str.3 = [35 x i8] c" -b, --blue\09\09\09Set color to blue.\0A\00"
@.str.4 = [33 x i8] c" -r, --red\09\09\09Set color to red.\0A\00"
@.str.5 = [39 x i8] c" -p, --purple\09\09\09Set color to purple.\0A\00"
@.str.6 = [45 x i8] c" --blue-red\09\09Set blinking blue to red.\0A\00"
@.str.7 = [50 x i8] c" --red-blue\09\09Set blinking from red to blue.\0A\00"
@.str.8 = [53 x i8] c" --purple-blue\09\09Set color from purple to blue.\0A\00"
@.str.9 = [51 x i8] c" --purple-red\09\09Set color from purple to red.\0A\00"
@.str.10 = [37 x i8] c" --disable\09\09\09Disable the LEDs.\0A\00"
@.str.11 = [37 x i8] c" -s, --still\09\09\09Make the LED still.\0A\00"
@.str.12 = [50 x i8] c" -a, --audio\09\09\09Make the red LED react to audio.\0A\00"
@.str.13 = [63 x i8] c" -v, --volume\09\09\09Make the red LED behaviour volume dependent.\0A\00"
@.str.14 = [75 x i8] c" -d, --duty-cycle <value>\09Specify time spent on vs time spent off in %%.\0A\00"
@.str.15 = [81 x i8] c" --period <value>\09Specify time spent off vs time spent on in ms (max 255).\0A\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.14, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.15, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.14 = [75 x i8] c" -d, --duty-cycle <value>\09Specify time spent on vs time spent off in %%.\0A\00"
@str = [9 x i8] c"OPTIONS:\00"
@str.16 = [35 x i8] c" -h, --help\09\09\09Print this message.\00"
@str.17 = [34 x i8] c" -b, --blue\09\09\09Set color to blue.\00"
@str.18 = [32 x i8] c" -r, --red\09\09\09Set color to red.\00"
@str.19 = [38 x i8] c" -p, --purple\09\09\09Set color to purple.\00"
@str.20 = [44 x i8] c" --blue-red\09\09Set blinking blue to red.\00"
@str.21 = [49 x i8] c" --red-blue\09\09Set blinking from red to blue.\00"
@str.22 = [52 x i8] c" --purple-blue\09\09Set color from purple to blue.\00"
@str.23 = [50 x i8] c" --purple-red\09\09Set color from purple to red.\00"
@str.24 = [36 x i8] c" --disable\09\09\09Disable the LEDs.\00"
@str.25 = [36 x i8] c" -s, --still\09\09\09Make the LED still.\00"
@str.26 = [49 x i8] c" -a, --audio\09\09\09Make the red LED react to audio.\00"
@str.27 = [62 x i8] c" -v, --volume\09\09\09Make the red LED behaviour volume dependent.\00"
@str.28 = [80 x i8] c" --period <value>\09Specify time spent off vs time spent on in ms (max 255).\00"
define void @printUsage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.16, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.17, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.18, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.19, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.20, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.21, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.22, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.23, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.24, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.25, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.26, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.27, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @.str.14, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.28, i64 0, i64 0))
ret void
}