#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*/ disp_version();
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ puts(char *);
void disp_help() {
  disp_version();
  printf("Usage: %s [options]\n", "kbdleds");
  puts("Options:");
  puts("-v               Prints the version number to the screen.");
  puts("-h               Prints this screen.");
  puts("-g               Prints the current keyboard LED status.");
  puts("-s<number>       Causes the keys to be set according to <number>, "
       "which");
  puts("                 is used to designate keys. <number> should be between "
       "1");
  puts("                 and 7 inclusive.");
  puts("-a<number>       Same as -s, but does a logical and with the current "
       "status of");
  puts("                 the LEDs.");
  puts("-o<number>       Same as -s, but does a logical or with the current "
       "status of");
  puts("                 the LEDs.");
  puts("-x<number>       Same as -s, but does a logical xor with the current "
       "status of");
  puts("                 the LEDs.");
  puts("-d               Loops through the pattern forever.");
  puts("-D               Forks into the background and loops through the "
       "pattern forever.");
  puts("-w<number>       Waits <number> milliseconds before executing the next "
       "command.");
}


x86 assembly (clang, -O0):
<disp_help>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <disp_version@plt>
lea    0xebe(%rip),%rdi
lea    0xecc(%rip),%rsi
call   1040 <printf@plt>
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf39(%rip),%rdi
call   1030 <puts@plt>
lea    0xf75(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb2(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc8(%rip),%rdi
call   1030 <puts@plt>
lea    0x100b(%rip),%rdi
call   1030 <puts@plt>
lea    0x101a(%rip),%rdi
call   1030 <puts@plt>
lea    0xff3(%rip),%rdi
call   1030 <puts@plt>
lea    0x1050(%rip),%rdi
call   1030 <puts@plt>
lea    0xfdb(%rip),%rdi
call   1030 <puts@plt>
lea    0x1087(%rip),%rdi
call   1030 <puts@plt>
lea    0x10af(%rip),%rdi
call   1030 <puts@plt>
lea    0x10f5(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<disp_help>:
push   %rbx
xor    %eax,%eax
call   1050 <disp_version@plt>
lea    0xec1(%rip),%rdi
lea    0xecf(%rip),%rsi
call   1040 <printf@plt>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef6(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf78(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb5(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcb(%rip),%rdi
call   1030 <puts@plt>
lea    0x100e(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0x101a(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0x1054(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0x108f(%rip),%rdi
call   1030 <puts@plt>
lea    0x10b7(%rip),%rdi
call   1030 <puts@plt>
lea    0x10fd(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.1 = [8 x i8] c"kbdleds\00"
@.str.2 = [9 x i8] c"Options:\00"
@.str.3 = [58 x i8] c"-v Prints the version number to the screen.\00"
@.str.4 = [37 x i8] c"-h Prints this screen.\00"
@.str.5 = [57 x i8] c"-g Prints the current keyboard LED status.\00"
@.str.6 = [72 x i8] c"-s<number> Causes the keys to be set according to <number>, which\00"
@.str.7 = [73 x i8] c" is used to designate keys. <number> should be between 1\00"
@.str.8 = [34 x i8] c" and 7 inclusive.\00"
@.str.9 = [79 x i8] c"-a<number> Same as -s, but does a logical and with the current status of\00"
@.str.10 = [27 x i8] c" the LEDs.\00"
@.str.11 = [78 x i8] c"-o<number> Same as -s, but does a logical or with the current status of\00"
@.str.12 = [79 x i8] c"-x<number> Same as -s, but does a logical xor with the current status of\00"
@.str.13 = [52 x i8] c"-d Loops through the pattern forever.\00"
@.str.14 = [82 x i8] c"-D Forks into the background and loops through the pattern forever.\00"
@.str.15 = [80 x i8] c"-w<number> Waits <number> milliseconds before executing the next command.\00"
define void @disp_help() {
%1 = call i32 (...) @disp_version()
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @puts(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @puts(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @puts(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%14 = call i32 @puts(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.12, i64 0, i64 0))
%15 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%16 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.13, i64 0, i64 0))
%17 = call i32 @puts(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.14, i64 0, i64 0))
%18 = call i32 @puts(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.15, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.1 = [8 x i8] c"kbdleds\00"
@.str.2 = [9 x i8] c"Options:\00"
@.str.3 = [58 x i8] c"-v Prints the version number to the screen.\00"
@.str.4 = [37 x i8] c"-h Prints this screen.\00"
@.str.5 = [57 x i8] c"-g Prints the current keyboard LED status.\00"
@.str.6 = [72 x i8] c"-s<number> Causes the keys to be set according to <number>, which\00"
@.str.7 = [73 x i8] c" is used to designate keys. <number> should be between 1\00"
@.str.8 = [34 x i8] c" and 7 inclusive.\00"
@.str.9 = [79 x i8] c"-a<number> Same as -s, but does a logical and with the current status of\00"
@.str.10 = [27 x i8] c" the LEDs.\00"
@.str.11 = [78 x i8] c"-o<number> Same as -s, but does a logical or with the current status of\00"
@.str.12 = [79 x i8] c"-x<number> Same as -s, but does a logical xor with the current status of\00"
@.str.13 = [52 x i8] c"-d Loops through the pattern forever.\00"
@.str.14 = [82 x i8] c"-D Forks into the background and loops through the pattern forever.\00"
@.str.15 = [80 x i8] c"-w<number> Waits <number> milliseconds before executing the next command.\00"
define void @disp_help() {
%1 = tail call i32 (...) @disp_version()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str.6, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @.str.9, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @.str.11, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @.str.12, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.13, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @.str.14, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @.str.15, i64 0, i64 0))
ret void
}