int main(int argc, char *argv[]) {
  if (argv[1] == "-h" || argv[1] == "--help") {
    printf(" Hilfe ausgeführt!\n");
    printf("-h, --help	Hilfe zeigen.\n");
    printf("-t, --test  Testfunktion");
    return 0;
  } else if (argv[1] == "-t" || argv[1] == "--test") {
    printf("Test Erfolgreich\n");
    return 0;
  } else {
    char eins, zwei;
    eins = argv[0];
    zwei = argv[1];
    printf("Normaler Start\n");
    printf("%d\n", eins);
    printf("%d\n", zwei);
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
lea    0xecf(%rip),%rcx
cmp    %rcx,0x8(%rax)
je     1150 <main+0x40>
mov    -0x10(%rbp),%rax
lea    0xebd(%rip),%rcx
cmp    %rcx,0x8(%rax)
jne    1186 <main+0x76>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1218 <main+0x108>
mov    -0x10(%rbp),%rax
lea    0xec1(%rip),%rcx
cmp    %rcx,0x8(%rax)
je     11b0 <main+0xa0>
mov    -0x10(%rbp),%rax
lea    0xeaf(%rip),%rcx
cmp    %rcx,0x8(%rax)
jne    11ca <main+0xba>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1218 <main+0x108>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %al,-0x12(%rbp)
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%esi
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x12(%rbp),%esi
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    0x8(%rsi),%rbx
lea    0xed1(%rip),%rax
cmp    %rax,%rbx
je     1189 <main+0x69>
lea    0xec8(%rip),%rax
cmp    %rax,%rbx
je     1189 <main+0x69>
lea    0xedc(%rip),%rax
cmp    %rax,%rbx
je     11b1 <main+0x91>
lea    0xed3(%rip),%rax
cmp    %rax,%rbx
je     11b1 <main+0x91>
movsbl (%rsi),%ebp
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
lea    0xebf(%rip),%r14
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl %bl,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11bd <main+0x9d>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
lea    0xe62(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11bd <main+0x9d>
lea    0xe88(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-h\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.2 = [21 x i8] c" Hilfe ausgef\C3\BChrt!\0A\00"
@.str.3 = [26 x i8] c"-h, --help\09Hilfe zeigen.\0A\00"
@.str.4 = [25 x i8] c"-t, --test Testfunktion\00"
@.str.5 = [3 x i8] c"-t\00"
@.str.6 = [7 x i8] c"--test\00"
@.str.7 = [18 x i8] c"Test Erfolgreich\0A\00"
@.str.8 = [16 x i8] c"Normaler Start\0A\00"
@.str.9 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = icmp eq i8* %10, getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
br i1 %11, label %17, label %12
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = icmp eq i8* %15, getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0)
br i1 %16, label %17, label %21
17: ; preds = %12, %2
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %3
br label %49
21: ; preds = %12
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = icmp eq i8* %24, getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
br i1 %25, label %31, label %26
26: ; preds = %21
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = icmp eq i8* %29, getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
br i1 %30, label %31, label %33
31: ; preds = %26, %21
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %3
br label %49
33: ; preds = %26
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 0
%36 = load i8*, i8** %35
%37 = ptrtoint i8* %36 to i8
store i8 %37, i8* %6
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 1
%40 = load i8*, i8** %39
%41 = ptrtoint i8* %40 to i8
store i8 %41, i8* %7
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%43 = load i8, i8* %6
%44 = sext i8 %43 to i32
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %44)
%46 = load i8, i8* %7
%47 = sext i8 %46 to i32
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %47)
store i32 0, i32* %3
br label %49
49: ; preds = %33, %31, %17
%50 = load i32, i32* %3
ret i32 %50
}

LLVM IR (-O2):
@.str = [3 x i8] c"-h\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.4 = [25 x i8] c"-t, --test Testfunktion\00"
@.str.5 = [3 x i8] c"-t\00"
@.str.6 = [7 x i8] c"--test\00"
@.str.9 = [4 x i8] c"%d\0A\00"
@str = [15 x i8] c"Normaler Start\00"
@str.10 = [17 x i8] c"Test Erfolgreich\00"
@str.11 = [20 x i8] c" Hilfe ausgef\C3\BChrt!\00"
@str.12 = [25 x i8] c"-h, --help\09Hilfe zeigen.\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, getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
%6 = icmp eq i8* %4, getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0)
%7 = or i1 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.11, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.12, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
br label %31
12: ; preds = %2
%13 = icmp eq i8* %4, getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%14 = icmp eq i8* %4, getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
%15 = or i1 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.10, i64 0, i64 0))
br label %31
18: ; preds = %12
%19 = load i8*, i8** %1
%20 = ptrtoint i8* %19 to i64
%21 = trunc i64 %20 to i32
%22 = ptrtoint i8* %4 to i64
%23 = trunc i64 %22 to i32
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%25 = shl i32 %21, 24
%26 = ashr exact i32 %25, 24
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %26)
%28 = shl i32 %23, 24
%29 = ashr exact i32 %28, 24
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %29)
br label %31
31: ; preds = %18, %16, %8
ret i32 0
}