#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 timespec {
  int dummy;
};
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
double DBL_EPSILON;
int /*<<< orphan*/ TIME_UTC;
int /*<<< orphan*/ _IOLBF;
double difftimespec(struct timespec *, struct timespec *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/, int /*<<< orphan*/ *,
                           int /*<<< orphan*/, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
scalar_t__ strcmp(char const *, char *);
double strtod(char const *, char **);
int /*<<< orphan*/ timespec_get(struct timespec *, int /*<<< orphan*/);
int /*<<< orphan*/ usage();
int /*<<< orphan*/ version();
int main(int argc, const char **argv) {
  char buffer[4096];
  double interval = 1.0;
  char *pend = NULL;
  int c = 0;
  const char *freqs = NULL;
  double freq = 0;
  struct timespec last;
  struct timespec now;
  for (c = 1; c < argc; ++c) {
    if (strcmp(argv[c], "--version") == 0) {
      version();
      return 0;
    }
    if (strcmp(argv[c], "--help") == 0) {
      usage();
      return 0;
    } else if ((c < argc - 1 && (strcmp(argv[c], "-f") == 0 ||
                                 strcmp(argv[c], "--frequency") == 0)) ||
               (argv[c][0] == '-' && argv[c][1] == 'f' && argv[c][2] >= '0' &&
                argv[c][2] <= '9')) {
      if (argv[c][2] >= '0' && argv[c][2] <= '9') {
        freqs = &argv[c][2];
      } else {
        freqs = argv[c + 1];
      }
      freq = strtod(freqs, &pend);
      if (freq < DBL_EPSILON) {
        fprintf(stderr,
                "Frequency argument %f is out of range (expected a "
                "floating-point number larger than 0)\n",
                freq);
        usage();
        return 1;
      } else if (pend == NULL || *pend != '\0') {
        fprintf(stderr,
                "Could not parse frequency argument %s (expected an "
                "floating-point number larger than 0)\n",
                argv[c + 1]);
        usage();
        return 1;
      }
      interval = 1.0 / freq;
      c += 1;
    } else {
      fprintf(stderr, "Unrecognized argument %s\n", argv[c]);
      usage();
      return 1;
    }
  }
  setvbuf(stdout, NULL, _IOLBF, 256);
  while (fgets(buffer, sizeof(buffer), stdin) != NULL) {
    timespec_get(&now, TIME_UTC);
    if (difftimespec(&now, &last) >= interval) {
      puts(buffer);
      last = now;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1050,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xe3f(%rip),%xmm0
movsd  %xmm0,-0x1018(%rbp)
ff
movq   $0x0,-0x1020(%rbp)
movl   $0x0,-0x1024(%rbp)
movq   $0x0,-0x1030(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1038(%rbp)
ff
movl   $0x1,-0x1024(%rbp)
mov    -0x1024(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    150d <main+0x36d>
mov    -0x10(%rbp),%rax
movslq -0x1024(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xde5(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1245 <main+0xa5>
mov    $0x0,%al
call   10a0 <version@plt>
movl   $0x0,-0x4(%rbp)
jmp    15ab <main+0x40b>
mov    -0x10(%rbp),%rax
movslq -0x1024(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdb7(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    127d <main+0xdd>
mov    $0x0,%al
call   10b0 <usage@plt>
movl   $0x0,-0x4(%rbp)
jmp    15ab <main+0x40b>
mov    -0x1024(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    12db <main+0x13b>
mov    -0x10(%rbp),%rax
movslq -0x1024(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd72(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     134a <main+0x1aa>
mov    -0x10(%rbp),%rax
movslq -0x1024(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd50(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     134a <main+0x1aa>
mov    -0x10(%rbp),%rax
movslq -0x1024(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    14b6 <main+0x316>
mov    -0x10(%rbp),%rax
movslq -0x1024(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x66,%eax
jne    14b6 <main+0x316>
mov    -0x10(%rbp),%rax
movslq -0x1024(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x2(%rax),%eax
cmp    $0x30,%eax
jl     14b6 <main+0x316>
mov    -0x10(%rbp),%rax
movslq -0x1024(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x2(%rax),%eax
cmp    $0x39,%eax
jg     14b6 <main+0x316>
mov    -0x10(%rbp),%rax
movslq -0x1024(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x2(%rax),%eax
cmp    $0x30,%eax
jl     13a1 <main+0x201>
mov    -0x10(%rbp),%rax
movslq -0x1024(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x2(%rax),%eax
cmp    $0x39,%eax
jg     13a1 <main+0x201>
mov    -0x10(%rbp),%rax
movslq -0x1024(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
add    $0x2,%rax
mov    %rax,-0x1030(%rbp)
jmp    13bc <main+0x21c>
mov    -0x10(%rbp),%rax
mov    -0x1024(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x1030(%rbp)
mov    -0x1030(%rbp),%rdi
lea    -0x1020(%rbp),%rsi
call   1050 <strtod@plt>
movsd  %xmm0,-0x1038(%rbp)
ff
movsd  -0x1038(%rbp),%xmm1
ff
mov    0x2c02(%rip),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1426 <main+0x286>
mov    0x2bd5(%rip),%rax
mov    (%rax),%edi
movsd  -0x1038(%rbp),%xmm0
ff
lea    0xc1c(%rip),%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
mov    $0x0,%al
call   10b0 <usage@plt>
movl   $0x1,-0x4(%rbp)
jmp    15ab <main+0x40b>
cmpq   $0x0,-0x1020(%rbp)
je     1447 <main+0x2a7>
mov    -0x1020(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1485 <main+0x2e5>
mov    0x2b82(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    -0x1024(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xc15(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    $0x0,%al
call   10b0 <usage@plt>
movl   $0x1,-0x4(%rbp)
jmp    15ab <main+0x40b>
jmp    148a <main+0x2ea>
movsd  0xb6e(%rip),%xmm0
divsd  -0x1038(%rbp),%xmm0
ff
movsd  %xmm0,-0x1018(%rbp)
ff
mov    -0x1024(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1024(%rbp)
jmp    14ef <main+0x34f>
mov    0x2b13(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x1024(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xc04(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    $0x0,%al
call   10b0 <usage@plt>
movl   $0x1,-0x4(%rbp)
jmp    15ab <main+0x40b>
jmp    14f4 <main+0x354>
jmp    14f9 <main+0x359>
mov    -0x1024(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1024(%rbp)
jmp    11fe <main+0x5e>
mov    0x2aac(%rip),%rax
mov    (%rax),%edi
mov    0x2aab(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
mov    $0x100,%ecx
call   10c0 <setvbuf@plt>
lea    -0x1010(%rbp),%rdi
mov    0x2aa5(%rip),%rax
mov    (%rax),%edx
mov    $0x1000,%esi
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     15a4 <main+0x404>
mov    0x2a60(%rip),%rax
mov    (%rax),%esi
lea    -0x1048(%rbp),%rdi
call   1060 <timespec_get@plt>
lea    -0x1048(%rbp),%rdi
lea    -0x1040(%rbp),%rsi
call   1030 <difftimespec@plt>
ucomisd -0x1018(%rbp),%xmm0
ff
jb     159f <main+0x3ff>
lea    -0x1010(%rbp),%rdi
call   1040 <puts@plt>
mov    -0x1048(%rbp),%eax
mov    %eax,-0x1040(%rbp)
jmp    152d <main+0x38d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1050,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1028,%rsp
movq   $0x0,0x18(%rsp)
cmp    $0x2,%edi
jl     12dc <main+0x13c>
mov    %rsi,%rbx
lea    -0x1(%rdi),%r13d
mov    %edi,%ebp
mov    $0x1,%r12d
lea    0xe2f(%rip),%r14
lea    0xe32(%rip),%r15
mov    (%rbx,%r12,8),%rdi
mov    %r14,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     13e6 <main+0x246>
mov    (%rbx,%r12,8),%rdi
mov    %r15,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     13f2 <main+0x252>
cmp    %r13,%r12
jae    1239 <main+0x99>
mov    (%rbx,%r12,8),%rdi
lea    0xdff(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     125e <main+0xbe>
mov    (%rbx,%r12,8),%rdi
lea    0xded(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     125e <main+0xbe>
mov    (%rbx,%r12,8),%rdx
cmpb   $0x2d,(%rdx)
jne    1396 <main+0x1f6>
cmpb   $0x66,0x1(%rdx)
jne    1396 <main+0x1f6>
movzbl 0x2(%rdx),%eax
add    $0xd0,%al
cmp    $0x9,%al
ja     1396 <main+0x1f6>
mov    (%rbx,%r12,8),%rdi
movzbl 0x2(%rdi),%eax
add    $0xd0,%al
cmp    $0xa,%al
jae    1280 <main+0xe0>
add    $0x2,%rdi
jmp    1285 <main+0xe5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x8(%rbx,%r12,8),%rdi
lea    0x18(%rsp),%rsi
call   1050 <strtod@plt>
mov    0x2d52(%rip),%rax
movsd  (%rax),%xmm1
ucomisd %xmm0,%xmm1
ja     13fe <main+0x25e>
mov    0x18(%rsp),%rax
test   %rax,%rax
je     13a8 <main+0x208>
cmpb   $0x0,(%rax)
jne    13a8 <main+0x208>
add    $0x2,%r12
cmp    %rbp,%r12
jb     11e0 <main+0x40>
movsd  0xd30(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
jmp    12ea <main+0x14a>
movsd  0xd1c(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x2ccf(%rip),%rax
mov    (%rax),%edi
mov    0x2cce(%rip),%rax
mov    (%rax),%edx
xor    %r14d,%r14d
xor    %esi,%esi
mov    $0x100,%ecx
call   10c0 <setvbuf@plt>
mov    0x2cce(%rip),%r12
mov    (%r12),%edx
lea    0x20(%rsp),%rdi
mov    $0x1000,%esi
call   1070 <fgets@plt>
test   %rax,%rax
je     13d1 <main+0x231>
mov    0x2c83(%rip),%r13
mov    %rsp,%rbp
lea    0x8(%rsp),%r15
lea    0x20(%rsp),%rbx
jmp    1366 <main+0x1c6>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r12),%edx
mov    %rbx,%rdi
mov    $0x1000,%esi
call   1070 <fgets@plt>
test   %rax,%rax
je     13d1 <main+0x231>
mov    0x0(%r13),%esi
mov    %rbp,%rdi
call   1060 <timespec_get@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
call   1030 <difftimespec@plt>
ucomisd 0x10(%rsp),%xmm0
jb     1350 <main+0x1b0>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    (%rsp),%eax
mov    %eax,0x8(%rsp)
jmp    1350 <main+0x1b0>
mov    0x2c33(%rip),%rax
mov    (%rax),%edi
lea    0xd33(%rip),%rsi
jmp    13bd <main+0x21d>
mov    0x2c21(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbx,%r12,8),%rdx
lea    0xcc3(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
xor    %eax,%eax
call   10b0 <usage@plt>
mov    $0x1,%r14d
mov    %r14d,%eax
add    $0x1028,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r14d,%r14d
xor    %eax,%eax
call   10a0 <version@plt>
jmp    13d1 <main+0x231>
xor    %r14d,%r14d
xor    %eax,%eax
call   10b0 <usage@plt>
jmp    13d1 <main+0x231>
mov    0x2bcb(%rip),%rax
mov    (%rax),%edi
lea    0xc1a(%rip),%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
jmp    13c4 <main+0x224>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@.str = [10 x i8] c"--version\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.2 = [3 x i8] c"-f\00"
@.str.3 = [12 x i8] c"--frequency\00"
@DBL_EPSILON = global double 0.000000e+00
@stderr = global i32 0
@.str.4 = [88 x i8] c"Frequency argument %f is out of range (expected a floating-point number larger than 0)\0A\00"
@.str.5 = [89 x i8] c"Could not parse frequency argument %s (expected an floating-point number larger than 0)\0A\00"
@.str.6 = [26 x i8] c"Unrecognized argument %s\0A\00"
@stdout = global i32 0
@_IOLBF = global i32 0
@stdin = global i32 0
@TIME_UTC = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4096 x i8]
%7 = alloca double
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca double
%12 = alloca %struct.timespec
%13 = alloca %struct.timespec
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 1.000000e+00, double* %7
store i8* null, i8** %8
store i32 0, i32* %9
store i8* null, i8** %10
store double 0.000000e+00, double* %11
store i32 1, i32* %9
br label %14
14: ; preds = %179, %2
%15 = load i32, i32* %9
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %182
18: ; preds = %14
%19 = load i8**, i8*** %5
%20 = load i32, i32* %9
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8*, i8** %19, i64 %21
%23 = load i8*, i8** %22
%24 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %18
%27 = call i32 (...) @version()
store i32 0, i32* %3
br label %204
28: ; preds = %18
%29 = load i8**, i8*** %5
%30 = load i32, i32* %9
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8*, i8** %29, i64 %31
%33 = load i8*, i8** %32
%34 = call i64 @strcmp(i8* %33, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %28
%37 = call i32 (...) @usage()
store i32 0, i32* %3
br label %204
38: ; preds = %28
%39 = load i32, i32* %9
%40 = load i32, i32* %4
%41 = sub nsw i32 %40, 1
%42 = icmp slt i32 %39, %41
br i1 %42, label %43, label %59
43: ; preds = %38
%44 = load i8**, i8*** %5
%45 = load i32, i32* %9
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8*, i8** %44, i64 %46
%48 = load i8*, i8** %47
%49 = call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %99, label %51
51: ; preds = %43
%52 = load i8**, i8*** %5
%53 = load i32, i32* %9
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i8*, i8** %52, i64 %54
%56 = load i8*, i8** %55
%57 = call i64 @strcmp(i8* %56, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%58 = icmp eq i64 %57, 0
br i1 %58, label %99, label %59
59: ; preds = %51, %38
%60 = load i8**, i8*** %5
%61 = load i32, i32* %9
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i8*, i8** %60, i64 %62
%64 = load i8*, i8** %63
%65 = getelementptr inbounds i8, i8* %64, i64 0
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = icmp eq i32 %67, 45
br i1 %68, label %69, label %168
69: ; preds = %59
%70 = load i8**, i8*** %5
%71 = load i32, i32* %9
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i8*, i8** %70, i64 %72
%74 = load i8*, i8** %73
%75 = getelementptr inbounds i8, i8* %74, i64 1
%76 = load i8, i8* %75
%77 = sext i8 %76 to i32
%78 = icmp eq i32 %77, 102
br i1 %78, label %79, label %168
79: ; preds = %69
%80 = load i8**, i8*** %5
%81 = load i32, i32* %9
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i8*, i8** %80, i64 %82
%84 = load i8*, i8** %83
%85 = getelementptr inbounds i8, i8* %84, i64 2
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
%88 = icmp sge i32 %87, 48
br i1 %88, label %89, label %168
89: ; preds = %79
%90 = load i8**, i8*** %5
%91 = load i32, i32* %9
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds i8*, i8** %90, i64 %92
%94 = load i8*, i8** %93
%95 = getelementptr inbounds i8, i8* %94, i64 2
%96 = load i8, i8* %95
%97 = sext i8 %96 to i32
%98 = icmp sle i32 %97, 57
br i1 %98, label %99, label %168
99: ; preds = %89, %51, %43
%100 = load i8**, i8*** %5
%101 = load i32, i32* %9
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds i8*, i8** %100, i64 %102
%104 = load i8*, i8** %103
%105 = getelementptr inbounds i8, i8* %104, i64 2
%106 = load i8, i8* %105
%107 = sext i8 %106 to i32
%108 = icmp sge i32 %107, 48
br i1 %108, label %109, label %126
109: ; preds = %99
%110 = load i8**, i8*** %5
%111 = load i32, i32* %9
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds i8*, i8** %110, i64 %112
%114 = load i8*, i8** %113
%115 = getelementptr inbounds i8, i8* %114, i64 2
%116 = load i8, i8* %115
%117 = sext i8 %116 to i32
%118 = icmp sle i32 %117, 57
br i1 %118, label %119, label %126
119: ; preds = %109
%120 = load i8**, i8*** %5
%121 = load i32, i32* %9
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds i8*, i8** %120, i64 %122
%124 = load i8*, i8** %123
%125 = getelementptr inbounds i8, i8* %124, i64 2
store i8* %125, i8** %10
br label %133
126: ; preds = %109, %99
%127 = load i8**, i8*** %5
%128 = load i32, i32* %9
%129 = add nsw i32 %128, 1
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i8*, i8** %127, i64 %130
%132 = load i8*, i8** %131
store i8* %132, i8** %10
br label %133
133: ; preds = %126, %119
%134 = load i8*, i8** %10
%135 = call double @strtod(i8* %134, i8** %8)
store double %135, double* %11
%136 = load double, double* %11
%137 = load double, double* @DBL_EPSILON
%138 = fcmp olt double %136, %137
br i1 %138, label %139, label %144
139: ; preds = %133
%140 = load i32, i32* @stderr
%141 = load double, double* %11
%142 = call i32 (i32, i8*, ...) @fprintf(i32 %140, i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.4, i64 0, i64 0), double %141)
%143 = call i32 (...) @usage()
store i32 1, i32* %3
br label %204
144: ; preds = %133
%145 = load i8*, i8** %8
%146 = icmp eq i8* %145, null
br i1 %146, label %152, label %147
147: ; preds = %144
%148 = load i8*, i8** %8
%149 = load i8, i8* %148
%150 = sext i8 %149 to i32
%151 = icmp ne i32 %150, 0
br i1 %151, label %152, label %162
152: ; preds = %147, %144
%153 = load i32, i32* @stderr
%154 = load i8**, i8*** %5
%155 = load i32, i32* %9
%156 = add nsw i32 %155, 1
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds i8*, i8** %154, i64 %157
%159 = load i8*, i8** %158
%160 = call i32 (i32, i8*, ...) @fprintf(i32 %153, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.5, i64 0, i64 0), i8* %159)
%161 = call i32 (...) @usage()
store i32 1, i32* %3
br label %204
162: ; preds = %147
br label %163
163: ; preds = %162
%164 = load double, double* %11
%165 = fdiv double 1.000000e+00, %164
store double %165, double* %7
%166 = load i32, i32* %9
%167 = add nsw i32 %166, 1
store i32 %167, i32* %9
br label %177
168: ; preds = %89, %79, %69, %59
%169 = load i32, i32* @stderr
%170 = load i8**, i8*** %5
%171 = load i32, i32* %9
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds i8*, i8** %170, i64 %172
%174 = load i8*, i8** %173
%175 = call i32 (i32, i8*, ...) @fprintf(i32 %169, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), i8* %174)
%176 = call i32 (...) @usage()
store i32 1, i32* %3
br label %204
177: ; preds = %163
br label %178
178: ; preds = %177
br label %179
179: ; preds = %178
%180 = load i32, i32* %9
%181 = add nsw i32 %180, 1
store i32 %181, i32* %9
br label %14
182: ; preds = %14
%183 = load i32, i32* @stdout
%184 = load i32, i32* @_IOLBF
%185 = call i32 @setvbuf(i32 %183, i32* null, i32 %184, i32 256)
br label %186
186: ; preds = %202, %182
%187 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%188 = load i32, i32* @stdin
%189 = call i32* @fgets(i8* %187, i32 4096, i32 %188)
%190 = icmp ne i32* %189, null
br i1 %190, label %191, label %203
191: ; preds = %186
%192 = load i32, i32* @TIME_UTC
%193 = call i32 @timespec_get(%struct.timespec* %13, i32 %192)
%194 = call double @difftimespec(%struct.timespec* %13, %struct.timespec* %12)
%195 = load double, double* %7
%196 = fcmp oge double %194, %195
br i1 %196, label %197, label %202
197: ; preds = %191
%198 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%199 = call i32 @puts(i8* %198)
%200 = bitcast %struct.timespec* %12 to i8*
%201 = bitcast %struct.timespec* %13 to i8*
br label %202
202: ; preds = %197, %191
br label %186
203: ; preds = %186
store i32 0, i32* %3
br label %204
204: ; preds = %203, %168, %152, %139, %36, %26
%205 = load i32, i32* %3
ret i32 %205
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@.str = [10 x i8] c"--version\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.2 = [3 x i8] c"-f\00"
@.str.3 = [12 x i8] c"--frequency\00"
@DBL_EPSILON = global double 0.000000e+00
@stderr = global i32 0
@.str.4 = [88 x i8] c"Frequency argument %f is out of range (expected a floating-point number larger than 0)\0A\00"
@.str.5 = [89 x i8] c"Could not parse frequency argument %s (expected an floating-point number larger than 0)\0A\00"
@.str.6 = [26 x i8] c"Unrecognized argument %s\0A\00"
@stdout = global i32 0
@_IOLBF = global i32 0
@stdin = global i32 0
@TIME_UTC = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [4096 x i8]
%4 = alloca i8*
%5 = alloca %struct.timespec
%6 = alloca %struct.timespec
%7 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%8 = bitcast i8** %4 to i8*
store i8* null, i8** %4
%9 = bitcast %struct.timespec* %5 to i8*
%10 = bitcast %struct.timespec* %6 to i8*
%11 = icmp sgt i32 %0, 1
br i1 %11, label %12, label %95
12: ; preds = %2
%13 = add nsw i32 %0, -1
%14 = zext i32 %13 to i64
%15 = zext i32 %0 to i64
br label %16
16: ; preds = %12, %86
%17 = phi i64 [ 1, %12 ], [ %87, %86 ]
%18 = getelementptr inbounds i8*, i8** %1, i64 %17
%19 = load i8*, i8** %18
%20 = tail call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %16
%23 = tail call i32 (...) @version()
br label %118
24: ; preds = %16
%25 = load i8*, i8** %18
%26 = tail call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = tail call i32 (...) @usage()
br label %118
30: ; preds = %24
%31 = icmp ult i64 %17, %14
br i1 %31, label %32, label %40
32: ; preds = %30
%33 = load i8*, i8** %18
%34 = tail call i64 @strcmp(i8* %33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %53, label %36
36: ; preds = %32
%37 = load i8*, i8** %18
%38 = tail call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %53, label %40
40: ; preds = %36, %30
%41 = load i8*, i8** %18
%42 = load i8, i8* %41
%43 = icmp eq i8 %42, 45
br i1 %43, label %44, label %89
44: ; preds = %40
%45 = getelementptr inbounds i8, i8* %41, i64 1
%46 = load i8, i8* %45
%47 = icmp eq i8 %46, 102
br i1 %47, label %48, label %89
48: ; preds = %44
%49 = getelementptr inbounds i8, i8* %41, i64 2
%50 = load i8, i8* %49
%51 = add i8 %50, -48
%52 = icmp ult i8 %51, 10
br i1 %52, label %53, label %89
53: ; preds = %48, %36, %32
%54 = load i8*, i8** %18
%55 = getelementptr inbounds i8, i8* %54, i64 2
%56 = load i8, i8* %55
%57 = add i8 %56, -48
%58 = icmp ult i8 %57, 10
br i1 %58, label %63, label %59
59: ; preds = %53
%60 = add nuw nsw i64 %17, 1
%61 = getelementptr inbounds i8*, i8** %1, i64 %60
%62 = load i8*, i8** %61
br label %63
63: ; preds = %53, %59
%64 = phi i8* [ %62, %59 ], [ %55, %53 ]
%65 = call double @strtod(i8* %64, i8** %4)
%66 = load double, double* @DBL_EPSILON
%67 = fcmp olt double %65, %66
br i1 %67, label %68, label %72
68: ; preds = %63
%69 = load i32, i32* @stderr
%70 = tail call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.4, i64 0, i64 0), double %65)
%71 = tail call i32 (...) @usage()
br label %118
72: ; preds = %63
%73 = load i8*, i8** %4
%74 = icmp eq i8* %73, null
br i1 %74, label %78, label %75
75: ; preds = %72
%76 = load i8, i8* %73
%77 = icmp eq i8 %76, 0
br i1 %77, label %86, label %78
78: ; preds = %75, %72
%79 = load i32, i32* @stderr
%80 = add nuw nsw i64 %17, 1
%81 = and i64 %80, 4294967295
%82 = getelementptr inbounds i8*, i8** %1, i64 %81
%83 = load i8*, i8** %82
%84 = tail call i32 (i32, i8*, ...) @fprintf(i32 %79, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.5, i64 0, i64 0), i8* %83)
%85 = tail call i32 (...) @usage()
br label %118
86: ; preds = %75
%87 = add nuw nsw i64 %17, 2
%88 = icmp ult i64 %87, %15
br i1 %88, label %16, label %93
89: ; preds = %48, %44, %40
%90 = load i32, i32* @stderr
%91 = tail call i32 (i32, i8*, ...) @fprintf(i32 %90, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), i8* %41)
%92 = tail call i32 (...) @usage()
br label %118
93: ; preds = %86
%94 = fdiv double 1.000000e+00, %65
br label %95
95: ; preds = %93, %2
%96 = phi double [ %94, %93 ], [ 1.000000e+00, %2 ]
%97 = load i32, i32* @stdout
%98 = load i32, i32* @_IOLBF
%99 = tail call i32 @setvbuf(i32 %97, i32* null, i32 %98, i32 256)
%100 = load i32, i32* @stdin
%101 = call i32* @fgets(i8* %7, i32 4096, i32 %100)
%102 = icmp eq i32* %101, null
br i1 %102, label %118, label %103
103: ; preds = %95
%104 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i64 0, i32 0
%105 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i64 0, i32 0
br label %106
106: ; preds = %103, %114
%107 = load i32, i32* @TIME_UTC
%108 = call i32 @timespec_get(%struct.timespec* %6, i32 %107)
%109 = call double @difftimespec(%struct.timespec* %6, %struct.timespec* %5)
%110 = fcmp ult double %109, %96
br i1 %110, label %114, label %111
111: ; preds = %106
%112 = call i32 @puts(i8* %7)
%113 = load i32, i32* %104
store i32 %113, i32* %105
br label %114
114: ; preds = %111, %106
%115 = load i32, i32* @stdin
%116 = call i32* @fgets(i8* %7, i32 4096, i32 %115)
%117 = icmp eq i32* %116, null
br i1 %117, label %118, label %106
118: ; preds = %114, %95, %89, %78, %68, %28, %22
%119 = phi i32 [ 0, %22 ], [ 0, %28 ], [ 1, %68 ], [ 1, %78 ], [ 1, %89 ], [ 0, %95 ], [ 0, %114 ]
ret i32 %119
}