#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ timestr;
typedef int /*<<< orphan*/ time_t;
struct tm {
  scalar_t__ tm_year;
};
struct stat {
  int st_mode;
  scalar_t__ st_nlink;
  scalar_t__ st_size;
  int /*<<< orphan*/ st_mtime;
};
struct TYPE_3__ {
  scalar_t__ tm_year;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int S_IRGRP;
int S_IROTH;
int S_IRUSR;
scalar_t__ S_ISDIR(int);
int S_IWGRP;
int S_IWOTH;
int S_IWUSR;
int S_IXGRP;
int S_IXOTH;
int S_IXUSR;
scalar_t__ ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, ...);
TYPE_1__ *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ memcpy(struct tm *, TYPE_1__ *, int);
scalar_t__ my_lstat(char *, struct stat *);
int /*<<< orphan*/ mystrncpy(char *, scalar_t__, int);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void yftpd_stat(char *name, FILE *client, char verbose) {
  struct stat statbuf;
  char temp[255 + 3], linktarget[255 + 5], perm[11], timestr[17];
  struct tm filetime;
  time_t t;
  if (my_lstat(name, (struct stat *)&statbuf) < 0)
    return;
  if (!verbose) {
    fprintf(client, "%s\r\n", name);
    return;
  }
  strcpy(perm, "----------");
  if (S_ISDIR(statbuf.st_mode))
    perm[0] = 'd';
  if (statbuf.st_mode & S_IRUSR)
    perm[1] = 'r';
  if (statbuf.st_mode & S_IWUSR)
    perm[2] = 'w';
  if (statbuf.st_mode & S_IXUSR)
    perm[3] = 'x';
  if (statbuf.st_mode & S_IRGRP)
    perm[4] = 'r';
  if (statbuf.st_mode & S_IWGRP)
    perm[5] = 'w';
  if (statbuf.st_mode & S_IXGRP)
    perm[6] = 'x';
  if (statbuf.st_mode & S_IROTH)
    perm[7] = 'r';
  if (statbuf.st_mode & S_IWOTH)
    perm[8] = 'w';
  if (statbuf.st_mode & S_IXOTH)
    perm[9] = 'x';
  linktarget[0] = '\0';
  memcpy(&filetime, localtime(&(statbuf.st_mtime)), sizeof(struct tm));
  time(&t);
  if (filetime.tm_year == localtime(&t)->tm_year)
    mystrncpy(timestr, ctime(&(statbuf.st_mtime)) + 4, 12);
  else
    strftime(timestr, sizeof(timestr), "%b %d  %G", &filetime);
  fprintf(client, "%s %3i %-8s %-8s %8lu %s %s%s\r\n", perm,
          (int)statbuf.st_nlink, "bbs", "nobody",
          (unsigned long)statbuf.st_size, timestr, name, linktarget);
}


