#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 */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ O_RDONLY;
int atoi(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
char getopt(int, char **, char *);
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ pthread_init();
scalar_t__ read(int, char *, int);
int /*<<< orphan*/ usage();
main(int argc, char **argv) {
  struct timeval starttime, endtime;
  char *infile = "/dev/null";
  int count = 1000000;
  int debug = 0;
  int size = 1;
  int fd;
  int i;
  char word[16384], *word_ptr;
  extern int optind, opterr;
  extern char *optarg;
  pthread_init();
  while ((word[0] = getopt(argc, argv, "c:df:s:?")) != (char)EOF) {
    switch (word[0]) {
    case 'c':
      count = atoi(optarg);
      break;
    case 'd':
      debug++;
      break;
    case 'f':
      infile = optarg;
      break;
    case 's':
      if ((size = atoi(optarg)) > 8192) {
        size = 8192;
      }
      break;
    case '?':
      usage();
      return (0);
    default:
      usage();
      return (-1);
    }
  }
  word_ptr = (char *)(((size_t)word + 4095) & ~4095);
  if ((fd = open(infile, O_RDONLY)) < 0) {
    perror("open");
    return 1;
  }
  if (gettimeofday(&starttime, NULL)) {
    perror("gettimeofday");
    return 1;
  }
  for (i = 0; i < count; i++) {
    if (read(fd, word_ptr, size) < 0) {
      printf("Error: read\n");
      exit(0);
    }
  }
  if (gettimeofday(&endtime, NULL)) {
    perror("gettimeofday");
    return 1;
  }
  printf("%d reads of %s took %d usecs.\n", count, infile,
         (endtime.tv_sec - starttime.tv_sec) * 1000000 +
             (endtime.tv_usec - starttime.tv_usec));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4050,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe40(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0xf4240,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x1,-0x34(%rbp)
mov    $0x0,%al
call   1070 <pthread_init@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe1c(%rip),%rdx
call   10a0 <getopt@plt>
mov    %al,-0x4040(%rbp)
movsbl %al,%eax
mov    0x2ddd(%rip),%rcx
mov    (%rcx),%rcx
movsbl %cl,%ecx
cmp    %ecx,%eax
je     1308 <main+0x168>
movsbl -0x4040(%rbp),%eax
mov    %eax,-0x404c(%rbp)
sub    $0x3f,%eax
je     12dd <main+0x13d>
jmp    122c <main+0x8c>
mov    -0x404c(%rbp),%eax
sub    $0x63,%eax
je     127c <main+0xdc>
jmp    1240 <main+0xa0>
mov    -0x404c(%rbp),%eax
sub    $0x64,%eax
je     1293 <main+0xf3>
jmp    1254 <main+0xb4>
mov    -0x404c(%rbp),%eax
sub    $0x66,%eax
je     12a1 <main+0x101>
jmp    1268 <main+0xc8>
mov    -0x404c(%rbp),%eax
sub    $0x73,%eax
je     12b4 <main+0x114>
jmp    12f0 <main+0x150>
mov    0x2d4d(%rip),%rax
mov    (%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x2c(%rbp)
jmp    1303 <main+0x163>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1303 <main+0x163>
mov    0x2d28(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
jmp    1303 <main+0x163>
mov    0x2d15(%rip),%rax
mov    (%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x34(%rbp)
cmp    $0x2000,%eax
jle    12d8 <main+0x138>
movl   $0x2000,-0x34(%rbp)
jmp    1303 <main+0x163>
mov    $0x0,%al
call   1060 <usage@plt>
movl   $0x0,-0x4(%rbp)
jmp    143d <main+0x29d>
mov    $0x0,%al
call   1060 <usage@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    143d <main+0x29d>
jmp    11e0 <main+0x40>
lea    -0x4040(%rbp),%rax
add    $0xfff,%rax
and    $0xfffffffffffff000,%rax
mov    %rax,-0x4048(%rbp)
mov    -0x28(%rbp),%rdi
mov    0x2cbb(%rip),%rax
mov    (%rax),%esi
call   1080 <open@plt>
mov    %eax,-0x38(%rbp)
cmp    $0x0,%eax
jge    1358 <main+0x1b8>
lea    0xccc(%rip),%rdi
call   1090 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    143d <main+0x29d>
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
cmp    $0x0,%rax
je     1387 <main+0x1e7>
lea    0xca2(%rip),%rdi
call   1090 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    143d <main+0x29d>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13de <main+0x23e>
mov    -0x38(%rbp),%edi
mov    -0x4048(%rbp),%rsi
mov    -0x34(%rbp),%edx
call   1050 <read@plt>
cmp    $0x0,%rax
jge    13cb <main+0x22b>
lea    0xc68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
jmp    13d0 <main+0x230>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    138e <main+0x1ee>
lea    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
cmp    $0x0,%rax
je     140d <main+0x26d>
lea    0xc1c(%rip),%rdi
call   1090 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    143d <main+0x29d>
mov    -0x2c(%rbp),%esi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%eax
sub    -0x18(%rbp),%eax
imul   $0xf4240,%eax,%ecx
mov    -0x1c(%rbp),%eax
sub    -0x14(%rbp),%eax
add    %eax,%ecx
lea    0xc03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4050,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4028,%rsp
mov    %rsi,%r12
mov    %edi,%ebp
xor    %eax,%eax
call   1080 <pthread_init@plt>
lea    0xe7a(%rip),%rdx
mov    %ebp,%edi
mov    %r12,%rsi
call   10b0 <getopt@plt>
movsbl %al,%ecx
mov    0x2df8(%rip),%rbx
movsbl (%rbx),%edx
cmp    %ecx,%edx
jne    1207 <main+0x57>
lea    0xe4e(%rip),%r12
mov    $0x1,%r14d
mov    $0xf4240,%r13d
jmp    12bc <main+0x10c>
movl   $0xf4240,0x4(%rsp)
mov    $0x1,%r14d
lea    0xe28(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0xdd8(%rip),%r15
lea    0xe1f(%rip),%r13
jmp    126a <main+0xba>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x2d89(%rip),%rax
mov    (%rax),%rdi
call   10c0 <atoi@plt>
mov    %eax,0x4(%rsp)
mov    %ebp,%edi
mov    %r12,%rsi
mov    %r13,%rdx
call   10b0 <getopt@plt>
movsbl %al,%ecx
movsbl (%rbx),%edx
cmp    %ecx,%edx
je     12b2 <main+0x102>
lea    -0x63(%rcx),%eax
cmp    $0x10,%eax
ja     137f <main+0x1cf>
movslq (%r15,%rax,4),%rax
add    %r15,%rax
jmp    *%rax
mov    0x2d4a(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x8(%rsp)
jmp    1253 <main+0xa3>
mov    0x2d39(%rip),%rax
mov    (%rax),%rdi
call   10c0 <atoi@plt>
mov    %eax,%r14d
cmp    $0x2000,%eax
mov    $0x2000,%eax
cmovge %eax,%r14d
jmp    1253 <main+0xa3>
mov    0x8(%rsp),%r12
mov    0x4(%rsp),%r13d
mov    %al,0x20(%rsp)
mov    0x2d21(%rip),%rax
mov    (%rax),%esi
mov    %r12,%rdi
call   1090 <open@plt>
test   %eax,%eax
js     13a6 <main+0x1f6>
mov    %eax,%r15d
lea    0x18(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
test   %rax,%rax
jne    139d <main+0x1ed>
test   %r13d,%r13d
jle    132c <main+0x17c>
lea    0x101f(%rsp),%rbx
and    $0xfffffffffffff000,%rbx
mov    %r13d,%ebp
nopl   0x0(%rax,%rax,1)
mov    %r15d,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1060 <read@plt>
test   %rax,%rax
js     13b9 <main+0x209>
add    $0xffffffff,%ebp
jne    1310 <main+0x160>
xor    %ebx,%ebx
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
test   %rax,%rax
jne    139d <main+0x1ed>
mov    0x10(%rsp),%eax
mov    0x14(%rsp),%ecx
sub    0x18(%rsp),%eax
imul   $0xf4240,%eax,%eax
sub    0x1c(%rsp),%ecx
add    %eax,%ecx
lea    0xd0b(%rip),%rdi
mov    %r13d,%esi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
add    $0x4028,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmp    $0x3f,%ecx
jne    138f <main+0x1df>
xor    %ebx,%ebx
xor    %eax,%eax
call   1070 <usage@plt>
jmp    136b <main+0x1bb>
xor    %eax,%eax
call   1070 <usage@plt>
mov    $0xffffffff,%ebx
jmp    136b <main+0x1bb>
lea    0xcb8(%rip),%rdi
jmp    13ad <main+0x1fd>
lea    0xcaa(%rip),%rdi
call   10a0 <perror@plt>
mov    $0x1,%ebx
jmp    136b <main+0x1bb>
lea    0xcc8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@.str = [10 x i8] c"/dev/null\00"
@.str.1 = [9 x i8] c"c:df:s:?\00"
@EOF = global i64 0
@optarg = external global i8*
@O_RDONLY = global i32 0
@.str.2 = [5 x i8] c"open\00"
@.str.3 = [13 x i8] c"gettimeofday\00"
@.str.4 = [13 x i8] c"Error: read\0A\00"
@.str.5 = [31 x i8] c"%d reads of %s took %d usecs.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.timeval
%7 = alloca %struct.timeval
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca [16384 x i8]
%15 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %8
store i32 1000000, i32* %9
store i32 0, i32* %10
store i32 1, i32* %11
%16 = call i32 (...) @pthread_init()
br label %17
17: ; preds = %49, %2
%18 = load i32, i32* %4
%19 = load i8**, i8*** %5
%20 = call signext i8 @getopt(i32 %18, i8** %19, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%21 = getelementptr inbounds [16384 x i8], [16384 x i8]* %14, i64 0, i64 0
store i8 %20, i8* %21
%22 = sext i8 %20 to i32
%23 = load i64, i64* @EOF
%24 = trunc i64 %23 to i8
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %22, %25
br i1 %26, label %27, label %50
27: ; preds = %17
%28 = getelementptr inbounds [16384 x i8], [16384 x i8]* %14, i64 0, i64 0
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
switch i32 %30, label %47 [
i32 99, label %31
i32 100, label %34
i32 102, label %37
i32 115, label %39
i32 63, label %45
]
31: ; preds = %27
%32 = load i8*, i8** @optarg
%33 = call i32 @atoi(i8* %32)
store i32 %33, i32* %9
br label %49
34: ; preds = %27
%35 = load i32, i32* %10
%36 = add nsw i32 %35, 1
store i32 %36, i32* %10
br label %49
37: ; preds = %27
%38 = load i8*, i8** @optarg
store i8* %38, i8** %8
br label %49
39: ; preds = %27
%40 = load i8*, i8** @optarg
%41 = call i32 @atoi(i8* %40)
store i32 %41, i32* %11
%42 = icmp sgt i32 %41, 8192
br i1 %42, label %43, label %44
43: ; preds = %39
store i32 8192, i32* %11
br label %44
44: ; preds = %43, %39
br label %49
45: ; preds = %27
%46 = call i32 (...) @usage()
store i32 0, i32* %3
br label %106
47: ; preds = %27
%48 = call i32 (...) @usage()
store i32 -1, i32* %3
br label %106
49: ; preds = %44, %37, %34, %31
br label %17
50: ; preds = %17
%51 = getelementptr inbounds [16384 x i8], [16384 x i8]* %14, i64 0, i64 0
%52 = ptrtoint i8* %51 to i64
%53 = add i64 %52, 4095
%54 = and i64 %53, -4096
%55 = inttoptr i64 %54 to i8*
store i8* %55, i8** %15
%56 = load i8*, i8** %8
%57 = load i32, i32* @O_RDONLY
%58 = call i32 @open(i8* %56, i32 %57)
store i32 %58, i32* %12
%59 = icmp slt i32 %58, 0
br i1 %59, label %60, label %62
60: ; preds = %50
%61 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %3
br label %106
62: ; preds = %50
%63 = call i64 @gettimeofday(%struct.timeval* %6, i32* null)
%64 = icmp ne i64 %63, 0
br i1 %64, label %65, label %67
65: ; preds = %62
%66 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %3
br label %106
67: ; preds = %62
store i32 0, i32* %13
br label %68
68: ; preds = %82, %67
%69 = load i32, i32* %13
%70 = load i32, i32* %9
%71 = icmp slt i32 %69, %70
br i1 %71, label %72, label %85
72: ; preds = %68
%73 = load i32, i32* %12
%74 = load i8*, i8** %15
%75 = load i32, i32* %11
%76 = call i64 @read(i32 %73, i8* %74, i32 %75)
%77 = icmp slt i64 %76, 0
br i1 %77, label %78, label %81
78: ; preds = %72
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%80 = call i32 @exit(i32 0)
unreachable
81: ; preds = %72
br label %82
82: ; preds = %81
%83 = load i32, i32* %13
%84 = add nsw i32 %83, 1
store i32 %84, i32* %13
br label %68
85: ; preds = %68
%86 = call i64 @gettimeofday(%struct.timeval* %7, i32* null)
%87 = icmp ne i64 %86, 0
br i1 %87, label %88, label %90
88: ; preds = %85
%89 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %3
br label %106
90: ; preds = %85
%91 = load i32, i32* %9
%92 = load i8*, i8** %8
%93 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 0
%94 = load i32, i32* %93
%95 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%96 = load i32, i32* %95
%97 = sub nsw i32 %94, %96
%98 = mul nsw i32 %97, 1000000
%99 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 1
%100 = load i32, i32* %99
%101 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 1
%102 = load i32, i32* %101
%103 = sub nsw i32 %100, %102
%104 = add nsw i32 %98, %103
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i32 %91, i8* %92, i32 %104)
store i32 0, i32* %3
br label %106
106: ; preds = %90, %88, %65, %60, %47, %45
%107 = load i32, i32* %3
ret i32 %107
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
@.str = [10 x i8] c"/dev/null\00"
@.str.1 = [9 x i8] c"c:df:s:?\00"
@EOF = global i64 0
@optarg = external global i8*
@O_RDONLY = global i32 0
@.str.2 = [5 x i8] c"open\00"
@.str.3 = [13 x i8] c"gettimeofday\00"
@.str.5 = [31 x i8] c"%d reads of %s took %d usecs.\0A\00"
@str = [12 x i8] c"Error: read\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca %struct.timeval
%4 = alloca %struct.timeval
%5 = alloca [16384 x i8]
%6 = bitcast %struct.timeval* %3 to i8*
%7 = bitcast %struct.timeval* %4 to i8*
%8 = getelementptr inbounds [16384 x i8], [16384 x i8]* %5, i64 0, i64 0
%9 = tail call i32 (...) @pthread_init()
%10 = tail call signext i8 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%11 = sext i8 %10 to i32
%12 = load i64, i64* @EOF
%13 = trunc i64 %12 to i32
%14 = shl i32 %13, 24
%15 = ashr exact i32 %14, 24
%16 = icmp eq i32 %15, %11
br i1 %16, label %47, label %17
17: ; preds = %2, %36
%18 = phi i32 [ %41, %36 ], [ %11, %2 ]
%19 = phi i8* [ %39, %36 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %2 ]
%20 = phi i32 [ %38, %36 ], [ 1, %2 ]
%21 = phi i32 [ %37, %36 ], [ 1000000, %2 ]
switch i32 %18, label %34 [
i32 99, label %22
i32 100, label %36
i32 102, label %25
i32 115, label %27
i32 63, label %32
]
22: ; preds = %17
%23 = load i8*, i8** @optarg
%24 = tail call i32 @atoi(i8* %23)
br label %36
25: ; preds = %17
%26 = load i8*, i8** @optarg
br label %36
27: ; preds = %17
%28 = load i8*, i8** @optarg
%29 = tail call i32 @atoi(i8* %28)
%30 = icmp slt i32 %29, 8192
%31 = select i1 %30, i32 %29, i32 8192
br label %36
32: ; preds = %17
%33 = tail call i32 (...) @usage()
br label %97
34: ; preds = %17
%35 = tail call i32 (...) @usage()
br label %97
36: ; preds = %17, %27, %25, %22
%37 = phi i32 [ %21, %27 ], [ %21, %25 ], [ %24, %22 ], [ %21, %17 ]
%38 = phi i32 [ %31, %27 ], [ %20, %25 ], [ %20, %22 ], [ %20, %17 ]
%39 = phi i8* [ %19, %27 ], [ %26, %25 ], [ %19, %22 ], [ %19, %17 ]
%40 = tail call signext i8 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%41 = sext i8 %40 to i32
%42 = load i64, i64* @EOF
%43 = trunc i64 %42 to i32
%44 = shl i32 %43, 24
%45 = ashr exact i32 %44, 24
%46 = icmp eq i32 %45, %41
br i1 %46, label %47, label %17
47: ; preds = %36, %2
%48 = phi i8 [ %10, %2 ], [ %40, %36 ]
%49 = phi i32 [ 1000000, %2 ], [ %37, %36 ]
%50 = phi i32 [ 1, %2 ], [ %38, %36 ]
%51 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %2 ], [ %39, %36 ]
store i8 %48, i8* %8
%52 = ptrtoint [16384 x i8]* %5 to i64
%53 = add i64 %52, 4095
%54 = and i64 %53, -4096
%55 = inttoptr i64 %54 to i8*
%56 = load i32, i32* @O_RDONLY
%57 = call i32 @open(i8* %51, i32 %56)
%58 = icmp slt i32 %57, 0
br i1 %58, label %59, label %61
59: ; preds = %47
%60 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %97
61: ; preds = %47
%62 = call i64 @gettimeofday(%struct.timeval* %3, i32* null)
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %66
64: ; preds = %61
%65 = icmp sgt i32 %49, 0
br i1 %65, label %70, label %78
66: ; preds = %61
%67 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %97
68: ; preds = %70
%69 = icmp eq i32 %74, %49
br i1 %69, label %78, label %70
70: ; preds = %64, %68
%71 = phi i32 [ %74, %68 ], [ 0, %64 ]
%72 = call i64 @read(i32 %57, i8* %55, i32 %50)
%73 = icmp slt i64 %72, 0
%74 = add nuw nsw i32 %71, 1
br i1 %73, label %75, label %68
75: ; preds = %70
%76 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%77 = call i32 @exit(i32 0)
unreachable
78: ; preds = %68, %64
%79 = call i64 @gettimeofday(%struct.timeval* %4, i32* null)
%80 = icmp eq i64 %79, 0
br i1 %80, label %83, label %81
81: ; preds = %78
%82 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %97
83: ; preds = %78
%84 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 0
%85 = load i32, i32* %84
%86 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
%87 = load i32, i32* %86
%88 = sub nsw i32 %85, %87
%89 = mul nsw i32 %88, 1000000
%90 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 1
%91 = load i32, i32* %90
%92 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 1
%93 = load i32, i32* %92
%94 = sub i32 %91, %93
%95 = add nsw i32 %94, %89
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i32 %49, i8* %51, i32 %95)
br label %97
97: ; preds = %83, %81, %66, %59, %34, %32
%98 = phi i32 [ -1, %34 ], [ 0, %32 ], [ 1, %59 ], [ 1, %66 ], [ 1, %81 ], [ 0, %83 ]
ret i32 %98
}