void run(int argc, char **argv) {
  if (!strcmp(*argv, "cache"))
    guess_by_cache();
  else if (!strcmp(*argv, "timezone-offset"))
    guess_by_timezone_offset();
  else if (!strcmp(*argv, "manual"))
    guess_by_manual(argv + 1);
  else if (!strcmp(*argv, "read"))
    guess_by_file(argc - 1, argv + 1);
  else if (!strcmp(*argv, "spawn"))
    guess_by_command(argc - 1, argv + 1);
  free(*argv);
  free(argv);
}


x86 assembly (clang, -O0):
<run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe73(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    11a7 <run+0x37>
mov    $0x0,%al
call   1040 <guess_by_cache@plt>
jmp    127a <run+0x10a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe51(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    11cf <run+0x5f>
mov    $0x0,%al
call   1090 <guess_by_timezone_offset@plt>
jmp    1275 <run+0x105>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe39(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    11ff <run+0x8f>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
mov    $0x0,%al
call   1080 <guess_by_manual@plt>
jmp    1270 <run+0x100>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe10(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1235 <run+0xc5>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
mov    $0x0,%al
call   1070 <guess_by_file@plt>
jmp    126b <run+0xfb>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xddf(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1266 <run+0xf6>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
mov    $0x0,%al
call   1050 <guess_by_command@plt>
jmp    126b <run+0xfb>
jmp    1270 <run+0x100>
jmp    1275 <run+0x105>
jmp    127a <run+0x10a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%r14d
mov    (%rsi),%rbp
lea    0xe7c(%rip),%rsi
mov    %rbp,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     11f0 <run+0x80>
lea    0xe6f(%rip),%rsi
mov    %rbp,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     11f9 <run+0x89>
lea    0xe6c(%rip),%rsi
mov    %rbp,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1202 <run+0x92>
lea    0xe60(%rip),%rsi
mov    %rbp,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     120f <run+0x9f>
lea    0xe52(%rip),%rsi
mov    %rbp,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
jne    1221 <run+0xb1>
add    $0xffffffff,%r14d
lea    0x8(%rbx),%rsi
mov    %r14d,%edi
xor    %eax,%eax
call   1050 <guess_by_command@plt>
jmp    1221 <run+0xb1>
xor    %eax,%eax
call   1040 <guess_by_cache@plt>
jmp    1221 <run+0xb1>
xor    %eax,%eax
call   1090 <guess_by_timezone_offset@plt>
jmp    1221 <run+0xb1>
lea    0x8(%rbx),%rdi
xor    %eax,%eax
call   1080 <guess_by_manual@plt>
jmp    1221 <run+0xb1>
add    $0xffffffff,%r14d
lea    0x8(%rbx),%rsi
mov    %r14d,%edi
xor    %eax,%eax
call   1070 <guess_by_file@plt>
mov    (%rbx),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"cache\00"
@.str.1 = [16 x i8] c"timezone-offset\00"
@.str.2 = [7 x i8] c"manual\00"
@.str.3 = [5 x i8] c"read\00"
@.str.4 = [6 x i8] c"spawn\00"
define void @run(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = load i8*, i8** %5
%7 = call i32 @strcmp(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %2
%10 = call i32 (...) @guess_by_cache()
br label %53
11: ; preds = %2
%12 = load i8**, i8*** %4
%13 = load i8*, i8** %12
%14 = call i32 @strcmp(i8* %13, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp ne i32 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %11
%17 = call i32 (...) @guess_by_timezone_offset()
br label %52
18: ; preds = %11
%19 = load i8**, i8*** %4
%20 = load i8*, i8** %19
%21 = call i32 @strcmp(i8* %20, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%22 = icmp ne i32 %21, 0
br i1 %22, label %27, label %23
23: ; preds = %18
%24 = load i8**, i8*** %4
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = call i32 (i8**, ...) bitcast (i32 (...)* @guess_by_manual to i32 (i8**, ...)*)(i8** %25)
br label %51
27: ; preds = %18
%28 = load i8**, i8*** %4
%29 = load i8*, i8** %28
%30 = call i32 @strcmp(i8* %29, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%31 = icmp ne i32 %30, 0
br i1 %31, label %38, label %32
32: ; preds = %27
%33 = load i32, i32* %3
%34 = sub nsw i32 %33, 1
%35 = load i8**, i8*** %4
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @guess_by_file to i32 (i32, i8**, ...)*)(i32 %34, i8** %36)
br label %50
38: ; preds = %27
%39 = load i8**, i8*** %4
%40 = load i8*, i8** %39
%41 = call i32 @strcmp(i8* %40, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%42 = icmp ne i32 %41, 0
br i1 %42, label %49, label %43
43: ; preds = %38
%44 = load i32, i32* %3
%45 = sub nsw i32 %44, 1
%46 = load i8**, i8*** %4
%47 = getelementptr inbounds i8*, i8** %46, i64 1
%48 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @guess_by_command to i32 (i32, i8**, ...)*)(i32 %45, i8** %47)
br label %49
49: ; preds = %43, %38
br label %50
50: ; preds = %49, %32
br label %51
51: ; preds = %50, %23
br label %52
52: ; preds = %51, %16
br label %53
53: ; preds = %52, %9
%54 = load i8**, i8*** %4
%55 = load i8*, i8** %54
%56 = load i8**, i8*** %4
%57 = bitcast i8** %56 to i8*
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"cache\00"
@.str.1 = [16 x i8] c"timezone-offset\00"
@.str.2 = [7 x i8] c"manual\00"
@.str.3 = [5 x i8] c"read\00"
@.str.4 = [6 x i8] c"spawn\00"
define void @run(i32 %0, i8** %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @guess_by_cache()
br label %33
8: ; preds = %2
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(16) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = tail call i32 (...) @guess_by_timezone_offset()
br label %33
13: ; preds = %8
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = tail call i32 (i8**, ...) bitcast (i32 (...)* @guess_by_manual to i32 (i8**, ...)*)(i8** %17)
br label %33
19: ; preds = %13
%20 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %26
22: ; preds = %19
%23 = add nsw i32 %0, -1
%24 = getelementptr inbounds i8*, i8** %1, i64 1
%25 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @guess_by_file to i32 (i32, i8**, ...)*)(i32 %23, i8** %24)
br label %33
26: ; preds = %19
%27 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %33
29: ; preds = %26
%30 = add nsw i32 %0, -1
%31 = getelementptr inbounds i8*, i8** %1, i64 1
%32 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @guess_by_command to i32 (i32, i8**, ...)*)(i32 %30, i8** %31)
br label %33
33: ; preds = %11, %22, %29, %26, %16, %6
%34 = load i8*, i8** %1
tail call void @free(i8* %34)
%35 = bitcast i8** %1 to i8*
tail call void @free(i8* %35)
ret void
}