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

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fieldcpy(char *, char *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
scalar_t__ isspace(char);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stdout;
scalar_t__ strcmp(char *, char *);
int strlen(char *);
scalar_t__ strncasecmp(char *, char *, int);
void dogetdeps(char *pkgsfile, char **in_pkgs, int pkgc) {
  char buf[1000];
  char cur_pkg[1000];
  char cur_deps[1000];
  char *pkgs[100];
  int i;
  int skip;
  FILE *f;
  cur_pkg[0] = cur_deps[0] = '\0';
  for (i = 0; i < pkgc; i++)
    pkgs[i] = in_pkgs[i];
  f = fopen(pkgsfile, "r");
  if (f == NULL) {
    perror(pkgsfile);
    exit(1);
  }
  skip = 1;
  while (fgets(buf, sizeof(buf), f)) {
    if (*buf && buf[strlen(buf) - 1] == '\n')
      buf[strlen(buf) - 1] = '\0';
    if (strncasecmp(buf, "Package:", 8) == 0) {
      int any = 0;
      skip = 1;
      fieldcpy(cur_pkg, buf);
      for (i = 0; i < pkgc; i++) {
        if (!pkgs[i])
          continue;
        any = 1;
        if (strcmp(cur_pkg, pkgs[i]) == 0) {
          skip = 0;
          pkgs[i] = NULL;
          break;
        }
      }
      if (!any)
        break;
    } else if (!skip && (strncasecmp(buf, "Depends:", 8) == 0 ||
                         strncasecmp(buf, "Pre-Depends:", 12) == 0)) {
      char *pch;
      fieldcpy(cur_deps, buf);
      pch = cur_deps;
      while (1) {
        while (isspace(*pch))
          pch++;
        if (!*pch)
          break;
        while (*pch && *pch != '(' && *pch != '|' && *pch != ',' &&
               !isspace(*pch)) {
          fputc(*pch++, stdout);
        }
        fputc('\n', stdout);
        while (*pch && *pch++ != ',')
          (void)NULL;
      }
    }
  }
  fclose(f);
}


x86 assembly (clang, -O0):
<dogetdeps>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movb   $0x0,-0xbe0(%rbp)
movb   $0x0,-0x7f0(%rbp)
movl   $0x0,-0xf04(%rbp)
mov    -0xf04(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    121f <dogetdeps+0x6f>
mov    -0x10(%rbp),%rax
movslq -0xf04(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
movslq -0xf04(%rbp),%rax
mov    %rcx,-0xf00(%rbp,%rax,8)
ff
mov    -0xf04(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf04(%rbp)
jmp    11de <dogetdeps+0x2e>
mov    -0x8(%rbp),%rdi
lea    0xdd6(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0xf10(%rbp)
cmpq   $0x0,-0xf10(%rbp)
jne    1257 <dogetdeps+0xa7>
mov    -0x8(%rbp),%rdi
call   10b0 <perror@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
movl   $0x1,-0xf08(%rbp)
lea    -0x400(%rbp),%rdi
mov    -0xf10(%rbp),%rdx
mov    $0x3e8,%esi
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     15d5 <dogetdeps+0x425>
movsbl -0x400(%rbp),%eax
cmp    $0x0,%eax
je     12ce <dogetdeps+0x11e>
lea    -0x400(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x1,%eax
cltq
movsbl -0x400(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
jne    12ce <dogetdeps+0x11e>
lea    -0x400(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x400(%rbp,%rax,1)
lea    -0x400(%rbp),%rdi
lea    0xd26(%rip),%rsi
mov    $0x8,%edx
call   1090 <strncasecmp@plt>
cmp    $0x0,%rax
jne    13cc <dogetdeps+0x21c>
movl   $0x0,-0xf14(%rbp)
movl   $0x1,-0xf08(%rbp)
lea    -0x7f0(%rbp),%rdi
lea    -0x400(%rbp),%rsi
call   10d0 <fieldcpy@plt>
movl   $0x0,-0xf04(%rbp)
mov    -0xf04(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13b5 <dogetdeps+0x205>
movslq -0xf04(%rbp),%rax
cmpq   $0x0,-0xf00(%rbp,%rax,8)
jne    134b <dogetdeps+0x19b>
jmp    13a1 <dogetdeps+0x1f1>
movl   $0x1,-0xf14(%rbp)
lea    -0x7f0(%rbp),%rdi
movslq -0xf04(%rbp),%rax
mov    -0xf00(%rbp,%rax,8),%rsi
ff
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    139c <dogetdeps+0x1ec>
movl   $0x0,-0xf08(%rbp)
movslq -0xf04(%rbp),%rax
movq   $0x0,-0xf00(%rbp,%rax,8)
jmp    13b5 <dogetdeps+0x205>
jmp    13a1 <dogetdeps+0x1f1>
mov    -0xf04(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf04(%rbp)
jmp    1321 <dogetdeps+0x171>
cmpl   $0x0,-0xf14(%rbp)
jne    13c7 <dogetdeps+0x217>
jmp    15d5 <dogetdeps+0x425>
jmp    15d0 <dogetdeps+0x420>
cmpl   $0x0,-0xf08(%rbp)
jne    15cb <dogetdeps+0x41b>
lea    -0x400(%rbp),%rdi
lea    0xc28(%rip),%rsi
mov    $0x8,%edx
call   1090 <strncasecmp@plt>
cmp    $0x0,%rax
je     141d <dogetdeps+0x26d>
lea    -0x400(%rbp),%rdi
lea    0xc02(%rip),%rsi
mov    $0xc,%edx
call   1090 <strncasecmp@plt>
cmp    $0x0,%rax
jne    15cb <dogetdeps+0x41b>
lea    -0xbe0(%rbp),%rdi
lea    -0x400(%rbp),%rsi
call   10d0 <fieldcpy@plt>
lea    -0xbe0(%rbp),%rax
mov    %rax,-0xf20(%rbp)
jmp    1443 <dogetdeps+0x293>
mov    -0xf20(%rbp),%rax
movsbl (%rax),%edi
call   1050 <isspace@plt>
cmp    $0x0,%rax
je     1473 <dogetdeps+0x2c3>
mov    -0xf20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xf20(%rbp)
jmp    1443 <dogetdeps+0x293>
mov    -0xf20(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1488 <dogetdeps+0x2d8>
jmp    15c6 <dogetdeps+0x416>
jmp    148d <dogetdeps+0x2dd>
mov    -0xf20(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xf21(%rbp)
je     1517 <dogetdeps+0x367>
mov    -0xf20(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x28,%ecx
mov    %al,-0xf21(%rbp)
je     1517 <dogetdeps+0x367>
mov    -0xf20(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x7c,%ecx
mov    %al,-0xf21(%rbp)
je     1517 <dogetdeps+0x367>
mov    -0xf20(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2c,%ecx
mov    %al,-0xf21(%rbp)
je     1517 <dogetdeps+0x367>
mov    -0xf20(%rbp),%rax
movsbl (%rax),%edi
call   1050 <isspace@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
mov    %al,-0xf21(%rbp)
mov    -0xf21(%rbp),%al
test   $0x1,%al
jne    152a <dogetdeps+0x37a>
jmp    1557 <dogetdeps+0x3a7>
mov    -0xf20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0xf20(%rbp)
mov    (%rax),%al
mov    0x2a98(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1060 <fputc@plt>
jmp    148d <dogetdeps+0x2dd>
mov    0x2a82(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1060 <fputc@plt>
mov    -0xf20(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xf22(%rbp)
je     15a9 <dogetdeps+0x3f9>
mov    -0xf20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0xf20(%rbp)
movsbl (%rax),%eax
cmp    $0x2c,%eax
setne  %al
mov    %al,-0xf22(%rbp)
mov    -0xf22(%rbp),%al
test   $0x1,%al
jne    15bc <dogetdeps+0x40c>
jmp    15c1 <dogetdeps+0x411>
jmp    156a <dogetdeps+0x3ba>
jmp    143e <dogetdeps+0x28e>
jmp    15cb <dogetdeps+0x41b>
jmp    15d0 <dogetdeps+0x420>
jmp    1261 <dogetdeps+0xb1>
mov    -0xf10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0xf30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dogetdeps>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xef8,%rsp
mov    %rdi,%rbx
movb   $0x0,0xb10(%rsp)
movb   $0x0,0x720(%rsp)
mov    %edx,%r13d
mov    %edx,0xc(%rsp)
test   %edx,%edx
jle    1204 <dogetdeps+0x44>
lea    0x0(,%r13,8),%rdx
lea    0x400(%rsp),%rdi
call   1090 <memcpy@plt>
lea    0xdf5(%rip),%rsi
mov    %rbx,%rdi
call   10b0 <fopen@plt>
test   %rax,%rax
je     145e <dogetdeps+0x29e>
mov    %rax,%rbp
lea    0x10(%rsp),%rdi
mov    $0x3e8,%esi
mov    %rax,%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     1444 <dogetdeps+0x284>
mov    $0x1,%r12d
mov    0x2d99(%rip),%r14
movabs $0x110000000001,%r15
mov    %rbp,(%rsp)
jmp    128d <dogetdeps+0xcd>
nopw   0x0(%rax,%rax,1)
mov    $0x1,%r12d
test   %ecx,%ecx
mov    (%rsp),%rbp
je     1444 <dogetdeps+0x284>
lea    0x10(%rsp),%rdi
mov    $0x3e8,%esi
mov    %rbp,%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     1444 <dogetdeps+0x284>
cmpb   $0x0,0x10(%rsp)
lea    0x10(%rsp),%rdi
je     12bd <dogetdeps+0xfd>
call   1040 <strlen@plt>
lea    0x10(%rsp),%rdi
cltq
cmpb   $0xa,-0x1(%rax,%rdi,1)
jne    12bd <dogetdeps+0xfd>
call   1040 <strlen@plt>
lea    0x10(%rsp),%rdi
cltq
movb   $0x0,-0x1(%rax,%rdi,1)
mov    %rdi,%rbx
lea    0xd3b(%rip),%rsi
mov    $0x8,%edx
call   10a0 <strncasecmp@plt>
test   %rax,%rax
je     13d0 <dogetdeps+0x210>
test   %r12d,%r12d
mov    $0x1,%r12d
jne    1272 <dogetdeps+0xb2>
lea    0x10(%rsp),%rdi
lea    0xd1e(%rip),%rsi
mov    $0x8,%edx
call   10a0 <strncasecmp@plt>
test   %rax,%rax
je     1322 <dogetdeps+0x162>
lea    0x10(%rsp),%rdi
lea    0xcff(%rip),%rsi
mov    $0xc,%edx
call   10a0 <strncasecmp@plt>
xor    %r12d,%r12d
test   %rax,%rax
jne    1272 <dogetdeps+0xb2>
lea    0xb10(%rsp),%rbp
mov    %rbp,%rdi
lea    0x10(%rsp),%rsi
call   10e0 <fieldcpy@plt>
nopw   0x0(%rax,%rax,1)
mov    %rbp,%rbx
movsbl 0x0(%rbp),%edi
call   1050 <isspace@plt>
add    $0x1,%rbp
test   %rax,%rax
jne    1340 <dogetdeps+0x180>
mov    (%rbx),%al
test   %al,%al
je     1438 <dogetdeps+0x278>
nop
mov    %rbx,%rbp
cmp    $0x2c,%al
ja     1370 <dogetdeps+0x1b0>
movzbl %al,%ecx
bt     %rcx,%r15
jb     13a0 <dogetdeps+0x1e0>
cmp    $0x7c,%al
je     13a0 <dogetdeps+0x1e0>
movsbl %al,%edi
call   1050 <isspace@plt>
test   %rax,%rax
jne    13a0 <dogetdeps+0x1e0>
lea    0x1(%rbp),%rbx
movsbl 0x0(%rbp),%edi
mov    (%r14),%esi
call   1060 <fputc@plt>
movzbl 0x1(%rbp),%eax
jmp    1360 <dogetdeps+0x1a0>
nopw   0x0(%rax,%rax,1)
mov    (%r14),%esi
mov    $0xa,%edi
call   1060 <fputc@plt>
nopl   (%rax)
movzbl 0x0(%rbp),%eax
test   %al,%al
je     1340 <dogetdeps+0x180>
add    $0x1,%rbp
cmp    $0x2c,%al
jne    13b0 <dogetdeps+0x1f0>
jmp    1340 <dogetdeps+0x180>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x720(%rsp),%rdi
mov    %rbx,%rsi
call   10e0 <fieldcpy@plt>
cmpl   $0x0,0xc(%rsp)
jle    1444 <dogetdeps+0x284>
xor    %ebp,%ebp
xor    %ecx,%ecx
lea    0x720(%rsp),%rbx
jmp    140d <dogetdeps+0x24d>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbp
cmp    %rbp,%r13
je     1260 <dogetdeps+0xa0>
mov    0x400(%rsp,%rbp,8),%rsi
test   %rsi,%rsi
je     1400 <dogetdeps+0x240>
mov    %rbx,%rdi
call   1080 <strcmp@plt>
mov    $0x1,%ecx
test   %rax,%rax
jne    1400 <dogetdeps+0x240>
movq   $0x0,0x400(%rsp,%rbp,8)
xor    %r12d,%r12d
mov    (%rsp),%rbp
jmp    1272 <dogetdeps+0xb2>
mov    %rbp,%rdi
call   1030 <fclose@plt>
add    $0xef8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rbx,%rdi
call   10c0 <perror@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [9 x i8] c"Package:\00"
@.str.2 = [9 x i8] c"Depends:\00"
@.str.3 = [13 x i8] c"Pre-Depends:\00"
@stdout = global i32 0
define void @dogetdeps(i8* %0, i8** %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [1000 x i8]
%8 = alloca [1000 x i8]
%9 = alloca [1000 x i8]
%10 = alloca [100 x i8*]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i8*
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%16 = getelementptr inbounds [1000 x i8], [1000 x i8]* %9, i64 0, i64 0
store i8 0, i8* %16
%17 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
store i8 0, i8* %17
store i32 0, i32* %11
br label %18
18: ; preds = %31, %3
%19 = load i32, i32* %11
%20 = load i32, i32* %6
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %34
22: ; preds = %18
%23 = load i8**, i8*** %5
%24 = load i32, i32* %11
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %23, i64 %25
%27 = load i8*, i8** %26
%28 = load i32, i32* %11
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [100 x i8*], [100 x i8*]* %10, i64 0, i64 %29
store i8* %27, i8** %30
br label %31
31: ; preds = %22
%32 = load i32, i32* %11
%33 = add nsw i32 %32, 1
store i32 %33, i32* %11
br label %18
34: ; preds = %18
%35 = load i8*, i8** %4
%36 = call i32* @fopen(i8* %35, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %36, i32** %13
%37 = load i32*, i32** %13
%38 = icmp eq i32* %37, null
br i1 %38, label %39, label %43
39: ; preds = %34
%40 = load i8*, i8** %4
%41 = call i32 @perror(i8* %40)
%42 = call i32 @exit(i32 1)
unreachable
43: ; preds = %34
store i32 1, i32* %12
br label %44
44: ; preds = %194, %43
%45 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%46 = load i32*, i32** %13
%47 = call i64 @fgets(i8* %45, i32 1000, i32* %46)
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %195
49: ; preds = %44
%50 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %69
54: ; preds = %49
%55 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%56 = call i32 @strlen(i8* %55)
%57 = sub nsw i32 %56, 1
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 %58
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = icmp eq i32 %61, 10
br i1 %62, label %63, label %69
63: ; preds = %54
%64 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%65 = call i32 @strlen(i8* %64)
%66 = sub nsw i32 %65, 1
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 %67
store i8 0, i8* %68
br label %69
69: ; preds = %63, %54, %49
%70 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%71 = call i64 @strncasecmp(i8* %70, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 8)
%72 = icmp eq i64 %71, 0
br i1 %72, label %73, label %109
73: ; preds = %69
store i32 0, i32* %14
store i32 1, i32* %12
%74 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%75 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%76 = call i32 @fieldcpy(i8* %74, i8* %75)
store i32 0, i32* %11
br label %77
77: ; preds = %101, %73
%78 = load i32, i32* %11
%79 = load i32, i32* %6
%80 = icmp slt i32 %78, %79
br i1 %80, label %81, label %104
81: ; preds = %77
%82 = load i32, i32* %11
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [100 x i8*], [100 x i8*]* %10, i64 0, i64 %83
%85 = load i8*, i8** %84
%86 = icmp ne i8* %85, null
br i1 %86, label %88, label %87
87: ; preds = %81
br label %101
88: ; preds = %81
store i32 1, i32* %14
%89 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%90 = load i32, i32* %11
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [100 x i8*], [100 x i8*]* %10, i64 0, i64 %91
%93 = load i8*, i8** %92
%94 = call i64 @strcmp(i8* %89, i8* %93)
%95 = icmp eq i64 %94, 0
br i1 %95, label %96, label %100
96: ; preds = %88
store i32 0, i32* %12
%97 = load i32, i32* %11
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [100 x i8*], [100 x i8*]* %10, i64 0, i64 %98
store i8* null, i8** %99
br label %104
100: ; preds = %88
br label %101
101: ; preds = %100, %87
%102 = load i32, i32* %11
%103 = add nsw i32 %102, 1
store i32 %103, i32* %11
br label %77
104: ; preds = %96, %77
%105 = load i32, i32* %14
%106 = icmp ne i32 %105, 0
br i1 %106, label %108, label %107
107: ; preds = %104
br label %195
108: ; preds = %104
br label %194
109: ; preds = %69
%110 = load i32, i32* %12
%111 = icmp ne i32 %110, 0
br i1 %111, label %193, label %112
112: ; preds = %109
%113 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%114 = call i64 @strncasecmp(i8* %113, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 8)
%115 = icmp eq i64 %114, 0
br i1 %115, label %120, label %116
116: ; preds = %112
%117 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%118 = call i64 @strncasecmp(i8* %117, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 12)
%119 = icmp eq i64 %118, 0
br i1 %119, label %120, label %193
120: ; preds = %116, %112
%121 = getelementptr inbounds [1000 x i8], [1000 x i8]* %9, i64 0, i64 0
%122 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%123 = call i32 @fieldcpy(i8* %121, i8* %122)
%124 = getelementptr inbounds [1000 x i8], [1000 x i8]* %9, i64 0, i64 0
store i8* %124, i8** %15
br label %125
125: ; preds = %120, %191
br label %126
126: ; preds = %131, %125
%127 = load i8*, i8** %15
%128 = load i8, i8* %127
%129 = call i64 @isspace(i8 signext %128)
%130 = icmp ne i64 %129, 0
br i1 %130, label %131, label %134
131: ; preds = %126
%132 = load i8*, i8** %15
%133 = getelementptr inbounds i8, i8* %132, i32 1
store i8* %133, i8** %15
br label %126
134: ; preds = %126
%135 = load i8*, i8** %15
%136 = load i8, i8* %135
%137 = icmp ne i8 %136, 0
br i1 %137, label %139, label %138
138: ; preds = %134
br label %192
139: ; preds = %134
br label %140
140: ; preds = %168, %139
%141 = load i8*, i8** %15
%142 = load i8, i8* %141
%143 = sext i8 %142 to i32
%144 = icmp ne i32 %143, 0
br i1 %144, label %145, label %166
145: ; preds = %140
%146 = load i8*, i8** %15
%147 = load i8, i8* %146
%148 = sext i8 %147 to i32
%149 = icmp ne i32 %148, 40
br i1 %149, label %150, label %166
150: ; preds = %145
%151 = load i8*, i8** %15
%152 = load i8, i8* %151
%153 = sext i8 %152 to i32
%154 = icmp ne i32 %153, 124
br i1 %154, label %155, label %166
155: ; preds = %150
%156 = load i8*, i8** %15
%157 = load i8, i8* %156
%158 = sext i8 %157 to i32
%159 = icmp ne i32 %158, 44
br i1 %159, label %160, label %166
160: ; preds = %155
%161 = load i8*, i8** %15
%162 = load i8, i8* %161
%163 = call i64 @isspace(i8 signext %162)
%164 = icmp ne i64 %163, 0
%165 = xor i1 %164, true
br label %166
166: ; preds = %160, %155, %150, %145, %140
%167 = phi i1 [ false, %155 ], [ false, %150 ], [ false, %145 ], [ false, %140 ], [ %165, %160 ]
br i1 %167, label %168, label %174
168: ; preds = %166
%169 = load i8*, i8** %15
%170 = getelementptr inbounds i8, i8* %169, i32 1
store i8* %170, i8** %15
%171 = load i8, i8* %169
%172 = load i32, i32* @stdout
%173 = call i32 @fputc(i8 signext %171, i32 %172)
br label %140
174: ; preds = %166
%175 = load i32, i32* @stdout
%176 = call i32 @fputc(i8 signext 10, i32 %175)
br label %177
177: ; preds = %190, %174
%178 = load i8*, i8** %15
%179 = load i8, i8* %178
%180 = sext i8 %179 to i32
%181 = icmp ne i32 %180, 0
br i1 %181, label %182, label %188
182: ; preds = %177
%183 = load i8*, i8** %15
%184 = getelementptr inbounds i8, i8* %183, i32 1
store i8* %184, i8** %15
%185 = load i8, i8* %183
%186 = sext i8 %185 to i32
%187 = icmp ne i32 %186, 44
br label %188
188: ; preds = %182, %177
%189 = phi i1 [ false, %177 ], [ %187, %182 ]
br i1 %189, label %190, label %191
190: ; preds = %188
br label %177
191: ; preds = %188
br label %125
192: ; preds = %138
br label %193
193: ; preds = %192, %116, %109
br label %194
194: ; preds = %193, %108
br label %44
195: ; preds = %107, %44
%196 = load i32*, i32** %13
%197 = call i32 @fclose(i32* %196)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [9 x i8] c"Package:\00"
@.str.2 = [9 x i8] c"Depends:\00"
@.str.3 = [13 x i8] c"Pre-Depends:\00"
@stdout = global i32 0
define void @dogetdeps(i8* nocapture %0, i8** nocapture %1, i32 %2) {
%4 = alloca [1000 x i8]
%5 = alloca [1000 x i8]
%6 = alloca [1000 x i8]
%7 = alloca [100 x i8*]
%8 = bitcast [100 x i8*]* %7 to i8*
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%11 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
store i8 0, i8* %11
store i8 0, i8* %10
%12 = icmp sgt i32 %2, 0
br i1 %12, label %13, label %17
13: ; preds = %3
%14 = bitcast i8** %1 to i8*
%15 = zext i32 %2 to i64
%16 = shl nuw nsw i64 %15, 3
br label %17
17: ; preds = %13, %3
%18 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%19 = icmp eq i32* %18, null
br i1 %19, label %25, label %20
20: ; preds = %17
%21 = call i64 @fgets(i8* %9, i32 1000, i32* %18)
%22 = icmp eq i64 %21, 0
br i1 %22, label %114, label %23
23: ; preds = %20
%24 = zext i32 %2 to i64
br label %28
25: ; preds = %17
%26 = tail call i32 @perror(i8* %0)
%27 = tail call i32 @exit(i32 1)
unreachable
28: ; preds = %23, %110
%29 = phi i32 [ 1, %23 ], [ %111, %110 ]
%30 = load i8, i8* %9
%31 = icmp eq i8 %30, 0
br i1 %31, label %44, label %32
32: ; preds = %28
%33 = call i32 @strlen(i8* %9)
%34 = add nsw i32 %33, -1
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %35
%37 = load i8, i8* %36
%38 = icmp eq i8 %37, 10
br i1 %38, label %39, label %44
39: ; preds = %32
%40 = call i32 @strlen(i8* %9)
%41 = add nsw i32 %40, -1
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %42
store i8 0, i8* %43
br label %44
44: ; preds = %39, %32, %28
%45 = call i64 @strncasecmp(i8* %9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 8)
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %67
47: ; preds = %44
%48 = call i32 @fieldcpy(i8* %10, i8* %9)
br i1 %12, label %49, label %114
49: ; preds = %47, %61
%50 = phi i64 [ %63, %61 ], [ 0, %47 ]
%51 = phi i32 [ %62, %61 ], [ 0, %47 ]
%52 = getelementptr inbounds [100 x i8*], [100 x i8*]* %7, i64 0, i64 %50
%53 = load i8*, i8** %52
%54 = icmp eq i8* %53, null
br i1 %54, label %61, label %55
55: ; preds = %49
%56 = call i64 @strcmp(i8* %10, i8* %53)
%57 = icmp eq i64 %56, 0
br i1 %57, label %58, label %61
58: ; preds = %55
%59 = and i64 %50, 4294967295
%60 = getelementptr inbounds [100 x i8*], [100 x i8*]* %7, i64 0, i64 %59
store i8* null, i8** %60
br label %110
61: ; preds = %55, %49
%62 = phi i32 [ 1, %55 ], [ %51, %49 ]
%63 = add nuw nsw i64 %50, 1
%64 = icmp eq i64 %63, %24
br i1 %64, label %65, label %49
65: ; preds = %61
%66 = icmp eq i32 %62, 0
br i1 %66, label %114, label %110
67: ; preds = %44
%68 = icmp eq i32 %29, 0
br i1 %68, label %69, label %110
69: ; preds = %67
%70 = call i64 @strncasecmp(i8* %9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 8)
%71 = icmp eq i64 %70, 0
br i1 %71, label %75, label %72
72: ; preds = %69
%73 = call i64 @strncasecmp(i8* %9, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 12)
%74 = icmp eq i64 %73, 0
br i1 %74, label %75, label %110
75: ; preds = %72, %69
%76 = call i32 @fieldcpy(i8* %11, i8* %9)
br label %77
77: ; preds = %83, %75
%78 = phi i8* [ %11, %75 ], [ %84, %83 ]
%79 = load i8, i8* %78
%80 = call i64 @isspace(i8 signext %79)
%81 = icmp eq i64 %80, 0
%82 = getelementptr inbounds i8, i8* %78, i64 1
br i1 %81, label %85, label %83
83: ; preds = %107, %103, %77
%84 = phi i8* [ %82, %77 ], [ %104, %103 ], [ %108, %107 ]
br label %77
85: ; preds = %77
%86 = load i8, i8* %78
%87 = icmp eq i8 %86, 0
br i1 %87, label %110, label %88
88: ; preds = %85, %94
%89 = phi i8 [ %99, %94 ], [ %86, %85 ]
%90 = phi i8* [ %95, %94 ], [ %78, %85 ]
switch i8 %89, label %91 [
i8 0, label %100
i8 40, label %100
i8 124, label %100
i8 44, label %100
]
91: ; preds = %88
%92 = call i64 @isspace(i8 signext %89)
%93 = icmp eq i64 %92, 0
br i1 %93, label %94, label %100
94: ; preds = %91
%95 = getelementptr inbounds i8, i8* %90, i64 1
%96 = load i8, i8* %90
%97 = load i32, i32* @stdout
%98 = call i32 @fputc(i8 signext %96, i32 %97)
%99 = load i8, i8* %95
br label %88
100: ; preds = %88, %88, %88, %88, %91
%101 = load i32, i32* @stdout
%102 = call i32 @fputc(i8 signext 10, i32 %101)
br label %103
103: ; preds = %107, %100
%104 = phi i8* [ %90, %100 ], [ %108, %107 ]
%105 = load i8, i8* %104
%106 = icmp eq i8 %105, 0
br i1 %106, label %83, label %107
107: ; preds = %103
%108 = getelementptr inbounds i8, i8* %104, i64 1
%109 = icmp eq i8 %105, 44
br i1 %109, label %83, label %103
110: ; preds = %85, %58, %65, %67, %72
%111 = phi i32 [ 1, %65 ], [ 1, %67 ], [ 0, %72 ], [ 0, %58 ], [ 0, %85 ]
%112 = call i64 @fgets(i8* %9, i32 1000, i32* %18)
%113 = icmp eq i64 %112, 0
br i1 %113, label %114, label %28
114: ; preds = %47, %110, %65, %20
%115 = call i32 @fclose(i32* %18)
ret void
}