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

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int,
                           char const *);
struct lib_struct *get_lnames(char *, struct lib_struct *);
int /*<<< orphan*/ stderr;
char *strchr(char *, char);
scalar_t__ strcmp(char *, char *);
size_t strlen(char const *);
int /*<<< orphan*/ strncat(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
int /*<<< orphan*/ *ulindex(char *, char *);
struct lib_struct *lib_select(char *lname, char *ltitle, const char *flstr,
                              int ldnaseq) {
  char line[120 * 2], *bp, *bp1;
  char *llnames[2000];
  int new_abbr, ich, nch;
  int ltmp;
  FILE *fch;
  struct lib_struct *cur_lib_p = NULL, *tmp_lib_p;
  new_abbr = 0;
  *ltitle = '\0';
  if (strlen(lname) > (size_t)1 && *lname != '%' && *lname != '+') {
    return get_lnames(lname, cur_lib_p);
  } else {
    if (*flstr == '\0') {
      fprintf(stderr,
              "*** ERROR [%s:%d] abbrv. list request but FASTLIBS undefined, "
              "cannot use %s\n",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/uwbmrb/BMRB-API/refs/heads/master/"
              "server/wsgi/bmrbapi/submodules/fasta36/src/lib_sel.c",
              199, lname);
      exit(1);
    }
    if (strchr(lname, '+')) {
      new_abbr = 1;
      nch = 0;
      bp = lname + 1;
      if (*bp == '+')
        bp++;
      for (bp1 = bp; nch < 2000 && bp != NULL && bp1 != NULL; bp = bp1 + 1) {
        if ((bp1 = strchr(bp, '+')) != NULL)
          *bp1 = '\0';
        llnames[nch++] = bp;
      }
    } else if (*lname == '%') {
      lname++;
    }
    if (strlen(flstr) > (size_t)0) {
      if ((fch = fopen(flstr, "r")) == NULL) {
        fprintf(stderr, "*** ERROR [%s:%d] cannot open choice file: %s\n",
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/uwbmrb/BMRB-API/refs/heads/"
                "master/server/wsgi/bmrbapi/submodules/fasta36/src/lib_sel.c",
                221, flstr);
        return NULL;
      }
    }
    while (fgets(line, sizeof(line), fch) != NULL) {
      if (line[0] == ';')
        continue;
      if ((bp = strchr(line, '\n')) != NULL)
        *bp = '\0';
      if ((bp = strchr(line, '$')) == NULL)
        continue;
      *bp++ = '\0';
      if ((*bp++ - '0') != ldnaseq)
        continue;
      if (!new_abbr) {
        if (*bp == '+')
          continue;
        else if (ulindex(lname, bp) != NULL) {
          if (ltitle[0] == '\0') {
            strncpy(ltitle, line, 512);
          } else {
            ltmp = strlen(ltitle);
            strncat(ltitle, ",\n  ", 512 - ltmp);
            strncat(ltitle, line, 512 - ltmp - 4);
          }
          tmp_lib_p = get_lnames(bp + 1, cur_lib_p);
          if (tmp_lib_p) {
            cur_lib_p = tmp_lib_p;
          }
        }
      } else {
        if (*bp != '+')
          continue;
        else {
          bp++;
          if ((bp1 = strchr(bp, '+')) != NULL) {
            *bp1 = '\0';
            for (ich = 0; ich < nch; ich++) {
              if (strcmp(llnames[ich], bp) == 0) {
                if (ltitle[0] == '\0') {
                  strncpy(ltitle, line, 512);
                } else {
                  ltmp = strlen(ltitle);
                  strncat(ltitle, ",\n  ", 512 - ltmp);
                  strncat(ltitle, line, 512 - ltmp - 4);
                }
                cur_lib_p = get_lnames(bp1 + 1, cur_lib_p);
                break;
              }
            }
            *bp1 = '+';
          } else
            fprintf(
                stderr, "*** ERROR [%s:%d] %s missing final '+'\n",
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/uwbmrb/BMRB-API/refs/heads/"
                "master/server/wsgi/bmrbapi/submodules/fasta36/src/lib_sel.c",
                272, bp);
        }
      }
    }
    fclose(fch);
  }
  return cur_lib_p;
}


x86 assembly (clang, -O0):
<lib_select>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3fe0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
movq   $0x0,-0x3fd0(%rbp)
movl   $0x0,-0x3fb4(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x1,%rax
jbe    1242 <lib_select+0x82>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
je     1242 <lib_select+0x82>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
je     1242 <lib_select+0x82>
mov    -0x10(%rbp),%rdi
mov    -0x3fd0(%rbp),%rsi
call   10c0 <get_lnames@plt>
mov    %rax,-0x8(%rbp)
jmp    17a3 <lib_select+0x5e3>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1281 <lib_select+0xc1>
mov    0x2d87(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%r8
lea    0xd9a(%rip),%rsi
lea    0xde0(%rip),%rdx
mov    $0xc7,%ecx
call   10b0 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    -0x10(%rbp),%rdi
mov    $0x2b,%esi
call   1070 <strchr@plt>
cmp    $0x0,%rax
je     13ab <lib_select+0x1eb>
movl   $0x1,-0x3fb4(%rbp)
movl   $0x0,-0x3fbc(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x128(%rbp)
mov    -0x128(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    12e1 <lib_select+0x121>
mov    -0x128(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x128(%rbp)
mov    -0x128(%rbp),%rax
mov    %rax,-0x130(%rbp)
xor    %eax,%eax
cmpl   $0x7d0,-0x3fbc(%rbp)
mov    %al,-0x3fd9(%rbp)
jge    132e <lib_select+0x16e>
xor    %eax,%eax
cmpq   $0x0,-0x128(%rbp)
mov    %al,-0x3fd9(%rbp)
je     132e <lib_select+0x16e>
cmpq   $0x0,-0x130(%rbp)
setne  %al
mov    %al,-0x3fd9(%rbp)
mov    -0x3fd9(%rbp),%al
test   $0x1,%al
jne    1341 <lib_select+0x181>
jmp    13a6 <lib_select+0x1e6>
mov    -0x128(%rbp),%rdi
mov    $0x2b,%esi
call   1070 <strchr@plt>
mov    %rax,-0x130(%rbp)
cmp    $0x0,%rax
je     136d <lib_select+0x1ad>
mov    -0x130(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x128(%rbp),%rcx
mov    -0x3fbc(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x3fbc(%rbp)
cltq
mov    %rcx,-0x3fb0(%rbp,%rax,8)
ff
mov    -0x130(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x128(%rbp)
jmp    12ef <lib_select+0x12f>
jmp    13cc <lib_select+0x20c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    13c7 <lib_select+0x207>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    13cc <lib_select+0x20c>
mov    -0x20(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x0,%rax
jbe    1437 <lib_select+0x277>
mov    -0x20(%rbp),%rdi
lea    0xd14(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x3fc8(%rbp)
cmp    $0x0,%rax
jne    1432 <lib_select+0x272>
mov    0x2bd9(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%r8
lea    0xcec(%rip),%rsi
lea    0xc32(%rip),%rdx
mov    $0xdd,%ecx
call   10b0 <fprintf@plt>
movq   $0x0,-0x8(%rbp)
jmp    17a3 <lib_select+0x5e3>
jmp    1437 <lib_select+0x277>
jmp    143c <lib_select+0x27c>
lea    -0x120(%rbp),%rdi
mov    -0x3fc8(%rbp),%rdx
mov    $0xf0,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
je     178c <lib_select+0x5cc>
movsbl -0x120(%rbp),%eax
cmp    $0x3b,%eax
jne    1473 <lib_select+0x2b3>
jmp    143c <lib_select+0x27c>
lea    -0x120(%rbp),%rdi
mov    $0xa,%esi
call   1070 <strchr@plt>
mov    %rax,-0x128(%rbp)
cmp    $0x0,%rax
je     149f <lib_select+0x2df>
mov    -0x128(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x120(%rbp),%rdi
mov    $0x24,%esi
call   1070 <strchr@plt>
mov    %rax,-0x128(%rbp)
cmp    $0x0,%rax
jne    14c6 <lib_select+0x306>
jmp    143c <lib_select+0x27c>
mov    -0x128(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x128(%rbp)
movb   $0x0,(%rax)
mov    -0x128(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x128(%rbp)
movsbl (%rax),%eax
sub    $0x30,%eax
cmp    -0x24(%rbp),%eax
je     1507 <lib_select+0x347>
jmp    143c <lib_select+0x27c>
cmpl   $0x0,-0x3fb4(%rbp)
jne    1601 <lib_select+0x441>
mov    -0x128(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    152c <lib_select+0x36c>
jmp    143c <lib_select+0x27c>
mov    -0x10(%rbp),%rdi
mov    -0x128(%rbp),%rsi
call   1040 <ulindex@plt>
cmp    $0x0,%rax
je     15f7 <lib_select+0x437>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1570 <lib_select+0x3b0>
mov    -0x18(%rbp),%rdi
lea    -0x120(%rbp),%rsi
mov    $0x200,%edx
call   1030 <strncpy@plt>
jmp    15b8 <lib_select+0x3f8>
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x3fc0(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x200,%edx
sub    -0x3fc0(%rbp),%edx
lea    0xb9a(%rip),%rsi
call   1080 <strncat@plt>
mov    -0x18(%rbp),%rdi
lea    -0x120(%rbp),%rsi
mov    $0x200,%edx
sub    -0x3fc0(%rbp),%edx
sub    $0x4,%edx
call   1080 <strncat@plt>
mov    -0x128(%rbp),%rdi
add    $0x1,%rdi
mov    -0x3fd0(%rbp),%rsi
call   10c0 <get_lnames@plt>
mov    %rax,-0x3fd8(%rbp)
cmpq   $0x0,-0x3fd8(%rbp)
je     15f2 <lib_select+0x432>
mov    -0x3fd8(%rbp),%rax
mov    %rax,-0x3fd0(%rbp)
jmp    15f7 <lib_select+0x437>
jmp    15fc <lib_select+0x43c>
jmp    1787 <lib_select+0x5c7>
mov    -0x128(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
je     1619 <lib_select+0x459>
jmp    143c <lib_select+0x27c>
mov    -0x128(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x128(%rbp)
mov    -0x128(%rbp),%rdi
mov    $0x2b,%esi
call   1070 <strchr@plt>
mov    %rax,-0x130(%rbp)
cmp    $0x0,%rax
je     1755 <lib_select+0x595>
mov    -0x130(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x0,-0x3fb8(%rbp)
mov    -0x3fb8(%rbp),%eax
cmp    -0x3fbc(%rbp),%eax
jge    1746 <lib_select+0x586>
movslq -0x3fb8(%rbp),%rax
mov    -0x3fb0(%rbp,%rax,8),%rdi
ff
mov    -0x128(%rbp),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
jne    172d <lib_select+0x56d>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    16c2 <lib_select+0x502>
mov    -0x18(%rbp),%rdi
lea    -0x120(%rbp),%rsi
mov    $0x200,%edx
call   1030 <strncpy@plt>
jmp    170a <lib_select+0x54a>
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x3fc0(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x200,%edx
sub    -0x3fc0(%rbp),%edx
lea    0xa48(%rip),%rsi
call   1080 <strncat@plt>
mov    -0x18(%rbp),%rdi
lea    -0x120(%rbp),%rsi
mov    $0x200,%edx
sub    -0x3fc0(%rbp),%edx
sub    $0x4,%edx
call   1080 <strncat@plt>
mov    -0x130(%rbp),%rdi
add    $0x1,%rdi
mov    -0x3fd0(%rbp),%rsi
call   10c0 <get_lnames@plt>
mov    %rax,-0x3fd0(%rbp)
jmp    1746 <lib_select+0x586>
jmp    1732 <lib_select+0x572>
mov    -0x3fb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3fb8(%rbp)
jmp    1661 <lib_select+0x4a1>
mov    -0x130(%rbp),%rax
movb   $0x2b,(%rax)
jmp    177d <lib_select+0x5bd>
mov    0x2884(%rip),%rax
mov    (%rax),%edi
mov    -0x128(%rbp),%r8
lea    0x9c8(%rip),%rsi
lea    0x8da(%rip),%rdx
mov    $0x110,%ecx
call   10b0 <fprintf@plt>
jmp    1782 <lib_select+0x5c2>
jmp    1787 <lib_select+0x5c7>
jmp    143c <lib_select+0x27c>
mov    -0x3fc8(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x3fd0(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x3fe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lib_select>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3fa8,%rsp
mov    %ecx,%ebx
mov    %rdx,%r14
mov    %rsi,%r13
mov    %rdi,%r15
movb   $0x0,(%rsi)
call   1060 <strlen@plt>
cmp    $0x2,%rax
jb     11f9 <lib_select+0x39>
mov    (%r15),%al
cmp    $0x25,%al
je     11f9 <lib_select+0x39>
cmp    $0x2b,%al
jne    153f <lib_select+0x37f>
cmpb   $0x0,(%r14)
je     155a <lib_select+0x39a>
mov    %ebx,0x4(%rsp)
mov    %r15,%rdi
mov    $0x2b,%esi
call   1070 <strchr@plt>
mov    %rax,0x28(%rsp)
test   %rax,%rax
je     1276 <lib_select+0xb6>
lea    0x1(%r15),%rbp
cmpb   $0x2b,0x1(%r15)
lea    0x2(%r15),%rax
cmove  %rax,%rbp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    $0x2b,%esi
call   1070 <strchr@plt>
test   %rax,%rax
je     1284 <lib_select+0xc4>
movb   $0x0,(%rax)
lea    0x1(%rbx),%r12
mov    %rbp,0x120(%rsp,%rbx,8)
add    $0x1,%rax
mov    %rax,%rbp
cmp    $0x7cf,%rbx
mov    %r12,%rbx
jb     1240 <lib_select+0x80>
jmp    1293 <lib_select+0xd3>
xor    %eax,%eax
cmpb   $0x25,(%r15)
sete   %al
add    %rax,%r15
jmp    1293 <lib_select+0xd3>
mov    %rbp,0x120(%rsp,%rbx,8)
add    $0x1,%rbx
mov    %rbx,%r12
lea    0xe64(%rip),%rsi
mov    %r14,%rdi
call   10d0 <fopen@plt>
test   %rax,%rax
je     14f1 <lib_select+0x331>
mov    %rax,%rbp
lea    0x30(%rsp),%rdi
mov    $0xf0,%esi
mov    %rax,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
mov    0x4(%rsp),%ebx
je     1519 <lib_select+0x359>
mov    %r12d,%eax
mov    %rax,0x20(%rsp)
xor    %eax,%eax
mov    %rax,0x10(%rsp)
lea    0x30(%rsp),%r14
mov    %r13,0x8(%rsp)
jmp    1309 <lib_select+0x149>
cmp    $0x2b,%al
jne    13bd <lib_select+0x1fd>
mov    %r14,%rdi
mov    $0xf0,%esi
mov    %rbp,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
je     1520 <lib_select+0x360>
cmpb   $0x3b,0x30(%rsp)
je     12f0 <lib_select+0x130>
mov    %r14,%rdi
mov    $0xa,%esi
call   1070 <strchr@plt>
test   %rax,%rax
je     1325 <lib_select+0x165>
movb   $0x0,(%rax)
mov    %r14,%rdi
mov    $0x24,%esi
call   1070 <strchr@plt>
test   %rax,%rax
je     12f0 <lib_select+0x130>
mov    %rax,%r13
movb   $0x0,(%rax)
movsbl 0x1(%rax),%eax
add    $0xffffffd0,%eax
cmp    %ebx,%eax
jne    12f0 <lib_select+0x130>
lea    0x2(%r13),%rsi
mov    (%rsi),%al
cmpq   $0x0,0x28(%rsp)
je     12e8 <lib_select+0x128>
cmp    $0x2b,%al
jne    12f0 <lib_select+0x130>
add    $0x3,%r13
mov    %r13,%rdi
mov    $0x2b,%esi
call   1070 <strchr@plt>
test   %rax,%rax
je     1416 <lib_select+0x256>
movb   $0x0,(%rax)
test   %r12d,%r12d
jle    14e9 <lib_select+0x329>
mov    %rax,0x18(%rsp)
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    0x120(%rsp,%rbx,8),%rdi
mov    %r13,%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     143f <lib_select+0x27f>
add    $0x1,%rbx
cmp    %rbx,0x20(%rsp)
jne    1390 <lib_select+0x1d0>
mov    0x4(%rsp),%ebx
jmp    14e4 <lib_select+0x324>
mov    %r15,%rdi
call   1040 <ulindex@plt>
test   %rax,%rax
je     12f0 <lib_select+0x130>
mov    0x8(%rsp),%rdi
cmpb   $0x0,(%rdi)
je     1486 <lib_select+0x2c6>
call   1060 <strlen@plt>
mov    %rax,0x18(%rsp)
mov    $0x200,%edx
sub    %eax,%edx
mov    0x8(%rsp),%rdi
lea    0xd36(%rip),%rsi
call   1080 <strncat@plt>
mov    $0x1fc,%edx
sub    0x18(%rsp),%edx
mov    0x8(%rsp),%rdi
mov    %r14,%rsi
call   1080 <strncat@plt>
jmp    1493 <lib_select+0x2d3>
mov    0x2bc3(%rip),%rax
mov    (%rax),%edi
lea    0xd0e(%rip),%rsi
lea    0xc20(%rip),%rdx
mov    $0x110,%ecx
mov    %r13,%r8
call   10b0 <fprintf@plt>
jmp    12f0 <lib_select+0x130>
mov    0x8(%rsp),%r13
cmpb   $0x0,0x0(%r13)
je     14b8 <lib_select+0x2f8>
mov    %r13,%rdi
call   1060 <strlen@plt>
mov    %rax,%r13
mov    $0x200,%edx
sub    %r13d,%edx
mov    0x8(%rsp),%rdi
lea    0xcc5(%rip),%rsi
call   1080 <strncat@plt>
mov    $0x1fc,%edx
sub    %r13d,%edx
mov    0x8(%rsp),%rdi
mov    %r14,%rsi
call   1080 <strncat@plt>
jmp    14c8 <lib_select+0x308>
mov    %r14,%rsi
mov    $0x200,%edx
call   1030 <strncpy@plt>
add    $0x3,%r13
mov    %r13,%rdi
mov    0x10(%rsp),%r13
mov    %r13,%rsi
call   10c0 <get_lnames@plt>
test   %rax,%rax
cmovne %rax,%r13
mov    %r13,0x10(%rsp)
jmp    12f0 <lib_select+0x130>
mov    %r13,%rdi
mov    %r14,%rsi
mov    $0x200,%edx
call   1030 <strncpy@plt>
mov    0x4(%rsp),%ebx
mov    0x18(%rsp),%rdi
add    $0x1,%rdi
mov    0x10(%rsp),%rsi
call   10c0 <get_lnames@plt>
mov    %rax,0x10(%rsp)
mov    0x18(%rsp),%rax
movb   $0x2b,(%rax)
jmp    12f0 <lib_select+0x130>
mov    0x2ae8(%rip),%rax
mov    (%rax),%edi
lea    0xbff(%rip),%rsi
lea    0xb45(%rip),%rdx
mov    $0xdd,%ecx
mov    %r14,%r8
call   10b0 <fprintf@plt>
xor    %eax,%eax
jmp    152d <lib_select+0x36d>
xor    %eax,%eax
mov    %rax,0x10(%rsp)
mov    %rbp,%rdi
call   1050 <fclose@plt>
mov    0x10(%rsp),%rax
add    $0x3fa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r15,%rdi
xor    %esi,%esi
add    $0x3fa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10c0 <get_lnames@plt>
mov    0x2a7f(%rip),%rax
mov    (%rax),%edi
lea    0xa96(%rip),%rsi
lea    0xadc(%rip),%rdx
mov    $0xc7,%ecx
mov    %r15,%r8
call   10b0 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
%struct.lib_struct = type { i32 }
@stderr = global i32 0
@.str = [77 x i8] c"*** ERROR [%s:%d] abbrv. list request but FASTLIBS undefined, cannot use %s\0A\00"
@.str.1 = [177 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/uwbmrb/BMRB-API/refs/heads/master/server/wsgi/bmrbapi/submodules/fasta36/src/lib_sel.c\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [47 x i8] c"*** ERROR [%s:%d] cannot open choice file: %s\0A\00"
@.str.4 = [5 x i8] c",\0A \00"
@.str.5 = [40 x i8] c"*** ERROR [%s:%d] %s missing final '+'\0A\00"
define %struct.lib_struct* @lib_select(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca %struct.lib_struct*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca [240 x i8]
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca [2000 x i8*]
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32*
%19 = alloca %struct.lib_struct*
%20 = alloca %struct.lib_struct*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store %struct.lib_struct* null, %struct.lib_struct** %19
store i32 0, i32* %14
%21 = load i8*, i8** %7
store i8 0, i8* %21
%22 = load i8*, i8** %6
%23 = call i64 @strlen(i8* %22)
%24 = icmp ugt i64 %23, 1
br i1 %24, label %25, label %39
25: ; preds = %4
%26 = load i8*, i8** %6
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp ne i32 %28, 37
br i1 %29, label %30, label %39
30: ; preds = %25
%31 = load i8*, i8** %6
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp ne i32 %33, 43
br i1 %34, label %35, label %39
35: ; preds = %30
%36 = load i8*, i8** %6
%37 = load %struct.lib_struct*, %struct.lib_struct** %19
%38 = call %struct.lib_struct* @get_lnames(i8* %36, %struct.lib_struct* %37)
store %struct.lib_struct* %38, %struct.lib_struct** %5
br label %271
39: ; preds = %30, %25, %4
%40 = load i8*, i8** %8
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %49
44: ; preds = %39
%45 = load i32, i32* @stderr
%46 = load i8*, i8** %6
%47 = call i32 @fprintf(i32 %45, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([177 x i8], [177 x i8]* @.str.1, i64 0, i64 0), i32 199, i8* %46)
%48 = call i32 @exit(i32 1)
unreachable
49: ; preds = %39
%50 = load i8*, i8** %6
%51 = call i8* @strchr(i8* %50, i8 signext 43)
%52 = icmp ne i8* %51, null
br i1 %52, label %53, label %92
53: ; preds = %49
store i32 1, i32* %14
store i32 0, i32* %16
%54 = load i8*, i8** %6
%55 = getelementptr inbounds i8, i8* %54, i64 1
store i8* %55, i8** %11
%56 = load i8*, i8** %11
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 43
br i1 %59, label %60, label %63
60: ; preds = %53
%61 = load i8*, i8** %11
%62 = getelementptr inbounds i8, i8* %61, i32 1
store i8* %62, i8** %11
br label %63
63: ; preds = %60, %53
%64 = load i8*, i8** %11
store i8* %64, i8** %12
br label %65
65: ; preds = %88, %63
%66 = load i32, i32* %16
%67 = icmp slt i32 %66, 2000
br i1 %67, label %68, label %74
68: ; preds = %65
%69 = load i8*, i8** %11
%70 = icmp ne i8* %69, null
br i1 %70, label %71, label %74
71: ; preds = %68
%72 = load i8*, i8** %12
%73 = icmp ne i8* %72, null
br label %74
74: ; preds = %71, %68, %65
%75 = phi i1 [ false, %68 ], [ false, %65 ], [ %73, %71 ]
br i1 %75, label %76, label %91
76: ; preds = %74
%77 = load i8*, i8** %11
%78 = call i8* @strchr(i8* %77, i8 signext 43)
store i8* %78, i8** %12
%79 = icmp ne i8* %78, null
br i1 %79, label %80, label %82
80: ; preds = %76
%81 = load i8*, i8** %12
store i8 0, i8* %81
br label %82
82: ; preds = %80, %76
%83 = load i8*, i8** %11
%84 = load i32, i32* %16
%85 = add nsw i32 %84, 1
store i32 %85, i32* %16
%86 = sext i32 %84 to i64
%87 = getelementptr inbounds [2000 x i8*], [2000 x i8*]* %13, i64 0, i64 %86
store i8* %83, i8** %87
br label %88
88: ; preds = %82
%89 = load i8*, i8** %12
%90 = getelementptr inbounds i8, i8* %89, i64 1
store i8* %90, i8** %11
br label %65
91: ; preds = %74
br label %101
92: ; preds = %49
%93 = load i8*, i8** %6
%94 = load i8, i8* %93
%95 = sext i8 %94 to i32
%96 = icmp eq i32 %95, 37
br i1 %96, label %97, label %100
97: ; preds = %92
%98 = load i8*, i8** %6
%99 = getelementptr inbounds i8, i8* %98, i32 1
store i8* %99, i8** %6
br label %100
100: ; preds = %97, %92
br label %101
101: ; preds = %100, %91
%102 = load i8*, i8** %8
%103 = call i64 @strlen(i8* %102)
%104 = icmp ugt i64 %103, 0
br i1 %104, label %105, label %114
105: ; preds = %101
%106 = load i8*, i8** %8
%107 = call i32* @fopen(i8* %106, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %107, i32** %18
%108 = icmp eq i32* %107, null
br i1 %108, label %109, label %113
109: ; preds = %105
%110 = load i32, i32* @stderr
%111 = load i8*, i8** %8
%112 = call i32 @fprintf(i32 %110, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([177 x i8], [177 x i8]* @.str.1, i64 0, i64 0), i32 221, i8* %111)
store %struct.lib_struct* null, %struct.lib_struct** %5
br label %271
113: ; preds = %105
br label %114
114: ; preds = %113, %101
br label %115
115: ; preds = %265, %203, %156, %147, %136, %125, %114
%116 = getelementptr inbounds [240 x i8], [240 x i8]* %10, i64 0, i64 0
%117 = load i32*, i32** %18
%118 = call i32* @fgets(i8* %116, i32 240, i32* %117)
%119 = icmp ne i32* %118, null
br i1 %119, label %120, label %266
120: ; preds = %115
%121 = getelementptr inbounds [240 x i8], [240 x i8]* %10, i64 0, i64 0
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = icmp eq i32 %123, 59
br i1 %124, label %125, label %126
125: ; preds = %120
br label %115
126: ; preds = %120
%127 = getelementptr inbounds [240 x i8], [240 x i8]* %10, i64 0, i64 0
%128 = call i8* @strchr(i8* %127, i8 signext 10)
store i8* %128, i8** %11
%129 = icmp ne i8* %128, null
br i1 %129, label %130, label %132
130: ; preds = %126
%131 = load i8*, i8** %11
store i8 0, i8* %131
br label %132
132: ; preds = %130, %126
%133 = getelementptr inbounds [240 x i8], [240 x i8]* %10, i64 0, i64 0
%134 = call i8* @strchr(i8* %133, i8 signext 36)
store i8* %134, i8** %11
%135 = icmp eq i8* %134, null
br i1 %135, label %136, label %137
136: ; preds = %132
br label %115
137: ; preds = %132
%138 = load i8*, i8** %11
%139 = getelementptr inbounds i8, i8* %138, i32 1
store i8* %139, i8** %11
store i8 0, i8* %138
%140 = load i8*, i8** %11
%141 = getelementptr inbounds i8, i8* %140, i32 1
store i8* %141, i8** %11
%142 = load i8, i8* %140
%143 = sext i8 %142 to i32
%144 = sub nsw i32 %143, 48
%145 = load i32, i32* %9
%146 = icmp ne i32 %144, %145
br i1 %146, label %147, label %148
147: ; preds = %137
br label %115
148: ; preds = %137
%149 = load i32, i32* %14
%150 = icmp ne i32 %149, 0
br i1 %150, label %198, label %151
151: ; preds = %148
%152 = load i8*, i8** %11
%153 = load i8, i8* %152
%154 = sext i8 %153 to i32
%155 = icmp eq i32 %154, 43
br i1 %155, label %156, label %157
156: ; preds = %151
br label %115
157: ; preds = %151
%158 = load i8*, i8** %6
%159 = load i8*, i8** %11
%160 = call i32* @ulindex(i8* %158, i8* %159)
%161 = icmp ne i32* %160, null
br i1 %161, label %162, label %196
162: ; preds = %157
%163 = load i8*, i8** %7
%164 = getelementptr inbounds i8, i8* %163, i64 0
%165 = load i8, i8* %164
%166 = sext i8 %165 to i32
%167 = icmp eq i32 %166, 0
br i1 %167, label %168, label %172
168: ; preds = %162
%169 = load i8*, i8** %7
%170 = getelementptr inbounds [240 x i8], [240 x i8]* %10, i64 0, i64 0
%171 = call i32 @strncpy(i8* %169, i8* %170, i32 512)
br label %186
172: ; preds = %162
%173 = load i8*, i8** %7
%174 = call i64 @strlen(i8* %173)
%175 = trunc i64 %174 to i32
store i32 %175, i32* %17
%176 = load i8*, i8** %7
%177 = load i32, i32* %17
%178 = sub nsw i32 512, %177
%179 = call i32 @strncat(i8* %176, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %178)
%180 = load i8*, i8** %7
%181 = getelementptr inbounds [240 x i8], [240 x i8]* %10, i64 0, i64 0
%182 = load i32, i32* %17
%183 = sub nsw i32 512, %182
%184 = sub nsw i32 %183, 4
%185 = call i32 @strncat(i8* %180, i8* %181, i32 %184)
br label %186
186: ; preds = %172, %168
%187 = load i8*, i8** %11
%188 = getelementptr inbounds i8, i8* %187, i64 1
%189 = load %struct.lib_struct*, %struct.lib_struct** %19
%190 = call %struct.lib_struct* @get_lnames(i8* %188, %struct.lib_struct* %189)
store %struct.lib_struct* %190, %struct.lib_struct** %20
%191 = load %struct.lib_struct*, %struct.lib_struct** %20
%192 = icmp ne %struct.lib_struct* %191, null
br i1 %192, label %193, label %195
193: ; preds = %186
%194 = load %struct.lib_struct*, %struct.lib_struct** %20
store %struct.lib_struct* %194, %struct.lib_struct** %19
br label %195
195: ; preds = %193, %186
br label %196
196: ; preds = %195, %157
br label %197
197: ; preds = %196
br label %265
198: ; preds = %148
%199 = load i8*, i8** %11
%200 = load i8, i8* %199
%201 = sext i8 %200 to i32
%202 = icmp ne i32 %201, 43
br i1 %202, label %203, label %204
203: ; preds = %198
br label %115
204: ; preds = %198
%205 = load i8*, i8** %11
%206 = getelementptr inbounds i8, i8* %205, i32 1
store i8* %206, i8** %11
%207 = load i8*, i8** %11
%208 = call i8* @strchr(i8* %207, i8 signext 43)
store i8* %208, i8** %12
%209 = icmp ne i8* %208, null
br i1 %209, label %210, label %259
210: ; preds = %204
%211 = load i8*, i8** %12
store i8 0, i8* %211
store i32 0, i32* %15
br label %212
212: ; preds = %254, %210
%213 = load i32, i32* %15
%214 = load i32, i32* %16
%215 = icmp slt i32 %213, %214
br i1 %215, label %216, label %257
216: ; preds = %212
%217 = load i32, i32* %15
%218 = sext i32 %217 to i64
%219 = getelementptr inbounds [2000 x i8*], [2000 x i8*]* %13, i64 0, i64 %218
%220 = load i8*, i8** %219
%221 = load i8*, i8** %11
%222 = call i64 @strcmp(i8* %220, i8* %221)
%223 = icmp eq i64 %222, 0
br i1 %223, label %224, label %253
224: ; preds = %216
%225 = load i8*, i8** %7
%226 = getelementptr inbounds i8, i8* %225, i64 0
%227 = load i8, i8* %226
%228 = sext i8 %227 to i32
%229 = icmp eq i32 %228, 0
br i1 %229, label %230, label %234
230: ; preds = %224
%231 = load i8*, i8** %7
%232 = getelementptr inbounds [240 x i8], [240 x i8]* %10, i64 0, i64 0
%233 = call i32 @strncpy(i8* %231, i8* %232, i32 512)
br label %248
234: ; preds = %224
%235 = load i8*, i8** %7
%236 = call i64 @strlen(i8* %235)
%237 = trunc i64 %236 to i32
store i32 %237, i32* %17
%238 = load i8*, i8** %7
%239 = load i32, i32* %17
%240 = sub nsw i32 512, %239
%241 = call i32 @strncat(i8* %238, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %240)
%242 = load i8*, i8** %7
%243 = getelementptr inbounds [240 x i8], [240 x i8]* %10, i64 0, i64 0
%244 = load i32, i32* %17
%245 = sub nsw i32 512, %244
%246 = sub nsw i32 %245, 4
%247 = call i32 @strncat(i8* %242, i8* %243, i32 %246)
br label %248
248: ; preds = %234, %230
%249 = load i8*, i8** %12
%250 = getelementptr inbounds i8, i8* %249, i64 1
%251 = load %struct.lib_struct*, %struct.lib_struct** %19
%252 = call %struct.lib_struct* @get_lnames(i8* %250, %struct.lib_struct* %251)
store %struct.lib_struct* %252, %struct.lib_struct** %19
br label %257
253: ; preds = %216
br label %254
254: ; preds = %253
%255 = load i32, i32* %15
%256 = add nsw i32 %255, 1
store i32 %256, i32* %15
br label %212
257: ; preds = %248, %212
%258 = load i8*, i8** %12
store i8 43, i8* %258
br label %263
259: ; preds = %204
%260 = load i32, i32* @stderr
%261 = load i8*, i8** %11
%262 = call i32 @fprintf(i32 %260, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([177 x i8], [177 x i8]* @.str.1, i64 0, i64 0), i32 272, i8* %261)
br label %263
263: ; preds = %259, %257
br label %264
264: ; preds = %263
br label %265
265: ; preds = %264, %197
br label %115
266: ; preds = %115
%267 = load i32*, i32** %18
%268 = call i32 @fclose(i32* %267)
br label %269
269: ; preds = %266
%270 = load %struct.lib_struct*, %struct.lib_struct** %19
store %struct.lib_struct* %270, %struct.lib_struct** %5
br label %271
271: ; preds = %269, %109, %35
%272 = load %struct.lib_struct*, %struct.lib_struct** %5
ret %struct.lib_struct* %272
}

LLVM IR (-O2):
%struct.lib_struct = type { i32 }
@stderr = global i32 0
@.str = [77 x i8] c"*** ERROR [%s:%d] abbrv. list request but FASTLIBS undefined, cannot use %s\0A\00"
@.str.1 = [177 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/uwbmrb/BMRB-API/refs/heads/master/server/wsgi/bmrbapi/submodules/fasta36/src/lib_sel.c\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [47 x i8] c"*** ERROR [%s:%d] cannot open choice file: %s\0A\00"
@.str.4 = [5 x i8] c",\0A \00"
@.str.5 = [40 x i8] c"*** ERROR [%s:%d] %s missing final '+'\0A\00"
define %struct.lib_struct* @lib_select(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca [240 x i8]
%6 = alloca [2000 x i8*]
%7 = getelementptr inbounds [240 x i8], [240 x i8]* %5, i64 0, i64 0
%8 = bitcast [2000 x i8*]* %6 to i8*
store i8 0, i8* %1
%9 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%10 = icmp ugt i64 %9, 1
br i1 %10, label %11, label %15
11: ; preds = %4
%12 = load i8, i8* %0
switch i8 %12, label %13 [
i8 37, label %15
i8 43, label %15
]
13: ; preds = %11
%14 = tail call %struct.lib_struct* @get_lnames(i8* %0, %struct.lib_struct* null)
br label %157
15: ; preds = %11, %11, %4
%16 = load i8, i8* %2
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = load i32, i32* @stderr
%20 = tail call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([177 x i8], [177 x i8]* @.str.1, i64 0, i64 0), i32 199, i8* %0)
%21 = tail call i32 @exit(i32 1)
unreachable
22: ; preds = %15
%23 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 43)
%24 = icmp eq i8* %23, null
br i1 %24, label %44, label %25
25: ; preds = %22
%26 = getelementptr inbounds i8, i8* %0, i64 1
%27 = load i8, i8* %26
%28 = icmp eq i8 %27, 43
%29 = getelementptr inbounds i8, i8* %0, i64 2
%30 = select i1 %28, i8* %29, i8* %26
br label %31
31: ; preds = %25, %39
%32 = phi i64 [ 0, %25 ], [ %40, %39 ]
%33 = phi i8* [ %30, %25 ], [ %42, %39 ]
%34 = tail call i8* @strchr(i8* dereferenceable(1) %33, i8 signext 43)
%35 = icmp eq i8* %34, null
br i1 %35, label %36, label %39
36: ; preds = %31
%37 = add nuw nsw i64 %32, 1
%38 = getelementptr inbounds [2000 x i8*], [2000 x i8*]* %6, i64 0, i64 %32
store i8* %33, i8** %38
br label %49
39: ; preds = %31
store i8 0, i8* %34
%40 = add nuw nsw i64 %32, 1
%41 = getelementptr inbounds [2000 x i8*], [2000 x i8*]* %6, i64 0, i64 %32
store i8* %33, i8** %41
%42 = getelementptr inbounds i8, i8* %34, i64 1
%43 = icmp ult i64 %32, 1999
br i1 %43, label %31, label %49
44: ; preds = %22
%45 = load i8, i8* %0
%46 = icmp eq i8 %45, 37
%47 = zext i1 %46 to i64
%48 = getelementptr i8, i8* %0, i64 %47
br label %54
49: ; preds = %39, %36
%50 = phi i64 [ %37, %36 ], [ %40, %39 ]
%51 = trunc i64 %50 to i32
%52 = load i8, i8* %2
%53 = icmp ne i8 %52, 0
br label %54
54: ; preds = %49, %44
%55 = phi i1 [ true, %44 ], [ %53, %49 ]
%56 = phi i8* [ %48, %44 ], [ %0, %49 ]
%57 = phi i32 [ undef, %44 ], [ %51, %49 ]
%58 = tail call i32* @fopen(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%59 = icmp eq i32* %58, null
br i1 %59, label %60, label %63
60: ; preds = %54
%61 = load i32, i32* @stderr
%62 = tail call i32 @fprintf(i32 %61, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([177 x i8], [177 x i8]* @.str.1, i64 0, i64 0), i32 221, i8* %2)
br label %157
63: ; preds = %54
%64 = call i32* @fgets(i8* %7, i32 240, i32* %58)
%65 = icmp eq i32* %64, null
br i1 %65, label %154, label %66
66: ; preds = %63
%67 = icmp sgt i32 %57, 0
%68 = zext i32 %57 to i64
br label %69
69: ; preds = %66, %150
%70 = phi %struct.lib_struct* [ null, %66 ], [ %151, %150 ]
br label %71
71: ; preds = %69, %74
%72 = load i8, i8* %7
%73 = icmp eq i8 %72, 59
br i1 %73, label %74, label %77
74: ; preds = %71, %81, %84, %94, %115
%75 = call i32* @fgets(i8* %7, i32 240, i32* %58)
%76 = icmp eq i32* %75, null
br i1 %76, label %154, label %71
77: ; preds = %71
%78 = call i8* @strchr(i8* %7, i8 signext 10)
%79 = icmp eq i8* %78, null
br i1 %79, label %81, label %80
80: ; preds = %77
store i8 0, i8* %78
br label %81
81: ; preds = %80, %77
%82 = call i8* @strchr(i8* %7, i8 signext 36)
%83 = icmp eq i8* %82, null
br i1 %83, label %74, label %84
84: ; preds = %81
%85 = getelementptr inbounds i8, i8* %82, i64 1
store i8 0, i8* %82
%86 = getelementptr inbounds i8, i8* %82, i64 2
%87 = load i8, i8* %85
%88 = sext i8 %87 to i32
%89 = add nsw i32 %88, -48
%90 = icmp eq i32 %89, %3
br i1 %90, label %91, label %74
91: ; preds = %84
%92 = load i8, i8* %86
%93 = icmp eq i8 %92, 43
br i1 %24, label %94, label %115
94: ; preds = %91
br i1 %93, label %74, label %95
95: ; preds = %94
%96 = call i32* @ulindex(i8* %56, i8* %86)
%97 = icmp eq i32* %96, null
br i1 %97, label %150, label %98
98: ; preds = %95
%99 = load i8, i8* %1
%100 = icmp eq i8 %99, 0
br i1 %100, label %101, label %103
101: ; preds = %98
%102 = call i32 @strncpy(i8* %1, i8* %7, i32 512)
br label %110
103: ; preds = %98
%104 = call i64 @strlen(i8* %1)
%105 = trunc i64 %104 to i32
%106 = sub nsw i32 512, %105
%107 = call i32 @strncat(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %106)
%108 = sub i32 508, %105
%109 = call i32 @strncat(i8* %1, i8* %7, i32 %108)
br label %110
110: ; preds = %103, %101
%111 = getelementptr inbounds i8, i8* %82, i64 3
%112 = call %struct.lib_struct* @get_lnames(i8* %111, %struct.lib_struct* %70)
%113 = icmp eq %struct.lib_struct* %112, null
%114 = select i1 %113, %struct.lib_struct* %70, %struct.lib_struct* %112
br label %150
115: ; preds = %91
br i1 %93, label %116, label %74
116: ; preds = %115
%117 = getelementptr inbounds i8, i8* %82, i64 3
%118 = call i8* @strchr(i8* %117, i8 signext 43)
%119 = icmp eq i8* %118, null
br i1 %119, label %147, label %120
120: ; preds = %116
store i8 0, i8* %118
br i1 %67, label %123, label %145
121: ; preds = %123
%122 = icmp eq i64 %129, %68
br i1 %122, label %145, label %123
123: ; preds = %120, %121
%124 = phi i64 [ %129, %121 ], [ 0, %120 ]
%125 = getelementptr inbounds [2000 x i8*], [2000 x i8*]* %6, i64 0, i64 %124
%126 = load i8*, i8** %125
%127 = call i64 @strcmp(i8* %126, i8* %117)
%128 = icmp eq i64 %127, 0
%129 = add nuw nsw i64 %124, 1
br i1 %128, label %130, label %121
130: ; preds = %123
%131 = load i8, i8* %1
%132 = icmp eq i8 %131, 0
br i1 %132, label %133, label %135
133: ; preds = %130
%134 = call i32 @strncpy(i8* %1, i8* %7, i32 512)
br label %142
135: ; preds = %130
%136 = call i64 @strlen(i8* %1)
%137 = trunc i64 %136 to i32
%138 = sub nsw i32 512, %137
%139 = call i32 @strncat(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %138)
%140 = sub i32 508, %137
%141 = call i32 @strncat(i8* %1, i8* %7, i32 %140)
br label %142
142: ; preds = %135, %133
%143 = getelementptr inbounds i8, i8* %118, i64 1
%144 = call %struct.lib_struct* @get_lnames(i8* %143, %struct.lib_struct* %70)
br label %145
145: ; preds = %121, %120, %142
%146 = phi %struct.lib_struct* [ %144, %142 ], [ %70, %120 ], [ %70, %121 ]
store i8 43, i8* %118
br label %150
147: ; preds = %116
%148 = load i32, i32* @stderr
%149 = call i32 @fprintf(i32 %148, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([177 x i8], [177 x i8]* @.str.1, i64 0, i64 0), i32 272, i8* %117)
br label %150
150: ; preds = %110, %147, %145, %95
%151 = phi %struct.lib_struct* [ %146, %145 ], [ %70, %147 ], [ %70, %95 ], [ %114, %110 ]
%152 = call i32* @fgets(i8* %7, i32 240, i32* %58)
%153 = icmp eq i32* %152, null
br i1 %153, label %154, label %69
154: ; preds = %150, %74, %63
%155 = phi %struct.lib_struct* [ null, %63 ], [ %70, %74 ], [ %151, %150 ]
%156 = call i32 @fclose(i32* %58)
br label %157
157: ; preds = %154, %60, %13
%158 = phi %struct.lib_struct* [ %14, %13 ], [ null, %60 ], [ %155, %154 ]
ret %struct.lib_struct* %158
}