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

/* Variables and functions */
char atoi(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
scalar_t__ strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
int get_demetri_out(void) {
  char line[160], num[2] = " ", atomname[6], conformerlable;
  int i;
  FILE *fp, *fp2;
  fp = fopen("step2_out.pdb", "r+");
  fp2 = fopen("demetri_out.pdb", "w");
  rewind(fp);
  rewind(fp2);
  while (fgets(line, sizeof(line), fp)) {
    if (strncmp("__", line + 82, 2) || strncmp("__", line + 84, 2)) {
      strncpy(line + 7, "AB  ", 4);
    } else {
      strncpy(line + 7, "AA  ", 4);
    }
    strncpy(atomname, line + 12, 5);
    atomname[5] = ' ';
    if (!strncmp(line + 17, "CTR", 3) || !strncmp(line + 17, "NTR", 3))
      atomname[4] = 'T';
    if (atomname[0] <= 57 && atomname[0] >= 49) {
      atomname[5] = atomname[0];
      atomname[0] = ' ';
    } else if (atomname[0] != ' ') {
      for (i = 4; i >= 0; i--)
        atomname[i + 1] = atomname[i];
      atomname[0] = ' ';
    }
    for (i = 2; i < 6; i++) {
      if (' ' == atomname[i - 1] && atomname[i] != ' ') {
        atomname[i - 1] = atomname[i];
        atomname[i] = ' ';
        i = i - 2;
      }
    }
    strncpy(line + 12, atomname, 5);
    strncpy(atomname, line + 13, 6);
    if (!strncmp(atomname, "H ", 4)) {
      line[14] = 'N';
    } else if (!strncmp(atomname, "HXTTCT", 6)) {
      line[14] = 'T';
      line[15] = ' ';
      line[16] = ' ';
    } else if (!strncmp(atomname, "OXTTCT", 6)) {
      line[14] = 'T';
      line[15] = '2';
      line[16] = ' ';
    } else if (!strncmp(atomname, "OT CT", 6))
      line[15] = '1';
    else if (!strncmp(atomname, "HT1 NT", 6))
      line[15] = '3';
    else if (!strncmp(atomname, "H1A PA", 6) ||
             !strncmp(atomname, "H2A PA", 6)) {
      line[14] = 'T';
      line[15] = ' ';
    } else if (!strncmp(atomname, "H1D PD", 6) ||
               !strncmp(atomname, "H2D PD", 6)) {
      line[14] = 'T';
      line[15] = ' ';
    } else if (!strncmp(atomname, "HE1 GL", 6) ||
               !strncmp(atomname, "HE2 GL", 6)) {
      line[14] = 'T';
      line[15] = ' ';
    } else if (!strncmp(atomname, "HD1 AS", 6) ||
               !strncmp(atomname, "HD2 AS", 6)) {
      line[14] = 'T';
      line[15] = ' ';
    }
    if ('+' == line[80])
      line[19] = '+';
    else if ('-' == line[80])
      line[19] = '-';
    for (i = 23; ' ' == line[i]; i++)
      line[i] = '0';
    num[1] = line[29];
    num[0] = line[28];
    conformerlable = atoi(num);
    if (0 == conformerlable)
      conformerlable = 65;
    else if (conformerlable > 0 && conformerlable <= 26)
      conformerlable += 64;
    else if (conformerlable > 26 && conformerlable <= 52)
      conformerlable += 70;
    else {
      printf("\n   The number of conformers exceeds 52!\n");
      return -1;
    }
    line[26] = conformerlable;
    line[29] = ' ';
    line[28] = ' ';
    line[27] = ' ';
    for (i = 80; i < 90; i++)
      line[i] = ' ';
    fprintf(fp2, "%s", line);
  }
  rewind(fp);
  rewind(fp2);
  fclose(fp);
  fclose(fp2);
  return 0;
}


x86 assembly (clang, -O0):
<get_demetri_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    0xe8c(%rip),%ax
mov    %ax,-0xb2(%rbp)
lea    0xe50(%rip),%rdi
lea    0xe57(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0xc8(%rbp)
lea    0xe47(%rip),%rdi
lea    0xe50(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0xd0(%rbp)
mov    -0xc8(%rbp),%rdi
call   1070 <rewind@plt>
mov    -0xd0(%rbp),%rdi
call   1070 <rewind@plt>
lea    -0xb0(%rbp),%rdi
mov    -0xc8(%rbp),%rdx
mov    $0xa0,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     18e4 <get_demetri_out+0x754>
lea    -0xb0(%rbp),%rsi
add    $0x52,%rsi
lea    0xdfa(%rip),%rdi
mov    $0x2,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1263 <get_demetri_out+0xd3>
lea    -0xb0(%rbp),%rsi
add    $0x54,%rsi
lea    0xdd4(%rip),%rdi
mov    $0x2,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     1284 <get_demetri_out+0xf4>
lea    -0xb0(%rbp),%rdi
add    $0x7,%rdi
lea    0xdb1(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncpy@plt>
jmp    12a0 <get_demetri_out+0x110>
lea    -0xb0(%rbp),%rdi
add    $0x7,%rdi
lea    0xd95(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncpy@plt>
lea    -0xb8(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
add    $0xc,%rsi
mov    $0x5,%edx
call   1030 <strncpy@plt>
movb   $0x20,-0xb3(%rbp)
lea    -0xb0(%rbp),%rdi
add    $0x11,%rdi
lea    0xd5b(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     130f <get_demetri_out+0x17f>
lea    -0xb0(%rbp),%rdi
add    $0x11,%rdi
lea    0xd39(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1316 <get_demetri_out+0x186>
movb   $0x54,-0xb4(%rbp)
movsbl -0xb8(%rbp),%eax
cmp    $0x39,%eax
jg     134e <get_demetri_out+0x1be>
movsbl -0xb8(%rbp),%eax
cmp    $0x31,%eax
jl     134e <get_demetri_out+0x1be>
mov    -0xb8(%rbp),%al
mov    %al,-0xb3(%rbp)
movb   $0x20,-0xb8(%rbp)
jmp    13b5 <get_demetri_out+0x225>
movsbl -0xb8(%rbp),%eax
cmp    $0x20,%eax
je     13b0 <get_demetri_out+0x220>
movl   $0x4,-0xc0(%rbp)
cmpl   $0x0,-0xc0(%rbp)
jl     13a9 <get_demetri_out+0x219>
movslq -0xc0(%rbp),%rax
mov    -0xb8(%rbp,%rax,1),%cl
mov    -0xc0(%rbp),%eax
add    $0x1,%eax
cltq
mov    %cl,-0xb8(%rbp,%rax,1)
mov    -0xc0(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc0(%rbp)
jmp    1368 <get_demetri_out+0x1d8>
movb   $0x20,-0xb8(%rbp)
jmp    13b5 <get_demetri_out+0x225>
movl   $0x2,-0xc0(%rbp)
cmpl   $0x6,-0xc0(%rbp)
jge    145b <get_demetri_out+0x2cb>
mov    -0xc0(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0xb8(%rbp,%rax,1),%ecx
ff
mov    $0x20,%eax
cmp    %ecx,%eax
jne    1442 <get_demetri_out+0x2b2>
movslq -0xc0(%rbp),%rax
movsbl -0xb8(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
je     1442 <get_demetri_out+0x2b2>
movslq -0xc0(%rbp),%rax
mov    -0xb8(%rbp,%rax,1),%cl
mov    -0xc0(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %cl,-0xb8(%rbp,%rax,1)
movslq -0xc0(%rbp),%rax
movb   $0x20,-0xb8(%rbp,%rax,1)
20
mov    -0xc0(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0xc0(%rbp)
jmp    1447 <get_demetri_out+0x2b7>
mov    -0xc0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc0(%rbp)
jmp    13bf <get_demetri_out+0x22f>
lea    -0xb0(%rbp),%rdi
add    $0xc,%rdi
lea    -0xb8(%rbp),%rsi
mov    $0x5,%edx
call   1030 <strncpy@plt>
lea    -0xb8(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
add    $0xd,%rsi
mov    $0x6,%edx
call   1030 <strncpy@plt>
lea    -0xb8(%rbp),%rdi
lea    0xb97(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    14c1 <get_demetri_out+0x331>
movb   $0x4e,-0xa2(%rbp)
jmp    1714 <get_demetri_out+0x584>
lea    -0xb8(%rbp),%rdi
lea    0xb6c(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    14fd <get_demetri_out+0x36d>
movb   $0x54,-0xa2(%rbp)
movb   $0x20,-0xa1(%rbp)
movb   $0x20,-0xa0(%rbp)
jmp    170f <get_demetri_out+0x57f>
lea    -0xb8(%rbp),%rdi
lea    0xb37(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1539 <get_demetri_out+0x3a9>
movb   $0x54,-0xa2(%rbp)
movb   $0x32,-0xa1(%rbp)
movb   $0x20,-0xa0(%rbp)
jmp    170a <get_demetri_out+0x57a>
lea    -0xb8(%rbp),%rdi
lea    0xb02(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1567 <get_demetri_out+0x3d7>
movb   $0x31,-0xa1(%rbp)
jmp    1705 <get_demetri_out+0x575>
lea    -0xb8(%rbp),%rdi
lea    0xada(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1595 <get_demetri_out+0x405>
movb   $0x33,-0xa1(%rbp)
jmp    1700 <get_demetri_out+0x570>
lea    -0xb8(%rbp),%rdi
lea    0xab3(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     15d9 <get_demetri_out+0x449>
lea    -0xb8(%rbp),%rdi
lea    0xa98(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    15ec <get_demetri_out+0x45c>
movb   $0x54,-0xa2(%rbp)
movb   $0x20,-0xa1(%rbp)
jmp    16fb <get_demetri_out+0x56b>
lea    -0xb8(%rbp),%rdi
lea    0xa6a(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     1630 <get_demetri_out+0x4a0>
lea    -0xb8(%rbp),%rdi
lea    0xa4f(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1643 <get_demetri_out+0x4b3>
movb   $0x54,-0xa2(%rbp)
movb   $0x20,-0xa1(%rbp)
jmp    16f6 <get_demetri_out+0x566>
lea    -0xb8(%rbp),%rdi
lea    0xa21(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     1687 <get_demetri_out+0x4f7>
lea    -0xb8(%rbp),%rdi
lea    0xa06(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    169a <get_demetri_out+0x50a>
movb   $0x54,-0xa2(%rbp)
movb   $0x20,-0xa1(%rbp)
jmp    16f1 <get_demetri_out+0x561>
lea    -0xb8(%rbp),%rdi
lea    0x9d8(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     16de <get_demetri_out+0x54e>
lea    -0xb8(%rbp),%rdi
lea    0x9bd(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    16ec <get_demetri_out+0x55c>
movb   $0x54,-0xa2(%rbp)
movb   $0x20,-0xa1(%rbp)
jmp    16f1 <get_demetri_out+0x561>
jmp    16f6 <get_demetri_out+0x566>
jmp    16fb <get_demetri_out+0x56b>
jmp    1700 <get_demetri_out+0x570>
jmp    1705 <get_demetri_out+0x575>
jmp    170a <get_demetri_out+0x57a>
jmp    170f <get_demetri_out+0x57f>
jmp    1714 <get_demetri_out+0x584>
movsbl -0x60(%rbp),%ecx
mov    $0x2b,%eax
cmp    %ecx,%eax
jne    1731 <get_demetri_out+0x5a1>
movb   $0x2b,-0x9d(%rbp)
jmp    174e <get_demetri_out+0x5be>
movsbl -0x60(%rbp),%ecx
mov    $0x2d,%eax
cmp    %ecx,%eax
jne    1749 <get_demetri_out+0x5b9>
movb   $0x2d,-0x9d(%rbp)
jmp    174e <get_demetri_out+0x5be>
movl   $0x17,-0xc0(%rbp)
movslq -0xc0(%rbp),%rax
movsbl -0xb0(%rbp,%rax,1),%ecx
ff
mov    $0x20,%eax
cmp    %ecx,%eax
jne    1797 <get_demetri_out+0x607>
movslq -0xc0(%rbp),%rax
movb   $0x30,-0xb0(%rbp,%rax,1)
30
mov    -0xc0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc0(%rbp)
jmp    1758 <get_demetri_out+0x5c8>
mov    -0x93(%rbp),%al
mov    %al,-0xb1(%rbp)
mov    -0x94(%rbp),%al
mov    %al,-0xb2(%rbp)
lea    -0xb2(%rbp),%rdi
call   10b0 <atoi@plt>
mov    %al,-0xb9(%rbp)
movsbl -0xb9(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    17de <get_demetri_out+0x64e>
movb   $0x41,-0xb9(%rbp)
jmp    186a <get_demetri_out+0x6da>
movsbl -0xb9(%rbp),%eax
cmp    $0x0,%eax
jle    1813 <get_demetri_out+0x683>
movsbl -0xb9(%rbp),%eax
cmp    $0x1a,%eax
jg     1813 <get_demetri_out+0x683>
movsbl -0xb9(%rbp),%eax
add    $0x40,%eax
mov    %al,-0xb9(%rbp)
jmp    1865 <get_demetri_out+0x6d5>
movsbl -0xb9(%rbp),%eax
cmp    $0x1a,%eax
jle    1848 <get_demetri_out+0x6b8>
movsbl -0xb9(%rbp),%eax
cmp    $0x34,%eax
jg     1848 <get_demetri_out+0x6b8>
movsbl -0xb9(%rbp),%eax
add    $0x46,%eax
mov    %al,-0xb9(%rbp)
jmp    1860 <get_demetri_out+0x6d0>
lea    0x83f(%rip),%rdi
call   1060 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    191b <get_demetri_out+0x78b>
jmp    1865 <get_demetri_out+0x6d5>
jmp    186a <get_demetri_out+0x6da>
mov    -0xb9(%rbp),%al
mov    %al,-0x96(%rbp)
movb   $0x20,-0x93(%rbp)
movb   $0x20,-0x94(%rbp)
movb   $0x20,-0x95(%rbp)
movl   $0x50,-0xc0(%rbp)
cmpl   $0x5a,-0xc0(%rbp)
jge    18c5 <get_demetri_out+0x735>
movslq -0xc0(%rbp),%rax
movb   $0x20,-0xb0(%rbp,%rax,1)
20
mov    -0xc0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc0(%rbp)
jmp    1895 <get_demetri_out+0x705>
mov    -0xd0(%rbp),%rdi
lea    -0xb0(%rbp),%rdx
lea    0x7de(%rip),%rsi
call   1090 <fprintf@plt>
jmp    11f5 <get_demetri_out+0x65>
mov    -0xc8(%rbp),%rdi
call   1070 <rewind@plt>
mov    -0xd0(%rbp),%rdi
call   1070 <rewind@plt>
mov    -0xc8(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0xd0(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_demetri_out>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
movw   $0x20,0xe(%rsp)
lea    0xe51(%rip),%rdi
lea    0xe58(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%r15
lea    0xe4c(%rip),%rdi
lea    0xe55(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%r14
mov    %r15,%rdi
call   1070 <rewind@plt>
mov    %r14,%rdi
call   1070 <rewind@plt>
lea    0x10(%rsp),%rdi
mov    $0xa0,%esi
mov    %r15,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     15cf <get_demetri_out+0x43f>
lea    0x62(%rsp),%rbx
lea    0x1c(%rsp),%rbp
lea    0x8(%rsp),%r13
lea    0x10(%rsp),%r12
jmp    126a <get_demetri_out+0xda>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x41,%al
mov    %al,0x2a(%rsp)
movb   $0x20,0x2d(%rsp)
movw   $0x2020,0x2b(%rsp)
movabs $0x2020202020202020,%rax
20 20 20
mov    %rax,-0x2(%rbx)
movw   $0x2020,0x6(%rbx)
mov    %r12,%rdi
mov    %r14,%rsi
call   1080 <fputs@plt>
mov    %r12,%rdi
mov    $0xa0,%esi
mov    %r15,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     15cf <get_demetri_out+0x43f>
lea    0xdb2(%rip),%rdi
mov    %rbx,%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
lea    0xda1(%rip),%rsi
test   %rax,%rax
jne    12b5 <get_demetri_out+0x125>
lea    0xd92(%rip),%rdi
lea    0x64(%rsp),%rsi
mov    $0x2,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
lea    0xd7c(%rip),%rsi
lea    0xd7a(%rip),%rax
cmove  %rax,%rsi
lea    0x17(%rsp),%rdi
mov    $0x4,%edx
call   1030 <strncpy@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
mov    $0x5,%edx
call   1030 <strncpy@plt>
movb   $0x20,0xd(%rsp)
lea    0x21(%rsp),%rdi
lea    0xd4b(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     130f <get_demetri_out+0x17f>
lea    0x21(%rsp),%rdi
lea    0xd34(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
jne    1314 <get_demetri_out+0x184>
movb   $0x54,0xc(%rsp)
mov    0x8(%rsp),%al
lea    -0x31(%rax),%ecx
cmp    $0x8,%cl
ja     1330 <get_demetri_out+0x1a0>
mov    %al,0xd(%rsp)
jmp    1346 <get_demetri_out+0x1b6>
cs nopw 0x0(%rax,%rax,1)
cmp    $0x20,%al
je     134b <get_demetri_out+0x1bb>
mov    0x8(%rsp),%eax
mov    0xc(%rsp),%cl
lea    0x9(%rsp),%rdx
mov    %cl,0x4(%rdx)
mov    %eax,(%rdx)
movb   $0x20,0x8(%rsp)
mov    $0x2,%eax
jmp    136a <get_demetri_out+0x1da>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x1(%rax),%ecx
cmp    $0x5,%eax
mov    %ecx,%eax
jge    1390 <get_demetri_out+0x200>
movslq %eax,%rcx
cmpb   $0x20,-0x1(%rcx,%r13,1)
jne    1360 <get_demetri_out+0x1d0>
movzbl 0x8(%rsp,%rcx,1),%edx
cmp    $0x20,%dl
je     1360 <get_demetri_out+0x1d0>
mov    %dl,0x7(%rsp,%rcx,1)
movb   $0x20,0x8(%rsp,%rcx,1)
add    $0xfffffffe,%ecx
mov    %ecx,%eax
jmp    1360 <get_demetri_out+0x1d0>
nop
mov    %rbp,%rdi
mov    %r13,%rsi
mov    $0x5,%edx
call   1030 <strncpy@plt>
mov    %r13,%rdi
lea    0x1d(%rsp),%rsi
mov    $0x6,%edx
call   1030 <strncpy@plt>
mov    %r13,%rdi
lea    0xc7c(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1520 <get_demetri_out+0x390>
mov    %r13,%rdi
lea    0xc62(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1530 <get_demetri_out+0x3a0>
mov    %r13,%rdi
lea    0xc4c(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     153e <get_demetri_out+0x3ae>
mov    %r13,%rdi
lea    0xc36(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     154c <get_demetri_out+0x3bc>
mov    %r13,%rdi
lea    0xc1f(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1553 <get_demetri_out+0x3c3>
mov    %r13,%rdi
lea    0xc09(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1513 <get_demetri_out+0x383>
mov    %r13,%rdi
lea    0xbf3(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1513 <get_demetri_out+0x383>
mov    %r13,%rdi
lea    0xbdd(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1513 <get_demetri_out+0x383>
mov    %r13,%rdi
lea    0xbcb(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1513 <get_demetri_out+0x383>
mov    %r13,%rdi
lea    0xbb9(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1513 <get_demetri_out+0x383>
mov    %r13,%rdi
lea    0xba7(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1513 <get_demetri_out+0x383>
mov    %r13,%rdi
lea    0xb95(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1513 <get_demetri_out+0x383>
mov    %r13,%rdi
lea    0xb83(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
jne    1560 <get_demetri_out+0x3d0>
movw   $0x2054,0x1e(%rsp)
jmp    1560 <get_demetri_out+0x3d0>
nopl   0x0(%rax)
movb   $0x4e,0x1e(%rsp)
jmp    1560 <get_demetri_out+0x3d0>
nopw   0x0(%rax,%rax,1)
movw   $0x2054,0x1e(%rsp)
movb   $0x20,0x20(%rsp)
jmp    1560 <get_demetri_out+0x3d0>
movw   $0x3254,0x1e(%rsp)
movb   $0x20,0x20(%rsp)
jmp    1560 <get_demetri_out+0x3d0>
movb   $0x31,0x1f(%rsp)
jmp    1560 <get_demetri_out+0x3d0>
movb   $0x33,0x1f(%rsp)
nopl   0x0(%rax,%rax,1)
mov    0x60(%rsp),%al
cmp    $0x2b,%al
je     156e <get_demetri_out+0x3de>
cmp    $0x2d,%al
jne    1572 <get_demetri_out+0x3e2>
mov    $0x2d,%al
mov    %al,0x23(%rsp)
cmpb   $0x20,0x27(%rsp)
jne    158d <get_demetri_out+0x3fd>
lea    0x28(%rsp),%rax
xchg   %ax,%ax
movb   $0x30,-0x1(%rax)
cmpb   $0x20,(%rax)
lea    0x1(%rax),%rax
je     1580 <get_demetri_out+0x3f0>
movzwl 0x2c(%rsp),%eax
mov    %ax,0xe(%rsp)
lea    0xe(%rsp),%rdi
call   10b0 <atoi@plt>
test   %al,%al
je     1220 <get_demetri_out+0x90>
lea    -0x1(%rax),%ecx
cmp    $0x19,%cl
ja     15c0 <get_demetri_out+0x430>
add    $0x40,%al
jmp    1222 <get_demetri_out+0x92>
nopl   0x0(%rax,%rax,1)
lea    -0x1b(%rax),%ecx
cmp    $0x19,%cl
ja     1603 <get_demetri_out+0x473>
add    $0x46,%al
jmp    1222 <get_demetri_out+0x92>
mov    %r15,%rdi
call   1070 <rewind@plt>
mov    %r14,%rdi
call   1070 <rewind@plt>
mov    %r15,%rdi
call   1060 <fclose@plt>
mov    %r14,%rdi
call   1060 <fclose@plt>
xor    %eax,%eax
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xa84(%rip),%rdi
call   1050 <puts@plt>
mov    $0xffffffff,%eax
jmp    15f1 <get_demetri_out+0x461>

LLVM IR (-O0):
@__const.get_demetri_out.num = [2 x i8] c" \00"
@.str = [14 x i8] c"step2_out.pdb\00"
@.str.1 = [3 x i8] c"r+\00"
@.str.2 = [16 x i8] c"demetri_out.pdb\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [3 x i8] c"__\00"
@.str.5 = [5 x i8] c"AB \00"
@.str.6 = [5 x i8] c"AA \00"
@.str.7 = [4 x i8] c"CTR\00"
@.str.8 = [4 x i8] c"NTR\00"
@.str.9 = [3 x i8] c"H \00"
@.str.10 = [7 x i8] c"HXTTCT\00"
@.str.11 = [7 x i8] c"OXTTCT\00"
@.str.12 = [6 x i8] c"OT CT\00"
@.str.13 = [7 x i8] c"HT1 NT\00"
@.str.14 = [7 x i8] c"H1A PA\00"
@.str.15 = [7 x i8] c"H2A PA\00"
@.str.16 = [7 x i8] c"H1D PD\00"
@.str.17 = [7 x i8] c"H2D PD\00"
@.str.18 = [7 x i8] c"HE1 GL\00"
@.str.19 = [7 x i8] c"HE2 GL\00"
@.str.20 = [7 x i8] c"HD1 AS\00"
@.str.21 = [7 x i8] c"HD2 AS\00"
@.str.22 = [42 x i8] c"\0A The number of conformers exceeds 52!\0A\00"
@.str.23 = [3 x i8] c"%s\00"
define i32 @get_demetri_out() {
%1 = alloca i32
%2 = alloca [160 x i8]
%3 = alloca [2 x i8]
%4 = alloca [6 x i8]
%5 = alloca i8
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = bitcast [2 x i8]* %3 to i8*
%10 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %10, i32** %7
%11 = call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %11, i32** %8
%12 = load i32*, i32** %7
%13 = call i32 @rewind(i32* %12)
%14 = load i32*, i32** %8
%15 = call i32 @rewind(i32* %14)
br label %16
16: ; preds = %315, %0
%17 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 0
%18 = load i32*, i32** %7
%19 = call i64 @fgets(i8* %17, i32 160, i32* %18)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %319
21: ; preds = %16
%22 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 0
%23 = getelementptr inbounds i8, i8* %22, i64 82
%24 = call i64 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %23, i32 2)
%25 = icmp ne i64 %24, 0
br i1 %25, label %31, label %26
26: ; preds = %21
%27 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 0
%28 = getelementptr inbounds i8, i8* %27, i64 84
%29 = call i64 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %28, i32 2)
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %35
31: ; preds = %26, %21
%32 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 0
%33 = getelementptr inbounds i8, i8* %32, i64 7
%34 = call i32 @strncpy(i8* %33, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 4)
br label %39
35: ; preds = %26
%36 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 0
%37 = getelementptr inbounds i8, i8* %36, i64 7
%38 = call i32 @strncpy(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 4)
br label %39
39: ; preds = %35, %31
%40 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%41 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 0
%42 = getelementptr inbounds i8, i8* %41, i64 12
%43 = call i32 @strncpy(i8* %40, i8* %42, i32 5)
%44 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 5
store i8 32, i8* %44
%45 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 0
%46 = getelementptr inbounds i8, i8* %45, i64 17
%47 = call i64 @strncmp(i8* %46, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %54
49: ; preds = %39
%50 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 0
%51 = getelementptr inbounds i8, i8* %50, i64 17
%52 = call i64 @strncmp(i8* %51, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%53 = icmp ne i64 %52, 0
br i1 %53, label %56, label %54
54: ; preds = %49, %39
%55 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 4
store i8 84, i8* %55
br label %56
56: ; preds = %54, %49
%57 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = icmp sle i32 %59, 57
br i1 %60, label %61, label %71
61: ; preds = %56
%62 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%63 = load i8, i8* %62
%64 = sext i8 %63 to i32
%65 = icmp sge i32 %64, 49
br i1 %65, label %66, label %71
66: ; preds = %61
%67 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%68 = load i8, i8* %67
%69 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 5
store i8 %68, i8* %69
%70 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
store i8 32, i8* %70
br label %95
71: ; preds = %61, %56
%72 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%73 = load i8, i8* %72
%74 = sext i8 %73 to i32
%75 = icmp ne i32 %74, 32
br i1 %75, label %76, label %94
76: ; preds = %71
store i32 4, i32* %6
br label %77
77: ; preds = %89, %76
%78 = load i32, i32* %6
%79 = icmp sge i32 %78, 0
br i1 %79, label %80, label %92
80: ; preds = %77
%81 = load i32, i32* %6
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 %82
%84 = load i8, i8* %83
%85 = load i32, i32* %6
%86 = add nsw i32 %85, 1
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 %87
store i8 %84, i8* %88
br label %89
89: ; preds = %80
%90 = load i32, i32* %6
%91 = add nsw i32 %90, -1
store i32 %91, i32* %6
br label %77
92: ; preds = %77
%93 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
store i8 32, i8* %93
br label %94
94: ; preds = %92, %71
br label %95
95: ; preds = %94, %66
store i32 2, i32* %6
br label %96
96: ; preds = %129, %95
%97 = load i32, i32* %6
%98 = icmp slt i32 %97, 6
br i1 %98, label %99, label %132
99: ; preds = %96
%100 = load i32, i32* %6
%101 = sub nsw i32 %100, 1
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 %102
%104 = load i8, i8* %103
%105 = sext i8 %104 to i32
%106 = icmp eq i32 32, %105
br i1 %106, label %107, label %128
107: ; preds = %99
%108 = load i32, i32* %6
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 %109
%111 = load i8, i8* %110
%112 = sext i8 %111 to i32
%113 = icmp ne i32 %112, 32
br i1 %113, label %114, label %128
114: ; preds = %107
%115 = load i32, i32* %6
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 %116
%118 = load i8, i8* %117
%119 = load i32, i32* %6
%120 = sub nsw i32 %119, 1
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 %121
store i8 %118, i8* %122
%123 = load i32, i32* %6
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 %124
store i8 32, i8* %125
%126 = load i32, i32* %6
%127 = sub nsw i32 %126, 2
store i32 %127, i32* %6
br label %128
128: ; preds = %114, %107, %99
br label %129
129: ; preds = %128
%130 = load i32, i32* %6
%131 = add nsw i32 %130, 1
store i32 %131, i32* %6
br label %96
132: ; preds = %96
%133 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 0
%134 = getelementptr inbounds i8, i8* %133, i64 12
%135 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%136 = call i32 @strncpy(i8* %134, i8* %135, i32 5)
%137 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%138 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 0
%139 = getelementptr inbounds i8, i8* %138, i64 13
%140 = call i32 @strncpy(i8* %137, i8* %139, i32 6)
%141 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%142 = call i64 @strncmp(i8* %141, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 4)
%143 = icmp ne i64 %142, 0
br i1 %143, label %146, label %144
144: ; preds = %132
%145 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 14
store i8 78, i8* %145
br label %226
146: ; preds = %132
%147 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%148 = call i64 @strncmp(i8* %147, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 6)
%149 = icmp ne i64 %148, 0
br i1 %149, label %154, label %150
150: ; preds = %146
%151 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 14
store i8 84, i8* %151
%152 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 15
store i8 32, i8* %152
%153 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 16
store i8 32, i8* %153
br label %225
154: ; preds = %146
%155 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%156 = call i64 @strncmp(i8* %155, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i32 6)
%157 = icmp ne i64 %156, 0
br i1 %157, label %162, label %158
158: ; preds = %154
%159 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 14
store i8 84, i8* %159
%160 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 15
store i8 50, i8* %160
%161 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 16
store i8 32, i8* %161
br label %224
162: ; preds = %154
%163 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%164 = call i64 @strncmp(i8* %163, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i32 6)
%165 = icmp ne i64 %164, 0
br i1 %165, label %168, label %166
166: ; preds = %162
%167 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 15
store i8 49, i8* %167
br label %223
168: ; preds = %162
%169 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%170 = call i64 @strncmp(i8* %169, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i32 6)
%171 = icmp ne i64 %170, 0
br i1 %171, label %174, label %172
172: ; preds = %168
%173 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 15
store i8 51, i8* %173
br label %222
174: ; preds = %168
%175 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%176 = call i64 @strncmp(i8* %175, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i32 6)
%177 = icmp ne i64 %176, 0
br i1 %177, label %178, label %182
178: ; preds = %174
%179 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%180 = call i64 @strncmp(i8* %179, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), i32 6)
%181 = icmp ne i64 %180, 0
br i1 %181, label %185, label %182
182: ; preds = %178, %174
%183 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 14
store i8 84, i8* %183
%184 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 15
store i8 32, i8* %184
br label %221
185: ; preds = %178
%186 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%187 = call i64 @strncmp(i8* %186, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i32 6)
%188 = icmp ne i64 %187, 0
br i1 %188, label %189, label %193
189: ; preds = %185
%190 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%191 = call i64 @strncmp(i8* %190, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i32 6)
%192 = icmp ne i64 %191, 0
br i1 %192, label %196, label %193
193: ; preds = %189, %185
%194 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 14
store i8 84, i8* %194
%195 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 15
store i8 32, i8* %195
br label %220
196: ; preds = %189
%197 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%198 = call i64 @strncmp(i8* %197, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0), i32 6)
%199 = icmp ne i64 %198, 0
br i1 %199, label %200, label %204
200: ; preds = %196
%201 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%202 = call i64 @strncmp(i8* %201, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0), i32 6)
%203 = icmp ne i64 %202, 0
br i1 %203, label %207, label %204
204: ; preds = %200, %196
%205 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 14
store i8 84, i8* %205
%206 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 15
store i8 32, i8* %206
br label %219
207: ; preds = %200
%208 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%209 = call i64 @strncmp(i8* %208, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0), i32 6)
%210 = icmp ne i64 %209, 0
br i1 %210, label %211, label %215
211: ; preds = %207
%212 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%213 = call i64 @strncmp(i8* %212, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i64 0, i64 0), i32 6)
%214 = icmp ne i64 %213, 0
br i1 %214, label %218, label %215
215: ; preds = %211, %207
%216 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 14
store i8 84, i8* %216
%217 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 15
store i8 32, i8* %217
br label %218
218: ; preds = %215, %211
br label %219
219: ; preds = %218, %204
br label %220
220: ; preds = %219, %193
br label %221
221: ; preds = %220, %182
br label %222
222: ; preds = %221, %172
br label %223
223: ; preds = %222, %166
br label %224
224: ; preds = %223, %158
br label %225
225: ; preds = %224, %150
br label %226
226: ; preds = %225, %144
%227 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 80
%228 = load i8, i8* %227
%229 = sext i8 %228 to i32
%230 = icmp eq i32 43, %229
br i1 %230, label %231, label %233
231: ; preds = %226
%232 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 19
store i8 43, i8* %232
br label %241
233: ; preds = %226
%234 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 80
%235 = load i8, i8* %234
%236 = sext i8 %235 to i32
%237 = icmp eq i32 45, %236
br i1 %237, label %238, label %240
238: ; preds = %233
%239 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 19
store i8 45, i8* %239
br label %240
240: ; preds = %238, %233
br label %241
241: ; preds = %240, %231
store i32 23, i32* %6
br label %242
242: ; preds = %253, %241
%243 = load i32, i32* %6
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 %244
%246 = load i8, i8* %245
%247 = sext i8 %246 to i32
%248 = icmp eq i32 32, %247
br i1 %248, label %249, label %256
249: ; preds = %242
%250 = load i32, i32* %6
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 %251
store i8 48, i8* %252
br label %253
253: ; preds = %249
%254 = load i32, i32* %6
%255 = add nsw i32 %254, 1
store i32 %255, i32* %6
br label %242
256: ; preds = %242
%257 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 29
%258 = load i8, i8* %257
%259 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %258, i8* %259
%260 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 28
%261 = load i8, i8* %260
%262 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 %261, i8* %262
%263 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%264 = call signext i8 @atoi(i8* %263)
store i8 %264, i8* %5
%265 = load i8, i8* %5
%266 = sext i8 %265 to i32
%267 = icmp eq i32 0, %266
br i1 %267, label %268, label %269
268: ; preds = %256
store i8 65, i8* %5
br label %299
269: ; preds = %256
%270 = load i8, i8* %5
%271 = sext i8 %270 to i32
%272 = icmp sgt i32 %271, 0
br i1 %272, label %273, label %282
273: ; preds = %269
%274 = load i8, i8* %5
%275 = sext i8 %274 to i32
%276 = icmp sle i32 %275, 26
br i1 %276, label %277, label %282
277: ; preds = %273
%278 = load i8, i8* %5
%279 = sext i8 %278 to i32
%280 = add nsw i32 %279, 64
%281 = trunc i32 %280 to i8
store i8 %281, i8* %5
br label %298
282: ; preds = %273, %269
%283 = load i8, i8* %5
%284 = sext i8 %283 to i32
%285 = icmp sgt i32 %284, 26
br i1 %285, label %286, label %295
286: ; preds = %282
%287 = load i8, i8* %5
%288 = sext i8 %287 to i32
%289 = icmp sle i32 %288, 52
br i1 %289, label %290, label %295
290: ; preds = %286
%291 = load i8, i8* %5
%292 = sext i8 %291 to i32
%293 = add nsw i32 %292, 70
%294 = trunc i32 %293 to i8
store i8 %294, i8* %5
br label %297
295: ; preds = %286, %282
%296 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.22, i64 0, i64 0))
store i32 -1, i32* %1
br label %328
297: ; preds = %290
br label %298
298: ; preds = %297, %277
br label %299
299: ; preds = %298, %268
%300 = load i8, i8* %5
%301 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 26
store i8 %300, i8* %301
%302 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 29
store i8 32, i8* %302
%303 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 28
store i8 32, i8* %303
%304 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 27
store i8 32, i8* %304
store i32 80, i32* %6
br label %305
305: ; preds = %312, %299
%306 = load i32, i32* %6
%307 = icmp slt i32 %306, 90
br i1 %307, label %308, label %315
308: ; preds = %305
%309 = load i32, i32* %6
%310 = sext i32 %309 to i64
%311 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 %310
store i8 32, i8* %311
br label %312
312: ; preds = %308
%313 = load i32, i32* %6
%314 = add nsw i32 %313, 1
store i32 %314, i32* %6
br label %305
315: ; preds = %305
%316 = load i32*, i32** %8
%317 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 0
%318 = call i32 @fprintf(i32* %316, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0), i8* %317)
br label %16
319: ; preds = %16
%320 = load i32*, i32** %7
%321 = call i32 @rewind(i32* %320)
%322 = load i32*, i32** %8
%323 = call i32 @rewind(i32* %322)
%324 = load i32*, i32** %7
%325 = call i32 @fclose(i32* %324)
%326 = load i32*, i32** %8
%327 = call i32 @fclose(i32* %326)
store i32 0, i32* %1
br label %328
328: ; preds = %319, %295
%329 = load i32, i32* %1
ret i32 %329
}

LLVM IR (-O2):
@.str = [14 x i8] c"step2_out.pdb\00"
@.str.1 = [3 x i8] c"r+\00"
@.str.2 = [16 x i8] c"demetri_out.pdb\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [3 x i8] c"__\00"
@.str.5 = [5 x i8] c"AB \00"
@.str.6 = [5 x i8] c"AA \00"
@.str.7 = [4 x i8] c"CTR\00"
@.str.8 = [4 x i8] c"NTR\00"
@.str.9 = [3 x i8] c"H \00"
@.str.10 = [7 x i8] c"HXTTCT\00"
@.str.11 = [7 x i8] c"OXTTCT\00"
@.str.12 = [6 x i8] c"OT CT\00"
@.str.13 = [7 x i8] c"HT1 NT\00"
@.str.14 = [7 x i8] c"H1A PA\00"
@.str.15 = [7 x i8] c"H2A PA\00"
@.str.16 = [7 x i8] c"H1D PD\00"
@.str.17 = [7 x i8] c"H2D PD\00"
@.str.18 = [7 x i8] c"HE1 GL\00"
@.str.19 = [7 x i8] c"HE2 GL\00"
@.str.20 = [7 x i8] c"HD1 AS\00"
@.str.21 = [7 x i8] c"HD2 AS\00"
@str = [41 x i8] c"\0A The number of conformers exceeds 52!\00"
define i32 @get_demetri_out() {
%1 = alloca [160 x i8]
%2 = alloca i16
%3 = alloca [6 x i8]
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 0
%6 = bitcast i16* %2 to i8*
store i16 32, i16* %2
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%8 = tail call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%10 = tail call i32 @rewind(i32* %8)
%11 = tail call i32 @rewind(i32* %9)
%12 = call i64 @fgets(i8* %5, i32 160, i32* %8)
%13 = icmp eq i64 %12, 0
br i1 %13, label %167, label %14
14: ; preds = %0
%15 = bitcast i16* %2 to [2 x i8]*
%16 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 82
%17 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 84
%18 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 7
%19 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 12
%20 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 5
%21 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 17
%22 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 4
%23 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 13
%24 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 14
%25 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 15
%26 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 16
%27 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 80
%28 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 19
%29 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 23
%30 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 29
%31 = getelementptr inbounds [2 x i8], [2 x i8]* %15, i64 0, i64 1
%32 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 28
%33 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 26
%34 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 27
%35 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 1
br label %36
36: ; preds = %14, %162
%37 = call i64 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %16, i32 2)
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %43
39: ; preds = %36
%40 = call i64 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %17, i32 2)
%41 = icmp eq i64 %40, 0
%42 = select i1 %41, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0)
br label %43
43: ; preds = %39, %36
%44 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), %36 ], [ %42, %39 ]
%45 = call i32 @strncpy(i8* %18, i8* %44, i32 4)
%46 = call i32 @strncpy(i8* %7, i8* %19, i32 5)
store i8 32, i8* %20
%47 = call i64 @strncmp(i8* %21, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%48 = icmp eq i64 %47, 0
br i1 %48, label %52, label %49
49: ; preds = %43
%50 = call i64 @strncmp(i8* %21, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %53
52: ; preds = %49, %43
store i8 84, i8* %22
br label %53
53: ; preds = %52, %49
%54 = load i8, i8* %7
%55 = add i8 %54, -49
%56 = icmp ult i8 %55, 9
br i1 %56, label %57, label %58
57: ; preds = %53
store i8 %54, i8* %20
store i8 32, i8* %7
br label %61
58: ; preds = %53
%59 = icmp eq i8 %54, 32
br i1 %59, label %61, label %60
60: ; preds = %58
store i8 32, i8* %7
br label %61
61: ; preds = %58, %60, %57
br label %62
62: ; preds = %61, %76
%63 = phi i32 [ %78, %76 ], [ 2, %61 ]
%64 = add nsw i32 %63, -1
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 %65
%67 = load i8, i8* %66
%68 = icmp eq i8 %67, 32
br i1 %68, label %69, label %76
69: ; preds = %62
%70 = sext i32 %63 to i64
%71 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 %70
%72 = load i8, i8* %71
%73 = icmp eq i8 %72, 32
br i1 %73, label %76, label %74
74: ; preds = %69
store i8 %72, i8* %66
store i8 32, i8* %71
%75 = add nsw i32 %63, -2
br label %76
76: ; preds = %62, %69, %74
%77 = phi i32 [ %75, %74 ], [ %63, %69 ], [ %63, %62 ]
%78 = add nsw i32 %77, 1
%79 = icmp slt i32 %77, 5
br i1 %79, label %62, label %80
80: ; preds = %76
%81 = call i32 @strncpy(i8* %19, i8* %7, i32 5)
%82 = call i32 @strncpy(i8* %7, i8* %23, i32 6)
%83 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 4)
%84 = icmp eq i64 %83, 0
br i1 %84, label %85, label %86
85: ; preds = %80
store i8 78, i8* %24
br label %130
86: ; preds = %80
%87 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 6)
%88 = icmp eq i64 %87, 0
br i1 %88, label %89, label %90
89: ; preds = %86
store i8 84, i8* %24
store i8 32, i8* %25
store i8 32, i8* %26
br label %130
90: ; preds = %86
%91 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i32 6)
%92 = icmp eq i64 %91, 0
br i1 %92, label %93, label %94
93: ; preds = %90
store i8 84, i8* %24
store i8 50, i8* %25
store i8 32, i8* %26
br label %130
94: ; preds = %90
%95 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i32 6)
%96 = icmp eq i64 %95, 0
br i1 %96, label %97, label %98
97: ; preds = %94
store i8 49, i8* %25
br label %130
98: ; preds = %94
%99 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i32 6)
%100 = icmp eq i64 %99, 0
br i1 %100, label %101, label %102
101: ; preds = %98
store i8 51, i8* %25
br label %130
102: ; preds = %98
%103 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i32 6)
%104 = icmp eq i64 %103, 0
br i1 %104, label %108, label %105
105: ; preds = %102
%106 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), i32 6)
%107 = icmp eq i64 %106, 0
br i1 %107, label %108, label %109
108: ; preds = %105, %102
store i8 84, i8* %24
store i8 32, i8* %25
br label %130
109: ; preds = %105
%110 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i32 6)
%111 = icmp eq i64 %110, 0
br i1 %111, label %115, label %112
112: ; preds = %109
%113 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i32 6)
%114 = icmp eq i64 %113, 0
br i1 %114, label %115, label %116
115: ; preds = %112, %109
store i8 84, i8* %24
store i8 32, i8* %25
br label %130
116: ; preds = %112
%117 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0), i32 6)
%118 = icmp eq i64 %117, 0
br i1 %118, label %122, label %119
119: ; preds = %116
%120 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0), i32 6)
%121 = icmp eq i64 %120, 0
br i1 %121, label %122, label %123
122: ; preds = %119, %116
store i8 84, i8* %24
store i8 32, i8* %25
br label %130
123: ; preds = %119
%124 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0), i32 6)
%125 = icmp eq i64 %124, 0
br i1 %125, label %129, label %126
126: ; preds = %123
%127 = call i64 @strncmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i64 0, i64 0), i32 6)
%128 = icmp eq i64 %127, 0
br i1 %128, label %129, label %130
129: ; preds = %126, %123
store i8 84, i8* %24
store i8 32, i8* %25
br label %130
130: ; preds = %89, %97, %108, %122, %129, %126, %115, %101, %93, %85
%131 = load i8, i8* %27
switch i8 %131, label %135 [
i8 43, label %133
i8 45, label %132
]
132: ; preds = %130
br label %133
133: ; preds = %130, %132
%134 = phi i8 [ 45, %132 ], [ %131, %130 ]
store i8 %134, i8* %28
br label %135
135: ; preds = %133, %130
%136 = load i8, i8* %29
%137 = icmp eq i8 %136, 32
br i1 %137, label %138, label %145
138: ; preds = %135, %138
%139 = phi i64 [ %141, %138 ], [ 23, %135 ]
%140 = phi i8* [ %142, %138 ], [ %29, %135 ]
store i8 48, i8* %140
%141 = add nuw nsw i64 %139, 1
%142 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 %141
%143 = load i8, i8* %142
%144 = icmp eq i8 %143, 32
br i1 %144, label %138, label %145
145: ; preds = %138, %135
%146 = load i8, i8* %30
store i8 %146, i8* %31
%147 = load i8, i8* %32
store i8 %147, i8* %6
%148 = call signext i8 @atoi(i8* %6)
%149 = icmp eq i8 %148, 0
br i1 %149, label %162, label %150
150: ; preds = %145
%151 = add i8 %148, -1
%152 = icmp ult i8 %151, 26
br i1 %152, label %153, label %155
153: ; preds = %150
%154 = add nuw nsw i8 %148, 64
br label %162
155: ; preds = %150
%156 = add i8 %148, -27
%157 = icmp ult i8 %156, 26
br i1 %157, label %158, label %160
158: ; preds = %155
%159 = add nuw nsw i8 %148, 70
br label %162
160: ; preds = %155
%161 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
br label %172
162: ; preds = %145, %153, %158
%163 = phi i8 [ %154, %153 ], [ %159, %158 ], [ 65, %145 ]
store i8 %163, i8* %33
store i8 32, i8* %30
store i8 32, i8* %32
store i8 32, i8* %34
%164 = call i32 @fputs(i8* %5, i32* %9)
%165 = call i64 @fgets(i8* %5, i32 160, i32* %8)
%166 = icmp eq i64 %165, 0
br i1 %166, label %167, label %36
167: ; preds = %162, %0
%168 = call i32 @rewind(i32* %8)
%169 = call i32 @rewind(i32* %9)
%170 = call i32 @fclose(i32* %8)
%171 = call i32 @fclose(i32* %9)
br label %172
172: ; preds = %167, %160
%173 = phi i32 [ -1, %160 ], [ 0, %167 ]
ret i32 %173
}