#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 atan(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ frdheader(int *, double *, double *, double *, int *,
                             double *, int *, int *, int *, char *, int *,
                             int *, int /*<<< orphan*/ *, char *, int *, int *);
int /*<<< orphan*/ frdselect(double *, double *, int *, int *, int *, char *,
                             int *, int *, int *, int *, int *, int *, int *,
                             int *, int *, char *, int /*<<< orphan*/ *, char *,
                             char *);
int /*<<< orphan*/ frdset(char *, char *, int *, int *, int *, int *, int *,
                          int *, int *, int *, int *, int *, int *, int *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void frd_se(double *co, int *nk, double *stn, int *inum, int *nmethod,
            int *kode, char *filab, double *fn, double *time, int *nstate_,
            int *istep, int *iinc, int *mode, int *noddiam, char *description,
            int *mi, int *ngraph, int *ne, double *cs, char *set, int *nset,
            int *istartset, int *iendset, int *ialset, double *thicke,
            char *jobnamec, char *output, double *dgdxtotglob, int *numobject) {
  FILE *f1;
  char c[2] = "C", m1[4] = " -1", m2[4] = " -2", m3[4] = " -3", p0[6] = "    0",
       p1[6] = "    1", p2[6] = "    2", p3[6] = "    3", p4[6] = "    4",
       p5[6] = "    5", p6[6] = "    6", p7[6] = "    7", p8[6] = "    8",
       p9[6] = "    9", p10[6] = "   10", p11[6] = "   11", p12[6] = "   12",
       fneig[132] = "", date[8], clock[10], newdate[21], newclock[9],
       material[59] =
           "                                                          ",
       text[2] = " ";
  static int icounter = 0, nkcoords, iaxial;
  int null, one, i, j, k, indexe, nemax, nlayer, noutloc, iset, iselect, ncomp,
      nope, nodes, ifield[7], nfield[2], icomp[7], ifieldstate[*nstate_], two,
      three, icompstate[*nstate_],
      ip0 = 0, ip1 = 1, ip2 = 2, ip3 = 3, ip4 = 4, ip5 = 5, ip6 = 6, ip7 = 7,
      ip8 = 8, ip9 = 9, ip10 = 10, ip11 = 11, ip12 = 12, imat, nelout, nterms,
      nout, noutplus, noutmin, mt = mi[1] + 1;
  int ncomptensor = 4, ifieldtensor[4] = {1, 1, 1, 1},
      icomptensor[4] = {0, 1, 2, 4}, nfieldtensor[2] = {4, 0};
  int iw;
  float ifl;
  double pi, oner;
  strcpy(fneig, jobnamec);
  strcat(fneig, ".frd");
  if ((f1 = fopen(fneig, "ab")) == NULL) {
    printf("*ERROR in frd: cannot open frd file for writing...");
    exit(0);
  }
  pi = 4. * atan(1.);
  null = 0;
  one = 1;
  two = 2;
  three = 3;
  oner = 1.;
  if (*nmethod != 0) {
    nout = 0;
    noutplus = 0;
    noutmin = 0;
    for (i = 0; i < *nk; i++) {
      if (inum[i] == 0)
        continue;
      nout++;
      if (inum[i] > 0)
        noutplus++;
      if (inum[i] < 0)
        noutmin++;
    }
  } else {
    nout = *nk;
  }
  nkcoords = *nk;
  iselect = 1;
  frdset(filab, set, &iset, istartset, iendset, ialset, inum, &noutloc, &nout,
         nset, &noutmin, &noutplus, &iselect, ngraph);
  frdheader(&icounter, &oner, time, &pi, noddiam, cs, &null, mode, &noutloc,
            description, kode, nmethod, f1, output, istep, iinc);
  fprintf(f1, " -4  SEN         4    1\n");
  fprintf(f1, " -5  SENDX       1    2    1    0\n");
  fprintf(f1, " -5  SENDY       1    2    2    0\n");
  fprintf(f1, " -5  SENDZ       1    2    3    0\n");
  fprintf(f1, " -5  SENNORM     1    2    4    0\n");
  frdselect(dgdxtotglob, dgdxtotglob, &iset, &nkcoords, inum, m1, istartset,
            iendset, ialset, ngraph, &ncomptensor, ifieldtensor, icomptensor,
            nfieldtensor, &iselect, m2, f1, output, m3);
  fclose(f1);
  return;
}


x86 assembly (clang, -O0):
<frd_se>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x328,%rsp
mov    0xc0(%rbp),%rax
mov    0xb8(%rbp),%rax
mov    0xb0(%rbp),%rax
mov    0xa8(%rbp),%rax
mov    0xa0(%rbp),%rax
mov    0x98(%rbp),%rax
mov    0x90(%rbp),%rax
mov    0x88(%rbp),%rax
mov    0x80(%rbp),%rax
mov    0x78(%rbp),%rax
mov    0x70(%rbp),%rax
mov    0x68(%rbp),%rax
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %r8,-0x50(%rbp)
mov    %r9,-0x58(%rbp)
mov    0xd96(%rip),%ax
mov    %ax,-0x62(%rbp)
mov    0xd8e(%rip),%eax
mov    %eax,-0x66(%rbp)
mov    0xd89(%rip),%eax
mov    %eax,-0x6a(%rbp)
mov    0xd84(%rip),%eax
mov    %eax,-0x6e(%rbp)
mov    0xd7f(%rip),%eax
mov    %eax,-0x74(%rbp)
mov    0xd79(%rip),%ax
mov    %ax,-0x70(%rbp)
mov    0xd71(%rip),%eax
mov    %eax,-0x7a(%rbp)
mov    0xd6b(%rip),%ax
mov    %ax,-0x76(%rbp)
mov    0xd63(%rip),%eax
mov    %eax,-0x80(%rbp)
mov    0xd5d(%rip),%ax
mov    %ax,-0x7c(%rbp)
mov    0xd55(%rip),%eax
mov    %eax,-0x86(%rbp)
mov    0xd4c(%rip),%ax
mov    %ax,-0x82(%rbp)
mov    0xd41(%rip),%eax
mov    %eax,-0x8c(%rbp)
mov    0xd38(%rip),%ax
mov    %ax,-0x88(%rbp)
mov    0xd2d(%rip),%eax
mov    %eax,-0x92(%rbp)
mov    0xd24(%rip),%ax
mov    %ax,-0x8e(%rbp)
mov    0xd19(%rip),%eax
mov    %eax,-0x98(%rbp)
mov    0xd10(%rip),%ax
mov    %ax,-0x94(%rbp)
mov    0xd05(%rip),%eax
mov    %eax,-0x9e(%rbp)
mov    0xcfc(%rip),%ax
mov    %ax,-0x9a(%rbp)
mov    0xcf1(%rip),%eax
mov    %eax,-0xa4(%rbp)
mov    0xce8(%rip),%ax
mov    %ax,-0xa0(%rbp)
mov    0xcdd(%rip),%eax
mov    %eax,-0xaa(%rbp)
mov    0xcd4(%rip),%ax
mov    %ax,-0xa6(%rbp)
mov    0xcc9(%rip),%eax
mov    %eax,-0xb0(%rbp)
mov    0xcc0(%rip),%ax
mov    %ax,-0xac(%rbp)
mov    0xcb5(%rip),%eax
mov    %eax,-0xb6(%rbp)
mov    0xcac(%rip),%ax
mov    %ax,-0xb2(%rbp)
mov    0xca1(%rip),%eax
mov    %eax,-0xbc(%rbp)
mov    0xc98(%rip),%ax
mov    %ax,-0xb8(%rbp)
lea    -0x140(%rbp),%rdi
xor    %esi,%esi
mov    $0x84,%edx
call   1080 <memset@plt>
lea    -0x1c0(%rbp),%rdi
lea    0xd56(%rip),%rsi
mov    $0x3b,%edx
call   10a0 <memcpy@plt>
mov    0xc61(%rip),%ax
mov    %ax,-0x1c2(%rbp)
mov    0x28(%rbp),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x258(%rbp)
mov    %rax,-0x260(%rbp)
mov    0x28(%rbp),%rax
mov    (%rax),%eax
mov    %rax,-0x270(%rbp)
movl   $0x0,-0x274(%rbp)
movl   $0x1,-0x278(%rbp)
movl   $0x2,-0x27c(%rbp)
movl   $0x3,-0x280(%rbp)
movl   $0x4,-0x284(%rbp)
movl   $0x5,-0x288(%rbp)
movl   $0x6,-0x28c(%rbp)
movl   $0x7,-0x290(%rbp)
movl   $0x8,-0x294(%rbp)
movl   $0x9,-0x298(%rbp)
movl   $0xa,-0x29c(%rbp)
movl   $0xb,-0x2a0(%rbp)
movl   $0xc,-0x2a4(%rbp)
mov    0x58(%rbp),%rax
mov    0x4(%rax),%eax
add    $0x1,%eax
mov    %eax,-0x2c0(%rbp)
movl   $0x4,-0x2c4(%rbp)
mov    0xcb7(%rip),%rax
mov    %rax,-0x2e0(%rbp)
mov    0xcb1(%rip),%rax
mov    %rax,-0x2d8(%rbp)
mov    0xcab(%rip),%rax
mov    %rax,-0x2f0(%rbp)
mov    0xca5(%rip),%rax
mov    %rax,-0x2e8(%rbp)
mov    0xc9f(%rip),%rax
mov    %rax,-0x2f8(%rbp)
lea    -0x140(%rbp),%rdi
mov    0xa8(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x140(%rbp),%rdi
lea    0xb35(%rip),%rsi
call   10d0 <strcat@plt>
lea    -0x140(%rbp),%rdi
lea    0xb27(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x60(%rbp)
cmp    $0x0,%rax
jne    1572 <frd_se+0x3a2>
lea    0xb10(%rip),%rdi
call   1070 <printf@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
mov    $0x1,%edi
call   10b0 <atan@plt>
cvtsi2sd %eax,%xmm1
movsd  0xa80(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x308(%rbp)
ff
movl   $0x0,-0x1c8(%rbp)
movl   $0x1,-0x1cc(%rbp)
movl   $0x2,-0x264(%rbp)
movl   $0x3,-0x268(%rbp)
movsd  0xa3c(%rip),%xmm0
movsd  %xmm0,-0x310(%rbp)
ff
mov    -0x50(%rbp),%rax
cmpl   $0x0,(%rax)
je     16a2 <frd_se+0x4d2>
movl   $0x0,-0x2b4(%rbp)
movl   $0x0,-0x2b8(%rbp)
movl   $0x0,-0x2bc(%rbp)
movl   $0x0,-0x1d0(%rbp)
mov    -0x1d0(%rbp),%eax
mov    -0x38(%rbp),%rcx
cmp    (%rcx),%eax
jge    169d <frd_se+0x4cd>
mov    -0x48(%rbp),%rax
movslq -0x1d0(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    162d <frd_se+0x45d>
jmp    1689 <frd_se+0x4b9>
mov    -0x2b4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2b4(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x1d0(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    1660 <frd_se+0x490>
mov    -0x2b8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2b8(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x1d0(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jge    1684 <frd_se+0x4b4>
mov    -0x2bc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2bc(%rbp)
jmp    1689 <frd_se+0x4b9>
mov    -0x1d0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1d0(%rbp)
jmp    1601 <frd_se+0x431>
jmp    16ae <frd_se+0x4de>
mov    -0x38(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x2b4(%rbp)
mov    -0x38(%rbp),%rax
mov    (%rax),%eax
mov    %eax,0x29d6(%rip)
movl   $0x1,-0x1f0(%rbp)
mov    0x10(%rbp),%rdi
mov    0x78(%rbp),%rsi
mov    0x88(%rbp),%rcx
mov    0x90(%rbp),%r8
mov    0x98(%rbp),%r9
mov    -0x48(%rbp),%r13
mov    0x80(%rbp),%r14
mov    0x60(%rbp),%rax
lea    -0x1ec(%rbp),%rdx
lea    -0x1e8(%rbp),%r12
lea    -0x2b4(%rbp),%r15
lea    -0x2bc(%rbp),%rbx
lea    -0x2b8(%rbp),%r11
lea    -0x1f0(%rbp),%r10
sub    $0x40,%rsp
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14,0x18(%rsp)
mov    %rbx,0x20(%rsp)
mov    %r11,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %rax,0x38(%rsp)
call   1060 <frdset@plt>
add    $0x40,%rsp
mov    0x20(%rbp),%rdx
mov    0x48(%rbp),%r8
mov    0x70(%rbp),%r9
mov    0x40(%rbp),%rax
mov    %rax,-0x348(%rbp)
mov    0x50(%rbp),%r12
mov    -0x58(%rbp),%r15
mov    -0x50(%rbp),%r14
mov    -0x60(%rbp),%rbx
mov    0xb0(%rbp),%r11
mov    0x30(%rbp),%r10
mov    0x38(%rbp),%rax
mov    %rax,-0x340(%rbp)
lea    0x28fa(%rip),%rdi
lea    -0x310(%rbp),%rsi
lea    -0x308(%rbp),%rcx
lea    -0x1c8(%rbp),%rax
lea    -0x1e8(%rbp),%r13
sub    $0x50,%rsp
mov    %rax,(%rsp)
mov    -0x348(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x340(%rbp),%rax
mov    %r13,0x10(%rsp)
mov    %r12,0x18(%rsp)
mov    %r15,0x20(%rsp)
mov    %r14,0x28(%rsp)
mov    %rbx,0x30(%rsp)
mov    %r11,0x38(%rsp)
mov    %r10,0x40(%rsp)
mov    %rax,0x48(%rsp)
call   10f0 <frdheader@plt>
add    $0x50,%rsp
mov    -0x60(%rbp),%rdi
lea    0x8a4(%rip),%rsi
call   1090 <fprintf@plt>
mov    -0x60(%rbp),%rdi
lea    0x8ad(%rip),%rsi
call   1090 <fprintf@plt>
mov    -0x60(%rbp),%rdi
lea    0x8c0(%rip),%rsi
call   1090 <fprintf@plt>
mov    -0x60(%rbp),%rdi
lea    0x8d3(%rip),%rsi
call   1090 <fprintf@plt>
mov    -0x60(%rbp),%rdi
lea    0x8e6(%rip),%rsi
call   1090 <fprintf@plt>
mov    0xb8(%rbp),%rdi
mov    0xb8(%rbp),%rsi
mov    -0x48(%rbp),%r8
lea    -0x66(%rbp),%r9
mov    0x88(%rbp),%rax
mov    0x90(%rbp),%rcx
mov    %rcx,-0x338(%rbp)
mov    0x98(%rbp),%rcx
mov    %rcx,-0x330(%rbp)
mov    0x60(%rbp),%rcx
mov    %rcx,-0x328(%rbp)
lea    -0x2e0(%rbp),%r13
lea    -0x2f0(%rbp),%r12
lea    -0x2f8(%rbp),%r15
lea    -0x6a(%rbp),%rbx
mov    -0x60(%rbp),%r11
mov    0xb0(%rbp),%r10
lea    -0x6e(%rbp),%rcx
mov    %rcx,-0x318(%rbp)
lea    -0x1ec(%rbp),%rdx
lea    0x27c5(%rip),%rcx
lea    -0x2c4(%rbp),%r14
mov    %r14,-0x320(%rbp)
lea    -0x1f0(%rbp),%r14
sub    $0x70,%rsp
mov    %rax,(%rsp)
mov    -0x338(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x330(%rbp),%rax
mov    %rax,0x10(%rsp)
mov    -0x328(%rbp),%rax
mov    %rax,0x18(%rsp)
mov    -0x320(%rbp),%rax
mov    %rax,0x20(%rsp)
mov    -0x318(%rbp),%rax
mov    %r13,0x28(%rsp)
mov    %r12,0x30(%rsp)
mov    %r15,0x38(%rsp)
mov    %r14,0x40(%rsp)
mov    %rbx,0x48(%rsp)
mov    %r11,0x50(%rsp)
mov    %r10,0x58(%rsp)
mov    %rax,0x60(%rsp)
call   1040 <frdselect@plt>
add    $0x70,%rsp
mov    -0x60(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x258(%rbp),%rax
mov    %rax,%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<frd_se>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x108,%rsp
mov    %r9,0x30(%rsp)
mov    %r8,%r12
mov    %rcx,%r14
mov    %rsi,%r13
mov    %rsp,0x38(%rsp)
mov    0x1d8(%rsp),%rsi
movl   $0x312d20,0x24(%rsp)
movl   $0x322d20,0x20(%rsp)
movl   $0x332d20,0x1c(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movl   $0x0,0x100(%rsp)
movl   $0x4,0x8(%rsp)
movaps 0xdbf(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xdc3(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movq   $0x4,0x50(%rsp)
lea    0x80(%rsp),%rbp
mov    %rbp,%rdi
call   1030 <strcpy@plt>
lea    0xdae(%rip),%rsi
mov    %rbp,%rdi
call   10a0 <strcat@plt>
lea    0xda4(%rip),%rsi
mov    %rbp,%rdi
call   1090 <fopen@plt>
test   %rax,%rax
je     15c0 <frd_se+0x410>
mov    %rax,%r15
mov    0x1b8(%rsp),%rbp
mov    0x140(%rsp),%rbx
mov    $0x1,%edi
call   1080 <atan@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xd32(%rip),%xmm0
movsd  %xmm0,0x48(%rsp)
movl   $0x0,0x18(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x40(%rsp)
cmpl   $0x0,(%r12)
mov    0x0(%r13),%r8d
mov    %r12,0x28(%rsp)
je     133e <frd_se+0x18e>
mov    %rbx,%r9
test   %r8d,%r8d
jle    134f <frd_se+0x19f>
cmp    $0x1,%r8d
jne    1552 <frd_se+0x3a2>
xor    %edi,%edi
xor    %ebx,%ebx
xor    %edx,%edx
xor    %ecx,%ecx
mov    0x1a8(%rsp),%rsi
mov    %rbp,%r13
test   $0x1,%r8b
je     1360 <frd_se+0x1b0>
mov    (%r14,%rdi,4),%eax
test   %eax,%eax
je     1360 <frd_se+0x1b0>
add    $0x1,%ebx
test   %eax,%eax
jle    15b8 <frd_se+0x408>
add    $0x1,%ecx
jmp    1360 <frd_se+0x1b0>
mov    %rbp,%r13
mov    %r8d,(%rsp)
mov    0x1a8(%rsp),%rsi
jmp    136e <frd_se+0x1be>
xor    %ecx,%ecx
xor    %edx,%edx
xor    %ebx,%ebx
mov    0x1a8(%rsp),%rsi
mov    %rbp,%r13
mov    %ebx,(%rsp)
mov    %edx,0xc(%rsp)
mov    %ecx,0x10(%rsp)
mov    %r9,%rbx
mov    %r8d,0x2d0b(%rip)
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%rax
lea    0x10(%rsp),%r10
lea    0xc(%rsp),%r11
lea    0x5c(%rsp),%r12
lea    0x14(%rsp),%rdx
mov    %rbx,%rdi
mov    %r13,%rcx
mov    0x1c0(%rsp),%r8
mov    0x1c8(%rsp),%r9
mov    0x190(%rsp),%rbp
push   %rbp
push   %rax
push   %r10
push   %r11
push   0x1d0(%rsp)
lea    0x28(%rsp),%rax
push   %rax
push   %r12
push   %r14
call   1060 <frdset@plt>
add    $0x40,%rsp
lea    0x18(%rsp),%rax
lea    0x2c9c(%rip),%rdi
lea    0x40(%rsp),%rsi
lea    0x48(%rsp),%rcx
mov    0x150(%rsp),%rdx
mov    0x178(%rsp),%r8
mov    0x1a0(%rsp),%r9
push   0x168(%rsp)
push   0x168(%rsp)
mov    0x1f0(%rsp),%rbp
push   %rbp
push   %r15
push   0x48(%rsp)
push   0x58(%rsp)
push   0x1b0(%rsp)
push   %r12
push   0x1b0(%rsp)
push   %rax
call   10d0 <frdheader@plt>
add    $0x50,%rsp
lea    0xc27(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   10c0 <fwrite@plt>
lea    0xc27(%rip),%rdi
mov    $0x22,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   10c0 <fwrite@plt>
lea    0xc31(%rip),%rdi
mov    $0x22,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   10c0 <fwrite@plt>
lea    0xc3b(%rip),%rdi
mov    $0x22,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   10c0 <fwrite@plt>
lea    0xc45(%rip),%rdi
mov    $0x22,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   10c0 <fwrite@plt>
sub    $0x8,%rsp
lea    0x24(%rsp),%rax
lea    0x28(%rsp),%rbp
lea    0x58(%rsp),%r10
lea    0x68(%rsp),%r11
lea    0x78(%rsp),%r12
lea    0x10(%rsp),%rbx
lea    0x2c(%rsp),%r9
mov    0x1f0(%rsp),%rdi
mov    %rdi,%rsi
lea    0x1c(%rsp),%rdx
lea    0x2b88(%rip),%rcx
mov    %r14,%r8
push   %rax
push   0x1f0(%rsp)
push   %r15
push   %rbp
lea    0x2c(%rsp),%rax
push   %rax
push   %r10
push   %r11
push   %r12
push   %rbx
push   0x1e0(%rsp)
push   0x220(%rsp)
push   0x220(%rsp)
push   %r13
call   1040 <frdselect@plt>
add    $0x70,%rsp
mov    %r15,%rdi
call   1050 <fclose@plt>
mov    0x38(%rsp),%rsp
add    $0x108,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r8d,%eax
and    $0xfffffffe,%eax
xor    %edi,%edi
xor    %ebx,%ebx
xor    %edx,%edx
xor    %ecx,%ecx
mov    0x1a8(%rsp),%rsi
mov    %rbp,%r13
jmp    1580 <frd_se+0x3d0>
nopl   (%rax)
add    $0x1,%ecx
add    $0x2,%rdi
cmp    %rdi,%rax
je     1320 <frd_se+0x170>
mov    (%r14,%rdi,4),%ebp
test   %ebp,%ebp
je     15a3 <frd_se+0x3f3>
add    $0x1,%ebx
test   %ebp,%ebp
jle    15a0 <frd_se+0x3f0>
add    $0x1,%ecx
jmp    15a3 <frd_se+0x3f3>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%edx
mov    0x4(%r14,%rdi,4),%ebp
test   %ebp,%ebp
je     1573 <frd_se+0x3c3>
add    $0x1,%ebx
test   %ebp,%ebp
jg     1570 <frd_se+0x3c0>
add    $0x1,%edx
jmp    1573 <frd_se+0x3c3>
add    $0x1,%edx
jmp    1360 <frd_se+0x1b0>
lea    0xa71(%rip),%rdi
call   1070 <printf@plt>
xor    %edi,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@__const.frd_se.c = [2 x i8] c"C\00"
@__const.frd_se.m1 = [4 x i8] c" -1\00"
@__const.frd_se.m2 = [4 x i8] c" -2\00"
@__const.frd_se.m3 = [4 x i8] c" -3\00"
@__const.frd_se.p0 = [6 x i8] c" 0\00"
@__const.frd_se.p1 = [6 x i8] c" 1\00"
@__const.frd_se.p2 = [6 x i8] c" 2\00"
@__const.frd_se.p3 = [6 x i8] c" 3\00"
@__const.frd_se.p4 = [6 x i8] c" 4\00"
@__const.frd_se.p5 = [6 x i8] c" 5\00"
@__const.frd_se.p6 = [6 x i8] c" 6\00"
@__const.frd_se.p7 = [6 x i8] c" 7\00"
@__const.frd_se.p8 = [6 x i8] c" 8\00"
@__const.frd_se.p9 = [6 x i8] c" 9\00"
@__const.frd_se.p10 = [6 x i8] c" 10\00"
@__const.frd_se.p11 = [6 x i8] c" 11\00"
@__const.frd_se.p12 = [6 x i8] c" 12\00"
@__const.frd_se.material = [59 x i8] c" \00"
@__const.frd_se.text = [2 x i8] c" \00"
@frd_se.icounter = internal global i32 0
@frd_se.nkcoords = internal global i32 0
@frd_se.iaxial = internal global i32 0
@__const.frd_se.ifieldtensor = [4 x i32] [i32 1, i32 1, i32 1, i32 1]
@__const.frd_se.icomptensor = [4 x i32] [i32 0, i32 1, i32 2, i32 4]
@__const.frd_se.nfieldtensor = [2 x i32] [i32 4, i32 0]
@.str = [5 x i8] c".frd\00"
@.str.1 = [3 x i8] c"ab\00"
@.str.2 = [51 x i8] c"*ERROR in frd: cannot open frd file for writing...\00"
@.str.3 = [25 x i8] c" -4 SEN 4 1\0A\00"
@.str.4 = [35 x i8] c" -5 SENDX 1 2 1 0\0A\00"
@.str.5 = [35 x i8] c" -5 SENDY 1 2 2 0\0A\00"
@.str.6 = [35 x i8] c" -5 SENDZ 1 2 3 0\0A\00"
@.str.7 = [35 x i8] c" -5 SENNORM 1 2 4 0\0A\00"
define void @frd_se(double* %0, i32* %1, double* %2, i32* %3, i32* %4, i32* %5, i8* %6, double* %7, double* %8, i32* %9, i32* %10, i32* %11, i32* %12, i32* %13, i8* %14, i32* %15, i32* %16, i32* %17, double* %18, i8* %19, i32* %20, i32* %21, i32* %22, i32* %23, double* %24, i8* %25, i8* %26, double* %27, i32* %28) {
%30 = alloca double*
%31 = alloca i32*
%32 = alloca double*
%33 = alloca i32*
%34 = alloca i32*
%35 = alloca i32*
%36 = alloca i8*
%37 = alloca double*
%38 = alloca double*
%39 = alloca i32*
%40 = alloca i32*
%41 = alloca i32*
%42 = alloca i32*
%43 = alloca i32*
%44 = alloca i8*
%45 = alloca i32*
%46 = alloca i32*
%47 = alloca i32*
%48 = alloca double*
%49 = alloca i8*
%50 = alloca i32*
%51 = alloca i32*
%52 = alloca i32*
%53 = alloca i32*
%54 = alloca double*
%55 = alloca i8*
%56 = alloca i8*
%57 = alloca double*
%58 = alloca i32*
%59 = alloca i32*
%60 = alloca [2 x i8]
%61 = alloca [4 x i8]
%62 = alloca [4 x i8]
%63 = alloca [4 x i8]
%64 = alloca [6 x i8]
%65 = alloca [6 x i8]
%66 = alloca [6 x i8]
%67 = alloca [6 x i8]
%68 = alloca [6 x i8]
%69 = alloca [6 x i8]
%70 = alloca [6 x i8]
%71 = alloca [6 x i8]
%72 = alloca [6 x i8]
%73 = alloca [6 x i8]
%74 = alloca [6 x i8]
%75 = alloca [6 x i8]
%76 = alloca [6 x i8]
%77 = alloca [132 x i8]
%78 = alloca [8 x i8]
%79 = alloca [10 x i8]
%80 = alloca [21 x i8]
%81 = alloca [9 x i8]
%82 = alloca [59 x i8]
%83 = alloca [2 x i8]
%84 = alloca i32
%85 = alloca i32
%86 = alloca i32
%87 = alloca i32
%88 = alloca i32
%89 = alloca i32
%90 = alloca i32
%91 = alloca i32
%92 = alloca i32
%93 = alloca i32
%94 = alloca i32
%95 = alloca i32
%96 = alloca i32
%97 = alloca i32
%98 = alloca [7 x i32]
%99 = alloca [2 x i32]
%100 = alloca [7 x i32]
%101 = alloca i8*
%102 = alloca i64
%103 = alloca i32
%104 = alloca i32
%105 = alloca i64
%106 = alloca i32
%107 = alloca i32
%108 = alloca i32
%109 = alloca i32
%110 = alloca i32
%111 = alloca i32
%112 = alloca i32
%113 = alloca i32
%114 = alloca i32
%115 = alloca i32
%116 = alloca i32
%117 = alloca i32
%118 = alloca i32
%119 = alloca i32
%120 = alloca i32
%121 = alloca i32
%122 = alloca i32
%123 = alloca i32
%124 = alloca i32
%125 = alloca i32
%126 = alloca i32
%127 = alloca [4 x i32]
%128 = alloca [4 x i32]
%129 = alloca [2 x i32]
%130 = alloca i32
%131 = alloca float
%132 = alloca double
%133 = alloca double
store double* %0, double** %30
store i32* %1, i32** %31
store double* %2, double** %32
store i32* %3, i32** %33
store i32* %4, i32** %34
store i32* %5, i32** %35
store i8* %6, i8** %36
store double* %7, double** %37
store double* %8, double** %38
store i32* %9, i32** %39
store i32* %10, i32** %40
store i32* %11, i32** %41
store i32* %12, i32** %42
store i32* %13, i32** %43
store i8* %14, i8** %44
store i32* %15, i32** %45
store i32* %16, i32** %46
store i32* %17, i32** %47
store double* %18, double** %48
store i8* %19, i8** %49
store i32* %20, i32** %50
store i32* %21, i32** %51
store i32* %22, i32** %52
store i32* %23, i32** %53
store double* %24, double** %54
store i8* %25, i8** %55
store i8* %26, i8** %56
store double* %27, double** %57
store i32* %28, i32** %58
%134 = bitcast [2 x i8]* %60 to i8*
%135 = bitcast [4 x i8]* %61 to i8*
%136 = bitcast [4 x i8]* %62 to i8*
%137 = bitcast [4 x i8]* %63 to i8*
%138 = bitcast [6 x i8]* %64 to i8*
%139 = bitcast [6 x i8]* %65 to i8*
%140 = bitcast [6 x i8]* %66 to i8*
%141 = bitcast [6 x i8]* %67 to i8*
%142 = bitcast [6 x i8]* %68 to i8*
%143 = bitcast [6 x i8]* %69 to i8*
%144 = bitcast [6 x i8]* %70 to i8*
%145 = bitcast [6 x i8]* %71 to i8*
%146 = bitcast [6 x i8]* %72 to i8*
%147 = bitcast [6 x i8]* %73 to i8*
%148 = bitcast [6 x i8]* %74 to i8*
%149 = bitcast [6 x i8]* %75 to i8*
%150 = bitcast [6 x i8]* %76 to i8*
%151 = bitcast [132 x i8]* %77 to i8*
%152 = bitcast [59 x i8]* %82 to i8*
%153 = bitcast [2 x i8]* %83 to i8*
%154 = load i32*, i32** %39
%155 = load i32, i32* %154
%156 = zext i32 %155 to i64
%157 = call i8* @llvm.stacksave()
store i8* %157, i8** %101
%158 = alloca i32, i64 %156
store i64 %156, i64* %102
%159 = load i32*, i32** %39
%160 = load i32, i32* %159
%161 = zext i32 %160 to i64
%162 = alloca i32, i64 %161
store i64 %161, i64* %105
store i32 0, i32* %106
store i32 1, i32* %107
store i32 2, i32* %108
store i32 3, i32* %109
store i32 4, i32* %110
store i32 5, i32* %111
store i32 6, i32* %112
store i32 7, i32* %113
store i32 8, i32* %114
store i32 9, i32* %115
store i32 10, i32* %116
store i32 11, i32* %117
store i32 12, i32* %118
%163 = load i32*, i32** %45
%164 = getelementptr inbounds i32, i32* %163, i64 1
%165 = load i32, i32* %164
%166 = add nsw i32 %165, 1
store i32 %166, i32* %125
store i32 4, i32* %126
%167 = bitcast [4 x i32]* %127 to i8*
%168 = bitcast [4 x i32]* %128 to i8*
%169 = bitcast [2 x i32]* %129 to i8*
%170 = getelementptr inbounds [132 x i8], [132 x i8]* %77, i64 0, i64 0
%171 = load i8*, i8** %55
%172 = call i32 @strcpy(i8* %170, i8* %171)
%173 = getelementptr inbounds [132 x i8], [132 x i8]* %77, i64 0, i64 0
%174 = call i32 @strcat(i8* %173, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%175 = getelementptr inbounds [132 x i8], [132 x i8]* %77, i64 0, i64 0
%176 = call i32* @fopen(i8* %175, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %176, i32** %59
%177 = icmp eq i32* %176, null
br i1 %177, label %178, label %181
178: ; preds = %29
%179 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%180 = call i32 @exit(i32 0)
unreachable
181: ; preds = %29
%182 = call i32 @atan(i32 1)
%183 = sitofp i32 %182 to double
%184 = fmul double 4.000000e+00, %183
store double %184, double* %132
store i32 0, i32* %84
store i32 1, i32* %85
store i32 2, i32* %103
store i32 3, i32* %104
store double 1.000000e+00, double* %133
%185 = load i32*, i32** %34
%186 = load i32, i32* %185
%187 = icmp ne i32 %186, 0
br i1 %187, label %188, label %229
188: ; preds = %181
store i32 0, i32* %122
store i32 0, i32* %123
store i32 0, i32* %124
store i32 0, i32* %86
br label %189
189: ; preds = %225, %188
%190 = load i32, i32* %86
%191 = load i32*, i32** %31
%192 = load i32, i32* %191
%193 = icmp slt i32 %190, %192
br i1 %193, label %194, label %228
194: ; preds = %189
%195 = load i32*, i32** %33
%196 = load i32, i32* %86
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds i32, i32* %195, i64 %197
%199 = load i32, i32* %198
%200 = icmp eq i32 %199, 0
br i1 %200, label %201, label %202
201: ; preds = %194
br label %225
202: ; preds = %194
%203 = load i32, i32* %122
%204 = add nsw i32 %203, 1
store i32 %204, i32* %122
%205 = load i32*, i32** %33
%206 = load i32, i32* %86
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds i32, i32* %205, i64 %207
%209 = load i32, i32* %208
%210 = icmp sgt i32 %209, 0
br i1 %210, label %211, label %214
211: ; preds = %202
%212 = load i32, i32* %123
%213 = add nsw i32 %212, 1
store i32 %213, i32* %123
br label %214
214: ; preds = %211, %202
%215 = load i32*, i32** %33
%216 = load i32, i32* %86
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds i32, i32* %215, i64 %217
%219 = load i32, i32* %218
%220 = icmp slt i32 %219, 0
br i1 %220, label %221, label %224
221: ; preds = %214
%222 = load i32, i32* %124
%223 = add nsw i32 %222, 1
store i32 %223, i32* %124
br label %224
224: ; preds = %221, %214
br label %225
225: ; preds = %224, %201
%226 = load i32, i32* %86
%227 = add nsw i32 %226, 1
store i32 %227, i32* %86
br label %189
228: ; preds = %189
br label %232
229: ; preds = %181
%230 = load i32*, i32** %31
%231 = load i32, i32* %230
store i32 %231, i32* %122
br label %232
232: ; preds = %229, %228
%233 = load i32*, i32** %31
%234 = load i32, i32* %233
store i32 %234, i32* @frd_se.nkcoords
store i32 1, i32* %94
%235 = load i8*, i8** %36
%236 = load i8*, i8** %49
%237 = load i32*, i32** %51
%238 = load i32*, i32** %52
%239 = load i32*, i32** %53
%240 = load i32*, i32** %33
%241 = load i32*, i32** %50
%242 = load i32*, i32** %46
%243 = call i32 @frdset(i8* %235, i8* %236, i32* %93, i32* %237, i32* %238, i32* %239, i32* %240, i32* %92, i32* %122, i32* %241, i32* %124, i32* %123, i32* %94, i32* %242)
%244 = load double*, double** %38
%245 = load i32*, i32** %43
%246 = load double*, double** %48
%247 = load i32*, i32** %42
%248 = load i8*, i8** %44
%249 = load i32*, i32** %35
%250 = load i32*, i32** %34
%251 = load i32*, i32** %59
%252 = load i8*, i8** %56
%253 = load i32*, i32** %40
%254 = load i32*, i32** %41
%255 = call i32 @frdheader(i32* @frd_se.icounter, double* %133, double* %244, double* %132, i32* %245, double* %246, i32* %84, i32* %247, i32* %92, i8* %248, i32* %249, i32* %250, i32* %251, i8* %252, i32* %253, i32* %254)
%256 = load i32*, i32** %59
%257 = call i32 @fprintf(i32* %256, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%258 = load i32*, i32** %59
%259 = call i32 @fprintf(i32* %258, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
%260 = load i32*, i32** %59
%261 = call i32 @fprintf(i32* %260, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
%262 = load i32*, i32** %59
%263 = call i32 @fprintf(i32* %262, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0))
%264 = load i32*, i32** %59
%265 = call i32 @fprintf(i32* %264, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0))
%266 = load double*, double** %57
%267 = load double*, double** %57
%268 = load i32*, i32** %33
%269 = getelementptr inbounds [4 x i8], [4 x i8]* %61, i64 0, i64 0
%270 = load i32*, i32** %51
%271 = load i32*, i32** %52
%272 = load i32*, i32** %53
%273 = load i32*, i32** %46
%274 = getelementptr inbounds [4 x i32], [4 x i32]* %127, i64 0, i64 0
%275 = getelementptr inbounds [4 x i32], [4 x i32]* %128, i64 0, i64 0
%276 = getelementptr inbounds [2 x i32], [2 x i32]* %129, i64 0, i64 0
%277 = getelementptr inbounds [4 x i8], [4 x i8]* %62, i64 0, i64 0
%278 = load i32*, i32** %59
%279 = load i8*, i8** %56
%280 = getelementptr inbounds [4 x i8], [4 x i8]* %63, i64 0, i64 0
%281 = call i32 @frdselect(double* %266, double* %267, i32* %93, i32* @frd_se.nkcoords, i32* %268, i8* %269, i32* %270, i32* %271, i32* %272, i32* %273, i32* %126, i32* %274, i32* %275, i32* %276, i32* %94, i8* %277, i32* %278, i8* %279, i8* %280)
%282 = load i32*, i32** %59
%283 = call i32 @fclose(i32* %282)
%284 = load i8*, i8** %101
ret void
}

LLVM IR (-O2):
@frd_se.icounter = internal global i32 0
@frd_se.nkcoords = internal global i32 0
@__const.frd_se.ifieldtensor = [4 x i32] [i32 1, i32 1, i32 1, i32 1]
@__const.frd_se.icomptensor = [4 x i32] [i32 0, i32 1, i32 2, i32 4]
@.str = [5 x i8] c".frd\00"
@.str.1 = [3 x i8] c"ab\00"
@.str.2 = [51 x i8] c"*ERROR in frd: cannot open frd file for writing...\00"
@.str.3 = [25 x i8] c" -4 SEN 4 1\0A\00"
@.str.4 = [35 x i8] c" -5 SENDX 1 2 1 0\0A\00"
@.str.5 = [35 x i8] c" -5 SENDY 1 2 2 0\0A\00"
@.str.6 = [35 x i8] c" -5 SENDZ 1 2 3 0\0A\00"
@.str.7 = [35 x i8] c" -5 SENNORM 1 2 4 0\0A\00"
define void @frd_se(double* nocapture readnone %0, i32* nocapture %1, double* nocapture readnone %2, i32* %3, i32* %4, i32* %5, i8* %6, double* nocapture readnone %7, double* %8, i32* nocapture readnone %9, i32* %10, i32* %11, i32* %12, i32* %13, i8* %14, i32* nocapture readnone %15, i32* %16, i32* nocapture readnone %17, double* %18, i8* %19, i32* %20, i32* %21, i32* %22, i32* %23, double* nocapture readnone %24, i8* %25, i8* %26, double* %27, i32* nocapture readnone %28) {
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca [132 x i8]
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32
%39 = alloca i32
%40 = alloca i32
%41 = alloca i32
%42 = alloca [4 x i32]
%43 = alloca [4 x i32]
%44 = alloca i64
%45 = alloca double
%46 = alloca double
%47 = bitcast i32* %30 to i8*
store i32 3222816, i32* %30
%48 = bitcast i32* %31 to i8*
store i32 3288352, i32* %31
%49 = bitcast i32* %32 to i8*
store i32 3353888, i32* %32
%50 = getelementptr inbounds [132 x i8], [132 x i8]* %33, i64 0, i64 0
%51 = bitcast i32* %34 to i8*
%52 = bitcast i32* %35 to i8*
%53 = bitcast i32* %36 to i8*
%54 = bitcast i32* %37 to i8*
%55 = tail call i8* @llvm.stacksave()
%56 = bitcast i32* %38 to i8*
%57 = bitcast i32* %39 to i8*
%58 = bitcast i32* %40 to i8*
%59 = bitcast i32* %41 to i8*
store i32 4, i32* %41
%60 = bitcast [4 x i32]* %42 to i8*
%61 = bitcast [4 x i32]* %43 to i8*
%62 = bitcast i64* %44 to i8*
store i64 4, i64* %44
%63 = bitcast double* %45 to i8*
%64 = bitcast double* %46 to i8*
%65 = call i32 @strcpy(i8* %50, i8* %25)
%66 = call i32 @strcat(i8* %50, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%67 = call i32* @fopen(i8* %50, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%68 = icmp eq i32* %67, null
br i1 %68, label %69, label %72
69: ; preds = %29
%70 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%71 = call i32 @exit(i32 0)
unreachable
72: ; preds = %29
%73 = call i32 @atan(i32 1)
%74 = sitofp i32 %73 to double
%75 = fmul double %74, 4.000000e+00
store double %75, double* %45
store i32 0, i32* %34
store double 1.000000e+00, double* %46
%76 = load i32, i32* %4
%77 = icmp eq i32 %76, 0
%78 = load i32, i32* %1
br i1 %77, label %125, label %79
79: ; preds = %72
%80 = icmp sgt i32 %78, 0
br i1 %80, label %81, label %146
81: ; preds = %79
%82 = zext i32 %78 to i64
%83 = and i64 %82, 1
%84 = icmp eq i32 %78, 1
br i1 %84, label %126, label %85
85: ; preds = %81
%86 = and i64 %82, 4294967294
br label %87
87: ; preds = %118, %85
%88 = phi i64 [ 0, %85 ], [ %122, %118 ]
%89 = phi i32 [ 0, %85 ], [ %121, %118 ]
%90 = phi i32 [ 0, %85 ], [ %120, %118 ]
%91 = phi i32 [ 0, %85 ], [ %119, %118 ]
%92 = phi i64 [ 0, %85 ], [ %123, %118 ]
%93 = getelementptr inbounds i32, i32* %3, i64 %88
%94 = load i32, i32* %93
%95 = icmp eq i32 %94, 0
br i1 %95, label %103, label %96
96: ; preds = %87
%97 = add nsw i32 %89, 1
%98 = icmp sgt i32 %94, 0
br i1 %98, label %99, label %101
99: ; preds = %96
%100 = add nsw i32 %91, 1
br label %103
101: ; preds = %96
%102 = add nsw i32 %90, 1
br label %103
103: ; preds = %99, %101, %87
%104 = phi i32 [ %100, %99 ], [ %91, %101 ], [ %91, %87 ]
%105 = phi i32 [ %90, %99 ], [ %102, %101 ], [ %90, %87 ]
%106 = phi i32 [ %97, %99 ], [ %97, %101 ], [ %89, %87 ]
%107 = or i64 %88, 1
%108 = getelementptr inbounds i32, i32* %3, i64 %107
%109 = load i32, i32* %108
%110 = icmp eq i32 %109, 0
br i1 %110, label %118, label %111
111: ; preds = %103
%112 = add nsw i32 %106, 1
%113 = icmp sgt i32 %109, 0
br i1 %113, label %116, label %114
114: ; preds = %111
%115 = add nsw i32 %105, 1
br label %118
116: ; preds = %111
%117 = add nsw i32 %104, 1
br label %118
118: ; preds = %116, %114, %103
%119 = phi i32 [ %117, %116 ], [ %104, %114 ], [ %104, %103 ]
%120 = phi i32 [ %105, %116 ], [ %115, %114 ], [ %105, %103 ]
%121 = phi i32 [ %112, %116 ], [ %112, %114 ], [ %106, %103 ]
%122 = add nuw nsw i64 %88, 2
%123 = add i64 %92, 2
%124 = icmp eq i64 %123, %86
br i1 %124, label %126, label %87
125: ; preds = %72
store i32 %78, i32* %38
br label %150
126: ; preds = %118, %81
%127 = phi i32 [ undef, %81 ], [ %119, %118 ]
%128 = phi i32 [ undef, %81 ], [ %120, %118 ]
%129 = phi i32 [ undef, %81 ], [ %121, %118 ]
%130 = phi i64 [ 0, %81 ], [ %122, %118 ]
%131 = phi i32 [ 0, %81 ], [ %121, %118 ]
%132 = phi i32 [ 0, %81 ], [ %120, %118 ]
%133 = phi i32 [ 0, %81 ], [ %119, %118 ]
%134 = icmp eq i64 %83, 0
br i1 %134, label %146, label %135
135: ; preds = %126
%136 = getelementptr inbounds i32, i32* %3, i64 %130
%137 = load i32, i32* %136
%138 = icmp eq i32 %137, 0
br i1 %138, label %146, label %139
139: ; preds = %135
%140 = add nsw i32 %131, 1
%141 = icmp sgt i32 %137, 0
br i1 %141, label %144, label %142
142: ; preds = %139
%143 = add nsw i32 %132, 1
br label %146
144: ; preds = %139
%145 = add nsw i32 %133, 1
br label %146
146: ; preds = %126, %144, %142, %135, %79
%147 = phi i32 [ 0, %79 ], [ %127, %126 ], [ %145, %144 ], [ %133, %142 ], [ %133, %135 ]
%148 = phi i32 [ 0, %79 ], [ %128, %126 ], [ %132, %144 ], [ %143, %142 ], [ %132, %135 ]
%149 = phi i32 [ 0, %79 ], [ %129, %126 ], [ %140, %144 ], [ %140, %142 ], [ %131, %135 ]
store i32 %149, i32* %38
store i32 %148, i32* %40
store i32 %147, i32* %39
br label %150
150: ; preds = %146, %125
store i32 %78, i32* @frd_se.nkcoords
store i32 1, i32* %37
%151 = call i32 @frdset(i8* %6, i8* %19, i32* %36, i32* %21, i32* %22, i32* %23, i32* %3, i32* %35, i32* %38, i32* %20, i32* %40, i32* %39, i32* %37, i32* %16)
%152 = call i32 @frdheader(i32* @frd_se.icounter, double* %46, double* %8, double* %45, i32* %13, double* %18, i32* %34, i32* %12, i32* %35, i8* %14, i32* %5, i32* %4, i32* %67, i8* %26, i32* %10, i32* %11)
%153 = call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i64 24, i64 1, i32* %67)
%154 = call i64 @fwrite(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i64 34, i64 1, i32* %67)
%155 = call i64 @fwrite(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i64 34, i64 1, i32* %67)
%156 = call i64 @fwrite(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i64 34, i64 1, i32* %67)
%157 = call i64 @fwrite(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), i64 34, i64 1, i32* %67)
%158 = getelementptr inbounds [4 x i32], [4 x i32]* %42, i64 0, i64 0
%159 = getelementptr inbounds [4 x i32], [4 x i32]* %43, i64 0, i64 0
%160 = bitcast i64* %44 to i32*
%161 = call i32 @frdselect(double* %27, double* %27, i32* %36, i32* @frd_se.nkcoords, i32* %3, i8* %47, i32* %21, i32* %22, i32* %23, i32* %16, i32* %41, i32* %158, i32* %159, i32* %160, i32* %37, i8* %48, i32* %67, i8* %26, i8* %49)
%162 = call i32 @fclose(i32* %67)
ret void
}