#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 usage(char *argv0) {
  printf("usage: %s -c connectstring -o oraclehome -u usernameprogram -p "
         "pwprogram\n",
         argv0);
  printf("Mandatory:\n");
  printf(" -c,--connectstring     Connect string, passed to connect command "
         "for login in sqlplus\n");
  printf("                        Two variables are available: {{username}} "
         "and {{password}}, which\n");
  printf(
      "                        will be replaced with the result of running\n");
  printf("                        usernameprogram (-u) and passwordprogram "
         "(-p)\n");
  printf(" examples:\n");
  printf(" -c "
         "'{{username}}/"
         "\"{{password}}\"@\"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oradb01."
         "initech.com)(PORT=1521))(CONNECT_DATA=(SID=oradb01)))\"'\n");
  printf(
      " -c "
      "'sys/"
      "\"{{password}}\"@\"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oradb01."
      "initech.com)(PORT=1521))(CONNECT_DATA=(SID=oradb01)))\" AS SYSDBA'\n");
  printf(
      " -c "
      "'{{username}}/"
      "\"{{password}}\"@\"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oradb01."
      "initech.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=pluggable1)))\"'\n");
  printf(" -o,--oraclehome        Path to Oracle home (same as ORACLE_HOME "
         "environment variable)\n");
  printf("                        This program will execute "
         "ORACLE_HOME/bin/sqlplus\n");
  printf(" -u,--usernameprogram   Path and arguments to program that will "
         "return Oracle database username\n");
  printf(" -p,--passwordprogram   Path and arguments to program that will "
         "return Oracle database password\n");
  printf("                        NOTE: username and password programs are "
         "passed to execv(), so\n");
  printf("                              things like pipes as well as single "
         "and double quotes\n");
  printf("                              are not supported.\n");
  printf("                              Just provide a single script or "
         "program that will return\n");
  printf("                              the uname/password\n");
  printf(" examples:\n");
  printf(" -u /usr/local/bin/get_oracle_username\n");
  printf("\n");
  printf("Optional:\n");
  printf(" -a,--sqlplusargs       Additional arguments to pass to the sqlplus "
         "program\n");
  printf(" -d,--debug             Print debug messages\n");
  printf(" -h,--help              This help message\n");
  printf("Report bugs to <ryan@rchapman.org>\n");
}


