#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 */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ delay_to(int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int get_tics();
int /*<<< orphan*/ lseek(int, int, int /*<<< orphan*/);
int open(char *, int /*<<< orphan*/);
int sscanf(char *, char *, int *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char **argv) {
  int fd, addr, count, usec;
  int64_t tics;
  if (argc != 4) {
    fprintf(stderr, "%s: Use \"%s <hexaddr> <count> <period-usec>\"\n", argv[0],
            argv[0]);
    exit(1);
  }
  if (sscanf(argv[1], "%x", &addr) != 1) {
    fprintf(stderr, "%s: wrong hex \"%s\"\n", argv[0], argv[1]);
    exit(1);
  }
  if (sscanf(argv[2], "%i", &count) != 1) {
    fprintf(stderr, "%s: wrong count \"%s\"\n", argv[0], argv[2]);
    exit(1);
  }
  if (sscanf(argv[3], "%i", &usec) != 1) {
    fprintf(stderr, "%s: wrong period \"%s\"\n", argv[0], argv[3]);
    exit(1);
  }
  fprintf(stderr, "%s: using port 0x%x, %i pulses, period %i us\n", argv[0],
          addr, count, usec);
  fd = open("/dev/port", O_RDWR);
  if (fd < 0) {
    fprintf(stderr, "%s: /dev/port: %s\n", argv[0], strerror(errno));
    exit(1);
  }
  tics = get_tics();
  do {
    char b[] = {0x00, 0xff};
    lseek(fd, addr, SEEK_SET);
    write(fd, b + 1, 1);
    lseek(fd, addr, SEEK_SET);
    write(fd, b + 0, 1);
    if (count > 1) {
      tics += usec;
      delay_to(tics);
    }
  } while (--count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
je     11df <main+0x4f>
mov    0x2e21(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
lea    0xe32(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe40(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   1080 <sscanf@plt>
cmp    $0x1,%eax
je     1230 <main+0xa0>
mov    0x2dd1(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
lea    0xe12(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe06(%rip),%rsi
lea    -0x1c(%rbp),%rdx
call   1080 <sscanf@plt>
cmp    $0x1,%eax
je     1281 <main+0xf1>
mov    0x2d80(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rcx
lea    0xdd8(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xdb5(%rip),%rsi
lea    -0x20(%rbp),%rdx
call   1080 <sscanf@plt>
cmp    $0x1,%eax
je     12d2 <main+0x142>
mov    0x2d2f(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rcx
lea    0xd9d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    0x2cff(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
lea    0xd81(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2ce6(%rip),%rax
mov    (%rax),%esi
lea    0xd98(%rip),%rdi
call   1090 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1364 <main+0x1d4>
mov    0x2cb4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    0x2c95(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x34(%rbp),%edi
mov    -0x30(%rbp),%rdx
mov    %rax,%rcx
lea    0xd5a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    $0x0,%al
call   1050 <get_tics@plt>
mov    %eax,-0x24(%rbp)
mov    0xd4b(%rip),%ax
mov    %ax,-0x26(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    0x2c42(%rip),%rax
mov    (%rax),%edx
call   1060 <lseek@plt>
mov    -0x14(%rbp),%edi
lea    -0x26(%rbp),%rsi
add    $0x1,%rsi
mov    $0x1,%edx
call   1040 <write@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    0x2c19(%rip),%rax
mov    (%rax),%edx
call   1060 <lseek@plt>
mov    -0x14(%rbp),%edi
lea    -0x26(%rbp),%rsi
mov    $0x1,%edx
call   1040 <write@plt>
cmpl   $0x1,-0x1c(%rbp)
jle    13e2 <main+0x252>
mov    -0x20(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
call   1030 <delay_to@plt>
jmp    13e7 <main+0x257>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jne    136e <main+0x1de>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
cmp    $0x4,%edi
jne    12e5 <main+0x155>
mov    0x8(%rbx),%rdi
lea    0xe7b(%rip),%rsi
lea    0x8(%rsp),%rdx
call   1080 <sscanf@plt>
cmp    $0x1,%eax
jne    12fd <main+0x16d>
mov    0x10(%rbx),%rdi
lea    0xe74(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1080 <sscanf@plt>
cmp    $0x1,%eax
jne    1316 <main+0x186>
mov    0x18(%rbx),%rdi
lea    0xe56(%rip),%rsi
lea    0xc(%rsp),%rdx
call   1080 <sscanf@plt>
mov    0x2dd8(%rip),%r14
mov    (%r14),%edi
mov    (%rbx),%rdx
cmp    $0x1,%eax
jne    132f <main+0x19f>
mov    0x8(%rsp),%ecx
mov    0x4(%rsp),%r8d
mov    0xc(%rsp),%r9d
lea    0xe51(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x2db6(%rip),%rax
mov    (%rax),%esi
lea    0xe68(%rip),%rdi
call   1090 <open@plt>
test   %eax,%eax
js     133c <main+0x1ac>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <get_tics@plt>
mov    %eax,%ebx
lea    0x3(%rsp),%r14
mov    0x2d69(%rip),%r12
lea    0x2(%rsp),%r15
jmp    1279 <main+0xe9>
cs nopw 0x0(%rax,%rax,1)
add    $0xffffffff,%eax
mov    %eax,0x4(%rsp)
je     12d6 <main+0x146>
movw   $0xff00,0x2(%rsp)
mov    0x8(%rsp),%esi
mov    (%r12),%edx
mov    %ebp,%edi
call   1060 <lseek@plt>
mov    %ebp,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1040 <write@plt>
mov    0x8(%rsp),%esi
mov    (%r12),%edx
mov    %ebp,%edi
call   1060 <lseek@plt>
mov    %ebp,%edi
mov    %r15,%rsi
mov    $0x1,%edx
call   1040 <write@plt>
mov    0x4(%rsp),%eax
cmp    $0x2,%eax
jl     1270 <main+0xe0>
add    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1030 <delay_to@plt>
mov    0x4(%rsp),%eax
jmp    1270 <main+0xe0>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2cec(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rcx
lea    0xd08(%rip),%rsi
mov    %rcx,%rdx
jmp    135f <main+0x1cf>
mov    0x2cd4(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
mov    0x8(%rbx),%rcx
lea    0xd1d(%rip),%rsi
jmp    135f <main+0x1cf>
mov    0x2cbb(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
mov    0x10(%rbx),%rcx
lea    0xd1b(%rip),%rsi
jmp    135f <main+0x1cf>
mov    0x18(%rbx),%rcx
lea    0xd24(%rip),%rsi
jmp    135f <main+0x1cf>
mov    (%r14),%ebp
mov    (%rbx),%rbx
mov    0x2c87(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xd56(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [46 x i8] c"%s: Use \22%s <hexaddr> <count> <period-usec>\22\0A\00"
@.str.1 = [3 x i8] c"%x\00"
@.str.2 = [20 x i8] c"%s: wrong hex \22%s\22\0A\00"
@.str.3 = [3 x i8] c"%i\00"
@.str.4 = [22 x i8] c"%s: wrong count \22%s\22\0A\00"
@.str.5 = [23 x i8] c"%s: wrong period \22%s\22\0A\00"
@.str.6 = [46 x i8] c"%s: using port 0x%x, %i pulses, period %i us\0A\00"
@.str.7 = [10 x i8] c"/dev/port\00"
@O_RDWR = global i32 0
@.str.8 = [19 x i8] c"%s: /dev/port: %s\0A\00"
@errno = global i32 0
@__const.main.b = [2 x i8] c"\00\FF"
@SEEK_SET = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [2 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 4
br i1 %13, label %14, label %24
14: ; preds = %2
%15 = load i32, i32* @stderr
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 0
%18 = load i8*, i8** %17
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %18, i8* %21)
%23 = call i32 @exit(i32 1)
unreachable
24: ; preds = %2
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32 @sscanf(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%29 = icmp ne i32 %28, 1
br i1 %29, label %30, label %40
30: ; preds = %24
%31 = load i32, i32* @stderr
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 0
%34 = load i8*, i8** %33
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = load i8*, i8** %36
%38 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %34, i8* %37)
%39 = call i32 @exit(i32 1)
unreachable
40: ; preds = %24
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 2
%43 = load i8*, i8** %42
%44 = call i32 @sscanf(i8* %43, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %8)
%45 = icmp ne i32 %44, 1
br i1 %45, label %46, label %56
46: ; preds = %40
%47 = load i32, i32* @stderr
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 0
%50 = load i8*, i8** %49
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 2
%53 = load i8*, i8** %52
%54 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i8* %50, i8* %53)
%55 = call i32 @exit(i32 1)
unreachable
56: ; preds = %40
%57 = load i8**, i8*** %5
%58 = getelementptr inbounds i8*, i8** %57, i64 3
%59 = load i8*, i8** %58
%60 = call i32 @sscanf(i8* %59, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %9)
%61 = icmp ne i32 %60, 1
br i1 %61, label %62, label %72
62: ; preds = %56
%63 = load i32, i32* @stderr
%64 = load i8**, i8*** %5
%65 = getelementptr inbounds i8*, i8** %64, i64 0
%66 = load i8*, i8** %65
%67 = load i8**, i8*** %5
%68 = getelementptr inbounds i8*, i8** %67, i64 3
%69 = load i8*, i8** %68
%70 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %66, i8* %69)
%71 = call i32 @exit(i32 1)
unreachable
72: ; preds = %56
%73 = load i32, i32* @stderr
%74 = load i8**, i8*** %5
%75 = getelementptr inbounds i8*, i8** %74, i64 0
%76 = load i8*, i8** %75
%77 = load i32, i32* %7
%78 = load i32, i32* %8
%79 = load i32, i32* %9
%80 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %73, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0), i8* %76, i32 %77, i32 %78, i32 %79)
%81 = load i32, i32* @O_RDWR
%82 = call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 %81)
store i32 %82, i32* %6
%83 = load i32, i32* %6
%84 = icmp slt i32 %83, 0
br i1 %84, label %85, label %94
85: ; preds = %72
%86 = load i32, i32* @stderr
%87 = load i8**, i8*** %5
%88 = getelementptr inbounds i8*, i8** %87, i64 0
%89 = load i8*, i8** %88
%90 = load i32, i32* @errno
%91 = call i8* @strerror(i32 %90)
%92 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %86, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i8* %89, i8* %91)
%93 = call i32 @exit(i32 1)
unreachable
94: ; preds = %72
%95 = call i32 (...) @get_tics()
store i32 %95, i32* %10
br label %96
96: ; preds = %123, %94
%97 = bitcast [2 x i8]* %11 to i8*
%98 = load i32, i32* %6
%99 = load i32, i32* %7
%100 = load i32, i32* @SEEK_SET
%101 = call i32 @lseek(i32 %98, i32 %99, i32 %100)
%102 = load i32, i32* %6
%103 = getelementptr inbounds [2 x i8], [2 x i8]* %11, i64 0, i64 0
%104 = getelementptr inbounds i8, i8* %103, i64 1
%105 = call i32 @write(i32 %102, i8* %104, i32 1)
%106 = load i32, i32* %6
%107 = load i32, i32* %7
%108 = load i32, i32* @SEEK_SET
%109 = call i32 @lseek(i32 %106, i32 %107, i32 %108)
%110 = load i32, i32* %6
%111 = getelementptr inbounds [2 x i8], [2 x i8]* %11, i64 0, i64 0
%112 = getelementptr inbounds i8, i8* %111, i64 0
%113 = call i32 @write(i32 %110, i8* %112, i32 1)
%114 = load i32, i32* %8
%115 = icmp sgt i32 %114, 1
br i1 %115, label %116, label %122
116: ; preds = %96
%117 = load i32, i32* %9
%118 = load i32, i32* %10
%119 = add nsw i32 %118, %117
store i32 %119, i32* %10
%120 = load i32, i32* %10
%121 = call i32 @delay_to(i32 %120)
br label %122
122: ; preds = %116, %96
br label %123
123: ; preds = %122
%124 = load i32, i32* %8
%125 = add nsw i32 %124, -1
store i32 %125, i32* %8
%126 = icmp ne i32 %125, 0
br i1 %126, label %96, label %127
127: ; preds = %123
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [46 x i8] c"%s: Use \22%s <hexaddr> <count> <period-usec>\22\0A\00"
@.str.1 = [3 x i8] c"%x\00"
@.str.2 = [20 x i8] c"%s: wrong hex \22%s\22\0A\00"
@.str.3 = [3 x i8] c"%i\00"
@.str.4 = [22 x i8] c"%s: wrong count \22%s\22\0A\00"
@.str.5 = [23 x i8] c"%s: wrong period \22%s\22\0A\00"
@.str.6 = [46 x i8] c"%s: using port 0x%x, %i pulses, period %i us\0A\00"
@.str.7 = [10 x i8] c"/dev/port\00"
@O_RDWR = global i32 0
@.str.8 = [19 x i8] c"%s: /dev/port: %s\0A\00"
@errno = global i32 0
@SEEK_SET = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i16
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = icmp eq i32 %0, 4
br i1 %10, label %16, label %11
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %1
%14 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %13)
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %2
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = call i32 @sscanf(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%20 = icmp eq i32 %19, 1
br i1 %20, label %27, label %21
21: ; preds = %16
%22 = load i32, i32* @stderr
%23 = load i8*, i8** %1
%24 = load i8*, i8** %17
%25 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %23, i8* %24)
%26 = call i32 @exit(i32 1)
unreachable
27: ; preds = %16
%28 = getelementptr inbounds i8*, i8** %1, i64 2
%29 = load i8*, i8** %28
%30 = call i32 @sscanf(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%31 = icmp eq i32 %30, 1
br i1 %31, label %38, label %32
32: ; preds = %27
%33 = load i32, i32* @stderr
%34 = load i8*, i8** %1
%35 = load i8*, i8** %28
%36 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i8* %34, i8* %35)
%37 = call i32 @exit(i32 1)
unreachable
38: ; preds = %27
%39 = getelementptr inbounds i8*, i8** %1, i64 3
%40 = load i8*, i8** %39
%41 = call i32 @sscanf(i8* %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %5)
%42 = icmp eq i32 %41, 1
%43 = load i32, i32* @stderr
%44 = load i8*, i8** %1
br i1 %42, label %49, label %45
45: ; preds = %38
%46 = load i8*, i8** %39
%47 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %44, i8* %46)
%48 = call i32 @exit(i32 1)
unreachable
49: ; preds = %38
%50 = load i32, i32* %3
%51 = load i32, i32* %4
%52 = load i32, i32* %5
%53 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0), i8* %44, i32 %50, i32 %51, i32 %52)
%54 = load i32, i32* @O_RDWR
%55 = call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 %54)
%56 = icmp slt i32 %55, 0
br i1 %56, label %57, label %64
57: ; preds = %49
%58 = load i32, i32* @stderr
%59 = load i8*, i8** %1
%60 = load i32, i32* @errno
%61 = call i8* @strerror(i32 %60)
%62 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i8* %59, i8* %61)
%63 = call i32 @exit(i32 1)
unreachable
64: ; preds = %49
%65 = call i32 (...) @get_tics()
%66 = bitcast i16* %6 to i8*
%67 = getelementptr inbounds i8, i8* %66, i64 1
br label %68
68: ; preds = %85, %64
%69 = phi i32 [ %65, %64 ], [ %87, %85 ]
store i16 -256, i16* %6
%70 = load i32, i32* %3
%71 = load i32, i32* @SEEK_SET
%72 = call i32 @lseek(i32 %55, i32 %70, i32 %71)
%73 = call i32 @write(i32 %55, i8* %67, i32 1)
%74 = load i32, i32* %3
%75 = load i32, i32* @SEEK_SET
%76 = call i32 @lseek(i32 %55, i32 %74, i32 %75)
%77 = call i32 @write(i32 %55, i8* %66, i32 1)
%78 = load i32, i32* %4
%79 = icmp sgt i32 %78, 1
br i1 %79, label %80, label %85
80: ; preds = %68
%81 = load i32, i32* %5
%82 = add nsw i32 %81, %69
%83 = call i32 @delay_to(i32 %82)
%84 = load i32, i32* %4
br label %85
85: ; preds = %80, %68
%86 = phi i32 [ %84, %80 ], [ %78, %68 ]
%87 = phi i32 [ %82, %80 ], [ %69, %68 ]
%88 = add nsw i32 %86, -1
store i32 %88, i32* %4
%89 = icmp eq i32 %88, 0
br i1 %89, label %90, label %68
90: ; preds = %85
ret i32 0
}