#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 EOF;
char *calc_md5_from_file(char *);
int /*<<< orphan*/ exit(int);
int getopt(int, char **, char *);
int optind;
int /*<<< orphan*/ printf(char *, char *, ...);
int main(int argc, char *argv[]) {
  int c, s = 0;
  char *p;
  int wn = 0;
  while ((c = getopt(argc, argv, "nt")) != EOF)
    switch (c) {
    case 'n':
      wn = 1;
      break;
    case 't':
      break;
    default:
      break;
    }
  while (optind < argc) {
    p = calc_md5_from_file(argv[optind]);
    if (p != NULL) {
      if (wn)
        printf("%s  %s\n", p, argv[optind]);
      else
        printf("%s\n", p);
    } else
      s = 1;
    ++optind;
  }
  exit(s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe8e(%rip),%rdx
call   1050 <getopt@plt>
mov    %eax,-0x14(%rbp)
mov    0x2e67(%rip),%rcx
cmp    (%rcx),%eax
je     11c9 <main+0x89>
mov    -0x14(%rbp),%eax
mov    %eax,-0x28(%rbp)
sub    $0x6e,%eax
je     11ae <main+0x6e>
jmp    119d <main+0x5d>
mov    -0x28(%rbp),%eax
sub    $0x74,%eax
je     11ba <main+0x7a>
jmp    11bf <main+0x7f>
movl   $0x1,-0x24(%rbp)
jmp    11c4 <main+0x84>
jmp    11c4 <main+0x84>
jmp    11c4 <main+0x84>
jmp    1164 <main+0x24>
jmp    11ce <main+0x8e>
mov    0x2e0b(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jge    1271 <main+0x131>
mov    -0x10(%rbp),%rax
mov    0x2df5(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <calc_md5_from_file@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1250 <main+0x110>
cmpl   $0x0,-0x24(%rbp)
je     1239 <main+0xf9>
mov    -0x20(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    0x2dc1(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xdd6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124b <main+0x10b>
mov    -0x20(%rbp),%rsi
lea    0xdc3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1257 <main+0x117>
movl   $0x1,-0x18(%rbp)
mov    0x2d82(%rip),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    0x2d76(%rip),%rax
mov    %ecx,(%rax)
jmp    11ce <main+0x8e>
mov    -0x18(%rbp),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%r13d
lea    0xea8(%rip),%rdx
call   1050 <getopt@plt>
mov    0x2e84(%rip),%r12
mov    $0x0,%ebp
cmp    (%r12),%eax
je     119b <main+0x5b>
xor    %ebp,%ebp
mov    $0x1,%r14d
lea    0xe82(%rip),%r15
xchg   %ax,%ax
cmp    $0x6e,%eax
cmove  %r14d,%ebp
mov    %r13d,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1050 <getopt@plt>
cmp    (%r12),%eax
jne    1180 <main+0x40>
mov    0x2e3e(%rip),%r15
mov    (%r15),%eax
cmp    %r13d,%eax
mov    $0x0,%r14d
jge    1213 <main+0xd3>
lea    0xe4c(%rip),%r12
xor    %r14d,%r14d
jmp    11d4 <main+0x94>
nopl   0x0(%rax)
mov    $0x1,%r14d
mov    (%r15),%eax
add    $0x1,%eax
mov    %eax,(%r15)
cmp    %r13d,%eax
jge    1213 <main+0xd3>
cltq
mov    (%rbx,%rax,8),%rdi
call   1040 <calc_md5_from_file@plt>
test   %rax,%rax
je     11c0 <main+0x80>
test   %ebp,%ebp
je     1200 <main+0xc0>
movslq (%r15),%rcx
mov    (%rbx,%rcx,8),%rdx
mov    %r12,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    11c6 <main+0x86>
xchg   %ax,%ax
lea    0xe00(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    11c6 <main+0x86>
mov    %r14d,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"nt\00"
@EOF = global i32 0
@optind = global i32 0
@.str.1 = [8 x i8] c"%s %s\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i32 0, i32* %9
br label %10
10: ; preds = %21, %2
%11 = load i32, i32* %4
%12 = load i8**, i8*** %5
%13 = call i32 @getopt(i32 %11, i8** %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 %13, i32* %6
%14 = load i32, i32* @EOF
%15 = icmp ne i32 %13, %14
br i1 %15, label %16, label %22
16: ; preds = %10
%17 = load i32, i32* %6
switch i32 %17, label %20 [
i32 110, label %18
i32 116, label %19
]
18: ; preds = %16
store i32 1, i32* %9
br label %21
19: ; preds = %16
br label %21
20: ; preds = %16
br label %21
21: ; preds = %20, %19, %18
br label %10
22: ; preds = %10
br label %23
23: ; preds = %52, %22
%24 = load i32, i32* @optind
%25 = load i32, i32* %4
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %55
27: ; preds = %23
%28 = load i8**, i8*** %5
%29 = load i32, i32* @optind
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8*, i8** %28, i64 %30
%32 = load i8*, i8** %31
%33 = call i8* @calc_md5_from_file(i8* %32)
store i8* %33, i8** %8
%34 = load i8*, i8** %8
%35 = icmp ne i8* %34, null
br i1 %35, label %36, label %51
36: ; preds = %27
%37 = load i32, i32* %9
%38 = icmp ne i32 %37, 0
br i1 %38, label %39, label %47
39: ; preds = %36
%40 = load i8*, i8** %8
%41 = load i8**, i8*** %5
%42 = load i32, i32* @optind
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8*, i8** %41, i64 %43
%45 = load i8*, i8** %44
%46 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %40, i8* %45)
br label %50
47: ; preds = %36
%48 = load i8*, i8** %8
%49 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %48)
br label %50
50: ; preds = %47, %39
br label %52
51: ; preds = %27
store i32 1, i32* %7
br label %52
52: ; preds = %51, %50
%53 = load i32, i32* @optind
%54 = add nsw i32 %53, 1
store i32 %54, i32* @optind
br label %23
55: ; preds = %23
%56 = load i32, i32* %7
%57 = call i32 @exit(i32 %56)
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"nt\00"
@EOF = global i32 0
@optind = global i32 0
@.str.1 = [8 x i8] c"%s %s\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %12
6: ; preds = %12, %2
%7 = phi i32 [ 0, %2 ], [ %16, %12 ]
%8 = load i32, i32* @optind
%9 = icmp slt i32 %8, %0
br i1 %9, label %10, label %42
10: ; preds = %6
%11 = icmp eq i32 %7, 0
br label %20
12: ; preds = %2, %12
%13 = phi i32 [ %17, %12 ], [ %3, %2 ]
%14 = phi i32 [ %16, %12 ], [ 0, %2 ]
%15 = icmp eq i32 %13, 110
%16 = select i1 %15, i32 1, i32 %14
%17 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%18 = load i32, i32* @EOF
%19 = icmp eq i32 %17, %18
br i1 %19, label %6, label %12
20: ; preds = %10, %37
%21 = phi i32 [ %8, %10 ], [ %40, %37 ]
%22 = phi i32 [ 0, %10 ], [ %38, %37 ]
%23 = sext i32 %21 to i64
%24 = getelementptr inbounds i8*, i8** %1, i64 %23
%25 = load i8*, i8** %24
%26 = tail call i8* @calc_md5_from_file(i8* %25)
%27 = icmp eq i8* %26, null
br i1 %27, label %37, label %28
28: ; preds = %20
br i1 %11, label %35, label %29
29: ; preds = %28
%30 = load i32, i32* @optind
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8*, i8** %1, i64 %31
%33 = load i8*, i8** %32
%34 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %26, i8* %33)
br label %37
35: ; preds = %28
%36 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %26)
br label %37
37: ; preds = %20, %29, %35
%38 = phi i32 [ %22, %29 ], [ %22, %35 ], [ 1, %20 ]
%39 = load i32, i32* @optind
%40 = add nsw i32 %39, 1
store i32 %40, i32* @optind
%41 = icmp slt i32 %40, %0
br i1 %41, label %20, label %42
42: ; preds = %37, %6
%43 = phi i32 [ 0, %6 ], [ %38, %37 ]
%44 = tail call i32 @exit(i32 %43)
unreachable
}