#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 */
int /*<<< orphan*/ printf(char *, ...);
void pipelineDumpCmds(char ***cmds) {
  char **cmd;
  int first = 1;
  while ((cmd = *cmds++) != NULL) {
    char *word;
    if (first)
      first = 0;
    else
      printf("| ");
    while ((word = *cmd++) != NULL)
      printf("%s ", word);
  }
  printf("<BR>\n");
}


x86 assembly (clang, -O0):
<pipelineDumpCmds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     11a8 <pipelineDumpCmds+0x98>
cmpl   $0x0,-0x14(%rbp)
je     1159 <pipelineDumpCmds+0x49>
movl   $0x0,-0x14(%rbp)
jmp    1167 <pipelineDumpCmds+0x57>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    116c <pipelineDumpCmds+0x5c>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     11a3 <pipelineDumpCmds+0x93>
mov    -0x20(%rbp),%rsi
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    116c <pipelineDumpCmds+0x5c>
jmp    1123 <pipelineDumpCmds+0x13>
lea    0xe58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pipelineDumpCmds>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    (%rdi),%rbx
test   %rbx,%rbx
je     1198 <pipelineDumpCmds+0x78>
mov    %rdi,%r15
lea    0xec6(%rip),%r14
lea    0xec2(%rip),%r12
xor    %eax,%eax
jmp    115a <pipelineDumpCmds+0x3a>
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15),%rbx
mov    $0x1,%al
test   %rbx,%rbx
je     1198 <pipelineDumpCmds+0x78>
test   $0x1,%al
je     1168 <pipelineDumpCmds+0x48>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x8,%r15
mov    (%rbx),%rsi
test   %rsi,%rsi
je     1150 <pipelineDumpCmds+0x30>
add    $0x8,%rbx
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1180 <pipelineDumpCmds+0x60>
jmp    1150 <pipelineDumpCmds+0x30>
lea    0xe68(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"| \00"
@.str.1 = [4 x i8] c"%s \00"
@.str.2 = [6 x i8] c"<BR>\0A\00"
define void @pipelineDumpCmds(i8*** %0) {
%2 = alloca i8***
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i8*
store i8*** %0, i8**** %2
store i32 1, i32* %4
br label %6
6: ; preds = %26, %1
%7 = load i8***, i8**** %2
%8 = getelementptr inbounds i8**, i8*** %7, i32 1
store i8*** %8, i8**** %2
%9 = load i8**, i8*** %7
store i8** %9, i8*** %3
%10 = icmp ne i8** %9, null
br i1 %10, label %11, label %27
11: ; preds = %6
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 0, i32* %4
br label %17
15: ; preds = %11
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %14
br label %18
18: ; preds = %23, %17
%19 = load i8**, i8*** %3
%20 = getelementptr inbounds i8*, i8** %19, i32 1
store i8** %20, i8*** %3
%21 = load i8*, i8** %19
store i8* %21, i8** %5
%22 = icmp ne i8* %21, null
br i1 %22, label %23, label %26
23: ; preds = %18
%24 = load i8*, i8** %5
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %24)
br label %18
26: ; preds = %18
br label %6
27: ; preds = %6
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"| \00"
@.str.1 = [4 x i8] c"%s \00"
@str = [5 x i8] c"<BR>\00"
define void @pipelineDumpCmds(i8*** nocapture %0) {
%2 = load i8**, i8*** %0
%3 = icmp eq i8** %2, null
br i1 %3, label %24, label %7
4: ; preds = %17, %14
%5 = load i8**, i8*** %11
%6 = icmp eq i8** %5, null
br i1 %6, label %24, label %7
7: ; preds = %1, %4
%8 = phi i8** [ %5, %4 ], [ %2, %1 ]
%9 = phi i8*** [ %11, %4 ], [ %0, %1 ]
%10 = phi i1 [ true, %4 ], [ false, %1 ]
%11 = getelementptr inbounds i8**, i8*** %9, i64 1
br i1 %10, label %12, label %14
12: ; preds = %7
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %7, %12
%15 = load i8*, i8** %8
%16 = icmp eq i8* %15, null
br i1 %16, label %4, label %17
17: ; preds = %14, %17
%18 = phi i8* [ %22, %17 ], [ %15, %14 ]
%19 = phi i8** [ %20, %17 ], [ %8, %14 ]
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %18)
%22 = load i8*, i8** %20
%23 = icmp eq i8* %22, null
br i1 %23, label %4, label %17
24: ; preds = %4, %1
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}