int execute(char *line) {
  int pfd_out[2];
  int pfd_in;
  char **commands = splitstr(line, "|");
  char **command_ptr = commands;
  pfd_in = 0;
  while (*command_ptr != 0x0) {
    if (*(command_ptr + 1) == 0x0) {
      pfd_out[1] = 1;
    } else {
      pipe(pfd_out);
    }
    _execute_1(*command_ptr, pfd_in, pfd_out);
    command_ptr += 1;
    pfd_in = pfd_out[0];
  }
  freestrarr(commands, 1);
  return 0;
}


x86 assembly (clang, -O0):
<execute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea9(%rip),%rsi
mov    $0x0,%al
call   1030 <splitstr@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x28(%rbp),%rax
cmpq   $0x0,(%rax)
je     11d3 <execute+0x93>
mov    -0x28(%rbp),%rax
cmpq   $0x0,0x8(%rax)
jne    119c <execute+0x5c>
movl   $0x1,-0xc(%rbp)
jmp    11a7 <execute+0x67>
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1050 <pipe@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
mov    -0x14(%rbp),%esi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1040 <_execute_1@plt>
mov    -0x28(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1173 <execute+0x33>
mov    -0x20(%rbp),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1060 <freestrarr@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xeb2(%rip),%rsi
xor    %eax,%eax
call   1030 <splitstr@plt>
movslq %eax,%r14
mov    (%r14),%rdi
test   %rdi,%rdi
je     11a9 <execute+0x69>
lea    0x8(%r14),%rbx
mov    %rsp,%r15
xor    %ebp,%ebp
jmp    1199 <execute+0x59>
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <pipe@plt>
mov    -0x8(%rbx),%rdi
mov    %ebp,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <_execute_1@plt>
mov    (%rsp),%ebp
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
je     11a9 <execute+0x69>
cmpq   $0x0,(%rbx)
jne    1170 <execute+0x30>
movl   $0x1,0x4(%rsp)
jmp    117e <execute+0x3e>
mov    %r14,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1060 <freestrarr@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"|\00"
define i32 @execute(i8* %0) {
%2 = alloca i8*
%3 = alloca [2 x i32]
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @splitstr to i32 (i8*, i8*, ...)*)(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i8**
store i8** %10, i8*** %5
%11 = load i8**, i8*** %5
store i8** %11, i8*** %6
store i32 0, i32* %4
br label %12
12: ; preds = %26, %1
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %36
16: ; preds = %12
%17 = load i8**, i8*** %6
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = icmp eq i8* %19, null
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
store i32 1, i32* %22
br label %26
23: ; preds = %16
%24 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%25 = call i32 (i32*, ...) bitcast (i32 (...)* @pipe to i32 (i32*, ...)*)(i32* %24)
br label %26
26: ; preds = %23, %21
%27 = load i8**, i8*** %6
%28 = load i8*, i8** %27
%29 = load i32, i32* %4
%30 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%31 = call i32 (i8*, i32, i32*, ...) bitcast (i32 (...)* @_execute_1 to i32 (i8*, i32, i32*, ...)*)(i8* %28, i32 %29, i32* %30)
%32 = load i8**, i8*** %6
%33 = getelementptr inbounds i8*, i8** %32, i64 1
store i8** %33, i8*** %6
%34 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%35 = load i32, i32* %34
store i32 %35, i32* %4
br label %12
36: ; preds = %12
%37 = load i8**, i8*** %5
%38 = call i32 (i8**, i32, ...) bitcast (i32 (...)* @freestrarr to i32 (i8**, i32, ...)*)(i8** %37, i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"|\00"
define i32 @execute(i8* %0) {
%2 = alloca [2 x i32]
%3 = bitcast [2 x i32]* %2 to i8*
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @splitstr to i32 (i8*, i8*, ...)*)(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8**
%7 = load i8*, i8** %6
%8 = icmp eq i8* %7, null
br i1 %8, label %29, label %9
9: ; preds = %1
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
br label %12
12: ; preds = %9, %23
%13 = phi i8* [ %7, %9 ], [ %27, %23 ]
%14 = phi i8** [ %6, %9 ], [ %16, %23 ]
%15 = phi i32 [ 0, %9 ], [ %26, %23 ]
%16 = getelementptr inbounds i8*, i8** %14, i64 1
%17 = load i8*, i8** %16
%18 = icmp eq i8* %17, null
br i1 %18, label %19, label %20
19: ; preds = %12
store i32 1, i32* %11
br label %23
20: ; preds = %12
%21 = call i32 (i32*, ...) bitcast (i32 (...)* @pipe to i32 (i32*, ...)*)(i32* %10)
%22 = load i8*, i8** %14
br label %23
23: ; preds = %20, %19
%24 = phi i8* [ %22, %20 ], [ %13, %19 ]
%25 = call i32 (i8*, i32, i32*, ...) bitcast (i32 (...)* @_execute_1 to i32 (i8*, i32, i32*, ...)*)(i8* %24, i32 %15, i32* %10)
%26 = load i32, i32* %10
%27 = load i8*, i8** %16
%28 = icmp eq i8* %27, null
br i1 %28, label %29, label %12
29: ; preds = %23, %1
%30 = call i32 (i8**, i32, ...) bitcast (i32 (...)* @freestrarr to i32 (i8**, i32, ...)*)(i8** %6, i32 1)
ret i32 0
}