#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*/ *strpbrk(char const *, char *);
scalar_t__ xmalloc(size_t);
char *xstrdup(char *);
char **prepare_spawn(char **argv) {
  size_t argc;
  char **new_argv;
  size_t i;
  for (argc = 0; argv[argc] != NULL; argc++)
    ;
  new_argv = ((char **)xmalloc((argc + 1) * sizeof(char *)));
  for (i = 0; i < argc; i++) {
    const char *string = argv[i];
    if (string[0] == '\0')
      new_argv[i] = xstrdup("\"\"");
    else if (strpbrk(string, "\"\\ "
                             "\001\002\003\004\005\006\007\010\011\012\013\014"
                             "\015\016\017\020\021\022\023\024\025\026\027\030"
                             "\031\032\033\034\035\036\037") != NULL) {
      int quote_around =
          (strpbrk(string, " \001\002\003\004\005\006\007\010\011\012\013\014"
                           "\015\016\017\020\021\022\023\024\025\026\027\030"
                           "\031\032\033\034\035\036\037") != NULL);
      size_t length;
      unsigned int backslashes;
      const char *s;
      char *quoted_string;
      char *p;
      length = 0;
      backslashes = 0;
      if (quote_around)
        length++;
      for (s = string; *s != '\0'; s++) {
        char c = *s;
        if (c == '"')
          length += backslashes + 1;
        length++;
        if (c == '\\')
          backslashes++;
        else
          backslashes = 0;
      }
      if (quote_around)
        length += backslashes + 1;
      quoted_string = ((char *)xmalloc((length + 1) * sizeof(char)));
      p = quoted_string;
      backslashes = 0;
      if (quote_around)
        *p++ = '"';
      for (s = string; *s != '\0'; s++) {
        char c = *s;
        if (c == '"') {
          unsigned int j;
          for (j = backslashes + 1; j > 0; j--)
            *p++ = '\\';
        }
        *p++ = c;
        if (c == '\\')
          backslashes++;
        else
          backslashes = 0;
      }
      if (quote_around) {
        unsigned int j;
        for (j = backslashes; j > 0; j--)
          *p++ = '\\';
        *p++ = '"';
      }
      *p = '\0';
      new_argv[i] = quoted_string;
    } else
      new_argv[i] = (char *)string;
  }
  new_argv[argc] = NULL;
  return new_argv;
}


