#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*/ frdset(char *, char *, int *, int *, int *, int *, int *,
                          int *, int *, int *, int *, int *, int *, int *);
int /*<<< orphan*/ frdvector(double *, int *, int *, char *, int *, int *,
                             char *, int *, double *, double *, int *, int *,
                             int *, int *, int *, int /*<<< orphan*/ *, char *,
                             char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcmp1(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strcpy1(char *, char *, int);
void frd_orien_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 *v, int *iobject, char *objectset, int *ntrans,
                  int *inotr, double *trab, int *idesvar, char *orname) {
  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[132];
  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 = 2, ifieldtensor[4] = {1, 1}, icomptensor[2] = {0, 1},
      nfieldtensor[2] = {2, 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;
  if (strcmp1(&objectset[*iobject * 243], "DISPLACEMENT") == 0) {
    frdset(&filab[4002], 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);
    strcpy1(&text[0], " -4  SENMASS     4    1", 23);
    strcpy1(&text[5], &orname[0], 5);
    if (*idesvar - (*idesvar / 3) * 3 == 0) {
      strcpy1(&text[10], "_Rx", 3);
      text[23] = '\0';
      fprintf(f1, "%s\n", text);
      fprintf(f1, " -5  dD1dRx      1    2    1    0\n");
      fprintf(f1, " -5  dD2dRx      1    2    1    0\n");
      fprintf(f1, " -5  dD3dRx      1    2    1    0\n");
    } else if (*idesvar - (*idesvar / 3) * 3 == 1) {
      strcpy1(&text[10], "_Ry", 3);
      text[23] = '\0';
      fprintf(f1, "%s\n", text);
      fprintf(f1, " -5  dD1dRy      1    2    1    0\n");
      fprintf(f1, " -5  dD2dRy      1    2    1    0\n");
      fprintf(f1, " -5  dD3dRy      1    2    1    0\n");
    } else {
      strcpy1(&text[10], "_Rz", 3);
      text[23] = '\0';
      fprintf(f1, "%s\n", text);
      fprintf(f1, " -5  dD1dRz      1    2    1    0\n");
      fprintf(f1, " -5  dD2dRz      1    2    1    0\n");
      fprintf(f1, " -5  dD3dRz      1    2    1    0\n");
    }
    fprintf(f1, " -5  ALL         1    2    0    0    1ALL\n");
    frdvector(v, &iset, ntrans, &filab[4002], &nkcoords, inum, m1, inotr, trab,
              co, istartset, iendset, ialset, mi, ngraph, f1, output, m3);
  }
  fclose(f1);
  return;
}


x86 assembly (clang, -O0):
<frd_orien_se>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3b8,%rsp
mov    0xf0(%rbp),%rax
mov    0xe8(%rbp),%rax
mov    0xe0(%rbp),%rax
mov    0xd8(%rbp),%rax
mov    0xd0(%rbp),%rax
mov    0xc8(%rbp),%rax
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    0xd54(%rip),%ax
mov    %ax,-0x62(%rbp)
mov    0xd4c(%rip),%eax
mov    %eax,-0x66(%rbp)
mov    0xd47(%rip),%eax
mov    %eax,-0x6a(%rbp)
mov    0xd42(%rip),%eax
mov    %eax,-0x6e(%rbp)
mov    0xd3d(%rip),%eax
mov    %eax,-0x74(%rbp)
mov    0xd37(%rip),%ax
mov    %ax,-0x70(%rbp)
mov    0xdcb(%rip),%eax
mov    %eax,-0x7a(%rbp)
mov    0xdc5(%rip),%ax
mov    %ax,-0x76(%rbp)
mov    0xd1b(%rip),%eax
mov    %eax,-0x80(%rbp)
mov    0xd15(%rip),%ax
mov    %ax,-0x7c(%rbp)
mov    0xd0d(%rip),%eax
mov    %eax,-0x86(%rbp)
mov    0xd04(%rip),%ax
mov    %ax,-0x82(%rbp)
mov    0xcf9(%rip),%eax
mov    %eax,-0x8c(%rbp)
mov    0xcf0(%rip),%ax
mov    %ax,-0x88(%rbp)
mov    0xce5(%rip),%eax
mov    %eax,-0x92(%rbp)
mov    0xcdc(%rip),%ax
mov    %ax,-0x8e(%rbp)
mov    0xcd1(%rip),%eax
mov    %eax,-0x98(%rbp)
mov    0xcc8(%rip),%ax
mov    %ax,-0x94(%rbp)
mov    0xcbd(%rip),%eax
mov    %eax,-0x9e(%rbp)
mov    0xcb4(%rip),%ax
mov    %ax,-0x9a(%rbp)
mov    0xca9(%rip),%eax
mov    %eax,-0xa4(%rbp)
mov    0xca0(%rip),%ax
mov    %ax,-0xa0(%rbp)
mov    0xc95(%rip),%eax
mov    %eax,-0xaa(%rbp)
mov    0xc8c(%rip),%ax
mov    %ax,-0xa6(%rbp)
mov    0xc81(%rip),%eax
mov    %eax,-0xb0(%rbp)
mov    0xc78(%rip),%ax
mov    %ax,-0xac(%rbp)
mov    0xc6d(%rip),%eax
mov    %eax,-0xb6(%rbp)
mov    0xc64(%rip),%ax
mov    %ax,-0xb2(%rbp)
mov    0xc59(%rip),%eax
mov    %eax,-0xbc(%rbp)
mov    0xc50(%rip),%ax
mov    %ax,-0xb8(%rbp)
lea    -0x140(%rbp),%rdi
xor    %esi,%esi
mov    $0x84,%edx
call   1090 <memset@plt>
lea    -0x1c0(%rbp),%rdi
lea    0xe0c(%rip),%rsi
mov    $0x3b,%edx
call   10c0 <memcpy@plt>
mov    0x28(%rbp),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x2e8(%rbp)
mov    %rax,-0x2f0(%rbp)
mov    0x28(%rbp),%rax
mov    (%rax),%eax
mov    %rax,-0x300(%rbp)
movl   $0x0,-0x304(%rbp)
movl   $0x1,-0x308(%rbp)
movl   $0x2,-0x30c(%rbp)
movl   $0x3,-0x310(%rbp)
movl   $0x4,-0x314(%rbp)
movl   $0x5,-0x318(%rbp)
movl   $0x6,-0x31c(%rbp)
movl   $0x7,-0x320(%rbp)
movl   $0x8,-0x324(%rbp)
movl   $0x9,-0x328(%rbp)
movl   $0xa,-0x32c(%rbp)
movl   $0xb,-0x330(%rbp)
movl   $0xc,-0x334(%rbp)
mov    0x58(%rbp),%rax
mov    0x4(%rax),%eax
add    $0x1,%eax
mov    %eax,-0x350(%rbp)
movl   $0x2,-0x354(%rbp)
mov    0xd7b(%rip),%rax
mov    %rax,-0x370(%rbp)
mov    0xd75(%rip),%rax
mov    %rax,-0x368(%rbp)
mov    0xadf(%rip),%rax
mov    %rax,-0x378(%rbp)
mov    0xd61(%rip),%rax
mov    %rax,-0x380(%rbp)
lea    -0x140(%rbp),%rdi
mov    0xa8(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x140(%rbp),%rdi
lea    0xb07(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x140(%rbp),%rdi
lea    0xaf9(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,-0x60(%rbp)
cmp    $0x0,%rax
jne    15a0 <frd_orien_se+0x3b0>
lea    0xae2(%rip),%rdi
call   1080 <printf@plt>
xor    %edi,%edi
call   1100 <exit@plt>
mov    $0x1,%edi
call   10d0 <atan@plt>
cvtsi2sd %eax,%xmm1
movsd  0xa52(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x390(%rbp)
ff
movl   $0x0,-0x254(%rbp)
movl   $0x1,-0x258(%rbp)
movl   $0x2,-0x2f4(%rbp)
movl   $0x3,-0x2f8(%rbp)
movsd  0xa0e(%rip),%xmm0
movsd  %xmm0,-0x398(%rbp)
ff
mov    -0x50(%rbp),%rax
cmpl   $0x0,(%rax)
je     16d0 <frd_orien_se+0x4e0>
movl   $0x0,-0x344(%rbp)
movl   $0x0,-0x348(%rbp)
movl   $0x0,-0x34c(%rbp)
movl   $0x0,-0x25c(%rbp)
mov    -0x25c(%rbp),%eax
mov    -0x38(%rbp),%rcx
cmp    (%rcx),%eax
jge    16cb <frd_orien_se+0x4db>
mov    -0x48(%rbp),%rax
movslq -0x25c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    165b <frd_orien_se+0x46b>
jmp    16b7 <frd_orien_se+0x4c7>
mov    -0x344(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x344(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x25c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    168e <frd_orien_se+0x49e>
mov    -0x348(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x348(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x25c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jge    16b2 <frd_orien_se+0x4c2>
mov    -0x34c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34c(%rbp)
jmp    16b7 <frd_orien_se+0x4c7>
mov    -0x25c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x25c(%rbp)
jmp    162f <frd_orien_se+0x43f>
jmp    16dc <frd_orien_se+0x4ec>
mov    -0x38(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x344(%rbp)
mov    -0x38(%rbp),%rax
mov    (%rax),%eax
mov    %eax,0x29b8(%rip)
movl   $0x1,-0x27c(%rbp)
mov    0xc8(%rbp),%rdi
mov    0xc0(%rbp),%rax
imul   $0xf3,(%rax),%eax
cltq
add    %rax,%rdi
lea    0x997(%rip),%rsi
call   1040 <strcmp1@plt>
cmp    $0x0,%rax
jne    1b62 <frd_orien_se+0x972>
mov    0x10(%rbp),%rdi
add    $0xfa2,%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    -0x278(%rbp),%rdx
lea    -0x274(%rbp),%r12
lea    -0x344(%rbp),%r15
lea    -0x34c(%rbp),%rbx
lea    -0x348(%rbp),%r11
lea    -0x27c(%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   1070 <frdset@plt>
add    $0x40,%rsp
mov    0x20(%rbp),%rdx
mov    0x48(%rbp),%r8
mov    0x70(%rbp),%r9
mov    0x40(%rbp),%rax
mov    %rax,-0x3b0(%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,-0x3a8(%rbp)
lea    0x28a6(%rip),%rdi
lea    -0x398(%rbp),%rsi
lea    -0x390(%rbp),%rcx
lea    -0x254(%rbp),%rax
lea    -0x274(%rbp),%r13
sub    $0x50,%rsp
mov    %rax,(%rsp)
mov    -0x3b0(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x3a8(%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   1110 <frdheader@plt>
add    $0x50,%rsp
lea    -0x250(%rbp),%rdi
lea    0x84a(%rip),%rsi
mov    $0x17,%edx
call   10b0 <strcpy1@plt>
lea    -0x250(%rbp),%rdi
add    $0x5,%rdi
mov    0xf0(%rbp),%rsi
mov    $0x5,%edx
call   10b0 <strcpy1@plt>
mov    0xe8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x39c(%rbp)
mov    0xe8(%rbp),%rax
mov    (%rax),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x39c(%rbp),%eax
imul   $0x3,%ecx,%ecx
sub    %ecx,%eax
cmp    $0x0,%eax
jne    193f <frd_orien_se+0x74f>
lea    -0x250(%rbp),%rdi
add    $0xa,%rdi
lea    0x7f4(%rip),%rsi
mov    $0x3,%edx
call   10b0 <strcpy1@plt>
movb   $0x0,-0x239(%rbp)
mov    -0x60(%rbp),%rdi
lea    -0x250(%rbp),%rdx
lea    0x7d5(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x60(%rbp),%rdi
lea    0x7c7(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x60(%rbp),%rdi
lea    0x7d8(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x60(%rbp),%rdi
lea    0x7e9(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    1a63 <frd_orien_se+0x873>
mov    0xe8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x3b4(%rbp)
mov    0xe8(%rbp),%rax
mov    (%rax),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x3b4(%rbp),%eax
imul   $0x3,%ecx,%ecx
sub    %ecx,%eax
cmp    $0x1,%eax
jne    19ec <frd_orien_se+0x7fc>
lea    -0x250(%rbp),%rdi
add    $0xa,%rdi
lea    0x7b8(%rip),%rsi
mov    $0x3,%edx
call   10b0 <strcpy1@plt>
movb   $0x0,-0x239(%rbp)
mov    -0x60(%rbp),%rdi
lea    -0x250(%rbp),%rdx
lea    0x728(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x60(%rbp),%rdi
lea    0x787(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x60(%rbp),%rdi
lea    0x798(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x60(%rbp),%rdi
lea    0x7a9(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    1a5e <frd_orien_se+0x86e>
lea    -0x250(%rbp),%rdi
add    $0xa,%rdi
lea    0x7ae(%rip),%rsi
mov    $0x3,%edx
call   10b0 <strcpy1@plt>
movb   $0x0,-0x239(%rbp)
mov    -0x60(%rbp),%rdi
lea    -0x250(%rbp),%rdx
lea    0x6b1(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x60(%rbp),%rdi
lea    0x77d(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x60(%rbp),%rdi
lea    0x78e(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x60(%rbp),%rdi
lea    0x79f(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
jmp    1a63 <frd_orien_se+0x873>
mov    -0x60(%rbp),%rdi
lea    0x7ab(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    0xb8(%rbp),%rdi
mov    0xd0(%rbp),%rdx
mov    0x10(%rbp),%rcx
add    $0xfa2,%rcx
mov    -0x48(%rbp),%r9
lea    -0x66(%rbp),%rax
mov    0xd8(%rbp),%rsi
mov    %rsi,-0x3d8(%rbp)
mov    0xe0(%rbp),%rsi
mov    %rsi,-0x3d0(%rbp)
mov    -0x30(%rbp),%rsi
mov    %rsi,-0x3c8(%rbp)
mov    0x88(%rbp),%r13
mov    0x90(%rbp),%r12
mov    0x98(%rbp),%r15
mov    0x58(%rbp),%r14
mov    0x60(%rbp),%rbx
mov    -0x60(%rbp),%r11
mov    0xb0(%rbp),%r10
lea    -0x6e(%rbp),%rsi
mov    %rsi,-0x3c0(%rbp)
lea    -0x278(%rbp),%rsi
lea    0x25a2(%rip),%r8
sub    $0x60,%rsp
mov    %rax,(%rsp)
mov    -0x3d8(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x3d0(%rbp),%rax
mov    %rax,0x10(%rsp)
mov    -0x3c8(%rbp),%rax
mov    %rax,0x18(%rsp)
mov    -0x3c0(%rbp),%rax
mov    %r13,0x20(%rsp)
mov    %r12,0x28(%rsp)
mov    %r15,0x30(%rsp)
mov    %r14,0x38(%rsp)
mov    %rbx,0x40(%rsp)
mov    %r11,0x48(%rsp)
mov    %r10,0x50(%rsp)
mov    %rax,0x58(%rsp)
call   1050 <frdvector@plt>
add    $0x60,%rsp
mov    -0x60(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x2e8(%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_orien_se>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x168,%rsp
mov    %r9,0x20(%rsp)
mov    %r8,%r13
mov    %rcx,%rbx
mov    %rsi,%r14
mov    %rdi,0x28(%rsp)
mov    %rsp,0x30(%rsp)
mov    0x238(%rsp),%rsi
movl   $0x312d20,0x1c(%rsp)
movl   $0x332d20,0x18(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movl   $0x0,0xd0(%rsp)
lea    0x50(%rsp),%rbp
mov    %rbp,%rdi
call   1030 <strcpy@plt>
lea    0xd8e(%rip),%rsi
mov    %rbp,%rdi
call   10d0 <strcat@plt>
lea    0xd84(%rip),%rsi
mov    %rbp,%rdi
call   10c0 <fopen@plt>
test   %rax,%rax
je     1698 <frd_orien_se+0x4b8>
mov    %rax,%r15
mov    0x258(%rsp),%r12
mov    0x250(%rsp),%rbp
mov    $0x1,%edi
call   10b0 <atan@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xd3a(%rip),%xmm0
movsd  %xmm0,0x40(%rsp)
movl   $0x0,0x14(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x38(%rsp)
cmpl   $0x0,0x0(%r13)
mov    (%r14),%r8d
je     1324 <frd_orien_se+0x144>
test   %r8d,%r8d
jle    132d <frd_orien_se+0x14d>
cmp    $0x1,%r8d
jne    14cf <frd_orien_se+0x2ef>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %rbp,%r9
test   $0x1,%r8b
je     1336 <frd_orien_se+0x156>
mov    (%rbx,%rdi,4),%eax
test   %eax,%eax
je     1336 <frd_orien_se+0x156>
add    $0x1,%esi
test   %eax,%eax
jle    1690 <frd_orien_se+0x4b0>
add    $0x1,%ecx
jmp    1336 <frd_orien_se+0x156>
mov    %r8d,(%rsp)
mov    %rbp,%r9
jmp    1341 <frd_orien_se+0x161>
xor    %ecx,%ecx
xor    %edx,%edx
xor    %esi,%esi
mov    %rbp,%r9
mov    %esi,(%rsp)
mov    %edx,0x4(%rsp)
mov    %ecx,0x8(%rsp)
mov    %r8d,0x2d50(%rip)
movl   $0x1,0xc(%rsp)
movslq (%r9),%rax
imul   $0xf3,%rax,%rax
add    %rax,%r12
lea    0xcdf(%rip),%rsi
mov    %r12,%rdi
call   1040 <strcmp1@plt>
test   %rax,%rax
jne    1671 <frd_orien_se+0x491>
mov    0x228(%rsp),%r9
mov    0x220(%rsp),%r8
mov    0x218(%rsp),%rcx
mov    0x208(%rsp),%rsi
mov    0x1a0(%rsp),%r12
add    $0xfa2,%r12
lea    0xc(%rsp),%rax
lea    0x8(%rsp),%rbp
lea    0x4(%rsp),%r10
mov    %rsp,%r11
lea    0x4c(%rsp),%r14
lea    0x10(%rsp),%rdx
mov    %r12,%rdi
push   0x1f0(%rsp)
push   %rax
push   %rbp
push   %r10
push   0x230(%rsp)
push   %r11
push   %r14
push   %rbx
call   1070 <frdset@plt>
add    $0x40,%rsp
lea    0x14(%rsp),%rax
lea    0x2ca5(%rip),%rdi
lea    0x38(%rsp),%rsi
lea    0x40(%rsp),%rcx
mov    0x1b0(%rsp),%rdx
mov    0x1d8(%rsp),%r8
mov    0x200(%rsp),%r9
push   0x1c8(%rsp)
push   0x1c8(%rsp)
push   0x250(%rsp)
push   %r15
push   %r13
push   0x48(%rsp)
push   0x210(%rsp)
push   %r14
push   0x210(%rsp)
push   %rax
call   1100 <frdheader@plt>
add    $0x50,%rsp
lea    0xc01(%rip),%rsi
lea    0xe0(%rsp),%rdi
mov    $0x17,%edx
call   10a0 <strcpy1@plt>
lea    0xe5(%rsp),%rdi
mov    0x280(%rsp),%rsi
mov    $0x5,%edx
call   10a0 <strcpy1@plt>
mov    0x278(%rsp),%rax
movslq (%rax),%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
je     1537 <frd_orien_se+0x357>
cmp    $0x1,%eax
jne    1555 <frd_orien_se+0x375>
lea    0xc6e(%rip),%r14
lea    0xc44(%rip),%r13
lea    0xc1a(%rip),%rbp
lea    0xc0f(%rip),%rsi
jmp    1571 <frd_orien_se+0x391>
mov    %r8d,%eax
and    $0xfffffffe,%eax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %rbp,%r9
jmp    1500 <frd_orien_se+0x320>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ecx
add    $0x2,%rdi
cmp    %rdi,%rax
je     1307 <frd_orien_se+0x127>
mov    (%rbx,%rdi,4),%ebp
test   %ebp,%ebp
je     1523 <frd_orien_se+0x343>
add    $0x1,%esi
test   %ebp,%ebp
jle    1520 <frd_orien_se+0x340>
add    $0x1,%ecx
jmp    1523 <frd_orien_se+0x343>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%edx
mov    0x4(%rbx,%rdi,4),%ebp
test   %ebp,%ebp
je     14f3 <frd_orien_se+0x313>
add    $0x1,%esi
test   %ebp,%ebp
jg     14f0 <frd_orien_se+0x310>
add    $0x1,%edx
jmp    14f3 <frd_orien_se+0x313>
lea    0xb78(%rip),%r14
lea    0xb4e(%rip),%r13
lea    0xb24(%rip),%rbp
lea    0xb15(%rip),%rsi
jmp    1571 <frd_orien_se+0x391>
lea    0xc34(%rip),%r14
lea    0xc0a(%rip),%r13
lea    0xbe0(%rip),%rbp
lea    0xbd5(%rip),%rsi
lea    0xea(%rsp),%rdi
mov    $0x3,%edx
call   10a0 <strcpy1@plt>
movb   $0x0,0xf7(%rsp)
lea    0xada(%rip),%rsi
lea    0xe0(%rsp),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    $0x22,%esi
mov    $0x1,%edx
mov    %rbp,%rdi
mov    %r15,%rcx
call   10f0 <fwrite@plt>
mov    $0x22,%esi
mov    $0x1,%edx
mov    %r13,%rdi
mov    %r15,%rcx
call   10f0 <fwrite@plt>
mov    $0x22,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %r15,%rcx
call   10f0 <fwrite@plt>
lea    0xbc9(%rip),%rdi
mov    $0x2a,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   10f0 <fwrite@plt>
lea    0x18(%rsp),%rbp
lea    0x1c(%rsp),%rax
lea    0x2a8b(%rip),%r8
lea    0x10(%rsp),%rsi
mov    0x248(%rsp),%rdi
mov    0x260(%rsp),%rdx
mov    %r12,%rcx
mov    %rbx,%r9
push   %rbp
push   0x248(%rsp)
push   %r15
push   0x208(%rsp)
push   0x208(%rsp)
push   0x250(%rsp)
push   0x250(%rsp)
push   0x250(%rsp)
push   0x68(%rsp)
push   0x2b8(%rsp)
push   0x2b8(%rsp)
push   %rax
call   1050 <frdvector@plt>
add    $0x60,%rsp
mov    %r15,%rdi
call   1060 <fclose@plt>
mov    0x30(%rsp),%rsp
add    $0x168,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
add    $0x1,%edx
jmp    1336 <frd_orien_se+0x156>
lea    0x971(%rip),%rdi
call   1080 <printf@plt>
xor    %edi,%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
@__const.frd_orien_se.c = [2 x i8] c"C\00"
@__const.frd_orien_se.m1 = [4 x i8] c" -1\00"
@__const.frd_orien_se.m2 = [4 x i8] c" -2\00"
@__const.frd_orien_se.m3 = [4 x i8] c" -3\00"
@__const.frd_orien_se.p0 = [6 x i8] c" 0\00"
@__const.frd_orien_se.p1 = [6 x i8] c" 1\00"
@__const.frd_orien_se.p2 = [6 x i8] c" 2\00"
@__const.frd_orien_se.p3 = [6 x i8] c" 3\00"
@__const.frd_orien_se.p4 = [6 x i8] c" 4\00"
@__const.frd_orien_se.p5 = [6 x i8] c" 5\00"
@__const.frd_orien_se.p6 = [6 x i8] c" 6\00"
@__const.frd_orien_se.p7 = [6 x i8] c" 7\00"
@__const.frd_orien_se.p8 = [6 x i8] c" 8\00"
@__const.frd_orien_se.p9 = [6 x i8] c" 9\00"
@__const.frd_orien_se.p10 = [6 x i8] c" 10\00"
@__const.frd_orien_se.p11 = [6 x i8] c" 11\00"
@__const.frd_orien_se.p12 = [6 x i8] c" 12\00"
@__const.frd_orien_se.material = [59 x i8] c" \00"
@frd_orien_se.icounter = internal global i32 0
@frd_orien_se.nkcoords = internal global i32 0
@frd_orien_se.iaxial = internal global i32 0
@__const.frd_orien_se.ifieldtensor = [4 x i32] [i32 1, i32 1, i32 0, i32 0]
@__const.frd_orien_se.icomptensor = [2 x i32] [i32 0, i32 1]
@__const.frd_orien_se.nfieldtensor = [2 x i32] [i32 2, 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 = [13 x i8] c"DISPLACEMENT\00"
@.str.4 = [24 x i8] c" -4 SENMASS 4 1\00"
@.str.5 = [4 x i8] c"_Rx\00"
@.str.6 = [4 x i8] c"%s\0A\00"
@.str.7 = [35 x i8] c" -5 dD1dRx 1 2 1 0\0A\00"
@.str.8 = [35 x i8] c" -5 dD2dRx 1 2 1 0\0A\00"
@.str.9 = [35 x i8] c" -5 dD3dRx 1 2 1 0\0A\00"
@.str.10 = [4 x i8] c"_Ry\00"
@.str.11 = [35 x i8] c" -5 dD1dRy 1 2 1 0\0A\00"
@.str.12 = [35 x i8] c" -5 dD2dRy 1 2 1 0\0A\00"
@.str.13 = [35 x i8] c" -5 dD3dRy 1 2 1 0\0A\00"
@.str.14 = [4 x i8] c"_Rz\00"
@.str.15 = [35 x i8] c" -5 dD1dRz 1 2 1 0\0A\00"
@.str.16 = [35 x i8] c" -5 dD2dRz 1 2 1 0\0A\00"
@.str.17 = [35 x i8] c" -5 dD3dRz 1 2 1 0\0A\00"
@.str.18 = [43 x i8] c" -5 ALL 1 2 0 0 1ALL\0A\00"
define void @frd_orien_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, i8* %29, i32* %30, i32* %31, double* %32, i32* %33, i8* %34) {
%36 = alloca double*
%37 = alloca i32*
%38 = alloca double*
%39 = alloca i32*
%40 = alloca i32*
%41 = alloca i32*
%42 = alloca i8*
%43 = alloca double*
%44 = alloca double*
%45 = alloca i32*
%46 = alloca i32*
%47 = alloca i32*
%48 = alloca i32*
%49 = alloca i32*
%50 = alloca i8*
%51 = alloca i32*
%52 = alloca i32*
%53 = alloca i32*
%54 = alloca double*
%55 = alloca i8*
%56 = alloca i32*
%57 = alloca i32*
%58 = alloca i32*
%59 = alloca i32*
%60 = alloca double*
%61 = alloca i8*
%62 = alloca i8*
%63 = alloca double*
%64 = alloca i32*
%65 = alloca i8*
%66 = alloca i32*
%67 = alloca i32*
%68 = alloca double*
%69 = alloca i32*
%70 = alloca i8*
%71 = alloca i32*
%72 = alloca [2 x i8]
%73 = alloca [4 x i8]
%74 = alloca [4 x i8]
%75 = alloca [4 x i8]
%76 = alloca [6 x i8]
%77 = alloca [6 x i8]
%78 = alloca [6 x i8]
%79 = alloca [6 x i8]
%80 = alloca [6 x i8]
%81 = alloca [6 x i8]
%82 = alloca [6 x i8]
%83 = alloca [6 x i8]
%84 = alloca [6 x i8]
%85 = alloca [6 x i8]
%86 = alloca [6 x i8]
%87 = alloca [6 x i8]
%88 = alloca [6 x i8]
%89 = alloca [132 x i8]
%90 = alloca [8 x i8]
%91 = alloca [10 x i8]
%92 = alloca [21 x i8]
%93 = alloca [9 x i8]
%94 = alloca [59 x i8]
%95 = alloca [132 x i8]
%96 = alloca i32
%97 = alloca i32
%98 = alloca i32
%99 = alloca i32
%100 = alloca i32
%101 = alloca i32
%102 = alloca i32
%103 = alloca i32
%104 = alloca i32
%105 = alloca i32
%106 = alloca i32
%107 = alloca i32
%108 = alloca i32
%109 = alloca i32
%110 = alloca [7 x i32]
%111 = alloca [2 x i32]
%112 = alloca [7 x i32]
%113 = alloca i8*
%114 = alloca i64
%115 = alloca i32
%116 = alloca i32
%117 = alloca i64
%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 i32
%128 = alloca i32
%129 = alloca i32
%130 = alloca i32
%131 = alloca i32
%132 = alloca i32
%133 = alloca i32
%134 = alloca i32
%135 = alloca i32
%136 = alloca i32
%137 = alloca i32
%138 = alloca i32
%139 = alloca [4 x i32]
%140 = alloca [2 x i32]
%141 = alloca [2 x i32]
%142 = alloca i32
%143 = alloca float
%144 = alloca double
%145 = alloca double
store double* %0, double** %36
store i32* %1, i32** %37
store double* %2, double** %38
store i32* %3, i32** %39
store i32* %4, i32** %40
store i32* %5, i32** %41
store i8* %6, i8** %42
store double* %7, double** %43
store double* %8, double** %44
store i32* %9, i32** %45
store i32* %10, i32** %46
store i32* %11, i32** %47
store i32* %12, i32** %48
store i32* %13, i32** %49
store i8* %14, i8** %50
store i32* %15, i32** %51
store i32* %16, i32** %52
store i32* %17, i32** %53
store double* %18, double** %54
store i8* %19, i8** %55
store i32* %20, i32** %56
store i32* %21, i32** %57
store i32* %22, i32** %58
store i32* %23, i32** %59
store double* %24, double** %60
store i8* %25, i8** %61
store i8* %26, i8** %62
store double* %27, double** %63
store i32* %28, i32** %64
store i8* %29, i8** %65
store i32* %30, i32** %66
store i32* %31, i32** %67
store double* %32, double** %68
store i32* %33, i32** %69
store i8* %34, i8** %70
%146 = bitcast [2 x i8]* %72 to i8*
%147 = bitcast [4 x i8]* %73 to i8*
%148 = bitcast [4 x i8]* %74 to i8*
%149 = bitcast [4 x i8]* %75 to i8*
%150 = bitcast [6 x i8]* %76 to i8*
%151 = bitcast [6 x i8]* %77 to i8*
%152 = bitcast [6 x i8]* %78 to i8*
%153 = bitcast [6 x i8]* %79 to i8*
%154 = bitcast [6 x i8]* %80 to i8*
%155 = bitcast [6 x i8]* %81 to i8*
%156 = bitcast [6 x i8]* %82 to i8*
%157 = bitcast [6 x i8]* %83 to i8*
%158 = bitcast [6 x i8]* %84 to i8*
%159 = bitcast [6 x i8]* %85 to i8*
%160 = bitcast [6 x i8]* %86 to i8*
%161 = bitcast [6 x i8]* %87 to i8*
%162 = bitcast [6 x i8]* %88 to i8*
%163 = bitcast [132 x i8]* %89 to i8*
%164 = bitcast [59 x i8]* %94 to i8*
%165 = load i32*, i32** %45
%166 = load i32, i32* %165
%167 = zext i32 %166 to i64
%168 = call i8* @llvm.stacksave()
store i8* %168, i8** %113
%169 = alloca i32, i64 %167
store i64 %167, i64* %114
%170 = load i32*, i32** %45
%171 = load i32, i32* %170
%172 = zext i32 %171 to i64
%173 = alloca i32, i64 %172
store i64 %172, i64* %117
store i32 0, i32* %118
store i32 1, i32* %119
store i32 2, i32* %120
store i32 3, i32* %121
store i32 4, i32* %122
store i32 5, i32* %123
store i32 6, i32* %124
store i32 7, i32* %125
store i32 8, i32* %126
store i32 9, i32* %127
store i32 10, i32* %128
store i32 11, i32* %129
store i32 12, i32* %130
%174 = load i32*, i32** %51
%175 = getelementptr inbounds i32, i32* %174, i64 1
%176 = load i32, i32* %175
%177 = add nsw i32 %176, 1
store i32 %177, i32* %137
store i32 2, i32* %138
%178 = bitcast [4 x i32]* %139 to i8*
%179 = bitcast [2 x i32]* %140 to i8*
%180 = bitcast [2 x i32]* %141 to i8*
%181 = getelementptr inbounds [132 x i8], [132 x i8]* %89, i64 0, i64 0
%182 = load i8*, i8** %61
%183 = call i32 @strcpy(i8* %181, i8* %182)
%184 = getelementptr inbounds [132 x i8], [132 x i8]* %89, i64 0, i64 0
%185 = call i32 @strcat(i8* %184, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%186 = getelementptr inbounds [132 x i8], [132 x i8]* %89, i64 0, i64 0
%187 = call i32* @fopen(i8* %186, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %187, i32** %71
%188 = icmp eq i32* %187, null
br i1 %188, label %189, label %192
189: ; preds = %35
%190 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%191 = call i32 @exit(i32 0)
unreachable
192: ; preds = %35
%193 = call i32 @atan(i32 1)
%194 = sitofp i32 %193 to double
%195 = fmul double 4.000000e+00, %194
store double %195, double* %144
store i32 0, i32* %96
store i32 1, i32* %97
store i32 2, i32* %115
store i32 3, i32* %116
store double 1.000000e+00, double* %145
%196 = load i32*, i32** %40
%197 = load i32, i32* %196
%198 = icmp ne i32 %197, 0
br i1 %198, label %199, label %240
199: ; preds = %192
store i32 0, i32* %134
store i32 0, i32* %135
store i32 0, i32* %136
store i32 0, i32* %98
br label %200
200: ; preds = %236, %199
%201 = load i32, i32* %98
%202 = load i32*, i32** %37
%203 = load i32, i32* %202
%204 = icmp slt i32 %201, %203
br i1 %204, label %205, label %239
205: ; preds = %200
%206 = load i32*, i32** %39
%207 = load i32, i32* %98
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds i32, i32* %206, i64 %208
%210 = load i32, i32* %209
%211 = icmp eq i32 %210, 0
br i1 %211, label %212, label %213
212: ; preds = %205
br label %236
213: ; preds = %205
%214 = load i32, i32* %134
%215 = add nsw i32 %214, 1
store i32 %215, i32* %134
%216 = load i32*, i32** %39
%217 = load i32, i32* %98
%218 = sext i32 %217 to i64
%219 = getelementptr inbounds i32, i32* %216, i64 %218
%220 = load i32, i32* %219
%221 = icmp sgt i32 %220, 0
br i1 %221, label %222, label %225
222: ; preds = %213
%223 = load i32, i32* %135
%224 = add nsw i32 %223, 1
store i32 %224, i32* %135
br label %225
225: ; preds = %222, %213
%226 = load i32*, i32** %39
%227 = load i32, i32* %98
%228 = sext i32 %227 to i64
%229 = getelementptr inbounds i32, i32* %226, i64 %228
%230 = load i32, i32* %229
%231 = icmp slt i32 %230, 0
br i1 %231, label %232, label %235
232: ; preds = %225
%233 = load i32, i32* %136
%234 = add nsw i32 %233, 1
store i32 %234, i32* %136
br label %235
235: ; preds = %232, %225
br label %236
236: ; preds = %235, %212
%237 = load i32, i32* %98
%238 = add nsw i32 %237, 1
store i32 %238, i32* %98
br label %200
239: ; preds = %200
br label %243
240: ; preds = %192
%241 = load i32*, i32** %37
%242 = load i32, i32* %241
store i32 %242, i32* %134
br label %243
243: ; preds = %240, %239
%244 = load i32*, i32** %37
%245 = load i32, i32* %244
store i32 %245, i32* @frd_orien_se.nkcoords
store i32 1, i32* %106
%246 = load i8*, i8** %65
%247 = load i32*, i32** %64
%248 = load i32, i32* %247
%249 = mul nsw i32 %248, 243
%250 = sext i32 %249 to i64
%251 = getelementptr inbounds i8, i8* %246, i64 %250
%252 = call i64 @strcmp1(i8* %251, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%253 = icmp eq i64 %252, 0
br i1 %253, label %254, label %361
254: ; preds = %243
%255 = load i8*, i8** %42
%256 = getelementptr inbounds i8, i8* %255, i64 4002
%257 = load i8*, i8** %55
%258 = load i32*, i32** %57
%259 = load i32*, i32** %58
%260 = load i32*, i32** %59
%261 = load i32*, i32** %39
%262 = load i32*, i32** %56
%263 = load i32*, i32** %52
%264 = call i32 @frdset(i8* %256, i8* %257, i32* %105, i32* %258, i32* %259, i32* %260, i32* %261, i32* %104, i32* %134, i32* %262, i32* %136, i32* %135, i32* %106, i32* %263)
%265 = load double*, double** %44
%266 = load i32*, i32** %49
%267 = load double*, double** %54
%268 = load i32*, i32** %48
%269 = load i8*, i8** %50
%270 = load i32*, i32** %41
%271 = load i32*, i32** %40
%272 = load i32*, i32** %71
%273 = load i8*, i8** %62
%274 = load i32*, i32** %46
%275 = load i32*, i32** %47
%276 = call i32 @frdheader(i32* @frd_orien_se.icounter, double* %145, double* %265, double* %144, i32* %266, double* %267, i32* %96, i32* %268, i32* %104, i8* %269, i32* %270, i32* %271, i32* %272, i8* %273, i32* %274, i32* %275)
%277 = getelementptr inbounds [132 x i8], [132 x i8]* %95, i64 0, i64 0
%278 = call i32 @strcpy1(i8* %277, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 23)
%279 = getelementptr inbounds [132 x i8], [132 x i8]* %95, i64 0, i64 5
%280 = load i8*, i8** %70
%281 = getelementptr inbounds i8, i8* %280, i64 0
%282 = call i32 @strcpy1(i8* %279, i8* %281, i32 5)
%283 = load i32*, i32** %69
%284 = load i32, i32* %283
%285 = load i32*, i32** %69
%286 = load i32, i32* %285
%287 = sdiv i32 %286, 3
%288 = mul nsw i32 %287, 3
%289 = sub nsw i32 %284, %288
%290 = icmp eq i32 %289, 0
br i1 %290, label %291, label %304
291: ; preds = %254
%292 = getelementptr inbounds [132 x i8], [132 x i8]* %95, i64 0, i64 10
%293 = call i32 @strcpy1(i8* %292, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%294 = getelementptr inbounds [132 x i8], [132 x i8]* %95, i64 0, i64 23
store i8 0, i8* %294
%295 = load i32*, i32** %71
%296 = getelementptr inbounds [132 x i8], [132 x i8]* %95, i64 0, i64 0
%297 = call i32 (i32*, i8*, ...) @fprintf(i32* %295, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %296)
%298 = load i32*, i32** %71
%299 = call i32 (i32*, i8*, ...) @fprintf(i32* %298, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0))
%300 = load i32*, i32** %71
%301 = call i32 (i32*, i8*, ...) @fprintf(i32* %300, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0))
%302 = load i32*, i32** %71
%303 = call i32 (i32*, i8*, ...) @fprintf(i32* %302, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0))
br label %340
304: ; preds = %254
%305 = load i32*, i32** %69
%306 = load i32, i32* %305
%307 = load i32*, i32** %69
%308 = load i32, i32* %307
%309 = sdiv i32 %308, 3
%310 = mul nsw i32 %309, 3
%311 = sub nsw i32 %306, %310
%312 = icmp eq i32 %311, 1
br i1 %312, label %313, label %326
313: ; preds = %304
%314 = getelementptr inbounds [132 x i8], [132 x i8]* %95, i64 0, i64 10
%315 = call i32 @strcpy1(i8* %314, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 3)
%316 = getelementptr inbounds [132 x i8], [132 x i8]* %95, i64 0, i64 23
store i8 0, i8* %316
%317 = load i32*, i32** %71
%318 = getelementptr inbounds [132 x i8], [132 x i8]* %95, i64 0, i64 0
%319 = call i32 (i32*, i8*, ...) @fprintf(i32* %317, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %318)
%320 = load i32*, i32** %71
%321 = call i32 (i32*, i8*, ...) @fprintf(i32* %320, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0))
%322 = load i32*, i32** %71
%323 = call i32 (i32*, i8*, ...) @fprintf(i32* %322, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.12, i64 0, i64 0))
%324 = load i32*, i32** %71
%325 = call i32 (i32*, i8*, ...) @fprintf(i32* %324, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.13, i64 0, i64 0))
br label %339
326: ; preds = %304
%327 = getelementptr inbounds [132 x i8], [132 x i8]* %95, i64 0, i64 10
%328 = call i32 @strcpy1(i8* %327, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 3)
%329 = getelementptr inbounds [132 x i8], [132 x i8]* %95, i64 0, i64 23
store i8 0, i8* %329
%330 = load i32*, i32** %71
%331 = getelementptr inbounds [132 x i8], [132 x i8]* %95, i64 0, i64 0
%332 = call i32 (i32*, i8*, ...) @fprintf(i32* %330, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %331)
%333 = load i32*, i32** %71
%334 = call i32 (i32*, i8*, ...) @fprintf(i32* %333, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0))
%335 = load i32*, i32** %71
%336 = call i32 (i32*, i8*, ...) @fprintf(i32* %335, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.16, i64 0, i64 0))
%337 = load i32*, i32** %71
%338 = call i32 (i32*, i8*, ...) @fprintf(i32* %337, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.17, i64 0, i64 0))
br label %339
339: ; preds = %326, %313
br label %340
340: ; preds = %339, %291
%341 = load i32*, i32** %71
%342 = call i32 (i32*, i8*, ...) @fprintf(i32* %341, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.18, i64 0, i64 0))
%343 = load double*, double** %63
%344 = load i32*, i32** %66
%345 = load i8*, i8** %42
%346 = getelementptr inbounds i8, i8* %345, i64 4002
%347 = load i32*, i32** %39
%348 = getelementptr inbounds [4 x i8], [4 x i8]* %73, i64 0, i64 0
%349 = load i32*, i32** %67
%350 = load double*, double** %68
%351 = load double*, double** %36
%352 = load i32*, i32** %57
%353 = load i32*, i32** %58
%354 = load i32*, i32** %59
%355 = load i32*, i32** %51
%356 = load i32*, i32** %52
%357 = load i32*, i32** %71
%358 = load i8*, i8** %62
%359 = getelementptr inbounds [4 x i8], [4 x i8]* %75, i64 0, i64 0
%360 = call i32 @frdvector(double* %343, i32* %105, i32* %344, i8* %346, i32* @frd_orien_se.nkcoords, i32* %347, i8* %348, i32* %349, double* %350, double* %351, i32* %352, i32* %353, i32* %354, i32* %355, i32* %356, i32* %357, i8* %358, i8* %359)
br label %361
361: ; preds = %340, %243
%362 = load i32*, i32** %71
%363 = call i32 @fclose(i32* %362)
%364 = load i8*, i8** %113
ret void
}

LLVM IR (-O2):
@frd_orien_se.icounter = internal global i32 0
@frd_orien_se.nkcoords = internal global 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 = [13 x i8] c"DISPLACEMENT\00"
@.str.4 = [24 x i8] c" -4 SENMASS 4 1\00"
@.str.5 = [4 x i8] c"_Rx\00"
@.str.6 = [4 x i8] c"%s\0A\00"
@.str.7 = [35 x i8] c" -5 dD1dRx 1 2 1 0\0A\00"
@.str.8 = [35 x i8] c" -5 dD2dRx 1 2 1 0\0A\00"
@.str.9 = [35 x i8] c" -5 dD3dRx 1 2 1 0\0A\00"
@.str.10 = [4 x i8] c"_Ry\00"
@.str.11 = [35 x i8] c" -5 dD1dRy 1 2 1 0\0A\00"
@.str.12 = [35 x i8] c" -5 dD2dRy 1 2 1 0\0A\00"
@.str.13 = [35 x i8] c" -5 dD3dRy 1 2 1 0\0A\00"
@.str.14 = [4 x i8] c"_Rz\00"
@.str.15 = [35 x i8] c" -5 dD1dRz 1 2 1 0\0A\00"
@.str.16 = [35 x i8] c" -5 dD2dRz 1 2 1 0\0A\00"
@.str.17 = [35 x i8] c" -5 dD3dRz 1 2 1 0\0A\00"
@.str.18 = [43 x i8] c" -5 ALL 1 2 0 0 1ALL\0A\00"
define void @frd_orien_se(double* %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* %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 %28, i8* %29, i32* %30, i32* %31, double* %32, i32* nocapture %33, i8* %34) {
%36 = alloca i32
%37 = alloca i32
%38 = alloca [132 x i8]
%39 = alloca [132 x i8]
%40 = alloca i32
%41 = alloca i32
%42 = alloca i32
%43 = alloca i32
%44 = alloca i32
%45 = alloca i32
%46 = alloca i32
%47 = alloca double
%48 = alloca double
%49 = bitcast i32* %36 to i8*
store i32 3222816, i32* %36
%50 = bitcast i32* %37 to i8*
store i32 3353888, i32* %37
%51 = getelementptr inbounds [132 x i8], [132 x i8]* %38, i64 0, i64 0
%52 = getelementptr inbounds [132 x i8], [132 x i8]* %39, i64 0, i64 0
%53 = bitcast i32* %40 to i8*
%54 = bitcast i32* %41 to i8*
%55 = bitcast i32* %42 to i8*
%56 = bitcast i32* %43 to i8*
%57 = tail call i8* @llvm.stacksave()
%58 = bitcast i32* %44 to i8*
%59 = bitcast i32* %45 to i8*
%60 = bitcast i32* %46 to i8*
%61 = bitcast double* %47 to i8*
%62 = bitcast double* %48 to i8*
%63 = call i32 @strcpy(i8* %51, i8* %25)
%64 = call i32 @strcat(i8* %51, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%65 = call i32* @fopen(i8* %51, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%66 = icmp eq i32* %65, null
br i1 %66, label %67, label %70
67: ; preds = %35
%68 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%69 = call i32 @exit(i32 0)
unreachable
70: ; preds = %35
%71 = call i32 @atan(i32 1)
%72 = sitofp i32 %71 to double
%73 = fmul double %72, 4.000000e+00
store double %73, double* %47
store i32 0, i32* %40
store double 1.000000e+00, double* %48
%74 = load i32, i32* %4
%75 = icmp eq i32 %74, 0
%76 = load i32, i32* %1
br i1 %75, label %123, label %77
77: ; preds = %70
%78 = icmp sgt i32 %76, 0
br i1 %78, label %79, label %144
79: ; preds = %77
%80 = zext i32 %76 to i64
%81 = and i64 %80, 1
%82 = icmp eq i32 %76, 1
br i1 %82, label %124, label %83
83: ; preds = %79
%84 = and i64 %80, 4294967294
br label %85
85: ; preds = %116, %83
%86 = phi i64 [ 0, %83 ], [ %120, %116 ]
%87 = phi i32 [ 0, %83 ], [ %119, %116 ]
%88 = phi i32 [ 0, %83 ], [ %118, %116 ]
%89 = phi i32 [ 0, %83 ], [ %117, %116 ]
%90 = phi i64 [ 0, %83 ], [ %121, %116 ]
%91 = getelementptr inbounds i32, i32* %3, i64 %86
%92 = load i32, i32* %91
%93 = icmp eq i32 %92, 0
br i1 %93, label %101, label %94
94: ; preds = %85
%95 = add nsw i32 %87, 1
%96 = icmp sgt i32 %92, 0
br i1 %96, label %97, label %99
97: ; preds = %94
%98 = add nsw i32 %89, 1
br label %101
99: ; preds = %94
%100 = add nsw i32 %88, 1
br label %101
101: ; preds = %97, %99, %85
%102 = phi i32 [ %98, %97 ], [ %89, %99 ], [ %89, %85 ]
%103 = phi i32 [ %88, %97 ], [ %100, %99 ], [ %88, %85 ]
%104 = phi i32 [ %95, %97 ], [ %95, %99 ], [ %87, %85 ]
%105 = or i64 %86, 1
%106 = getelementptr inbounds i32, i32* %3, i64 %105
%107 = load i32, i32* %106
%108 = icmp eq i32 %107, 0
br i1 %108, label %116, label %109
109: ; preds = %101
%110 = add nsw i32 %104, 1
%111 = icmp sgt i32 %107, 0
br i1 %111, label %114, label %112
112: ; preds = %109
%113 = add nsw i32 %103, 1
br label %116
114: ; preds = %109
%115 = add nsw i32 %102, 1
br label %116
116: ; preds = %114, %112, %101
%117 = phi i32 [ %115, %114 ], [ %102, %112 ], [ %102, %101 ]
%118 = phi i32 [ %103, %114 ], [ %113, %112 ], [ %103, %101 ]
%119 = phi i32 [ %110, %114 ], [ %110, %112 ], [ %104, %101 ]
%120 = add nuw nsw i64 %86, 2
%121 = add i64 %90, 2
%122 = icmp eq i64 %121, %84
br i1 %122, label %124, label %85
123: ; preds = %70
store i32 %76, i32* %44
br label %148
124: ; preds = %116, %79
%125 = phi i32 [ undef, %79 ], [ %117, %116 ]
%126 = phi i32 [ undef, %79 ], [ %118, %116 ]
%127 = phi i32 [ undef, %79 ], [ %119, %116 ]
%128 = phi i64 [ 0, %79 ], [ %120, %116 ]
%129 = phi i32 [ 0, %79 ], [ %119, %116 ]
%130 = phi i32 [ 0, %79 ], [ %118, %116 ]
%131 = phi i32 [ 0, %79 ], [ %117, %116 ]
%132 = icmp eq i64 %81, 0
br i1 %132, label %144, label %133
133: ; preds = %124
%134 = getelementptr inbounds i32, i32* %3, i64 %128
%135 = load i32, i32* %134
%136 = icmp eq i32 %135, 0
br i1 %136, label %144, label %137
137: ; preds = %133
%138 = add nsw i32 %129, 1
%139 = icmp sgt i32 %135, 0
br i1 %139, label %142, label %140
140: ; preds = %137
%141 = add nsw i32 %130, 1
br label %144
142: ; preds = %137
%143 = add nsw i32 %131, 1
br label %144
144: ; preds = %124, %142, %140, %133, %77
%145 = phi i32 [ 0, %77 ], [ %125, %124 ], [ %143, %142 ], [ %131, %140 ], [ %131, %133 ]
%146 = phi i32 [ 0, %77 ], [ %126, %124 ], [ %130, %142 ], [ %141, %140 ], [ %130, %133 ]
%147 = phi i32 [ 0, %77 ], [ %127, %124 ], [ %138, %142 ], [ %138, %140 ], [ %129, %133 ]
store i32 %147, i32* %44
store i32 %146, i32* %46
store i32 %145, i32* %45
br label %148
148: ; preds = %144, %123
store i32 %76, i32* @frd_orien_se.nkcoords
store i32 1, i32* %43
%149 = load i32, i32* %28
%150 = mul nsw i32 %149, 243
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds i8, i8* %29, i64 %151
%153 = call i64 @strcmp1(i8* %152, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%154 = icmp eq i64 %153, 0
br i1 %154, label %155, label %180
155: ; preds = %148
%156 = getelementptr inbounds i8, i8* %6, i64 4002
%157 = call i32 @frdset(i8* %156, i8* %19, i32* %42, i32* %21, i32* %22, i32* %23, i32* %3, i32* %41, i32* %44, i32* %20, i32* %46, i32* %45, i32* %43, i32* %16)
%158 = call i32 @frdheader(i32* @frd_orien_se.icounter, double* %48, double* %8, double* %47, i32* %13, double* %18, i32* %40, i32* %12, i32* %41, i8* %14, i32* %5, i32* %4, i32* %65, i8* %26, i32* %10, i32* %11)
%159 = call i32 @strcpy1(i8* %52, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 23)
%160 = getelementptr inbounds [132 x i8], [132 x i8]* %39, i64 0, i64 5
%161 = call i32 @strcpy1(i8* %160, i8* %34, i32 5)
%162 = load i32, i32* %33
%163 = srem i32 %162, 3
switch i32 %163, label %165 [
i32 0, label %166
i32 1, label %164
]
164: ; preds = %155
br label %166
165: ; preds = %155
br label %166
166: ; preds = %155, %164, %165
%167 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), %164 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), %165 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), %155 ]
%168 = phi i8* [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), %164 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0), %165 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), %155 ]
%169 = phi i8* [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.12, i64 0, i64 0), %164 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.16, i64 0, i64 0), %165 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), %155 ]
%170 = phi i8* [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.13, i64 0, i64 0), %164 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.17, i64 0, i64 0), %165 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0), %155 ]
%171 = getelementptr inbounds [132 x i8], [132 x i8]* %39, i64 0, i64 10
%172 = call i32 @strcpy1(i8* %171, i8* %167, i32 3)
%173 = getelementptr inbounds [132 x i8], [132 x i8]* %39, i64 0, i64 23
store i8 0, i8* %173
%174 = call i32 (i32*, i8*, ...) @fprintf(i32* %65, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %52)
%175 = call i64 @fwrite(i8* %168, i64 34, i64 1, i32* %65)
%176 = call i64 @fwrite(i8* %169, i64 34, i64 1, i32* %65)
%177 = call i64 @fwrite(i8* %170, i64 34, i64 1, i32* %65)
%178 = call i64 @fwrite(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.18, i64 0, i64 0), i64 42, i64 1, i32* %65)
%179 = call i32 @frdvector(double* %27, i32* %42, i32* %30, i8* %156, i32* @frd_orien_se.nkcoords, i32* %3, i8* %49, i32* %31, double* %32, double* %0, i32* %21, i32* %22, i32* %23, i32* %15, i32* %16, i32* %65, i8* %26, i8* %50)
br label %180
180: ; preds = %166, %148
%181 = call i32 @fclose(i32* %65)
ret void
}