#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*/ uname;
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};
struct stat {
  int dummy;
};
struct passwd {
  int dummy;
};
struct group {
  int dummy;
};
struct flock {
  void *l_type;
  int /*<<< orphan*/ l_pid;
  scalar_t__ l_len;
  scalar_t__ l_start;
  int /*<<< orphan*/ l_whence;
};
struct dirent {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void *F_RDLCK;
int /*<<< orphan*/ F_SETLK;
int /*<<< orphan*/ F_SETLKW;
void *F_UNLCK;
void *F_WRLCK;
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ R_OK;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ W_OK;
int access(char const *, int /*<<< orphan*/);
char *asctime(struct tm *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fcntl(int, int /*<<< orphan*/, struct flock *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *);
int /*<<< orphan*/ getpid();
struct tm *localtime(int /*<<< orphan*/ *);
int open(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ *popen(char *, char *);
int /*<<< orphan*/ printf(char *, char *, char const *);
int stat(char const *, struct stat *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  struct flock fl;
  fl.l_type = F_WRLCK;
  fl.l_whence = SEEK_SET;
  fl.l_start = 0;
  fl.l_len = 0;
  fl.l_pid = getpid();
  int result, fd;
  time_t rawtime;
  struct tm *timeinfo;
  time(&rawtime);
  timeinfo = localtime(&rawtime);
  const char *filename = argv[1];
  struct stat statbuf;
  FILE *user;
  FILE *writefile;
  char *command = "whoami";
  struct dirent *dp;
  struct passwd *pwd;
  struct group *grp;
  struct tm *tm;
  char datestring[256];
  user = popen(command, "r");
  char uname[10];
  fd = open(filename, O_RDWR), 0;
  fgets(uname, sizeof(uname) - 2, user);
  result = stat(filename, &statbuf);
  result = access(filename, W_OK);
  if (result == 0) {
    printf("%s has write access to %s\n", uname, filename);
  } else {
    printf("%s does not have write access to %s\n", uname, filename);
  }
  result = access(filename, R_OK);
  if (result == 0) {
    printf("%s has read access to %s\n", uname, filename);
  } else {
    printf("%s does not have read access to %s\n", uname, filename);
  }
  fl.l_type = F_RDLCK;
  fcntl(fd, F_SETLKW, &fl);
  fl.l_type = F_UNLCK;
  fcntl(fd, F_SETLK, &fl);
  fl.l_type = F_WRLCK;
  fcntl(fd, F_SETLKW, &fl);
  writefile = fopen(argv[1], "a+");
  fprintf(writefile, "%s %s", "Write time: ", asctime(timeinfo));
  fclose(writefile);
  fl.l_type = F_UNLCK;
  fcntl(fd, F_SETLK, &fl);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2db0(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
mov    0x2daa(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    $0x0,%al
call   1050 <getpid@plt>
mov    %eax,-0x30(%rbp)
lea    -0x44(%rbp),%rdi
call   10c0 <time@plt>
lea    -0x44(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x58(%rbp)
lea    0xdaa(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rdi
lea    0xda2(%rip),%rsi
call   10f0 <popen@plt>
mov    %rax,-0x68(%rbp)
mov    -0x58(%rbp),%rdi
mov    0x2d6f(%rip),%rax
mov    (%rax),%esi
call   10d0 <open@plt>
mov    %eax,-0x40(%rbp)
lea    -0x1aa(%rbp),%rdi
mov    -0x68(%rbp),%rdx
mov    $0x8,%esi
call   1090 <fgets@plt>
mov    -0x58(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   10b0 <stat@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x58(%rbp),%rdi
mov    0x2d1d(%rip),%rax
mov    (%rax),%esi
call   10e0 <access@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jne    12e3 <main+0x103>
lea    -0x1aa(%rbp),%rsi
mov    -0x58(%rbp),%rdx
lea    0xd30(%rip),%rdi
call   1080 <printf@plt>
jmp    12fa <main+0x11a>
lea    -0x1aa(%rbp),%rsi
mov    -0x58(%rbp),%rdx
lea    0xd2f(%rip),%rdi
call   1080 <printf@plt>
mov    -0x58(%rbp),%rdi
mov    0x2ca3(%rip),%rax
mov    (%rax),%esi
call   10e0 <access@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jne    1335 <main+0x155>
lea    -0x1aa(%rbp),%rsi
mov    -0x58(%rbp),%rdx
lea    0xd1e(%rip),%rdi
call   1080 <printf@plt>
jmp    134c <main+0x16c>
lea    -0x1aa(%rbp),%rsi
mov    -0x58(%rbp),%rdx
lea    0xd1c(%rip),%rdi
call   1080 <printf@plt>
mov    0x2c45(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x40(%rbp),%edi
mov    0x2c7c(%rip),%rax
mov    (%rax),%esi
lea    -0x38(%rbp),%rdx
call   1040 <fcntl@plt>
mov    0x2c52(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x40(%rbp),%edi
mov    0x2c51(%rip),%rax
mov    (%rax),%esi
lea    -0x38(%rbp),%rdx
call   1040 <fcntl@plt>
mov    0x2c17(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x40(%rbp),%edi
mov    0x2c36(%rip),%rax
mov    (%rax),%esi
lea    -0x38(%rbp),%rdx
call   1040 <fcntl@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xcc3(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0x1b8(%rbp)
mov    -0x50(%rbp),%rdi
call   1070 <asctime@plt>
mov    -0x1b8(%rbp),%rdi
mov    %rax,%rcx
lea    0xc98(%rip),%rsi
lea    0xc97(%rip),%rdx
call   10a0 <fprintf@plt>
mov    -0x70(%rbp),%rdi
call   1060 <fclose@plt>
mov    0x2bba(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x40(%rbp),%edi
mov    0x2bb9(%rip),%rax
mov    (%rax),%esi
lea    -0x38(%rbp),%rdx
call   1040 <fcntl@plt>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%r15
mov    0x2db8(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x10(%rsp)
mov    0x2db1(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x30(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x20(%rsp)
xor    %eax,%eax
call   1050 <getpid@plt>
mov    %eax,0x18(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   10c0 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
mov    %rax,(%rsp)
mov    0x8(%r15),%rbx
lea    0xdbc(%rip),%rdi
lea    0xdbc(%rip),%rsi
call   10f0 <popen@plt>
mov    %rax,%rbp
mov    0x2d8e(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   10d0 <open@plt>
mov    %eax,%r13d
lea    0x3e(%rsp),%r12
mov    %r12,%rdi
mov    $0x8,%esi
mov    %rbp,%rdx
call   1090 <fgets@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   10b0 <stat@plt>
mov    0x2d40(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   10e0 <access@plt>
test   %eax,%eax
lea    0xd66(%rip),%rax
lea    0xd7a(%rip),%rdi
cmove  %rax,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1080 <printf@plt>
mov    0x2ce8(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   10e0 <access@plt>
test   %eax,%eax
lea    0xd76(%rip),%rax
lea    0xd89(%rip),%rdi
cmove  %rax,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1080 <printf@plt>
mov    0x2ca8(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x10(%rsp)
mov    0x2ce1(%rip),%rbp
mov    0x0(%rbp),%esi
lea    0x10(%rsp),%rbx
mov    %r13d,%edi
mov    %rbx,%rdx
call   1040 <fcntl@plt>
mov    0x2caf(%rip),%r12
mov    (%r12),%rax
mov    %rax,0x10(%rsp)
mov    0x2caf(%rip),%r14
mov    (%r14),%esi
mov    %r13d,%edi
mov    %rbx,%rdx
call   1040 <fcntl@plt>
mov    0x2c72(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x10(%rsp)
mov    0x0(%rbp),%esi
mov    %r13d,%edi
mov    %rbx,%rdx
call   1040 <fcntl@plt>
mov    0x8(%r15),%rdi
lea    0xd28(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,%rbp
mov    (%rsp),%rdi
call   1070 <asctime@plt>
lea    0xd13(%rip),%rsi
lea    0xd12(%rip),%rdx
mov    %rbp,%rdi
mov    %rax,%rcx
call   10a0 <fprintf@plt>
mov    %rbp,%rdi
call   1060 <fclose@plt>
mov    (%r12),%rax
mov    %rax,0x10(%rsp)
mov    (%r14),%esi
mov    %r13d,%edi
mov    %rbx,%rdx
call   1040 <fcntl@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.flock = type { i8*, i32, i64, i64, i32 }
%struct.tm = type { i32 }
%struct.stat = type { i32 }
%struct.dirent = type { i32 }
%struct.passwd = type { i32 }
%struct.group = type { i32 }
@F_WRLCK = global i8* null
@SEEK_SET = global i32 0
@.str = [7 x i8] c"whoami\00"
@.str.1 = [2 x i8] c"r\00"
@O_RDWR = global i32 0
@W_OK = global i32 0
@.str.2 = [27 x i8] c"%s has write access to %s\0A\00"
@.str.3 = [37 x i8] c"%s does not have write access to %s\0A\00"
@R_OK = global i32 0
@.str.4 = [26 x i8] c"%s has read access to %s\0A\00"
@.str.5 = [36 x i8] c"%s does not have read access to %s\0A\00"
@F_RDLCK = global i8* null
@F_SETLKW = global i32 0
@F_UNLCK = global i8* null
@F_SETLK = global i32 0
@.str.6 = [3 x i8] c"a+\00"
@.str.7 = [6 x i8] c"%s %s\00"
@.str.8 = [13 x i8] c"Write time: \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.flock
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.tm*
%11 = alloca i8*
%12 = alloca %struct.stat
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i8*
%16 = alloca %struct.dirent*
%17 = alloca %struct.passwd*
%18 = alloca %struct.group*
%19 = alloca %struct.tm*
%20 = alloca [256 x i8]
%21 = alloca [10 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%22 = load i8*, i8** @F_WRLCK
%23 = getelementptr inbounds %struct.flock, %struct.flock* %6, i32 0, i32 0
store i8* %22, i8** %23
%24 = load i32, i32* @SEEK_SET
%25 = getelementptr inbounds %struct.flock, %struct.flock* %6, i32 0, i32 4
store i32 %24, i32* %25
%26 = getelementptr inbounds %struct.flock, %struct.flock* %6, i32 0, i32 3
store i64 0, i64* %26
%27 = getelementptr inbounds %struct.flock, %struct.flock* %6, i32 0, i32 2
store i64 0, i64* %27
%28 = call i32 (...) @getpid()
%29 = getelementptr inbounds %struct.flock, %struct.flock* %6, i32 0, i32 1
store i32 %28, i32* %29
%30 = call i32 @time(i32* %9)
%31 = call %struct.tm* @localtime(i32* %9)
store %struct.tm* %31, %struct.tm** %10
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = load i8*, i8** %33
store i8* %34, i8** %11
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %15
%35 = load i8*, i8** %15
%36 = call i32* @popen(i8* %35, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %36, i32** %13
%37 = load i8*, i8** %11
%38 = load i32, i32* @O_RDWR
%39 = call i32 @open(i8* %37, i32 %38)
store i32 %39, i32* %8
%40 = getelementptr inbounds [10 x i8], [10 x i8]* %21, i64 0, i64 0
%41 = load i32*, i32** %13
%42 = call i32 @fgets(i8* %40, i32 8, i32* %41)
%43 = load i8*, i8** %11
%44 = call i32 @stat(i8* %43, %struct.stat* %12)
store i32 %44, i32* %7
%45 = load i8*, i8** %11
%46 = load i32, i32* @W_OK
%47 = call i32 @access(i8* %45, i32 %46)
store i32 %47, i32* %7
%48 = load i32, i32* %7
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %54
50: ; preds = %2
%51 = getelementptr inbounds [10 x i8], [10 x i8]* %21, i64 0, i64 0
%52 = load i8*, i8** %11
%53 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %51, i8* %52)
br label %58
54: ; preds = %2
%55 = getelementptr inbounds [10 x i8], [10 x i8]* %21, i64 0, i64 0
%56 = load i8*, i8** %11
%57 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i8* %55, i8* %56)
br label %58
58: ; preds = %54, %50
%59 = load i8*, i8** %11
%60 = load i32, i32* @R_OK
%61 = call i32 @access(i8* %59, i32 %60)
store i32 %61, i32* %7
%62 = load i32, i32* %7
%63 = icmp eq i32 %62, 0
br i1 %63, label %64, label %68
64: ; preds = %58
%65 = getelementptr inbounds [10 x i8], [10 x i8]* %21, i64 0, i64 0
%66 = load i8*, i8** %11
%67 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i8* %65, i8* %66)
br label %72
68: ; preds = %58
%69 = getelementptr inbounds [10 x i8], [10 x i8]* %21, i64 0, i64 0
%70 = load i8*, i8** %11
%71 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), i8* %69, i8* %70)
br label %72
72: ; preds = %68, %64
%73 = load i8*, i8** @F_RDLCK
%74 = getelementptr inbounds %struct.flock, %struct.flock* %6, i32 0, i32 0
store i8* %73, i8** %74
%75 = load i32, i32* %8
%76 = load i32, i32* @F_SETLKW
%77 = call i32 @fcntl(i32 %75, i32 %76, %struct.flock* %6)
%78 = load i8*, i8** @F_UNLCK
%79 = getelementptr inbounds %struct.flock, %struct.flock* %6, i32 0, i32 0
store i8* %78, i8** %79
%80 = load i32, i32* %8
%81 = load i32, i32* @F_SETLK
%82 = call i32 @fcntl(i32 %80, i32 %81, %struct.flock* %6)
%83 = load i8*, i8** @F_WRLCK
%84 = getelementptr inbounds %struct.flock, %struct.flock* %6, i32 0, i32 0
store i8* %83, i8** %84
%85 = load i32, i32* %8
%86 = load i32, i32* @F_SETLKW
%87 = call i32 @fcntl(i32 %85, i32 %86, %struct.flock* %6)
%88 = load i8**, i8*** %5
%89 = getelementptr inbounds i8*, i8** %88, i64 1
%90 = load i8*, i8** %89
%91 = call i32* @fopen(i8* %90, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
store i32* %91, i32** %14
%92 = load i32*, i32** %14
%93 = load %struct.tm*, %struct.tm** %10
%94 = call i8* @asctime(%struct.tm* %93)
%95 = call i32 @fprintf(i32* %92, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8* %94)
%96 = load i32*, i32** %14
%97 = call i32 @fclose(i32* %96)
%98 = load i8*, i8** @F_UNLCK
%99 = getelementptr inbounds %struct.flock, %struct.flock* %6, i32 0, i32 0
store i8* %98, i8** %99
%100 = load i32, i32* %8
%101 = load i32, i32* @F_SETLK
%102 = call i32 @fcntl(i32 %100, i32 %101, %struct.flock* %6)
ret i32 0
}

LLVM IR (-O2):
%struct.flock = type { i8*, i32, i64, i64, i32 }
%struct.stat = type { i32 }
%struct.tm = type { i32 }
%struct.dirent = type { i32 }
%struct.passwd = type { i32 }
%struct.group = type { i32 }
@F_WRLCK = global i8* null
@SEEK_SET = global i32 0
@.str = [7 x i8] c"whoami\00"
@.str.1 = [2 x i8] c"r\00"
@O_RDWR = global i32 0
@W_OK = global i32 0
@.str.2 = [27 x i8] c"%s has write access to %s\0A\00"
@.str.3 = [37 x i8] c"%s does not have write access to %s\0A\00"
@R_OK = global i32 0
@.str.4 = [26 x i8] c"%s has read access to %s\0A\00"
@.str.5 = [36 x i8] c"%s does not have read access to %s\0A\00"
@F_RDLCK = global i8* null
@F_SETLKW = global i32 0
@F_UNLCK = global i8* null
@F_SETLK = global i32 0
@.str.6 = [3 x i8] c"a+\00"
@.str.7 = [6 x i8] c"%s %s\00"
@.str.8 = [13 x i8] c"Write time: \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.flock
%4 = alloca i32
%5 = alloca %struct.stat
%6 = alloca [10 x i8]
%7 = bitcast %struct.flock* %3 to i8*
%8 = load i8*, i8** @F_WRLCK
%9 = getelementptr inbounds %struct.flock, %struct.flock* %3, i64 0, i32 0
store i8* %8, i8** %9
%10 = load i32, i32* @SEEK_SET
%11 = getelementptr inbounds %struct.flock, %struct.flock* %3, i64 0, i32 4
store i32 %10, i32* %11
%12 = getelementptr inbounds %struct.flock, %struct.flock* %3, i64 0, i32 2
%13 = bitcast i64* %12 to i8*
%14 = tail call i32 (...) @getpid()
%15 = getelementptr inbounds %struct.flock, %struct.flock* %3, i64 0, i32 1
store i32 %14, i32* %15
%16 = bitcast i32* %4 to i8*
%17 = call i32 @time(i32* %4)
%18 = call %struct.tm* @localtime(i32* %4)
%19 = getelementptr inbounds i8*, i8** %1, i64 1
%20 = load i8*, i8** %19
%21 = bitcast %struct.stat* %5 to i8*
%22 = call i32* @popen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%23 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%24 = load i32, i32* @O_RDWR
%25 = call i32 @open(i8* %20, i32 %24)
%26 = call i32 @fgets(i8* %23, i32 8, i32* %22)
%27 = call i32 @stat(i8* %20, %struct.stat* %5)
%28 = load i32, i32* @W_OK
%29 = call i32 @access(i8* %20, i32 %28)
%30 = icmp eq i32 %29, 0
%31 = select i1 %30, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0)
%32 = call i32 @printf(i8* %31, i8* %23, i8* %20)
%33 = load i32, i32* @R_OK
%34 = call i32 @access(i8* %20, i32 %33)
%35 = icmp eq i32 %34, 0
%36 = select i1 %35, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0)
%37 = call i32 @printf(i8* %36, i8* %23, i8* %20)
%38 = load i8*, i8** @F_RDLCK
store i8* %38, i8** %9
%39 = load i32, i32* @F_SETLKW
%40 = call i32 @fcntl(i32 %25, i32 %39, %struct.flock* %3)
%41 = load i8*, i8** @F_UNLCK
store i8* %41, i8** %9
%42 = load i32, i32* @F_SETLK
%43 = call i32 @fcntl(i32 %25, i32 %42, %struct.flock* %3)
%44 = load i8*, i8** @F_WRLCK
store i8* %44, i8** %9
%45 = load i32, i32* @F_SETLKW
%46 = call i32 @fcntl(i32 %25, i32 %45, %struct.flock* %3)
%47 = load i8*, i8** %19
%48 = call i32* @fopen(i8* %47, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%49 = call i8* @asctime(%struct.tm* %18)
%50 = call i32 @fprintf(i32* %48, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8* %49)
%51 = call i32 @fclose(i32* %48)
%52 = load i8*, i8** @F_UNLCK
store i8* %52, i8** %9
%53 = load i32, i32* @F_SETLK
%54 = call i32 @fcntl(i32 %25, i32 %53, %struct.flock* %3)
ret i32 0
}