#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*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void usage(void) {
  printf("\nVersion %s\n", "6.2 2017-05-01");
  printf("\nsensd: A WSN gateway, proxy and hub\n");
  printf("Usage: sensd [-send addr] [-send_port port] [-p port] [-report] "
         "[-domain dmn] [-utc] [-f file] [-R path] [-g gpsdev] [-LATX.xx] "
         "[-LONY.yy] [-ALTZ.zz] [ -D dev]\n");
  printf(" -D dev       Serial or USB dev. Typically /dev/ttyUSB0\n");
  printf(" -f file      Local logfile. Default is %s\n",
         "/var/log/sensors.dat");
  printf(" -report      Enable TCP reports\n");
  printf(" -p port      TCP server port. Default %d\n", 1234);
  printf(" -send addr   Send data to a proxy\n");
  printf(" -receive     Receive. Be a proxy\n");
  printf(" -receive_time_local   Use local time\n");
  printf(" -send_port port  Set proxyport. Default %d\n", 1234);
  printf(" -utc         Time in UTC\n");
  printf(" -R path      Path for reports. One dir per sensor. One file per "
         "value\n");
  printf(" -g gpsdev    Device for gps\n");
  printf(" -infile      Read data from a file (named pipe)\n");
  printf(" -debug       Debug on stdout\n");
  printf(" -domain dmn  Add domain tag\n");
  printf("\nExample 1: Local file logging\n sensd  -D /dev/ttyUSB0\n");
  printf("Example 2: TCP listers. No file logging\n sensd -report -f /dev/null "
         "-D /dev/ttyUSB0\n");
  printf("Example 3: Send to proxy\n sensd -report -send addr -f /dev/null -D "
         "/dev/ttyUSB0\n");
  printf("Example 4: Be a proxy. TCP listers. No file logging\n sensd -report "
         "-receive -f /dev/null\n");
  printf("Example 5: Use a named pipe\n sensd -report -f /dev/null -infile "
         "mkfifo_file\n");
  printf("Example 6: Use LAT/LON\n sensd -report -f /dev/null -LAT -2.10 -LON "
         "12.10 -D /dev/ttyUSB0\n");
  printf("Example 7: Use LAT/LON\n sensd -report -f /dev/null -LAT -2.10 -LON "
         "12.10 -ALT 10.1 -D /dev/ttyUSB0\n");
  printf("Example 8: Use a gps device\n sensd -report -f /dev/null -g "
         "/dev/ttyUSB1 -D /dev/ttyUSB0\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xedb(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb2(%rip),%rdi
lea    0xfd7(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfde(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff2(%rip),%rdi
mov    $0x4d2,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x100a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1020(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1035(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x104e(%rip),%rdi
mov    $0x4d2,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1068(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1075(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10af(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10bf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10e3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10f4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1104(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x112e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1175(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x11b8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1204(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1243(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x128f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x12e5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xece(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf68(%rip),%rdi
call   1030 <puts@plt>
lea    0xf81(%rip),%rdi
call   1030 <puts@plt>
lea    0x1015(%rip),%rdi
call   1030 <puts@plt>
lea    0xeab(%rip),%rdi
lea    0xed0(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x102c(%rip),%rdi
call   1030 <puts@plt>
lea    0xecb(%rip),%rdi
mov    $0x4d2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x102e(%rip),%rdi
call   1030 <puts@plt>
lea    0x1045(%rip),%rdi
call   1030 <puts@plt>
lea    0x105b(%rip),%rdi
call   1030 <puts@plt>
lea    0xebf(%rip),%rdi
mov    $0x4d2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1062(%rip),%rdi
call   1030 <puts@plt>
lea    0x1070(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ab(%rip),%rdi
call   1030 <puts@plt>
lea    0x10bc(%rip),%rdi
call   1030 <puts@plt>
lea    0x10e1(%rip),%rdi
call   1030 <puts@plt>
lea    0x10f3(%rip),%rdi
call   1030 <puts@plt>
lea    0x1104(%rip),%rdi
call   1030 <puts@plt>
lea    0x112f(%rip),%rdi
call   1030 <puts@plt>
lea    0x1177(%rip),%rdi
call   1030 <puts@plt>
lea    0x11bb(%rip),%rdi
call   1030 <puts@plt>
lea    0x1208(%rip),%rdi
call   1030 <puts@plt>
lea    0x1248(%rip),%rdi
call   1030 <puts@plt>
lea    0x1295(%rip),%rdi
call   1030 <puts@plt>
lea    0x12ec(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"\0AVersion %s\0A\00"
@.str.1 = [15 x i8] c"6.2 2017-05-01\00"
@.str.2 = [38 x i8] c"\0Asensd: A WSN gateway, proxy and hub\0A\00"
@.str.3 = [161 x i8] c"Usage: sensd [-send addr] [-send_port port] [-p port] [-report] [-domain dmn] [-utc] [-f file] [-R path] [-g gpsdev] [-LATX.xx] [-LONY.yy] [-ALTZ.zz] [ -D dev]\0A\00"
@.str.4 = [57 x i8] c" -D dev Serial or USB dev. Typically /dev/ttyUSB0\0A\00"
@.str.5 = [44 x i8] c" -f file Local logfile. Default is %s\0A\00"
@.str.6 = [21 x i8] c"/var/log/sensors.dat\00"
@.str.7 = [34 x i8] c" -report Enable TCP reports\0A\00"
@.str.8 = [43 x i8] c" -p port TCP server port. Default %d\0A\00"
@.str.9 = [36 x i8] c" -send addr Send data to a proxy\0A\00"
@.str.10 = [35 x i8] c" -receive Receive. Be a proxy\0A\00"
@.str.11 = [39 x i8] c" -receive_time_local Use local time\0A\00"
@.str.12 = [45 x i8] c" -send_port port Set proxyport. Default %d\0A\00"
@.str.13 = [27 x i8] c" -utc Time in UTC\0A\00"
@.str.14 = [72 x i8] c" -R path Path for reports. One dir per sensor. One file per value\0A\00"
@.str.15 = [30 x i8] c" -g gpsdev Device for gps\0A\00"
@.str.16 = [50 x i8] c" -infile Read data from a file (named pipe)\0A\00"
@.str.17 = [31 x i8] c" -debug Debug on stdout\0A\00"
@.str.18 = [30 x i8] c" -domain dmn Add domain tag\0A\00"
@.str.19 = [56 x i8] c"\0AExample 1: Local file logging\0A sensd -D /dev/ttyUSB0\0A\00"
@.str.20 = [85 x i8] c"Example 2: TCP listers. No file logging\0A sensd -report -f /dev/null -D /dev/ttyUSB0\0A\00"
@.str.21 = [81 x i8] c"Example 3: Send to proxy\0A sensd -report -send addr -f /dev/null -D /dev/ttyUSB0\0A\00"
@.str.22 = [90 x i8] c"Example 4: Be a proxy. TCP listers. No file logging\0A sensd -report -receive -f /dev/null\0A\00"
@.str.23 = [77 x i8] c"Example 5: Use a named pipe\0A sensd -report -f /dev/null -infile mkfifo_file\0A\00"
@.str.24 = [90 x i8] c"Example 6: Use LAT/LON\0A sensd -report -f /dev/null -LAT -2.10 -LON 12.10 -D /dev/ttyUSB0\0A\00"
@.str.25 = [100 x i8] c"Example 7: Use LAT/LON\0A sensd -report -f /dev/null -LAT -2.10 -LON 12.10 -ALT 10.1 -D /dev/ttyUSB0\0A\00"
@.str.26 = [89 x i8] c"Example 8: Use a gps device\0A sensd -report -f /dev/null -g /dev/ttyUSB1 -D /dev/ttyUSB0\0A\00"
define void @usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0), i32 1234)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.11, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.12, i64 0, i64 0), i32 1234)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.14, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.16, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.17, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.18, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.19, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.20, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.21, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.22, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.23, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.24, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @.str.25, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.26, i64 0, i64 0))
%26 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [13 x i8] c"\0AVersion %s\0A\00"
@.str.1 = [15 x i8] c"6.2 2017-05-01\00"
@.str.5 = [44 x i8] c" -f file Local logfile. Default is %s\0A\00"
@.str.6 = [21 x i8] c"/var/log/sensors.dat\00"
@.str.8 = [43 x i8] c" -p port TCP server port. Default %d\0A\00"
@.str.12 = [45 x i8] c" -send_port port Set proxyport. Default %d\0A\00"
@str = [37 x i8] c"\0Asensd: A WSN gateway, proxy and hub\00"
@str.27 = [160 x i8] c"Usage: sensd [-send addr] [-send_port port] [-p port] [-report] [-domain dmn] [-utc] [-f file] [-R path] [-g gpsdev] [-LATX.xx] [-LONY.yy] [-ALTZ.zz] [ -D dev]\00"
@str.28 = [56 x i8] c" -D dev Serial or USB dev. Typically /dev/ttyUSB0\00"
@str.29 = [33 x i8] c" -report Enable TCP reports\00"
@str.30 = [35 x i8] c" -send addr Send data to a proxy\00"
@str.31 = [34 x i8] c" -receive Receive. Be a proxy\00"
@str.32 = [38 x i8] c" -receive_time_local Use local time\00"
@str.33 = [26 x i8] c" -utc Time in UTC\00"
@str.34 = [71 x i8] c" -R path Path for reports. One dir per sensor. One file per value\00"
@str.35 = [29 x i8] c" -g gpsdev Device for gps\00"
@str.36 = [49 x i8] c" -infile Read data from a file (named pipe)\00"
@str.37 = [30 x i8] c" -debug Debug on stdout\00"
@str.38 = [29 x i8] c" -domain dmn Add domain tag\00"
@str.39 = [55 x i8] c"\0AExample 1: Local file logging\0A sensd -D /dev/ttyUSB0\00"
@str.40 = [84 x i8] c"Example 2: TCP listers. No file logging\0A sensd -report -f /dev/null -D /dev/ttyUSB0\00"
@str.41 = [80 x i8] c"Example 3: Send to proxy\0A sensd -report -send addr -f /dev/null -D /dev/ttyUSB0\00"
@str.42 = [89 x i8] c"Example 4: Be a proxy. TCP listers. No file logging\0A sensd -report -receive -f /dev/null\00"
@str.43 = [76 x i8] c"Example 5: Use a named pipe\0A sensd -report -f /dev/null -infile mkfifo_file\00"
@str.44 = [89 x i8] c"Example 6: Use LAT/LON\0A sensd -report -f /dev/null -LAT -2.10 -LON 12.10 -D /dev/ttyUSB0\00"
@str.45 = [99 x i8] c"Example 7: Use LAT/LON\0A sensd -report -f /dev/null -LAT -2.10 -LON 12.10 -ALT 10.1 -D /dev/ttyUSB0\00"
@str.46 = [88 x i8] c"Example 8: Use a gps device\0A sensd -report -f /dev/null -g /dev/ttyUSB1 -D /dev/ttyUSB0\00"
define void @usage() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([160 x i8], [160 x i8]* @str.27, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.28, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.29, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0), i32 1234)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.30, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.31, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.32, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.12, i64 0, i64 0), i32 1234)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.33, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.34, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.35, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.36, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.37, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.38, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.39, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @str.40, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.41, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([89 x i8], [89 x i8]* @str.42, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.43, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([89 x i8], [89 x i8]* @str.44, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([99 x i8], [99 x i8]* @str.45, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([88 x i8], [88 x i8]* @str.46, i64 0, i64 0))
%26 = tail call i32 @exit(i32 -1)
unreachable
}