#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 */
struct stat {
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int O_CREAT;
int O_RDWR;
int asprintf(char **, char *, char *);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int fstat64(int, struct stat *);
int fsync(int);
int open(char *, int, int /*<<< orphan*/);
int read(int, char *, int);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int system(char *);
int write(int, char *, int);
int main(int argc, char *argv[]) {
  char *filename = NULL, *volname = NULL, *cmd = NULL;
  char buffer[1024] = {
      0,
  };
  int fd = -1;
  int ret = -1;
  struct stat statbuf = {
      0,
  };
  if (argc != 3) {
    fprintf(stderr, "usage: %s <file-name> <volname>\n", argv[0]);
    goto out;
  }
  filename = argv[1];
  volname = argv[2];
  fd = open(filename, O_RDWR | O_CREAT, 0);
  if (fd < 0) {
    fprintf(stderr, "open (%s) failed (%s)\n", filename, strerror(errno));
    goto out;
  }
  ret = write(fd, "test-content", 12);
  if (ret < 0) {
    fprintf(stderr, "write failed (%s)", strerror(errno));
    goto out;
  }
  ret = fsync(fd);
  if (ret < 0) {
    fprintf(stderr, "fsync failed (%s)", strerror(errno));
    goto out;
  }
  ret = fstat64(fd, &statbuf);
  if (ret < 0) {
    fprintf(stderr, "fstat64 failed (%s)", strerror(errno));
    goto out;
  }
  ret = asprintf(&cmd, "gluster --mode=script volume stop %s force", volname);
  if (ret < 0) {
    fprintf(stderr, "cannot construct cli command string (%s)",
            strerror(errno));
    goto out;
  }
  ret = system(cmd);
  if (ret < 0) {
    fprintf(stderr, "stopping volume (%s) failed", volname);
    goto out;
  }
  ret = read(fd, buffer, 1024);
  if (ret >= 0) {
    fprintf(stderr, "read should've returned error, "
                    "but is successful\n");
    ret = -1;
    goto out;
  }
  ret = 0;
out:
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x460,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
lea    -0x430(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1050 <memset@plt>
movl   $0xffffffff,-0x434(%rbp)
ff ff ff
movl   $0xffffffff,-0x438(%rbp)
ff ff ff
lea    -0x440(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1050 <memset@plt>
cmpl   $0x3,-0x8(%rbp)
je     1238 <main+0x98>
mov    0x2db4(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xdd4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14d9 <main+0x339>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2d85(%rip),%rax
mov    (%rax),%esi
mov    0x2d94(%rip),%rax
or     (%rax),%esi
xor    %edx,%edx
call   10a0 <open@plt>
mov    %eax,-0x434(%rbp)
cmpl   $0x0,-0x434(%rbp)
jge    12cb <main+0x12b>
mov    0x2d49(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x448(%rbp)
mov    0x2d27(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    -0x44c(%rbp),%edi
mov    -0x448(%rbp),%rdx
mov    %rax,%rcx
lea    0xd62(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14d9 <main+0x339>
mov    -0x434(%rbp),%edi
lea    0xd60(%rip),%rsi
mov    $0xc,%edx
call   1030 <write@plt>
mov    %eax,-0x438(%rbp)
cmpl   $0x0,-0x438(%rbp)
jge    132e <main+0x18e>
mov    0x2cd4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x450(%rbp)
mov    0x2cbd(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    -0x450(%rbp),%edi
mov    %rax,%rdx
lea    0xd23(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14d9 <main+0x339>
mov    -0x434(%rbp),%edi
call   1090 <fsync@plt>
mov    %eax,-0x438(%rbp)
cmpl   $0x0,-0x438(%rbp)
jge    1385 <main+0x1e5>
mov    0x2c7d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x454(%rbp)
mov    0x2c66(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    -0x454(%rbp),%edi
mov    %rax,%rdx
lea    0xcde(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14d9 <main+0x339>
mov    -0x434(%rbp),%edi
lea    -0x440(%rbp),%rsi
call   10b0 <fstat64@plt>
mov    %eax,-0x438(%rbp)
cmpl   $0x0,-0x438(%rbp)
jge    13e3 <main+0x243>
mov    0x2c1f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x458(%rbp)
mov    0x2c08(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    -0x458(%rbp),%edi
mov    %rax,%rdx
lea    0xc92(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14d9 <main+0x339>
mov    -0x20(%rbp),%rdx
lea    -0x28(%rbp),%rdi
lea    0xc8b(%rip),%rsi
call   1080 <asprintf@plt>
mov    %eax,-0x438(%rbp)
cmpl   $0x0,-0x438(%rbp)
jge    1443 <main+0x2a3>
mov    0x2bbf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x45c(%rbp)
mov    0x2ba8(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    -0x45c(%rbp),%edi
mov    %rax,%rdx
lea    0xc71(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14d9 <main+0x339>
mov    -0x28(%rbp),%rdi
call   1040 <system@plt>
mov    %eax,-0x438(%rbp)
cmpl   $0x0,-0x438(%rbp)
jge    147f <main+0x2df>
mov    0x2b6a(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
lea    0xc5e(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14d9 <main+0x339>
mov    -0x434(%rbp),%edi
lea    -0x430(%rbp),%rsi
mov    $0x400,%edx
call   1060 <read@plt>
mov    %eax,-0x438(%rbp)
cmpl   $0x0,-0x438(%rbp)
jl     14cf <main+0x32f>
mov    0x2b20(%rip),%rax
mov    (%rax),%edi
lea    0xc34(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0xffffffff,-0x438(%rbp)
ff ff ff
jmp    14d9 <main+0x339>
movl   $0x0,-0x438(%rbp)
mov    -0x438(%rbp),%eax
add    $0x460,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x410,%rsp
mov    %rsi,%rbp
mov    %edi,%ebx
movq   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rdi
mov    $0x400,%edx
xor    %esi,%esi
call   1050 <memset@plt>
movl   $0x0,(%rsp)
cmp    $0x3,%ebx
jne    12a4 <main+0x104>
mov    0x8(%rbp),%rbx
mov    0x10(%rbp),%r14
mov    0x2df7(%rip),%rax
mov    0x2e08(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    %rbx,%rdi
xor    %edx,%edx
call   10a0 <open@plt>
test   %eax,%eax
js     12c1 <main+0x121>
mov    %eax,%ebp
lea    0xe29(%rip),%rsi
mov    %eax,%edi
mov    $0xc,%edx
call   1030 <write@plt>
test   %eax,%eax
js     12f8 <main+0x158>
mov    %ebp,%edi
call   1090 <fsync@plt>
test   %eax,%eax
js     131a <main+0x17a>
mov    %rsp,%rsi
mov    %ebp,%edi
call   10b0 <fstat64@plt>
test   %eax,%eax
js     133c <main+0x19c>
lea    0xe32(%rip),%rsi
lea    0x8(%rsp),%rdi
mov    %r14,%rdx
call   1080 <asprintf@plt>
test   %eax,%eax
js     135e <main+0x1be>
mov    0x8(%rsp),%rdi
call   1040 <system@plt>
test   %eax,%eax
js     1398 <main+0x1f8>
lea    0x10(%rsp),%rsi
mov    %ebp,%edi
mov    $0x400,%edx
call   1060 <read@plt>
test   %eax,%eax
js     13af <main+0x20f>
mov    0x2d3e(%rip),%rax
mov    (%rax),%edi
lea    0xe52(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    12ee <main+0x14e>
mov    0x2d25(%rip),%rax
mov    (%rax),%edi
mov    0x0(%rbp),%rdx
lea    0xd48(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    12ee <main+0x14e>
mov    0x2d08(%rip),%rax
mov    (%rax),%ebp
mov    0x2cf7(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xd42(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0xffffffff,%ebx
jmp    138a <main+0x1ea>
mov    %eax,%ebx
mov    0x2ccf(%rip),%rax
mov    (%rax),%ebp
mov    0x2cbe(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xd2d(%rip),%rsi
jmp    137e <main+0x1de>
mov    %eax,%ebx
mov    0x2cad(%rip),%rax
mov    (%rax),%ebp
mov    0x2c9c(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xd1d(%rip),%rsi
jmp    137e <main+0x1de>
mov    %eax,%ebx
mov    0x2c8b(%rip),%rax
mov    (%rax),%ebp
mov    0x2c7a(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xd0d(%rip),%rsi
jmp    137e <main+0x1de>
mov    %eax,%ebx
mov    0x2c69(%rip),%rax
mov    (%rax),%ebp
mov    0x2c58(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xd2a(%rip),%rsi
mov    %ebp,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %ebx,%eax
add    $0x410,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %eax,%ebx
mov    0x2c2f(%rip),%rax
mov    (%rax),%edi
lea    0xd27(%rip),%rsi
mov    %r14,%rdx
jmp    1383 <main+0x1e3>
xor    %ebx,%ebx
jmp    138a <main+0x1ea>

LLVM IR (-O0):
%struct.stat = type { i32 }
@stderr = global i32 0
@.str = [33 x i8] c"usage: %s <file-name> <volname>\0A\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
@.str.1 = [23 x i8] c"open (%s) failed (%s)\0A\00"
@errno = global i32 0
@.str.2 = [13 x i8] c"test-content\00"
@.str.3 = [18 x i8] c"write failed (%s)\00"
@.str.4 = [18 x i8] c"fsync failed (%s)\00"
@.str.5 = [20 x i8] c"fstat64 failed (%s)\00"
@.str.6 = [43 x i8] c"gluster --mode=script volume stop %s force\00"
@.str.7 = [41 x i8] c"cannot construct cli command string (%s)\00"
@.str.8 = [28 x i8] c"stopping volume (%s) failed\00"
@.str.9 = [50 x i8] c"read should've returned error, but is successful\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [1024 x i8]
%10 = alloca i32
%11 = alloca i32
%12 = alloca %struct.stat
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
store i8* null, i8** %7
store i8* null, i8** %8
%13 = bitcast [1024 x i8]* %9 to i8*
store i32 -1, i32* %10
store i32 -1, i32* %11
%14 = bitcast %struct.stat* %12 to i8*
%15 = load i32, i32* %4
%16 = icmp ne i32 %15, 3
br i1 %16, label %17, label %23
17: ; preds = %2
%18 = load i32, i32* @stderr
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %21)
br label %102
23: ; preds = %2
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
store i8* %26, i8** %6
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 2
%29 = load i8*, i8** %28
store i8* %29, i8** %7
%30 = load i8*, i8** %6
%31 = load i32, i32* @O_RDWR
%32 = load i32, i32* @O_CREAT
%33 = or i32 %31, %32
%34 = call i32 @open(i8* %30, i32 %33, i32 0)
store i32 %34, i32* %10
%35 = load i32, i32* %10
%36 = icmp slt i32 %35, 0
br i1 %36, label %37, label %43
37: ; preds = %23
%38 = load i32, i32* @stderr
%39 = load i8*, i8** %6
%40 = load i32, i32* @errno
%41 = call i8* @strerror(i32 %40)
%42 = call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %39, i8* %41)
br label %102
43: ; preds = %23
%44 = load i32, i32* %10
%45 = call i32 @write(i32 %44, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 12)
store i32 %45, i32* %11
%46 = load i32, i32* %11
%47 = icmp slt i32 %46, 0
br i1 %47, label %48, label %53
48: ; preds = %43
%49 = load i32, i32* @stderr
%50 = load i32, i32* @errno
%51 = call i8* @strerror(i32 %50)
%52 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* %51)
br label %102
53: ; preds = %43
%54 = load i32, i32* %10
%55 = call i32 @fsync(i32 %54)
store i32 %55, i32* %11
%56 = load i32, i32* %11
%57 = icmp slt i32 %56, 0
br i1 %57, label %58, label %63
58: ; preds = %53
%59 = load i32, i32* @stderr
%60 = load i32, i32* @errno
%61 = call i8* @strerror(i32 %60)
%62 = call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8* %61)
br label %102
63: ; preds = %53
%64 = load i32, i32* %10
%65 = call i32 @fstat64(i32 %64, %struct.stat* %12)
store i32 %65, i32* %11
%66 = load i32, i32* %11
%67 = icmp slt i32 %66, 0
br i1 %67, label %68, label %73
68: ; preds = %63
%69 = load i32, i32* @stderr
%70 = load i32, i32* @errno
%71 = call i8* @strerror(i32 %70)
%72 = call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8* %71)
br label %102
73: ; preds = %63
%74 = load i8*, i8** %7
%75 = call i32 @asprintf(i8** %8, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0), i8* %74)
store i32 %75, i32* %11
%76 = load i32, i32* %11
%77 = icmp slt i32 %76, 0
br i1 %77, label %78, label %83
78: ; preds = %73
%79 = load i32, i32* @stderr
%80 = load i32, i32* @errno
%81 = call i8* @strerror(i32 %80)
%82 = call i32 (i32, i8*, ...) @fprintf(i32 %79, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), i8* %81)
br label %102
83: ; preds = %73
%84 = load i8*, i8** %8
%85 = call i32 @system(i8* %84)
store i32 %85, i32* %11
%86 = load i32, i32* %11
%87 = icmp slt i32 %86, 0
br i1 %87, label %88, label %92
88: ; preds = %83
%89 = load i32, i32* @stderr
%90 = load i8*, i8** %7
%91 = call i32 (i32, i8*, ...) @fprintf(i32 %89, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i8* %90)
br label %102
92: ; preds = %83
%93 = load i32, i32* %10
%94 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%95 = call i32 @read(i32 %93, i8* %94, i32 1024)
store i32 %95, i32* %11
%96 = load i32, i32* %11
%97 = icmp sge i32 %96, 0
br i1 %97, label %98, label %101
98: ; preds = %92
%99 = load i32, i32* @stderr
%100 = call i32 (i32, i8*, ...) @fprintf(i32 %99, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0))
store i32 -1, i32* %11
br label %102
101: ; preds = %92
store i32 0, i32* %11
br label %102
102: ; preds = %101, %98, %88, %78, %68, %58, %48, %37, %17
%103 = load i32, i32* %11
ret i32 %103
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@stderr = global i32 0
@.str = [33 x i8] c"usage: %s <file-name> <volname>\0A\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
@.str.1 = [23 x i8] c"open (%s) failed (%s)\0A\00"
@errno = global i32 0
@.str.2 = [13 x i8] c"test-content\00"
@.str.3 = [18 x i8] c"write failed (%s)\00"
@.str.4 = [18 x i8] c"fsync failed (%s)\00"
@.str.5 = [20 x i8] c"fstat64 failed (%s)\00"
@.str.6 = [43 x i8] c"gluster --mode=script volume stop %s force\00"
@.str.7 = [41 x i8] c"cannot construct cli command string (%s)\00"
@.str.8 = [28 x i8] c"stopping volume (%s) failed\00"
@.str.9 = [50 x i8] c"read should've returned error, but is successful\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i8*
%4 = alloca [1024 x i8]
%5 = alloca %struct.stat
%6 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%8 = bitcast %struct.stat* %5 to i8*
%9 = getelementptr inbounds %struct.stat, %struct.stat* %5, i64 0, i32 0
store i32 0, i32* %9
%10 = icmp eq i32 %0, 3
br i1 %10, label %15, label %11
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %1
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %13)
br label %75
15: ; preds = %2
%16 = getelementptr inbounds i8*, i8** %1, i64 1
%17 = load i8*, i8** %16
%18 = getelementptr inbounds i8*, i8** %1, i64 2
%19 = load i8*, i8** %18
%20 = load i32, i32* @O_RDWR
%21 = load i32, i32* @O_CREAT
%22 = or i32 %21, %20
%23 = tail call i32 @open(i8* %17, i32 %22, i32 0)
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %30
25: ; preds = %15
%26 = load i32, i32* @stderr
%27 = load i32, i32* @errno
%28 = tail call i8* @strerror(i32 %27)
%29 = tail call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %17, i8* %28)
br label %75
30: ; preds = %15
%31 = tail call i32 @write(i32 %23, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 12)
%32 = icmp slt i32 %31, 0
br i1 %32, label %33, label %38
33: ; preds = %30
%34 = load i32, i32* @stderr
%35 = load i32, i32* @errno
%36 = tail call i8* @strerror(i32 %35)
%37 = tail call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8* %36)
br label %75
38: ; preds = %30
%39 = tail call i32 @fsync(i32 %23)
%40 = icmp slt i32 %39, 0
br i1 %40, label %41, label %46
41: ; preds = %38
%42 = load i32, i32* @stderr
%43 = load i32, i32* @errno
%44 = tail call i8* @strerror(i32 %43)
%45 = tail call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8* %44)
br label %75
46: ; preds = %38
%47 = call i32 @fstat64(i32 %23, %struct.stat* %5)
%48 = icmp slt i32 %47, 0
br i1 %48, label %49, label %54
49: ; preds = %46
%50 = load i32, i32* @stderr
%51 = load i32, i32* @errno
%52 = tail call i8* @strerror(i32 %51)
%53 = tail call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8* %52)
br label %75
54: ; preds = %46
%55 = call i32 @asprintf(i8** %3, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0), i8* %19)
%56 = icmp slt i32 %55, 0
br i1 %56, label %57, label %62
57: ; preds = %54
%58 = load i32, i32* @stderr
%59 = load i32, i32* @errno
%60 = call i8* @strerror(i32 %59)
%61 = call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), i8* %60)
br label %75
62: ; preds = %54
%63 = load i8*, i8** %3
%64 = call i32 @system(i8* %63)
%65 = icmp slt i32 %64, 0
br i1 %65, label %66, label %69
66: ; preds = %62
%67 = load i32, i32* @stderr
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i8* %19)
br label %75
69: ; preds = %62
%70 = call i32 @read(i32 %23, i8* %7, i32 1024)
%71 = icmp sgt i32 %70, -1
br i1 %71, label %72, label %75
72: ; preds = %69
%73 = load i32, i32* @stderr
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %73, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0))
br label %75
75: ; preds = %69, %72, %66, %57, %49, %41, %33, %25, %11
%76 = phi i32 [ -1, %11 ], [ -1, %25 ], [ %31, %33 ], [ %39, %41 ], [ %47, %49 ], [ %55, %57 ], [ %64, %66 ], [ -1, %72 ], [ 0, %69 ]
ret i32 %76
}