#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*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ remove(char *);
int /*<<< orphan*/ stderr;
char *strchr(char *, char);
scalar_t__ strcmp(char *, char *);
int strlen(char *);
int /*<<< orphan*/ strncat(char *, char *, int);
int system(char *);
int main(int argc, char *argv[]) {
  char buf[256] = "";
  FILE *f = NULL;
  int flip_slashes = 0;
  int ret, i, j;
  char *p;
  if (argc < 2) {
    printf("Usage: runner program args\n");
    return 1;
  }
  for (i = 1; i < argc; i++) {
    if ((strcmp(argv[i], "\\") == 0) || (strcmp(argv[i], "\\\\") == 0)) {
      flip_slashes = 1;
    } else if (strcmp(argv[i], "@") == 0) {
      if (!f) {
        f = fopen("_tmpfile.arg", "w");
        if (!f) {
          printf("runner: Error writing _tmpfile.arg\n");
          return 1;
        }
      }
    } else if (f) {
      if (flip_slashes) {
        for (j = 0; argv[i][j]; j++) {
          if (argv[i][j] == '/')
            fputc('\\', f);
          else
            fputc(argv[i][j], f);
        }
        fputc('\n', f);
      } else
        fprintf(f, "%s\n", argv[i]);
    } else {
      if (buf[0])
        strncat(buf, " ", sizeof(buf) - 1);
      if (flip_slashes) {
        j = strlen(buf);
        strncat(buf, argv[i], sizeof(buf) - 1);
        while (buf[j]) {
          if (buf[j] == '/')
            buf[j] = '\\';
          j++;
        }
      } else
        strncat(buf, argv[i], sizeof(buf) - 1);
    }
  }
  if (f) {
    fclose(f);
    strncat(buf, " @_tmpfile.arg", sizeof(buf) - 1);
  }
  p = strchr(buf, ' ');
  if (p) {
    if (strlen(p) >= 126) {
      fprintf(stderr,
              "runner: oops: command line is longer than 126 characters!\n");
      remove("_tmpfile.arg");
      return 1;
    }
  }
  ret = system(buf);
  remove("_tmpfile.arg");
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1090 <memset@plt>
movq   $0x0,-0x118(%rbp)
movl   $0x0,-0x11c(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1223 <main+0x63>
lea    0xdee(%rip),%rdi
call   1080 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15db <main+0x41b>
movl   $0x1,-0x124(%rbp)
mov    -0x124(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1513 <main+0x353>
mov    -0x10(%rbp),%rax
movslq -0x124(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdcb(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%rax
je     1286 <main+0xc6>
mov    -0x10(%rbp),%rax
movslq -0x124(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xda5(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%rax
jne    1295 <main+0xd5>
movl   $0x1,-0x11c(%rbp)
jmp    14fa <main+0x33a>
mov    -0x10(%rbp),%rax
movslq -0x124(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd74(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%rax
jne    1312 <main+0x152>
cmpq   $0x0,-0x118(%rbp)
jne    130d <main+0x14d>
lea    0xd80(%rip),%rdi
lea    0xd4b(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,-0x118(%rbp)
cmpq   $0x0,-0x118(%rbp)
jne    1308 <main+0x148>
lea    0xd2c(%rip),%rdi
call   1080 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15db <main+0x41b>
jmp    130d <main+0x14d>
jmp    14f5 <main+0x335>
cmpq   $0x0,-0x118(%rbp)
je     1412 <main+0x252>
cmpl   $0x0,-0x11c(%rbp)
je     13e7 <main+0x227>
movl   $0x0,-0x128(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x124(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x128(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     13d1 <main+0x211>
mov    -0x10(%rbp),%rax
movslq -0x124(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x128(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
jne    1390 <main+0x1d0>
mov    -0x118(%rbp),%rsi
mov    $0x5c,%edi
call   10b0 <fputc@plt>
jmp    13b8 <main+0x1f8>
mov    -0x10(%rbp),%rax
movslq -0x124(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x128(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x118(%rbp),%rsi
movsbl %al,%edi
call   10b0 <fputc@plt>
jmp    13bd <main+0x1fd>
mov    -0x128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x128(%rbp)
jmp    1337 <main+0x177>
mov    -0x118(%rbp),%rsi
mov    $0xa,%edi
call   10b0 <fputc@plt>
jmp    140d <main+0x24d>
mov    -0x118(%rbp),%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rax
movslq -0x124(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xc41(%rip),%rsi
mov    $0x0,%al
call   10d0 <fprintf@plt>
jmp    14f0 <main+0x330>
cmpb   $0x0,-0x110(%rbp)
je     1437 <main+0x277>
lea    -0x110(%rbp),%rdi
lea    0xc1e(%rip),%rsi
mov    $0xff,%edx
call   10a0 <strncat@plt>
cmpl   $0x0,-0x11c(%rbp)
je     14cb <main+0x30b>
lea    -0x110(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x128(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x124(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    $0xff,%edx
call   10a0 <strncat@plt>
movslq -0x128(%rbp),%rax
cmpb   $0x0,-0x110(%rbp,%rax,1)
je     14c6 <main+0x306>
movslq -0x128(%rbp),%rax
movsbl -0x110(%rbp,%rax,1),%eax
ff
cmp    $0x2f,%eax
jne    14b2 <main+0x2f2>
movslq -0x128(%rbp),%rax
movb   $0x5c,-0x110(%rbp,%rax,1)
5c
mov    -0x128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x128(%rbp)
jmp    1476 <main+0x2b6>
jmp    14eb <main+0x32b>
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x124(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    $0xff,%edx
call   10a0 <strncat@plt>
jmp    14f0 <main+0x330>
jmp    14f5 <main+0x335>
jmp    14fa <main+0x33a>
jmp    14ff <main+0x33f>
mov    -0x124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
jmp    122d <main+0x6d>
cmpq   $0x0,-0x118(%rbp)
je     1545 <main+0x385>
mov    -0x118(%rbp),%rdi
call   1040 <fclose@plt>
lea    -0x110(%rbp),%rdi
lea    0xb12(%rip),%rsi
mov    $0xff,%edx
call   10a0 <strncat@plt>
lea    -0x110(%rbp),%rdi
mov    $0x20,%esi
call   1070 <strchr@plt>
mov    %rax,-0x130(%rbp)
cmpq   $0x0,-0x130(%rbp)
je     15b4 <main+0x3f4>
mov    -0x130(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x7e,%eax
jl     15af <main+0x3ef>
mov    0x2a59(%rip),%rax
mov    (%rax),%edi
lea    0xacc(%rip),%rsi
mov    $0x0,%al
call   10d0 <fprintf@plt>
lea    0xab1(%rip),%rdi
call   1030 <remove@plt>
movl   $0x1,-0x4(%rbp)
jmp    15db <main+0x41b>
jmp    15b4 <main+0x3f4>
lea    -0x110(%rbp),%rdi
call   1060 <system@plt>
mov    %eax,-0x120(%rbp)
lea    0xa82(%rip),%rdi
call   1030 <remove@plt>
mov    -0x120(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x108,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
cmp    $0x2,%edi
jge    1246 <main+0x96>
lea    0xe43(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%ebx
jmp    1452 <main+0x2a2>
mov    %rsi,%r14
mov    %edi,%r13d
xor    %ebp,%ebp
mov    $0x1,%r12d
lea    0xda6(%rip),%rbx
xor    %r15d,%r15d
jmp    1273 <main+0xc3>
mov    $0x1,%r15d
add    $0x1,%r12
cmp    %r13,%r12
je     13d2 <main+0x222>
mov    (%r14,%r12,8),%rdi
mov    %rbx,%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
je     1260 <main+0xb0>
mov    (%r14,%r12,8),%rdi
lea    0xd71(%rip),%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
je     1260 <main+0xb0>
mov    (%r14,%r12,8),%rdi
lea    0xd5f(%rip),%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
je     12e5 <main+0x135>
test   %rbp,%rbp
je     1331 <main+0x181>
test   %r15d,%r15d
je     139b <main+0x1eb>
xor    %ebx,%ebx
jmp    12cf <main+0x11f>
movsbl %cl,%edi
mov    %rbp,%rsi
call   10a0 <fputc@plt>
add    $0x1,%rbx
mov    (%r14,%r12,8),%rax
movzbl (%rax,%rbx,1),%eax
mov    $0x5c,%cl
cmp    $0x2f,%al
je     12c0 <main+0x110>
test   %al,%al
je     1312 <main+0x162>
mov    %eax,%ecx
jmp    12c0 <main+0x110>
test   %rbp,%rbp
jne    1266 <main+0xb6>
lea    0xd78(%rip),%rdi
lea    0xd09(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    1266 <main+0xb6>
jmp    1466 <main+0x2b6>
mov    $0xa,%edi
mov    %rbp,%rsi
call   10a0 <fputc@plt>
mov    $0x1,%r15d
lea    0xcd5(%rip),%rbx
jmp    1266 <main+0xb6>
cmpb   $0x0,(%rsp)
je     134b <main+0x19b>
mov    %rsp,%rdi
lea    0xcca(%rip),%rsi
mov    $0xff,%edx
call   1090 <strncat@plt>
test   %r15d,%r15d
je     13b7 <main+0x207>
mov    %rsp,%r15
mov    %r15,%rdi
call   1060 <strlen@plt>
mov    %eax,%ebp
mov    (%r14,%r12,8),%rsi
mov    %r15,%rdi
mov    $0xff,%edx
call   1090 <strncat@plt>
movslq %ebp,%rax
add    %rsp,%rax
jmp    1387 <main+0x1d7>
cs nopw 0x0(%rax,%rax,1)
movb   $0x5c,(%rax)
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x2f,%cl
je     1380 <main+0x1d0>
test   %cl,%cl
jne    1383 <main+0x1d3>
mov    $0x1,%r15d
jmp    13cb <main+0x21b>
mov    (%r14,%r12,8),%rdx
xor    %r15d,%r15d
mov    %ebp,%edi
lea    0xc5c(%rip),%rsi
xor    %eax,%eax
call   10c0 <fprintf@plt>
jmp    1266 <main+0xb6>
mov    (%r14,%r12,8),%rsi
mov    %rsp,%rdi
mov    $0xff,%edx
call   1090 <strncat@plt>
xor    %r15d,%r15d
xor    %ebp,%ebp
jmp    1266 <main+0xb6>
test   %rbp,%rbp
je     13f3 <main+0x243>
mov    %rbp,%rdi
call   1050 <fclose@plt>
lea    0xc27(%rip),%rsi
mov    %rsp,%rdi
mov    $0xff,%edx
call   1090 <strncat@plt>
mov    %rsp,%rdi
mov    $0x20,%esi
call   1080 <strchr@plt>
test   %rax,%rax
je     143c <main+0x28c>
mov    %rax,%rdi
call   1060 <strlen@plt>
cmp    $0x7e,%eax
jl     143c <main+0x28c>
mov    0x2bc7(%rip),%rax
mov    (%rax),%edi
lea    0xbfa(%rip),%rsi
xor    %eax,%eax
call   10c0 <fprintf@plt>
lea    0xc3d(%rip),%rdi
call   1030 <remove@plt>
mov    $0x1,%ebx
jmp    1452 <main+0x2a2>
mov    %rsp,%rdi
call   1070 <system@plt>
mov    %eax,%ebx
lea    0xc20(%rip),%rdi
call   1030 <remove@plt>
mov    %ebx,%eax
add    $0x108,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xbea(%rip),%rdi
jmp    1237 <main+0x87>

LLVM IR (-O0):
@.str = [28 x i8] c"Usage: runner program args\0A\00"
@.str.1 = [2 x i8] c"\\\00"
@.str.2 = [3 x i8] c"\\\\\00"
@.str.3 = [2 x i8] c"@\00"
@.str.4 = [13 x i8] c"_tmpfile.arg\00"
@.str.5 = [2 x i8] c"w\00"
@.str.6 = [36 x i8] c"runner: Error writing _tmpfile.arg\0A\00"
@.str.7 = [4 x i8] c"%s\0A\00"
@.str.8 = [2 x i8] c" \00"
@.str.9 = [15 x i8] c" @_tmpfile.arg\00"
@stderr = global i32 0
@.str.10 = [59 x i8] c"runner: oops: command line is longer than 126 characters!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [256 x i8]
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = bitcast [256 x i8]* %6 to i8*
store i32* null, i32** %7
store i32 0, i32* %8
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 2
br i1 %15, label %16, label %18
16: ; preds = %2
%17 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %204
18: ; preds = %2
store i32 1, i32* %10
br label %19
19: ; preds = %174, %18
%20 = load i32, i32* %10
%21 = load i32, i32* %4
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %177
23: ; preds = %19
%24 = load i8**, i8*** %5
%25 = load i32, i32* %10
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %24, i64 %26
%28 = load i8*, i8** %27
%29 = call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %39, label %31
31: ; preds = %23
%32 = load i8**, i8*** %5
%33 = load i32, i32* %10
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8*, i8** %32, i64 %34
%36 = load i8*, i8** %35
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %40
39: ; preds = %31, %23
store i32 1, i32* %8
br label %173
40: ; preds = %31
%41 = load i8**, i8*** %5
%42 = load i32, i32* %10
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8*, i8** %41, i64 %43
%45 = load i8*, i8** %44
%46 = call i64 @strcmp(i8* %45, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %59
48: ; preds = %40
%49 = load i32*, i32** %7
%50 = icmp ne i32* %49, null
br i1 %50, label %58, label %51
51: ; preds = %48
%52 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32* %52, i32** %7
%53 = load i32*, i32** %7
%54 = icmp ne i32* %53, null
br i1 %54, label %57, label %55
55: ; preds = %51
%56 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
store i32 1, i32* %3
br label %204
57: ; preds = %51
br label %58
58: ; preds = %57, %48
br label %172
59: ; preds = %40
%60 = load i32*, i32** %7
%61 = icmp ne i32* %60, null
br i1 %61, label %62, label %121
62: ; preds = %59
%63 = load i32, i32* %8
%64 = icmp ne i32 %63, 0
br i1 %64, label %65, label %111
65: ; preds = %62
store i32 0, i32* %11
br label %66
66: ; preds = %105, %65
%67 = load i8**, i8*** %5
%68 = load i32, i32* %10
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds i8*, i8** %67, i64 %69
%71 = load i8*, i8** %70
%72 = load i32, i32* %11
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i8, i8* %71, i64 %73
%75 = load i8, i8* %74
%76 = icmp ne i8 %75, 0
br i1 %76, label %77, label %108
77: ; preds = %66
%78 = load i8**, i8*** %5
%79 = load i32, i32* %10
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8*, i8** %78, i64 %80
%82 = load i8*, i8** %81
%83 = load i32, i32* %11
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i8, i8* %82, i64 %84
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
%88 = icmp eq i32 %87, 47
br i1 %88, label %89, label %92
89: ; preds = %77
%90 = load i32*, i32** %7
%91 = call i32 @fputc(i8 signext 92, i32* %90)
br label %104
92: ; preds = %77
%93 = load i8**, i8*** %5
%94 = load i32, i32* %10
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i8*, i8** %93, i64 %95
%97 = load i8*, i8** %96
%98 = load i32, i32* %11
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds i8, i8* %97, i64 %99
%101 = load i8, i8* %100
%102 = load i32*, i32** %7
%103 = call i32 @fputc(i8 signext %101, i32* %102)
br label %104
104: ; preds = %92, %89
br label %105
105: ; preds = %104
%106 = load i32, i32* %11
%107 = add nsw i32 %106, 1
store i32 %107, i32* %11
br label %66
108: ; preds = %66
%109 = load i32*, i32** %7
%110 = call i32 @fputc(i8 signext 10, i32* %109)
br label %120
111: ; preds = %62
%112 = load i32*, i32** %7
%113 = ptrtoint i32* %112 to i32
%114 = load i8**, i8*** %5
%115 = load i32, i32* %10
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds i8*, i8** %114, i64 %116
%118 = load i8*, i8** %117
%119 = call i32 (i32, i8*, ...) @fprintf(i32 %113, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %118)
br label %120
120: ; preds = %111, %108
br label %171
121: ; preds = %59
%122 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%123 = load i8, i8* %122
%124 = icmp ne i8 %123, 0
br i1 %124, label %125, label %128
125: ; preds = %121
%126 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%127 = call i32 @strncat(i8* %126, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i32 255)
br label %128
128: ; preds = %125, %121
%129 = load i32, i32* %8
%130 = icmp ne i32 %129, 0
br i1 %130, label %131, label %162
131: ; preds = %128
%132 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%133 = call i32 @strlen(i8* %132)
store i32 %133, i32* %11
%134 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%135 = load i8**, i8*** %5
%136 = load i32, i32* %10
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds i8*, i8** %135, i64 %137
%139 = load i8*, i8** %138
%140 = call i32 @strncat(i8* %134, i8* %139, i32 255)
br label %141
141: ; preds = %158, %131
%142 = load i32, i32* %11
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 %143
%145 = load i8, i8* %144
%146 = icmp ne i8 %145, 0
br i1 %146, label %147, label %161
147: ; preds = %141
%148 = load i32, i32* %11
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 %149
%151 = load i8, i8* %150
%152 = sext i8 %151 to i32
%153 = icmp eq i32 %152, 47
br i1 %153, label %154, label %158
154: ; preds = %147
%155 = load i32, i32* %11
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 %156
store i8 92, i8* %157
br label %158
158: ; preds = %154, %147
%159 = load i32, i32* %11
%160 = add nsw i32 %159, 1
store i32 %160, i32* %11
br label %141
161: ; preds = %141
br label %170
162: ; preds = %128
%163 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%164 = load i8**, i8*** %5
%165 = load i32, i32* %10
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds i8*, i8** %164, i64 %166
%168 = load i8*, i8** %167
%169 = call i32 @strncat(i8* %163, i8* %168, i32 255)
br label %170
170: ; preds = %162, %161
br label %171
171: ; preds = %170, %120
br label %172
172: ; preds = %171, %58
br label %173
173: ; preds = %172, %39
br label %174
174: ; preds = %173
%175 = load i32, i32* %10
%176 = add nsw i32 %175, 1
store i32 %176, i32* %10
br label %19
177: ; preds = %19
%178 = load i32*, i32** %7
%179 = icmp ne i32* %178, null
br i1 %179, label %180, label %185
180: ; preds = %177
%181 = load i32*, i32** %7
%182 = call i32 @fclose(i32* %181)
%183 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%184 = call i32 @strncat(i8* %183, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 255)
br label %185
185: ; preds = %180, %177
%186 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%187 = call i8* @strchr(i8* %186, i8 signext 32)
store i8* %187, i8** %12
%188 = load i8*, i8** %12
%189 = icmp ne i8* %188, null
br i1 %189, label %190, label %199
190: ; preds = %185
%191 = load i8*, i8** %12
%192 = call i32 @strlen(i8* %191)
%193 = icmp sge i32 %192, 126
br i1 %193, label %194, label %198
194: ; preds = %190
%195 = load i32, i32* @stderr
%196 = call i32 (i32, i8*, ...) @fprintf(i32 %195, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.10, i64 0, i64 0))
%197 = call i32 @remove(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %3
br label %204
198: ; preds = %190
br label %199
199: ; preds = %198, %185
%200 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%201 = call i32 @system(i8* %200)
store i32 %201, i32* %9
%202 = call i32 @remove(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%203 = load i32, i32* %9
store i32 %203, i32* %3
br label %204
204: ; preds = %199, %194, %55, %16
%205 = load i32, i32* %3
ret i32 %205
}

LLVM IR (-O2):
@.str.1 = [2 x i8] c"\\\00"
@.str.2 = [3 x i8] c"\\\\\00"
@.str.3 = [2 x i8] c"@\00"
@.str.4 = [13 x i8] c"_tmpfile.arg\00"
@.str.5 = [2 x i8] c"w\00"
@.str.7 = [4 x i8] c"%s\0A\00"
@.str.8 = [2 x i8] c" \00"
@.str.9 = [15 x i8] c" @_tmpfile.arg\00"
@stderr = global i32 0
@.str.10 = [59 x i8] c"runner: oops: command line is longer than 126 characters!\0A\00"
@str = [35 x i8] c"runner: Error writing _tmpfile.arg\00"
@str.11 = [27 x i8] c"Usage: runner program args\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = icmp slt i32 %0, 2
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = zext i32 %0 to i64
br label %10
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.11, i64 0, i64 0))
br label %98
10: ; preds = %6, %75
%11 = phi i64 [ 1, %6 ], [ %78, %75 ]
%12 = phi i32* [ null, %6 ], [ %77, %75 ]
%13 = phi i32 [ 0, %6 ], [ %76, %75 ]
%14 = getelementptr inbounds i8*, i8** %1, i64 %11
%15 = load i8*, i8** %14
%16 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %75, label %18
18: ; preds = %10
%19 = load i8*, i8** %14
%20 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %75, label %22
22: ; preds = %18
%23 = load i8*, i8** %14
%24 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
%26 = icmp eq i32* %12, null
br i1 %25, label %27, label %33
27: ; preds = %22
br i1 %26, label %28, label %75
28: ; preds = %27
%29 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%30 = icmp eq i32* %29, null
br i1 %30, label %31, label %75
31: ; preds = %28
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
br label %98
33: ; preds = %22
br i1 %26, label %53, label %34
34: ; preds = %33
%35 = icmp eq i32 %13, 0
br i1 %35, label %48, label %36
36: ; preds = %34, %42
%37 = phi i64 [ %45, %42 ], [ 0, %34 ]
%38 = load i8*, i8** %14
%39 = getelementptr inbounds i8, i8* %38, i64 %37
%40 = load i8, i8* %39
switch i8 %40, label %41 [
i8 0, label %46
i8 47, label %42
]
41: ; preds = %36
br label %42
42: ; preds = %36, %41
%43 = phi i8 [ %40, %41 ], [ 92, %36 ]
%44 = call i32 @fputc(i8 signext %43, i32* %12)
%45 = add nuw i64 %37, 1
br label %36
46: ; preds = %36
%47 = call i32 @fputc(i8 signext 10, i32* %12)
br label %75
48: ; preds = %34
%49 = ptrtoint i32* %12 to i64
%50 = trunc i64 %49 to i32
%51 = load i8*, i8** %14
%52 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %51)
br label %75
53: ; preds = %33
%54 = load i8, i8* %4
%55 = icmp eq i8 %54, 0
br i1 %55, label %58, label %56
56: ; preds = %53
%57 = call i32 @strncat(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i32 255)
br label %58
58: ; preds = %56, %53
%59 = icmp eq i32 %13, 0
br i1 %59, label %72, label %60
60: ; preds = %58
%61 = call i32 @strlen(i8* %4)
%62 = load i8*, i8** %14
%63 = call i32 @strncat(i8* %4, i8* %62, i32 255)
%64 = sext i32 %61 to i64
br label %65
65: ; preds = %70, %60
%66 = phi i64 [ %71, %70 ], [ %64, %60 ]
%67 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %66
%68 = load i8, i8* %67
switch i8 %68, label %70 [
i8 0, label %75
i8 47, label %69
]
69: ; preds = %65
store i8 92, i8* %67
br label %70
70: ; preds = %65, %69
%71 = add i64 %66, 1
br label %65
72: ; preds = %58
%73 = load i8*, i8** %14
%74 = call i32 @strncat(i8* %4, i8* %73, i32 255)
br label %75
75: ; preds = %65, %10, %18, %48, %46, %72, %27, %28
%76 = phi i32 [ %13, %27 ], [ %13, %28 ], [ 1, %46 ], [ 0, %48 ], [ 0, %72 ], [ 1, %18 ], [ 1, %10 ], [ 1, %65 ]
%77 = phi i32* [ %12, %27 ], [ %29, %28 ], [ %12, %46 ], [ %12, %48 ], [ null, %72 ], [ %12, %18 ], [ %12, %10 ], [ null, %65 ]
%78 = add nuw nsw i64 %11, 1
%79 = icmp eq i64 %78, %7
br i1 %79, label %80, label %10
80: ; preds = %75
%81 = icmp eq i32* %77, null
br i1 %81, label %85, label %82
82: ; preds = %80
%83 = call i32 @fclose(i32* %77)
%84 = call i32 @strncat(i8* %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 255)
br label %85
85: ; preds = %82, %80
%86 = call i8* @strchr(i8* %4, i8 signext 32)
%87 = icmp eq i8* %86, null
br i1 %87, label %95, label %88
88: ; preds = %85
%89 = call i32 @strlen(i8* %86)
%90 = icmp sgt i32 %89, 125
br i1 %90, label %91, label %95
91: ; preds = %88
%92 = load i32, i32* @stderr
%93 = call i32 (i32, i8*, ...) @fprintf(i32 %92, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.10, i64 0, i64 0))
%94 = call i32 @remove(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
br label %98
95: ; preds = %88, %85
%96 = call i32 @system(i8* %4)
%97 = call i32 @remove(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
br label %98
98: ; preds = %95, %91, %31, %8
%99 = phi i32 [ 1, %8 ], [ 1, %31 ], [ 1, %91 ], [ %96, %95 ]
ret i32 %99
}