#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 */
typedef int /*<<< orphan*/ known;

/* Variables and functions */
char *getApplicationCommandLine(char *, char *, char **, char **, char **,
                                size_t);
char *getBrowserCommandLine(char *application, char *filename) {
  char *known[] = {
      "konqueror",
      "netscape",
      "firefox",
      "/Applications/Firefox.app/Contents/MacOS/firefox",
      "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
      "/Applications/Safari.app/Contents/MacOS/Safari",
      "/Applications/Opera.app/Contents/MacOS/Opera",
      "elinks",
      "links",
      "opera",
      "yelp",
      "lynx",
      "w3m"};
  char *xterm[] = {"n", "n", "n", "n", "n", "n", "n",
                   "y", "y", "n", "n", "y", "y"};
  char *opencmd[] = {"",       "",      "", "Firefox", "Google Chrome",
                     "Safari", "Opera", "", "",        "",
                     "",       "",      ""};
  size_t total = sizeof(known) / sizeof(known[0]);
  return getApplicationCommandLine(application, filename, known, xterm, opencmd,
                                   total);
}


x86 assembly (clang, -O0):
<getBrowserCommandLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
lea    0x2b92(%rip),%rsi
mov    $0x68,%edx
call   1030 <memcpy@plt>
lea    -0xf0(%rbp),%rdi
lea    0x2bea(%rip),%rsi
mov    $0x68,%edx
call   1030 <memcpy@plt>
lea    -0x160(%rbp),%rdi
lea    0x2c42(%rip),%rsi
mov    $0x68,%edx
call   1030 <memcpy@plt>
movq   $0xd,-0x168(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x80(%rbp),%rdx
lea    -0xf0(%rbp),%rcx
lea    -0x160(%rbp),%r8
mov    -0x168(%rbp),%r9
call   1040 <getApplicationCommandLine@plt>
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBrowserCommandLine>:
sub    $0x148,%rsp
mov    0x2c12(%rip),%rax
mov    %rax,0x140(%rsp)
movaps 0x2bf3(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movaps 0x2bd4(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0x2bb5(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0x2b96(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0x2b77(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0x2b58(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
mov    0x2c19(%rip),%rax
mov    %rax,0xd0(%rsp)
movaps 0x2bfa(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0x2bdb(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0x2bbc(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0x2b9d(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0x2b7e(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0x2b5f(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
mov    0x2c23(%rip),%rax
mov    %rax,0x60(%rsp)
movaps 0x2c07(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0x2beb(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0x2bcf(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0x2bb3(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x2b97(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2b7b(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xe0(%rsp),%rdx
lea    0x70(%rsp),%rcx
mov    %rsp,%r8
mov    $0xd,%r9d
call   1030 <getApplicationCommandLine@plt>
add    $0x148,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"konqueror\00"
@.str.1 = [9 x i8] c"netscape\00"
@.str.2 = [8 x i8] c"firefox\00"
@.str.3 = [49 x i8] c"/Applications/Firefox.app/Contents/MacOS/firefox\00"
@.str.4 = [61 x i8] c"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\00"
@.str.5 = [47 x i8] c"/Applications/Safari.app/Contents/MacOS/Safari\00"
@.str.6 = [45 x i8] c"/Applications/Opera.app/Contents/MacOS/Opera\00"
@.str.7 = [7 x i8] c"elinks\00"
@.str.8 = [6 x i8] c"links\00"
@.str.9 = [6 x i8] c"opera\00"
@.str.10 = [5 x i8] c"yelp\00"
@.str.11 = [5 x i8] c"lynx\00"
@.str.12 = [4 x i8] c"w3m\00"
@__const.getBrowserCommandLine.known = [13 x i8*] [i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i32 0, i32 0)]
@.str.13 = [2 x i8] c"n\00"
@.str.14 = [2 x i8] c"y\00"
@__const.getBrowserCommandLine.xterm = [13 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i32 0, i32 0)]
@.str.15 = [1 x i8] zeroinitializer
@.str.16 = [8 x i8] c"Firefox\00"
@.str.17 = [14 x i8] c"Google Chrome\00"
@.str.18 = [7 x i8] c"Safari\00"
@.str.19 = [6 x i8] c"Opera\00"
@__const.getBrowserCommandLine.opencmd = [13 x i8*] [i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0)]
define i8* @getBrowserCommandLine(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [13 x i8*]
%6 = alloca [13 x i8*]
%7 = alloca [13 x i8*]
%8 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%9 = bitcast [13 x i8*]* %5 to i8*
%10 = bitcast [13 x i8*]* %6 to i8*
%11 = bitcast [13 x i8*]* %7 to i8*
store i64 13, i64* %8
%12 = load i8*, i8** %3
%13 = load i8*, i8** %4
%14 = getelementptr inbounds [13 x i8*], [13 x i8*]* %5, i64 0, i64 0
%15 = getelementptr inbounds [13 x i8*], [13 x i8*]* %6, i64 0, i64 0
%16 = getelementptr inbounds [13 x i8*], [13 x i8*]* %7, i64 0, i64 0
%17 = load i64, i64* %8
%18 = call i8* @getApplicationCommandLine(i8* %12, i8* %13, i8** %14, i8** %15, i8** %16, i64 %17)
ret i8* %18
}

LLVM IR (-O2):
@.str = [10 x i8] c"konqueror\00"
@.str.1 = [9 x i8] c"netscape\00"
@.str.2 = [8 x i8] c"firefox\00"
@.str.3 = [49 x i8] c"/Applications/Firefox.app/Contents/MacOS/firefox\00"
@.str.4 = [61 x i8] c"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\00"
@.str.5 = [47 x i8] c"/Applications/Safari.app/Contents/MacOS/Safari\00"
@.str.6 = [45 x i8] c"/Applications/Opera.app/Contents/MacOS/Opera\00"
@.str.7 = [7 x i8] c"elinks\00"
@.str.8 = [6 x i8] c"links\00"
@.str.9 = [6 x i8] c"opera\00"
@.str.10 = [5 x i8] c"yelp\00"
@.str.11 = [5 x i8] c"lynx\00"
@.str.12 = [4 x i8] c"w3m\00"
@__const.getBrowserCommandLine.known = [13 x i8*] [i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i32 0, i32 0)]
@.str.13 = [2 x i8] c"n\00"
@.str.14 = [2 x i8] c"y\00"
@__const.getBrowserCommandLine.xterm = [13 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i32 0, i32 0)]
@.str.15 = [1 x i8] zeroinitializer
@.str.16 = [8 x i8] c"Firefox\00"
@.str.17 = [14 x i8] c"Google Chrome\00"
@.str.18 = [7 x i8] c"Safari\00"
@.str.19 = [6 x i8] c"Opera\00"
@__const.getBrowserCommandLine.opencmd = [13 x i8*] [i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.15, i32 0, i32 0)]
define i8* @getBrowserCommandLine(i8* %0, i8* %1) {
%3 = alloca [13 x i8*]
%4 = alloca [13 x i8*]
%5 = alloca [13 x i8*]
%6 = bitcast [13 x i8*]* %3 to i8*
%7 = bitcast [13 x i8*]* %4 to i8*
%8 = bitcast [13 x i8*]* %5 to i8*
%9 = getelementptr inbounds [13 x i8*], [13 x i8*]* %3, i64 0, i64 0
%10 = getelementptr inbounds [13 x i8*], [13 x i8*]* %4, i64 0, i64 0
%11 = getelementptr inbounds [13 x i8*], [13 x i8*]* %5, i64 0, i64 0
%12 = call i8* @getApplicationCommandLine(i8* %0, i8* %1, i8** %9, i8** %10, i8** %11, i64 13)
ret i8* %12
}