x86 assembly (clang, -O0):
<usage>:
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    0xf15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x101a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1018(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1097(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1117(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x11a2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x11ec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1229(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x127c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x12cf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1319(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1360(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1384(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x13ce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf64(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x13e4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfdf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x13f0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x13ed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x142c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x144c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1469(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf01(%rip),%rdi
call   1040 <puts@plt>
lea    0xf00(%rip),%rdi
call   1040 <puts@plt>
lea    0xf4b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf99(%rip),%rdi
call   1040 <puts@plt>
lea    0xfd1(%rip),%rdi
call   1040 <puts@plt>
lea    0x1481(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xffc(%rip),%rdi
call   1040 <puts@plt>
lea    0x107c(%rip),%rdi
call   1040 <puts@plt>
lea    0x10fd(%rip),%rdi
call   1040 <puts@plt>
lea    0x1189(%rip),%rdi
call   1040 <puts@plt>
lea    0x11d4(%rip),%rdi
call   1040 <puts@plt>
lea    0x1212(%rip),%rdi
call   1040 <puts@plt>
lea    0x1266(%rip),%rdi
call   1040 <puts@plt>
lea    0x12ba(%rip),%rdi
call   1040 <puts@plt>
lea    0x1305(%rip),%rdi
call   1040 <puts@plt>
lea    0x134d(%rip),%rdi
call   1040 <puts@plt>
lea    0x1372(%rip),%rdi
call   1040 <puts@plt>
lea    0x13bd(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0x13e5(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x13f6(%rip),%rdi
call   1040 <puts@plt>
lea    0x13f4(%rip),%rdi
call   1040 <puts@plt>
lea    0x1434(%rip),%rdi
call   1040 <puts@plt>
lea    0x1455(%rip),%rdi
call   1040 <puts@plt>
lea    0x1473(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [74 x i8] c"usage: %s -c connectstring -o oraclehome -u usernameprogram -p pwprogram\0A\00"
@.str.1 = [12 x i8] c"Mandatory:\0A\00"
@.str.2 = [88 x i8] c" -c,--connectstring Connect string, passed to connect command for login in sqlplus\0A\00"
@.str.3 = [91 x i8] c" Two variables are available: {{username}} and {{password}}, which\0A\00"
@.str.4 = [69 x i8] c" will be replaced with the result of running\0A\00"
@.str.5 = [71 x i8] c" usernameprogram (-u) and passwordprogram (-p)\0A\00"
@.str.6 = [12 x i8] c" examples:\0A\00"
@.str.7 = [141 x i8] c" -c '{{username}}/\22{{password}}\22@\22(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oradb01.initech.com)(PORT=1521))(CONNECT_DATA=(SID=oradb01)))\22'\0A\00"
@.str.8 = [142 x i8] c" -c 'sys/\22{{password}}\22@\22(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oradb01.initech.com)(PORT=1521))(CONNECT_DATA=(SID=oradb01)))\22 AS SYSDBA'\0A\00"
@.str.9 = [153 x i8] c" -c '{{username}}/\22{{password}}\22@\22(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oradb01.initech.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=pluggable1)))\22'\0A\00"
@.str.10 = [88 x i8] c" -o,--oraclehome Path to Oracle home (same as ORACLE_HOME environment variable)\0A\00"
@.str.11 = [75 x i8] c" This program will execute ORACLE_HOME/bin/sqlplus\0A\00"
@.str.12 = [97 x i8] c" -u,--usernameprogram Path and arguments to program that will return Oracle database username\0A\00"
@.str.13 = [97 x i8] c" -p,--passwordprogram Path and arguments to program that will return Oracle database password\0A\00"
@.str.14 = [88 x i8] c" NOTE: username and password programs are passed to execv(), so\0A\00"
@.str.15 = [85 x i8] c" things like pipes as well as single and double quotes\0A\00"
@.str.16 = [50 x i8] c" are not supported.\0A\00"
@.str.17 = [88 x i8] c" Just provide a single script or program that will return\0A\00"
@.str.18 = [50 x i8] c" the uname/password\0A\00"
@.str.19 = [40 x i8] c" -u /usr/local/bin/get_oracle_username\0A\00"
@.str.20 = [2 x i8] c"\0A\00"
@.str.21 = [11 x i8] c"Optional:\0A\00"
@.str.22 = [77 x i8] c" -a,--sqlplusargs Additional arguments to pass to the sqlplus program\0A\00"
@.str.23 = [46 x i8] c" -d,--debug Print debug messages\0A\00"
@.str.24 = [43 x i8] c" -h,--help This help message\0A\00"
@.str.25 = [36 x i8] c"Report bugs to <ryan@rchapman.org>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.14, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.15, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.16, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.17, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.18, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.21, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.22, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.23, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.24, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.25, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [74 x i8] c"usage: %s -c connectstring -o oraclehome -u usernameprogram -p pwprogram\0A\00"
@str = [11 x i8] c"Mandatory:\00"
@str.26 = [87 x i8] c" -c,--connectstring Connect string, passed to connect command for login in sqlplus\00"
@str.27 = [90 x i8] c" Two variables are available: {{username}} and {{password}}, which\00"
@str.28 = [68 x i8] c" will be replaced with the result of running\00"
@str.29 = [70 x i8] c" usernameprogram (-u) and passwordprogram (-p)\00"
@str.31 = [140 x i8] c" -c '{{username}}/\22{{password}}\22@\22(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oradb01.initech.com)(PORT=1521))(CONNECT_DATA=(SID=oradb01)))\22'\00"
@str.32 = [141 x i8] c" -c 'sys/\22{{password}}\22@\22(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oradb01.initech.com)(PORT=1521))(CONNECT_DATA=(SID=oradb01)))\22 AS SYSDBA'\00"
@str.33 = [152 x i8] c" -c '{{username}}/\22{{password}}\22@\22(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oradb01.initech.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=pluggable1)))\22'\00"
@str.34 = [87 x i8] c" -o,--oraclehome Path to Oracle home (same as ORACLE_HOME environment variable)\00"
@str.35 = [74 x i8] c" This program will execute ORACLE_HOME/bin/sqlplus\00"
@str.36 = [96 x i8] c" -u,--usernameprogram Path and arguments to program that will return Oracle database username\00"
@str.37 = [96 x i8] c" -p,--passwordprogram Path and arguments to program that will return Oracle database password\00"
@str.38 = [87 x i8] c" NOTE: username and password programs are passed to execv(), so\00"
@str.39 = [84 x i8] c" things like pipes as well as single and double quotes\00"
@str.40 = [49 x i8] c" are not supported.\00"
@str.41 = [87 x i8] c" Just provide a single script or program that will return\00"
@str.42 = [49 x i8] c" the uname/password\00"
@str.43 = [11 x i8] c" examples:\00"
@str.44 = [39 x i8] c" -u /usr/local/bin/get_oracle_username\00"
@str.45 = [10 x i8] c"Optional:\00"
@str.46 = [76 x i8] c" -a,--sqlplusargs Additional arguments to pass to the sqlplus program\00"
@str.47 = [45 x i8] c" -d,--debug Print debug messages\00"
@str.48 = [42 x i8] c" -h,--help This help message\00"
@str.49 = [35 x i8] c"Report bugs to <ryan@rchapman.org>\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @str.26, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([90 x i8], [90 x i8]* @str.27, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.28, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.29, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.43, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([140 x i8], [140 x i8]* @str.31, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([141 x i8], [141 x i8]* @str.32, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([152 x i8], [152 x i8]* @str.33, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @str.34, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.35, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @str.36, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @str.37, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @str.38, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @str.39, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.40, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @str.41, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.42, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.43, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.44, i64 0, i64 0))
%23 = tail call i32 @putchar(i32 10)
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.45, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.46, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.47, i64 0, i64 0))
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.48, i64 0, i64 0))
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.49, i64 0, i64 0))
ret void
}