#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 */
struct RNAMemory {
  int dummy;
};

/* Variables and functions */
char **cmatrix(int, long, int /*<<< orphan*/, int);
char *cvector(int, long);
double **dmatrix(int, long, int, int);
int /*<<< orphan*/ free_cmatrix(char **, int, long, int /*<<< orphan*/, int);
int /*<<< orphan*/ free_cvector(char *, int, long);
int /*<<< orphan*/ free_dmatrix(double **, int, long, int, int);
int /*<<< orphan*/ free_lmatrix(long **, int, int, int, int);
int /*<<< orphan*/ free_lvector(long *, int, long);
int /*<<< orphan*/ get_chain_idx(long, long **, char *, long *, long **);
int /*<<< orphan*/ get_seq(long, long **, char **, char **, char *, long *,
                           char **, double **, char *, long *, long *, long *);
int /*<<< orphan*/ hb_crt_alt(double *, char *, char *);
long **lmatrix(int, int, int, int);
long *lvector(int, long);
long number_of_atoms(char *);
long read_pdb(char *, char **, char **, char *, long *, double **, char **,
              char *);
long residue_ident(char **, double **, long, long);
long **residue_idx(long, long *, char **, char *, char **, long *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ toupper(char);
struct RNAMemory *work_horse(char *, long, long, char *, long **, long *,
                             char **, char **, char *, long *, char **,
                             double **, long, long *, long *, long **);
struct RNAMemory *rna(char *pdbfile, long *type_stat, long **pair_stat,
                      long *bs_all) {
  char HB_ATOM[512], ALT_LIST[512];
  char *ChainID, *bseq, **AtomName, **ResName, **Miscs;
  long i, j, k, m, n, ie, ib, dna_rna, num, num_residue, nres, bs_atoms;
  long *ResSeq, *RY, **seidx, num_modify, *modify_idx, nprot_atom = 0;
  long **chain_idx, nchain;
  double HB_UPPER[2], **xyz;
  static long base_all;
  struct RNAMemory *r = 0;
  hb_crt_alt(HB_UPPER, HB_ATOM, ALT_LIST);
  num = number_of_atoms(pdbfile);
  AtomName = cmatrix(1, num, 0, 4);
  ResName = cmatrix(1, num, 0, 3);
  ChainID = cvector(1, num);
  ResSeq = lvector(1, num);
  xyz = dmatrix(1, num, 1, 3);
  Miscs = cmatrix(1, num, 0, 29);
  num = read_pdb(pdbfile, AtomName, ResName, ChainID, ResSeq, xyz, Miscs,
                 ALT_LIST);
  seidx = residue_idx(num, ResSeq, Miscs, ChainID, ResName, &num_residue);
  bs_atoms = 0;
  for (i = 1; i <= num_residue; i++) {
    ib = seidx[i][1];
    ie = seidx[i][2];
    dna_rna = residue_ident(AtomName, xyz, ib, ie);
    if (dna_rna >= 0) {
      for (j = seidx[i][1]; j <= seidx[i][2]; j++) {
        if (toupper(ChainID[seidx[1][1]]) != toupper(ChainID[j]))
          continue;
        bs_atoms++;
        strcpy(AtomName[bs_atoms], AtomName[j]);
        strcpy(ResName[bs_atoms], ResName[j]);
        ChainID[bs_atoms] = ChainID[j];
        ResSeq[bs_atoms] = ResSeq[j];
        for (k = 0; k <= 29; k++)
          Miscs[bs_atoms][k] = Miscs[j][k];
        for (k = 1; k <= 3; k++)
          xyz[bs_atoms][k] = xyz[j][k];
      }
    }
  }
  bseq = cvector(1, num_residue);
  nres = 0;
  seidx = residue_idx(bs_atoms, ResSeq, Miscs, ChainID, ResName, &nres);
  chain_idx = lmatrix(1, 500, 1, 2);
  get_chain_idx(nres, seidx, ChainID, &nchain, chain_idx);
  bs_atoms = 0;
  for (i = 1; i <= nchain; i++) {
    if ((chain_idx[i][2] - chain_idx[i][1]) <= 0)
      continue;
    ib = chain_idx[i][1];
    ie = chain_idx[i][2];
    for (k = chain_idx[i][1]; k <= chain_idx[i][2]; k++) {
      ib = seidx[k][1];
      ie = seidx[k][2];
      dna_rna = residue_ident(AtomName, xyz, ib, ie);
      if (dna_rna >= 0) {
        for (j = ib; j <= ie; j++) {
          bs_atoms++;
          strcpy(AtomName[bs_atoms], AtomName[j]);
          strcpy(ResName[bs_atoms], ResName[j]);
          ChainID[bs_atoms] = ChainID[j];
          ResSeq[bs_atoms] = ResSeq[j];
          for (m = 0; m <= 29; m++)
            Miscs[bs_atoms][m] = Miscs[j][m];
          for (m = 1; m <= 3; m++)
            xyz[bs_atoms][m] = xyz[j][m];
          n = bs_atoms;
        }
      }
    }
  }
  nres = 0;
  seidx = residue_idx(bs_atoms, ResSeq, Miscs, ChainID, ResName, &nres);
  RY = lvector(1, num_residue);
  modify_idx = lvector(1, num_residue);
  get_seq(nres, seidx, AtomName, ResName, ChainID, ResSeq, Miscs, xyz, bseq, RY,
          &num_modify, modify_idx);
  r = work_horse(pdbfile, nres, bs_atoms, bseq, seidx, RY, AtomName, ResName,
                 ChainID, ResSeq, Miscs, xyz, num_modify, modify_idx, type_stat,
                 pair_stat);
  base_all = base_all + nres;
  *bs_all = base_all;
  free_cmatrix(AtomName, 1, num, 0, 4);
  free_cmatrix(ResName, 1, num, 0, 3);
  free_cvector(ChainID, 1, num);
  free_lvector(ResSeq, 1, num);
  free_dmatrix(xyz, 1, num, 1, 3);
  free_cmatrix(Miscs, 1, num, 0, 29);
  free_lmatrix(seidx, 1, num_residue, 1, 2);
  free_cvector(bseq, 1, num_residue);
  free_lmatrix(chain_idx, 1, 500, 1, 2);
  free_lvector(RY, 1, num_residue);
  free_lvector(modify_idx, 1, num_residue);
  return r;
}


x86 assembly (clang, -O0):
<rna>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x588,%rsp
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
movq   $0x0,-0x508(%rbp)
movq   $0x0,-0x540(%rbp)
lea    -0x530(%rbp),%rdi
lea    -0x250(%rbp),%rsi
lea    -0x450(%rbp),%rdx
call   1090 <hb_crt_alt@plt>
mov    -0x30(%rbp),%rdi
call   1140 <number_of_atoms@plt>
mov    %rax,-0x4c0(%rbp)
mov    -0x4c0(%rbp),%rsi
mov    $0x1,%edi
xor    %edx,%edx
mov    $0x4,%ecx
call   1060 <cmatrix@plt>
mov    %rax,-0x468(%rbp)
mov    -0x4c0(%rbp),%rsi
mov    $0x1,%edi
xor    %edx,%edx
mov    $0x3,%ecx
call   1060 <cmatrix@plt>
mov    %rax,-0x470(%rbp)
mov    -0x4c0(%rbp),%rsi
mov    $0x1,%edi
call   10c0 <cvector@plt>
mov    %rax,-0x458(%rbp)
mov    -0x4c0(%rbp),%rsi
mov    $0x1,%edi
call   1150 <lvector@plt>
mov    %rax,-0x4e0(%rbp)
mov    -0x4c0(%rbp),%rsi
mov    $0x1,%edx
mov    $0x3,%ecx
mov    %edx,%edi
call   10b0 <dmatrix@plt>
mov    %rax,-0x538(%rbp)
mov    -0x4c0(%rbp),%rsi
mov    $0x1,%edi
xor    %edx,%edx
mov    $0x1d,%ecx
call   1060 <cmatrix@plt>
mov    %rax,-0x478(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x468(%rbp),%rsi
mov    -0x470(%rbp),%rdx
mov    -0x458(%rbp),%rcx
mov    -0x4e0(%rbp),%r8
mov    -0x538(%rbp),%r9
mov    -0x478(%rbp),%r10
lea    -0x450(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   10d0 <read_pdb@plt>
mov    %rax,-0x4c0(%rbp)
mov    -0x4c0(%rbp),%rdi
mov    -0x4e0(%rbp),%rsi
mov    -0x478(%rbp),%rdx
mov    -0x458(%rbp),%rcx
mov    -0x470(%rbp),%r8
lea    -0x4c8(%rbp),%r9
call   10a0 <residue_idx@plt>
mov    %rax,-0x4f0(%rbp)
movq   $0x0,-0x4d8(%rbp)
movq   $0x1,-0x480(%rbp)
mov    -0x480(%rbp),%rax
cmp    -0x4c8(%rbp),%rax
jg     16ba <rna+0x47a>
mov    -0x4f0(%rbp),%rax
mov    -0x480(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x4b0(%rbp)
mov    -0x4f0(%rbp),%rax
mov    -0x480(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x4a8(%rbp)
mov    -0x468(%rbp),%rdi
mov    -0x538(%rbp),%rsi
mov    -0x4b0(%rbp),%rdx
mov    -0x4a8(%rbp),%rcx
call   10f0 <residue_ident@plt>
mov    %rax,-0x4b8(%rbp)
cmpq   $0x0,-0x4b8(%rbp)
jl     169e <rna+0x45e>
mov    -0x4f0(%rbp),%rax
mov    -0x480(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x488(%rbp)
mov    -0x488(%rbp),%rax
mov    -0x4f0(%rbp),%rcx
mov    -0x480(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
cmp    0x10(%rcx),%rax
jg     1699 <rna+0x459>
mov    -0x458(%rbp),%rax
mov    -0x4f0(%rbp),%rcx
mov    0x8(%rcx),%rcx
mov    0x8(%rcx),%rcx
movsbl (%rax,%rcx,1),%edi
call   1050 <toupper@plt>
mov    %rax,-0x548(%rbp)
mov    -0x458(%rbp),%rax
mov    -0x488(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1050 <toupper@plt>
mov    %rax,%rcx
mov    -0x548(%rbp),%rax
cmp    %rcx,%rax
je     14ff <rna+0x2bf>
jmp    1682 <rna+0x442>
mov    -0x4d8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x4d8(%rbp)
mov    -0x468(%rbp),%rax
mov    -0x4d8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x468(%rbp),%rax
mov    -0x488(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
mov    -0x470(%rbp),%rax
mov    -0x4d8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x470(%rbp),%rax
mov    -0x488(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
mov    -0x458(%rbp),%rax
mov    -0x488(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x458(%rbp),%rax
mov    -0x4d8(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x4e0(%rbp),%rax
mov    -0x488(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x4e0(%rbp),%rax
mov    -0x4d8(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
movq   $0x0,-0x490(%rbp)
cmpq   $0x1d,-0x490(%rbp)
1d
jg     1611 <rna+0x3d1>
mov    -0x478(%rbp),%rax
mov    -0x488(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x490(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x478(%rbp),%rax
mov    -0x4d8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x490(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x490(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x490(%rbp)
jmp    15b4 <rna+0x374>
movq   $0x1,-0x490(%rbp)
cmpq   $0x3,-0x490(%rbp)
03
jg     167d <rna+0x43d>
mov    -0x538(%rbp),%rax
mov    -0x488(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x490(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x538(%rbp),%rax
mov    -0x4d8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x490(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x490(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x490(%rbp)
jmp    161c <rna+0x3dc>
jmp    1682 <rna+0x442>
mov    -0x488(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x488(%rbp)
jmp    1487 <rna+0x247>
jmp    169e <rna+0x45e>
jmp    16a3 <rna+0x463>
mov    -0x480(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x480(%rbp)
jmp    13e6 <rna+0x1a6>
mov    -0x4c8(%rbp),%rsi
mov    $0x1,%edi
call   10c0 <cvector@plt>
mov    %rax,-0x460(%rbp)
movq   $0x0,-0x4d0(%rbp)
mov    -0x4d8(%rbp),%rdi
mov    -0x4e0(%rbp),%rsi
mov    -0x478(%rbp),%rdx
mov    -0x458(%rbp),%rcx
mov    -0x470(%rbp),%r8
lea    -0x4d0(%rbp),%r9
call   10a0 <residue_idx@plt>
mov    %rax,-0x4f0(%rbp)
mov    $0x1,%edx
mov    $0x1f4,%esi
mov    $0x2,%ecx
mov    %edx,%edi
call   1110 <lmatrix@plt>
mov    %rax,-0x510(%rbp)
mov    -0x4d0(%rbp),%rdi
mov    -0x4f0(%rbp),%rsi
mov    -0x458(%rbp),%rdx
mov    -0x510(%rbp),%r8
lea    -0x518(%rbp),%rcx
call   1080 <get_chain_idx@plt>
movq   $0x0,-0x4d8(%rbp)
movq   $0x1,-0x480(%rbp)
mov    -0x480(%rbp),%rax
cmp    -0x518(%rbp),%rax
jg     1aa9 <rna+0x869>
mov    -0x510(%rbp),%rax
mov    -0x480(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x10(%rax),%rax
mov    -0x510(%rbp),%rcx
mov    -0x480(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
sub    0x8(%rcx),%rax
cmp    $0x0,%rax
jg     17bd <rna+0x57d>
jmp    1a92 <rna+0x852>
mov    -0x510(%rbp),%rax
mov    -0x480(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x4b0(%rbp)
mov    -0x510(%rbp),%rax
mov    -0x480(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x4a8(%rbp)
mov    -0x510(%rbp),%rax
mov    -0x480(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x490(%rbp)
mov    -0x490(%rbp),%rax
mov    -0x510(%rbp),%rcx
mov    -0x480(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
cmp    0x10(%rcx),%rax
jg     1a8d <rna+0x84d>
mov    -0x4f0(%rbp),%rax
mov    -0x490(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x4b0(%rbp)
mov    -0x4f0(%rbp),%rax
mov    -0x490(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x4a8(%rbp)
mov    -0x468(%rbp),%rdi
mov    -0x538(%rbp),%rsi
mov    -0x4b0(%rbp),%rdx
mov    -0x4a8(%rbp),%rcx
call   10f0 <residue_ident@plt>
mov    %rax,-0x4b8(%rbp)
cmpq   $0x0,-0x4b8(%rbp)
jl     1a71 <rna+0x831>
mov    -0x4b0(%rbp),%rax
mov    %rax,-0x488(%rbp)
mov    -0x488(%rbp),%rax
cmp    -0x4a8(%rbp),%rax
jg     1a6c <rna+0x82c>
mov    -0x4d8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x4d8(%rbp)
mov    -0x468(%rbp),%rax
mov    -0x4d8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x468(%rbp),%rax
mov    -0x488(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
mov    -0x470(%rbp),%rax
mov    -0x4d8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x470(%rbp),%rax
mov    -0x488(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
mov    -0x458(%rbp),%rax
mov    -0x488(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x458(%rbp),%rax
mov    -0x4d8(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x4e0(%rbp),%rax
mov    -0x488(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x4e0(%rbp),%rax
mov    -0x4d8(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
movq   $0x0,-0x498(%rbp)
cmpq   $0x1d,-0x498(%rbp)
1d
jg     19db <rna+0x79b>
mov    -0x478(%rbp),%rax
mov    -0x488(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x498(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x478(%rbp),%rax
mov    -0x4d8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x498(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x498(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x498(%rbp)
jmp    197e <rna+0x73e>
movq   $0x1,-0x498(%rbp)
cmpq   $0x3,-0x498(%rbp)
03
jg     1a47 <rna+0x807>
mov    -0x538(%rbp),%rax
mov    -0x488(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x498(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x538(%rbp),%rax
mov    -0x4d8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x498(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x498(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x498(%rbp)
jmp    19e6 <rna+0x7a6>
mov    -0x4d8(%rbp),%rax
mov    %rax,-0x4a0(%rbp)
mov    -0x488(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x488(%rbp)
jmp    18b5 <rna+0x675>
jmp    1a71 <rna+0x831>
jmp    1a76 <rna+0x836>
mov    -0x490(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x490(%rbp)
jmp    1814 <rna+0x5d4>
jmp    1a92 <rna+0x852>
mov    -0x480(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x480(%rbp)
jmp    176e <rna+0x52e>
movq   $0x0,-0x4d0(%rbp)
mov    -0x4d8(%rbp),%rdi
mov    -0x4e0(%rbp),%rsi
mov    -0x478(%rbp),%rdx
mov    -0x458(%rbp),%rcx
mov    -0x470(%rbp),%r8
lea    -0x4d0(%rbp),%r9
call   10a0 <residue_idx@plt>
mov    %rax,-0x4f0(%rbp)
mov    -0x4c8(%rbp),%rsi
mov    $0x1,%edi
call   1150 <lvector@plt>
mov    %rax,-0x4e8(%rbp)
mov    -0x4c8(%rbp),%rsi
mov    $0x1,%edi
call   1150 <lvector@plt>
mov    %rax,-0x500(%rbp)
mov    -0x4d0(%rbp),%rdi
mov    -0x4f0(%rbp),%rsi
mov    -0x468(%rbp),%rdx
mov    -0x470(%rbp),%rcx
mov    -0x458(%rbp),%r8
mov    -0x4e0(%rbp),%r9
mov    -0x478(%rbp),%r15
mov    -0x538(%rbp),%r14
mov    -0x460(%rbp),%rbx
mov    -0x4e8(%rbp),%r11
mov    -0x500(%rbp),%rax
lea    -0x4f8(%rbp),%r10
mov    %r15,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   1120 <get_seq@plt>
mov    -0x30(%rbp),%rdi
mov    -0x4d0(%rbp),%rsi
mov    -0x4d8(%rbp),%rdx
mov    -0x460(%rbp),%rcx
mov    -0x4f0(%rbp),%r8
mov    -0x4e8(%rbp),%r9
mov    -0x468(%rbp),%rax
mov    %rax,-0x560(%rbp)
mov    -0x470(%rbp),%rax
mov    %rax,-0x558(%rbp)
mov    -0x458(%rbp),%r13
mov    -0x4e0(%rbp),%r12
mov    -0x478(%rbp),%r15
mov    -0x538(%rbp),%r14
mov    -0x4f8(%rbp),%rbx
mov    -0x500(%rbp),%r11
mov    -0x38(%rbp),%r10
mov    -0x40(%rbp),%rax
mov    %rax,-0x550(%rbp)
mov    -0x560(%rbp),%rax
mov    %rax,(%rsp)
mov    -0x558(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x550(%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   1040 <work_horse@plt>
mov    %rax,-0x540(%rbp)
mov    0x2463(%rip),%rax
add    -0x4d0(%rbp),%rax
mov    %rax,0x2455(%rip)
mov    0x244e(%rip),%rcx
mov    -0x48(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x468(%rbp),%rdi
mov    -0x4c0(%rbp),%rdx
mov    $0x1,%esi
xor    %ecx,%ecx
mov    $0x4,%r8d
call   1100 <free_cmatrix@plt>
mov    -0x470(%rbp),%rdi
mov    -0x4c0(%rbp),%rdx
mov    $0x1,%esi
xor    %ecx,%ecx
mov    $0x3,%r8d
call   1100 <free_cmatrix@plt>
mov    -0x458(%rbp),%rdi
mov    -0x4c0(%rbp),%rdx
mov    $0x1,%esi
call   10e0 <free_cvector@plt>
mov    -0x4e0(%rbp),%rdi
mov    -0x4c0(%rbp),%rdx
mov    $0x1,%esi
call   1070 <free_lvector@plt>
mov    -0x538(%rbp),%rdi
mov    -0x4c0(%rbp),%rdx
mov    $0x1,%ecx
mov    $0x3,%r8d
mov    %ecx,%esi
call   1130 <free_dmatrix@plt>
mov    -0x478(%rbp),%rdi
mov    -0x4c0(%rbp),%rdx
mov    $0x1,%esi
xor    %ecx,%ecx
mov    $0x1d,%r8d
call   1100 <free_cmatrix@plt>
mov    -0x4f0(%rbp),%rdi
mov    -0x4c8(%rbp),%rax
mov    %eax,%edx
mov    $0x1,%ecx
mov    $0x2,%r8d
mov    %ecx,%esi
call   1160 <free_lmatrix@plt>
mov    -0x460(%rbp),%rdi
mov    -0x4c8(%rbp),%rdx
mov    $0x1,%esi
call   10e0 <free_cvector@plt>
mov    -0x510(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x1f4,%edx
mov    $0x2,%r8d
mov    %ecx,%esi
call   1160 <free_lmatrix@plt>
mov    -0x4e8(%rbp),%rdi
mov    -0x4c8(%rbp),%rdx
mov    $0x1,%esi
call   1070 <free_lvector@plt>
mov    -0x500(%rbp),%rdi
mov    -0x4c8(%rbp),%rdx
mov    $0x1,%esi
call   1070 <free_lvector@plt>
mov    -0x540(%rbp),%rax
add    $0x588,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<rna>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4b8,%rsp
mov    %rcx,0x90(%rsp)
mov    %rdx,0x80(%rsp)
mov    %rsi,0x88(%rsp)
mov    %rdi,%rbx
mov    %rdi,0x60(%rsp)
lea    0xa0(%rsp),%rdi
lea    0x2b0(%rsp),%rsi
lea    0xb0(%rsp),%rdx
call   1090 <hb_crt_alt@plt>
mov    %rbx,%rdi
call   1140 <number_of_atoms@plt>
mov    %rax,%rbp
mov    $0x1,%edi
mov    %rax,%rsi
xor    %edx,%edx
mov    $0x4,%ecx
call   1060 <cmatrix@plt>
mov    %rax,%r14
mov    $0x1,%edi
mov    %rbp,%rsi
xor    %edx,%edx
mov    $0x3,%ecx
call   1060 <cmatrix@plt>
mov    %rax,%r12
mov    $0x1,%edi
mov    %rbp,%rsi
call   10c0 <cvector@plt>
mov    %rax,%rbx
mov    $0x1,%edi
mov    %rbp,%rsi
call   1150 <lvector@plt>
mov    %rax,%r13
mov    $0x1,%edi
mov    %rbp,%rsi
mov    $0x1,%edx
mov    $0x3,%ecx
call   10b0 <dmatrix@plt>
mov    %rax,%r15
mov    $0x1,%edi
mov    %rbp,%rsi
xor    %edx,%edx
mov    $0x1d,%ecx
call   1060 <cmatrix@plt>
mov    %rax,%rbp
mov    0x60(%rsp),%rdi
mov    %r14,0x28(%rsp)
mov    %r14,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
mov    %r13,%r8
mov    %r15,0x20(%rsp)
mov    %r15,%r9
lea    0xb0(%rsp),%rax
push   %rax
push   %rbp
call   10d0 <read_pdb@plt>
add    $0x10,%rsp
mov    %rsp,%r9
mov    %rax,0x78(%rsp)
mov    %rax,%rdi
mov    %r13,0x18(%rsp)
mov    %r13,%rsi
mov    %rbp,%rdx
mov    %rbx,0x10(%rsp)
mov    %rbx,%rcx
mov    %r12,0x38(%rsp)
mov    %r12,%r8
call   10a0 <residue_idx@plt>
mov    (%rsp),%rsi
test   %rsi,%rsi
jle    14f5 <rna+0x2b5>
mov    %rax,%rbx
mov    $0x1,%r14d
xor    %r13d,%r13d
jmp    13aa <rna+0x16a>
nop
mov    %r13,%r15
lea    0x1(%r14),%rax
mov    (%rsp),%rsi
mov    %r15,%r13
cmp    %rsi,%r14
mov    %rax,%r14
jge    14f8 <rna+0x2b8>
mov    (%rbx,%r14,8),%rax
mov    0x8(%rax),%rdx
mov    0x10(%rax),%rcx
mov    0x28(%rsp),%rdi
mov    0x20(%rsp),%rsi
call   10f0 <residue_ident@plt>
test   %rax,%rax
js     1390 <rna+0x150>
mov    (%rbx,%r14,8),%rax
mov    0x8(%rax),%r12
cmp    0x10(%rax),%r12
jg     1390 <rna+0x150>
mov    0x10(%rsp),%rsi
mov    %r14,0x30(%rsp)
jmp    1410 <rna+0x1d0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13,%r15
mov    %rbx,%rsi
mov    %r14,%rbx
lea    0x1(%r12),%rax
mov    0x30(%rsp),%r14
mov    (%rbx,%r14,8),%rcx
cmp    0x10(%rcx),%r12
mov    %rax,%r12
jge    1393 <rna+0x153>
mov    %rbx,%r14
mov    0x8(%rbx),%rax
mov    0x8(%rax),%rax
movsbl (%rsi,%rax,1),%edi
mov    %rsi,%rbx
call   1050 <toupper@plt>
mov    %rax,%r15
movsbl (%rbx,%r12,1),%edi
call   1050 <toupper@plt>
cmp    %rax,%r15
jne    13f0 <rna+0x1b0>
lea    0x1(%r13),%r15
mov    0x28(%rsp),%rax
mov    0x8(%rax,%r13,8),%rdi
mov    (%rax,%r12,8),%rsi
call   1030 <strcpy@plt>
mov    0x38(%rsp),%rax
mov    0x8(%rax,%r13,8),%rdi
mov    (%rax,%r12,8),%rsi
call   1030 <strcpy@plt>
mov    (%rbx,%r12,1),%al
mov    %al,0x1(%rbx,%r13,1)
mov    0x18(%rsp),%rcx
mov    (%rcx,%r12,8),%rax
mov    %rax,0x8(%rcx,%r13,8)
xor    %eax,%eax
mov    %rbx,%rsi
nop
mov    0x0(%rbp,%r12,8),%rcx
movzbl (%rcx,%rax,1),%ecx
mov    0x8(%rbp,%r13,8),%rdx
mov    %cl,(%rdx,%rax,1)
mov    0x0(%rbp,%r12,8),%rcx
movzbl 0x1(%rcx,%rax,1),%ecx
mov    0x8(%rbp,%r13,8),%rdx
mov    %cl,0x1(%rdx,%rax,1)
mov    0x0(%rbp,%r12,8),%rcx
movzbl 0x2(%rcx,%rax,1),%ecx
mov    0x8(%rbp,%r13,8),%rdx
mov    %cl,0x2(%rdx,%rax,1)
add    $0x3,%rax
cmp    $0x1e,%rax
jne    1480 <rna+0x240>
mov    0x20(%rsp),%rcx
mov    (%rcx,%r12,8),%rax
mov    0x8(%rcx,%r13,8),%rcx
movsd  0x8(%rax),%xmm0
movsd  %xmm0,0x8(%rcx)
movsd  0x10(%rax),%xmm0
movsd  %xmm0,0x10(%rcx)
movsd  0x18(%rax),%xmm0
movsd  %xmm0,0x18(%rcx)
mov    %r15,%r13
jmp    13f6 <rna+0x1b6>
xor    %r15d,%r15d
mov    $0x1,%edi
call   10c0 <cvector@plt>
mov    %rax,0x58(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%r9
mov    %r15,%rdi
mov    0x18(%rsp),%rsi
mov    %rbp,%rdx
mov    0x10(%rsp),%r15
mov    %r15,%rcx
mov    0x38(%rsp),%r8
call   10a0 <residue_idx@plt>
mov    %rax,%rbx
mov    $0x1,%edi
mov    $0x1f4,%esi
mov    $0x1,%edx
mov    $0x2,%ecx
call   1110 <lmatrix@plt>
mov    0x8(%rsp),%rdi
lea    0x68(%rsp),%rcx
mov    %rbx,0x40(%rsp)
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %rax,0x50(%rsp)
mov    %rax,%r8
call   1080 <get_chain_idx@plt>
mov    0x68(%rsp),%rax
test   %rax,%rax
jle    16f1 <rna+0x4b1>
mov    $0x1,%edx
xor    %r12d,%r12d
mov    0x10(%rsp),%r14
jmp    15a5 <rna+0x365>
nopl   (%rax)
mov    0x68(%rsp),%rax
lea    0x1(%rdx),%rcx
cmp    %rax,%rdx
mov    %rcx,%rdx
jge    16f9 <rna+0x4b9>
mov    0x50(%rsp),%rcx
mov    (%rcx,%rdx,8),%rcx
mov    0x8(%rcx),%rbx
cmp    %rbx,0x10(%rcx)
jle    1595 <rna+0x355>
mov    %rdx,0x48(%rsp)
jmp    15dd <rna+0x39d>
nop
mov    0x30(%rsp),%rsi
lea    0x1(%rsi),%rbx
mov    0x50(%rsp),%rcx
mov    0x48(%rsp),%rdx
mov    (%rcx,%rdx,8),%rcx
cmp    0x10(%rcx),%rsi
jge    1590 <rna+0x350>
mov    0x40(%rsp),%rax
mov    (%rax,%rbx,8),%rax
mov    0x8(%rax),%r15
mov    0x10(%rax),%r13
mov    0x28(%rsp),%rdi
mov    0x20(%rsp),%rsi
mov    %r15,%rdx
mov    %r13,%rcx
call   10f0 <residue_ident@plt>
test   %rax,%rax
mov    %rbx,0x30(%rsp)
js     15c0 <rna+0x380>
cmp    %r13,%r15
jg     15c0 <rna+0x380>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r12,%rbx
add    $0x1,%r12
mov    0x28(%rsp),%rax
mov    0x8(%rax,%rbx,8),%rdi
mov    (%rax,%r15,8),%rsi
call   1030 <strcpy@plt>
mov    0x38(%rsp),%rax
mov    0x8(%rax,%rbx,8),%rdi
mov    (%rax,%r15,8),%rsi
call   1030 <strcpy@plt>
mov    %r14,%rcx
mov    (%r14,%r15,1),%al
mov    %al,0x1(%r14,%rbx,1)
mov    0x18(%rsp),%rcx
mov    (%rcx,%r15,8),%rax
mov    %rax,0x8(%rcx,%rbx,8)
xor    %eax,%eax
nopl   0x0(%rax)
mov    0x0(%rbp,%r15,8),%rcx
movzbl (%rcx,%rax,1),%ecx
mov    0x0(%rbp,%r12,8),%rdx
mov    %cl,(%rdx,%rax,1)
mov    0x0(%rbp,%r15,8),%rcx
movzbl 0x1(%rcx,%rax,1),%ecx
mov    0x0(%rbp,%r12,8),%rdx
mov    %cl,0x1(%rdx,%rax,1)
mov    0x0(%rbp,%r15,8),%rcx
movzbl 0x2(%rcx,%rax,1),%ecx
mov    0x0(%rbp,%r12,8),%rdx
mov    %cl,0x2(%rdx,%rax,1)
add    $0x3,%rax
cmp    $0x1e,%rax
jne    1670 <rna+0x430>
mov    0x20(%rsp),%rcx
mov    (%rcx,%r15,8),%rax
mov    (%rcx,%r12,8),%rcx
movsd  0x8(%rax),%xmm0
movsd  %xmm0,0x8(%rcx)
movsd  0x10(%rax),%xmm0
movsd  %xmm0,0x10(%rcx)
movsd  0x18(%rax),%xmm0
movsd  %xmm0,0x18(%rcx)
lea    0x1(%r15),%rax
cmp    %r13,%r15
mov    %rax,%r15
jne    1620 <rna+0x3e0>
jmp    15c0 <rna+0x380>
xor    %r12d,%r12d
mov    0x10(%rsp),%r14
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%r9
mov    %r12,%rdi
mov    0x18(%rsp),%rsi
mov    %rbp,%rdx
mov    %r14,%rcx
mov    0x38(%rsp),%r15
mov    %r15,%r8
call   10a0 <residue_idx@plt>
mov    %rax,%r14
mov    (%rsp),%rsi
mov    $0x1,%edi
call   1150 <lvector@plt>
mov    %rax,%r13
mov    (%rsp),%rsi
mov    $0x1,%edi
call   1150 <lvector@plt>
mov    0x8(%rsp),%rdi
lea    0x98(%rsp),%r10
mov    %r14,%rsi
mov    %r14,0x70(%rsp)
mov    0x28(%rsp),%rdx
mov    %r15,%rcx
mov    0x10(%rsp),%r8
mov    0x18(%rsp),%r9
push   %rax
mov    %rax,%r15
mov    %rax,0x38(%rsp)
push   %r10
push   %r13
mov    %r13,0x60(%rsp)
mov    0x70(%rsp),%rbx
push   %rbx
push   0x40(%rsp)
push   %rbp
call   1120 <get_seq@plt>
add    $0x30,%rsp
mov    0x8(%rsp),%rsi
mov    0x60(%rsp),%rdi
mov    %r12,%rdx
mov    %rbx,%rcx
mov    %r14,%r8
mov    %r13,%r9
push   0x80(%rsp)
push   0x90(%rsp)
push   %r15
push   0xb0(%rsp)
mov    0x40(%rsp),%r13
push   %r13
push   %rbp
mov    0x48(%rsp),%r15
push   %r15
mov    0x48(%rsp),%r14
push   %r14
mov    0x78(%rsp),%r12
push   %r12
mov    0x70(%rsp),%rbx
push   %rbx
call   1040 <work_horse@plt>
add    $0x50,%rsp
mov    %rax,0x40(%rsp)
mov    0x8(%rsp),%rax
add    0x28cd(%rip),%rax
mov    %rax,0x28c6(%rip)
mov    0x90(%rsp),%rcx
mov    %rax,(%rcx)
mov    %rbx,%rdi
mov    $0x1,%esi
mov    0x78(%rsp),%rbx
mov    %rbx,%rdx
xor    %ecx,%ecx
mov    $0x4,%r8d
call   1100 <free_cmatrix@plt>
mov    %r12,%rdi
mov    $0x1,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
mov    $0x3,%r8d
call   1100 <free_cmatrix@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    %rbx,%rdx
call   10e0 <free_cvector@plt>
mov    %r15,%rdi
mov    $0x1,%esi
mov    %rbx,%rdx
call   1070 <free_lvector@plt>
mov    %r13,%rdi
mov    $0x1,%esi
mov    %rbx,%rdx
mov    $0x1,%ecx
mov    $0x3,%r8d
call   1130 <free_dmatrix@plt>
mov    %rbp,%rdi
mov    $0x1,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
mov    $0x1d,%r8d
call   1100 <free_cmatrix@plt>
mov    (%rsp),%edx
mov    0x70(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%ecx
mov    $0x2,%r8d
call   1160 <free_lmatrix@plt>
mov    (%rsp),%rdx
mov    0x58(%rsp),%rdi
mov    $0x1,%esi
call   10e0 <free_cvector@plt>
mov    0x50(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1f4,%edx
mov    $0x1,%ecx
mov    $0x2,%r8d
call   1160 <free_lmatrix@plt>
mov    (%rsp),%rdx
mov    0x48(%rsp),%rdi
mov    $0x1,%esi
call   1070 <free_lvector@plt>
mov    (%rsp),%rdx
mov    0x30(%rsp),%rdi
mov    $0x1,%esi
call   1070 <free_lvector@plt>
mov    0x40(%rsp),%rax
add    $0x4b8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.RNAMemory = type { i32 }
@rna.base_all = internal global i64 0
define %struct.RNAMemory* @rna(i8* %0, i64* %1, i64** %2, i64* %3) {
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i64**
%8 = alloca i64*
%9 = alloca [512 x i8]
%10 = alloca [512 x i8]
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8**
%14 = alloca i8**
%15 = alloca i8**
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
%21 = alloca i64
%22 = alloca i64
%23 = alloca i64
%24 = alloca i64
%25 = alloca i64
%26 = alloca i64
%27 = alloca i64
%28 = alloca i64*
%29 = alloca i64*
%30 = alloca i64**
%31 = alloca i64
%32 = alloca i64*
%33 = alloca i64
%34 = alloca i64**
%35 = alloca i64
%36 = alloca [2 x double]
%37 = alloca double**
%38 = alloca %struct.RNAMemory*
store i8* %0, i8** %5
store i64* %1, i64** %6
store i64** %2, i64*** %7
store i64* %3, i64** %8
store i64 0, i64* %33
store %struct.RNAMemory* null, %struct.RNAMemory** %38
%39 = getelementptr inbounds [2 x double], [2 x double]* %36, i64 0, i64 0
%40 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%41 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%42 = call i32 @hb_crt_alt(double* %39, i8* %40, i8* %41)
%43 = load i8*, i8** %5
%44 = call i64 @number_of_atoms(i8* %43)
store i64 %44, i64* %24
%45 = load i64, i64* %24
%46 = call i8** @cmatrix(i32 1, i64 %45, i32 0, i32 4)
store i8** %46, i8*** %13
%47 = load i64, i64* %24
%48 = call i8** @cmatrix(i32 1, i64 %47, i32 0, i32 3)
store i8** %48, i8*** %14
%49 = load i64, i64* %24
%50 = call i8* @cvector(i32 1, i64 %49)
store i8* %50, i8** %11
%51 = load i64, i64* %24
%52 = call i64* @lvector(i32 1, i64 %51)
store i64* %52, i64** %28
%53 = load i64, i64* %24
%54 = call double** @dmatrix(i32 1, i64 %53, i32 1, i32 3)
store double** %54, double*** %37
%55 = load i64, i64* %24
%56 = call i8** @cmatrix(i32 1, i64 %55, i32 0, i32 29)
store i8** %56, i8*** %15
%57 = load i8*, i8** %5
%58 = load i8**, i8*** %13
%59 = load i8**, i8*** %14
%60 = load i8*, i8** %11
%61 = load i64*, i64** %28
%62 = load double**, double*** %37
%63 = load i8**, i8*** %15
%64 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%65 = call i64 @read_pdb(i8* %57, i8** %58, i8** %59, i8* %60, i64* %61, double** %62, i8** %63, i8* %64)
store i64 %65, i64* %24
%66 = load i64, i64* %24
%67 = load i64*, i64** %28
%68 = load i8**, i8*** %15
%69 = load i8*, i8** %11
%70 = load i8**, i8*** %14
%71 = call i64** @residue_idx(i64 %66, i64* %67, i8** %68, i8* %69, i8** %70, i64* %25)
store i64** %71, i64*** %30
store i64 0, i64* %27
store i64 1, i64* %16
br label %72
72: ; preds = %211, %4
%73 = load i64, i64* %16
%74 = load i64, i64* %25
%75 = icmp sle i64 %73, %74
br i1 %75, label %76, label %214
76: ; preds = %72
%77 = load i64**, i64*** %30
%78 = load i64, i64* %16
%79 = getelementptr inbounds i64*, i64** %77, i64 %78
%80 = load i64*, i64** %79
%81 = getelementptr inbounds i64, i64* %80, i64 1
%82 = load i64, i64* %81
store i64 %82, i64* %22
%83 = load i64**, i64*** %30
%84 = load i64, i64* %16
%85 = getelementptr inbounds i64*, i64** %83, i64 %84
%86 = load i64*, i64** %85
%87 = getelementptr inbounds i64, i64* %86, i64 2
%88 = load i64, i64* %87
store i64 %88, i64* %21
%89 = load i8**, i8*** %13
%90 = load double**, double*** %37
%91 = load i64, i64* %22
%92 = load i64, i64* %21
%93 = call i64 @residue_ident(i8** %89, double** %90, i64 %91, i64 %92)
store i64 %93, i64* %23
%94 = load i64, i64* %23
%95 = icmp sge i64 %94, 0
br i1 %95, label %96, label %210
96: ; preds = %76
%97 = load i64**, i64*** %30
%98 = load i64, i64* %16
%99 = getelementptr inbounds i64*, i64** %97, i64 %98
%100 = load i64*, i64** %99
%101 = getelementptr inbounds i64, i64* %100, i64 1
%102 = load i64, i64* %101
store i64 %102, i64* %17
br label %103
103: ; preds = %206, %96
%104 = load i64, i64* %17
%105 = load i64**, i64*** %30
%106 = load i64, i64* %16
%107 = getelementptr inbounds i64*, i64** %105, i64 %106
%108 = load i64*, i64** %107
%109 = getelementptr inbounds i64, i64* %108, i64 2
%110 = load i64, i64* %109
%111 = icmp sle i64 %104, %110
br i1 %111, label %112, label %209
112: ; preds = %103
%113 = load i8*, i8** %11
%114 = load i64**, i64*** %30
%115 = getelementptr inbounds i64*, i64** %114, i64 1
%116 = load i64*, i64** %115
%117 = getelementptr inbounds i64, i64* %116, i64 1
%118 = load i64, i64* %117
%119 = getelementptr inbounds i8, i8* %113, i64 %118
%120 = load i8, i8* %119
%121 = call i64 @toupper(i8 signext %120)
%122 = load i8*, i8** %11
%123 = load i64, i64* %17
%124 = getelementptr inbounds i8, i8* %122, i64 %123
%125 = load i8, i8* %124
%126 = call i64 @toupper(i8 signext %125)
%127 = icmp ne i64 %121, %126
br i1 %127, label %128, label %129
128: ; preds = %112
br label %206
129: ; preds = %112
%130 = load i64, i64* %27
%131 = add nsw i64 %130, 1
store i64 %131, i64* %27
%132 = load i8**, i8*** %13
%133 = load i64, i64* %27
%134 = getelementptr inbounds i8*, i8** %132, i64 %133
%135 = load i8*, i8** %134
%136 = load i8**, i8*** %13
%137 = load i64, i64* %17
%138 = getelementptr inbounds i8*, i8** %136, i64 %137
%139 = load i8*, i8** %138
%140 = call i32 @strcpy(i8* %135, i8* %139)
%141 = load i8**, i8*** %14
%142 = load i64, i64* %27
%143 = getelementptr inbounds i8*, i8** %141, i64 %142
%144 = load i8*, i8** %143
%145 = load i8**, i8*** %14
%146 = load i64, i64* %17
%147 = getelementptr inbounds i8*, i8** %145, i64 %146
%148 = load i8*, i8** %147
%149 = call i32 @strcpy(i8* %144, i8* %148)
%150 = load i8*, i8** %11
%151 = load i64, i64* %17
%152 = getelementptr inbounds i8, i8* %150, i64 %151
%153 = load i8, i8* %152
%154 = load i8*, i8** %11
%155 = load i64, i64* %27
%156 = getelementptr inbounds i8, i8* %154, i64 %155
store i8 %153, i8* %156
%157 = load i64*, i64** %28
%158 = load i64, i64* %17
%159 = getelementptr inbounds i64, i64* %157, i64 %158
%160 = load i64, i64* %159
%161 = load i64*, i64** %28
%162 = load i64, i64* %27
%163 = getelementptr inbounds i64, i64* %161, i64 %162
store i64 %160, i64* %163
store i64 0, i64* %18
br label %164
164: ; preds = %181, %129
%165 = load i64, i64* %18
%166 = icmp sle i64 %165, 29
br i1 %166, label %167, label %184
167: ; preds = %164
%168 = load i8**, i8*** %15
%169 = load i64, i64* %17
%170 = getelementptr inbounds i8*, i8** %168, i64 %169
%171 = load i8*, i8** %170
%172 = load i64, i64* %18
%173 = getelementptr inbounds i8, i8* %171, i64 %172
%174 = load i8, i8* %173
%175 = load i8**, i8*** %15
%176 = load i64, i64* %27
%177 = getelementptr inbounds i8*, i8** %175, i64 %176
%178 = load i8*, i8** %177
%179 = load i64, i64* %18
%180 = getelementptr inbounds i8, i8* %178, i64 %179
store i8 %174, i8* %180
br label %181
181: ; preds = %167
%182 = load i64, i64* %18
%183 = add nsw i64 %182, 1
store i64 %183, i64* %18
br label %164
184: ; preds = %164
store i64 1, i64* %18
br label %185
185: ; preds = %202, %184
%186 = load i64, i64* %18
%187 = icmp sle i64 %186, 3
br i1 %187, label %188, label %205
188: ; preds = %185
%189 = load double**, double*** %37
%190 = load i64, i64* %17
%191 = getelementptr inbounds double*, double** %189, i64 %190
%192 = load double*, double** %191
%193 = load i64, i64* %18
%194 = getelementptr inbounds double, double* %192, i64 %193
%195 = load double, double* %194
%196 = load double**, double*** %37
%197 = load i64, i64* %27
%198 = getelementptr inbounds double*, double** %196, i64 %197
%199 = load double*, double** %198
%200 = load i64, i64* %18
%201 = getelementptr inbounds double, double* %199, i64 %200
store double %195, double* %201
br label %202
202: ; preds = %188
%203 = load i64, i64* %18
%204 = add nsw i64 %203, 1
store i64 %204, i64* %18
br label %185
205: ; preds = %185
br label %206
206: ; preds = %205, %128
%207 = load i64, i64* %17
%208 = add nsw i64 %207, 1
store i64 %208, i64* %17
br label %103
209: ; preds = %103
br label %210
210: ; preds = %209, %76
br label %211
211: ; preds = %210
%212 = load i64, i64* %16
%213 = add nsw i64 %212, 1
store i64 %213, i64* %16
br label %72
214: ; preds = %72
%215 = load i64, i64* %25
%216 = call i8* @cvector(i32 1, i64 %215)
store i8* %216, i8** %12
store i64 0, i64* %26
%217 = load i64, i64* %27
%218 = load i64*, i64** %28
%219 = load i8**, i8*** %15
%220 = load i8*, i8** %11
%221 = load i8**, i8*** %14
%222 = call i64** @residue_idx(i64 %217, i64* %218, i8** %219, i8* %220, i8** %221, i64* %26)
store i64** %222, i64*** %30
%223 = call i64** @lmatrix(i32 1, i32 500, i32 1, i32 2)
store i64** %223, i64*** %34
%224 = load i64, i64* %26
%225 = load i64**, i64*** %30
%226 = load i8*, i8** %11
%227 = load i64**, i64*** %34
%228 = call i32 @get_chain_idx(i64 %224, i64** %225, i8* %226, i64* %35, i64** %227)
store i64 0, i64* %27
store i64 1, i64* %16
br label %229
229: ; preds = %390, %214
%230 = load i64, i64* %16
%231 = load i64, i64* %35
%232 = icmp sle i64 %230, %231
br i1 %232, label %233, label %393
233: ; preds = %229
%234 = load i64**, i64*** %34
%235 = load i64, i64* %16
%236 = getelementptr inbounds i64*, i64** %234, i64 %235
%237 = load i64*, i64** %236
%238 = getelementptr inbounds i64, i64* %237, i64 2
%239 = load i64, i64* %238
%240 = load i64**, i64*** %34
%241 = load i64, i64* %16
%242 = getelementptr inbounds i64*, i64** %240, i64 %241
%243 = load i64*, i64** %242
%244 = getelementptr inbounds i64, i64* %243, i64 1
%245 = load i64, i64* %244
%246 = sub nsw i64 %239, %245
%247 = icmp sle i64 %246, 0
br i1 %247, label %248, label %249
248: ; preds = %233
br label %390
249: ; preds = %233
%250 = load i64**, i64*** %34
%251 = load i64, i64* %16
%252 = getelementptr inbounds i64*, i64** %250, i64 %251
%253 = load i64*, i64** %252
%254 = getelementptr inbounds i64, i64* %253, i64 1
%255 = load i64, i64* %254
store i64 %255, i64* %22
%256 = load i64**, i64*** %34
%257 = load i64, i64* %16
%258 = getelementptr inbounds i64*, i64** %256, i64 %257
%259 = load i64*, i64** %258
%260 = getelementptr inbounds i64, i64* %259, i64 2
%261 = load i64, i64* %260
store i64 %261, i64* %21
%262 = load i64**, i64*** %34
%263 = load i64, i64* %16
%264 = getelementptr inbounds i64*, i64** %262, i64 %263
%265 = load i64*, i64** %264
%266 = getelementptr inbounds i64, i64* %265, i64 1
%267 = load i64, i64* %266
store i64 %267, i64* %18
br label %268
268: ; preds = %386, %249
%269 = load i64, i64* %18
%270 = load i64**, i64*** %34
%271 = load i64, i64* %16
%272 = getelementptr inbounds i64*, i64** %270, i64 %271
%273 = load i64*, i64** %272
%274 = getelementptr inbounds i64, i64* %273, i64 2
%275 = load i64, i64* %274
%276 = icmp sle i64 %269, %275
br i1 %276, label %277, label %389
277: ; preds = %268
%278 = load i64**, i64*** %30
%279 = load i64, i64* %18
%280 = getelementptr inbounds i64*, i64** %278, i64 %279
%281 = load i64*, i64** %280
%282 = getelementptr inbounds i64, i64* %281, i64 1
%283 = load i64, i64* %282
store i64 %283, i64* %22
%284 = load i64**, i64*** %30
%285 = load i64, i64* %18
%286 = getelementptr inbounds i64*, i64** %284, i64 %285
%287 = load i64*, i64** %286
%288 = getelementptr inbounds i64, i64* %287, i64 2
%289 = load i64, i64* %288
store i64 %289, i64* %21
%290 = load i8**, i8*** %13
%291 = load double**, double*** %37
%292 = load i64, i64* %22
%293 = load i64, i64* %21
%294 = call i64 @residue_ident(i8** %290, double** %291, i64 %292, i64 %293)
store i64 %294, i64* %23
%295 = load i64, i64* %23
%296 = icmp sge i64 %295, 0
br i1 %296, label %297, label %385
297: ; preds = %277
%298 = load i64, i64* %22
store i64 %298, i64* %17
br label %299
299: ; preds = %381, %297
%300 = load i64, i64* %17
%301 = load i64, i64* %21
%302 = icmp sle i64 %300, %301
br i1 %302, label %303, label %384
303: ; preds = %299
%304 = load i64, i64* %27
%305 = add nsw i64 %304, 1
store i64 %305, i64* %27
%306 = load i8**, i8*** %13
%307 = load i64, i64* %27
%308 = getelementptr inbounds i8*, i8** %306, i64 %307
%309 = load i8*, i8** %308
%310 = load i8**, i8*** %13
%311 = load i64, i64* %17
%312 = getelementptr inbounds i8*, i8** %310, i64 %311
%313 = load i8*, i8** %312
%314 = call i32 @strcpy(i8* %309, i8* %313)
%315 = load i8**, i8*** %14
%316 = load i64, i64* %27
%317 = getelementptr inbounds i8*, i8** %315, i64 %316
%318 = load i8*, i8** %317
%319 = load i8**, i8*** %14
%320 = load i64, i64* %17
%321 = getelementptr inbounds i8*, i8** %319, i64 %320
%322 = load i8*, i8** %321
%323 = call i32 @strcpy(i8* %318, i8* %322)
%324 = load i8*, i8** %11
%325 = load i64, i64* %17
%326 = getelementptr inbounds i8, i8* %324, i64 %325
%327 = load i8, i8* %326
%328 = load i8*, i8** %11
%329 = load i64, i64* %27
%330 = getelementptr inbounds i8, i8* %328, i64 %329
store i8 %327, i8* %330
%331 = load i64*, i64** %28
%332 = load i64, i64* %17
%333 = getelementptr inbounds i64, i64* %331, i64 %332
%334 = load i64, i64* %333
%335 = load i64*, i64** %28
%336 = load i64, i64* %27
%337 = getelementptr inbounds i64, i64* %335, i64 %336
store i64 %334, i64* %337
store i64 0, i64* %19
br label %338
338: ; preds = %355, %303
%339 = load i64, i64* %19
%340 = icmp sle i64 %339, 29
br i1 %340, label %341, label %358
341: ; preds = %338
%342 = load i8**, i8*** %15
%343 = load i64, i64* %17
%344 = getelementptr inbounds i8*, i8** %342, i64 %343
%345 = load i8*, i8** %344
%346 = load i64, i64* %19
%347 = getelementptr inbounds i8, i8* %345, i64 %346
%348 = load i8, i8* %347
%349 = load i8**, i8*** %15
%350 = load i64, i64* %27
%351 = getelementptr inbounds i8*, i8** %349, i64 %350
%352 = load i8*, i8** %351
%353 = load i64, i64* %19
%354 = getelementptr inbounds i8, i8* %352, i64 %353
store i8 %348, i8* %354
br label %355
355: ; preds = %341
%356 = load i64, i64* %19
%357 = add nsw i64 %356, 1
store i64 %357, i64* %19
br label %338
358: ; preds = %338
store i64 1, i64* %19
br label %359
359: ; preds = %376, %358
%360 = load i64, i64* %19
%361 = icmp sle i64 %360, 3
br i1 %361, label %362, label %379
362: ; preds = %359
%363 = load double**, double*** %37
%364 = load i64, i64* %17
%365 = getelementptr inbounds double*, double** %363, i64 %364
%366 = load double*, double** %365
%367 = load i64, i64* %19
%368 = getelementptr inbounds double, double* %366, i64 %367
%369 = load double, double* %368
%370 = load double**, double*** %37
%371 = load i64, i64* %27
%372 = getelementptr inbounds double*, double** %370, i64 %371
%373 = load double*, double** %372
%374 = load i64, i64* %19
%375 = getelementptr inbounds double, double* %373, i64 %374
store double %369, double* %375
br label %376
376: ; preds = %362
%377 = load i64, i64* %19
%378 = add nsw i64 %377, 1
store i64 %378, i64* %19
br label %359
379: ; preds = %359
%380 = load i64, i64* %27
store i64 %380, i64* %20
br label %381
381: ; preds = %379
%382 = load i64, i64* %17
%383 = add nsw i64 %382, 1
store i64 %383, i64* %17
br label %299
384: ; preds = %299
br label %385
385: ; preds = %384, %277
br label %386
386: ; preds = %385
%387 = load i64, i64* %18
%388 = add nsw i64 %387, 1
store i64 %388, i64* %18
br label %268
389: ; preds = %268
br label %390
390: ; preds = %389, %248
%391 = load i64, i64* %16
%392 = add nsw i64 %391, 1
store i64 %392, i64* %16
br label %229
393: ; preds = %229
store i64 0, i64* %26
%394 = load i64, i64* %27
%395 = load i64*, i64** %28
%396 = load i8**, i8*** %15
%397 = load i8*, i8** %11
%398 = load i8**, i8*** %14
%399 = call i64** @residue_idx(i64 %394, i64* %395, i8** %396, i8* %397, i8** %398, i64* %26)
store i64** %399, i64*** %30
%400 = load i64, i64* %25
%401 = call i64* @lvector(i32 1, i64 %400)
store i64* %401, i64** %29
%402 = load i64, i64* %25
%403 = call i64* @lvector(i32 1, i64 %402)
store i64* %403, i64** %32
%404 = load i64, i64* %26
%405 = load i64**, i64*** %30
%406 = load i8**, i8*** %13
%407 = load i8**, i8*** %14
%408 = load i8*, i8** %11
%409 = load i64*, i64** %28
%410 = load i8**, i8*** %15
%411 = load double**, double*** %37
%412 = load i8*, i8** %12
%413 = load i64*, i64** %29
%414 = load i64*, i64** %32
%415 = call i32 @get_seq(i64 %404, i64** %405, i8** %406, i8** %407, i8* %408, i64* %409, i8** %410, double** %411, i8* %412, i64* %413, i64* %31, i64* %414)
%416 = load i8*, i8** %5
%417 = load i64, i64* %26
%418 = load i64, i64* %27
%419 = load i8*, i8** %12
%420 = load i64**, i64*** %30
%421 = load i64*, i64** %29
%422 = load i8**, i8*** %13
%423 = load i8**, i8*** %14
%424 = load i8*, i8** %11
%425 = load i64*, i64** %28
%426 = load i8**, i8*** %15
%427 = load double**, double*** %37
%428 = load i64, i64* %31
%429 = load i64*, i64** %32
%430 = load i64*, i64** %6
%431 = load i64**, i64*** %7
%432 = call %struct.RNAMemory* @work_horse(i8* %416, i64 %417, i64 %418, i8* %419, i64** %420, i64* %421, i8** %422, i8** %423, i8* %424, i64* %425, i8** %426, double** %427, i64 %428, i64* %429, i64* %430, i64** %431)
store %struct.RNAMemory* %432, %struct.RNAMemory** %38
%433 = load i64, i64* @rna.base_all
%434 = load i64, i64* %26
%435 = add nsw i64 %433, %434
store i64 %435, i64* @rna.base_all
%436 = load i64, i64* @rna.base_all
%437 = load i64*, i64** %8
store i64 %436, i64* %437
%438 = load i8**, i8*** %13
%439 = load i64, i64* %24
%440 = call i32 @free_cmatrix(i8** %438, i32 1, i64 %439, i32 0, i32 4)
%441 = load i8**, i8*** %14
%442 = load i64, i64* %24
%443 = call i32 @free_cmatrix(i8** %441, i32 1, i64 %442, i32 0, i32 3)
%444 = load i8*, i8** %11
%445 = load i64, i64* %24
%446 = call i32 @free_cvector(i8* %444, i32 1, i64 %445)
%447 = load i64*, i64** %28
%448 = load i64, i64* %24
%449 = call i32 @free_lvector(i64* %447, i32 1, i64 %448)
%450 = load double**, double*** %37
%451 = load i64, i64* %24
%452 = call i32 @free_dmatrix(double** %450, i32 1, i64 %451, i32 1, i32 3)
%453 = load i8**, i8*** %15
%454 = load i64, i64* %24
%455 = call i32 @free_cmatrix(i8** %453, i32 1, i64 %454, i32 0, i32 29)
%456 = load i64**, i64*** %30
%457 = load i64, i64* %25
%458 = trunc i64 %457 to i32
%459 = call i32 @free_lmatrix(i64** %456, i32 1, i32 %458, i32 1, i32 2)
%460 = load i8*, i8** %12
%461 = load i64, i64* %25
%462 = call i32 @free_cvector(i8* %460, i32 1, i64 %461)
%463 = load i64**, i64*** %34
%464 = call i32 @free_lmatrix(i64** %463, i32 1, i32 500, i32 1, i32 2)
%465 = load i64*, i64** %29
%466 = load i64, i64* %25
%467 = call i32 @free_lvector(i64* %465, i32 1, i64 %466)
%468 = load i64*, i64** %32
%469 = load i64, i64* %25
%470 = call i32 @free_lvector(i64* %468, i32 1, i64 %469)
%471 = load %struct.RNAMemory*, %struct.RNAMemory** %38
ret %struct.RNAMemory* %471
}

LLVM IR (-O2):
%struct.RNAMemory = type { i32 }
@rna.base_all = internal unnamed_addr global i64 0
define %struct.RNAMemory* @rna(i8* %0, i64* %1, i64** %2, i64* nocapture writeonly %3) {
%5 = alloca [512 x i8]
%6 = alloca [512 x i8]
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca [2 x double]
%12 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%14 = bitcast i64* %7 to i8*
%15 = bitcast i64* %8 to i8*
%16 = bitcast i64* %9 to i8*
%17 = bitcast i64* %10 to i8*
%18 = bitcast [2 x double]* %11 to i8*
%19 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
%20 = call i32 @hb_crt_alt(double* %19, i8* %12, i8* %13)
%21 = call i64 @number_of_atoms(i8* %0)
%22 = call i8** @cmatrix(i32 1, i64 %21, i32 0, i32 4)
%23 = call i8** @cmatrix(i32 1, i64 %21, i32 0, i32 3)
%24 = call i8* @cvector(i32 1, i64 %21)
%25 = call i64* @lvector(i32 1, i64 %21)
%26 = call double** @dmatrix(i32 1, i64 %21, i32 1, i32 3)
%27 = call i8** @cmatrix(i32 1, i64 %21, i32 0, i32 29)
%28 = call i64 @read_pdb(i8* %0, i8** %22, i8** %23, i8* %24, i64* %25, double** %26, i8** %27, i8* %13)
%29 = call i64** @residue_idx(i64 %28, i64* %25, i8** %27, i8* %24, i8** %23, i64* %7)
%30 = load i64, i64* %7
%31 = icmp slt i64 %30, 1
br i1 %31, label %131, label %32
32: ; preds = %4
%33 = getelementptr inbounds i64*, i64** %29, i64 1
br label %34
34: ; preds = %32, %126
%35 = phi i64 [ 1, %32 ], [ %128, %126 ]
%36 = phi i64 [ 0, %32 ], [ %127, %126 ]
%37 = getelementptr inbounds i64*, i64** %29, i64 %35
%38 = load i64*, i64** %37
%39 = getelementptr inbounds i64, i64* %38, i64 1
%40 = load i64, i64* %39
%41 = getelementptr inbounds i64, i64* %38, i64 2
%42 = load i64, i64* %41
%43 = call i64 @residue_ident(i8** %22, double** %26, i64 %40, i64 %42)
%44 = icmp sgt i64 %43, -1
br i1 %44, label %45, label %126
45: ; preds = %34
%46 = load i64*, i64** %37
%47 = getelementptr inbounds i64, i64* %46, i64 1
%48 = load i64, i64* %47
%49 = getelementptr inbounds i64, i64* %46, i64 2
%50 = load i64, i64* %49
%51 = icmp sgt i64 %48, %50
br i1 %51, label %126, label %52
52: ; preds = %45, %119
%53 = phi i64 [ %121, %119 ], [ %48, %45 ]
%54 = phi i64 [ %120, %119 ], [ %36, %45 ]
%55 = load i64*, i64** %33
%56 = getelementptr inbounds i64, i64* %55, i64 1
%57 = load i64, i64* %56
%58 = getelementptr inbounds i8, i8* %24, i64 %57
%59 = load i8, i8* %58
%60 = call i64 @toupper(i8 signext %59)
%61 = getelementptr inbounds i8, i8* %24, i64 %53
%62 = load i8, i8* %61
%63 = call i64 @toupper(i8 signext %62)
%64 = icmp eq i64 %60, %63
br i1 %64, label %65, label %119
65: ; preds = %52
%66 = add nsw i64 %54, 1
%67 = getelementptr inbounds i8*, i8** %22, i64 %66
%68 = load i8*, i8** %67
%69 = getelementptr inbounds i8*, i8** %22, i64 %53
%70 = load i8*, i8** %69
%71 = call i32 @strcpy(i8* %68, i8* %70)
%72 = getelementptr inbounds i8*, i8** %23, i64 %66
%73 = load i8*, i8** %72
%74 = getelementptr inbounds i8*, i8** %23, i64 %53
%75 = load i8*, i8** %74
%76 = call i32 @strcpy(i8* %73, i8* %75)
%77 = load i8, i8* %61
%78 = getelementptr inbounds i8, i8* %24, i64 %66
store i8 %77, i8* %78
%79 = getelementptr inbounds i64, i64* %25, i64 %53
%80 = load i64, i64* %79
%81 = getelementptr inbounds i64, i64* %25, i64 %66
store i64 %80, i64* %81
%82 = getelementptr inbounds i8*, i8** %27, i64 %53
%83 = getelementptr inbounds i8*, i8** %27, i64 %66
br label %98
84: ; preds = %98
%85 = getelementptr inbounds double*, double** %26, i64 %53
%86 = load double*, double** %85
%87 = getelementptr inbounds double*, double** %26, i64 %66
%88 = load double*, double** %87
%89 = getelementptr inbounds double, double* %86, i64 1
%90 = load double, double* %89
%91 = getelementptr inbounds double, double* %88, i64 1
store double %90, double* %91
%92 = getelementptr inbounds double, double* %86, i64 2
%93 = load double, double* %92
%94 = getelementptr inbounds double, double* %88, i64 2
store double %93, double* %94
%95 = getelementptr inbounds double, double* %86, i64 3
%96 = load double, double* %95
%97 = getelementptr inbounds double, double* %88, i64 3
store double %96, double* %97
br label %119
98: ; preds = %98, %65
%99 = phi i64 [ 0, %65 ], [ %117, %98 ]
%100 = load i8*, i8** %82
%101 = getelementptr inbounds i8, i8* %100, i64 %99
%102 = load i8, i8* %101
%103 = load i8*, i8** %83
%104 = getelementptr inbounds i8, i8* %103, i64 %99
store i8 %102, i8* %104
%105 = add nuw nsw i64 %99, 1
%106 = load i8*, i8** %82
%107 = getelementptr inbounds i8, i8* %106, i64 %105
%108 = load i8, i8* %107
%109 = load i8*, i8** %83
%110 = getelementptr inbounds i8, i8* %109, i64 %105
store i8 %108, i8* %110
%111 = add nuw nsw i64 %99, 2
%112 = load i8*, i8** %82
%113 = getelementptr inbounds i8, i8* %112, i64 %111
%114 = load i8, i8* %113
%115 = load i8*, i8** %83
%116 = getelementptr inbounds i8, i8* %115, i64 %111
store i8 %114, i8* %116
%117 = add nuw nsw i64 %99, 3
%118 = icmp eq i64 %117, 30
br i1 %118, label %84, label %98
119: ; preds = %84, %52
%120 = phi i64 [ %54, %52 ], [ %66, %84 ]
%121 = add nsw i64 %53, 1
%122 = load i64*, i64** %37
%123 = getelementptr inbounds i64, i64* %122, i64 2
%124 = load i64, i64* %123
%125 = icmp slt i64 %53, %124
br i1 %125, label %52, label %126
126: ; preds = %119, %45, %34
%127 = phi i64 [ %36, %34 ], [ %36, %45 ], [ %120, %119 ]
%128 = add nuw nsw i64 %35, 1
%129 = load i64, i64* %7
%130 = icmp slt i64 %35, %129
br i1 %130, label %34, label %131
131: ; preds = %126, %4
%132 = phi i64 [ 0, %4 ], [ %127, %126 ]
%133 = phi i64 [ %30, %4 ], [ %129, %126 ]
%134 = call i8* @cvector(i32 1, i64 %133)
store i64 0, i64* %8
%135 = call i64** @residue_idx(i64 %132, i64* %25, i8** %27, i8* %24, i8** %23, i64* %8)
%136 = call i64** @lmatrix(i32 1, i32 500, i32 1, i32 2)
%137 = load i64, i64* %8
%138 = call i32 @get_chain_idx(i64 %137, i64** %135, i8* %24, i64* %10, i64** %136)
%139 = load i64, i64* %10
%140 = icmp slt i64 %139, 1
br i1 %140, label %238, label %141
141: ; preds = %131, %233
%142 = phi i64 [ %234, %233 ], [ %139, %131 ]
%143 = phi i64 [ %236, %233 ], [ 1, %131 ]
%144 = phi i64 [ %235, %233 ], [ 0, %131 ]
%145 = getelementptr inbounds i64*, i64** %136, i64 %143
%146 = load i64*, i64** %145
%147 = getelementptr inbounds i64, i64* %146, i64 2
%148 = load i64, i64* %147
%149 = getelementptr inbounds i64, i64* %146, i64 1
%150 = load i64, i64* %149
%151 = icmp sgt i64 %148, %150
br i1 %151, label %152, label %233
152: ; preds = %141, %224
%153 = phi i64 [ %226, %224 ], [ %150, %141 ]
%154 = phi i64 [ %225, %224 ], [ %144, %141 ]
%155 = getelementptr inbounds i64*, i64** %135, i64 %153
%156 = load i64*, i64** %155
%157 = getelementptr inbounds i64, i64* %156, i64 1
%158 = load i64, i64* %157
%159 = getelementptr inbounds i64, i64* %156, i64 2
%160 = load i64, i64* %159
%161 = call i64 @residue_ident(i8** %22, double** %26, i64 %158, i64 %160)
%162 = icmp slt i64 %161, 0
%163 = icmp sgt i64 %158, %160
%164 = or i1 %162, %163
br i1 %164, label %224, label %165
165: ; preds = %152, %187
%166 = phi i64 [ %201, %187 ], [ %158, %152 ]
%167 = phi i64 [ %168, %187 ], [ %154, %152 ]
%168 = add nsw i64 %167, 1
%169 = getelementptr inbounds i8*, i8** %22, i64 %168
%170 = load i8*, i8** %169
%171 = getelementptr inbounds i8*, i8** %22, i64 %166
%172 = load i8*, i8** %171
%173 = call i32 @strcpy(i8* %170, i8* %172)
%174 = getelementptr inbounds i8*, i8** %23, i64 %168
%175 = load i8*, i8** %174
%176 = getelementptr inbounds i8*, i8** %23, i64 %166
%177 = load i8*, i8** %176
%178 = call i32 @strcpy(i8* %175, i8* %177)
%179 = getelementptr inbounds i8, i8* %24, i64 %166
%180 = load i8, i8* %179
%181 = getelementptr inbounds i8, i8* %24, i64 %168
store i8 %180, i8* %181
%182 = getelementptr inbounds i64, i64* %25, i64 %166
%183 = load i64, i64* %182
%184 = getelementptr inbounds i64, i64* %25, i64 %168
store i64 %183, i64* %184
%185 = getelementptr inbounds i8*, i8** %27, i64 %166
%186 = getelementptr inbounds i8*, i8** %27, i64 %168
br label %203
187: ; preds = %203
%188 = getelementptr inbounds double*, double** %26, i64 %166
%189 = load double*, double** %188
%190 = getelementptr inbounds double*, double** %26, i64 %168
%191 = load double*, double** %190
%192 = getelementptr inbounds double, double* %189, i64 1
%193 = load double, double* %192
%194 = getelementptr inbounds double, double* %191, i64 1
store double %193, double* %194
%195 = getelementptr inbounds double, double* %189, i64 2
%196 = load double, double* %195
%197 = getelementptr inbounds double, double* %191, i64 2
store double %196, double* %197
%198 = getelementptr inbounds double, double* %189, i64 3
%199 = load double, double* %198
%200 = getelementptr inbounds double, double* %191, i64 3
store double %199, double* %200
%201 = add i64 %166, 1
%202 = icmp eq i64 %166, %160
br i1 %202, label %224, label %165
203: ; preds = %203, %165
%204 = phi i64 [ 0, %165 ], [ %222, %203 ]
%205 = load i8*, i8** %185
%206 = getelementptr inbounds i8, i8* %205, i64 %204
%207 = load i8, i8* %206
%208 = load i8*, i8** %186
%209 = getelementptr inbounds i8, i8* %208, i64 %204
store i8 %207, i8* %209
%210 = add nuw nsw i64 %204, 1
%211 = load i8*, i8** %185
%212 = getelementptr inbounds i8, i8* %211, i64 %210
%213 = load i8, i8* %212
%214 = load i8*, i8** %186
%215 = getelementptr inbounds i8, i8* %214, i64 %210
store i8 %213, i8* %215
%216 = add nuw nsw i64 %204, 2
%217 = load i8*, i8** %185
%218 = getelementptr inbounds i8, i8* %217, i64 %216
%219 = load i8, i8* %218
%220 = load i8*, i8** %186
%221 = getelementptr inbounds i8, i8* %220, i64 %216
store i8 %219, i8* %221
%222 = add nuw nsw i64 %204, 3
%223 = icmp eq i64 %222, 30
br i1 %223, label %187, label %203
224: ; preds = %187, %152
%225 = phi i64 [ %154, %152 ], [ %168, %187 ]
%226 = add nsw i64 %153, 1
%227 = load i64*, i64** %145
%228 = getelementptr inbounds i64, i64* %227, i64 2
%229 = load i64, i64* %228
%230 = icmp slt i64 %153, %229
br i1 %230, label %152, label %231
231: ; preds = %224
%232 = load i64, i64* %10
br label %233
233: ; preds = %231, %141
%234 = phi i64 [ %142, %141 ], [ %232, %231 ]
%235 = phi i64 [ %144, %141 ], [ %225, %231 ]
%236 = add nuw nsw i64 %143, 1
%237 = icmp slt i64 %143, %234
br i1 %237, label %141, label %238
238: ; preds = %233, %131
%239 = phi i64 [ 0, %131 ], [ %235, %233 ]
store i64 0, i64* %8
%240 = call i64** @residue_idx(i64 %239, i64* %25, i8** %27, i8* %24, i8** %23, i64* %8)
%241 = load i64, i64* %7
%242 = call i64* @lvector(i32 1, i64 %241)
%243 = load i64, i64* %7
%244 = call i64* @lvector(i32 1, i64 %243)
%245 = load i64, i64* %8
%246 = call i32 @get_seq(i64 %245, i64** %240, i8** %22, i8** %23, i8* %24, i64* %25, i8** %27, double** %26, i8* %134, i64* %242, i64* %9, i64* %244)
%247 = load i64, i64* %8
%248 = load i64, i64* %9
%249 = call %struct.RNAMemory* @work_horse(i8* %0, i64 %247, i64 %239, i8* %134, i64** %240, i64* %242, i8** %22, i8** %23, i8* %24, i64* %25, i8** %27, double** %26, i64 %248, i64* %244, i64* %1, i64** %2)
%250 = load i64, i64* @rna.base_all
%251 = load i64, i64* %8
%252 = add nsw i64 %251, %250
store i64 %252, i64* @rna.base_all
store i64 %252, i64* %3
%253 = call i32 @free_cmatrix(i8** %22, i32 1, i64 %28, i32 0, i32 4)
%254 = call i32 @free_cmatrix(i8** %23, i32 1, i64 %28, i32 0, i32 3)
%255 = call i32 @free_cvector(i8* %24, i32 1, i64 %28)
%256 = call i32 @free_lvector(i64* %25, i32 1, i64 %28)
%257 = call i32 @free_dmatrix(double** %26, i32 1, i64 %28, i32 1, i32 3)
%258 = call i32 @free_cmatrix(i8** %27, i32 1, i64 %28, i32 0, i32 29)
%259 = load i64, i64* %7
%260 = trunc i64 %259 to i32
%261 = call i32 @free_lmatrix(i64** %240, i32 1, i32 %260, i32 1, i32 2)
%262 = load i64, i64* %7
%263 = call i32 @free_cvector(i8* %134, i32 1, i64 %262)
%264 = call i32 @free_lmatrix(i64** %136, i32 1, i32 500, i32 1, i32 2)
%265 = load i64, i64* %7
%266 = call i32 @free_lvector(i64* %242, i32 1, i64 %265)
%267 = load i64, i64* %7
%268 = call i32 @free_lvector(i64* %244, i32 1, i64 %267)
ret %struct.RNAMemory* %249
}