#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*/ closeCommIEEE();
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ getDataPoints2034(float *, float *, int);
int /*<<< orphan*/ identify2034();
int /*<<< orphan*/ init2034(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ setBoardGPIB(int);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdout;
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  int primaryAddress = 3;
  int secondaryAddress = 0;
  int i = 0;
  float internalRes = 0.0;
  float externalRes = 1000.0;
  int navg = 20;
  char *fileName = NULL;
  printf("\nRecord data from a B&K 2034 via GPIB\n\n");
  printf("Davide Bucci, 2015\n\n");
  if (argc > 1) {
    for (i = 1; i < argc; ++i) {
      if (strcmp(argv[i], "-h") == 0) {
        printf("This software communicates with a Bruel&Kjaer 2034 double "
               "channel FFT\n"
               "spectrum analyzer and records what it is shown on the upper "
               "display.\n"
               "No processing is done on the data.\n"
               "\n"
               "\n"
               "The following options are available:\n"
               "\n"
               "   -h     Show this help\n"
               "\n"
               "   -b     Change the board interface index "
               "(GPIB0=0,GPIB1=1,etc.)\n"
               "\n"
               "   -p     Change the primary address of the BK 2034.\n"
               "\n"
               "   -s     Change the secondary address of the BK 2034.\n"
               "\n"
               "   -o     Write on a file the results.\n"
               "\n\n");
        return 0;
      } else if (strcmp(argv[i], "-b") == 0) {
        if (argc > i + 1) {
          int wbi;
          sscanf(argv[++i], "%d", &wbi);
          if (wbi < 0 || wbi > 31) {
            fprintf(stderr, "Invalid board index (%d).\n", wbi);
          } else {
            setBoardGPIB(wbi);
          }
        } else {
          fprintf(stderr, "-b requires the board index.\n");
        }
      } else if (strcmp(argv[i], "-p") == 0) {
        if (argc > i + 1) {
          int wpa;
          sscanf(argv[++i], "%d", &wpa);
          if (wpa < 0 || wpa > 31) {
            fprintf(stderr, "Invalid address (%d).\n", wpa);
          } else {
            primaryAddress = wpa;
          }
        } else {
          fprintf(stderr, "-p requires the address.\n");
        }
      } else if (strcmp(argv[i], "-s") == 0) {
        if (argc > i + 1) {
          int wsa;
          sscanf(argv[++i], "%d", &wsa);
          if (wsa < 0 || wsa > 31) {
            fprintf(stderr, "Invalid address (%d).\n", wsa);
          } else {
            secondaryAddress = wsa;
          }
        } else {
          fprintf(stderr, "-s requires the address.\n");
        }
      } else if (strcmp(argv[i], "-o") == 0) {
        if (argc > i + 1) {
          fileName = argv[++i];
        } else {
          fprintf(stderr, "-o requires the file name.\n");
        }
      }
    }
  }
  printf("Configuration settings:\n");
  printf("Primary address: %d, secondary: %d \n", primaryAddress,
         secondaryAddress);
  init2034(0, primaryAddress, secondaryAddress);
  identify2034();
  int npoints = 801;
  float points[npoints];
  float freqpoints[npoints];
  printf("Reading data\n");
  getDataPoints2034(freqpoints, points, npoints);
  FILE *fout = NULL;
  if (fileName != NULL) {
    fout = fopen(fileName, "w");
    if (fout == NULL) {
      fprintf(stderr, "Could not open the output file.\n");
      return 1;
    }
    fprintf(fout, "#freq/Hz read\n");
  } else {
    fout = stdout;
  }
  for (i = 0; i < npoints; ++i) {
    fprintf(fout, "%f %f\n", freqpoints[i], points[i]);
  }
  closeCommIEEE();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xe22(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movl   $0x14,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
lea    0xe0b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe25(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x1,-0x8(%rbp)
jle    151b <main+0x37b>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1516 <main+0x376>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe03(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    1267 <main+0xc7>
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    16b9 <main+0x519>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xf95(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    131c <main+0x17c>
mov    -0x8(%rbp),%eax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jle    12ff <main+0x15f>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xf5d(%rip),%rsi
lea    -0x34(%rbp),%rdx
call   1090 <sscanf@plt>
cmpl   $0x0,-0x34(%rbp)
jl     12d2 <main+0x132>
cmpl   $0x1f,-0x34(%rbp)
jle    12f2 <main+0x152>
mov    0x2d07(%rip),%rax
movslq (%rax),%rdi
mov    -0x34(%rbp),%edx
lea    0xf2f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    12fa <main+0x15a>
mov    -0x34(%rbp),%edi
call   1080 <setBoardGPIB@plt>
jmp    1317 <main+0x177>
mov    0x2cda(%rip),%rax
movslq (%rax),%rdi
lea    0xf20(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14fe <main+0x35e>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xf1f(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    13cf <main+0x22f>
mov    -0x8(%rbp),%eax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jle    13b2 <main+0x212>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xea8(%rip),%rsi
lea    -0x38(%rbp),%rdx
call   1090 <sscanf@plt>
cmpl   $0x0,-0x38(%rbp)
jl     1387 <main+0x1e7>
cmpl   $0x1f,-0x38(%rbp)
jle    13a7 <main+0x207>
mov    0x2c52(%rip),%rax
movslq (%rax),%rdi
mov    -0x38(%rbp),%edx
lea    0xeb6(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    13ad <main+0x20d>
mov    -0x38(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    13ca <main+0x22a>
mov    0x2c27(%rip),%rax
movslq (%rax),%rdi
lea    0xea5(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14f9 <main+0x359>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xea0(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    1482 <main+0x2e2>
mov    -0x8(%rbp),%eax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jle    1465 <main+0x2c5>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdf5(%rip),%rsi
lea    -0x3c(%rbp),%rdx
call   1090 <sscanf@plt>
cmpl   $0x0,-0x3c(%rbp)
jl     143a <main+0x29a>
cmpl   $0x1f,-0x3c(%rbp)
jle    145a <main+0x2ba>
mov    0x2b9f(%rip),%rax
movslq (%rax),%rdi
mov    -0x3c(%rbp),%edx
lea    0xe03(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1460 <main+0x2c0>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    147d <main+0x2dd>
mov    0x2b74(%rip),%rax
movslq (%rax),%rdi
lea    0xe0f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14f4 <main+0x354>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe0a(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    14ef <main+0x34f>
mov    -0x8(%rbp),%eax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jle    14d2 <main+0x332>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x30(%rbp)
jmp    14ea <main+0x34a>
mov    0x2b07(%rip),%rax
movslq (%rax),%rdi
lea    0xdbf(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14ef <main+0x34f>
jmp    14f4 <main+0x354>
jmp    14f9 <main+0x359>
jmp    14fe <main+0x35e>
jmp    1503 <main+0x363>
jmp    1508 <main+0x368>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    121f <main+0x7f>
jmp    151b <main+0x37b>
lea    0xd9c(%rip),%rdi
xor    %eax,%eax
mov    %eax,-0x80(%rbp)
mov    %al,-0x79(%rbp)
call   1040 <printf@plt>
mov    -0x79(%rbp),%al
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xd98(%rip),%rdi
call   1040 <printf@plt>
mov    -0x80(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1030 <init2034@plt>
mov    -0x79(%rbp),%al
call   10a0 <identify2034@plt>
movl   $0x321,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x48(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x70(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x78(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x58(%rbp)
lea    0xd4d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x78(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    -0x40(%rbp),%edx
call   10b0 <getDataPoints2034@plt>
movq   $0x0,-0x60(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     163a <main+0x49a>
mov    -0x30(%rbp),%rdi
lea    0xd26(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x60(%rbp)
cmpq   $0x0,-0x60(%rbp)
jne    1623 <main+0x483>
mov    0x29e1(%rip),%rax
movslq (%rax),%rdi
lea    0xd03(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    16b2 <main+0x512>
mov    -0x60(%rbp),%rdi
lea    0xcff(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1648 <main+0x4a8>
mov    0x2997(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    169d <main+0x4fd>
mov    -0x70(%rbp),%rax
mov    -0x78(%rbp),%rcx
mov    -0x60(%rbp),%rdi
movslq -0x1c(%rbp),%rdx
movss  (%rcx,%rdx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movslq -0x1c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xcb4(%rip),%rsi
mov    $0x2,%al
call   1070 <fprintf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    164f <main+0x4af>
mov    $0x0,%al
call   1050 <closeCommIEEE@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
mov    %edi,%r12d
lea    0xf32(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4d(%rip),%rdi
call   1030 <puts@plt>
cmp    $0x2,%r12d
jl     142d <main+0x26d>
mov    $0x1,%r13d
movl   $0x3,-0x38(%rbp)
movl   $0x0,-0x2c(%rbp)
xor    %eax,%eax
mov    %rax,-0x40(%rbp)
jmp    1248 <main+0x88>
mov    0x2dc4(%rip),%rax
movslq (%rax),%rcx
mov    $0x1d,%esi
mov    $0x1,%edx
lea    0xdf4(%rip),%rdi
call   10e0 <fwrite@plt>
mov    %r13d,%r15d
add    $0x1,%r15d
mov    %r15d,%r13d
cmp    %r12d,%r15d
jge    1441 <main+0x281>
movslq %r13d,%rbx
mov    (%r14,%rbx,8),%rdi
lea    0xdaa(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     154d <main+0x38d>
mov    (%r14,%rbx,8),%rdi
lea    0xd94(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     12f0 <main+0x130>
mov    (%r14,%rbx,8),%rdi
lea    0xdbe(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1340 <main+0x180>
mov    (%r14,%rbx,8),%rdi
lea    0xdd9(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1370 <main+0x1b0>
mov    (%r14,%rbx,8),%rdi
lea    0xddd(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    1235 <main+0x75>
lea    0x1(%r13),%r15d
cmp    %r12d,%r15d
jge    1405 <main+0x245>
movslq %r15d,%rax
mov    (%r14,%rax,8),%rax
mov    %rax,-0x40(%rbp)
jmp    1238 <main+0x78>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0x1(%r13),%r15d
cmp    %r12d,%r15d
jge    1215 <main+0x55>
movslq %r15d,%rax
mov    (%r14,%rax,8),%rdi
lea    0xcfb(%rip),%rsi
lea    -0x4c(%rbp),%rdx
call   10a0 <sscanf@plt>
mov    -0x4c(%rbp),%edx
cmp    $0x20,%edx
jb     13d9 <main+0x219>
mov    0x2cb9(%rip),%rax
movslq (%rax),%rdi
lea    0xcd8(%rip),%rsi
jmp    13ad <main+0x1ed>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x1(%r13),%r15d
cmp    %r12d,%r15d
jge    13b9 <main+0x1f9>
movslq %r15d,%rax
mov    (%r14,%rax,8),%rdi
lea    0xcaf(%rip),%rsi
lea    -0x48(%rbp),%rdx
call   10a0 <sscanf@plt>
mov    -0x48(%rbp),%edx
cmp    $0x20,%edx
jae    139c <main+0x1dc>
mov    %edx,-0x38(%rbp)
jmp    1238 <main+0x78>
lea    0x1(%r13),%r15d
cmp    %r12d,%r15d
jge    13e5 <main+0x225>
movslq %r15d,%rax
mov    (%r14,%rax,8),%rdi
lea    0xc7f(%rip),%rsi
lea    -0x44(%rbp),%rdx
call   10a0 <sscanf@plt>
mov    -0x44(%rbp),%edx
cmp    $0x20,%edx
jb     1425 <main+0x265>
mov    0x2c3d(%rip),%rax
movslq (%rax),%rdi
lea    0xc98(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    1238 <main+0x78>
mov    0x2c20(%rip),%rax
movslq (%rax),%rcx
mov    $0x19,%esi
mov    $0x1,%edx
lea    0xc88(%rip),%rdi
jmp    1230 <main+0x70>
mov    %edx,%edi
call   1090 <setBoardGPIB@plt>
jmp    1238 <main+0x78>
mov    0x2bf4(%rip),%rax
movslq (%rax),%rcx
mov    $0x19,%esi
mov    $0x1,%edx
lea    0xc79(%rip),%rdi
jmp    1230 <main+0x70>
mov    0x2bd4(%rip),%rax
movslq (%rax),%rcx
mov    $0x1b,%esi
mov    $0x1,%edx
lea    0xc76(%rip),%rdi
jmp    1230 <main+0x70>
mov    %edx,-0x2c(%rbp)
jmp    1238 <main+0x78>
movl   $0x3,-0x38(%rbp)
xor    %eax,%eax
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x2c(%rbp)
lea    0xd03(%rip),%rdi
call   1030 <puts@plt>
lea    0xc5e(%rip),%rdi
mov    -0x38(%rbp),%ebx
mov    %ebx,%esi
mov    -0x2c(%rbp),%r14d
mov    %r14d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
mov    %ebx,%esi
mov    %r14d,%edx
call   1040 <init2034@plt>
xor    %eax,%eax
call   10b0 <identify2034@plt>
mov    %rsp,%r12
mov    %rsp,%r14
add    $0xfffffffffffff370,%r14
mov    %r14,%rsp
mov    %rsp,%r15
add    $0xfffffffffffff370,%r15
mov    %r15,%rsp
lea    0xcc5(%rip),%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x321,%edx
call   10c0 <getDataPoints2034@plt>
mov    -0x40(%rbp),%rdi
test   %rdi,%rdi
je     14f3 <main+0x333>
lea    0xc14(%rip),%rsi
call   10d0 <fopen@plt>
test   %rax,%rax
je     155d <main+0x39d>
mov    %rax,%rbx
mov    %r12,-0x38(%rbp)
lea    0xc1b(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   10e0 <fwrite@plt>
jmp    1501 <main+0x341>
mov    %r12,-0x38(%rbp)
mov    0x2ada(%rip),%rax
mov    (%rax),%rbx
xor    %r13d,%r13d
lea    0xbfe(%rip),%r12
nopl   0x0(%rax,%rax,1)
movss  (%r15,%r13,4),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%r14,%r13,4),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x2,%al
call   1080 <fprintf@plt>
add    $0x1,%r13
cmp    $0x321,%r13
jne    1510 <main+0x350>
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <closeCommIEEE@plt>
mov    -0x38(%rbp),%r12
jmp    1582 <main+0x3c2>
lea    0xc1c(%rip),%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
jmp    1585 <main+0x3c5>
mov    0x2a7c(%rip),%rax
movslq (%rax),%rcx
lea    0xb6b(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
call   10e0 <fwrite@plt>
mov    $0x1,%ebx
mov    %r12,%rsp
mov    %ebx,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [40 x i8] c"\0ARecord data from a B&K 2034 via GPIB\0A\0A\00"
@.str.1 = [21 x i8] c"Davide Bucci, 2015\0A\0A\00"
@.str.2 = [3 x i8] c"-h\00"
@.str.3 = [459 x i8] c"This software communicates with a Bruel&Kjaer 2034 double channel FFT\0Aspectrum analyzer and records what it is shown on the upper display.\0ANo processing is done on the data.\0A\0A\0AThe following options are available:\0A\0A -h Show this help\0A\0A -b Change the board interface index (GPIB0=0,GPIB1=1,etc.)\0A\0A -p Change the primary address of the BK 2034.\0A\0A -s Change the secondary address of the BK 2034.\0A\0A -o Write on a file the results.\0A\0A\0A\00"
@.str.4 = [3 x i8] c"-b\00"
@.str.5 = [3 x i8] c"%d\00"
@stderr = global i32 0
@.str.6 = [27 x i8] c"Invalid board index (%d).\0A\00"
@.str.7 = [30 x i8] c"-b requires the board index.\0A\00"
@.str.8 = [3 x i8] c"-p\00"
@.str.9 = [23 x i8] c"Invalid address (%d).\0A\00"
@.str.10 = [26 x i8] c"-p requires the address.\0A\00"
@.str.11 = [3 x i8] c"-s\00"
@.str.12 = [26 x i8] c"-s requires the address.\0A\00"
@.str.13 = [3 x i8] c"-o\00"
@.str.14 = [28 x i8] c"-o requires the file name.\0A\00"
@.str.15 = [25 x i8] c"Configuration settings:\0A\00"
@.str.16 = [37 x i8] c"Primary address: %d, secondary: %d \0A\00"
@.str.17 = [14 x i8] c"Reading data\0A\00"
@.str.18 = [2 x i8] c"w\00"
@.str.19 = [33 x i8] c"Could not open the output file.\0A\00"
@.str.20 = [15 x i8] c"#freq/Hz read\0A\00"
@stdout = global i32* null
@.str.21 = [7 x i8] c"%f %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca float
%10 = alloca float
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i64
%19 = alloca i64
%20 = alloca i32*
%21 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 3, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store float 0.000000e+00, float* %9
store float 1.000000e+03, float* %10
store i32 20, i32* %11
store i8* null, i8** %12
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%24 = load i32, i32* %4
%25 = icmp sgt i32 %24, 1
br i1 %25, label %26, label %200
26: ; preds = %2
store i32 1, i32* %8
br label %27
27: ; preds = %196, %26
%28 = load i32, i32* %8
%29 = load i32, i32* %4
%30 = icmp slt i32 %28, %29
br i1 %30, label %31, label %199
31: ; preds = %27
%32 = load i8**, i8*** %5
%33 = load i32, i32* %8
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8*, i8** %32, i64 %34
%36 = load i8*, i8** %35
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %31
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([459 x i8], [459 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %3
br label %261
41: ; preds = %31
%42 = load i8**, i8*** %5
%43 = load i32, i32* %8
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8*, i8** %42, i64 %44
%46 = load i8*, i8** %45
%47 = call i64 @strcmp(i8* %46, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %83
49: ; preds = %41
%50 = load i32, i32* %4
%51 = load i32, i32* %8
%52 = add nsw i32 %51, 1
%53 = icmp sgt i32 %50, %52
br i1 %53, label %54, label %77
54: ; preds = %49
%55 = load i8**, i8*** %5
%56 = load i32, i32* %8
%57 = add nsw i32 %56, 1
store i32 %57, i32* %8
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8*, i8** %55, i64 %58
%60 = load i8*, i8** %59
%61 = call i32 @sscanf(i8* %60, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %13)
%62 = load i32, i32* %13
%63 = icmp slt i32 %62, 0
br i1 %63, label %67, label %64
64: ; preds = %54
%65 = load i32, i32* %13
%66 = icmp sgt i32 %65, 31
br i1 %66, label %67, label %73
67: ; preds = %64, %54
%68 = load i32, i32* @stderr
%69 = sext i32 %68 to i64
%70 = inttoptr i64 %69 to i32*
%71 = load i32, i32* %13
%72 = call i32 (i32*, i8*, ...) @fprintf(i32* %70, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i32 %71)
br label %76
73: ; preds = %64
%74 = load i32, i32* %13
%75 = call i32 @setBoardGPIB(i32 %74)
br label %76
76: ; preds = %73, %67
br label %82
77: ; preds = %49
%78 = load i32, i32* @stderr
%79 = sext i32 %78 to i64
%80 = inttoptr i64 %79 to i32*
%81 = call i32 (i32*, i8*, ...) @fprintf(i32* %80, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
br label %82
82: ; preds = %77, %76
br label %194
83: ; preds = %41
%84 = load i8**, i8*** %5
%85 = load i32, i32* %8
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i8*, i8** %84, i64 %86
%88 = load i8*, i8** %87
%89 = call i64 @strcmp(i8* %88, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%90 = icmp eq i64 %89, 0
br i1 %90, label %91, label %124
91: ; preds = %83
%92 = load i32, i32* %4
%93 = load i32, i32* %8
%94 = add nsw i32 %93, 1
%95 = icmp sgt i32 %92, %94
br i1 %95, label %96, label %118
96: ; preds = %91
%97 = load i8**, i8*** %5
%98 = load i32, i32* %8
%99 = add nsw i32 %98, 1
store i32 %99, i32* %8
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i8*, i8** %97, i64 %100
%102 = load i8*, i8** %101
%103 = call i32 @sscanf(i8* %102, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %14)
%104 = load i32, i32* %14
%105 = icmp slt i32 %104, 0
br i1 %105, label %109, label %106
106: ; preds = %96
%107 = load i32, i32* %14
%108 = icmp sgt i32 %107, 31
br i1 %108, label %109, label %115
109: ; preds = %106, %96
%110 = load i32, i32* @stderr
%111 = sext i32 %110 to i64
%112 = inttoptr i64 %111 to i32*
%113 = load i32, i32* %14
%114 = call i32 (i32*, i8*, ...) @fprintf(i32* %112, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), i32 %113)
br label %117
115: ; preds = %106
%116 = load i32, i32* %14
store i32 %116, i32* %6
br label %117
117: ; preds = %115, %109
br label %123
118: ; preds = %91
%119 = load i32, i32* @stderr
%120 = sext i32 %119 to i64
%121 = inttoptr i64 %120 to i32*
%122 = call i32 (i32*, i8*, ...) @fprintf(i32* %121, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0))
br label %123
123: ; preds = %118, %117
br label %193
124: ; preds = %83
%125 = load i8**, i8*** %5
%126 = load i32, i32* %8
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds i8*, i8** %125, i64 %127
%129 = load i8*, i8** %128
%130 = call i64 @strcmp(i8* %129, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%131 = icmp eq i64 %130, 0
br i1 %131, label %132, label %165
132: ; preds = %124
%133 = load i32, i32* %4
%134 = load i32, i32* %8
%135 = add nsw i32 %134, 1
%136 = icmp sgt i32 %133, %135
br i1 %136, label %137, label %159
137: ; preds = %132
%138 = load i8**, i8*** %5
%139 = load i32, i32* %8
%140 = add nsw i32 %139, 1
store i32 %140, i32* %8
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds i8*, i8** %138, i64 %141
%143 = load i8*, i8** %142
%144 = call i32 @sscanf(i8* %143, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %15)
%145 = load i32, i32* %15
%146 = icmp slt i32 %145, 0
br i1 %146, label %150, label %147
147: ; preds = %137
%148 = load i32, i32* %15
%149 = icmp sgt i32 %148, 31
br i1 %149, label %150, label %156
150: ; preds = %147, %137
%151 = load i32, i32* @stderr
%152 = sext i32 %151 to i64
%153 = inttoptr i64 %152 to i32*
%154 = load i32, i32* %15
%155 = call i32 (i32*, i8*, ...) @fprintf(i32* %153, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), i32 %154)
br label %158
156: ; preds = %147
%157 = load i32, i32* %15
store i32 %157, i32* %7
br label %158
158: ; preds = %156, %150
br label %164
159: ; preds = %132
%160 = load i32, i32* @stderr
%161 = sext i32 %160 to i64
%162 = inttoptr i64 %161 to i32*
%163 = call i32 (i32*, i8*, ...) @fprintf(i32* %162, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0))
br label %164
164: ; preds = %159, %158
br label %192
165: ; preds = %124
%166 = load i8**, i8*** %5
%167 = load i32, i32* %8
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds i8*, i8** %166, i64 %168
%170 = load i8*, i8** %169
%171 = call i64 @strcmp(i8* %170, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%172 = icmp eq i64 %171, 0
br i1 %172, label %173, label %191
173: ; preds = %165
%174 = load i32, i32* %4
%175 = load i32, i32* %8
%176 = add nsw i32 %175, 1
%177 = icmp sgt i32 %174, %176
br i1 %177, label %178, label %185
178: ; preds = %173
%179 = load i8**, i8*** %5
%180 = load i32, i32* %8
%181 = add nsw i32 %180, 1
store i32 %181, i32* %8
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds i8*, i8** %179, i64 %182
%184 = load i8*, i8** %183
store i8* %184, i8** %12
br label %190
185: ; preds = %173
%186 = load i32, i32* @stderr
%187 = sext i32 %186 to i64
%188 = inttoptr i64 %187 to i32*
%189 = call i32 (i32*, i8*, ...) @fprintf(i32* %188, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0))
br label %190
190: ; preds = %185, %178
br label %191
191: ; preds = %190, %165
br label %192
192: ; preds = %191, %164
br label %193
193: ; preds = %192, %123
br label %194
194: ; preds = %193, %82
br label %195
195: ; preds = %194
br label %196
196: ; preds = %195
%197 = load i32, i32* %8
%198 = add nsw i32 %197, 1
store i32 %198, i32* %8
br label %27
199: ; preds = %27
br label %200
200: ; preds = %199, %2
%201 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0))
%202 = load i32, i32* %6
%203 = load i32, i32* %7
%204 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.16, i64 0, i64 0), i32 %202, i32 %203)
%205 = load i32, i32* %6
%206 = load i32, i32* %7
%207 = call i32 @init2034(i32 0, i32 %205, i32 %206)
%208 = call i32 (...) @identify2034()
store i32 801, i32* %16
%209 = load i32, i32* %16
%210 = zext i32 %209 to i64
%211 = call i8* @llvm.stacksave()
store i8* %211, i8** %17
%212 = alloca float, i64 %210
store i64 %210, i64* %18
%213 = load i32, i32* %16
%214 = zext i32 %213 to i64
%215 = alloca float, i64 %214
store i64 %214, i64* %19
%216 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0))
%217 = load i32, i32* %16
%218 = call i32 @getDataPoints2034(float* %215, float* %212, i32 %217)
store i32* null, i32** %20
%219 = load i8*, i8** %12
%220 = icmp ne i8* %219, null
br i1 %220, label %221, label %234
221: ; preds = %200
%222 = load i8*, i8** %12
%223 = call i32* @fopen(i8* %222, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0))
store i32* %223, i32** %20
%224 = load i32*, i32** %20
%225 = icmp eq i32* %224, null
br i1 %225, label %226, label %231
226: ; preds = %221
%227 = load i32, i32* @stderr
%228 = sext i32 %227 to i64
%229 = inttoptr i64 %228 to i32*
%230 = call i32 (i32*, i8*, ...) @fprintf(i32* %229, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.19, i64 0, i64 0))
store i32 1, i32* %3
store i32 1, i32* %21
br label %259
231: ; preds = %221
%232 = load i32*, i32** %20
%233 = call i32 (i32*, i8*, ...) @fprintf(i32* %232, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.20, i64 0, i64 0))
br label %236
234: ; preds = %200
%235 = load i32*, i32** @stdout
store i32* %235, i32** %20
br label %236
236: ; preds = %234, %231
store i32 0, i32* %8
br label %237
237: ; preds = %254, %236
%238 = load i32, i32* %8
%239 = load i32, i32* %16
%240 = icmp slt i32 %238, %239
br i1 %240, label %241, label %257
241: ; preds = %237
%242 = load i32*, i32** %20
%243 = load i32, i32* %8
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds float, float* %215, i64 %244
%246 = load float, float* %245
%247 = fpext float %246 to double
%248 = load i32, i32* %8
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds float, float* %212, i64 %249
%251 = load float, float* %250
%252 = fpext float %251 to double
%253 = call i32 (i32*, i8*, ...) @fprintf(i32* %242, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i64 0, i64 0), double %247, double %252)
br label %254
254: ; preds = %241
%255 = load i32, i32* %8
%256 = add nsw i32 %255, 1
store i32 %256, i32* %8
br label %237
257: ; preds = %237
%258 = call i32 (...) @closeCommIEEE()
store i32 0, i32* %3
store i32 1, i32* %21
br label %259
259: ; preds = %257, %226
%260 = load i8*, i8** %17
br label %261
261: ; preds = %259, %39
%262 = load i32, i32* %3
ret i32 %262
}

LLVM IR (-O2):
@.str.2 = [3 x i8] c"-h\00"
@.str.4 = [3 x i8] c"-b\00"
@.str.5 = [3 x i8] c"%d\00"
@stderr = global i32 0
@.str.6 = [27 x i8] c"Invalid board index (%d).\0A\00"
@.str.7 = [30 x i8] c"-b requires the board index.\0A\00"
@.str.8 = [3 x i8] c"-p\00"
@.str.9 = [23 x i8] c"Invalid address (%d).\0A\00"
@.str.10 = [26 x i8] c"-p requires the address.\0A\00"
@.str.11 = [3 x i8] c"-s\00"
@.str.12 = [26 x i8] c"-s requires the address.\0A\00"
@.str.13 = [3 x i8] c"-o\00"
@.str.14 = [28 x i8] c"-o requires the file name.\0A\00"
@.str.16 = [37 x i8] c"Primary address: %d, secondary: %d \0A\00"
@.str.18 = [2 x i8] c"w\00"
@.str.19 = [33 x i8] c"Could not open the output file.\0A\00"
@.str.20 = [15 x i8] c"#freq/Hz read\0A\00"
@stdout = global i32* null
@.str.21 = [7 x i8] c"%f %f\0A\00"
@str = [39 x i8] c"\0ARecord data from a B&K 2034 via GPIB\0A\00"
@str.22 = [20 x i8] c"Davide Bucci, 2015\0A\00"
@str.23 = [24 x i8] c"Configuration settings:\00"
@str.24 = [13 x i8] c"Reading data\00"
@str.25 = [458 x i8] c"This software communicates with a Bruel&Kjaer 2034 double channel FFT\0Aspectrum analyzer and records what it is shown on the upper display.\0ANo processing is done on the data.\0A\0A\0AThe following options are available:\0A\0A -h Show this help\0A\0A -b Change the board interface index (GPIB0=0,GPIB1=1,etc.)\0A\0A -p Change the primary address of the BK 2034.\0A\0A -s Change the secondary address of the BK 2034.\0A\0A -o Write on a file the results.\0A\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.22, i64 0, i64 0))
%8 = icmp sgt i32 %0, 1
br i1 %8, label %9, label %127
9: ; preds = %2
%10 = bitcast i32* %5 to i8*
%11 = bitcast i32* %4 to i8*
%12 = bitcast i32* %3 to i8*
br label %13
13: ; preds = %9, %120
%14 = phi i32 [ 3, %9 ], [ %124, %120 ]
%15 = phi i32 [ 0, %9 ], [ %123, %120 ]
%16 = phi i32 [ 1, %9 ], [ %125, %120 ]
%17 = phi i8* [ null, %9 ], [ %121, %120 ]
%18 = sext i32 %16 to i64
%19 = getelementptr inbounds i8*, i8** %1, i64 %18
%20 = load i8*, i8** %19
%21 = call i64 @strcmp(i8* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %13
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([458 x i8], [458 x i8]* @str.25, i64 0, i64 0))
br label %172
25: ; preds = %13
%26 = load i8*, i8** %19
%27 = call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %52
29: ; preds = %25
%30 = add nsw i32 %16, 1
%31 = icmp slt i32 %30, %0
br i1 %31, label %32, label %47
32: ; preds = %29
%33 = sext i32 %30 to i64
%34 = getelementptr inbounds i8*, i8** %1, i64 %33
%35 = load i8*, i8** %34
%36 = call i32 @sscanf(i8* %35, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %3)
%37 = load i32, i32* %3
%38 = icmp ugt i32 %37, 31
br i1 %38, label %39, label %44
39: ; preds = %32
%40 = load i32, i32* @stderr
%41 = sext i32 %40 to i64
%42 = inttoptr i64 %41 to i32*
%43 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i32 %37)
br label %46
44: ; preds = %32
%45 = call i32 @setBoardGPIB(i32 %37)
br label %46
46: ; preds = %44, %39
br label %120
47: ; preds = %29
%48 = load i32, i32* @stderr
%49 = sext i32 %48 to i64
%50 = inttoptr i64 %49 to i32*
%51 = call i64 @fwrite(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i64 29, i64 1, i32* %50)
br label %120
52: ; preds = %25
%53 = load i8*, i8** %19
%54 = call i64 @strcmp(i8* %53, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %78
56: ; preds = %52
%57 = add nsw i32 %16, 1
%58 = icmp slt i32 %57, %0
br i1 %58, label %59, label %73
59: ; preds = %56
%60 = sext i32 %57 to i64
%61 = getelementptr inbounds i8*, i8** %1, i64 %60
%62 = load i8*, i8** %61
%63 = call i32 @sscanf(i8* %62, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %4)
%64 = load i32, i32* %4
%65 = icmp ugt i32 %64, 31
br i1 %65, label %66, label %71
66: ; preds = %59
%67 = load i32, i32* @stderr
%68 = sext i32 %67 to i64
%69 = inttoptr i64 %68 to i32*
%70 = call i32 (i32*, i8*, ...) @fprintf(i32* %69, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), i32 %64)
br label %71
71: ; preds = %59, %66
%72 = phi i32 [ %14, %66 ], [ %64, %59 ]
br label %120
73: ; preds = %56
%74 = load i32, i32* @stderr
%75 = sext i32 %74 to i64
%76 = inttoptr i64 %75 to i32*
%77 = call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0), i64 25, i64 1, i32* %76)
br label %120
78: ; preds = %52
%79 = load i8*, i8** %19
%80 = call i64 @strcmp(i8* %79, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%81 = icmp eq i64 %80, 0
br i1 %81, label %82, label %104
82: ; preds = %78
%83 = add nsw i32 %16, 1
%84 = icmp slt i32 %83, %0
br i1 %84, label %85, label %99
85: ; preds = %82
%86 = sext i32 %83 to i64
%87 = getelementptr inbounds i8*, i8** %1, i64 %86
%88 = load i8*, i8** %87
%89 = call i32 @sscanf(i8* %88, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %5)
%90 = load i32, i32* %5
%91 = icmp ugt i32 %90, 31
br i1 %91, label %92, label %97
92: ; preds = %85
%93 = load i32, i32* @stderr
%94 = sext i32 %93 to i64
%95 = inttoptr i64 %94 to i32*
%96 = call i32 (i32*, i8*, ...) @fprintf(i32* %95, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), i32 %90)
br label %97
97: ; preds = %85, %92
%98 = phi i32 [ %15, %92 ], [ %90, %85 ]
br label %120
99: ; preds = %82
%100 = load i32, i32* @stderr
%101 = sext i32 %100 to i64
%102 = inttoptr i64 %101 to i32*
%103 = call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), i64 25, i64 1, i32* %102)
br label %120
104: ; preds = %78
%105 = load i8*, i8** %19
%106 = call i64 @strcmp(i8* %105, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%107 = icmp eq i64 %106, 0
br i1 %107, label %108, label %120
108: ; preds = %104
%109 = add nsw i32 %16, 1
%110 = icmp slt i32 %109, %0
br i1 %110, label %111, label %115
111: ; preds = %108
%112 = sext i32 %109 to i64
%113 = getelementptr inbounds i8*, i8** %1, i64 %112
%114 = load i8*, i8** %113
br label %120
115: ; preds = %108
%116 = load i32, i32* @stderr
%117 = sext i32 %116 to i64
%118 = inttoptr i64 %117 to i32*
%119 = call i64 @fwrite(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0), i64 27, i64 1, i32* %118)
br label %120
120: ; preds = %73, %71, %104, %115, %111, %97, %99, %46, %47
%121 = phi i8* [ %17, %46 ], [ %17, %47 ], [ %17, %71 ], [ %17, %73 ], [ %17, %97 ], [ %17, %99 ], [ %114, %111 ], [ %17, %115 ], [ %17, %104 ]
%122 = phi i32 [ %30, %46 ], [ %16, %47 ], [ %57, %71 ], [ %16, %73 ], [ %83, %97 ], [ %16, %99 ], [ %109, %111 ], [ %16, %115 ], [ %16, %104 ]
%123 = phi i32 [ %15, %46 ], [ %15, %47 ], [ %15, %71 ], [ %15, %73 ], [ %98, %97 ], [ %15, %99 ], [ %15, %111 ], [ %15, %115 ], [ %15, %104 ]
%124 = phi i32 [ %14, %46 ], [ %14, %47 ], [ %72, %71 ], [ %14, %73 ], [ %14, %97 ], [ %14, %99 ], [ %14, %111 ], [ %14, %115 ], [ %14, %104 ]
%125 = add nsw i32 %122, 1
%126 = icmp slt i32 %125, %0
br i1 %126, label %13, label %127
127: ; preds = %120, %2
%128 = phi i8* [ null, %2 ], [ %121, %120 ]
%129 = phi i32 [ 0, %2 ], [ %123, %120 ]
%130 = phi i32 [ 3, %2 ], [ %124, %120 ]
%131 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.23, i64 0, i64 0))
%132 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.16, i64 0, i64 0), i32 %130, i32 %129)
%133 = call i32 @init2034(i32 0, i32 %130, i32 %129)
%134 = call i32 (...) @identify2034()
%135 = call i8* @llvm.stacksave()
%136 = alloca [801 x float]
%137 = alloca [801 x float]
%138 = getelementptr inbounds [801 x float], [801 x float]* %137, i64 0, i64 0
%139 = getelementptr inbounds [801 x float], [801 x float]* %136, i64 0, i64 0
%140 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.24, i64 0, i64 0))
%141 = call i32 @getDataPoints2034(float* %138, float* %139, i32 801)
%142 = icmp eq i8* %128, null
br i1 %142, label %153, label %143
143: ; preds = %127
%144 = call i32* @fopen(i8* %128, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0))
%145 = icmp eq i32* %144, null
br i1 %145, label %146, label %151
146: ; preds = %143
%147 = load i32, i32* @stderr
%148 = sext i32 %147 to i64
%149 = inttoptr i64 %148 to i32*
%150 = call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.19, i64 0, i64 0), i64 32, i64 1, i32* %149)
br label %170
151: ; preds = %143
%152 = call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.20, i64 0, i64 0), i64 14, i64 1, i32* %144)
br label %155
153: ; preds = %127
%154 = load i32*, i32** @stdout
br label %155
155: ; preds = %153, %151
%156 = phi i32* [ %144, %151 ], [ %154, %153 ]
br label %157
157: ; preds = %155, %157
%158 = phi i64 [ 0, %155 ], [ %166, %157 ]
%159 = getelementptr inbounds [801 x float], [801 x float]* %137, i64 0, i64 %158
%160 = load float, float* %159
%161 = fpext float %160 to double
%162 = getelementptr inbounds [801 x float], [801 x float]* %136, i64 0, i64 %158
%163 = load float, float* %162
%164 = fpext float %163 to double
%165 = call i32 (i32*, i8*, ...) @fprintf(i32* %156, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i64 0, i64 0), double %161, double %164)
%166 = add nuw nsw i64 %158, 1
%167 = icmp eq i64 %166, 801
br i1 %167, label %168, label %157
168: ; preds = %157
%169 = call i32 (...) @closeCommIEEE()
br label %170
170: ; preds = %168, %146
%171 = phi i32 [ 1, %146 ], [ 0, %168 ]
br label %172
172: ; preds = %170, %23
%173 = phi i32 [ 0, %23 ], [ %171, %170 ]
ret i32 %173
}