#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 */

/* Variables and functions */
char *strdup(char const *);
char **split_dependency_line(const char *dependsstr) {
  static char *dependsvec[64];
  char *p;
  int i = 0;
  dependsvec[0] = 0;
  if (dependsstr != 0) {
    p = strdup(dependsstr);
    while (*p != 0 && *p != '\n') {
      if (*p != ' ') {
        if (*p == ',') {
          *p = 0;
          dependsvec[++i] = 0;
        } else if (dependsvec[i] == 0)
          dependsvec[i] = p;
      } else
        *p = 0;
      p++;
    }
    *p = 0;
  }
  dependsvec[i + 1] = 0;
  return dependsvec;
}


x86 assembly (clang, -O0):
<split_dependency_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x0,0x2f12(%rip)
cmpq   $0x0,-0x8(%rbp)
je     1214 <split_dependency_line+0x104>
mov    -0x8(%rbp),%rdi
call   1030 <strdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x15(%rbp)
je     116b <split_dependency_line+0x5b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    117b <split_dependency_line+0x6b>
jmp    120d <split_dependency_line+0xfd>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     11f5 <split_dependency_line+0xe5>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2c,%eax
jne    11c2 <split_dependency_line+0xb2>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
movslq %eax,%rcx
lea    0x2e8b(%rip),%rax
movq   $0x0,(%rax,%rcx,8)
jmp    11f0 <split_dependency_line+0xe0>
movslq -0x14(%rbp),%rcx
lea    0x2e73(%rip),%rax
cmpq   $0x0,(%rax,%rcx,8)
jne    11eb <split_dependency_line+0xdb>
mov    -0x10(%rbp),%rdx
movslq -0x14(%rbp),%rcx
lea    0x2e59(%rip),%rax
mov    %rdx,(%rax,%rcx,8)
jmp    11f0 <split_dependency_line+0xe0>
jmp    11fc <split_dependency_line+0xec>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1146 <split_dependency_line+0x36>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rcx
lea    0x2e1c(%rip),%rax
movq   $0x0,(%rax,%rcx,8)
lea    0x2e0d(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<split_dependency_line>:
push   %rax
movq   $0x0,0x2f24(%rip)
test   %rdi,%rdi
je     1193 <split_dependency_line+0x83>
call   1030 <strdup@plt>
xor    %ecx,%ecx
lea    0x2f11(%rip),%rsi
jmp    114c <split_dependency_line+0x3c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    $0x20,%dl
jne    1171 <split_dependency_line+0x61>
movb   $0x0,(%rax)
add    $0x1,%rax
movzbl (%rax),%edx
cmp    $0x2b,%dl
jle    1140 <split_dependency_line+0x30>
cmp    $0x2c,%dl
jne    117a <split_dependency_line+0x6a>
movb   $0x0,(%rax)
movslq %ecx,%rdx
add    $0x1,%ecx
movq   $0x0,0x8(%rsi,%rdx,8)
add    $0x1,%rax
jmp    114c <split_dependency_line+0x3c>
test   %dl,%dl
je     118e <split_dependency_line+0x7e>
cmp    $0xa,%dl
je     118e <split_dependency_line+0x7e>
movslq %ecx,%rdx
cmpq   $0x0,(%rsi,%rdx,8)
jne    1148 <split_dependency_line+0x38>
mov    %rax,(%rsi,%rdx,8)
add    $0x1,%rax
jmp    114c <split_dependency_line+0x3c>
movb   $0x0,(%rax)
jmp    1195 <split_dependency_line+0x85>
xor    %ecx,%ecx
movslq %ecx,%rcx
lea    0x2ea1(%rip),%rax
movq   $0x0,0x8(%rax,%rcx,8)
pop    %rcx
ret

LLVM IR (-O0):
@split_dependency_line.dependsvec = internal global [64 x i8*] zeroinitializer
define i8** @split_dependency_line(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
store i8* null, i8** getelementptr inbounds ([64 x i8*], [64 x i8*]* @split_dependency_line.dependsvec, i64 0, i64 0)
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %58
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i8* @strdup(i8* %8)
store i8* %9, i8** %3
br label %10
10: ; preds = %53, %7
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %20
15: ; preds = %10
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 10
br label %20
20: ; preds = %15, %10
%21 = phi i1 [ false, %10 ], [ %19, %15 ]
br i1 %21, label %22, label %56
22: ; preds = %20
%23 = load i8*, i8** %3
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 32
br i1 %26, label %27, label %51
27: ; preds = %22
%28 = load i8*, i8** %3
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 44
br i1 %31, label %32, label %38
32: ; preds = %27
%33 = load i8*, i8** %3
store i8 0, i8* %33
%34 = load i32, i32* %4
%35 = add nsw i32 %34, 1
store i32 %35, i32* %4
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [64 x i8*], [64 x i8*]* @split_dependency_line.dependsvec, i64 0, i64 %36
store i8* null, i8** %37
br label %50
38: ; preds = %27
%39 = load i32, i32* %4
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [64 x i8*], [64 x i8*]* @split_dependency_line.dependsvec, i64 0, i64 %40
%42 = load i8*, i8** %41
%43 = icmp eq i8* %42, null
br i1 %43, label %44, label %49
44: ; preds = %38
%45 = load i8*, i8** %3
%46 = load i32, i32* %4
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [64 x i8*], [64 x i8*]* @split_dependency_line.dependsvec, i64 0, i64 %47
store i8* %45, i8** %48
br label %49
49: ; preds = %44, %38
br label %50
50: ; preds = %49, %32
br label %53
51: ; preds = %22
%52 = load i8*, i8** %3
store i8 0, i8* %52
br label %53
53: ; preds = %51, %50
%54 = load i8*, i8** %3
%55 = getelementptr inbounds i8, i8* %54, i32 1
store i8* %55, i8** %3
br label %10
56: ; preds = %20
%57 = load i8*, i8** %3
store i8 0, i8* %57
br label %58
58: ; preds = %56, %1
%59 = load i32, i32* %4
%60 = add nsw i32 %59, 1
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [64 x i8*], [64 x i8*]* @split_dependency_line.dependsvec, i64 0, i64 %61
store i8* null, i8** %62
ret i8** getelementptr inbounds ([64 x i8*], [64 x i8*]* @split_dependency_line.dependsvec, i64 0, i64 0)
}

LLVM IR (-O2):
@split_dependency_line.dependsvec = internal global [64 x i8*] zeroinitializer
define i8** @split_dependency_line(i8* %0) {
store i8* null, i8** getelementptr inbounds ([64 x i8*], [64 x i8*]* @split_dependency_line.dependsvec, i64 0, i64 0)
%2 = icmp eq i8* %0, null
br i1 %2, label %24, label %3
3: ; preds = %1
%4 = tail call i8* @strdup(i8* %0)
br label %5
5: ; preds = %20, %3
%6 = phi i8* [ %4, %3 ], [ %22, %20 ]
%7 = phi i32 [ 0, %3 ], [ %21, %20 ]
%8 = load i8, i8* %6
switch i8 %8, label %13 [
i8 0, label %23
i8 10, label %23
i8 32, label %19
i8 44, label %9
]
9: ; preds = %5
store i8 0, i8* %6
%10 = add nsw i32 %7, 1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [64 x i8*], [64 x i8*]* @split_dependency_line.dependsvec, i64 0, i64 %11
store i8* null, i8** %12
br label %20
13: ; preds = %5
%14 = sext i32 %7 to i64
%15 = getelementptr inbounds [64 x i8*], [64 x i8*]* @split_dependency_line.dependsvec, i64 0, i64 %14
%16 = load i8*, i8** %15
%17 = icmp eq i8* %16, null
br i1 %17, label %18, label %20
18: ; preds = %13
store i8* %6, i8** %15
br label %20
19: ; preds = %5
store i8 0, i8* %6
br label %20
20: ; preds = %9, %18, %13, %19
%21 = phi i32 [ %10, %9 ], [ %7, %18 ], [ %7, %13 ], [ %7, %19 ]
%22 = getelementptr inbounds i8, i8* %6, i64 1
br label %5
23: ; preds = %5, %5
store i8 0, i8* %6
br label %24
24: ; preds = %23, %1
%25 = phi i32 [ %7, %23 ], [ 0, %1 ]
%26 = add nsw i32 %25, 1
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [64 x i8*], [64 x i8*]* @split_dependency_line.dependsvec, i64 0, i64 %27
store i8* null, i8** %28
ret i8** getelementptr inbounds ([64 x i8*], [64 x i8*]* @split_dependency_line.dependsvec, i64 0, i64 0)
}