#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*/ time_text;
struct plist {
  int dummy;
};
typedef int /*<<< orphan*/ path;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ LOCK_SH;
int /*<<< orphan*/ LOCK_UN;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ error(char *, ...);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fileno(int /*<<< orphan*/ *);
int flock(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ internal_logit(char *, int, char *, char *, int);
int /*<<< orphan*/ make_path(char *, int, char const *, char *);
int plist_add(struct plist *, char *);
int /*<<< orphan*/ plist_delete(struct plist *, int);
int plist_find_fname(struct plist *, char *);
int /*<<< orphan*/ plist_set_file(struct plist *, int, char *);
int /*<<< orphan*/ plist_set_item_time(struct plist *, int, int);
int /*<<< orphan*/ plist_set_serial(struct plist *, long);
int /*<<< orphan*/ plist_set_title_tags(struct plist *, int, char *);
char *read_line(int /*<<< orphan*/ *);
char *strchr(char *, char);
int strerror(int /*<<< orphan*/);
int /*<<< orphan*/ strip_string(char *);
int strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
void *strtol(char *, char **, int);
int plist_load_m3u(struct plist *plist, const char *fname, const char *cwd,
                   const int load_serial) {
  FILE *file;
  char *line;
  int last_added = -1;
  int after_extinf = 0;
  int added = 0;
  if (!(file = fopen(fname, "r"))) {
    error("Can't open playlist file: %s", strerror(errno));
    return 0;
  }
  if (flock(fileno(file), LOCK_SH) == -1)
    internal_logit("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/ecthiender/mocp-git/refs/"
                   "heads/master/playlist_file.c",
                   95, "UNKNOWN_FUNC", "Can't flock() the playlist file: %s",
                   strerror(errno));
  while ((line = read_line(file))) {
    if (!strncmp(line, "#EXTINF:", sizeof("#EXTINF:") - 1)) {
      char *comma;
      char *num_err;
      char time_text[10] = "";
      int time_sec;
      if (after_extinf) {
        error("Broken M3U file: double "
              "#EXTINF.");
        free(line);
        plist_delete(plist, last_added);
        return added;
      }
      comma = strchr(line + (sizeof("#EXTINF:") - 1), ',');
      if (!comma) {
        error("Broken M3U file: no comma "
              "in #EXTINF.");
        free(line);
        return added;
      }
      time_text[sizeof(time_text) - 1] = 0;
      strncpy(time_text, line + sizeof("#EXTINF:") - 1,
              ((comma - line - (sizeof("#EXTINF:") - 1)) < (sizeof(time_text))
                   ? (comma - line - (sizeof("#EXTINF:") - 1))
                   : (sizeof(time_text))));
      if (time_text[sizeof(time_text) - 1]) {
        error("Broken M3U file: "
              "wrong time.");
        free(line);
        return added;
      }
      time_sec = strtol(time_text, &num_err, 10);
      if (*num_err) {
        error("Broken M3U file: "
              "time is not a number.");
        free(line);
        return added;
      }
      after_extinf = 1;
      last_added = plist_add(plist, NULL);
      plist_set_title_tags(plist, last_added, comma + 1);
      if (*time_text)
        plist_set_item_time(plist, last_added, time_sec);
    } else if (line[0] != '#') {
      char path[2 * 4096];
      strip_string(line);
      if (strlen(line) <= 4096) {
        make_path(path, sizeof(path), cwd, line);
        if (plist_find_fname(plist, path) == -1) {
          if (after_extinf)
            plist_set_file(plist, last_added, path);
          else
            plist_add(plist, path);
          added++;
        } else if (after_extinf)
          plist_delete(plist, last_added);
      } else if (after_extinf)
        plist_delete(plist, last_added);
      after_extinf = 0;
    } else if (load_serial &&
               !strncmp(line, "#MOCSERIAL: ", sizeof("#MOCSERIAL: ") - 1)) {
      char *serial_str = line + sizeof("#MOCSERIAL: ") - 1;
      if (serial_str[0]) {
        char *err;
        long serial;
        serial = strtol(serial_str, &err, 0);
        if (!*err) {
          plist_set_serial(plist, serial);
          internal_logit(
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/ecthiender/mocp-git/refs/heads/master/"
              "playlist_file.c",
              185, "UNKNOWN_FUNC", "Got MOCSERIAL tag with serial %d",
              (int)serial);
        }
      }
    }
    free(line);
  }
  if (flock(fileno(file), LOCK_UN) == -1)
    internal_logit("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/ecthiender/mocp-git/refs/"
                   "heads/master/playlist_file.c",
                   194, "UNKNOWN_FUNC",
                   "Can't flock() (unlock) the playlist file: %s",
                   strerror(errno));
  fclose(file);
  return added;
}


x86 assembly (clang, -O0):
<plist_load_m3u>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20a0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
movl   $0xffffffff,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xd46(%rip),%rsi
call   1160 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    12f7 <plist_load_m3u+0x77>
mov    0x2d04(%rip),%rax
mov    (%rax),%edi
call   1190 <strerror@plt>
mov    %eax,%esi
lea    0xd1e(%rip),%rdi
mov    $0x0,%al
call   1150 <error@plt>
movl   $0x0,-0x4(%rbp)
jmp    1763 <plist_load_m3u+0x4e3>
mov    -0x30(%rbp),%rdi
call   1100 <fileno@plt>
mov    %eax,%edi
mov    0x2cdf(%rip),%rax
mov    (%rax),%esi
call   1170 <flock@plt>
cmp    $0xffffffff,%eax
jne    1349 <plist_load_m3u+0xc9>
mov    0x2cb8(%rip),%rax
mov    (%rax),%edi
call   1190 <strerror@plt>
mov    %eax,%r8d
lea    0xcee(%rip),%rdi
mov    $0x5f,%esi
lea    0xd72(%rip),%rdx
lea    0xd78(%rip),%rcx
call   11a0 <internal_logit@plt>
jmp    134e <plist_load_m3u+0xce>
mov    -0x30(%rbp),%rdi
call   1140 <read_line@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
je     1702 <plist_load_m3u+0x482>
mov    -0x38(%rbp),%rdi
lea    0xd70(%rip),%rsi
mov    $0x8,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%eax
jne    154a <plist_load_m3u+0x2ca>
lea    -0x62(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   10c0 <memset@plt>
cmpl   $0x0,-0x40(%rbp)
je     13cb <plist_load_m3u+0x14b>
lea    0xd45(%rip),%rdi
mov    $0x0,%al
call   1150 <error@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
mov    -0x3c(%rbp),%esi
call   10d0 <plist_delete@plt>
mov    -0x44(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1763 <plist_load_m3u+0x4e3>
mov    -0x38(%rbp),%rdi
add    $0x8,%rdi
mov    $0x2c,%esi
call   10b0 <strchr@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
jne    140e <plist_load_m3u+0x18e>
lea    0xd17(%rip),%rdi
mov    $0x0,%al
call   1150 <error@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x44(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1763 <plist_load_m3u+0x4e3>
movb   $0x0,-0x59(%rbp)
lea    -0x62(%rbp),%rax
mov    %rax,-0x2098(%rbp)
mov    -0x38(%rbp),%rax
add    $0x9,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x2090(%rbp)
mov    -0x50(%rbp),%rax
mov    -0x38(%rbp),%rcx
sub    %rcx,%rax
sub    $0x8,%rax
cmp    $0xa,%rax
jae    1464 <plist_load_m3u+0x1e4>
mov    -0x50(%rbp),%rax
mov    -0x38(%rbp),%rcx
sub    %rcx,%rax
sub    $0x8,%rax
mov    %rax,-0x20a0(%rbp)
jmp    1475 <plist_load_m3u+0x1f5>
mov    $0xa,%eax
mov    %rax,-0x20a0(%rbp)
jmp    1475 <plist_load_m3u+0x1f5>
mov    -0x2090(%rbp),%rsi
mov    -0x2098(%rbp),%rdi
mov    -0x20a0(%rbp),%rax
mov    %eax,%edx
call   1040 <strncpy@plt>
cmpb   $0x0,-0x59(%rbp)
je     14bd <plist_load_m3u+0x23d>
lea    0xc8e(%rip),%rdi
mov    $0x0,%al
call   1150 <error@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x44(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1763 <plist_load_m3u+0x4e3>
lea    -0x62(%rbp),%rdi
lea    -0x58(%rbp),%rsi
mov    $0xa,%edx
call   10f0 <strtol@plt>
mov    %eax,-0x68(%rbp)
mov    -0x58(%rbp),%rax
cmpb   $0x0,(%rax)
je     1501 <plist_load_m3u+0x281>
lea    0xc67(%rip),%rdi
mov    $0x0,%al
call   1150 <error@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x44(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1763 <plist_load_m3u+0x4e3>
movl   $0x1,-0x40(%rbp)
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   10e0 <plist_add@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x3c(%rbp),%esi
mov    -0x50(%rbp),%rdx
add    $0x1,%rdx
call   1070 <plist_set_title_tags@plt>
cmpb   $0x0,-0x62(%rbp)
je     1545 <plist_load_m3u+0x2c5>
mov    -0x10(%rbp),%rdi
mov    -0x3c(%rbp),%esi
mov    -0x68(%rbp),%edx
call   1180 <plist_set_item_time@plt>
jmp    16f4 <plist_load_m3u+0x474>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
je     1630 <plist_load_m3u+0x3b0>
mov    -0x38(%rbp),%rdi
call   1090 <strip_string@plt>
mov    -0x38(%rbp),%rdi
call   10a0 <strlen@plt>
cmp    $0x1000,%eax
jg     1609 <plist_load_m3u+0x389>
lea    -0x2070(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    $0x2000,%esi
call   1130 <make_path@plt>
mov    -0x10(%rbp),%rdi
lea    -0x2070(%rbp),%rsi
call   1120 <plist_find_fname@plt>
cmp    $0xffffffff,%eax
jne    15e9 <plist_load_m3u+0x369>
cmpl   $0x0,-0x40(%rbp)
je     15cb <plist_load_m3u+0x34b>
mov    -0x10(%rbp),%rdi
mov    -0x3c(%rbp),%esi
lea    -0x2070(%rbp),%rdx
call   1110 <plist_set_file@plt>
jmp    15db <plist_load_m3u+0x35b>
mov    -0x10(%rbp),%rdi
lea    -0x2070(%rbp),%rsi
call   10e0 <plist_add@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1604 <plist_load_m3u+0x384>
cmpl   $0x0,-0x40(%rbp)
je     15ff <plist_load_m3u+0x37f>
mov    -0x10(%rbp),%rdi
mov    -0x3c(%rbp),%esi
call   10d0 <plist_delete@plt>
jmp    1604 <plist_load_m3u+0x384>
jmp    1624 <plist_load_m3u+0x3a4>
cmpl   $0x0,-0x40(%rbp)
je     161f <plist_load_m3u+0x39f>
mov    -0x10(%rbp),%rdi
mov    -0x3c(%rbp),%esi
call   10d0 <plist_delete@plt>
jmp    1624 <plist_load_m3u+0x3a4>
movl   $0x0,-0x40(%rbp)
jmp    16ef <plist_load_m3u+0x46f>
cmpl   $0x0,-0x24(%rbp)
je     16ea <plist_load_m3u+0x46a>
mov    -0x38(%rbp),%rdi
lea    0xb2f(%rip),%rsi
mov    $0xc,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%eax
jne    16ea <plist_load_m3u+0x46a>
mov    -0x38(%rbp),%rax
add    $0xd,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x2078(%rbp)
mov    -0x2078(%rbp),%rax
cmpb   $0x0,(%rax)
je     16e5 <plist_load_m3u+0x465>
mov    -0x2078(%rbp),%rdi
lea    -0x2080(%rbp),%rsi
xor    %edx,%edx
call   10f0 <strtol@plt>
mov    %rax,-0x2088(%rbp)
mov    -0x2080(%rbp),%rax
cmpb   $0x0,(%rax)
jne    16e0 <plist_load_m3u+0x460>
mov    -0x10(%rbp),%rdi
mov    -0x2088(%rbp),%rsi
call   1060 <plist_set_serial@plt>
mov    -0x2088(%rbp),%rax
mov    %eax,%r8d
lea    0x957(%rip),%rdi
mov    $0xb9,%esi
lea    0x9db(%rip),%rdx
lea    0xaa6(%rip),%rcx
call   11a0 <internal_logit@plt>
jmp    16e5 <plist_load_m3u+0x465>
jmp    16ea <plist_load_m3u+0x46a>
jmp    16ef <plist_load_m3u+0x46f>
jmp    16f4 <plist_load_m3u+0x474>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
jmp    134e <plist_load_m3u+0xce>
mov    -0x30(%rbp),%rdi
call   1100 <fileno@plt>
mov    %eax,%edi
mov    0x28bc(%rip),%rax
mov    (%rax),%esi
call   1170 <flock@plt>
cmp    $0xffffffff,%eax
jne    1754 <plist_load_m3u+0x4d4>
mov    0x28ad(%rip),%rax
mov    (%rax),%edi
call   1190 <strerror@plt>
mov    %eax,%r8d
lea    0x8e3(%rip),%rdi
mov    $0xc2,%esi
lea    0x967(%rip),%rdx
lea    0xa53(%rip),%rcx
call   11a0 <internal_logit@plt>
mov    -0x30(%rbp),%rdi
call   1080 <fclose@plt>
mov    -0x44(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plist_load_m3u>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2038,%rsp
mov    %ecx,0x1c(%rsp)
mov    %rdx,0x20(%rsp)
mov    %rsi,%rax
mov    %rdi,%r12
lea    0xd69(%rip),%rsi
mov    %rax,%rdi
call   1150 <fopen@plt>
test   %rax,%rax
je     156e <plist_load_m3u+0x2fe>
mov    %rax,%rbp
mov    %rax,%rdi
call   10f0 <fileno@plt>
mov    0x2d2e(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1160 <flock@plt>
cmp    $0xffffffff,%eax
jne    12f8 <plist_load_m3u+0x88>
mov    0x2d09(%rip),%rax
mov    (%rax),%edi
call   1180 <strerror@plt>
lea    0xd42(%rip),%rdi
lea    0xdcb(%rip),%rdx
lea    0xdd1(%rip),%rcx
mov    $0x5f,%esi
mov    %eax,%r8d
call   1190 <internal_logit@plt>
mov    %rbp,%rdi
call   1130 <read_line@plt>
test   %rax,%rax
je     1593 <plist_load_m3u+0x323>
mov    %rax,%r13
xor    %r14d,%r14d
mov    $0xffffffff,%r15d
lea    0xdc4(%rip),%rbx
movl   $0x0,0xc(%rsp)
mov    %rbp,0x10(%rsp)
jmp    135e <plist_load_m3u+0xee>
nopl   0x0(%rax,%rax,1)
mov    $0x1,%r14d
lea    0xda3(%rip),%rbx
mov    0x10(%rsp),%rbp
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1130 <read_line@plt>
mov    %rax,%r13
test   %rax,%rax
je     159b <plist_load_m3u+0x32b>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1050 <strncmp@plt>
test   %eax,%eax
je     1400 <plist_load_m3u+0x190>
cmpb   $0x23,0x0(%r13)
jne    14d0 <plist_load_m3u+0x260>
cmpl   $0x0,0x1c(%rsp)
je     1342 <plist_load_m3u+0xd2>
mov    %r13,%rdi
lea    0xde2(%rip),%rsi
mov    $0xc,%edx
call   1050 <strncmp@plt>
test   %eax,%eax
jne    1342 <plist_load_m3u+0xd2>
cmpb   $0x0,0xc(%r13)
je     1342 <plist_load_m3u+0xd2>
lea    0xc(%r13),%rdi
lea    0x30(%rsp),%rsi
xor    %edx,%edx
call   10e0 <strtol@plt>
mov    %rax,%rbx
mov    0x30(%rsp),%rax
cmpb   $0x0,(%rax)
jne    13f1 <plist_load_m3u+0x181>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1060 <plist_set_serial@plt>
lea    0xc49(%rip),%rdi
mov    $0xb9,%esi
lea    0xccd(%rip),%rdx
lea    0xd98(%rip),%rcx
mov    %ebx,%r8d
call   1190 <internal_logit@plt>
lea    0xce8(%rip),%rbx
jmp    1342 <plist_load_m3u+0xd2>
nopl   (%rax)
movw   $0x0,0x38(%rsp)
movq   $0x0,0x30(%rsp)
test   %r14d,%r14d
jne    15f2 <plist_load_m3u+0x382>
mov    %r12,%r15
lea    0x8(%r13),%rbx
mov    %rbx,%rdi
mov    $0x2c,%esi
call   10b0 <strchr@plt>
test   %rax,%rax
je     1615 <plist_load_m3u+0x3a5>
mov    %rax,%r12
mov    %rax,%rdx
sub    %r13,%rdx
add    $0xfffffffffffffff8,%rdx
cmp    $0xa,%rdx
mov    $0xa,%eax
cmovae %eax,%edx
lea    0x30(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1040 <strncpy@plt>
cmpb   $0x0,0x39(%rsp)
jne    161e <plist_load_m3u+0x3ae>
mov    %rbp,%rdi
lea    0x28(%rsp),%rsi
mov    $0xa,%edx
call   10e0 <strtol@plt>
mov    %rax,%r14
mov    0x28(%rsp),%rax
cmpb   $0x0,(%rax)
jne    1627 <plist_load_m3u+0x3b7>
mov    %r15,%rbx
mov    %r15,%rdi
xor    %esi,%esi
call   10d0 <plist_add@plt>
mov    %eax,%r15d
add    $0x1,%r12
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r12,%rdx
mov    %rbx,%r12
call   1070 <plist_set_title_tags@plt>
cmpb   $0x0,0x30(%rsp)
je     1330 <plist_load_m3u+0xc0>
mov    %r12,%rdi
mov    %r15d,%esi
mov    %r14d,%edx
call   1170 <plist_set_item_time@plt>
jmp    1330 <plist_load_m3u+0xc0>
nop
mov    %r13,%rdi
call   1090 <strip_string@plt>
mov    %r13,%rdi
call   10a0 <strlen@plt>
cmp    $0x1000,%eax
jg     1523 <plist_load_m3u+0x2b3>
lea    0x30(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x2000,%esi
mov    0x20(%rsp),%rdx
mov    %r13,%rcx
call   1120 <make_path@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
call   1110 <plist_find_fname@plt>
cmp    $0xffffffff,%eax
je     153b <plist_load_m3u+0x2cb>
test   %r14d,%r14d
je     1561 <plist_load_m3u+0x2f1>
mov    %r12,%rdi
mov    %r15d,%esi
call   10c0 <plist_delete@plt>
jmp    1561 <plist_load_m3u+0x2f1>
test   %r14d,%r14d
je     1533 <plist_load_m3u+0x2c3>
mov    %r12,%rdi
mov    %r15d,%esi
call   10c0 <plist_delete@plt>
xor    %r14d,%r14d
jmp    1342 <plist_load_m3u+0xd2>
mov    %r12,%rdi
test   %r14d,%r14d
je     1552 <plist_load_m3u+0x2e2>
mov    %r15d,%esi
lea    0x30(%rsp),%rdx
call   1100 <plist_set_file@plt>
jmp    155c <plist_load_m3u+0x2ec>
lea    0x30(%rsp),%rsi
call   10d0 <plist_add@plt>
addl   $0x1,0xc(%rsp)
mov    0x10(%rsp),%rbp
xor    %r14d,%r14d
jmp    1342 <plist_load_m3u+0xd2>
mov    0x2a63(%rip),%rax
mov    (%rax),%edi
call   1180 <strerror@plt>
lea    0xa7f(%rip),%rdi
xor    %ebx,%ebx
mov    %eax,%esi
xor    %eax,%eax
call   1140 <error@plt>
jmp    1641 <plist_load_m3u+0x3d1>
movl   $0x0,0xc(%rsp)
mov    %rbp,%rdi
call   10f0 <fileno@plt>
mov    0x2a26(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1160 <flock@plt>
cmp    $0xffffffff,%eax
jne    15e8 <plist_load_m3u+0x378>
mov    0x2a19(%rip),%rax
mov    (%rax),%edi
call   1180 <strerror@plt>
lea    0xa52(%rip),%rdi
lea    0xadb(%rip),%rdx
lea    0xbc7(%rip),%rcx
mov    $0xc2,%esi
mov    %eax,%r8d
call   1190 <internal_logit@plt>
mov    %rbp,%rdi
call   1080 <fclose@plt>
jmp    163d <plist_load_m3u+0x3cd>
lea    0xaf0(%rip),%rdi
xor    %eax,%eax
call   1140 <error@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
mov    %r15d,%esi
call   10c0 <plist_delete@plt>
jmp    163d <plist_load_m3u+0x3cd>
lea    0xaee(%rip),%rdi
jmp    162e <plist_load_m3u+0x3be>
lea    0xb0b(%rip),%rdi
jmp    162e <plist_load_m3u+0x3be>
lea    0xb1f(%rip),%rdi
xor    %eax,%eax
call   1140 <error@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%eax
add    $0x2038,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.plist = type { i32 }
@.str = [2 x i8] c"r\00"
@.str.1 = [29 x i8] c"Can't open playlist file: %s\00"
@errno = global i32 0
@LOCK_SH = global i32 0
@.str.2 = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ecthiender/mocp-git/refs/heads/master/playlist_file.c\00"
@.str.3 = [13 x i8] c"UNKNOWN_FUNC\00"
@.str.4 = [36 x i8] c"Can't flock() the playlist file: %s\00"
@.str.5 = [9 x i8] c"#EXTINF:\00"
@.str.6 = [33 x i8] c"Broken M3U file: double #EXTINF.\00"
@.str.7 = [38 x i8] c"Broken M3U file: no comma in #EXTINF.\00"
@.str.8 = [29 x i8] c"Broken M3U file: wrong time.\00"
@.str.9 = [39 x i8] c"Broken M3U file: time is not a number.\00"
@.str.10 = [13 x i8] c"#MOCSERIAL: \00"
@.str.11 = [33 x i8] c"Got MOCSERIAL tag with serial %d\00"
@LOCK_UN = global i32 0
@.str.12 = [45 x i8] c"Can't flock() (unlock) the playlist file: %s\00"
define i32 @plist_load_m3u(%struct.plist* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca %struct.plist*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca [10 x i8]
%18 = alloca i32
%19 = alloca [8192 x i8]
%20 = alloca i8*
%21 = alloca i8*
%22 = alloca i64
store %struct.plist* %0, %struct.plist** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 -1, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
%23 = load i8*, i8** %7
%24 = call i32* @fopen(i8* %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %24, i32** %10
%25 = icmp ne i32* %24, null
br i1 %25, label %30, label %26
26: ; preds = %4
%27 = load i32, i32* @errno
%28 = call i32 @strerror(i32 %27)
%29 = call i32 (i8*, ...) @error(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %28)
store i32 0, i32* %5
br label %238
30: ; preds = %4
%31 = load i32*, i32** %10
%32 = call i32 @fileno(i32* %31)
%33 = load i32, i32* @LOCK_SH
%34 = call i32 @flock(i32 %32, i32 %33)
%35 = icmp eq i32 %34, -1
br i1 %35, label %36, label %40
36: ; preds = %30
%37 = load i32, i32* @errno
%38 = call i32 @strerror(i32 %37)
%39 = call i32 @internal_logit(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.2, i64 0, i64 0), i32 95, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 %38)
br label %40
40: ; preds = %36, %30
br label %41
41: ; preds = %221, %40
%42 = load i32*, i32** %10
%43 = call i8* @read_line(i32* %42)
store i8* %43, i8** %11
%44 = icmp ne i8* %43, null
br i1 %44, label %45, label %224
45: ; preds = %41
%46 = load i8*, i8** %11
%47 = call i32 @strncmp(i8* %46, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%48 = icmp ne i32 %47, 0
br i1 %48, label %134, label %49
49: ; preds = %45
%50 = bitcast [10 x i8]* %17 to i8*
%51 = load i32, i32* %13
%52 = icmp ne i32 %51, 0
br i1 %52, label %53, label %61
53: ; preds = %49
%54 = call i32 (i8*, ...) @error(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
%55 = load i8*, i8** %11
%56 = call i32 @free(i8* %55)
%57 = load %struct.plist*, %struct.plist** %6
%58 = load i32, i32* %12
%59 = call i32 @plist_delete(%struct.plist* %57, i32 %58)
%60 = load i32, i32* %14
store i32 %60, i32* %5
br label %238
61: ; preds = %49
%62 = load i8*, i8** %11
%63 = getelementptr inbounds i8, i8* %62, i64 8
%64 = call i8* @strchr(i8* %63, i8 signext 44)
store i8* %64, i8** %15
%65 = load i8*, i8** %15
%66 = icmp ne i8* %65, null
br i1 %66, label %72, label %67
67: ; preds = %61
%68 = call i32 (i8*, ...) @error(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0))
%69 = load i8*, i8** %11
%70 = call i32 @free(i8* %69)
%71 = load i32, i32* %14
store i32 %71, i32* %5
br label %238
72: ; preds = %61
%73 = getelementptr inbounds [10 x i8], [10 x i8]* %17, i64 0, i64 9
store i8 0, i8* %73
%74 = getelementptr inbounds [10 x i8], [10 x i8]* %17, i64 0, i64 0
%75 = load i8*, i8** %11
%76 = getelementptr inbounds i8, i8* %75, i64 9
%77 = getelementptr inbounds i8, i8* %76, i64 -1
%78 = load i8*, i8** %15
%79 = load i8*, i8** %11
%80 = ptrtoint i8* %78 to i64
%81 = ptrtoint i8* %79 to i64
%82 = sub i64 %80, %81
%83 = sub i64 %82, 8
%84 = icmp ult i64 %83, 10
br i1 %84, label %85, label %92
85: ; preds = %72
%86 = load i8*, i8** %15
%87 = load i8*, i8** %11
%88 = ptrtoint i8* %86 to i64
%89 = ptrtoint i8* %87 to i64
%90 = sub i64 %88, %89
%91 = sub i64 %90, 8
br label %93
92: ; preds = %72
br label %93
93: ; preds = %92, %85
%94 = phi i64 [ %91, %85 ], [ 10, %92 ]
%95 = trunc i64 %94 to i32
%96 = call i32 @strncpy(i8* %74, i8* %77, i32 %95)
%97 = getelementptr inbounds [10 x i8], [10 x i8]* %17, i64 0, i64 9
%98 = load i8, i8* %97
%99 = icmp ne i8 %98, 0
br i1 %99, label %100, label %105
100: ; preds = %93
%101 = call i32 (i8*, ...) @error(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%102 = load i8*, i8** %11
%103 = call i32 @free(i8* %102)
%104 = load i32, i32* %14
store i32 %104, i32* %5
br label %238
105: ; preds = %93
%106 = getelementptr inbounds [10 x i8], [10 x i8]* %17, i64 0, i64 0
%107 = call i8* @strtol(i8* %106, i8** %16, i32 10)
%108 = ptrtoint i8* %107 to i32
store i32 %108, i32* %18
%109 = load i8*, i8** %16
%110 = load i8, i8* %109
%111 = icmp ne i8 %110, 0
br i1 %111, label %112, label %117
112: ; preds = %105
%113 = call i32 (i8*, ...) @error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0))
%114 = load i8*, i8** %11
%115 = call i32 @free(i8* %114)
%116 = load i32, i32* %14
store i32 %116, i32* %5
br label %238
117: ; preds = %105
store i32 1, i32* %13
%118 = load %struct.plist*, %struct.plist** %6
%119 = call i32 @plist_add(%struct.plist* %118, i8* null)
store i32 %119, i32* %12
%120 = load %struct.plist*, %struct.plist** %6
%121 = load i32, i32* %12
%122 = load i8*, i8** %15
%123 = getelementptr inbounds i8, i8* %122, i64 1
%124 = call i32 @plist_set_title_tags(%struct.plist* %120, i32 %121, i8* %123)
%125 = getelementptr inbounds [10 x i8], [10 x i8]* %17, i64 0, i64 0
%126 = load i8, i8* %125
%127 = icmp ne i8 %126, 0
br i1 %127, label %128, label %133
128: ; preds = %117
%129 = load %struct.plist*, %struct.plist** %6
%130 = load i32, i32* %12
%131 = load i32, i32* %18
%132 = call i32 @plist_set_item_time(%struct.plist* %129, i32 %130, i32 %131)
br label %133
133: ; preds = %128, %117
br label %221
134: ; preds = %45
%135 = load i8*, i8** %11
%136 = getelementptr inbounds i8, i8* %135, i64 0
%137 = load i8, i8* %136
%138 = sext i8 %137 to i32
%139 = icmp ne i32 %138, 35
br i1 %139, label %140, label %188
140: ; preds = %134
%141 = load i8*, i8** %11
%142 = call i32 @strip_string(i8* %141)
%143 = load i8*, i8** %11
%144 = call i32 @strlen(i8* %143)
%145 = icmp sle i32 %144, 4096
br i1 %145, label %146, label %179
146: ; preds = %140
%147 = getelementptr inbounds [8192 x i8], [8192 x i8]* %19, i64 0, i64 0
%148 = load i8*, i8** %8
%149 = load i8*, i8** %11
%150 = call i32 @make_path(i8* %147, i32 8192, i8* %148, i8* %149)
%151 = load %struct.plist*, %struct.plist** %6
%152 = getelementptr inbounds [8192 x i8], [8192 x i8]* %19, i64 0, i64 0
%153 = call i32 @plist_find_fname(%struct.plist* %151, i8* %152)
%154 = icmp eq i32 %153, -1
br i1 %154, label %155, label %170
155: ; preds = %146
%156 = load i32, i32* %13
%157 = icmp ne i32 %156, 0
br i1 %157, label %158, label %163
158: ; preds = %155
%159 = load %struct.plist*, %struct.plist** %6
%160 = load i32, i32* %12
%161 = getelementptr inbounds [8192 x i8], [8192 x i8]* %19, i64 0, i64 0
%162 = call i32 @plist_set_file(%struct.plist* %159, i32 %160, i8* %161)
br label %167
163: ; preds = %155
%164 = load %struct.plist*, %struct.plist** %6
%165 = getelementptr inbounds [8192 x i8], [8192 x i8]* %19, i64 0, i64 0
%166 = call i32 @plist_add(%struct.plist* %164, i8* %165)
br label %167
167: ; preds = %163, %158
%168 = load i32, i32* %14
%169 = add nsw i32 %168, 1
store i32 %169, i32* %14
br label %178
170: ; preds = %146
%171 = load i32, i32* %13
%172 = icmp ne i32 %171, 0
br i1 %172, label %173, label %177
173: ; preds = %170
%174 = load %struct.plist*, %struct.plist** %6
%175 = load i32, i32* %12
%176 = call i32 @plist_delete(%struct.plist* %174, i32 %175)
br label %177
177: ; preds = %173, %170
br label %178
178: ; preds = %177, %167
br label %187
179: ; preds = %140
%180 = load i32, i32* %13
%181 = icmp ne i32 %180, 0
br i1 %181, label %182, label %186
182: ; preds = %179
%183 = load %struct.plist*, %struct.plist** %6
%184 = load i32, i32* %12
%185 = call i32 @plist_delete(%struct.plist* %183, i32 %184)
br label %186
186: ; preds = %182, %179
br label %187
187: ; preds = %186, %178
store i32 0, i32* %13
br label %220
188: ; preds = %134
%189 = load i32, i32* %9
%190 = icmp ne i32 %189, 0
br i1 %190, label %191, label %219
191: ; preds = %188
%192 = load i8*, i8** %11
%193 = call i32 @strncmp(i8* %192, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i32 12)
%194 = icmp ne i32 %193, 0
br i1 %194, label %219, label %195
195: ; preds = %191
%196 = load i8*, i8** %11
%197 = getelementptr inbounds i8, i8* %196, i64 13
%198 = getelementptr inbounds i8, i8* %197, i64 -1
store i8* %198, i8** %20
%199 = load i8*, i8** %20
%200 = getelementptr inbounds i8, i8* %199, i64 0
%201 = load i8, i8* %200
%202 = icmp ne i8 %201, 0
br i1 %202, label %203, label %218
203: ; preds = %195
%204 = load i8*, i8** %20
%205 = call i8* @strtol(i8* %204, i8** %21, i32 0)
%206 = ptrtoint i8* %205 to i64
store i64 %206, i64* %22
%207 = load i8*, i8** %21
%208 = load i8, i8* %207
%209 = icmp ne i8 %208, 0
br i1 %209, label %217, label %210
210: ; preds = %203
%211 = load %struct.plist*, %struct.plist** %6
%212 = load i64, i64* %22
%213 = call i32 @plist_set_serial(%struct.plist* %211, i64 %212)
%214 = load i64, i64* %22
%215 = trunc i64 %214 to i32
%216 = call i32 @internal_logit(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.2, i64 0, i64 0), i32 185, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0), i32 %215)
br label %217
217: ; preds = %210, %203
br label %218
218: ; preds = %217, %195
br label %219
219: ; preds = %218, %191, %188
br label %220
220: ; preds = %219, %187
br label %221
221: ; preds = %220, %133
%222 = load i8*, i8** %11
%223 = call i32 @free(i8* %222)
br label %41
224: ; preds = %41
%225 = load i32*, i32** %10
%226 = call i32 @fileno(i32* %225)
%227 = load i32, i32* @LOCK_UN
%228 = call i32 @flock(i32 %226, i32 %227)
%229 = icmp eq i32 %228, -1
br i1 %229, label %230, label %234
230: ; preds = %224
%231 = load i32, i32* @errno
%232 = call i32 @strerror(i32 %231)
%233 = call i32 @internal_logit(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.2, i64 0, i64 0), i32 194, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.12, i64 0, i64 0), i32 %232)
br label %234
234: ; preds = %230, %224
%235 = load i32*, i32** %10
%236 = call i32 @fclose(i32* %235)
%237 = load i32, i32* %14
store i32 %237, i32* %5
br label %238
238: ; preds = %234, %112, %100, %67, %53, %26
%239 = load i32, i32* %5
ret i32 %239
}

LLVM IR (-O2):
%struct.plist = type { i32 }
@.str = [2 x i8] c"r\00"
@.str.1 = [29 x i8] c"Can't open playlist file: %s\00"
@errno = global i32 0
@LOCK_SH = global i32 0
@.str.2 = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ecthiender/mocp-git/refs/heads/master/playlist_file.c\00"
@.str.3 = [13 x i8] c"UNKNOWN_FUNC\00"
@.str.4 = [36 x i8] c"Can't flock() the playlist file: %s\00"
@.str.5 = [9 x i8] c"#EXTINF:\00"
@.str.6 = [33 x i8] c"Broken M3U file: double #EXTINF.\00"
@.str.7 = [38 x i8] c"Broken M3U file: no comma in #EXTINF.\00"
@.str.8 = [29 x i8] c"Broken M3U file: wrong time.\00"
@.str.9 = [39 x i8] c"Broken M3U file: time is not a number.\00"
@.str.10 = [13 x i8] c"#MOCSERIAL: \00"
@.str.11 = [33 x i8] c"Got MOCSERIAL tag with serial %d\00"
@LOCK_UN = global i32 0
@.str.12 = [45 x i8] c"Can't flock() (unlock) the playlist file: %s\00"
define i32 @plist_load_m3u(%struct.plist* %0, i8* nocapture %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca [10 x i8]
%7 = alloca [8192 x i8]
%8 = alloca i8*
%9 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %15
11: ; preds = %4
%12 = load i32, i32* @errno
%13 = tail call i32 @strerror(i32 %12)
%14 = tail call i32 (i8*, ...) @error(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %13)
br label %154
15: ; preds = %4
%16 = tail call i32 @fileno(i32* %9)
%17 = load i32, i32* @LOCK_SH
%18 = tail call i32 @flock(i32 %16, i32 %17)
%19 = icmp eq i32 %18, -1
br i1 %19, label %20, label %24
20: ; preds = %15
%21 = load i32, i32* @errno
%22 = tail call i32 @strerror(i32 %21)
%23 = tail call i32 @internal_logit(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.2, i64 0, i64 0), i32 95, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 %22)
br label %24
24: ; preds = %20, %15
%25 = call i8* @read_line(i32* %9)
%26 = icmp eq i8* %25, null
br i1 %26, label %142, label %27
27: ; preds = %24
%28 = getelementptr inbounds [8192 x i8], [8192 x i8]* %7, i64 0, i64 0
%29 = icmp eq i32 %3, 0
%30 = bitcast i8** %8 to i8*
%31 = bitcast i8** %5 to i8*
%32 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%33 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 9
br label %34
34: ; preds = %27, %135
%35 = phi i8* [ %25, %27 ], [ %140, %135 ]
%36 = phi i32 [ -1, %27 ], [ %138, %135 ]
%37 = phi i32 [ 0, %27 ], [ %137, %135 ]
%38 = phi i32 [ 0, %27 ], [ %136, %135 ]
%39 = call i32 @strncmp(i8* %35, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 8)
%40 = icmp eq i32 %39, 0
br i1 %40, label %41, label %88
41: ; preds = %34
%42 = icmp eq i32 %37, 0
br i1 %42, label %47, label %43
43: ; preds = %41
%44 = call i32 (i8*, ...) @error(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
%45 = call i32 @free(i8* %35)
%46 = call i32 @plist_delete(%struct.plist* %0, i32 %36)
br label %86
47: ; preds = %41
%48 = getelementptr inbounds i8, i8* %35, i64 8
%49 = call i8* @strchr(i8* %48, i8 signext 44)
%50 = icmp eq i8* %49, null
br i1 %50, label %51, label %54
51: ; preds = %47
%52 = call i32 (i8*, ...) @error(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0))
%53 = call i32 @free(i8* %35)
br label %86
54: ; preds = %47
%55 = ptrtoint i8* %49 to i64
%56 = ptrtoint i8* %35 to i64
%57 = sub i64 %55, %56
%58 = add i64 %57, -8
%59 = icmp ult i64 %58, 10
%60 = select i1 %59, i64 %58, i64 10
%61 = trunc i64 %60 to i32
%62 = call i32 @strncpy(i8* %32, i8* %48, i32 %61)
%63 = load i8, i8* %33
%64 = icmp eq i8 %63, 0
br i1 %64, label %68, label %65
65: ; preds = %54
%66 = call i32 (i8*, ...) @error(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%67 = call i32 @free(i8* %35)
br label %86
68: ; preds = %54
%69 = call i8* @strtol(i8* %32, i8** %5, i32 10)
%70 = ptrtoint i8* %69 to i64
%71 = trunc i64 %70 to i32
%72 = load i8*, i8** %5
%73 = load i8, i8* %72
%74 = icmp eq i8 %73, 0
br i1 %74, label %78, label %75
75: ; preds = %68
%76 = call i32 (i8*, ...) @error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0))
%77 = call i32 @free(i8* %35)
br label %86
78: ; preds = %68
%79 = call i32 @plist_add(%struct.plist* %0, i8* null)
%80 = getelementptr inbounds i8, i8* %49, i64 1
%81 = call i32 @plist_set_title_tags(%struct.plist* %0, i32 %79, i8* %80)
%82 = load i8, i8* %32
%83 = icmp eq i8 %82, 0
br i1 %83, label %87, label %84
84: ; preds = %78
%85 = call i32 @plist_set_item_time(%struct.plist* %0, i32 %79, i32 %71)
br label %87
86: ; preds = %75, %65, %51, %43
br label %154
87: ; preds = %78, %84
br label %135
88: ; preds = %34
%89 = load i8, i8* %35
%90 = icmp eq i8 %89, 35
br i1 %90, label %116, label %91
91: ; preds = %88
%92 = call i32 @strip_string(i8* %35)
%93 = call i32 @strlen(i8* %35)
%94 = icmp slt i32 %93, 4097
br i1 %94, label %95, label %110
95: ; preds = %91
%96 = call i32 @make_path(i8* %28, i32 8192, i8* %2, i8* %35)
%97 = call i32 @plist_find_fname(%struct.plist* %0, i8* %28)
%98 = icmp eq i32 %97, -1
%99 = icmp eq i32 %37, 0
br i1 %98, label %100, label %107
100: ; preds = %95
br i1 %99, label %103, label %101
101: ; preds = %100
%102 = call i32 @plist_set_file(%struct.plist* %0, i32 %36, i8* %28)
br label %105
103: ; preds = %100
%104 = call i32 @plist_add(%struct.plist* %0, i8* %28)
br label %105
105: ; preds = %103, %101
%106 = add nsw i32 %38, 1
br label %114
107: ; preds = %95
br i1 %99, label %114, label %108
108: ; preds = %107
%109 = call i32 @plist_delete(%struct.plist* %0, i32 %36)
br label %114
110: ; preds = %91
%111 = icmp eq i32 %37, 0
br i1 %111, label %114, label %112
112: ; preds = %110
%113 = call i32 @plist_delete(%struct.plist* %0, i32 %36)
br label %114
114: ; preds = %110, %112, %105, %108, %107
%115 = phi i32 [ %106, %105 ], [ %38, %108 ], [ %38, %107 ], [ %38, %112 ], [ %38, %110 ]
br label %135
116: ; preds = %88
br i1 %29, label %135, label %117
117: ; preds = %116
%118 = call i32 @strncmp(i8* %35, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i32 12)
%119 = icmp eq i32 %118, 0
br i1 %119, label %120, label %135
120: ; preds = %117
%121 = getelementptr inbounds i8, i8* %35, i64 12
%122 = load i8, i8* %121
%123 = icmp eq i8 %122, 0
br i1 %123, label %135, label %124
124: ; preds = %120
%125 = call i8* @strtol(i8* %121, i8** %8, i32 0)
%126 = ptrtoint i8* %125 to i64
%127 = load i8*, i8** %8
%128 = load i8, i8* %127
%129 = icmp eq i8 %128, 0
br i1 %129, label %130, label %134
130: ; preds = %124
%131 = call i32 @plist_set_serial(%struct.plist* %0, i64 %126)
%132 = trunc i64 %126 to i32
%133 = call i32 @internal_logit(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.2, i64 0, i64 0), i32 185, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0), i32 %132)
br label %134
134: ; preds = %130, %124
br label %135
135: ; preds = %87, %120, %134, %114, %117, %116
%136 = phi i32 [ %115, %114 ], [ %38, %117 ], [ %38, %116 ], [ %38, %87 ], [ %38, %134 ], [ %38, %120 ]
%137 = phi i32 [ 0, %114 ], [ %37, %117 ], [ %37, %116 ], [ 1, %87 ], [ %37, %134 ], [ %37, %120 ]
%138 = phi i32 [ %36, %114 ], [ %36, %117 ], [ %36, %116 ], [ %79, %87 ], [ %36, %134 ], [ %36, %120 ]
%139 = call i32 @free(i8* %35)
%140 = call i8* @read_line(i32* %9)
%141 = icmp eq i8* %140, null
br i1 %141, label %142, label %34
142: ; preds = %135, %24
%143 = phi i32 [ 0, %24 ], [ %136, %135 ]
%144 = call i32 @fileno(i32* %9)
%145 = load i32, i32* @LOCK_UN
%146 = call i32 @flock(i32 %144, i32 %145)
%147 = icmp eq i32 %146, -1
br i1 %147, label %148, label %152
148: ; preds = %142
%149 = load i32, i32* @errno
%150 = call i32 @strerror(i32 %149)
%151 = call i32 @internal_logit(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.2, i64 0, i64 0), i32 194, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.12, i64 0, i64 0), i32 %150)
br label %152
152: ; preds = %148, %142
%153 = call i32 @fclose(i32* %9)
br label %154
154: ; preds = %86, %152, %11
%155 = phi i32 [ %143, %152 ], [ 0, %11 ], [ %38, %86 ]
ret i32 %155
}