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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    1191 <main+0x31>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1050 <usage@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    121d <main+0xbd>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x1(%rax),%al
test   %al,%al
jne    1205 <main+0xa5>
jmp    11bd <main+0x5d>
jmp    11c2 <main+0x62>
lea    0xe37(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
cmp    $0x1,%eax
jne    11fe <main+0x9e>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <timstr@plt>
mov    %rax,%rsi
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11c2 <main+0x62>
xor    %edi,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1050 <usage@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   1070 <atol@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1030 <timstr@plt>
mov    %rax,%rsi
lea    0xdc4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
cmp    $0x1,%edi
jle    11ec <main+0x8c>
mov    0x8(%rsi),%rdi
cmpb   $0x2d,(%rdi)
je     1199 <main+0x39>
xor    %eax,%eax
call   1070 <atol@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1040 <timstr@plt>
mov    %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
cmpb   $0x0,0x1(%rdi)
jne    11ec <main+0x8c>
lea    0xe5a(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmp    $0x1,%eax
jne    11e5 <main+0x85>
lea    0xe44(%rip),%r14
mov    %rsp,%rbx
nop
mov    (%rsp),%rdi
xor    %eax,%eax
call   1040 <timstr@plt>
mov    %rax,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmp    $0x1,%eax
je     11c0 <main+0x60>
xor    %edi,%edi
call   1080 <exit@plt>
mov    (%rsi),%rdi
xor    %eax,%eax
call   1050 <usage@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i64
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 %41
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 %36 [
i32 0, label %27
]
27: ; preds = %20
br label %28
28: ; preds = %31, %27
%29 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %5)
%30 = icmp eq i32 %29, 1
br i1 %30, label %31, label %35
31: ; preds = %28
%32 = load i64, i64* %5
%33 = call i8* (i64, ...) bitcast (i8* (...)* @timstr to i8* (i64, ...)*)(i64 %32)
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %33)
br label %28
35: ; preds = %28
unreachable
36: ; preds = %20
%37 = load i8**, i8*** %4
%38 = getelementptr inbounds i8*, i8** %37, i64 0
%39 = load i8*, i8** %38
%40 = call i32 (i8*, ...) bitcast (i32 (...)* @usage to i32 (i8*, ...)*)(i8* %39)
unreachable
41: ; preds = %13
%42 = load i8**, i8*** %4
%43 = getelementptr inbounds i8*, i8** %42, i64 1
%44 = load i8*, i8** %43
%45 = call i64 (i8*, ...) bitcast (i64 (...)* @atol to i64 (i8*, ...)*)(i8* %44)
%46 = call i8* (i64, ...) bitcast (i8* (...)* @timstr to i8* (i64, ...)*)(i64 %45)
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %46)
br label %48
48: ; preds = %41
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i64
%4 = bitcast i64* %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 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %3)
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %27
21: ; preds = %18, %21
%22 = load i64, i64* %3
%23 = call i8* (i64, ...) bitcast (i8* (...)* @timstr to i8* (i64, ...)*)(i64 %22)
%24 = call i32 @puts(i8* dereferenceable(1) %23)
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %3)
%26 = icmp eq i32 %25, 1
br i1 %26, label %21, label %27
27: ; preds = %21, %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 (...)* @atol to i64 (i8*, ...)*)(i8* %11)
%33 = tail call i8* (i64, ...) bitcast (i8* (...)* @timstr to i8* (i64, ...)*)(i64 %32)
%34 = tail call i32 @puts(i8* dereferenceable(1) %33)
ret i32 0
}