#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*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ jsmin();
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  if (argv[1] == NULL)
    exit(1);
  fprintf(stdout, "static const char* %s= \"", argv[1]);
  if (argv[2] == NULL) {
    putchar('(');
    jsmin();
    puts(")\";");
  } else if (argv[3] == NULL) {
    putchar('(');
    jsmin();
    puts(")()\";");
  } else {
    jsmin();
    puts("\";");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
jne    117f <main+0x2f>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe69(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x10(%rax)
jne    11cd <main+0x7d>
mov    $0x28,%edi
call   1030 <putchar@plt>
mov    $0x0,%al
call   1060 <jsmin@plt>
lea    0xe58(%rip),%rdi
call   1040 <puts@plt>
jmp    1216 <main+0xc6>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x18(%rax)
jne    11fe <main+0xae>
mov    $0x28,%edi
call   1030 <putchar@plt>
mov    $0x0,%al
call   1060 <jsmin@plt>
lea    0xe25(%rip),%rdi
call   1040 <puts@plt>
jmp    1211 <main+0xc1>
mov    $0x0,%al
call   1060 <jsmin@plt>
lea    0xe10(%rip),%rdi
call   1040 <puts@plt>
jmp    1216 <main+0xc6>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rdx
test   %rdx,%rdx
je     11b6 <main+0x66>
mov    %rsi,%rbx
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
lea    0xe93(%rip),%rsi
call   1050 <fprintf@plt>
cmpq   $0x0,0x10(%rbx)
je     1189 <main+0x39>
cmpq   $0x0,0x18(%rbx)
je     1192 <main+0x42>
lea    0xe95(%rip),%rbx
jmp    11a3 <main+0x53>
lea    0xe8b(%rip),%rbx
jmp    1199 <main+0x49>
lea    0xe80(%rip),%rbx
mov    $0x28,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1060 <jsmin@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [25 x i8] c"static const char* %s= \22\00"
@.str.1 = [4 x i8] c")\22;\00"
@.str.2 = [6 x i8] c")()\22;\00"
@.str.3 = [3 x i8] c"\22;\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = load i32, i32* @stdout
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 2
%20 = load i8*, i8** %19
%21 = icmp eq i8* %20, null
br i1 %21, label %22, label %26
22: ; preds = %12
%23 = call i32 @putchar(i8 signext 40)
%24 = call i32 (...) @jsmin()
%25 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %39
26: ; preds = %12
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 3
%29 = load i8*, i8** %28
%30 = icmp eq i8* %29, null
br i1 %30, label %31, label %35
31: ; preds = %26
%32 = call i32 @putchar(i8 signext 40)
%33 = call i32 (...) @jsmin()
%34 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %38
35: ; preds = %26
%36 = call i32 (...) @jsmin()
%37 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %38
38: ; preds = %35, %31
br label %39
39: ; preds = %38, %22
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [25 x i8] c"static const char* %s= \22\00"
@.str.1 = [4 x i8] c")\22;\00"
@.str.2 = [6 x i8] c")()\22;\00"
@.str.3 = [3 x i8] c"\22;\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = load i32, i32* @stdout
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %4)
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = icmp eq i8* %12, null
br i1 %13, label %18, label %14
14: ; preds = %8
%15 = getelementptr inbounds i8*, i8** %1, i64 3
%16 = load i8*, i8** %15
%17 = icmp eq i8* %16, null
br i1 %17, label %18, label %21
18: ; preds = %14, %8
%19 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %8 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), %14 ]
%20 = tail call i32 @putchar(i8 signext 40)
br label %21
21: ; preds = %18, %14
%22 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), %14 ], [ %19, %18 ]
%23 = tail call i32 (...) @jsmin()
%24 = tail call i32 @puts(i8* dereferenceable(1) %22)
ret i32 0
}