#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 st_mode;
  scalar_t__ st_ctime;
  scalar_t__ st_mtime;
  scalar_t__ st_atime;
  scalar_t__ st_blocks;
  scalar_t__ st_size;
  scalar_t__ st_gid;
  scalar_t__ st_uid;
  scalar_t__ st_nlink;
  scalar_t__ st_ino;
};

/* Variables and functions */
#define S_IFBLK 134
#define S_IFCHR 133
#define S_IFDIR 132
#define S_IFIFO 131
#define S_IFLNK 130
int S_IFMT;
#define S_IFREG 129
#define S_IFSOCK 128
int S_IRWXG;
int S_IRWXO;
int S_IRWXU;
int S_ISGID;
int S_ISUID;
int S_ISVTX;
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strcmp(char const *, char *);
void show_stat(struct stat *sp, const char *what) {
  if (strcmp(what, "mode") == 0)
    printf("0%o", (unsigned int)(sp->st_mode & (S_ISUID | S_ISGID | S_ISVTX |
                                                S_IRWXU | S_IRWXG | S_IRWXO)));
  else if (strcmp(what, "inode") == 0)
    printf("%lld", (long long)sp->st_ino);
  else if (strcmp(what, "nlink") == 0)
    printf("%lld", (long long)sp->st_nlink);
  else if (strcmp(what, "uid") == 0)
    printf("%d", (int)sp->st_uid);
  else if (strcmp(what, "gid") == 0)
    printf("%d", (int)sp->st_gid);
  else if (strcmp(what, "size") == 0)
    printf("%lld", (long long)sp->st_size);
  else if (strcmp(what, "blocks") == 0)
    printf("%lld", (long long)sp->st_blocks);
  else if (strcmp(what, "atime") == 0)
    printf("%lld", (long long)sp->st_atime);
  else if (strcmp(what, "mtime") == 0)
    printf("%lld", (long long)sp->st_mtime);
  else if (strcmp(what, "ctime") == 0)
    printf("%lld", (long long)sp->st_ctime);
  else if (strcmp(what, "type") == 0) {
    switch (sp->st_mode & S_IFMT) {
    case S_IFIFO:
      printf("fifo");
      break;
    case S_IFCHR:
      printf("char");
      break;
    case S_IFDIR:
      printf("dir");
      break;
    case S_IFBLK:
      printf("block");
      break;
    case S_IFREG:
      printf("regular");
      break;
    case S_IFLNK:
      printf("symlink");
      break;
    case S_IFSOCK:
      printf("socket");
      break;
    default:
      printf("unknown");
      break;
    }
  } else {
    printf("unknown");
  }
}


