#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 dummy;
};

/* Variables and functions */
scalar_t__ EBADF;
int EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ errno;
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int fileno(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
scalar_t__ fstat(int, struct stat *);
char *getprogname();
scalar_t__ memcmp(struct stat *, struct stat *, int);
int read(int, char *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
scalar_t__ write(int, char *, int);
int main(int argc, char **argv) {
  int res = EXIT_SUCCESS;
  char buf[16];
  struct stat sb0, sb1;
  strcpy(buf, "test...");
  if (read(3, buf, 16) != -1 || errno != EBADF) {
    fprintf(stderr, "%s: filedesc 3 is not closed\n", getprogname());
    res = EXIT_FAILURE;
  }
  if (read(4, buf, 16) != -1 || errno != EBADF) {
    fprintf(stderr, "%s: filedesc 4 is not closed\n", getprogname());
    res = EXIT_FAILURE;
  }
  if (write(5, buf, 16) <= 0) {
    fprintf(stderr, "%s: could not write to filedesc 5\n", getprogname());
    res = EXIT_FAILURE;
  }
  if (write(6, buf, 16) <= 0) {
    fprintf(stderr, "%s: could not write to filedesc 6\n", getprogname());
    res = EXIT_FAILURE;
  }
  fflush(stdout);
  if (fstat(fileno(stdout), &sb0) != 0) {
    fprintf(stderr, "%s: could not fstat stdout\n", getprogname());
    res = EXIT_FAILURE;
  }
  if (fstat(7, &sb1) != 0) {
    fprintf(stderr, "%s: could not fstat filedesc 7\n", getprogname());
    res = EXIT_FAILURE;
  }
  if (write(7, buf, strlen(buf)) <= 0) {
    fprintf(stderr, "%s: could not write to filedesc 7\n", getprogname());
    res = EXIT_FAILURE;
  }
  if (memcmp(&sb0, &sb1, sizeof sb0) != 0) {
    fprintf(stderr, "%s: stat results differ\n", getprogname());
    res = EXIT_FAILURE;
  }
  return res;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2dfb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xe33(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x30(%rbp),%rsi
mov    $0x3,%edi
mov    $0x10,%edx
call   1070 <read@plt>
cmp    $0xffffffff,%eax
jne    1208 <main+0x68>
mov    0x2de3(%rip),%rax
mov    (%rax),%rax
mov    0x2dc1(%rip),%rcx
cmp    (%rcx),%rax
je     1239 <main+0x99>
mov    0x2dd1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    $0x0,%al
call   1060 <getprogname@plt>
mov    -0x44(%rbp),%edi
mov    %rax,%rdx
lea    0xde0(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2d9c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    -0x30(%rbp),%rsi
mov    $0x4,%edi
mov    $0x10,%edx
call   1070 <read@plt>
cmp    $0xffffffff,%eax
jne    126f <main+0xcf>
mov    0x2d7c(%rip),%rax
mov    (%rax),%rax
mov    0x2d5a(%rip),%rcx
cmp    (%rcx),%rax
je     12a0 <main+0x100>
mov    0x2d6a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x48(%rbp)
mov    $0x0,%al
call   1060 <getprogname@plt>
mov    -0x48(%rbp),%edi
mov    %rax,%rdx
lea    0xd97(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2d35(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    -0x30(%rbp),%rsi
mov    $0x5,%edi
mov    $0x10,%edx
call   1040 <write@plt>
cmp    $0x0,%rax
jg     12ee <main+0x14e>
mov    0x2d1c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
mov    $0x0,%al
call   1060 <getprogname@plt>
mov    -0x4c(%rbp),%edi
mov    %rax,%rdx
lea    0xd67(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2ce7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    -0x30(%rbp),%rsi
mov    $0x6,%edi
mov    $0x10,%edx
call   1040 <write@plt>
cmp    $0x0,%rax
jg     133c <main+0x19c>
mov    0x2cce(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x50(%rbp)
mov    $0x0,%al
call   1060 <getprogname@plt>
mov    -0x50(%rbp),%edi
mov    %rax,%rdx
lea    0xd3c(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2c99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    0x2c85(%rip),%rax
mov    (%rax),%edi
call   10b0 <fflush@plt>
mov    0x2c77(%rip),%rax
mov    (%rax),%edi
call   10a0 <fileno@plt>
mov    %eax,%edi
lea    -0x38(%rbp),%rsi
call   10c0 <fstat@plt>
cmp    $0x0,%rax
je     139e <main+0x1fe>
mov    0x2c6c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x54(%rbp)
mov    $0x0,%al
call   1060 <getprogname@plt>
mov    -0x54(%rbp),%edi
mov    %rax,%rdx
lea    0xcfd(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2c37(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    $0x7,%edi
lea    -0x40(%rbp),%rsi
call   10c0 <fstat@plt>
cmp    $0x0,%rax
je     13e7 <main+0x247>
mov    0x2c23(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x58(%rbp)
mov    $0x0,%al
call   1060 <getprogname@plt>
mov    -0x58(%rbp),%edi
mov    %rax,%rdx
lea    0xcd0(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2bee(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x60(%rbp)
lea    -0x30(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x60(%rbp),%rsi
mov    %eax,%edx
mov    $0x7,%edi
call   1040 <write@plt>
cmp    $0x0,%rax
jg     1443 <main+0x2a3>
mov    0x2bc7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x64(%rbp)
mov    $0x0,%al
call   1060 <getprogname@plt>
mov    -0x64(%rbp),%edi
mov    %rax,%rdx
lea    0xc94(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2b92(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    -0x38(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x4,%edx
call   1080 <memcmp@plt>
cmp    $0x0,%rax
je     1490 <main+0x2f0>
mov    0x2b7a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x68(%rbp)
mov    $0x0,%al
call   1060 <getprogname@plt>
mov    -0x68(%rbp),%edi
mov    %rax,%rdx
lea    0xc6a(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2b45(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x28,%rsp
mov    0x2e0b(%rip),%rax
mov    (%rax),%ebp
lea    0xe4a(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    $0x3,%edi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1070 <read@plt>
cmp    $0xffffffff,%eax
jne    11f0 <main+0x50>
mov    0x2df7(%rip),%rax
mov    (%rax),%rax
mov    0x2dd5(%rip),%rcx
cmp    (%rcx),%rax
je     121a <main+0x7a>
mov    0x2de9(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1060 <getprogname@plt>
lea    0xe01(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1090 <fprintf@plt>
mov    0x2db8(%rip),%rax
mov    (%rax),%ebp
lea    0x10(%rsp),%rsi
mov    $0x4,%edi
mov    $0x10,%edx
call   1070 <read@plt>
cmp    $0xffffffff,%eax
jne    1249 <main+0xa9>
mov    0x2d9e(%rip),%rax
mov    (%rax),%rax
mov    0x2d7c(%rip),%rcx
cmp    (%rcx),%rax
je     1273 <main+0xd3>
mov    0x2d90(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1060 <getprogname@plt>
lea    0xdc6(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1090 <fprintf@plt>
mov    0x2d5f(%rip),%rax
mov    (%rax),%ebp
lea    0x10(%rsp),%rsi
mov    $0x5,%edi
mov    $0x10,%edx
call   1040 <write@plt>
test   %rax,%rax
jg     12b6 <main+0x116>
mov    0x2d4d(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1060 <getprogname@plt>
lea    0xda1(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1090 <fprintf@plt>
mov    0x2d1c(%rip),%rax
mov    (%rax),%ebp
lea    0x10(%rsp),%rsi
mov    $0x6,%edi
mov    $0x10,%edx
call   1040 <write@plt>
test   %rax,%rax
jg     12f9 <main+0x159>
mov    0x2d0a(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1060 <getprogname@plt>
lea    0xd81(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1090 <fprintf@plt>
mov    0x2cd9(%rip),%rax
mov    (%rax),%ebp
mov    0x2cc8(%rip),%rbx
mov    (%rbx),%edi
call   10b0 <fflush@plt>
mov    (%rbx),%edi
call   10a0 <fileno@plt>
lea    0x8(%rsp),%rsi
mov    %eax,%edi
call   10c0 <fstat@plt>
test   %rax,%rax
je     1349 <main+0x1a9>
mov    0x2cba(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1060 <getprogname@plt>
lea    0xd54(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1090 <fprintf@plt>
mov    0x2c89(%rip),%rax
mov    (%rax),%ebp
mov    %rsp,%rsi
mov    $0x7,%edi
call   10c0 <fstat@plt>
test   %rax,%rax
je     1385 <main+0x1e5>
mov    0x2c7e(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1060 <getprogname@plt>
lea    0xd34(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1090 <fprintf@plt>
mov    0x2c4d(%rip),%rax
mov    (%rax),%ebp
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    $0x7,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
test   %rax,%rax
jg     13d0 <main+0x230>
mov    0x2c33(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1060 <getprogname@plt>
lea    0xd09(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1090 <fprintf@plt>
mov    0x2c02(%rip),%rax
mov    (%rax),%ebp
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x4,%edx
call   1080 <memcmp@plt>
test   %rax,%rax
je     1411 <main+0x271>
mov    0x2bf2(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1060 <getprogname@plt>
lea    0xceb(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1090 <fprintf@plt>
mov    0x2bc1(%rip),%rax
mov    (%rax),%ebp
mov    %ebp,%eax
add    $0x28,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@EXIT_SUCCESS = global i32 0
@.str = [8 x i8] c"test...\00"
@errno = global i64 0
@EBADF = global i64 0
@stderr = global i32 0
@.str.1 = [30 x i8] c"%s: filedesc 3 is not closed\0A\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [30 x i8] c"%s: filedesc 4 is not closed\0A\00"
@.str.3 = [35 x i8] c"%s: could not write to filedesc 5\0A\00"
@.str.4 = [35 x i8] c"%s: could not write to filedesc 6\0A\00"
@stdout = global i32 0
@.str.5 = [28 x i8] c"%s: could not fstat stdout\0A\00"
@.str.6 = [32 x i8] c"%s: could not fstat filedesc 7\0A\00"
@.str.7 = [35 x i8] c"%s: could not write to filedesc 7\0A\00"
@.str.8 = [25 x i8] c"%s: stat results differ\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [16 x i8]
%8 = alloca %struct.stat
%9 = alloca %struct.stat
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* @EXIT_SUCCESS
store i32 %10, i32* %6
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%14 = call i32 @read(i32 3, i8* %13, i32 16)
%15 = icmp ne i32 %14, -1
br i1 %15, label %20, label %16
16: ; preds = %2
%17 = load i64, i64* @errno
%18 = load i64, i64* @EBADF
%19 = icmp ne i64 %17, %18
br i1 %19, label %20, label %25
20: ; preds = %16, %2
%21 = load i32, i32* @stderr
%22 = call i8* (...) @getprogname()
%23 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %22)
%24 = load i32, i32* @EXIT_FAILURE
store i32 %24, i32* %6
br label %25
25: ; preds = %20, %16
%26 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%27 = call i32 @read(i32 4, i8* %26, i32 16)
%28 = icmp ne i32 %27, -1
br i1 %28, label %33, label %29
29: ; preds = %25
%30 = load i64, i64* @errno
%31 = load i64, i64* @EBADF
%32 = icmp ne i64 %30, %31
br i1 %32, label %33, label %38
33: ; preds = %29, %25
%34 = load i32, i32* @stderr
%35 = call i8* (...) @getprogname()
%36 = call i32 @fprintf(i32 %34, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %35)
%37 = load i32, i32* @EXIT_FAILURE
store i32 %37, i32* %6
br label %38
38: ; preds = %33, %29
%39 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%40 = call i64 @write(i32 5, i8* %39, i32 16)
%41 = icmp sle i64 %40, 0
br i1 %41, label %42, label %47
42: ; preds = %38
%43 = load i32, i32* @stderr
%44 = call i8* (...) @getprogname()
%45 = call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i8* %44)
%46 = load i32, i32* @EXIT_FAILURE
store i32 %46, i32* %6
br label %47
47: ; preds = %42, %38
%48 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%49 = call i64 @write(i32 6, i8* %48, i32 16)
%50 = icmp sle i64 %49, 0
br i1 %50, label %51, label %56
51: ; preds = %47
%52 = load i32, i32* @stderr
%53 = call i8* (...) @getprogname()
%54 = call i32 @fprintf(i32 %52, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i8* %53)
%55 = load i32, i32* @EXIT_FAILURE
store i32 %55, i32* %6
br label %56
56: ; preds = %51, %47
%57 = load i32, i32* @stdout
%58 = call i32 @fflush(i32 %57)
%59 = load i32, i32* @stdout
%60 = call i32 @fileno(i32 %59)
%61 = call i64 @fstat(i32 %60, %struct.stat* %8)
%62 = icmp ne i64 %61, 0
br i1 %62, label %63, label %68
63: ; preds = %56
%64 = load i32, i32* @stderr
%65 = call i8* (...) @getprogname()
%66 = call i32 @fprintf(i32 %64, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i8* %65)
%67 = load i32, i32* @EXIT_FAILURE
store i32 %67, i32* %6
br label %68
68: ; preds = %63, %56
%69 = call i64 @fstat(i32 7, %struct.stat* %9)
%70 = icmp ne i64 %69, 0
br i1 %70, label %71, label %76
71: ; preds = %68
%72 = load i32, i32* @stderr
%73 = call i8* (...) @getprogname()
%74 = call i32 @fprintf(i32 %72, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), i8* %73)
%75 = load i32, i32* @EXIT_FAILURE
store i32 %75, i32* %6
br label %76
76: ; preds = %71, %68
%77 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%78 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%79 = call i32 @strlen(i8* %78)
%80 = call i64 @write(i32 7, i8* %77, i32 %79)
%81 = icmp sle i64 %80, 0
br i1 %81, label %82, label %87
82: ; preds = %76
%83 = load i32, i32* @stderr
%84 = call i8* (...) @getprogname()
%85 = call i32 @fprintf(i32 %83, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), i8* %84)
%86 = load i32, i32* @EXIT_FAILURE
store i32 %86, i32* %6
br label %87
87: ; preds = %82, %76
%88 = call i64 @memcmp(%struct.stat* %8, %struct.stat* %9, i32 4)
%89 = icmp ne i64 %88, 0
br i1 %89, label %90, label %95
90: ; preds = %87
%91 = load i32, i32* @stderr
%92 = call i8* (...) @getprogname()
%93 = call i32 @fprintf(i32 %91, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i8* %92)
%94 = load i32, i32* @EXIT_FAILURE
store i32 %94, i32* %6
br label %95
95: ; preds = %90, %87
%96 = load i32, i32* %6
ret i32 %96
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@EXIT_SUCCESS = global i32 0
@.str = [8 x i8] c"test...\00"
@errno = global i64 0
@EBADF = global i64 0
@stderr = global i32 0
@.str.1 = [30 x i8] c"%s: filedesc 3 is not closed\0A\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [30 x i8] c"%s: filedesc 4 is not closed\0A\00"
@.str.3 = [35 x i8] c"%s: could not write to filedesc 5\0A\00"
@.str.4 = [35 x i8] c"%s: could not write to filedesc 6\0A\00"
@stdout = global i32 0
@.str.5 = [28 x i8] c"%s: could not fstat stdout\0A\00"
@.str.6 = [32 x i8] c"%s: could not fstat filedesc 7\0A\00"
@.str.7 = [35 x i8] c"%s: could not write to filedesc 7\0A\00"
@.str.8 = [25 x i8] c"%s: stat results differ\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [16 x i8]
%4 = alloca %struct.stat
%5 = alloca %struct.stat
%6 = load i32, i32* @EXIT_SUCCESS
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%8 = bitcast %struct.stat* %4 to i8*
%9 = bitcast %struct.stat* %5 to i8*
%10 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @read(i32 3, i8* %7, i32 16)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %17
13: ; preds = %2
%14 = load i64, i64* @errno
%15 = load i64, i64* @EBADF
%16 = icmp eq i64 %14, %15
br i1 %16, label %22, label %17
17: ; preds = %13, %2
%18 = load i32, i32* @stderr
%19 = call i8* (...) @getprogname()
%20 = call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %19)
%21 = load i32, i32* @EXIT_FAILURE
br label %22
22: ; preds = %17, %13
%23 = phi i32 [ %21, %17 ], [ %6, %13 ]
%24 = call i32 @read(i32 4, i8* %7, i32 16)
%25 = icmp eq i32 %24, -1
br i1 %25, label %26, label %30
26: ; preds = %22
%27 = load i64, i64* @errno
%28 = load i64, i64* @EBADF
%29 = icmp eq i64 %27, %28
br i1 %29, label %35, label %30
30: ; preds = %26, %22
%31 = load i32, i32* @stderr
%32 = call i8* (...) @getprogname()
%33 = call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %32)
%34 = load i32, i32* @EXIT_FAILURE
br label %35
35: ; preds = %30, %26
%36 = phi i32 [ %34, %30 ], [ %23, %26 ]
%37 = call i64 @write(i32 5, i8* %7, i32 16)
%38 = icmp slt i64 %37, 1
br i1 %38, label %39, label %44
39: ; preds = %35
%40 = load i32, i32* @stderr
%41 = call i8* (...) @getprogname()
%42 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i8* %41)
%43 = load i32, i32* @EXIT_FAILURE
br label %44
44: ; preds = %39, %35
%45 = phi i32 [ %43, %39 ], [ %36, %35 ]
%46 = call i64 @write(i32 6, i8* %7, i32 16)
%47 = icmp slt i64 %46, 1
br i1 %47, label %48, label %53
48: ; preds = %44
%49 = load i32, i32* @stderr
%50 = call i8* (...) @getprogname()
%51 = call i32 @fprintf(i32 %49, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i8* %50)
%52 = load i32, i32* @EXIT_FAILURE
br label %53
53: ; preds = %48, %44
%54 = phi i32 [ %52, %48 ], [ %45, %44 ]
%55 = load i32, i32* @stdout
%56 = call i32 @fflush(i32 %55)
%57 = load i32, i32* @stdout
%58 = call i32 @fileno(i32 %57)
%59 = call i64 @fstat(i32 %58, %struct.stat* %4)
%60 = icmp eq i64 %59, 0
br i1 %60, label %66, label %61
61: ; preds = %53
%62 = load i32, i32* @stderr
%63 = call i8* (...) @getprogname()
%64 = call i32 @fprintf(i32 %62, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i8* %63)
%65 = load i32, i32* @EXIT_FAILURE
br label %66
66: ; preds = %61, %53
%67 = phi i32 [ %65, %61 ], [ %54, %53 ]
%68 = call i64 @fstat(i32 7, %struct.stat* %5)
%69 = icmp eq i64 %68, 0
br i1 %69, label %75, label %70
70: ; preds = %66
%71 = load i32, i32* @stderr
%72 = call i8* (...) @getprogname()
%73 = call i32 @fprintf(i32 %71, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), i8* %72)
%74 = load i32, i32* @EXIT_FAILURE
br label %75
75: ; preds = %70, %66
%76 = phi i32 [ %74, %70 ], [ %67, %66 ]
%77 = call i32 @strlen(i8* %7)
%78 = call i64 @write(i32 7, i8* %7, i32 %77)
%79 = icmp slt i64 %78, 1
br i1 %79, label %80, label %85
80: ; preds = %75
%81 = load i32, i32* @stderr
%82 = call i8* (...) @getprogname()
%83 = call i32 @fprintf(i32 %81, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), i8* %82)
%84 = load i32, i32* @EXIT_FAILURE
br label %85
85: ; preds = %80, %75
%86 = phi i32 [ %84, %80 ], [ %76, %75 ]
%87 = call i64 @memcmp(%struct.stat* %4, %struct.stat* %5, i32 4)
%88 = icmp eq i64 %87, 0
br i1 %88, label %94, label %89
89: ; preds = %85
%90 = load i32, i32* @stderr
%91 = call i8* (...) @getprogname()
%92 = call i32 @fprintf(i32 %90, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i8* %91)
%93 = load i32, i32* @EXIT_FAILURE
br label %94
94: ; preds = %89, %85
%95 = phi i32 [ %93, %89 ], [ %86, %85 ]
ret i32 %95
}