main(argc, argv) int argc;
char *argv[];
{
  char *time[12];
  long strtim();
  if (argc < 2) {
    usage(argv[0]);
    exit(1);
  }
  if (*argv[1] == '-')
    switch (argv[1][1]) {
    case '\0':
      while (scanf("%s", time) == 1)
        printf("%ld\n", strtim(time));
      exit(0);
    default:
      usage(argv[0]);
      exit(1);
    }
  else
    printf("%ld\n", strtim(argv[1]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    1181 <main+0x31>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1050 <usage@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    120d <main+0xbd>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x1(%rax),%al
test   %al,%al
jne    11f5 <main+0xa5>
jmp    11ad <main+0x5d>
jmp    11b2 <main+0x62>
lea    -0x70(%rbp),%rsi
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
cmp    $0x1,%eax
jne    11ee <main+0x9e>
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1040 <strtim@plt>
mov    %rax,%rsi
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b2 <main+0x62>
xor    %edi,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1050 <usage@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   1040 <strtim@plt>
mov    %rax,%rsi
lea    0xddd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x60,%rsp
cmp    $0x1,%edi
jle    11f0 <main+0xa0>
mov    0x8(%rsi),%rdi
cmpb   $0x2d,(%rdi)
je     118f <main+0x3f>
xor    %eax,%eax
call   1040 <strtim@plt>
lea    0xe8a(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
cmpb   $0x0,0x1(%rdi)
jne    11f0 <main+0xa0>
lea    0xe64(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmp    $0x1,%eax
jne    11e9 <main+0x99>
mov    %rsp,%rbx
lea    0xe4e(%rip),%r14
lea    0xe44(%rip),%r15
nopl   0x0(%rax)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <strtim@plt>
mov    %r14,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmp    $0x1,%eax
je     11c0 <main+0x70>
xor    %edi,%edi
call   1070 <exit@plt>
mov    (%rsi),%rdi
xor    %eax,%eax
call   1050 <usage@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [12 x i8*]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @usage to i32 (i8*, ...)*)(i8* %11)
unreachable
13: ; preds = %2
%14 = load i8**, i8*** %4
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 45
br i1 %19, label %20, label %42
20: ; preds = %13
%21 = load i8**, i8*** %4
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = getelementptr inbounds i8, i8* %23, i64 1
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
switch i32 %26, label %37 [
i32 0, label %27
]
27: ; preds = %20
br label %28
28: ; preds = %32, %27
%29 = getelementptr inbounds [12 x i8*], [12 x i8*]* %5, i64 0, i64 0
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %29)
%31 = icmp eq i32 %30, 1
br i1 %31, label %32, label %36
32: ; preds = %28
%33 = getelementptr inbounds [12 x i8*], [12 x i8*]* %5, i64 0, i64 0
%34 = call i64 (i8**, ...) bitcast (i64 (...)* @strtim to i64 (i8**, ...)*)(i8** %33)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %34)
br label %28
36: ; preds = %28
unreachable
37: ; preds = %20
%38 = load i8**, i8*** %4
%39 = getelementptr inbounds i8*, i8** %38, i64 0
%40 = load i8*, i8** %39
%41 = call i32 (i8*, ...) bitcast (i32 (...)* @usage to i32 (i8*, ...)*)(i8* %40)
unreachable
42: ; preds = %13
%43 = load i8**, i8*** %4
%44 = getelementptr inbounds i8*, i8** %43, i64 1
%45 = load i8*, i8** %44
%46 = call i64 (i8*, ...) bitcast (i64 (...)* @strtim to i64 (i8*, ...)*)(i8* %45)
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %46)
br label %48
48: ; preds = %42
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [12 x i8*]
%4 = bitcast [12 x i8*]* %3 to i8*
%5 = icmp slt i32 %0, 2
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @usage to i32 (i8*, ...)*)(i8* %7)
tail call void @exit(i32 1)
unreachable
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 45
br i1 %13, label %14, label %31
14: ; preds = %9
%15 = getelementptr inbounds i8, i8* %11, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %28
18: ; preds = %14
%19 = getelementptr inbounds [12 x i8*], [12 x i8*]* %3, i64 0, i64 0
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %19)
%21 = icmp eq i32 %20, 1
br i1 %21, label %22, label %27
22: ; preds = %18, %22
%23 = call i64 (i8**, ...) bitcast (i64 (...)* @strtim to i64 (i8**, ...)*)(i8** %19)
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %23)
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %19)
%26 = icmp eq i32 %25, 1
br i1 %26, label %22, label %27
27: ; preds = %22, %18
unreachable
28: ; preds = %14
%29 = load i8*, i8** %1
%30 = tail call i32 (i8*, ...) bitcast (i32 (...)* @usage to i32 (i8*, ...)*)(i8* %29)
tail call void @exit(i32 1)
unreachable
31: ; preds = %9
%32 = tail call i64 (i8*, ...) bitcast (i64 (...)* @strtim to i64 (i8*, ...)*)(i8* %11)
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %32)
ret i32 0
}