#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*/ time_t;
typedef int /*<<< orphan*/ resstring;

/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ O_WRONLY;
char *asctime(int /*<<< orphan*/);
int /*<<< orphan*/ close(int);
int errno;
int fork();
int /*<<< orphan*/ localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
scalar_t__ mkfifo(char *, int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int read(int, char *, int);
int /*<<< orphan*/ remove(char *);
char *strerror(int);
int strlen(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int write(int, char *, int);
int main(int argc, char **argv) {
  int fd = 0, result = 0, size = 0;
  char resstring[64];
  char name[] = "data.fifo";
  time_t t_time = time(NULL);
  int date_len = strlen(asctime(localtime(&t_time)));
  memset(resstring, 0, sizeof(resstring));
  if (mkfifo(name, 0666) < 0) {
    printf("mkfifo error. errno#%d: %s\n", errno, strerror(errno));
    return -1;
  }
  int id = fork();
  if (id == 0) {
    printf("+Start child work\n");
    if ((fd = open(name, O_RDONLY)) < 0) {
      printf("fifo open error. errno#%d: %s\n", errno, strerror(errno));
      return -1;
    }
    size = read(fd, resstring, sizeof(resstring));
    if (size != date_len) {
      printf("child fifo read error. errno#%d: %s\n", errno, strerror(errno));
      close(fd);
      return -1;
    }
    printf("Recieved text: %s", resstring);
    close(fd);
    remove(name);
    printf("+Finish child work\n");
  } else {
    printf("+Start parent work\n");
    if ((fd = open(name, O_WRONLY)) < 0) {
      printf("parent fifo open error. errno#%d: %s\n", errno, strerror(errno));
      return -1;
    }
    t_time = time(NULL);
    char *time_text = asctime(localtime(&t_time));
    size = write(fd, time_text, strlen(time_text));
    if (size != date_len) {
      printf("parent fifo write error. errno#%d: %s\n", errno, strerror(errno));
      close(fd);
      return -1;
    }
    close(fd);
    printf("+Finish parent work\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    0xdeb(%rip),%rax
mov    %rax,-0x6a(%rbp)
mov    0xde8(%rip),%ax
mov    %ax,-0x62(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10d0 <time@plt>
mov    %eax,-0x70(%rbp)
lea    -0x70(%rbp),%rdi
call   1030 <localtime@plt>
mov    %eax,%edi
call   1070 <asctime@plt>
mov    %rax,%rdi
call   1060 <strlen@plt>
mov    %eax,-0x74(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1090 <memset@plt>
lea    -0x6a(%rbp),%rdi
mov    $0x1b6,%esi
call   10c0 <mkfifo@plt>
cmp    $0x0,%rax
jge    12b3 <main+0xd3>
mov    0x2d5e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x84(%rbp)
mov    0x2d4f(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    -0x84(%rbp),%esi
mov    %rax,%rdx
lea    0xd6a(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1502 <main+0x322>
mov    $0x0,%al
call   1100 <fork@plt>
mov    %eax,-0x78(%rbp)
cmpl   $0x0,-0x78(%rbp)
jne    13d1 <main+0x1f1>
lea    0xd58(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    -0x6a(%rbp),%rdi
mov    0x2d08(%rip),%rax
mov    (%rax),%esi
call   10e0 <open@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    1333 <main+0x153>
mov    0x2cde(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x88(%rbp)
mov    0x2ccf(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    -0x88(%rbp),%esi
mov    %rax,%rdx
lea    0xd7f(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1502 <main+0x322>
mov    -0x14(%rbp),%edi
lea    -0x60(%rbp),%rsi
mov    $0x40,%edx
call   10b0 <read@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x74(%rbp),%eax
je     139b <main+0x1bb>
mov    0x2c7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8c(%rbp)
mov    0x2c6f(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    -0x8c(%rbp),%esi
mov    %rax,%rdx
lea    0xcb9(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x14(%rbp),%edi
call   10a0 <close@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1502 <main+0x322>
lea    -0x60(%rbp),%rsi
lea    0xcb8(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x14(%rbp),%edi
call   10a0 <close@plt>
lea    -0x6a(%rbp),%rdi
call   1040 <remove@plt>
lea    0xcab(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    14fb <main+0x31b>
lea    0xcac(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    -0x6a(%rbp),%rdi
mov    0x2bde(%rip),%rax
mov    (%rax),%esi
call   10e0 <open@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    143d <main+0x25d>
mov    0x2bd4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x90(%rbp)
mov    0x2bc5(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    -0x90(%rbp),%esi
mov    %rax,%rdx
lea    0xc6e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1502 <main+0x322>
xor    %eax,%eax
mov    %eax,%edi
call   10d0 <time@plt>
mov    %eax,-0x70(%rbp)
lea    -0x70(%rbp),%rdi
call   1030 <localtime@plt>
mov    %eax,%edi
call   1070 <asctime@plt>
mov    %rax,-0x80(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x80(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x80(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x9c(%rbp),%edi
mov    -0x98(%rbp),%rsi
mov    %eax,%edx
call   1050 <write@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x74(%rbp),%eax
je     14e5 <main+0x305>
mov    0x2b34(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xa0(%rbp)
mov    0x2b25(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    -0xa0(%rbp),%esi
mov    %rax,%rdx
lea    0xbf4(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x14(%rbp),%edi
call   10a0 <close@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1502 <main+0x322>
mov    -0x14(%rbp),%edi
call   10a0 <close@plt>
lea    0xbf1(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x68,%rsp
movabs $0x6669662e61746164,%rax
66 69 66
mov    %rax,0x10(%rsp)
movw   $0x6f,0x18(%rsp)
xor    %edi,%edi
call   10e0 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
mov    %eax,%edi
call   1080 <asctime@plt>
mov    %rax,%rdi
call   1070 <strlen@plt>
mov    %eax,%r14d
lea    0x20(%rsp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   10a0 <memset@plt>
lea    0x10(%rsp),%rdi
mov    $0x1b6,%esi
call   10d0 <mkfifo@plt>
test   %rax,%rax
js     12f1 <main+0x101>
xor    %eax,%eax
call   1110 <fork@plt>
test   %eax,%eax
je     130d <main+0x11d>
lea    0xe34(%rip),%rdi
call   1050 <puts@plt>
mov    0x2d46(%rip),%rax
mov    (%rax),%esi
lea    0x10(%rsp),%rdi
call   10f0 <open@plt>
test   %eax,%eax
js     1387 <main+0x197>
mov    %eax,%r15d
xor    %ebx,%ebx
xor    %edi,%edi
call   10e0 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
mov    %eax,%edi
call   1080 <asctime@plt>
mov    %rax,%rbp
mov    %rax,%rdi
call   1070 <strlen@plt>
mov    %r15d,%edi
mov    %rbp,%rsi
mov    %eax,%edx
call   1060 <write@plt>
cmp    %r14d,%eax
jne    13a0 <main+0x1b0>
mov    %r15d,%edi
call   10b0 <close@plt>
lea    0xdd6(%rip),%rdi
call   1050 <puts@plt>
jmp    141c <main+0x22c>
mov    0x2ce0(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1100 <strerror@plt>
lea    0xd02(%rip),%rdi
jmp    13df <main+0x1ef>
lea    0xdbd(%rip),%rdi
call   1050 <puts@plt>
mov    0x2cc8(%rip),%rax
mov    (%rax),%esi
lea    0x10(%rsp),%rdi
call   10f0 <open@plt>
test   %eax,%eax
js     13c8 <main+0x1d8>
mov    %eax,%ebp
lea    0x20(%rsp),%rsi
mov    %eax,%edi
mov    $0x40,%edx
call   10c0 <read@plt>
cmp    %r14d,%eax
jne    13ed <main+0x1fd>
lea    0xcf4(%rip),%rdi
xor    %ebx,%ebx
lea    0x20(%rsp),%rsi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %ebp,%edi
call   10b0 <close@plt>
lea    0x10(%rsp),%rdi
call   1040 <remove@plt>
lea    0xd66(%rip),%rdi
call   1050 <puts@plt>
jmp    141c <main+0x22c>
mov    0x2c4a(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1100 <strerror@plt>
lea    0xcbf(%rip),%rdi
jmp    13df <main+0x1ef>
mov    0x2c31(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1100 <strerror@plt>
lea    0xccc(%rip),%rdi
mov    %ebx,%esi
mov    %rax,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
mov    %r15d,%edi
jmp    1412 <main+0x222>
mov    0x2c09(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1100 <strerror@plt>
lea    0xc85(%rip),%rdi
mov    %ebx,%esi
mov    %rax,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
jmp    1417 <main+0x227>
mov    0x2be4(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1100 <strerror@plt>
lea    0xc22(%rip),%rdi
mov    %ebx,%esi
mov    %rax,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
mov    %ebp,%edi
call   10b0 <close@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.name = [10 x i8] c"data.fifo\00"
@.str = [28 x i8] c"mkfifo error. errno#%d: %s\0A\00"
@errno = global i32 0
@.str.1 = [19 x i8] c"+Start child work\0A\00"
@O_RDONLY = global i32 0
@.str.2 = [31 x i8] c"fifo open error. errno#%d: %s\0A\00"
@.str.3 = [37 x i8] c"child fifo read error. errno#%d: %s\0A\00"
@.str.4 = [18 x i8] c"Recieved text: %s\00"
@.str.5 = [20 x i8] c"+Finish child work\0A\00"
@.str.6 = [20 x i8] c"+Start parent work\0A\00"
@O_WRONLY = global i32 0
@.str.7 = [38 x i8] c"parent fifo open error. errno#%d: %s\0A\00"
@.str.8 = [39 x i8] c"parent fifo write error. errno#%d: %s\0A\00"
@.str.9 = [21 x i8] c"+Finish parent work\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [64 x i8]
%10 = alloca [10 x i8]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
%15 = bitcast [10 x i8]* %10 to i8*
%16 = call i32 @time(i32* null)
store i32 %16, i32* %11
%17 = call i32 @localtime(i32* %11)
%18 = call i8* @asctime(i32 %17)
%19 = call i32 @strlen(i8* %18)
store i32 %19, i32* %12
%20 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%21 = call i32 @memset(i8* %20, i32 0, i32 64)
%22 = getelementptr inbounds [10 x i8], [10 x i8]* %10, i64 0, i64 0
%23 = call i64 @mkfifo(i8* %22, i32 438)
%24 = icmp slt i64 %23, 0
br i1 %24, label %25, label %30
25: ; preds = %2
%26 = load i32, i32* @errno
%27 = load i32, i32* @errno
%28 = call i8* @strerror(i32 %27)
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %26, i8* %28)
store i32 -1, i32* %3
br label %102
30: ; preds = %2
%31 = call i32 (...) @fork()
store i32 %31, i32* %13
%32 = load i32, i32* %13
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %67
34: ; preds = %30
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%36 = getelementptr inbounds [10 x i8], [10 x i8]* %10, i64 0, i64 0
%37 = load i32, i32* @O_RDONLY
%38 = call i32 @open(i8* %36, i32 %37)
store i32 %38, i32* %6
%39 = icmp slt i32 %38, 0
br i1 %39, label %40, label %45
40: ; preds = %34
%41 = load i32, i32* @errno
%42 = load i32, i32* @errno
%43 = call i8* @strerror(i32 %42)
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %41, i8* %43)
store i32 -1, i32* %3
br label %102
45: ; preds = %34
%46 = load i32, i32* %6
%47 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%48 = call i32 @read(i32 %46, i8* %47, i32 64)
store i32 %48, i32* %8
%49 = load i32, i32* %8
%50 = load i32, i32* %12
%51 = icmp ne i32 %49, %50
br i1 %51, label %52, label %59
52: ; preds = %45
%53 = load i32, i32* @errno
%54 = load i32, i32* @errno
%55 = call i8* @strerror(i32 %54)
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i32 %53, i8* %55)
%57 = load i32, i32* %6
%58 = call i32 @close(i32 %57)
store i32 -1, i32* %3
br label %102
59: ; preds = %45
%60 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8* %60)
%62 = load i32, i32* %6
%63 = call i32 @close(i32 %62)
%64 = getelementptr inbounds [10 x i8], [10 x i8]* %10, i64 0, i64 0
%65 = call i32 @remove(i8* %64)
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
br label %101
67: ; preds = %30
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%69 = getelementptr inbounds [10 x i8], [10 x i8]* %10, i64 0, i64 0
%70 = load i32, i32* @O_WRONLY
%71 = call i32 @open(i8* %69, i32 %70)
store i32 %71, i32* %6
%72 = icmp slt i32 %71, 0
br i1 %72, label %73, label %78
73: ; preds = %67
%74 = load i32, i32* @errno
%75 = load i32, i32* @errno
%76 = call i8* @strerror(i32 %75)
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0), i32 %74, i8* %76)
store i32 -1, i32* %3
br label %102
78: ; preds = %67
%79 = call i32 @time(i32* null)
store i32 %79, i32* %11
%80 = call i32 @localtime(i32* %11)
%81 = call i8* @asctime(i32 %80)
store i8* %81, i8** %14
%82 = load i32, i32* %6
%83 = load i8*, i8** %14
%84 = load i8*, i8** %14
%85 = call i32 @strlen(i8* %84)
%86 = call i32 @write(i32 %82, i8* %83, i32 %85)
store i32 %86, i32* %8
%87 = load i32, i32* %8
%88 = load i32, i32* %12
%89 = icmp ne i32 %87, %88
br i1 %89, label %90, label %97
90: ; preds = %78
%91 = load i32, i32* @errno
%92 = load i32, i32* @errno
%93 = call i8* @strerror(i32 %92)
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.8, i64 0, i64 0), i32 %91, i8* %93)
%95 = load i32, i32* %6
%96 = call i32 @close(i32 %95)
store i32 -1, i32* %3
br label %102
97: ; preds = %78
%98 = load i32, i32* %6
%99 = call i32 @close(i32 %98)
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
br label %101
101: ; preds = %97, %59
store i32 0, i32* %3
br label %102
102: ; preds = %101, %90, %73, %52, %40, %25
%103 = load i32, i32* %3
ret i32 %103
}

LLVM IR (-O2):
@__const.main.name = [10 x i8] c"data.fifo\00"
@.str = [28 x i8] c"mkfifo error. errno#%d: %s\0A\00"
@errno = global i32 0
@O_RDONLY = global i32 0
@.str.2 = [31 x i8] c"fifo open error. errno#%d: %s\0A\00"
@.str.3 = [37 x i8] c"child fifo read error. errno#%d: %s\0A\00"
@.str.4 = [18 x i8] c"Recieved text: %s\00"
@O_WRONLY = global i32 0
@.str.7 = [38 x i8] c"parent fifo open error. errno#%d: %s\0A\00"
@.str.8 = [39 x i8] c"parent fifo write error. errno#%d: %s\0A\00"
@str = [19 x i8] c"+Start parent work\00"
@str.10 = [20 x i8] c"+Finish parent work\00"
@str.11 = [18 x i8] c"+Start child work\00"
@str.12 = [19 x i8] c"+Finish child work\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [64 x i8]
%4 = alloca [10 x i8]
%5 = alloca i32
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%8 = bitcast i32* %5 to i8*
%9 = tail call i32 @time(i32* null)
store i32 %9, i32* %5
%10 = call i32 @localtime(i32* %5)
%11 = call i8* @asctime(i32 %10)
%12 = call i32 @strlen(i8* %11)
%13 = call i32 @memset(i8* %6, i32 0, i32 64)
%14 = call i64 @mkfifo(i8* %7, i32 438)
%15 = icmp slt i64 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %2
%17 = load i32, i32* @errno
%18 = call i8* @strerror(i32 %17)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %17, i8* %18)
br label %69
20: ; preds = %2
%21 = call i32 (...) @fork()
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %45
23: ; preds = %20
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.11, i64 0, i64 0))
%25 = load i32, i32* @O_RDONLY
%26 = call i32 @open(i8* %7, i32 %25)
%27 = icmp slt i32 %26, 0
br i1 %27, label %28, label %32
28: ; preds = %23
%29 = load i32, i32* @errno
%30 = call i8* @strerror(i32 %29)
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %29, i8* %30)
br label %69
32: ; preds = %23
%33 = call i32 @read(i32 %26, i8* %6, i32 64)
%34 = icmp eq i32 %33, %12
br i1 %34, label %40, label %35
35: ; preds = %32
%36 = load i32, i32* @errno
%37 = call i8* @strerror(i32 %36)
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i32 %36, i8* %37)
%39 = call i32 @close(i32 %26)
br label %69
40: ; preds = %32
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8* %6)
%42 = call i32 @close(i32 %26)
%43 = call i32 @remove(i8* %7)
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.12, i64 0, i64 0))
br label %69
45: ; preds = %20
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%47 = load i32, i32* @O_WRONLY
%48 = call i32 @open(i8* %7, i32 %47)
%49 = icmp slt i32 %48, 0
br i1 %49, label %50, label %54
50: ; preds = %45
%51 = load i32, i32* @errno
%52 = call i8* @strerror(i32 %51)
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0), i32 %51, i8* %52)
br label %69
54: ; preds = %45
%55 = call i32 @time(i32* null)
store i32 %55, i32* %5
%56 = call i32 @localtime(i32* %5)
%57 = call i8* @asctime(i32 %56)
%58 = call i32 @strlen(i8* %57)
%59 = call i32 @write(i32 %48, i8* %57, i32 %58)
%60 = icmp eq i32 %59, %12
br i1 %60, label %61, label %64
61: ; preds = %54
%62 = call i32 @close(i32 %48)
%63 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.10, i64 0, i64 0))
br label %69
64: ; preds = %54
%65 = load i32, i32* @errno
%66 = call i8* @strerror(i32 %65)
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.8, i64 0, i64 0), i32 %65, i8* %66)
%68 = call i32 @close(i32 %48)
br label %69
69: ; preds = %40, %61, %64, %28, %35, %50, %16
%70 = phi i32 [ -1, %16 ], [ -1, %28 ], [ -1, %35 ], [ -1, %50 ], [ -1, %64 ], [ 0, %61 ], [ 0, %40 ]
ret i32 %70
}