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

/* Variables and functions */
double cabs(int /*<<< orphan*/);
char *char_alloc(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(void *);
scalar_t__ malloc(int);
int /*<<< orphan*/ readpoles(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                             int *);
int readzeros(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int sscanf(char *, char *, char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strncmp(char *, char *, int);
void readpzfile(char *pzfilename, int *nz, complex **zr, int *np, complex **pl,
                double *sg, int *ierror) {
  int i, j, ns, zflag = 0, pflag = 0, cflag = 0;
  char *line, *head;
  double Eps = 1.e-05, minZ, tmpZ;
  FILE *in;
  line = char_alloc(32);
  head = char_alloc(32);
  if ((in = fopen(pzfilename, "rt")) == NULL) {
    fprintf(stderr,
            "WARNING (make_resp_lookup_table): pzfile %s does not exist...\n   "
            "  ======>this channel is skipped\n",
            pzfilename);
    *ierror = 99;
    return;
  }
  while (fgets(line, 32, in) != NULL) {
    if (!strncmp(line, "ZEROS", 5)) {
      if (!zflag) {
        ns = sscanf(line, "%s%d", head, nz);
        if (ns != 2) {
          fprintf(stderr,
                  "WARNING (make_resp_lookup_table): incorrect pzfile format: "
                  "%s (rejected)\n",
                  pzfilename);
          *ierror = 99;
          return;
        }
        if ((*zr = (complex *)malloc((*nz) * sizeof(complex))) == NULL) {
          fprintf(stderr, "FATAL ERROR: Out of memory");
          exit(1);
        }
        ns = readzeros(*nz, *zr, in);
        minZ = cabs(**zr);
        j = 0;
        for (i = 0; i < *nz; i++) {
          tmpZ = cabs((*zr)[i]);
          if (tmpZ < minZ) {
            minZ = tmpZ;
            j = i;
          }
        }
        if (ns < 0 || ns > *nz || minZ > Eps) {
          fprintf(stderr,
                  "WARNING (make_resp_lookup_table): incorrect pzfile format: "
                  "%s (rejected)\n",
                  pzfilename);
          *ierror = 99;
          return;
        }
        for (i = 0; i < j; i++)
          (*zr)[i] = (*zr)[i];
        for (i = j + 1; i < *nz; i++)
          (*zr)[i - 1] = (*zr)[i];
        *nz = *nz - 1;
        zflag = 1;
      } else
        fprintf(stderr,
                "WARNING (make_resp_lookup_table): ZEROS redundancy in pzfile: "
                "%s\n",
                pzfilename);
    }
    if (!strncmp(line, "POLES", 5)) {
      if (!pflag) {
        ns = sscanf(line, "%s%d", head, np);
        if ((*pl = (complex *)malloc((*np) * sizeof(complex))) == NULL) {
          fprintf(stderr, "FATAL ERROR: Out of memory");
          exit(1);
        }
        pflag = 1;
        readpoles(*np, *pl, in, ierror);
        if (*ierror == 99) {
          fprintf(stderr,
                  "WARNING (make_resp_lookup_table): incorrect pzfile format: "
                  "%s (rejected)\n",
                  pzfilename);
          fclose(in);
          return;
        }
      } else
        fprintf(stderr,
                "WARNING (make_resp_lookup_table): POLES redundancy in pzfile "
                ": %s\n",
                pzfilename);
    }
    if (!strncmp(line, "CONSTANT", 8)) {
      if (!cflag) {
        ns = sscanf(line, "%s%lf", head, sg);
        cflag = 1;
      } else
        fprintf(stderr,
                "WARNING (make_resp_lookup_table): CONSTANT redundancy in "
                "pzfile : %s\n",
                pzfilename);
    }
  }
  if (!zflag || !pflag || !cflag) {
    fprintf(stderr,
            "WARNING (make_resp_lookup_table): Inclomplete pzfile : %s\n   "
            "======>this channel is skipped \n",
            pzfilename);
    fclose(in);
    *ierror = 99;
    return;
  }
  fclose(in);
  free((void *)line);
  free((void *)head);
}


x86 assembly (clang, -O0):
<readpzfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movsd  0xdec(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    $0x20,%edi
call   1080 <char_alloc@plt>
mov    %rax,-0x50(%rbp)
mov    $0x20,%edi
call   1080 <char_alloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xdc8(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,-0x78(%rbp)
cmp    $0x0,%rax
jne    127d <readpzfile+0xad>
mov    0x2d86(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xda4(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    0x10(%rbp),%rax
movl   $0x63,(%rax)
jmp    16ec <readpzfile+0x51c>
jmp    1282 <readpzfile+0xb2>
mov    -0x50(%rbp),%rdi
mov    -0x78(%rbp),%rdx
mov    $0x20,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
je     1680 <readpzfile+0x4b0>
mov    -0x50(%rbp),%rdi
lea    0xdc5(%rip),%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    1505 <readpzfile+0x335>
cmpl   $0x0,-0x40(%rbp)
jne    14e5 <readpzfile+0x315>
mov    -0x50(%rbp),%rdi
mov    -0x58(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xd9b(%rip),%rsi
mov    $0x0,%al
call   10c0 <sscanf@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x2,-0x3c(%rbp)
je     1317 <readpzfile+0x147>
mov    0x2cec(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xd78(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    0x10(%rbp),%rax
movl   $0x63,(%rax)
jmp    16ec <readpzfile+0x51c>
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    -0x18(%rbp),%rcx
mov    %rax,(%rcx)
cmp    $0x0,%rax
jne    135b <readpzfile+0x18b>
mov    0x2c9f(%rip),%rax
mov    (%rax),%edi
lea    0xd79(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
mov    -0x78(%rbp),%rdx
call   10d0 <readzeros@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%edi
call   1060 <cabs@plt>
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    13f3 <readpzfile+0x223>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1060 <cabs@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    13e0 <readpzfile+0x210>
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x38(%rbp)
jmp    13e5 <readpzfile+0x215>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1395 <readpzfile+0x1c5>
cmpl   $0x0,-0x3c(%rbp)
jl     141c <readpzfile+0x24c>
mov    -0x3c(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jg     141c <readpzfile+0x24c>
movsd  -0x68(%rbp),%xmm0
ucomisd -0x60(%rbp),%xmm0
jbe    1446 <readpzfile+0x276>
mov    0x2bbd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xc49(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    0x10(%rbp),%rax
movl   $0x63,(%rax)
jmp    16ec <readpzfile+0x51c>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    1483 <readpzfile+0x2b3>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0x34(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    144d <readpzfile+0x27d>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    14ca <readpzfile+0x2fa>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    148c <readpzfile+0x2bc>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
sub    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x40(%rbp)
jmp    1500 <readpzfile+0x330>
mov    0x2af4(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xbe5(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    1505 <readpzfile+0x335>
mov    -0x50(%rbp),%rdi
lea    0xc10(%rip),%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    160a <readpzfile+0x43a>
cmpl   $0x0,-0x44(%rbp)
jne    15ea <readpzfile+0x41a>
mov    -0x50(%rbp),%rdi
mov    -0x58(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xb34(%rip),%rsi
mov    $0x0,%al
call   10c0 <sscanf@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%rax
movslq (%rax),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    -0x28(%rbp),%rcx
mov    %rax,(%rcx)
cmp    $0x0,%rax
jne    158e <readpzfile+0x3be>
mov    0x2a6c(%rip),%rax
mov    (%rax),%edi
lea    0xb46(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
movl   $0x1,-0x44(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rax
mov    (%rax),%rsi
mov    -0x78(%rbp),%rdx
mov    0x10(%rbp),%rcx
call   1050 <readpoles@plt>
mov    0x10(%rbp),%rax
cmpl   $0x63,(%rax)
jne    15e5 <readpzfile+0x415>
mov    0x2a1d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xaa9(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x78(%rbp),%rdi
call   1070 <fclose@plt>
jmp    16ec <readpzfile+0x51c>
jmp    1605 <readpzfile+0x435>
mov    0x29ef(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xb28(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    160a <readpzfile+0x43a>
mov    -0x50(%rbp),%rdi
lea    0xb54(%rip),%rsi
mov    $0x8,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    167b <readpzfile+0x4ab>
cmpl   $0x0,-0x48(%rbp)
jne    165b <readpzfile+0x48b>
mov    -0x50(%rbp),%rdi
mov    -0x58(%rbp),%rdx
mov    -0x30(%rbp),%rcx
lea    0xb2d(%rip),%rsi
mov    $0x0,%al
call   10c0 <sscanf@plt>
mov    %eax,-0x3c(%rbp)
movl   $0x1,-0x48(%rbp)
jmp    1676 <readpzfile+0x4a6>
mov    0x297e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xb09(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    167b <readpzfile+0x4ab>
jmp    1282 <readpzfile+0xb2>
cmpl   $0x0,-0x40(%rbp)
je     169e <readpzfile+0x4ce>
cmpl   $0x0,-0x44(%rbp)
je     169e <readpzfile+0x4ce>
cmpl   $0x0,-0x48(%rbp)
jne    16d1 <readpzfile+0x501>
mov    0x293b(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xb0c(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x78(%rbp),%rdi
call   1070 <fclose@plt>
mov    0x10(%rbp),%rax
movl   $0x63,(%rax)
jmp    16ec <readpzfile+0x51c>
mov    -0x78(%rbp),%rdi
call   1070 <fclose@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readpzfile>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,0x30(%rsp)
mov    %r8,0x40(%rsp)
mov    %rcx,0x38(%rsp)
mov    %rdx,%r14
mov    %rsi,%r13
mov    %rdi,%r15
mov    0x80(%rsp),%r12
mov    $0x20,%edi
call   1080 <char_alloc@plt>
mov    %rax,%rbx
mov    $0x20,%edi
call   1080 <char_alloc@plt>
mov    %rax,0x20(%rsp)
lea    0xde7(%rip),%rsi
mov    %r15,%rdi
call   10e0 <fopen@plt>
test   %rax,%rax
je     1521 <readpzfile+0x351>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    $0x20,%esi
mov    %rax,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     1583 <readpzfile+0x3b3>
mov    %r15,0x8(%rsp)
mov    %rbp,0x18(%rsp)
lea    0xe0f(%rip),%rbp
mov    0x2d7a(%rip),%r15
movl   $0x0,0x10(%rsp)
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
mov    %r12,0x28(%rsp)
jmp    12c1 <readpzfile+0xf1>
mov    %rbx,%rdi
lea    0xee4(%rip),%rsi
mov    0x20(%rsp),%rdx
mov    0x30(%rsp),%rcx
xor    %eax,%eax
call   10c0 <sscanf@plt>
movl   $0x1,(%rsp)
mov    %rbx,%rdi
mov    $0x20,%esi
mov    0x18(%rsp),%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     153d <readpzfile+0x36d>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    1420 <readpzfile+0x250>
cmpl   $0x0,0x10(%rsp)
je     1303 <readpzfile+0x133>
mov    (%r15),%edi
lea    0xdf4(%rip),%rsi
mov    0x8(%rsp),%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
movl   $0x1,0x10(%rsp)
jmp    1420 <readpzfile+0x250>
mov    %rbx,%rdi
lea    0xd67(%rip),%rsi
mov    0x20(%rsp),%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   10c0 <sscanf@plt>
cmp    $0x2,%eax
jne    15bc <readpzfile+0x3ec>
mov    0x0(%r13),%edi
shl    $0x2,%edi
call   10b0 <malloc@plt>
mov    %rax,(%r14)
test   %rax,%rax
je     1609 <readpzfile+0x439>
mov    0x0(%r13),%edi
mov    %rax,%rsi
mov    0x18(%rsp),%rdx
call   10d0 <readzeros@plt>
mov    %eax,%ebp
mov    (%r14),%rax
mov    (%rax),%edi
call   1060 <cabs@plt>
mov    0x0(%r13),%eax
test   %eax,%eax
jle    13af <readpzfile+0x1df>
xor    %r12d,%r12d
xor    %r15d,%r15d
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,0x10(%rsp)
mov    (%r14),%rax
mov    (%rax,%r12,4),%edi
call   1060 <cabs@plt>
movsd  0x10(%rsp),%xmm1
ucomisd %xmm0,%xmm1
cmova  %r12d,%r15d
minsd  %xmm1,%xmm0
add    $0x1,%r12
movslq 0x0(%r13),%rax
cmp    %rax,%r12
jl     1370 <readpzfile+0x1a0>
mov    0x28(%rsp),%r12
test   %ebp,%ebp
jns    13ba <readpzfile+0x1ea>
jmp    15ef <readpzfile+0x41f>
xor    %r15d,%r15d
test   %ebp,%ebp
js     15ef <readpzfile+0x41f>
cmp    %eax,%ebp
jg     15ef <readpzfile+0x41f>
ucomisd 0xc36(%rip),%xmm0
ja     15ef <readpzfile+0x41f>
lea    0x1(%r15),%edx
cmp    %eax,%edx
jge    13fb <readpzfile+0x22b>
mov    (%r14),%rcx
movslq %edx,%rdx
xchg   %ax,%ax
mov    (%rcx,%rdx,4),%eax
movslq %r15d,%r15
mov    %eax,(%rcx,%r15,4)
add    $0x1,%rdx
movslq 0x0(%r13),%rax
add    $0x1,%r15d
cmp    %rax,%rdx
jl     13e0 <readpzfile+0x210>
add    $0xffffffff,%eax
mov    %eax,0x0(%r13)
movl   $0x1,0x10(%rsp)
mov    0x2bcf(%rip),%r15
lea    0xc56(%rip),%rbp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
lea    0xcf6(%rip),%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    14e0 <readpzfile+0x310>
cmpl   $0x0,0x4(%rsp)
je     1463 <readpzfile+0x293>
mov    (%r15),%edi
lea    0xcd9(%rip),%rsi
mov    0x8(%rsp),%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
movl   $0x1,0x4(%rsp)
jmp    14e0 <readpzfile+0x310>
mov    %r12,%r15
mov    %rbx,%rdi
lea    0xc04(%rip),%rsi
mov    0x20(%rsp),%rdx
mov    0x38(%rsp),%r12
mov    %r12,%rcx
xor    %eax,%eax
call   10c0 <sscanf@plt>
mov    (%r12),%edi
shl    $0x2,%edi
call   10b0 <malloc@plt>
mov    0x40(%rsp),%rcx
mov    %rax,(%rcx)
test   %rax,%rax
je     160e <readpzfile+0x43e>
mov    (%r12),%edi
mov    %rax,%rsi
mov    0x18(%rsp),%rdx
mov    %r15,%r12
mov    %r15,%rcx
call   1050 <readpoles@plt>
movl   $0x1,0x4(%rsp)
cmpl   $0x63,(%r15)
mov    0x2b15(%rip),%r15
lea    0xb9c(%rip),%rbp
je     15c1 <readpzfile+0x3f1>
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
lea    0xc7f(%rip),%rsi
mov    $0x8,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    12a6 <readpzfile+0xd6>
cmpl   $0x0,(%rsp)
je     1284 <readpzfile+0xb4>
mov    (%r15),%edi
lea    0xc68(%rip),%rsi
mov    0x8(%rsp),%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
jmp    129f <readpzfile+0xcf>
mov    0x2ab8(%rip),%rax
mov    (%rax),%edi
lea    0xada(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
jmp    15a5 <readpzfile+0x3d5>
cmpl   $0x0,0x10(%rsp)
mov    0x18(%rsp),%rbp
mov    0x8(%rsp),%r15
je     1583 <readpzfile+0x3b3>
cmpl   $0x0,0x4(%rsp)
je     1583 <readpzfile+0x3b3>
cmpl   $0x0,(%rsp)
je     1583 <readpzfile+0x3b3>
mov    %rbp,%rdi
call   1070 <fclose@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
mov    0x2a56(%rip),%rax
mov    (%rax),%edi
lea    0xc2b(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    %rbp,%rdi
call   1070 <fclose@plt>
movl   $0x63,(%r12)
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%r15),%edi
jmp    15f8 <readpzfile+0x428>
mov    (%r15),%edi
lea    0xaae(%rip),%rsi
mov    0x8(%rsp),%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    0x18(%rsp),%rdi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <fclose@plt>
mov    0x29ea(%rip),%rax
mov    (%rax),%edi
lea    0xa7a(%rip),%rsi
mov    0x8(%rsp),%rdx
jmp    1534 <readpzfile+0x364>
mov    (%r15),%edi
jmp    1617 <readpzfile+0x447>
mov    0x29cb(%rip),%rax
mov    (%rax),%edi
lea    0xaa5(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"rt\00"
@stderr = global i32 0
@.str.1 = [99 x i8] c"WARNING (make_resp_lookup_table): pzfile %s does not exist...\0A ======>this channel is skipped\0A\00"
@.str.2 = [6 x i8] c"ZEROS\00"
@.str.3 = [5 x i8] c"%s%d\00"
@.str.4 = [74 x i8] c"WARNING (make_resp_lookup_table): incorrect pzfile format: %s (rejected)\0A\00"
@.str.5 = [27 x i8] c"FATAL ERROR: Out of memory\00"
@.str.6 = [66 x i8] c"WARNING (make_resp_lookup_table): ZEROS redundancy in pzfile: %s\0A\00"
@.str.7 = [6 x i8] c"POLES\00"
@.str.8 = [67 x i8] c"WARNING (make_resp_lookup_table): POLES redundancy in pzfile : %s\0A\00"
@.str.9 = [9 x i8] c"CONSTANT\00"
@.str.10 = [6 x i8] c"%s%lf\00"
@.str.11 = [70 x i8] c"WARNING (make_resp_lookup_table): CONSTANT redundancy in pzfile : %s\0A\00"
@.str.12 = [94 x i8] c"WARNING (make_resp_lookup_table): Inclomplete pzfile : %s\0A ======>this channel is skipped \0A\00"
define void @readpzfile(i8* %0, i32* %1, i32** %2, i32* %3, i32** %4, double* %5, i32* %6) {
%8 = alloca i8*
%9 = alloca i32*
%10 = alloca i32**
%11 = alloca i32*
%12 = alloca i32**
%13 = alloca double*
%14 = alloca i32*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i8*
%22 = alloca i8*
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca i32*
store i8* %0, i8** %8
store i32* %1, i32** %9
store i32** %2, i32*** %10
store i32* %3, i32** %11
store i32** %4, i32*** %12
store double* %5, double** %13
store i32* %6, i32** %14
store i32 0, i32* %18
store i32 0, i32* %19
store i32 0, i32* %20
store double 1.000000e-05, double* %23
%27 = call i8* @char_alloc(i32 32)
store i8* %27, i8** %21
%28 = call i8* @char_alloc(i32 32)
store i8* %28, i8** %22
%29 = load i8*, i8** %8
%30 = call i32* @fopen(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %30, i32** %26
%31 = icmp eq i32* %30, null
br i1 %31, label %32, label %37
32: ; preds = %7
%33 = load i32, i32* @stderr
%34 = load i8*, i8** %8
%35 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str.1, i64 0, i64 0), i8* %34)
%36 = load i32*, i32** %14
store i32 99, i32* %36
br label %270
37: ; preds = %7
br label %38
38: ; preds = %246, %37
%39 = load i8*, i8** %21
%40 = load i32*, i32** %26
%41 = call i32* @fgets(i8* %39, i32 32, i32* %40)
%42 = icmp ne i32* %41, null
br i1 %42, label %43, label %247
43: ; preds = %38
%44 = load i8*, i8** %21
%45 = call i32 @strncmp(i8* %44, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 5)
%46 = icmp ne i32 %45, 0
br i1 %46, label %181, label %47
47: ; preds = %43
%48 = load i32, i32* %18
%49 = icmp ne i32 %48, 0
br i1 %49, label %176, label %50
50: ; preds = %47
%51 = load i8*, i8** %21
%52 = load i8*, i8** %22
%53 = load i32*, i32** %9
%54 = call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %51, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %52, i32* %53)
store i32 %54, i32* %17
%55 = load i32, i32* %17
%56 = icmp ne i32 %55, 2
br i1 %56, label %57, label %62
57: ; preds = %50
%58 = load i32, i32* @stderr
%59 = load i8*, i8** %8
%60 = call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.4, i64 0, i64 0), i8* %59)
%61 = load i32*, i32** %14
store i32 99, i32* %61
br label %270
62: ; preds = %50
%63 = load i32*, i32** %9
%64 = load i32, i32* %63
%65 = sext i32 %64 to i64
%66 = mul i64 %65, 4
%67 = trunc i64 %66 to i32
%68 = call i64 @malloc(i32 %67)
%69 = inttoptr i64 %68 to i32*
%70 = load i32**, i32*** %10
store i32* %69, i32** %70
%71 = icmp eq i32* %69, null
br i1 %71, label %72, label %76
72: ; preds = %62
%73 = load i32, i32* @stderr
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %73, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%75 = call i32 @exit(i32 1)
unreachable
76: ; preds = %62
%77 = load i32*, i32** %9
%78 = load i32, i32* %77
%79 = load i32**, i32*** %10
%80 = load i32*, i32** %79
%81 = load i32*, i32** %26
%82 = call i32 @readzeros(i32 %78, i32* %80, i32* %81)
store i32 %82, i32* %17
%83 = load i32**, i32*** %10
%84 = load i32*, i32** %83
%85 = load i32, i32* %84
%86 = call double @cabs(i32 %85)
store double %86, double* %24
store i32 0, i32* %16
store i32 0, i32* %15
br label %87
87: ; preds = %107, %76
%88 = load i32, i32* %15
%89 = load i32*, i32** %9
%90 = load i32, i32* %89
%91 = icmp slt i32 %88, %90
br i1 %91, label %92, label %110
92: ; preds = %87
%93 = load i32**, i32*** %10
%94 = load i32*, i32** %93
%95 = load i32, i32* %15
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i32, i32* %94, i64 %96
%98 = load i32, i32* %97
%99 = call double @cabs(i32 %98)
store double %99, double* %25
%100 = load double, double* %25
%101 = load double, double* %24
%102 = fcmp olt double %100, %101
br i1 %102, label %103, label %106
103: ; preds = %92
%104 = load double, double* %25
store double %104, double* %24
%105 = load i32, i32* %15
store i32 %105, i32* %16
br label %106
106: ; preds = %103, %92
br label %107
107: ; preds = %106
%108 = load i32, i32* %15
%109 = add nsw i32 %108, 1
store i32 %109, i32* %15
br label %87
110: ; preds = %87
%111 = load i32, i32* %17
%112 = icmp slt i32 %111, 0
br i1 %112, label %122, label %113
113: ; preds = %110
%114 = load i32, i32* %17
%115 = load i32*, i32** %9
%116 = load i32, i32* %115
%117 = icmp sgt i32 %114, %116
br i1 %117, label %122, label %118
118: ; preds = %113
%119 = load double, double* %24
%120 = load double, double* %23
%121 = fcmp ogt double %119, %120
br i1 %121, label %122, label %127
122: ; preds = %118, %113, %110
%123 = load i32, i32* @stderr
%124 = load i8*, i8** %8
%125 = call i32 (i32, i8*, ...) @fprintf(i32 %123, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.4, i64 0, i64 0), i8* %124)
%126 = load i32*, i32** %14
store i32 99, i32* %126
br label %270
127: ; preds = %118
store i32 0, i32* %15
br label %128
128: ; preds = %144, %127
%129 = load i32, i32* %15
%130 = load i32, i32* %16
%131 = icmp slt i32 %129, %130
br i1 %131, label %132, label %147
132: ; preds = %128
%133 = load i32**, i32*** %10
%134 = load i32*, i32** %133
%135 = load i32, i32* %15
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds i32, i32* %134, i64 %136
%138 = load i32, i32* %137
%139 = load i32**, i32*** %10
%140 = load i32*, i32** %139
%141 = load i32, i32* %15
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds i32, i32* %140, i64 %142
store i32 %138, i32* %143
br label %144
144: ; preds = %132
%145 = load i32, i32* %15
%146 = add nsw i32 %145, 1
store i32 %146, i32* %15
br label %128
147: ; preds = %128
%148 = load i32, i32* %16
%149 = add nsw i32 %148, 1
store i32 %149, i32* %15
br label %150
150: ; preds = %168, %147
%151 = load i32, i32* %15
%152 = load i32*, i32** %9
%153 = load i32, i32* %152
%154 = icmp slt i32 %151, %153
br i1 %154, label %155, label %171
155: ; preds = %150
%156 = load i32**, i32*** %10
%157 = load i32*, i32** %156
%158 = load i32, i32* %15
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds i32, i32* %157, i64 %159
%161 = load i32, i32* %160
%162 = load i32**, i32*** %10
%163 = load i32*, i32** %162
%164 = load i32, i32* %15
%165 = sub nsw i32 %164, 1
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds i32, i32* %163, i64 %166
store i32 %161, i32* %167
br label %168
168: ; preds = %155
%169 = load i32, i32* %15
%170 = add nsw i32 %169, 1
store i32 %170, i32* %15
br label %150
171: ; preds = %150
%172 = load i32*, i32** %9
%173 = load i32, i32* %172
%174 = sub nsw i32 %173, 1
%175 = load i32*, i32** %9
store i32 %174, i32* %175
store i32 1, i32* %18
br label %180
176: ; preds = %47
%177 = load i32, i32* @stderr
%178 = load i8*, i8** %8
%179 = call i32 (i32, i8*, ...) @fprintf(i32 %177, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.6, i64 0, i64 0), i8* %178)
br label %180
180: ; preds = %176, %171
br label %181
181: ; preds = %180, %43
%182 = load i8*, i8** %21
%183 = call i32 @strncmp(i8* %182, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 5)
%184 = icmp ne i32 %183, 0
br i1 %184, label %229, label %185
185: ; preds = %181
%186 = load i32, i32* %19
%187 = icmp ne i32 %186, 0
br i1 %187, label %224, label %188
188: ; preds = %185
%189 = load i8*, i8** %21
%190 = load i8*, i8** %22
%191 = load i32*, i32** %11
%192 = call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %189, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %190, i32* %191)
store i32 %192, i32* %17
%193 = load i32*, i32** %11
%194 = load i32, i32* %193
%195 = sext i32 %194 to i64
%196 = mul i64 %195, 4
%197 = trunc i64 %196 to i32
%198 = call i64 @malloc(i32 %197)
%199 = inttoptr i64 %198 to i32*
%200 = load i32**, i32*** %12
store i32* %199, i32** %200
%201 = icmp eq i32* %199, null
br i1 %201, label %202, label %206
202: ; preds = %188
%203 = load i32, i32* @stderr
%204 = call i32 (i32, i8*, ...) @fprintf(i32 %203, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%205 = call i32 @exit(i32 1)
unreachable
206: ; preds = %188
store i32 1, i32* %19
%207 = load i32*, i32** %11
%208 = load i32, i32* %207
%209 = load i32**, i32*** %12
%210 = load i32*, i32** %209
%211 = load i32*, i32** %26
%212 = load i32*, i32** %14
%213 = call i32 @readpoles(i32 %208, i32* %210, i32* %211, i32* %212)
%214 = load i32*, i32** %14
%215 = load i32, i32* %214
%216 = icmp eq i32 %215, 99
br i1 %216, label %217, label %223
217: ; preds = %206
%218 = load i32, i32* @stderr
%219 = load i8*, i8** %8
%220 = call i32 (i32, i8*, ...) @fprintf(i32 %218, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.4, i64 0, i64 0), i8* %219)
%221 = load i32*, i32** %26
%222 = call i32 @fclose(i32* %221)
br label %270
223: ; preds = %206
br label %228
224: ; preds = %185
%225 = load i32, i32* @stderr
%226 = load i8*, i8** %8
%227 = call i32 (i32, i8*, ...) @fprintf(i32 %225, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.8, i64 0, i64 0), i8* %226)
br label %228
228: ; preds = %224, %223
br label %229
229: ; preds = %228, %181
%230 = load i8*, i8** %21
%231 = call i32 @strncmp(i8* %230, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 8)
%232 = icmp ne i32 %231, 0
br i1 %232, label %246, label %233
233: ; preds = %229
%234 = load i32, i32* %20
%235 = icmp ne i32 %234, 0
br i1 %235, label %241, label %236
236: ; preds = %233
%237 = load i8*, i8** %21
%238 = load i8*, i8** %22
%239 = load double*, double** %13
%240 = call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %237, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* %238, double* %239)
store i32 %240, i32* %17
store i32 1, i32* %20
br label %245
241: ; preds = %233
%242 = load i32, i32* @stderr
%243 = load i8*, i8** %8
%244 = call i32 (i32, i8*, ...) @fprintf(i32 %242, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.11, i64 0, i64 0), i8* %243)
br label %245
245: ; preds = %241, %236
br label %246
246: ; preds = %245, %229
br label %38
247: ; preds = %38
%248 = load i32, i32* %18
%249 = icmp ne i32 %248, 0
br i1 %249, label %250, label %256
250: ; preds = %247
%251 = load i32, i32* %19
%252 = icmp ne i32 %251, 0
br i1 %252, label %253, label %256
253: ; preds = %250
%254 = load i32, i32* %20
%255 = icmp ne i32 %254, 0
br i1 %255, label %263, label %256
256: ; preds = %253, %250, %247
%257 = load i32, i32* @stderr
%258 = load i8*, i8** %8
%259 = call i32 (i32, i8*, ...) @fprintf(i32 %257, i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.12, i64 0, i64 0), i8* %258)
%260 = load i32*, i32** %26
%261 = call i32 @fclose(i32* %260)
%262 = load i32*, i32** %14
store i32 99, i32* %262
br label %270
263: ; preds = %253
%264 = load i32*, i32** %26
%265 = call i32 @fclose(i32* %264)
%266 = load i8*, i8** %21
%267 = call i32 @free(i8* %266)
%268 = load i8*, i8** %22
%269 = call i32 @free(i8* %268)
br label %270
270: ; preds = %263, %256, %217, %122, %57, %32
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"rt\00"
@stderr = global i32 0
@.str.1 = [99 x i8] c"WARNING (make_resp_lookup_table): pzfile %s does not exist...\0A ======>this channel is skipped\0A\00"
@.str.2 = [6 x i8] c"ZEROS\00"
@.str.3 = [5 x i8] c"%s%d\00"
@.str.4 = [74 x i8] c"WARNING (make_resp_lookup_table): incorrect pzfile format: %s (rejected)\0A\00"
@.str.5 = [27 x i8] c"FATAL ERROR: Out of memory\00"
@.str.6 = [66 x i8] c"WARNING (make_resp_lookup_table): ZEROS redundancy in pzfile: %s\0A\00"
@.str.7 = [6 x i8] c"POLES\00"
@.str.8 = [67 x i8] c"WARNING (make_resp_lookup_table): POLES redundancy in pzfile : %s\0A\00"
@.str.9 = [9 x i8] c"CONSTANT\00"
@.str.10 = [6 x i8] c"%s%lf\00"
@.str.11 = [70 x i8] c"WARNING (make_resp_lookup_table): CONSTANT redundancy in pzfile : %s\0A\00"
@.str.12 = [94 x i8] c"WARNING (make_resp_lookup_table): Inclomplete pzfile : %s\0A ======>this channel is skipped \0A\00"
define void @readpzfile(i8* %0, i32* %1, i32** nocapture %2, i32* %3, i32** nocapture writeonly %4, double* %5, i32* %6) {
%8 = tail call i8* @char_alloc(i32 32)
%9 = tail call i8* @char_alloc(i32 32)
%10 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i32* %10, null
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = tail call i32* @fgets(i8* %8, i32 32, i32* %10)
%14 = icmp eq i32* %13, null
br i1 %14, label %152, label %18
15: ; preds = %7
%16 = load i32, i32* @stderr
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str.1, i64 0, i64 0), i8* %0)
store i32 99, i32* %6
br label %160
18: ; preds = %12, %142
%19 = phi i32 [ %103, %142 ], [ 0, %12 ]
%20 = phi i32 [ %132, %142 ], [ 0, %12 ]
%21 = phi i32 [ %143, %142 ], [ 0, %12 ]
%22 = tail call i32 @strncmp(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 5)
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %102
24: ; preds = %18
%25 = icmp eq i32 %19, 0
br i1 %25, label %26, label %99
26: ; preds = %24
%27 = tail call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %9, i32* %1)
%28 = icmp eq i32 %27, 2
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = load i32, i32* @stderr
%31 = tail call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.4, i64 0, i64 0), i8* %0)
store i32 99, i32* %6
br label %160
32: ; preds = %26
%33 = load i32, i32* %1
%34 = shl i32 %33, 2
%35 = tail call i64 @malloc(i32 %34)
%36 = inttoptr i64 %35 to i32*
store i32* %36, i32** %2
%37 = icmp eq i64 %35, 0
br i1 %37, label %38, label %42
38: ; preds = %32
%39 = load i32, i32* @stderr
%40 = tail call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%41 = tail call i32 @exit(i32 1)
unreachable
42: ; preds = %32
%43 = load i32, i32* %1
%44 = tail call i32 @readzeros(i32 %43, i32* %36, i32* %10)
%45 = load i32*, i32** %2
%46 = load i32, i32* %45
%47 = tail call double @cabs(i32 %46)
%48 = load i32, i32* %1
%49 = icmp sgt i32 %48, 0
br i1 %49, label %50, label %66
50: ; preds = %42, %50
%51 = phi i64 [ %62, %50 ], [ 0, %42 ]
%52 = phi i32 [ %61, %50 ], [ 0, %42 ]
%53 = phi double [ %59, %50 ], [ %47, %42 ]
%54 = load i32*, i32** %2
%55 = getelementptr inbounds i32, i32* %54, i64 %51
%56 = load i32, i32* %55
%57 = tail call double @cabs(i32 %56)
%58 = fcmp olt double %57, %53
%59 = select i1 %58, double %57, double %53
%60 = trunc i64 %51 to i32
%61 = select i1 %58, i32 %60, i32 %52
%62 = add nuw nsw i64 %51, 1
%63 = load i32, i32* %1
%64 = sext i32 %63 to i64
%65 = icmp slt i64 %62, %64
br i1 %65, label %50, label %66
66: ; preds = %50, %42
%67 = phi double [ %47, %42 ], [ %59, %50 ]
%68 = phi i32 [ 0, %42 ], [ %61, %50 ]
%69 = phi i32 [ %48, %42 ], [ %63, %50 ]
%70 = icmp slt i32 %44, 0
%71 = icmp sgt i32 %44, %69
%72 = select i1 %70, i1 true, i1 %71
%73 = fcmp ogt double %67, 1.000000e-05
%74 = select i1 %72, i1 true, i1 %73
br i1 %74, label %78, label %75
75: ; preds = %66
%76 = add i32 %68, 1
%77 = icmp slt i32 %76, %69
br i1 %77, label %81, label %96
78: ; preds = %66
%79 = load i32, i32* @stderr
%80 = tail call i32 (i32, i8*, ...) @fprintf(i32 %79, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.4, i64 0, i64 0), i8* %0)
store i32 99, i32* %6
br label %160
81: ; preds = %75
%82 = load i32*, i32** %2
%83 = sext i32 %76 to i64
br label %84
84: ; preds = %81, %84
%85 = phi i64 [ %83, %81 ], [ %91, %84 ]
%86 = phi i32 [ %68, %81 ], [ %95, %84 ]
%87 = getelementptr inbounds i32, i32* %82, i64 %85
%88 = load i32, i32* %87
%89 = sext i32 %86 to i64
%90 = getelementptr inbounds i32, i32* %82, i64 %89
store i32 %88, i32* %90
%91 = add nsw i64 %85, 1
%92 = load i32, i32* %1
%93 = sext i32 %92 to i64
%94 = icmp slt i64 %91, %93
%95 = trunc i64 %85 to i32
br i1 %94, label %84, label %96
96: ; preds = %84, %75
%97 = phi i32 [ %69, %75 ], [ %92, %84 ]
%98 = add nsw i32 %97, -1
store i32 %98, i32* %1
br label %102
99: ; preds = %24
%100 = load i32, i32* @stderr
%101 = tail call i32 (i32, i8*, ...) @fprintf(i32 %100, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.6, i64 0, i64 0), i8* %0)
br label %102
102: ; preds = %96, %99, %18
%103 = phi i32 [ %19, %18 ], [ 1, %99 ], [ 1, %96 ]
%104 = tail call i32 @strncmp(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 5)
%105 = icmp eq i32 %104, 0
br i1 %105, label %106, label %131
106: ; preds = %102
%107 = icmp eq i32 %20, 0
br i1 %107, label %108, label %128
108: ; preds = %106
%109 = tail call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %9, i32* %3)
%110 = load i32, i32* %3
%111 = shl i32 %110, 2
%112 = tail call i64 @malloc(i32 %111)
%113 = inttoptr i64 %112 to i32*
store i32* %113, i32** %4
%114 = icmp eq i64 %112, 0
br i1 %114, label %115, label %119
115: ; preds = %108
%116 = load i32, i32* @stderr
%117 = tail call i32 (i32, i8*, ...) @fprintf(i32 %116, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%118 = tail call i32 @exit(i32 1)
unreachable
119: ; preds = %108
%120 = load i32, i32* %3
%121 = tail call i32 @readpoles(i32 %120, i32* %113, i32* %10, i32* %6)
%122 = load i32, i32* %6
%123 = icmp eq i32 %122, 99
br i1 %123, label %124, label %131
124: ; preds = %119
%125 = load i32, i32* @stderr
%126 = tail call i32 (i32, i8*, ...) @fprintf(i32 %125, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.4, i64 0, i64 0), i8* %0)
%127 = tail call i32 @fclose(i32* %10)
br label %160
128: ; preds = %106
%129 = load i32, i32* @stderr
%130 = tail call i32 (i32, i8*, ...) @fprintf(i32 %129, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.8, i64 0, i64 0), i8* %0)
br label %131
131: ; preds = %128, %119, %102
%132 = phi i32 [ %20, %102 ], [ 1, %128 ], [ 1, %119 ]
%133 = tail call i32 @strncmp(i8* %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 8)
%134 = icmp eq i32 %133, 0
br i1 %134, label %135, label %142
135: ; preds = %131
%136 = icmp eq i32 %21, 0
br i1 %136, label %137, label %139
137: ; preds = %135
%138 = tail call i32 (i8*, i8*, i8*, ...) @sscanf(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* %9, double* %5)
br label %142
139: ; preds = %135
%140 = load i32, i32* @stderr
%141 = tail call i32 (i32, i8*, ...) @fprintf(i32 %140, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.11, i64 0, i64 0), i8* %0)
br label %142
142: ; preds = %137, %139, %131
%143 = phi i32 [ %21, %131 ], [ 1, %139 ], [ 1, %137 ]
%144 = tail call i32* @fgets(i8* %8, i32 32, i32* %10)
%145 = icmp eq i32* %144, null
br i1 %145, label %146, label %18
146: ; preds = %142
%147 = icmp ne i32 %103, 0
%148 = icmp ne i32 %132, 0
%149 = select i1 %147, i1 %148, i1 false
%150 = icmp ne i32 %143, 0
%151 = select i1 %149, i1 %150, i1 false
br i1 %151, label %156, label %152
152: ; preds = %12, %146
%153 = load i32, i32* @stderr
%154 = tail call i32 (i32, i8*, ...) @fprintf(i32 %153, i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.12, i64 0, i64 0), i8* %0)
%155 = tail call i32 @fclose(i32* %10)
store i32 99, i32* %6
br label %160
156: ; preds = %146
%157 = tail call i32 @fclose(i32* %10)
%158 = tail call i32 @free(i8* %8)
%159 = tail call i32 @free(i8* %9)
br label %160
160: ; preds = %156, %152, %124, %78, %29, %15
ret void
}