#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 /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ close_timer(int /*<<< orphan*/ *);
int /*<<< orphan*/ display_times(int, float *);
int /*<<< orphan*/ display_winner(int);
int /*<<< orphan*/ fgets(char **, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int get_times(int /*<<< orphan*/ *, int, float *, int);
int getopt(int, char **, char *);
int init_timer(int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(float **, int /*<<< orphan*/, int);
int /*<<< orphan*/ *open_timer(char *, int);
char *optarg;
scalar_t__ opterr;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ rearm_timer(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ *reinit_timer(int /*<<< orphan*/ *, char *, int, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
scalar_t__ strchr(char **, char);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  FILE *port;
  char *filename;
  int c, i, j, tmp;
  int debugmode = 0;
  int lanes;
  float times[4];
  float prev_times[4][4];
  int prev_head = 0;
  char *tmpbuf[10];
  if (argc == 1) {
    usage();
    return 0;
  }
  opterr = 0;
  while ((c = getopt(argc, argv, "dp:")) != -1) {
    switch (c) {
    case 'd':
      printf("Debugging mode enabled\n");
      debugmode = 1;
      break;
    case 'p':
      filename = optarg;
      break;
    case '?':
    default:
      usage();
      return 1;
    }
  }
  port = open_timer(filename, !debugmode);
  if (!port) {
    fprintf(stderr, "Eek! Unable to open timer port! Cannot continue.\n");
    fprintf(stderr, "Possible problems:\n");
    fprintf(stderr,
            "\tbad filename for port (if USB timer, check dmesg for port id\n");
    fprintf(stderr,
            "\tno write access to device (check permissions or run as root)\n");
    fprintf(stderr, "\tUSB timer not connected\n");
    return 1;
  }
  lanes = init_timer(port);
  if (!lanes) {
    fprintf(stderr, "Eek! Cannot initialize timer! Cannot continue!\n");
    fprintf(stderr, "Make sure your timer is supported by this program.\n");
    close_timer(port);
    return 1;
  }
  memset(prev_times, 0, sizeof(float) * 3 * 4);
  printf("Press enter to continue.\n");
  fgets(tmpbuf, 10, stdin);
  while (1) {
    printf("Begin racing when ready.\n");
    tmp = get_times(port, lanes, times, debugmode);
    printf("Run is complete. Results:\n");
    if (tmp > 0) {
      display_winner(tmp);
      printf("\n");
      display_times(lanes, times);
      for (j = 0; j < lanes; j++) {
        prev_times[j][prev_head] = times[j];
      }
      printf("\nPrevious results:\n");
      i = prev_head - 1;
      if (i < 0)
        i = 3;
      while (i != prev_head) {
        for (j = 0; j < lanes; j++)
          printf("\t%1.4f", prev_times[j][i]);
        printf("\n");
        i--;
        if (i < 0)
          i = 3;
      }
      prev_head++;
      if (prev_head == 4)
        prev_head = 0;
    }
    if (tmp == 0) {
      printf("Null race result! Please redo this run.\n");
    }
    if (tmp < 0) {
      port = reinit_timer(port, filename, !debugmode, lanes);
    }
    printf("Press enter to continue, X to exit.\n");
    fgets(tmpbuf, 10, stdin);
    if (strchr(tmpbuf, 'x') || strchr(tmpbuf, 'X'))
      break;
    rearm_timer(port, debugmode);
  }
  printf("\nDone.\n");
  close_timer(port);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x94(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1237 <main+0x47>
mov    $0x0,%al
call   10d0 <usage@plt>
movl   $0x0,-0x4(%rbp)
jmp    167a <main+0x48a>
mov    0x2d8a(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xdad(%rip),%rdx
call   1110 <getopt@plt>
mov    %eax,-0x24(%rbp)
cmp    $0xffffffff,%eax
je     12ed <main+0xfd>
mov    -0x24(%rbp),%eax
mov    %eax,-0xf4(%rbp)
sub    $0x3f,%eax
je     12d0 <main+0xe0>
jmp    127b <main+0x8b>
mov    -0xf4(%rbp),%eax
sub    $0x64,%eax
je     12a3 <main+0xb3>
jmp    128f <main+0x9f>
mov    -0xf4(%rbp),%eax
sub    $0x70,%eax
je     12bd <main+0xcd>
jmp    12d5 <main+0xe5>
lea    0xd5a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x34(%rbp)
jmp    12e8 <main+0xf8>
mov    0x2d34(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
jmp    12e8 <main+0xf8>
jmp    12d5 <main+0xe5>
mov    $0x0,%al
call   10d0 <usage@plt>
movl   $0x1,-0x4(%rbp)
jmp    167a <main+0x48a>
jmp    1245 <main+0x55>
mov    -0x20(%rbp),%rdi
cmpl   $0x0,-0x34(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
call   1100 <open_timer@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1388 <main+0x198>
mov    0x2cb6(%rip),%rax
mov    (%rax),%edi
lea    0xcf9(%rip),%rsi
call   10a0 <fprintf@plt>
mov    0x2ca1(%rip),%rax
mov    (%rax),%edi
lea    0xd16(%rip),%rsi
call   10a0 <fprintf@plt>
mov    0x2c8c(%rip),%rax
mov    (%rax),%edi
lea    0xd15(%rip),%rsi
call   10a0 <fprintf@plt>
mov    0x2c77(%rip),%rax
mov    (%rax),%edi
lea    0xd3f(%rip),%rsi
call   10a0 <fprintf@plt>
mov    0x2c62(%rip),%rax
mov    (%rax),%edi
lea    0xd69(%rip),%rsi
call   10a0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    167a <main+0x48a>
mov    -0x18(%rbp),%rdi
call   10e0 <init_timer@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x0,-0x38(%rbp)
jne    13dd <main+0x1ed>
mov    0x2c2b(%rip),%rax
mov    (%rax),%edi
lea    0xd4c(%rip),%rsi
call   10a0 <fprintf@plt>
mov    0x2c16(%rip),%rax
mov    (%rax),%edi
lea    0xd67(%rip),%rsi
call   10a0 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   10b0 <close_timer@plt>
movl   $0x1,-0x4(%rbp)
jmp    167a <main+0x48a>
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1070 <memset@plt>
lea    0xd67(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0xf0(%rbp),%rdi
mov    0x2bd4(%rip),%rax
mov    (%rax),%edx
mov    $0xa,%esi
call   1080 <fgets@plt>
lea    0xd59(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x38(%rbp),%esi
lea    -0x50(%rbp),%rdx
mov    -0x34(%rbp),%ecx
call   1030 <get_times@plt>
mov    %eax,-0x30(%rbp)
lea    0xd4f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x0,-0x30(%rbp)
jle    15a4 <main+0x3b4>
mov    -0x30(%rbp),%edi
call   1040 <display_winner@plt>
lea    0xcc5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x38(%rbp),%edi
lea    -0x50(%rbp),%rsi
call   10f0 <display_times@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    14bf <main+0x2cf>
movslq -0x2c(%rbp),%rax
movss  -0x50(%rbp,%rax,4),%xmm0
movslq -0x2c(%rbp),%rcx
lea    -0x90(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x94(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    147d <main+0x28d>
lea    0xce7(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x94(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jge    14ea <main+0x2fa>
movl   $0x3,-0x28(%rbp)
jmp    14ef <main+0x2ff>
mov    -0x28(%rbp),%eax
cmp    -0x94(%rbp),%eax
je     1579 <main+0x389>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    154c <main+0x35c>
movslq -0x2c(%rbp),%rcx
lea    -0x90(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc8a(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1505 <main+0x315>
lea    0xbd5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jge    1574 <main+0x384>
movl   $0x3,-0x28(%rbp)
jmp    14ef <main+0x2ff>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x4,-0x94(%rbp)
jne    159f <main+0x3af>
movl   $0x0,-0x94(%rbp)
jmp    15a4 <main+0x3b4>
cmpl   $0x0,-0x30(%rbp)
jne    15bc <main+0x3cc>
lea    0xc13(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x0,-0x30(%rbp)
jge    15e8 <main+0x3f8>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
cmpl   $0x0,-0x34(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edx
mov    -0x38(%rbp),%ecx
call   10c0 <reinit_timer@plt>
mov    %rax,-0x18(%rbp)
lea    0xc02(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0xf0(%rbp),%rdi
mov    0x29dc(%rip),%rax
mov    (%rax),%edx
mov    $0xa,%esi
call   1080 <fgets@plt>
lea    -0xf0(%rbp),%rdi
mov    $0x78,%esi
call   1050 <strchr@plt>
cmp    $0x0,%rax
jne    1646 <main+0x456>
lea    -0xf0(%rbp),%rdi
mov    $0x58,%esi
call   1050 <strchr@plt>
cmp    $0x0,%rax
je     164b <main+0x45b>
jmp    165c <main+0x46c>
mov    -0x18(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1090 <rearm_timer@plt>
jmp    1418 <main+0x228>
lea    0xbb3(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%rdi
call   10b0 <close_timer@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
cmp    $0x1,%edi
jne    1234 <main+0x24>
xor    %ebx,%ebx
xor    %eax,%eax
call   10f0 <usage@plt>
jmp    1673 <main+0x463>
mov    %rsi,%rbp
mov    %edi,%ebx
mov    0x2d88(%rip),%rax
movq   $0x0,(%rax)
xor    %r13d,%r13d
lea    0xdaf(%rip),%r14
lea    0xfa7(%rip),%r15
mov    0x2d99(%rip),%r12
jmp    127e <main+0x6e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1040 <puts@plt>
mov    $0x1,%r13d
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1130 <getopt@plt>
cmp    $0x64,%eax
je     1270 <main+0x60>
cmp    $0xffffffff,%eax
je     12a9 <main+0x99>
cmp    $0x70,%eax
jne    15d0 <main+0x3c0>
mov    (%r12),%rax
mov    %rax,0x30(%rsp)
jmp    127e <main+0x6e>
mov    %r13d,%esi
xor    $0x1,%esi
mov    0x30(%rsp),%rdi
mov    %esi,0x14(%rsp)
call   1120 <open_timer@plt>
test   %rax,%rax
je     15f4 <main+0x3e4>
mov    %rax,%r15
mov    %rax,%rdi
call   1100 <init_timer@plt>
test   %eax,%eax
je     1643 <main+0x433>
mov    %eax,%ebx
lea    0x60(%rsp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1090 <memset@plt>
lea    0xe5a(%rip),%rdi
call   1040 <puts@plt>
mov    0x2ce1(%rip),%rax
mov    (%rax),%edx
lea    0xa0(%rsp),%rdi
mov    $0xa,%esi
call   10a0 <fgets@plt>
mov    %ebx,0x10(%rsp)
mov    %ebx,%ebx
lea    -0x1(%rbx),%rax
mov    %rax,0x48(%rsp)
mov    %ebx,%eax
and    $0x3,%eax
mov    %ebx,%ecx
and    $0xfffffffc,%ecx
mov    %rcx,0x38(%rsp)
mov    %rax,0x40(%rsp)
lea    0x0(,%rax,4),%rax
mov    %rax,0x50(%rsp)
shl    $0x4,%rbx
lea    0xdf8(%rip),%r12
xor    %eax,%eax
mov    %rax,0x8(%rsp)
mov    %r13d,0x18(%rsp)
mov    0x10(%rsp),%r14d
nop
lea    0xdff(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rbp
mov    %r15,%rdi
mov    %r14d,%esi
lea    0x20(%rsp),%rdx
mov    %r13d,%ecx
call   1050 <get_times@plt>
mov    %eax,%r15d
lea    0xdf3(%rip),%rdi
call   1040 <puts@plt>
mov    %r15d,%edi
test   %r15d,%r15d
jle    13e0 <main+0x1d0>
mov    %edi,0x1c(%rsp)
call   1060 <display_winner@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14d,%edi
lea    0x20(%rsp),%rsi
call   1110 <display_times@plt>
test   %r14d,%r14d
mov    0x50(%rsp),%rdi
jle    1493 <main+0x283>
movslq 0x8(%rsp),%rax
cmpq   $0x3,0x48(%rsp)
jae    1404 <main+0x1f4>
xor    %ecx,%ecx
jmp    1458 <main+0x248>
nopl   0x0(%rax,%rax,1)
mov    %rbp,%r15
lea    0xa0(%rsp),%rbp
test   %edi,%edi
jne    14f7 <main+0x2e7>
lea    0xdca(%rip),%rdi
call   1040 <puts@plt>
jmp    1511 <main+0x301>
lea    0x60(%rsp),%rcx
lea    (%rcx,%rax,4),%rdx
add    $0x30,%rdx
xor    %ecx,%ecx
mov    0x38(%rsp),%rsi
nopl   0x0(%rax,%rax,1)
movss  0x20(%rsp,%rcx,4),%xmm0
movss  %xmm0,-0x30(%rdx)
movss  0x24(%rsp,%rcx,4),%xmm0
movss  %xmm0,-0x20(%rdx)
movss  0x28(%rsp,%rcx,4),%xmm0
movss  %xmm0,-0x10(%rdx)
movss  0x2c(%rsp,%rcx,4),%xmm0
movss  %xmm0,(%rdx)
add    $0x4,%rcx
add    $0x40,%rdx
cmp    %rcx,%rsi
jne    1420 <main+0x210>
cmpq   $0x0,0x40(%rsp)
je     1493 <main+0x283>
lea    (%rsp,%rcx,4),%rdx
add    $0x20,%rdx
shl    $0x4,%rcx
add    %rsp,%rcx
add    $0x60,%rcx
lea    (%rcx,%rax,4),%rax
xor    %ecx,%ecx
nopl   0x0(%rax)
movss  (%rdx,%rcx,1),%xmm0
movss  %xmm0,(%rax,%rcx,4)
add    $0x4,%rcx
cmp    %rcx,%rdi
jne    1480 <main+0x270>
mov    %rbp,0x58(%rsp)
lea    0xd4d(%rip),%rdi
call   1040 <puts@plt>
mov    0x8(%rsp),%rcx
lea    -0x1(%rcx),%r15d
test   %ecx,%ecx
mov    $0x3,%eax
cmovle %eax,%r15d
cmp    %ecx,%r15d
jne    1596 <main+0x386>
mov    0x8(%rsp),%rcx
add    $0x1,%ecx
cmp    $0x4,%ecx
mov    $0x0,%eax
cmove  %eax,%ecx
mov    %rcx,0x8(%rsp)
mov    0x18(%rsp),%r13d
mov    0x58(%rsp),%r15
lea    0xa0(%rsp),%rbp
mov    0x1c(%rsp),%edi
test   %edi,%edi
je     13f3 <main+0x1e3>
jns    1511 <main+0x301>
mov    %r15,%rdi
mov    0x30(%rsp),%rsi
mov    0x14(%rsp),%edx
mov    0x10(%rsp),%ecx
call   10e0 <reinit_timer@plt>
mov    %rax,%r15
lea    0xc81(%rip),%rdi
call   1040 <puts@plt>
mov    0x2abc(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
mov    $0xa,%esi
call   10a0 <fgets@plt>
mov    %rbp,%rdi
mov    $0x78,%esi
call   1070 <strchr@plt>
test   %rax,%rax
jne    15dc <main+0x3cc>
mov    %rbp,%rdi
mov    $0x58,%esi
call   1070 <strchr@plt>
test   %rax,%rax
jne    15dc <main+0x3cc>
mov    %r15,%rdi
mov    %r13d,%esi
call   10b0 <rearm_timer@plt>
jmp    1360 <main+0x150>
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %r15d,%r15d
lea    -0x1(%r15),%eax
mov    $0x3,%ecx
cmovle %ecx,%eax
mov    %eax,%r15d
cmp    0x8(%rsp),%eax
je     14c1 <main+0x2b1>
test   %r14d,%r14d
jle    1570 <main+0x360>
movslq %r15d,%rax
lea    (%rsp,%rax,4),%r13
add    $0x60,%r13
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
movss  0x0(%r13,%rbp,1),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
add    $0x10,%rbp
cmp    %rbp,%rbx
jne    15b0 <main+0x3a0>
jmp    1570 <main+0x360>
xor    %eax,%eax
call   10f0 <usage@plt>
jmp    166e <main+0x45e>
lea    0xbda(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   10d0 <close_timer@plt>
xor    %ebx,%ebx
jmp    1673 <main+0x463>
mov    0x29d5(%rip),%rbx
mov    (%rbx),%edi
lea    0xa00(%rip),%rsi
call   10c0 <fprintf@plt>
mov    (%rbx),%edi
lea    0xa24(%rip),%rsi
call   10c0 <fprintf@plt>
mov    (%rbx),%edi
lea    0xa2a(%rip),%rsi
call   10c0 <fprintf@plt>
mov    (%rbx),%edi
lea    0xa5b(%rip),%rsi
call   10c0 <fprintf@plt>
mov    (%rbx),%edi
lea    0xa8c(%rip),%rsi
call   10c0 <fprintf@plt>
jmp    166e <main+0x45e>
mov    0x2986(%rip),%rbx
mov    (%rbx),%edi
lea    0xa8f(%rip),%rsi
call   10c0 <fprintf@plt>
mov    (%rbx),%edi
lea    0xab1(%rip),%rsi
call   10c0 <fprintf@plt>
mov    %r15,%rdi
call   10d0 <close_timer@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@opterr = global i64 0
@.str = [4 x i8] c"dp:\00"
@.str.1 = [24 x i8] c"Debugging mode enabled\0A\00"
@optarg = global i8* null
@stderr = global i32 0
@.str.2 = [50 x i8] c"Eek! Unable to open timer port! Cannot continue.\0A\00"
@.str.3 = [20 x i8] c"Possible problems:\0A\00"
@.str.4 = [63 x i8] c"\09bad filename for port (if USB timer, check dmesg for port id\0A\00"
@.str.5 = [63 x i8] c"\09no write access to device (check permissions or run as root)\0A\00"
@.str.6 = [26 x i8] c"\09USB timer not connected\0A\00"
@.str.7 = [48 x i8] c"Eek! Cannot initialize timer! Cannot continue!\0A\00"
@.str.8 = [52 x i8] c"Make sure your timer is supported by this program.\0A\00"
@.str.9 = [26 x i8] c"Press enter to continue.\0A\00"
@stdin = global i32 0
@.str.10 = [26 x i8] c"Begin racing when ready.\0A\00"
@.str.11 = [27 x i8] c"Run is complete. Results:\0A\00"
@.str.12 = [2 x i8] c"\0A\00"
@.str.13 = [20 x i8] c"\0APrevious results:\0A\00"
@.str.14 = [7 x i8] c"\09%1.4f\00"
@.str.15 = [41 x i8] c"Null race result! Please redo this run.\0A\00"
@.str.16 = [37 x i8] c"Press enter to continue, X to exit.\0A\00"
@.str.17 = [8 x i8] c"\0ADone.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca [4 x float]
%15 = alloca [4 x [4 x float]]
%16 = alloca i32
%17 = alloca [10 x i8*]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %12
store i32 0, i32* %16
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, 1
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @usage()
store i32 0, i32* %3
br label %196
22: ; preds = %2
store i64 0, i64* @opterr
br label %23
23: ; preds = %37, %22
%24 = load i32, i32* %4
%25 = load i8**, i8*** %5
%26 = call i32 @getopt(i32 %24, i8** %25, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32 %26, i32* %8
%27 = icmp ne i32 %26, -1
br i1 %27, label %28, label %38
28: ; preds = %23
%29 = load i32, i32* %8
switch i32 %29, label %35 [
i32 100, label %30
i32 112, label %32
i32 63, label %34
]
30: ; preds = %28
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %12
br label %37
32: ; preds = %28
%33 = load i8*, i8** @optarg
store i8* %33, i8** %7
br label %37
34: ; preds = %28
br label %35
35: ; preds = %28, %34
%36 = call i32 (...) @usage()
store i32 1, i32* %3
br label %196
37: ; preds = %32, %30
br label %23
38: ; preds = %23
%39 = load i8*, i8** %7
%40 = load i32, i32* %12
%41 = icmp ne i32 %40, 0
%42 = xor i1 %41, true
%43 = zext i1 %42 to i32
%44 = call i32* @open_timer(i8* %39, i32 %43)
store i32* %44, i32** %6
%45 = load i32*, i32** %6
%46 = icmp ne i32* %45, null
br i1 %46, label %58, label %47
47: ; preds = %38
%48 = load i32, i32* @stderr
%49 = call i32 @fprintf(i32 %48, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
%50 = load i32, i32* @stderr
%51 = call i32 @fprintf(i32 %50, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%52 = load i32, i32* @stderr
%53 = call i32 @fprintf(i32 %52, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.4, i64 0, i64 0))
%54 = load i32, i32* @stderr
%55 = call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.5, i64 0, i64 0))
%56 = load i32, i32* @stderr
%57 = call i32 @fprintf(i32 %56, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
store i32 1, i32* %3
br label %196
58: ; preds = %38
%59 = load i32*, i32** %6
%60 = call i32 @init_timer(i32* %59)
store i32 %60, i32* %13
%61 = load i32, i32* %13
%62 = icmp ne i32 %61, 0
br i1 %62, label %70, label %63
63: ; preds = %58
%64 = load i32, i32* @stderr
%65 = call i32 @fprintf(i32 %64, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%66 = load i32, i32* @stderr
%67 = call i32 @fprintf(i32 %66, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0))
%68 = load i32*, i32** %6
%69 = call i32 @close_timer(i32* %68)
store i32 1, i32* %3
br label %196
70: ; preds = %58
%71 = getelementptr inbounds [4 x [4 x float]], [4 x [4 x float]]* %15, i64 0, i64 0
%72 = bitcast [4 x float]* %71 to float**
%73 = call i32 @memset(float** %72, i32 0, i32 48)
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0))
%75 = getelementptr inbounds [10 x i8*], [10 x i8*]* %17, i64 0, i64 0
%76 = load i32, i32* @stdin
%77 = call i32 @fgets(i8** %75, i32 10, i32 %76)
br label %78
78: ; preds = %70, %188
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0))
%80 = load i32*, i32** %6
%81 = load i32, i32* %13
%82 = getelementptr inbounds [4 x float], [4 x float]* %14, i64 0, i64 0
%83 = load i32, i32* %12
%84 = call i32 @get_times(i32* %80, i32 %81, float* %82, i32 %83)
store i32 %84, i32* %11
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0))
%86 = load i32, i32* %11
%87 = icmp sgt i32 %86, 0
br i1 %87, label %88, label %158
88: ; preds = %78
%89 = load i32, i32* %11
%90 = call i32 @display_winner(i32 %89)
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
%92 = load i32, i32* %13
%93 = getelementptr inbounds [4 x float], [4 x float]* %14, i64 0, i64 0
%94 = call i32 @display_times(i32 %92, float* %93)
store i32 0, i32* %10
br label %95
95: ; preds = %110, %88
%96 = load i32, i32* %10
%97 = load i32, i32* %13
%98 = icmp slt i32 %96, %97
br i1 %98, label %99, label %113
99: ; preds = %95
%100 = load i32, i32* %10
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [4 x float], [4 x float]* %14, i64 0, i64 %101
%103 = load float, float* %102
%104 = load i32, i32* %10
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [4 x [4 x float]], [4 x [4 x float]]* %15, i64 0, i64 %105
%107 = load i32, i32* %16
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [4 x float], [4 x float]* %106, i64 0, i64 %108
store float %103, float* %109
br label %110
110: ; preds = %99
%111 = load i32, i32* %10
%112 = add nsw i32 %111, 1
store i32 %112, i32* %10
br label %95
113: ; preds = %95
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%115 = load i32, i32* %16
%116 = sub nsw i32 %115, 1
store i32 %116, i32* %9
%117 = load i32, i32* %9
%118 = icmp slt i32 %117, 0
br i1 %118, label %119, label %120
119: ; preds = %113
store i32 3, i32* %9
br label %120
120: ; preds = %119, %113
br label %121
121: ; preds = %150, %120
%122 = load i32, i32* %9
%123 = load i32, i32* %16
%124 = icmp ne i32 %122, %123
br i1 %124, label %125, label %151
125: ; preds = %121
store i32 0, i32* %10
br label %126
126: ; preds = %140, %125
%127 = load i32, i32* %10
%128 = load i32, i32* %13
%129 = icmp slt i32 %127, %128
br i1 %129, label %130, label %143
130: ; preds = %126
%131 = load i32, i32* %10
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds [4 x [4 x float]], [4 x [4 x float]]* %15, i64 0, i64 %132
%134 = load i32, i32* %9
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds [4 x float], [4 x float]* %133, i64 0, i64 %135
%137 = load float, float* %136
%138 = fpext float %137 to double
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), double %138)
br label %140
140: ; preds = %130
%141 = load i32, i32* %10
%142 = add nsw i32 %141, 1
store i32 %142, i32* %10
br label %126
143: ; preds = %126
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
%145 = load i32, i32* %9
%146 = add nsw i32 %145, -1
store i32 %146, i32* %9
%147 = load i32, i32* %9
%148 = icmp slt i32 %147, 0
br i1 %148, label %149, label %150
149: ; preds = %143
store i32 3, i32* %9
br label %150
150: ; preds = %149, %143
br label %121
151: ; preds = %121
%152 = load i32, i32* %16
%153 = add nsw i32 %152, 1
store i32 %153, i32* %16
%154 = load i32, i32* %16
%155 = icmp eq i32 %154, 4
br i1 %155, label %156, label %157
156: ; preds = %151
store i32 0, i32* %16
br label %157
157: ; preds = %156, %151
br label %158
158: ; preds = %157, %78
%159 = load i32, i32* %11
%160 = icmp eq i32 %159, 0
br i1 %160, label %161, label %163
161: ; preds = %158
%162 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.15, i64 0, i64 0))
br label %163
163: ; preds = %161, %158
%164 = load i32, i32* %11
%165 = icmp slt i32 %164, 0
br i1 %165, label %166, label %175
166: ; preds = %163
%167 = load i32*, i32** %6
%168 = load i8*, i8** %7
%169 = load i32, i32* %12
%170 = icmp ne i32 %169, 0
%171 = xor i1 %170, true
%172 = zext i1 %171 to i32
%173 = load i32, i32* %13
%174 = call i32* @reinit_timer(i32* %167, i8* %168, i32 %172, i32 %173)
store i32* %174, i32** %6
br label %175
175: ; preds = %166, %163
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.16, i64 0, i64 0))
%177 = getelementptr inbounds [10 x i8*], [10 x i8*]* %17, i64 0, i64 0
%178 = load i32, i32* @stdin
%179 = call i32 @fgets(i8** %177, i32 10, i32 %178)
%180 = getelementptr inbounds [10 x i8*], [10 x i8*]* %17, i64 0, i64 0
%181 = call i64 @strchr(i8** %180, i8 signext 120)
%182 = icmp ne i64 %181, 0
br i1 %182, label %187, label %183
183: ; preds = %175
%184 = getelementptr inbounds [10 x i8*], [10 x i8*]* %17, i64 0, i64 0
%185 = call i64 @strchr(i8** %184, i8 signext 88)
%186 = icmp ne i64 %185, 0
br i1 %186, label %187, label %188
187: ; preds = %183, %175
br label %192
188: ; preds = %183
%189 = load i32*, i32** %6
%190 = load i32, i32* %12
%191 = call i32 @rearm_timer(i32* %189, i32 %190)
br label %78
192: ; preds = %187
%193 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
%194 = load i32*, i32** %6
%195 = call i32 @close_timer(i32* %194)
store i32 0, i32* %3
br label %196
196: ; preds = %192, %63, %47, %35, %20
%197 = load i32, i32* %3
ret i32 %197
}

LLVM IR (-O2):
@opterr = global i64 0
@.str = [4 x i8] c"dp:\00"
@optarg = global i8* null
@stderr = global i32 0
@.str.2 = [50 x i8] c"Eek! Unable to open timer port! Cannot continue.\0A\00"
@.str.3 = [20 x i8] c"Possible problems:\0A\00"
@.str.4 = [63 x i8] c"\09bad filename for port (if USB timer, check dmesg for port id\0A\00"
@.str.5 = [63 x i8] c"\09no write access to device (check permissions or run as root)\0A\00"
@.str.6 = [26 x i8] c"\09USB timer not connected\0A\00"
@.str.7 = [48 x i8] c"Eek! Cannot initialize timer! Cannot continue!\0A\00"
@.str.8 = [52 x i8] c"Make sure your timer is supported by this program.\0A\00"
@stdin = global i32 0
@.str.14 = [7 x i8] c"\09%1.4f\00"
@str = [25 x i8] c"Press enter to continue.\00"
@str.18 = [25 x i8] c"Begin racing when ready.\00"
@str.19 = [26 x i8] c"Run is complete. Results:\00"
@str.20 = [36 x i8] c"Press enter to continue, X to exit.\00"
@str.21 = [7 x i8] c"\0ADone.\00"
@str.22 = [40 x i8] c"Null race result! Please redo this run.\00"
@str.23 = [19 x i8] c"\0APrevious results:\00"
@str.24 = [23 x i8] c"Debugging mode enabled\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [4 x float]
%4 = alloca [4 x [4 x float]]
%5 = alloca [10 x i8*]
%6 = bitcast [4 x float]* %3 to i8*
%7 = bitcast [4 x [4 x float]]* %4 to i8*
%8 = bitcast [10 x i8*]* %5 to i8*
%9 = icmp eq i32 %0, 1
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @usage()
br label %162
12: ; preds = %2
store i64 0, i64* @opterr
br label %13
13: ; preds = %21, %12
%14 = phi i8* [ %22, %21 ], [ undef, %12 ]
%15 = phi i32 [ %17, %21 ], [ 0, %12 ]
br label %16
16: ; preds = %13, %19
%17 = phi i32 [ 1, %19 ], [ %15, %13 ]
%18 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
switch i32 %18, label %23 [
i32 -1, label %25
i32 100, label %19
i32 112, label %21
]
19: ; preds = %16
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.24, i64 0, i64 0))
br label %16
21: ; preds = %16
%22 = load i8*, i8** @optarg
br label %13
23: ; preds = %16
%24 = tail call i32 (...) @usage()
br label %162
25: ; preds = %16
%26 = xor i32 %17, 1
%27 = tail call i32* @open_timer(i8* %14, i32 %26)
%28 = icmp eq i32* %27, null
br i1 %28, label %29, label %40
29: ; preds = %25
%30 = load i32, i32* @stderr
%31 = tail call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
%32 = load i32, i32* @stderr
%33 = tail call i32 @fprintf(i32 %32, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%34 = load i32, i32* @stderr
%35 = tail call i32 @fprintf(i32 %34, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.4, i64 0, i64 0))
%36 = load i32, i32* @stderr
%37 = tail call i32 @fprintf(i32 %36, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.5, i64 0, i64 0))
%38 = load i32, i32* @stderr
%39 = tail call i32 @fprintf(i32 %38, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
br label %162
40: ; preds = %25
%41 = tail call i32 @init_timer(i32* %27)
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %49
43: ; preds = %40
%44 = load i32, i32* @stderr
%45 = tail call i32 @fprintf(i32 %44, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%46 = load i32, i32* @stderr
%47 = tail call i32 @fprintf(i32 %46, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0))
%48 = tail call i32 @close_timer(i32* %27)
br label %162
49: ; preds = %40
%50 = bitcast [4 x [4 x float]]* %4 to float**
%51 = call i32 @memset(float** %50, i32 0, i32 48)
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%53 = getelementptr inbounds [10 x i8*], [10 x i8*]* %5, i64 0, i64 0
%54 = load i32, i32* @stdin
%55 = call i32 @fgets(i8** %53, i32 10, i32 %54)
%56 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 0
%57 = icmp sgt i32 %41, 0
%58 = zext i32 %41 to i64
%59 = zext i32 %41 to i64
%60 = add nsw i64 %58, -1
%61 = and i64 %58, 3
%62 = icmp ult i64 %60, 3
%63 = and i64 %58, 4294967292
%64 = icmp eq i64 %61, 0
br label %65
65: ; preds = %157, %49
%66 = phi i32* [ %27, %49 ], [ %148, %157 ]
%67 = phi i32 [ 0, %49 ], [ %139, %157 ]
%68 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.18, i64 0, i64 0))
%69 = call i32 @get_times(i32* %66, i32 %41, float* %56, i32 %17)
%70 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.19, i64 0, i64 0))
%71 = icmp sgt i32 %69, 0
br i1 %71, label %72, label %138
72: ; preds = %65
%73 = call i32 @display_winner(i32 %69)
%74 = call i32 @putchar(i32 10)
%75 = call i32 @display_times(i32 %41, float* %56)
br i1 %57, label %76, label %110
76: ; preds = %72
%77 = sext i32 %67 to i64
br i1 %62, label %99, label %78
78: ; preds = %76, %78
%79 = phi i64 [ %96, %78 ], [ 0, %76 ]
%80 = phi i64 [ %97, %78 ], [ 0, %76 ]
%81 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 %79
%82 = load float, float* %81
%83 = getelementptr inbounds [4 x [4 x float]], [4 x [4 x float]]* %4, i64 0, i64 %79, i64 %77
store float %82, float* %83
%84 = or i64 %79, 1
%85 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 %84
%86 = load float, float* %85
%87 = getelementptr inbounds [4 x [4 x float]], [4 x [4 x float]]* %4, i64 0, i64 %84, i64 %77
store float %86, float* %87
%88 = or i64 %79, 2
%89 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 %88
%90 = load float, float* %89
%91 = getelementptr inbounds [4 x [4 x float]], [4 x [4 x float]]* %4, i64 0, i64 %88, i64 %77
store float %90, float* %91
%92 = or i64 %79, 3
%93 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 %92
%94 = load float, float* %93
%95 = getelementptr inbounds [4 x [4 x float]], [4 x [4 x float]]* %4, i64 0, i64 %92, i64 %77
store float %94, float* %95
%96 = add nuw nsw i64 %79, 4
%97 = add i64 %80, 4
%98 = icmp eq i64 %97, %63
br i1 %98, label %99, label %78
99: ; preds = %78, %76
%100 = phi i64 [ 0, %76 ], [ %96, %78 ]
br i1 %64, label %110, label %101
101: ; preds = %99, %101
%102 = phi i64 [ %107, %101 ], [ %100, %99 ]
%103 = phi i64 [ %108, %101 ], [ 0, %99 ]
%104 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 %102
%105 = load float, float* %104
%106 = getelementptr inbounds [4 x [4 x float]], [4 x [4 x float]]* %4, i64 0, i64 %102, i64 %77
store float %105, float* %106
%107 = add nuw nsw i64 %102, 1
%108 = add i64 %103, 1
%109 = icmp eq i64 %108, %61
br i1 %109, label %110, label %101
110: ; preds = %99, %101, %72
%111 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.23, i64 0, i64 0))
%112 = add nsw i32 %67, -1
%113 = icmp slt i32 %67, 1
%114 = select i1 %113, i32 3, i32 %112
%115 = icmp eq i32 %114, %67
br i1 %115, label %134, label %116
116: ; preds = %110, %128
%117 = phi i32 [ %132, %128 ], [ %114, %110 ]
br i1 %57, label %118, label %128
118: ; preds = %116
%119 = sext i32 %117 to i64
br label %120
120: ; preds = %118, %120
%121 = phi i64 [ 0, %118 ], [ %126, %120 ]
%122 = getelementptr inbounds [4 x [4 x float]], [4 x [4 x float]]* %4, i64 0, i64 %121, i64 %119
%123 = load float, float* %122
%124 = fpext float %123 to double
%125 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), double %124)
%126 = add nuw nsw i64 %121, 1
%127 = icmp eq i64 %126, %59
br i1 %127, label %128, label %120
128: ; preds = %120, %116
%129 = call i32 @putchar(i32 10)
%130 = add nsw i32 %117, -1
%131 = icmp slt i32 %117, 1
%132 = select i1 %131, i32 3, i32 %130
%133 = icmp eq i32 %132, %67
br i1 %133, label %134, label %116
134: ; preds = %128, %110
%135 = add nsw i32 %67, 1
%136 = icmp eq i32 %135, 4
%137 = select i1 %136, i32 0, i32 %135
br label %138
138: ; preds = %134, %65
%139 = phi i32 [ %137, %134 ], [ %67, %65 ]
%140 = icmp eq i32 %69, 0
br i1 %140, label %141, label %143
141: ; preds = %138
%142 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.22, i64 0, i64 0))
br label %147
143: ; preds = %138
%144 = icmp slt i32 %69, 0
br i1 %144, label %145, label %147
145: ; preds = %143
%146 = call i32* @reinit_timer(i32* %66, i8* %14, i32 %26, i32 %41)
br label %147
147: ; preds = %141, %145, %143
%148 = phi i32* [ %146, %145 ], [ %66, %143 ], [ %66, %141 ]
%149 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.20, i64 0, i64 0))
%150 = load i32, i32* @stdin
%151 = call i32 @fgets(i8** %53, i32 10, i32 %150)
%152 = call i64 @strchr(i8** %53, i8 signext 120)
%153 = icmp eq i64 %152, 0
br i1 %153, label %154, label %159
154: ; preds = %147
%155 = call i64 @strchr(i8** %53, i8 signext 88)
%156 = icmp eq i64 %155, 0
br i1 %156, label %157, label %159
157: ; preds = %154
%158 = call i32 @rearm_timer(i32* %148, i32 %17)
br label %65
159: ; preds = %147, %154
%160 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.21, i64 0, i64 0))
%161 = call i32 @close_timer(i32* %148)
br label %162
162: ; preds = %159, %43, %29, %23, %10
%163 = phi i32 [ 0, %10 ], [ 1, %23 ], [ 0, %159 ], [ 1, %43 ], [ 1, %29 ]
ret i32 %163
}