x86 assembly (clang, -O0):
<prepare_spawn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     116d <prepare_spawn+0x3d>
jmp    115c <prepare_spawn+0x2c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1144 <prepare_spawn+0x14>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
shl    $0x3,%rdi
call   1030 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1457 <prepare_spawn+0x327>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    11d8 <prepare_spawn+0xa8>
lea    0xe41(%rip),%rdi
call   1040 <xstrdup@plt>
mov    %rax,%rdx
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
jmp    1441 <prepare_spawn+0x311>
mov    -0x28(%rbp),%rdi
lea    0xe20(%rip),%rsi
call   1050 <strpbrk@plt>
cmp    $0x0,%rax
je     142c <prepare_spawn+0x2fc>
mov    -0x28(%rbp),%rdi
lea    0xe08(%rip),%rsi
call   1050 <strpbrk@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x2c(%rbp)
movq   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1236 <prepare_spawn+0x106>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     12b8 <prepare_spawn+0x188>
mov    -0x48(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x59(%rbp)
movsbl -0x59(%rbp),%eax
cmp    $0x22,%eax
jne    1274 <prepare_spawn+0x144>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
add    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
movsbl -0x59(%rbp),%eax
cmp    $0x5c,%eax
jne    129b <prepare_spawn+0x16b>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12a2 <prepare_spawn+0x172>
movl   $0x0,-0x3c(%rbp)
jmp    12a7 <prepare_spawn+0x177>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    123e <prepare_spawn+0x10e>
cmpl   $0x0,-0x2c(%rbp)
je     12d2 <prepare_spawn+0x1a2>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
add    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
add    $0x1,%rdi
shl    $0x0,%rdi
call   1030 <xmalloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1312 <prepare_spawn+0x1e2>
mov    -0x58(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x58(%rbp)
movb   $0x22,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     13c4 <prepare_spawn+0x294>
mov    -0x48(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x5a(%rbp)
movsbl -0x5a(%rbp),%eax
cmp    $0x22,%eax
jne    1378 <prepare_spawn+0x248>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
cmpl   $0x0,-0x60(%rbp)
jbe    1373 <prepare_spawn+0x243>
mov    -0x58(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x58(%rbp)
movb   $0x5c,(%rax)
mov    -0x60(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x60(%rbp)
jmp    1349 <prepare_spawn+0x219>
jmp    1378 <prepare_spawn+0x248>
mov    -0x5a(%rbp),%cl
mov    -0x58(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x58(%rbp)
mov    %cl,(%rax)
movsbl -0x5a(%rbp),%eax
cmp    $0x5c,%eax
jne    13a7 <prepare_spawn+0x277>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    13ae <prepare_spawn+0x27e>
movl   $0x0,-0x3c(%rbp)
jmp    13b3 <prepare_spawn+0x283>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    131a <prepare_spawn+0x1ea>
cmpl   $0x0,-0x2c(%rbp)
je     1410 <prepare_spawn+0x2e0>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x64(%rbp)
cmpl   $0x0,-0x64(%rbp)
jbe    13fe <prepare_spawn+0x2ce>
mov    -0x58(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x58(%rbp)
movb   $0x5c,(%rax)
mov    -0x64(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x64(%rbp)
jmp    13d4 <prepare_spawn+0x2a4>
mov    -0x58(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x58(%rbp)
movb   $0x22,(%rax)
mov    -0x58(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x50(%rbp),%rdx
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
jmp    143c <prepare_spawn+0x30c>
mov    -0x28(%rbp),%rdx
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
jmp    1441 <prepare_spawn+0x311>
jmp    1446 <prepare_spawn+0x316>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    118a <prepare_spawn+0x5a>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prepare_spawn>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rdi,%rbx
mov    $0x1,%r13d
xor    %eax,%eax
nopl   0x0(%rax)
add    $0xffffffffffffffff,%r13
cmpq   $0x0,(%rbx,%rax,1)
lea    0x8(%rax),%rax
jne    1160 <prepare_spawn+0x20>
mov    %rax,0x18(%rsp)
mov    %rax,%rdi
call   1040 <xmalloc@plt>
mov    %rax,%r14
test   %r13,%r13
je     131d <prepare_spawn+0x1dd>
neg    %r13
xor    %r15d,%r15d
xor    %ebp,%ebp
mov    %rbx,(%rsp)
mov    %r13,0x28(%rsp)
mov    %r14,0x20(%rsp)
jmp    11c0 <prepare_spawn+0x80>
lea    0xe59(%rip),%rdi
call   1050 <xstrdup@plt>
mov    %rax,%r12
mov    %r12,(%r14,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r13
je     131d <prepare_spawn+0x1dd>
mov    (%rbx,%rbp,8),%r12
cmpb   $0x0,(%r12)
je     11a0 <prepare_spawn+0x60>
mov    %r12,%rdi
lea    0xe2e(%rip),%rsi
call   1060 <strpbrk@plt>
test   %rax,%rax
je     11af <prepare_spawn+0x6f>
mov    %r12,%rdi
lea    0xe1c(%rip),%rsi
call   1060 <strpbrk@plt>
xor    %esi,%esi
mov    %rax,0x10(%rsp)
test   %rax,%rax
setne  %sil
xor    %ecx,%ecx
mov    %r12,%rdx
jmp    1225 <prepare_spawn+0xe5>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%ecx
add    %rcx,%rsi
add    $0x1,%rsi
cmp    $0x5c,%bl
cmovne %r15d,%ecx
add    $0x1,%rdx
movzbl (%rdx),%ebx
cmp    $0x22,%bl
je     1210 <prepare_spawn+0xd0>
test   %bl,%bl
je     1240 <prepare_spawn+0x100>
add    $0x1,%ecx
jmp    1216 <prepare_spawn+0xd6>
cs nopw 0x0(%rax,%rax,1)
mov    %rbp,0x30(%rsp)
add    $0x1,%ecx
mov    0x10(%rsp),%rbx
test   %rbx,%rbx
cmove  %rbx,%rcx
lea    (%rsi,%rcx,1),%rdi
add    $0x1,%rdi
call   1040 <xmalloc@plt>
test   %rbx,%rbx
mov    %rax,0x8(%rsp)
je     1277 <prepare_spawn+0x137>
mov    %rax,%r13
add    $0x1,%r13
movb   $0x22,(%rax)
jmp    127a <prepare_spawn+0x13a>
mov    %rax,%r13
xor    %ebx,%ebx
jmp    12b2 <prepare_spawn+0x172>
xchg   %ax,%ax
mov    %ebx,%r14d
lea    0x1(%r14),%rdx
mov    %r13,%rdi
mov    $0x5c,%esi
call   1030 <memset@plt>
add    %r14,%r13
add    $0x1,%r13
add    $0x1,%ebx
mov    %bpl,0x0(%r13)
add    $0x1,%r13
cmp    $0x5c,%bpl
cmovne %r15d,%ebx
add    $0x1,%r12
movzbl (%r12),%ebp
cmp    $0x22,%bpl
je     1280 <prepare_spawn+0x140>
test   %bpl,%bpl
jne    129b <prepare_spawn+0x15b>
cmpq   $0x0,0x10(%rsp)
je     12fb <prepare_spawn+0x1bb>
test   %ebx,%ebx
mov    0x8(%rsp),%r12
je     12ec <prepare_spawn+0x1ac>
mov    %ebx,%edx
mov    %r13,%rdi
mov    $0x5c,%esi
call   1030 <memset@plt>
add    $0xffffffff,%ebx
add    %rbx,%r13
add    $0x1,%r13
mov    (%rsp),%rbx
movb   $0x22,0x0(%r13)
add    $0x1,%r13
jmp    1304 <prepare_spawn+0x1c4>
mov    (%rsp),%rbx
mov    0x8(%rsp),%r12
movb   $0x0,0x0(%r13)
mov    0x28(%rsp),%r13
mov    0x20(%rsp),%r14
mov    0x30(%rsp),%rbp
jmp    11af <prepare_spawn+0x6f>
mov    0x18(%rsp),%rax
movq   $0x0,-0x8(%r14,%rax,1)
mov    %r14,%rax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"\22\22\00"
@.str.1 = [35 x i8] c"\22\\ \01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F\00"
@.str.2 = [33 x i8] c" \01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F\00"
define i8** @prepare_spawn(i8** nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = shl i64 %3, 3
%10 = add i64 %9, 8
%11 = tail call i64 @xmalloc(i64 %10)
%12 = inttoptr i64 %11 to i8**
%13 = icmp eq i64 %3, 0
br i1 %13, label %96, label %14
14: ; preds = %8, %91
%15 = phi i64 [ %94, %91 ], [ 0, %8 ]
%16 = getelementptr inbounds i8*, i8** %0, i64 %15
%17 = load i8*, i8** %16
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %14
%21 = tail call i8* @xstrdup(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %91
22: ; preds = %14
%23 = tail call i32* @strpbrk(i8* %17, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp eq i32* %23, null
br i1 %24, label %91, label %25
25: ; preds = %22
%26 = tail call i32* @strpbrk(i8* %17, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%27 = icmp eq i32* %26, null
%28 = xor i1 %27, true
%29 = zext i1 %28 to i64
br label %30
30: ; preds = %41, %25
%31 = phi i32 [ 0, %25 ], [ %46, %41 ]
%32 = phi i8* [ %17, %25 ], [ %47, %41 ]
%33 = phi i64 [ %29, %25 ], [ %44, %41 ]
%34 = load i8, i8* %32
switch i8 %34, label %35 [
i8 0, label %48
i8 34, label %37
]
35: ; preds = %30
%36 = add i32 %31, 1
br label %41
37: ; preds = %30
%38 = add i32 %31, 1
%39 = zext i32 %38 to i64
%40 = add i64 %33, %39
br label %41
41: ; preds = %35, %37
%42 = phi i32 [ %36, %35 ], [ %38, %37 ]
%43 = phi i64 [ %33, %35 ], [ %40, %37 ]
%44 = add i64 %43, 1
%45 = icmp eq i8 %34, 92
%46 = select i1 %45, i32 %42, i32 0
%47 = getelementptr inbounds i8, i8* %32, i64 1
br label %30
48: ; preds = %30
%49 = add i32 %31, 1
%50 = zext i32 %49 to i64
%51 = select i1 %27, i64 0, i64 %50
%52 = add i64 %33, 1
%53 = add i64 %52, %51
%54 = tail call i64 @xmalloc(i64 %53)
%55 = inttoptr i64 %54 to i8*
br i1 %27, label %58, label %56
56: ; preds = %48
%57 = getelementptr inbounds i8, i8* %55, i64 1
store i8 34, i8* %55
br label %58
58: ; preds = %56, %48
%59 = phi i8* [ %55, %48 ], [ %57, %56 ]
br label %60
60: ; preds = %58, %70
%61 = phi i32 [ %75, %70 ], [ 0, %58 ]
%62 = phi i8* [ %76, %70 ], [ %17, %58 ]
%63 = phi i8* [ %73, %70 ], [ %59, %58 ]
%64 = load i8, i8* %62
switch i8 %64, label %70 [
i8 0, label %77
i8 34, label %65
]
65: ; preds = %60
%66 = zext i32 %61 to i64
%67 = add nuw nsw i64 %66, 1
%68 = getelementptr i8, i8* %63, i64 1
%69 = getelementptr i8, i8* %68, i64 %66
br label %70
70: ; preds = %60, %65
%71 = phi i8* [ %69, %65 ], [ %63, %60 ]
%72 = add nuw i32 %61, 1
%73 = getelementptr inbounds i8, i8* %71, i64 1
store i8 %64, i8* %71
%74 = icmp eq i8 %64, 92
%75 = select i1 %74, i32 %72, i32 0
%76 = getelementptr inbounds i8, i8* %62, i64 1
br label %60
77: ; preds = %60
br i1 %27, label %89, label %78
78: ; preds = %77
%79 = icmp eq i32 %61, 0
br i1 %79, label %86, label %80
80: ; preds = %78
%81 = zext i32 %61 to i64
%82 = add i32 %61, -1
%83 = zext i32 %82 to i64
%84 = getelementptr i8, i8* %63, i64 1
%85 = getelementptr i8, i8* %84, i64 %83
br label %86
86: ; preds = %80, %78
%87 = phi i8* [ %63, %78 ], [ %85, %80 ]
%88 = getelementptr inbounds i8, i8* %87, i64 1
store i8 34, i8* %87
br label %89
89: ; preds = %86, %77
%90 = phi i8* [ %88, %86 ], [ %63, %77 ]
store i8 0, i8* %90
br label %91
91: ; preds = %22, %89, %20
%92 = phi i8* [ %55, %89 ], [ %21, %20 ], [ %17, %22 ]
%93 = getelementptr inbounds i8*, i8** %12, i64 %15
store i8* %92, i8** %93
%94 = add nuw i64 %15, 1
%95 = icmp eq i64 %94, %3
br i1 %95, label %96, label %14
96: ; preds = %91, %8
%97 = getelementptr inbounds i8*, i8** %12, i64 %3
store i8* null, i8** %97
ret i8** %12
}