#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*/ sqlite3;
typedef int /*<<< orphan*/ sql;

/* Variables and functions */
int /*<<< orphan*/ quotecat(char *, char *, int, int);
int /*<<< orphan*/ safe_execute(int /*<<< orphan*/ *, char *);
char *strchr(char *, char);
int /*<<< orphan*/ strncat(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *strtok(char *, char *);
void parse_depends(sqlite3 *db, char *package, char *sep) {
  char *endcomma;
  char sql[200];
  sep = strtok(sep, " (");
  if ((endcomma = strchr(sep, ','))) {
    *endcomma = '\0';
    strncpy(sql, "INSERT INTO depends (package,depend,version) VALUES (",
            sizeof(sql) - 1);
    quotecat(sql, package, sizeof(sql), 1);
    quotecat(sql, sep, sizeof(sql), 1);
    strncat(sql, "'');", sizeof(sql) - 1);
    safe_execute(db, sql);
  } else {
    strncpy(sql, "INSERT INTO depends (package,depend,version) VALUES (",
            sizeof(sql) - 1);
    quotecat(sql, package, sizeof(sql), 1);
    quotecat(sql, sep, sizeof(sql), 1);
    strtok(NULL, " ");
    if ((sep = strtok(NULL, ")")) != NULL) {
      quotecat(sql, sep, sizeof(sql), 0);
      strncat(sql, ");", sizeof(sql) - 1);
      safe_execute(db, sql);
      strtok(NULL, " ");
    } else {
      strncat(sql, "'');", sizeof(sql) - 1);
      safe_execute(db, sql);
    }
  }
  while (sep != NULL) {
    sep = strtok(NULL, " (");
    if (sep == NULL)
      break;
    if ((endcomma = strchr(sep, ','))) {
      *endcomma = '\0';
      strncpy(sql, "INSERT INTO depends (package,depend,version) VALUES (",
              sizeof(sql) - 1);
      quotecat(sql, package, sizeof(sql), 1);
      quotecat(sql, sep, sizeof(sql), 1);
      strncat(sql, "'');", sizeof(sql) - 1);
      safe_execute(db, sql);
    } else {
      strncpy(sql, "INSERT INTO depends (package,depend,version) VALUES (",
              sizeof(sql) - 1);
      quotecat(sql, package, sizeof(sql), 1);
      quotecat(sql, sep, sizeof(sql), 1);
      strtok(NULL, " ");
      if ((sep = strtok(NULL, ")"))) {
        quotecat(sql, sep, sizeof(sql), 0);
        strncat(sql, ");", sizeof(sql) - 1);
        safe_execute(db, sql);
        sep = strtok(NULL, " ");
      } else {
        strncat(sql, "'');", sizeof(sql) - 1);
        safe_execute(db, sql);
      }
    }
  }
}


x86 assembly (clang, -O0):
<parse_depends>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xeb1(%rip),%rsi
call   1080 <strtok@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x2c,%esi
call   1050 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     1227 <parse_depends+0xc7>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
lea    -0xf0(%rbp),%rdi
lea    0xe44(%rip),%rsi
mov    $0xc7,%edx
call   1030 <strncpy@plt>
lea    -0xf0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
lea    -0xf0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
lea    -0xf0(%rbp),%rdi
lea    0xe2e(%rip),%rsi
mov    $0xc7,%edx
call   1060 <strncat@plt>
mov    -0x8(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
call   1070 <safe_execute@plt>
jmp    1322 <parse_depends+0x1c2>
lea    -0xf0(%rbp),%rdi
lea    0xdcb(%rip),%rsi
mov    $0xc7,%edx
call   1030 <strncpy@plt>
lea    -0xf0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
lea    -0xf0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xdbd(%rip),%rsi
call   1080 <strtok@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xdaf(%rip),%rsi
call   1080 <strtok@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     12f5 <parse_depends+0x195>
lea    -0xf0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0xc8,%edx
xor    %ecx,%ecx
call   1040 <quotecat@plt>
lea    -0xf0(%rbp),%rdi
lea    0xd72(%rip),%rsi
mov    $0xc7,%edx
call   1060 <strncat@plt>
mov    -0x8(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
call   1070 <safe_execute@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xd50(%rip),%rsi
call   1080 <strtok@plt>
jmp    131d <parse_depends+0x1bd>
lea    -0xf0(%rbp),%rdi
lea    0xd33(%rip),%rsi
mov    $0xc7,%edx
call   1060 <strncat@plt>
mov    -0x8(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
call   1070 <safe_execute@plt>
jmp    1322 <parse_depends+0x1c2>
jmp    1327 <parse_depends+0x1c7>
cmpq   $0x0,-0x18(%rbp)
je     14f6 <parse_depends+0x396>
xor    %eax,%eax
mov    %eax,%edi
lea    0xcf6(%rip),%rsi
call   1080 <strtok@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1356 <parse_depends+0x1f6>
jmp    14f6 <parse_depends+0x396>
mov    -0x18(%rbp),%rdi
mov    $0x2c,%esi
call   1050 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     13f2 <parse_depends+0x292>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
lea    -0xf0(%rbp),%rdi
lea    0xc79(%rip),%rsi
mov    $0xc7,%edx
call   1030 <strncpy@plt>
lea    -0xf0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
lea    -0xf0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
lea    -0xf0(%rbp),%rdi
lea    0xc63(%rip),%rsi
mov    $0xc7,%edx
call   1060 <strncat@plt>
mov    -0x8(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
call   1070 <safe_execute@plt>
jmp    14f1 <parse_depends+0x391>
lea    -0xf0(%rbp),%rdi
lea    0xc00(%rip),%rsi
mov    $0xc7,%edx
call   1030 <strncpy@plt>
lea    -0xf0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
lea    -0xf0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xbf2(%rip),%rsi
call   1080 <strtok@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xbe4(%rip),%rsi
call   1080 <strtok@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     14c4 <parse_depends+0x364>
lea    -0xf0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0xc8,%edx
xor    %ecx,%ecx
call   1040 <quotecat@plt>
lea    -0xf0(%rbp),%rdi
lea    0xba7(%rip),%rsi
mov    $0xc7,%edx
call   1060 <strncat@plt>
mov    -0x8(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
call   1070 <safe_execute@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xb85(%rip),%rsi
call   1080 <strtok@plt>
mov    %rax,-0x18(%rbp)
jmp    14ec <parse_depends+0x38c>
lea    -0xf0(%rbp),%rdi
lea    0xb64(%rip),%rsi
mov    $0xc7,%edx
call   1060 <strncat@plt>
mov    -0x8(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
call   1070 <safe_execute@plt>
jmp    14f1 <parse_depends+0x391>
jmp    1327 <parse_depends+0x1c7>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_depends>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %rsi,%r13
mov    %rdi,%r14
lea    0xeb5(%rip),%rsi
mov    %rdx,%rdi
call   1080 <strtok@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x2c,%esi
call   1050 <strchr@plt>
test   %rax,%rax
je     120c <parse_depends+0xac>
movb   $0x0,(%rax)
lea    0xe5b(%rip),%rsi
mov    %rsp,%rbp
mov    %rbp,%rdi
mov    $0xc7,%edx
call   1030 <strncpy@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
lea    0xe50(%rip),%rsi
mov    %rbp,%rdi
mov    $0xc7,%edx
call   1060 <strncat@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1070 <safe_execute@plt>
test   %rbx,%rbx
jne    12b4 <parse_depends+0x154>
jmp    1424 <parse_depends+0x2c4>
lea    0xded(%rip),%rsi
mov    %rsp,%rbp
mov    %rbp,%rdi
mov    $0xc7,%edx
call   1030 <strncpy@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
lea    0xde7(%rip),%rsi
xor    %edi,%edi
call   1080 <strtok@plt>
lea    0xddb(%rip),%rsi
xor    %edi,%edi
call   1080 <strtok@plt>
test   %rax,%rax
je     1402 <parse_depends+0x2a2>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
mov    $0xc8,%edx
xor    %ecx,%ecx
call   1040 <quotecat@plt>
lea    0xdaa(%rip),%rsi
mov    %rbx,%rdi
mov    $0xc7,%edx
call   1060 <strncat@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1070 <safe_execute@plt>
lea    0xd8e(%rip),%rsi
xor    %edi,%edi
call   1080 <strtok@plt>
lea    0xd78(%rip),%r15
lea    0xd3e(%rip),%r12
mov    %rsp,%rbx
jmp    1335 <parse_depends+0x1d5>
nopw   0x0(%rax,%rax,1)
movb   $0x0,(%rax)
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0xc7,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
mov    %rbx,%rdi
lea    0xd1f(%rip),%rsi
mov    $0xc7,%edx
call   1060 <strncat@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1070 <safe_execute@plt>
test   %rbp,%rbp
je     1424 <parse_depends+0x2c4>
xor    %edi,%edi
mov    %r15,%rsi
call   1080 <strtok@plt>
test   %rax,%rax
je     1424 <parse_depends+0x2c4>
mov    %rax,%rbp
mov    %rax,%rdi
mov    $0x2c,%esi
call   1050 <strchr@plt>
test   %rax,%rax
jne    12d0 <parse_depends+0x170>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0xc7,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0xc8,%edx
mov    $0x1,%ecx
call   1040 <quotecat@plt>
xor    %edi,%edi
lea    0xc97(%rip),%rbp
mov    %rbp,%rsi
call   1080 <strtok@plt>
xor    %edi,%edi
lea    0xc88(%rip),%rsi
call   1080 <strtok@plt>
test   %rax,%rax
je     1402 <parse_depends+0x2a2>
mov    %rbx,%rdi
mov    %rax,%rsi
mov    $0xc8,%edx
xor    %ecx,%ecx
call   1040 <quotecat@plt>
mov    %rbx,%rdi
lea    0xc5d(%rip),%rsi
mov    $0xc7,%edx
call   1060 <strncat@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1070 <safe_execute@plt>
xor    %edi,%edi
mov    %rbp,%rsi
call   1080 <strtok@plt>
mov    %rax,%rbp
jmp    132c <parse_depends+0x1cc>
lea    0xc2d(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xc7,%edx
call   1060 <strncat@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1070 <safe_execute@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c" (\00"
@.str.1 = [54 x i8] c"INSERT INTO depends (package,depend,version) VALUES (\00"
@.str.2 = [5 x i8] c"'');\00"
@.str.3 = [2 x i8] c" \00"
@.str.4 = [2 x i8] c")\00"
@.str.5 = [3 x i8] c");\00"
define void @parse_depends(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca [200 x i8]
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %6
%10 = call i8* @strtok(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %10, i8** %6
%11 = load i8*, i8** %6
%12 = call i8* @strchr(i8* %11, i8 signext 44)
store i8* %12, i8** %7
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %29
14: ; preds = %3
%15 = load i8*, i8** %7
store i8 0, i8* %15
%16 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%17 = call i32 @strncpy(i8* %16, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 199)
%18 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%19 = load i8*, i8** %5
%20 = call i32 @quotecat(i8* %18, i8* %19, i32 200, i32 1)
%21 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%22 = load i8*, i8** %6
%23 = call i32 @quotecat(i8* %21, i8* %22, i32 200, i32 1)
%24 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%25 = call i32 @strncat(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 199)
%26 = load i32*, i32** %4
%27 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%28 = call i32 @safe_execute(i32* %26, i8* %27)
br label %58
29: ; preds = %3
%30 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%31 = call i32 @strncpy(i8* %30, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 199)
%32 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%33 = load i8*, i8** %5
%34 = call i32 @quotecat(i8* %32, i8* %33, i32 200, i32 1)
%35 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%36 = load i8*, i8** %6
%37 = call i32 @quotecat(i8* %35, i8* %36, i32 200, i32 1)
%38 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%39 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i8* %39, i8** %6
%40 = icmp ne i8* %39, null
br i1 %40, label %41, label %51
41: ; preds = %29
%42 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%43 = load i8*, i8** %6
%44 = call i32 @quotecat(i8* %42, i8* %43, i32 200, i32 0)
%45 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%46 = call i32 @strncat(i8* %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 199)
%47 = load i32*, i32** %4
%48 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%49 = call i32 @safe_execute(i32* %47, i8* %48)
%50 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %57
51: ; preds = %29
%52 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%53 = call i32 @strncat(i8* %52, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 199)
%54 = load i32*, i32** %4
%55 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%56 = call i32 @safe_execute(i32* %54, i8* %55)
br label %57
57: ; preds = %51, %41
br label %58
58: ; preds = %57, %14
br label %59
59: ; preds = %115, %58
%60 = load i8*, i8** %6
%61 = icmp ne i8* %60, null
br i1 %61, label %62, label %116
62: ; preds = %59
%63 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %63, i8** %6
%64 = load i8*, i8** %6
%65 = icmp eq i8* %64, null
br i1 %65, label %66, label %67
66: ; preds = %62
br label %116
67: ; preds = %62
%68 = load i8*, i8** %6
%69 = call i8* @strchr(i8* %68, i8 signext 44)
store i8* %69, i8** %7
%70 = icmp ne i8* %69, null
br i1 %70, label %71, label %86
71: ; preds = %67
%72 = load i8*, i8** %7
store i8 0, i8* %72
%73 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%74 = call i32 @strncpy(i8* %73, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 199)
%75 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%76 = load i8*, i8** %5
%77 = call i32 @quotecat(i8* %75, i8* %76, i32 200, i32 1)
%78 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%79 = load i8*, i8** %6
%80 = call i32 @quotecat(i8* %78, i8* %79, i32 200, i32 1)
%81 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%82 = call i32 @strncat(i8* %81, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 199)
%83 = load i32*, i32** %4
%84 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%85 = call i32 @safe_execute(i32* %83, i8* %84)
br label %115
86: ; preds = %67
%87 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%88 = call i32 @strncpy(i8* %87, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 199)
%89 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%90 = load i8*, i8** %5
%91 = call i32 @quotecat(i8* %89, i8* %90, i32 200, i32 1)
%92 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%93 = load i8*, i8** %6
%94 = call i32 @quotecat(i8* %92, i8* %93, i32 200, i32 1)
%95 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%96 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i8* %96, i8** %6
%97 = icmp ne i8* %96, null
br i1 %97, label %98, label %108
98: ; preds = %86
%99 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%100 = load i8*, i8** %6
%101 = call i32 @quotecat(i8* %99, i8* %100, i32 200, i32 0)
%102 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%103 = call i32 @strncat(i8* %102, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 199)
%104 = load i32*, i32** %4
%105 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%106 = call i32 @safe_execute(i32* %104, i8* %105)
%107 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* %107, i8** %6
br label %114
108: ; preds = %86
%109 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%110 = call i32 @strncat(i8* %109, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 199)
%111 = load i32*, i32** %4
%112 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%113 = call i32 @safe_execute(i32* %111, i8* %112)
br label %114
114: ; preds = %108, %98
br label %115
115: ; preds = %114, %71
br label %59
116: ; preds = %66, %59
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c" (\00"
@.str.1 = [54 x i8] c"INSERT INTO depends (package,depend,version) VALUES (\00"
@.str.2 = [5 x i8] c"'');\00"
@.str.3 = [2 x i8] c" \00"
@.str.4 = [2 x i8] c")\00"
@.str.5 = [3 x i8] c");\00"
define void @parse_depends(i32* %0, i8* %1, i8* %2) {
%4 = alloca [200 x i8]
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%6 = tail call i8* @strtok(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = tail call i8* @strchr(i8* dereferenceable(1) %6, i8 signext 44)
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %21
9: ; preds = %3
%10 = call i32 @strncpy(i8* %5, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 199)
%11 = call i32 @quotecat(i8* %5, i8* %1, i32 200, i32 1)
%12 = call i32 @quotecat(i8* %5, i8* %6, i32 200, i32 1)
%13 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%14 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%15 = icmp eq i8* %14, null
br i1 %15, label %56, label %16
16: ; preds = %9
%17 = call i32 @quotecat(i8* %5, i8* %14, i32 200, i32 0)
%18 = call i32 @strncat(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 199)
%19 = call i32 @safe_execute(i32* %0, i8* %5)
%20 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %28
21: ; preds = %3
store i8 0, i8* %7
%22 = call i32 @strncpy(i8* %5, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 199)
%23 = call i32 @quotecat(i8* %5, i8* %1, i32 200, i32 1)
%24 = call i32 @quotecat(i8* %5, i8* %6, i32 200, i32 1)
%25 = call i32 @strncat(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 199)
%26 = call i32 @safe_execute(i32* %0, i8* %5)
%27 = icmp eq i8* %6, null
br i1 %27, label %59, label %28
28: ; preds = %16, %21
br label %29
29: ; preds = %28, %53
%30 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%31 = icmp eq i8* %30, null
br i1 %31, label %59, label %32
32: ; preds = %29
%33 = call i8* @strchr(i8* %30, i8 signext 44)
%34 = icmp eq i8* %33, null
br i1 %34, label %41, label %35
35: ; preds = %32
store i8 0, i8* %33
%36 = call i32 @strncpy(i8* %5, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 199)
%37 = call i32 @quotecat(i8* %5, i8* %1, i32 200, i32 1)
%38 = call i32 @quotecat(i8* %5, i8* %30, i32 200, i32 1)
%39 = call i32 @strncat(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 199)
%40 = call i32 @safe_execute(i32* %0, i8* %5)
br label %53
41: ; preds = %32
%42 = call i32 @strncpy(i8* %5, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 199)
%43 = call i32 @quotecat(i8* %5, i8* %1, i32 200, i32 1)
%44 = call i32 @quotecat(i8* %5, i8* %30, i32 200, i32 1)
%45 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%46 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%47 = icmp eq i8* %46, null
br i1 %47, label %56, label %48
48: ; preds = %41
%49 = call i32 @quotecat(i8* %5, i8* %46, i32 200, i32 0)
%50 = call i32 @strncat(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 199)
%51 = call i32 @safe_execute(i32* %0, i8* %5)
%52 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %53
53: ; preds = %48, %35
%54 = phi i8* [ %30, %35 ], [ %52, %48 ]
%55 = icmp eq i8* %54, null
br i1 %55, label %59, label %29
56: ; preds = %41, %9
%57 = call i32 @strncat(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 199)
%58 = call i32 @safe_execute(i32* %0, i8* %5)
br label %59
59: ; preds = %53, %29, %56, %21
ret void
}