x86 assembly (clang, -O0):
<show_stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xee1(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    119b <show_stat+0x7b>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    0x2e71(%rip),%rax
mov    (%rax),%eax
mov    0x2e50(%rip),%rcx
or     (%rcx),%eax
mov    0x2e6f(%rip),%rcx
or     (%rcx),%eax
mov    0x2e6e(%rip),%rcx
or     (%rcx),%eax
mov    0x2e55(%rip),%rcx
or     (%rcx),%eax
mov    0x2e6c(%rip),%rcx
or     (%rcx),%eax
and    %eax,%esi
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14a5 <show_stat+0x385>
mov    -0x10(%rbp),%rdi
lea    0xe7f(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11d0 <show_stat+0xb0>
mov    -0x8(%rbp),%rax
mov    0x48(%rax),%rsi
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14a0 <show_stat+0x380>
mov    -0x10(%rbp),%rdi
lea    0xe55(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1205 <show_stat+0xe5>
mov    -0x8(%rbp),%rax
mov    0x40(%rax),%rsi
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    149b <show_stat+0x37b>
mov    -0x10(%rbp),%rdi
lea    0xe26(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    123c <show_stat+0x11c>
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%rax
mov    %eax,%esi
lea    0xe0a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1496 <show_stat+0x376>
mov    -0x10(%rbp),%rdi
lea    0xdf6(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1273 <show_stat+0x153>
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%rax
mov    %eax,%esi
lea    0xdd3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1491 <show_stat+0x371>
mov    -0x10(%rbp),%rdi
lea    0xdc3(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    12a8 <show_stat+0x188>
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%rsi
lea    0xd8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    148c <show_stat+0x36c>
mov    -0x10(%rbp),%rdi
lea    0xd93(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    12dd <show_stat+0x1bd>
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rsi
lea    0xd5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1487 <show_stat+0x367>
mov    -0x10(%rbp),%rdi
lea    0xd65(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1312 <show_stat+0x1f2>
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rsi
lea    0xd25(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1482 <show_stat+0x362>
mov    -0x10(%rbp),%rdi
lea    0xd36(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1347 <show_stat+0x227>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xcf0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    147d <show_stat+0x35d>
mov    -0x10(%rbp),%rdi
lea    0xd07(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    137c <show_stat+0x25c>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xcbb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1478 <show_stat+0x358>
mov    -0x10(%rbp),%rdi
lea    0xcd8(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1465 <show_stat+0x345>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2c15(%rip),%rcx
mov    (%rcx),%ecx
and    %ecx,%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x6,%eax
ja     1452 <show_stat+0x332>
mov    -0x18(%rbp),%rax
lea    0xc3c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xc90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1460 <show_stat+0x340>
lea    0xc82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1460 <show_stat+0x340>
lea    0xc74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1460 <show_stat+0x340>
lea    0xc65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1460 <show_stat+0x340>
lea    0xc58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1460 <show_stat+0x340>
lea    0xc4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1460 <show_stat+0x340>
lea    0xc42(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1460 <show_stat+0x340>
lea    0xc36(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1473 <show_stat+0x353>
lea    0xc23(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1478 <show_stat+0x358>
jmp    147d <show_stat+0x35d>
jmp    1482 <show_stat+0x362>
jmp    1487 <show_stat+0x367>
jmp    148c <show_stat+0x36c>
jmp    1491 <show_stat+0x371>
jmp    1496 <show_stat+0x376>
jmp    149b <show_stat+0x37b>
jmp    14a0 <show_stat+0x380>
jmp    14a5 <show_stat+0x385>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_stat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xeeb(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1247 <show_stat+0x127>
lea    0xedc(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1289 <show_stat+0x169>
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     128f <show_stat+0x16f>
lea    0xebd(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     12a8 <show_stat+0x188>
lea    0xeac(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     12ae <show_stat+0x18e>
lea    0xe98(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     12c7 <show_stat+0x1a7>
lea    0xe85(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     12cd <show_stat+0x1ad>
lea    0xe74(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     12d3 <show_stat+0x1b3>
lea    0xe62(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     12d9 <show_stat+0x1b9>
lea    0xe50(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     12df <show_stat+0x1bf>
lea    0xe3e(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     12e5 <show_stat+0x1c5>
lea    0xe56(%rip),%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>
mov    0x2d7a(%rip),%rax
mov    0x2d5b(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2d78(%rip),%rax
or     (%rax),%esi
mov    0x2d77(%rip),%rax
or     (%rax),%esi
mov    0x2d5e(%rip),%rax
or     (%rax),%esi
mov    0x2d75(%rip),%rax
or     (%rax),%esi
and    (%r14),%esi
lea    0xd9a(%rip),%rdi
jmp    12b9 <show_stat+0x199>
mov    0x48(%r14),%rsi
jmp    1293 <show_stat+0x173>
mov    0x40(%r14),%rsi
lea    0xd91(%rip),%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>
mov    0x38(%r14),%esi
jmp    12b2 <show_stat+0x192>
mov    0x30(%r14),%esi
lea    0xd81(%rip),%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>
mov    0x28(%r14),%rsi
jmp    1293 <show_stat+0x173>
mov    0x20(%r14),%rsi
jmp    1293 <show_stat+0x173>
mov    0x18(%r14),%rsi
jmp    1293 <show_stat+0x173>
mov    0x10(%r14),%rsi
jmp    1293 <show_stat+0x173>
mov    0x8(%r14),%rsi
jmp    1293 <show_stat+0x173>
mov    0x2ccc(%rip),%rax
mov    (%rax),%eax
and    (%r14),%eax
add    $0xffffff80,%eax
cmp    $0x6,%eax
ja     1232 <show_stat+0x112>
lea    0xcfc(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xd74(%rip),%rdi
jmp    1239 <show_stat+0x119>
lea    0xd58(%rip),%rdi
jmp    1239 <show_stat+0x119>
lea    0xd54(%rip),%rdi
jmp    1239 <show_stat+0x119>
lea    0xd2c(%rip),%rdi
jmp    1239 <show_stat+0x119>
lea    0xd2a(%rip),%rdi
jmp    1239 <show_stat+0x119>
lea    0xd19(%rip),%rdi
jmp    1239 <show_stat+0x119>
lea    0xd16(%rip),%rdi
jmp    1239 <show_stat+0x119>

LLVM IR (-O0):
%struct.stat = type { i32, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
@.str = [5 x i8] c"mode\00"
@.str.1 = [4 x i8] c"0%o\00"
@S_ISUID = global i32 0
@S_ISGID = global i32 0
@S_ISVTX = global i32 0
@S_IRWXU = global i32 0
@S_IRWXG = global i32 0
@S_IRWXO = global i32 0
@.str.2 = [6 x i8] c"inode\00"
@.str.3 = [5 x i8] c"%lld\00"
@.str.4 = [6 x i8] c"nlink\00"
@.str.5 = [4 x i8] c"uid\00"
@.str.6 = [3 x i8] c"%d\00"
@.str.7 = [4 x i8] c"gid\00"
@.str.8 = [5 x i8] c"size\00"
@.str.9 = [7 x i8] c"blocks\00"
@.str.10 = [6 x i8] c"atime\00"
@.str.11 = [6 x i8] c"mtime\00"
@.str.12 = [6 x i8] c"ctime\00"
@.str.13 = [5 x i8] c"type\00"
@S_IFMT = global i32 0
@.str.14 = [5 x i8] c"fifo\00"
@.str.15 = [5 x i8] c"char\00"
@.str.16 = [4 x i8] c"dir\00"
@.str.17 = [6 x i8] c"block\00"
@.str.18 = [8 x i8] c"regular\00"
@.str.19 = [8 x i8] c"symlink\00"
@.str.20 = [7 x i8] c"socket\00"
@.str.21 = [8 x i8] c"unknown\00"
define void @show_stat(%struct.stat* %0, i8* %1) {
%3 = alloca %struct.stat*
%4 = alloca i8*
store %struct.stat* %0, %struct.stat** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %25
8: ; preds = %2
%9 = load %struct.stat*, %struct.stat** %3
%10 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%11 = load i32, i32* %10
%12 = load i32, i32* @S_ISUID
%13 = load i32, i32* @S_ISGID
%14 = or i32 %12, %13
%15 = load i32, i32* @S_ISVTX
%16 = or i32 %14, %15
%17 = load i32, i32* @S_IRWXU
%18 = or i32 %16, %17
%19 = load i32, i32* @S_IRWXG
%20 = or i32 %18, %19
%21 = load i32, i32* @S_IRWXO
%22 = or i32 %20, %21
%23 = and i32 %11, %22
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %23)
br label %147
25: ; preds = %2
%26 = load i8*, i8** %4
%27 = call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %34
29: ; preds = %25
%30 = load %struct.stat*, %struct.stat** %3
%31 = getelementptr inbounds %struct.stat, %struct.stat* %30, i32 0, i32 9
%32 = load i64, i64* %31
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %32)
br label %146
34: ; preds = %25
%35 = load i8*, i8** %4
%36 = call i64 @strcmp(i8* %35, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %43
38: ; preds = %34
%39 = load %struct.stat*, %struct.stat** %3
%40 = getelementptr inbounds %struct.stat, %struct.stat* %39, i32 0, i32 8
%41 = load i64, i64* %40
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %41)
br label %145
43: ; preds = %34
%44 = load i8*, i8** %4
%45 = call i64 @strcmp(i8* %44, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %53
47: ; preds = %43
%48 = load %struct.stat*, %struct.stat** %3
%49 = getelementptr inbounds %struct.stat, %struct.stat* %48, i32 0, i32 7
%50 = load i64, i64* %49
%51 = trunc i64 %50 to i32
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %51)
br label %144
53: ; preds = %43
%54 = load i8*, i8** %4
%55 = call i64 @strcmp(i8* %54, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %63
57: ; preds = %53
%58 = load %struct.stat*, %struct.stat** %3
%59 = getelementptr inbounds %struct.stat, %struct.stat* %58, i32 0, i32 6
%60 = load i64, i64* %59
%61 = trunc i64 %60 to i32
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %61)
br label %143
63: ; preds = %53
%64 = load i8*, i8** %4
%65 = call i64 @strcmp(i8* %64, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %72
67: ; preds = %63
%68 = load %struct.stat*, %struct.stat** %3
%69 = getelementptr inbounds %struct.stat, %struct.stat* %68, i32 0, i32 5
%70 = load i64, i64* %69
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %70)
br label %142
72: ; preds = %63
%73 = load i8*, i8** %4
%74 = call i64 @strcmp(i8* %73, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%75 = icmp eq i64 %74, 0
br i1 %75, label %76, label %81
76: ; preds = %72
%77 = load %struct.stat*, %struct.stat** %3
%78 = getelementptr inbounds %struct.stat, %struct.stat* %77, i32 0, i32 4
%79 = load i64, i64* %78
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %79)
br label %141
81: ; preds = %72
%82 = load i8*, i8** %4
%83 = call i64 @strcmp(i8* %82, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%84 = icmp eq i64 %83, 0
br i1 %84, label %85, label %90
85: ; preds = %81
%86 = load %struct.stat*, %struct.stat** %3
%87 = getelementptr inbounds %struct.stat, %struct.stat* %86, i32 0, i32 3
%88 = load i64, i64* %87
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %88)
br label %140
90: ; preds = %81
%91 = load i8*, i8** %4
%92 = call i64 @strcmp(i8* %91, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%93 = icmp eq i64 %92, 0
br i1 %93, label %94, label %99
94: ; preds = %90
%95 = load %struct.stat*, %struct.stat** %3
%96 = getelementptr inbounds %struct.stat, %struct.stat* %95, i32 0, i32 2
%97 = load i64, i64* %96
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %97)
br label %139
99: ; preds = %90
%100 = load i8*, i8** %4
%101 = call i64 @strcmp(i8* %100, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
%102 = icmp eq i64 %101, 0
br i1 %102, label %103, label %108
103: ; preds = %99
%104 = load %struct.stat*, %struct.stat** %3
%105 = getelementptr inbounds %struct.stat, %struct.stat* %104, i32 0, i32 1
%106 = load i64, i64* %105
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %106)
br label %138
108: ; preds = %99
%109 = load i8*, i8** %4
%110 = call i64 @strcmp(i8* %109, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%111 = icmp eq i64 %110, 0
br i1 %111, label %112, label %135
112: ; preds = %108
%113 = load %struct.stat*, %struct.stat** %3
%114 = getelementptr inbounds %struct.stat, %struct.stat* %113, i32 0, i32 0
%115 = load i32, i32* %114
%116 = load i32, i32* @S_IFMT
%117 = and i32 %115, %116
switch i32 %117, label %132 [
i32 131, label %118
i32 133, label %120
i32 132, label %122
i32 134, label %124
i32 129, label %126
i32 130, label %128
i32 128, label %130
]
118: ; preds = %112
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0))
br label %134
120: ; preds = %112
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
br label %134
122: ; preds = %112
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
br label %134
124: ; preds = %112
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0))
br label %134
126: ; preds = %112
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0))
br label %134
128: ; preds = %112
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i64 0, i64 0))
br label %134
130: ; preds = %112
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0))
br label %134
132: ; preds = %112
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0))
br label %134
134: ; preds = %132, %130, %128, %126, %124, %122, %120, %118
br label %137
135: ; preds = %108
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0))
br label %137
137: ; preds = %135, %134
br label %138
138: ; preds = %137, %103
br label %139
139: ; preds = %138, %94
br label %140
140: ; preds = %139, %85
br label %141
141: ; preds = %140, %76
br label %142
142: ; preds = %141, %67
br label %143
143: ; preds = %142, %57
br label %144
144: ; preds = %143, %47
br label %145
145: ; preds = %144, %38
br label %146
146: ; preds = %145, %29
br label %147
147: ; preds = %146, %8
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
@.str = [5 x i8] c"mode\00"
@.str.1 = [4 x i8] c"0%o\00"
@S_ISUID = global i32 0
@S_ISGID = global i32 0
@S_ISVTX = global i32 0
@S_IRWXU = global i32 0
@S_IRWXG = global i32 0
@S_IRWXO = global i32 0
@.str.2 = [6 x i8] c"inode\00"
@.str.3 = [5 x i8] c"%lld\00"
@.str.4 = [6 x i8] c"nlink\00"
@.str.5 = [4 x i8] c"uid\00"
@.str.6 = [3 x i8] c"%d\00"
@.str.7 = [4 x i8] c"gid\00"
@.str.8 = [5 x i8] c"size\00"
@.str.9 = [7 x i8] c"blocks\00"
@.str.10 = [6 x i8] c"atime\00"
@.str.11 = [6 x i8] c"mtime\00"
@.str.12 = [6 x i8] c"ctime\00"
@.str.13 = [5 x i8] c"type\00"
@S_IFMT = global i32 0
@.str.14 = [5 x i8] c"fifo\00"
@.str.15 = [5 x i8] c"char\00"
@.str.16 = [4 x i8] c"dir\00"
@.str.17 = [6 x i8] c"block\00"
@.str.18 = [8 x i8] c"regular\00"
@.str.19 = [8 x i8] c"symlink\00"
@.str.20 = [7 x i8] c"socket\00"
@.str.21 = [8 x i8] c"unknown\00"
define void @show_stat(%struct.stat* nocapture %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %21
5: ; preds = %2
%6 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 0
%7 = load i32, i32* %6
%8 = load i32, i32* @S_ISUID
%9 = load i32, i32* @S_ISGID
%10 = or i32 %9, %8
%11 = load i32, i32* @S_ISVTX
%12 = or i32 %10, %11
%13 = load i32, i32* @S_IRWXU
%14 = or i32 %12, %13
%15 = load i32, i32* @S_IRWXG
%16 = or i32 %14, %15
%17 = load i32, i32* @S_IRWXO
%18 = or i32 %16, %17
%19 = and i32 %18, %7
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %19)
br label %112
21: ; preds = %2
%22 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %28
24: ; preds = %21
%25 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 9
%26 = load i64, i64* %25
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %26)
br label %112
28: ; preds = %21
%29 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %35
31: ; preds = %28
%32 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 8
%33 = load i64, i64* %32
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %33)
br label %112
35: ; preds = %28
%36 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %43
38: ; preds = %35
%39 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 7
%40 = load i64, i64* %39
%41 = trunc i64 %40 to i32
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %41)
br label %112
43: ; preds = %35
%44 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %51
46: ; preds = %43
%47 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 6
%48 = load i64, i64* %47
%49 = trunc i64 %48 to i32
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %49)
br label %112
51: ; preds = %43
%52 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %58
54: ; preds = %51
%55 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 5
%56 = load i64, i64* %55
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %56)
br label %112
58: ; preds = %51
%59 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%60 = icmp eq i64 %59, 0
br i1 %60, label %61, label %65
61: ; preds = %58
%62 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 4
%63 = load i64, i64* %62
%64 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %63)
br label %112
65: ; preds = %58
%66 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %72
68: ; preds = %65
%69 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 3
%70 = load i64, i64* %69
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %70)
br label %112
72: ; preds = %65
%73 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%74 = icmp eq i64 %73, 0
br i1 %74, label %75, label %79
75: ; preds = %72
%76 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 2
%77 = load i64, i64* %76
%78 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %77)
br label %112
79: ; preds = %72
%80 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
%81 = icmp eq i64 %80, 0
br i1 %81, label %82, label %86
82: ; preds = %79
%83 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 1
%84 = load i64, i64* %83
%85 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %84)
br label %112
86: ; preds = %79
%87 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%88 = icmp eq i64 %87, 0
br i1 %88, label %89, label %110
89: ; preds = %86
%90 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 0
%91 = load i32, i32* %90
%92 = load i32, i32* @S_IFMT
%93 = and i32 %92, %91
switch i32 %93, label %108 [
i32 131, label %94
i32 133, label %96
i32 132, label %98
i32 134, label %100
i32 129, label %102
i32 130, label %104
i32 128, label %106
]
94: ; preds = %89
%95 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0))
br label %112
96: ; preds = %89
%97 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
br label %112
98: ; preds = %89
%99 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
br label %112
100: ; preds = %89
%101 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0))
br label %112
102: ; preds = %89
%103 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0))
br label %112
104: ; preds = %89
%105 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i64 0, i64 0))
br label %112
106: ; preds = %89
%107 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0))
br label %112
108: ; preds = %89
%109 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0))
br label %112
110: ; preds = %86
%111 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0))
br label %112
112: ; preds = %24, %38, %54, %68, %82, %94, %96, %98, %100, %102, %104, %106, %108, %110, %75, %61, %46, %31, %5
ret void
}