x86 assembly (clang, -O0):
<yftpd_stat>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x2b8,%rsp
mov    %dl,%al
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1090 <my_lstat@plt>
cmp    $0x0,%rax
jge    11d5 <yftpd_stat+0x35>
jmp    1430 <yftpd_stat+0x290>
cmpb   $0x0,-0x19(%rbp)
jne    11fa <yftpd_stat+0x5a>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe42(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1430 <yftpd_stat+0x290>
lea    -0x26b(%rbp),%rdi
lea    0xdf8(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x40(%rbp),%edi
call   1060 <S_ISDIR@plt>
cmp    $0x0,%rax
je     1226 <yftpd_stat+0x86>
movb   $0x64,-0x26b(%rbp)
mov    -0x40(%rbp),%eax
mov    0x2d78(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1242 <yftpd_stat+0xa2>
movb   $0x72,-0x26a(%rbp)
mov    -0x40(%rbp),%eax
mov    0x2d84(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     125e <yftpd_stat+0xbe>
movb   $0x77,-0x269(%rbp)
mov    -0x40(%rbp),%eax
mov    0x2d78(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     127a <yftpd_stat+0xda>
movb   $0x78,-0x268(%rbp)
mov    -0x40(%rbp),%eax
mov    0x2d34(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1296 <yftpd_stat+0xf6>
movb   $0x72,-0x267(%rbp)
mov    -0x40(%rbp),%eax
mov    0x2d38(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     12b2 <yftpd_stat+0x112>
movb   $0x77,-0x266(%rbp)
mov    -0x40(%rbp),%eax
mov    0x2d0c(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     12ce <yftpd_stat+0x12e>
movb   $0x78,-0x265(%rbp)
mov    -0x40(%rbp),%eax
mov    0x2cd8(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     12ea <yftpd_stat+0x14a>
movb   $0x72,-0x264(%rbp)
mov    -0x40(%rbp),%eax
mov    0x2ca4(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1306 <yftpd_stat+0x166>
movb   $0x77,-0x263(%rbp)
mov    -0x40(%rbp),%eax
mov    0x2cd8(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1322 <yftpd_stat+0x182>
movb   $0x78,-0x262(%rbp)
movb   $0x0,-0x260(%rbp)
lea    -0x40(%rbp),%rdi
add    $0x18,%rdi
call   1030 <localtime@plt>
mov    %rax,%rsi
lea    -0x288(%rbp),%rdi
mov    $0x8,%edx
call   1080 <memcpy@plt>
lea    -0x28c(%rbp),%rdi
call   10a0 <time@plt>
mov    -0x288(%rbp),%rax
mov    %rax,-0x298(%rbp)
lea    -0x28c(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,%rcx
mov    -0x298(%rbp),%rax
cmp    (%rcx),%rax
jne    13bb <yftpd_stat+0x21b>
lea    -0x280(%rbp),%rax
mov    %rax,-0x2a0(%rbp)
lea    -0x40(%rbp),%rdi
add    $0x18,%rdi
call   1050 <ctime@plt>
mov    -0x2a0(%rbp),%rdi
mov    %rax,%rsi
add    $0x4,%rsi
mov    $0xc,%edx
call   10c0 <mystrncpy@plt>
jmp    13da <yftpd_stat+0x23a>
lea    -0x280(%rbp),%rdi
mov    $0x11,%esi
lea    0xc3d(%rip),%rdx
lea    -0x288(%rbp),%rcx
call   10b0 <strftime@plt>
mov    -0x18(%rbp),%rdi
lea    -0x26b(%rbp),%rdx
mov    -0x38(%rbp),%rax
mov    %eax,%ecx
mov    -0x30(%rbp),%rbx
lea    -0x280(%rbp),%r11
mov    -0x10(%rbp),%r10
lea    -0x260(%rbp),%rax
lea    0xc0d(%rip),%rsi
lea    0xc26(%rip),%r8
lea    0xc23(%rip),%r9
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x0,%al
call   1070 <fprintf@plt>
add    $0x2b8,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<yftpd_stat>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x170,%rsp
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%r12
lea    0x20(%rsp),%rsi
call   1090 <my_lstat@plt>
test   %rax,%rax
js     135a <yftpd_stat+0x1ba>
test   %bpl,%bpl
je     12eb <yftpd_stat+0x14b>
lea    0xe26(%rip),%rsi
lea    0x5(%rsp),%rdi
call   1040 <strcpy@plt>
mov    0x20(%rsp),%edi
call   1060 <S_ISDIR@plt>
test   %rax,%rax
je     11f7 <yftpd_stat+0x57>
movb   $0x64,0x5(%rsp)
mov    0x20(%rsp),%eax
mov    0x2da6(%rip),%rcx
test   %eax,(%rcx)
je     120b <yftpd_stat+0x6b>
movb   $0x72,0x6(%rsp)
mov    0x2dbe(%rip),%rcx
test   %eax,(%rcx)
je     121b <yftpd_stat+0x7b>
movb   $0x77,0x7(%rsp)
mov    0x2dbe(%rip),%rcx
test   %eax,(%rcx)
je     122b <yftpd_stat+0x8b>
movb   $0x78,0x8(%rsp)
mov    0x2d86(%rip),%rcx
test   %eax,(%rcx)
je     123b <yftpd_stat+0x9b>
movb   $0x72,0x9(%rsp)
mov    0x2d96(%rip),%rcx
test   %eax,(%rcx)
je     124b <yftpd_stat+0xab>
movb   $0x77,0xa(%rsp)
mov    0x2d76(%rip),%rcx
test   %eax,(%rcx)
je     125b <yftpd_stat+0xbb>
movb   $0x78,0xb(%rsp)
mov    0x2d4e(%rip),%rcx
test   %eax,(%rcx)
je     126b <yftpd_stat+0xcb>
movb   $0x72,0xc(%rsp)
mov    0x2d26(%rip),%rcx
test   %eax,(%rcx)
je     127b <yftpd_stat+0xdb>
movb   $0x77,0xd(%rsp)
mov    0x2d66(%rip),%rcx
test   %eax,(%rcx)
je     128b <yftpd_stat+0xeb>
movb   $0x78,0xe(%rsp)
movb   $0x0,0x60(%rsp)
lea    0x38(%rsp),%r15
mov    %r15,%rdi
call   1030 <localtime@plt>
lea    0x10(%rsp),%rdi
mov    %rax,%rsi
mov    $0x8,%edx
call   1080 <memcpy@plt>
lea    0x1c(%rsp),%rbp
mov    %rbp,%rdi
call   10a0 <time@plt>
mov    0x10(%rsp),%rbx
mov    %rbp,%rdi
call   1030 <localtime@plt>
cmp    (%rax),%rbx
jne    1301 <yftpd_stat+0x161>
mov    %r15,%rdi
call   1050 <ctime@plt>
lea    0x4(%rax),%rsi
lea    0x40(%rsp),%rdi
mov    $0xc,%edx
call   10c0 <mystrncpy@plt>
jmp    131c <yftpd_stat+0x17c>
lea    0xd3e(%rip),%rsi
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    135a <yftpd_stat+0x1ba>
lea    0xd03(%rip),%rdx
lea    0x40(%rsp),%rdi
lea    0x10(%rsp),%rcx
mov    $0x11,%esi
call   10b0 <strftime@plt>
mov    0x28(%rsp),%ecx
lea    0x60(%rsp),%rbp
lea    0x40(%rsp),%rbx
lea    0xce4(%rip),%rsi
lea    0xcfd(%rip),%r8
lea    0xcfa(%rip),%r9
lea    0x5(%rsp),%rdx
mov    %r14,%rdi
xor    %eax,%eax
push   %rbp
push   %r12
push   %rbx
push   0x48(%rsp)
call   1070 <fprintf@plt>
add    $0x20,%rsp
add    $0x170,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32, i64, i64, i32 }
%struct.tm = type { i64 }
%struct.TYPE_3__ = type { i64 }
@.str = [5 x i8] c"%s\0D\0A\00"
@.str.1 = [11 x i8] c"----------\00"
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IXUSR = global i32 0
@S_IRGRP = global i32 0
@S_IWGRP = global i32 0
@S_IXGRP = global i32 0
@S_IROTH = global i32 0
@S_IWOTH = global i32 0
@S_IXOTH = global i32 0
@.str.2 = [10 x i8] c"%b %d %G\00"
@.str.3 = [32 x i8] c"%s %3i %-8s %-8s %8lu %s %s%s\0D\0A\00"
@.str.4 = [4 x i8] c"bbs\00"
@.str.5 = [7 x i8] c"nobody\00"
define void @yftpd_stat(i8* %0, i32* %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8
%7 = alloca %struct.stat
%8 = alloca [258 x i8]
%9 = alloca [260 x i8]
%10 = alloca [11 x i8]
%11 = alloca [17 x i8]
%12 = alloca %struct.tm
%13 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i8 %2, i8* %6
%14 = load i8*, i8** %4
%15 = call i64 @my_lstat(i8* %14, %struct.stat* %7)
%16 = icmp slt i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %3
br label %139
18: ; preds = %3
%19 = load i8, i8* %6
%20 = icmp ne i8 %19, 0
br i1 %20, label %25, label %21
21: ; preds = %18
%22 = load i32*, i32** %5
%23 = load i8*, i8** %4
%24 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %23)
br label %139
25: ; preds = %18
%26 = getelementptr inbounds [11 x i8], [11 x i8]* %10, i64 0, i64 0
%27 = call i32 @strcpy(i8* %26, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%28 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 0
%29 = load i32, i32* %28
%30 = call i64 @S_ISDIR(i32 %29)
%31 = icmp ne i64 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %25
%33 = getelementptr inbounds [11 x i8], [11 x i8]* %10, i64 0, i64 0
store i8 100, i8* %33
br label %34
34: ; preds = %32, %25
%35 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 0
%36 = load i32, i32* %35
%37 = load i32, i32* @S_IRUSR
%38 = and i32 %36, %37
%39 = icmp ne i32 %38, 0
br i1 %39, label %40, label %42
40: ; preds = %34
%41 = getelementptr inbounds [11 x i8], [11 x i8]* %10, i64 0, i64 1
store i8 114, i8* %41
br label %42
42: ; preds = %40, %34
%43 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 0
%44 = load i32, i32* %43
%45 = load i32, i32* @S_IWUSR
%46 = and i32 %44, %45
%47 = icmp ne i32 %46, 0
br i1 %47, label %48, label %50
48: ; preds = %42
%49 = getelementptr inbounds [11 x i8], [11 x i8]* %10, i64 0, i64 2
store i8 119, i8* %49
br label %50
50: ; preds = %48, %42
%51 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 0
%52 = load i32, i32* %51
%53 = load i32, i32* @S_IXUSR
%54 = and i32 %52, %53
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %50
%57 = getelementptr inbounds [11 x i8], [11 x i8]* %10, i64 0, i64 3
store i8 120, i8* %57
br label %58
58: ; preds = %56, %50
%59 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 0
%60 = load i32, i32* %59
%61 = load i32, i32* @S_IRGRP
%62 = and i32 %60, %61
%63 = icmp ne i32 %62, 0
br i1 %63, label %64, label %66
64: ; preds = %58
%65 = getelementptr inbounds [11 x i8], [11 x i8]* %10, i64 0, i64 4
store i8 114, i8* %65
br label %66
66: ; preds = %64, %58
%67 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 0
%68 = load i32, i32* %67
%69 = load i32, i32* @S_IWGRP
%70 = and i32 %68, %69
%71 = icmp ne i32 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %66
%73 = getelementptr inbounds [11 x i8], [11 x i8]* %10, i64 0, i64 5
store i8 119, i8* %73
br label %74
74: ; preds = %72, %66
%75 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 0
%76 = load i32, i32* %75
%77 = load i32, i32* @S_IXGRP
%78 = and i32 %76, %77
%79 = icmp ne i32 %78, 0
br i1 %79, label %80, label %82
80: ; preds = %74
%81 = getelementptr inbounds [11 x i8], [11 x i8]* %10, i64 0, i64 6
store i8 120, i8* %81
br label %82
82: ; preds = %80, %74
%83 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 0
%84 = load i32, i32* %83
%85 = load i32, i32* @S_IROTH
%86 = and i32 %84, %85
%87 = icmp ne i32 %86, 0
br i1 %87, label %88, label %90
88: ; preds = %82
%89 = getelementptr inbounds [11 x i8], [11 x i8]* %10, i64 0, i64 7
store i8 114, i8* %89
br label %90
90: ; preds = %88, %82
%91 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 0
%92 = load i32, i32* %91
%93 = load i32, i32* @S_IWOTH
%94 = and i32 %92, %93
%95 = icmp ne i32 %94, 0
br i1 %95, label %96, label %98
96: ; preds = %90
%97 = getelementptr inbounds [11 x i8], [11 x i8]* %10, i64 0, i64 8
store i8 119, i8* %97
br label %98
98: ; preds = %96, %90
%99 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 0
%100 = load i32, i32* %99
%101 = load i32, i32* @S_IXOTH
%102 = and i32 %100, %101
%103 = icmp ne i32 %102, 0
br i1 %103, label %104, label %106
104: ; preds = %98
%105 = getelementptr inbounds [11 x i8], [11 x i8]* %10, i64 0, i64 9
store i8 120, i8* %105
br label %106
106: ; preds = %104, %98
%107 = getelementptr inbounds [260 x i8], [260 x i8]* %9, i64 0, i64 0
store i8 0, i8* %107
%108 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 3
%109 = call %struct.TYPE_3__* @localtime(i32* %108)
%110 = call i32 @memcpy(%struct.tm* %12, %struct.TYPE_3__* %109, i32 8)
%111 = call i32 @time(i32* %13)
%112 = getelementptr inbounds %struct.tm, %struct.tm* %12, i32 0, i32 0
%113 = load i64, i64* %112
%114 = call %struct.TYPE_3__* @localtime(i32* %13)
%115 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %114, i32 0, i32 0
%116 = load i64, i64* %115
%117 = icmp eq i64 %113, %116
br i1 %117, label %118, label %124
118: ; preds = %106
%119 = getelementptr inbounds [17 x i8], [17 x i8]* %11, i64 0, i64 0
%120 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 3
%121 = call i64 @ctime(i32* %120)
%122 = add nsw i64 %121, 4
%123 = call i32 @mystrncpy(i8* %119, i64 %122, i32 12)
br label %127
124: ; preds = %106
%125 = getelementptr inbounds [17 x i8], [17 x i8]* %11, i64 0, i64 0
%126 = call i32 @strftime(i8* %125, i32 17, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), %struct.tm* %12)
br label %127
127: ; preds = %124, %118
%128 = load i32*, i32** %5
%129 = getelementptr inbounds [11 x i8], [11 x i8]* %10, i64 0, i64 0
%130 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 1
%131 = load i64, i64* %130
%132 = trunc i64 %131 to i32
%133 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 2
%134 = load i64, i64* %133
%135 = getelementptr inbounds [17 x i8], [17 x i8]* %11, i64 0, i64 0
%136 = load i8*, i8** %4
%137 = getelementptr inbounds [260 x i8], [260 x i8]* %9, i64 0, i64 0
%138 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %128, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %129, i32 %132, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i64 %134, i8* %135, i8* %136, i8* %137)
br label %139
139: ; preds = %127, %21, %17
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32, i64, i64, i32 }
%struct.tm = type { i64 }
%struct.TYPE_3__ = type { i64 }
@.str = [5 x i8] c"%s\0D\0A\00"
@.str.1 = [11 x i8] c"----------\00"
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IXUSR = global i32 0
@S_IRGRP = global i32 0
@S_IWGRP = global i32 0
@S_IXGRP = global i32 0
@S_IROTH = global i32 0
@S_IWOTH = global i32 0
@S_IXOTH = global i32 0
@.str.2 = [10 x i8] c"%b %d %G\00"
@.str.3 = [32 x i8] c"%s %3i %-8s %-8s %8lu %s %s%s\0D\0A\00"
@.str.4 = [4 x i8] c"bbs\00"
@.str.5 = [7 x i8] c"nobody\00"
define void @yftpd_stat(i8* %0, i32* nocapture %1, i8 signext %2) {
%4 = alloca %struct.stat
%5 = alloca [260 x i8]
%6 = alloca [11 x i8]
%7 = alloca [17 x i8]
%8 = alloca %struct.tm
%9 = alloca i32
%10 = bitcast %struct.stat* %4 to i8*
%11 = getelementptr inbounds [260 x i8], [260 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%13 = getelementptr inbounds [17 x i8], [17 x i8]* %7, i64 0, i64 0
%14 = bitcast %struct.tm* %8 to i8*
%15 = bitcast i32* %9 to i8*
%16 = call i64 @my_lstat(i8* %0, %struct.stat* %4)
%17 = icmp slt i64 %16, 0
br i1 %17, label %108, label %18
18: ; preds = %3
%19 = icmp eq i8 %2, 0
br i1 %19, label %20, label %22
20: ; preds = %18
%21 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %108
22: ; preds = %18
%23 = call i32 @strcpy(i8* %12, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%24 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 0
%25 = load i32, i32* %24
%26 = call i64 @S_ISDIR(i32 %25)
%27 = icmp eq i64 %26, 0
br i1 %27, label %29, label %28
28: ; preds = %22
store i8 100, i8* %12
br label %29
29: ; preds = %28, %22
%30 = load i32, i32* %24
%31 = load i32, i32* @S_IRUSR
%32 = and i32 %31, %30
%33 = icmp eq i32 %32, 0
br i1 %33, label %36, label %34
34: ; preds = %29
%35 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 1
store i8 114, i8* %35
br label %36
36: ; preds = %34, %29
%37 = load i32, i32* @S_IWUSR
%38 = and i32 %37, %30
%39 = icmp eq i32 %38, 0
br i1 %39, label %42, label %40
40: ; preds = %36
%41 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 2
store i8 119, i8* %41
br label %42
42: ; preds = %40, %36
%43 = load i32, i32* @S_IXUSR
%44 = and i32 %43, %30
%45 = icmp eq i32 %44, 0
br i1 %45, label %48, label %46
46: ; preds = %42
%47 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 3
store i8 120, i8* %47
br label %48
48: ; preds = %46, %42
%49 = load i32, i32* @S_IRGRP
%50 = and i32 %49, %30
%51 = icmp eq i32 %50, 0
br i1 %51, label %54, label %52
52: ; preds = %48
%53 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 4
store i8 114, i8* %53
br label %54
54: ; preds = %52, %48
%55 = load i32, i32* @S_IWGRP
%56 = and i32 %55, %30
%57 = icmp eq i32 %56, 0
br i1 %57, label %60, label %58
58: ; preds = %54
%59 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 5
store i8 119, i8* %59
br label %60
60: ; preds = %58, %54
%61 = load i32, i32* @S_IXGRP
%62 = and i32 %61, %30
%63 = icmp eq i32 %62, 0
br i1 %63, label %66, label %64
64: ; preds = %60
%65 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 6
store i8 120, i8* %65
br label %66
66: ; preds = %64, %60
%67 = load i32, i32* @S_IROTH
%68 = and i32 %67, %30
%69 = icmp eq i32 %68, 0
br i1 %69, label %72, label %70
70: ; preds = %66
%71 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 7
store i8 114, i8* %71
br label %72
72: ; preds = %70, %66
%73 = load i32, i32* @S_IWOTH
%74 = and i32 %73, %30
%75 = icmp eq i32 %74, 0
br i1 %75, label %78, label %76
76: ; preds = %72
%77 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 8
store i8 119, i8* %77
br label %78
78: ; preds = %76, %72
%79 = load i32, i32* @S_IXOTH
%80 = and i32 %79, %30
%81 = icmp eq i32 %80, 0
br i1 %81, label %84, label %82
82: ; preds = %78
%83 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 9
store i8 120, i8* %83
br label %84
84: ; preds = %82, %78
store i8 0, i8* %11
%85 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 3
%86 = call %struct.TYPE_3__* @localtime(i32* %85)
%87 = call i32 @memcpy(%struct.tm* %8, %struct.TYPE_3__* %86, i32 8)
%88 = call i32 @time(i32* %9)
%89 = getelementptr inbounds %struct.tm, %struct.tm* %8, i64 0, i32 0
%90 = load i64, i64* %89
%91 = call %struct.TYPE_3__* @localtime(i32* %9)
%92 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %91, i64 0, i32 0
%93 = load i64, i64* %92
%94 = icmp eq i64 %90, %93
br i1 %94, label %95, label %99
95: ; preds = %84
%96 = call i64 @ctime(i32* %85)
%97 = add nsw i64 %96, 4
%98 = call i32 @mystrncpy(i8* %13, i64 %97, i32 12)
br label %101
99: ; preds = %84
%100 = call i32 @strftime(i8* %13, i32 17, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), %struct.tm* %8)
br label %101
101: ; preds = %99, %95
%102 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 1
%103 = load i64, i64* %102
%104 = trunc i64 %103 to i32
%105 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 2
%106 = load i64, i64* %105
%107 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %12, i32 %104, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i64 %106, i8* %13, i8* %0, i8* %11)
br label %108
108: ; preds = %3, %101, %20
ret void
}