#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 *progName) {
  printf("Uage: %s [-1 | -2] [ <com spec> ... ] [ -r<len> <com spec>] [ -sf "
         "<host>:<port>]\n",
         progName);
  printf("    Where <com spec> is one of\n");
  printf("        port        - to create a server socket\n");
  printf("        host:port   - to connect to a server\n");
  printf("        COMn        - to connect to a comm port\n");
  printf("    And additional options are\n");
  printf("        -r<len>        - opens any subsequent comm ports for "
         "unframed\n");
  printf(
      "                         and non-ascii communication with packets of\n");
  printf("                         the specified length\n");
  printf(
      "        -sf        - opens any subsequent sockets for communication \n");
  printf("                     using the serial forwarder protocol\n");
  printf("        -1              - opens any subsequent comm ports with a "
         "baud\n");
  printf("                      rate for RENE or MICA motes\n");
  printf("        -2              - opens any subsequent comm ports with a "
         "baud\n");
  printf("                      rate for MICA2 motes\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    0xf1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1018(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1039(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1071(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x109d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10d6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10fb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1134(%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    0xf19(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf50(%rip),%rdi
call   1030 <puts@plt>
lea    0xf71(%rip),%rdi
call   1030 <puts@plt>
lea    0xf95(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa8(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe2(%rip),%rdi
call   1030 <puts@plt>
lea    0x101b(%rip),%rdi
call   1030 <puts@plt>
lea    0x103d(%rip),%rdi
call   1030 <puts@plt>
lea    0x1076(%rip),%rdi
call   1030 <puts@plt>
lea    0x10a3(%rip),%rdi
call   1030 <puts@plt>
lea    0x10dd(%rip),%rdi
call   1030 <puts@plt>
lea    0x1103(%rip),%rdi
call   1030 <puts@plt>
lea    0x113d(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [82 x i8] c"Uage: %s [-1 | -2] [ <com spec> ... ] [ -r<len> <com spec>] [ -sf <host>:<port>]\0A\00"
@.str.1 = [32 x i8] c" Where <com spec> is one of\0A\00"
@.str.2 = [49 x i8] c" port - to create a server socket\0A\00"
@.str.3 = [46 x i8] c" host:port - to connect to a server\0A\00"
@.str.4 = [49 x i8] c" COMn - to connect to a comm port\0A\00"
@.str.5 = [32 x i8] c" And additional options are\0A\00"
@.str.6 = [71 x i8] c" -r<len> - opens any subsequent comm ports for unframed\0A\00"
@.str.7 = [70 x i8] c" and non-ascii communication with packets of\0A\00"
@.str.8 = [47 x i8] c" the specified length\0A\00"
@.str.9 = [70 x i8] c" -sf - opens any subsequent sockets for communication \0A\00"
@.str.10 = [58 x i8] c" using the serial forwarder protocol\0A\00"
@.str.11 = [71 x i8] c" -1 - opens any subsequent comm ports with a baud\0A\00"
@.str.12 = [51 x i8] c" rate for RENE or MICA motes\0A\00"
@.str.13 = [71 x i8] c" -2 - opens any subsequent comm ports with a baud\0A\00"
@.str.14 = [44 x i8] c" rate for MICA2 motes\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 ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.14, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [82 x i8] c"Uage: %s [-1 | -2] [ <com spec> ... ] [ -r<len> <com spec>] [ -sf <host>:<port>]\0A\00"
@str = [31 x i8] c" Where <com spec> is one of\00"
@str.15 = [48 x i8] c" port - to create a server socket\00"
@str.16 = [45 x i8] c" host:port - to connect to a server\00"
@str.17 = [48 x i8] c" COMn - to connect to a comm port\00"
@str.18 = [31 x i8] c" And additional options are\00"
@str.19 = [70 x i8] c" -r<len> - opens any subsequent comm ports for unframed\00"
@str.20 = [69 x i8] c" and non-ascii communication with packets of\00"
@str.21 = [46 x i8] c" the specified length\00"
@str.22 = [69 x i8] c" -sf - opens any subsequent sockets for communication \00"
@str.23 = [57 x i8] c" using the serial forwarder protocol\00"
@str.24 = [70 x i8] c" -1 - opens any subsequent comm ports with a baud\00"
@str.25 = [50 x i8] c" rate for RENE or MICA motes\00"
@str.26 = [70 x i8] c" -2 - opens any subsequent comm ports with a baud\00"
@str.27 = [43 x i8] c" rate for MICA2 motes\00"
define void @printUsage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.15, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.16, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.17, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.18, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.19, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.20, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.21, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.22, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.23, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.24, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.25, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.26, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.27, i64 0, i64 0))
ret void
}