#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 uint32_t;
struct passwd {
  char *pw_name;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
char *basename(char *);
int /*<<< orphan*/ exit(int);
scalar_t__ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(char *);
int fscanf(int /*<<< orphan*/ *, char *, int *, int *, int *, int *, char *,
           char *, int *, char **);
struct passwd *getpwuid(int);
int /*<<< orphan*/ itoa(int, char *, int);
char *malloc(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
char *readable_fs(int);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  FILE *fp = fopen("/sys/tasks", "r");
  if (!fp) {
    perror("Could not read tasks");
    exit(EXIT_FAILURE);
  }
  char *data = malloc(1024);
  fgets(data, 1024, fp);
  free(data);
  printf("  PID User     State     PPID TTY      Mem\n");
  while (true) {
    if (feof(fp)) {
      return EXIT_SUCCESS;
    }
    uint32_t pid;
    uint32_t uid;
    uint32_t gid;
    uint32_t ppid;
    char cstate;
    char name[500];
    uint32_t mem;
    char _tty[30];
    char *tty = _tty;
    if (fscanf(fp, "%d %d %d %d %c \"%500[^\"]\" %d %s\n", &pid, &uid, &gid,
               &ppid, &cstate, name, &mem, &_tty) != 8) {
      fprintf(stderr, "Matching error.\n");
      exit(EXIT_FAILURE);
    }
    char *state = "Unknown";
    switch (cstate) {
    case 'K':
      state = "31mKilled";
      break;
    case 'T':
      state = "31mTerminated";
      break;
    case 'B':
      state = "35mBlocking";
      break;
    case 'S':
      state = "36mStopped";
      break;
    case 'R':
      state = "32mRunning";
      break;
    case 'W':
      state = "39mWaiting";
      break;
    case 'C':
      state = "33mSyscall";
      break;
    }
    char *user;
    struct passwd *pwd = getpwuid(uid);
    if (pwd) {
      user = pwd->pw_name;
    } else {
      char _user[10];
      itoa(uid, _user, 10);
      user = _user;
    }
    char *rfs = readable_fs(mem);
    if (*tty == '/') {
      tty = basename(tty);
    }
    printf("%5d %-8s \033[%-11s\033[m %5d %-8s %-10s %-15s\n", pid, user, state,
           ppid, tty, rfs, name);
    free(rfs);
  }
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x2b8,%rsp
movl   $0x0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    0xe57(%rip),%rdi
lea    0xe5b(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1236 <main+0x56>
lea    0xe42(%rip),%rdi
call   10e0 <perror@plt>
mov    0x2da9(%rip),%rax
mov    (%rax),%edi
call   10f0 <exit@plt>
mov    $0x400,%edi
call   10c0 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x400,%esi
call   1080 <fgets@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x20(%rbp),%rdi
call   10b0 <feof@plt>
cmp    $0x0,%rax
je     1293 <main+0xb3>
mov    0x2d49(%rip),%rax
mov    (%rax),%eax
add    $0x2b8,%rsp
pop    %rbx
pop    %rbp
ret
lea    -0x260(%rbp),%rax
mov    %rax,-0x268(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x230(%rbp),%r11
lea    -0x260(%rbp),%rax
lea    0xdec(%rip),%rsi
lea    -0x2c(%rbp),%rdx
lea    -0x30(%rbp),%rcx
lea    -0x34(%rbp),%r8
lea    -0x38(%rbp),%r9
lea    -0x39(%rbp),%rbx
lea    -0x234(%rbp),%r10
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1070 <fscanf@plt>
cmp    $0x8,%eax
je     1319 <main+0x139>
mov    0x2ce3(%rip),%rax
mov    (%rax),%edi
lea    0xdc1(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2cc6(%rip),%rax
mov    (%rax),%edi
call   10f0 <exit@plt>
lea    0xdb8(%rip),%rax
mov    %rax,-0x270(%rbp)
movsbl -0x39(%rbp),%eax
add    $0xffffffbe,%eax
mov    %eax,%ecx
mov    %rcx,-0x2a0(%rbp)
sub    $0x15,%eax
ja     13d7 <main+0x1f7>
mov    -0x2a0(%rbp),%rax
lea    0xcb2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xd82(%rip),%rax
mov    %rax,-0x270(%rbp)
jmp    13d7 <main+0x1f7>
lea    0xd79(%rip),%rax
mov    %rax,-0x270(%rbp)
jmp    13d7 <main+0x1f7>
lea    0xd74(%rip),%rax
mov    %rax,-0x270(%rbp)
jmp    13d7 <main+0x1f7>
lea    0xd6d(%rip),%rax
mov    %rax,-0x270(%rbp)
jmp    13d7 <main+0x1f7>
lea    0xd65(%rip),%rax
mov    %rax,-0x270(%rbp)
jmp    13d7 <main+0x1f7>
lea    0xd5d(%rip),%rax
mov    %rax,-0x270(%rbp)
jmp    13d7 <main+0x1f7>
lea    0xd55(%rip),%rax
mov    %rax,-0x270(%rbp)
mov    -0x30(%rbp),%edi
call   1050 <getpwuid@plt>
mov    %rax,-0x280(%rbp)
cmpq   $0x0,-0x280(%rbp)
je     140a <main+0x22a>
mov    -0x280(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x278(%rbp)
jmp    142c <main+0x24c>
mov    -0x30(%rbp),%edi
lea    -0x28a(%rbp),%rsi
mov    $0xa,%edx
call   1100 <itoa@plt>
lea    -0x28a(%rbp),%rax
mov    %rax,-0x278(%rbp)
mov    -0x234(%rbp),%edi
call   1040 <readable_fs@plt>
mov    %rax,-0x298(%rbp)
mov    -0x268(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1464 <main+0x284>
mov    -0x268(%rbp),%rdi
call   10a0 <basename@plt>
mov    %rax,-0x268(%rbp)
mov    -0x2c(%rbp),%esi
mov    -0x278(%rbp),%rdx
mov    -0x270(%rbp),%rcx
mov    -0x38(%rbp),%r8d
mov    -0x268(%rbp),%r9
mov    -0x298(%rbp),%r10
lea    -0x230(%rbp),%rax
lea    0xc9b(%rip),%rdi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x298(%rbp),%rdi
call   1030 <free@plt>
jmp    126d <main+0x8d>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x248,%rsp
lea    0xe50(%rip),%rdi
lea    0xe54(%rip),%rsi
call   10e0 <fopen@plt>
test   %rax,%rax
je     13f3 <main+0x203>
mov    %rax,%r12
mov    $0x400,%edi
call   10d0 <malloc@plt>
mov    %rax,%rbp
mov    %rax,%rdi
mov    $0x400,%esi
mov    %r12,%rdx
call   1090 <fgets@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
lea    0xee2(%rip),%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
call   10c0 <feof@plt>
test   %rax,%rax
je     1279 <main+0x89>
mov    0x2d6b(%rip),%rax
mov    (%rax),%eax
add    $0x248,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x30(%rsp),%r14
lea    0x50(%rsp),%rbx
jmp    12c8 <main+0xd8>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x1c(%rsp),%esi
mov    0x18(%rsp),%r8d
lea    0xe64(%rip),%rdi
mov    %r15,%rdx
mov    %r13,%rcx
xor    %eax,%eax
push   %rbx
push   %rbp
call   1070 <printf@plt>
add    $0x10,%rsp
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   10c0 <feof@plt>
test   %rax,%rax
jne    125e <main+0x6e>
mov    %r12,%rdi
lea    0xda8(%rip),%rsi
lea    0x1c(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x20(%rsp),%r8
lea    0x18(%rsp),%r9
push   %r14
lea    0x1c(%rsp),%rax
push   %rax
push   %rbx
lea    0x27(%rsp),%rax
push   %rax
call   1080 <fscanf@plt>
add    $0x20,%rsp
cmp    $0x8,%eax
jne    13d0 <main+0x1e0>
movsbl 0xf(%rsp),%eax
add    $0xffffffbe,%eax
lea    0xd96(%rip),%r13
cmp    $0x15,%eax
ja     1370 <main+0x180>
lea    0xcde(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
lea    0xd7c(%rip),%r13
jmp    *%rax
lea    0xd93(%rip),%r13
jmp    1370 <main+0x180>
lea    0xdb7(%rip),%r13
jmp    1370 <main+0x180>
lea    0xd69(%rip),%r13
jmp    1370 <main+0x180>
lea    0xd8f(%rip),%r13
jmp    1370 <main+0x180>
lea    0xd61(%rip),%r13
jmp    1370 <main+0x180>
lea    0xd88(%rip),%r13
jmp    1370 <main+0x180>
lea    0xd69(%rip),%r13
nop
mov    0x10(%rsp),%edi
call   1060 <getpwuid@plt>
test   %rax,%rax
je     1390 <main+0x1a0>
mov    (%rax),%r15
jmp    13a6 <main+0x1b6>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x10(%rsp),%edi
lea    0x26(%rsp),%r15
mov    %r15,%rsi
mov    $0xa,%edx
call   1110 <itoa@plt>
mov    0x14(%rsp),%edi
call   1050 <readable_fs@plt>
mov    %rax,%rbp
cmpb   $0x2f,0x30(%rsp)
mov    %r14,%r9
jne    1290 <main+0xa0>
mov    %r14,%rdi
call   10b0 <basename@plt>
mov    %rax,%r9
jmp    1290 <main+0xa0>
mov    0x2c09(%rip),%rax
mov    (%rax),%edi
lea    0xcbb(%rip),%rsi
call   10a0 <fprintf@plt>
mov    0x2bec(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
lea    0xc6b(%rip),%rdi
call   10f0 <perror@plt>
jmp    13e5 <main+0x1f5>

LLVM IR (-O0):
%struct.passwd = type { i8* }
@.str = [11 x i8] c"/sys/tasks\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [21 x i8] c"Could not read tasks\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [44 x i8] c" PID User State PPID TTY Mem\0A\00"
@EXIT_SUCCESS = global i32 0
@.str.4 = [33 x i8] c"%d %d %d %d %c \22%500[^\22]\22 %d %s\0A\00"
@stderr = global i32 0
@.str.5 = [17 x i8] c"Matching error.\0A\00"
@.str.6 = [8 x i8] c"Unknown\00"
@.str.7 = [10 x i8] c"31mKilled\00"
@.str.8 = [14 x i8] c"31mTerminated\00"
@.str.9 = [12 x i8] c"35mBlocking\00"
@.str.10 = [11 x i8] c"36mStopped\00"
@.str.11 = [11 x i8] c"32mRunning\00"
@.str.12 = [11 x i8] c"39mWaiting\00"
@.str.13 = [11 x i8] c"33mSyscall\00"
@.str.14 = [42 x i8] c"%5d %-8s \1B[%-11s\1B[m %5d %-8s %-10s %-15s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8
%13 = alloca [500 x i8]
%14 = alloca i32
%15 = alloca [30 x i8]
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i8*
%19 = alloca %struct.passwd*
%20 = alloca [10 x i8]
%21 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%22 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %22, i32** %6
%23 = load i32*, i32** %6
%24 = icmp ne i32* %23, null
br i1 %24, label %29, label %25
25: ; preds = %2
%26 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%27 = load i32, i32* @EXIT_FAILURE
%28 = call i32 @exit(i32 %27)
unreachable
29: ; preds = %2
%30 = call i8* @malloc(i32 1024)
store i8* %30, i8** %7
%31 = load i8*, i8** %7
%32 = load i32*, i32** %6
%33 = call i32 @fgets(i8* %31, i32 1024, i32* %32)
%34 = load i8*, i8** %7
%35 = call i32 @free(i8* %34)
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
br label %37
37: ; preds = %29, %89
%38 = load i32*, i32** %6
%39 = call i64 @feof(i32* %38)
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %37
%42 = load i32, i32* @EXIT_SUCCESS
ret i32 %42
43: ; preds = %37
%44 = getelementptr inbounds [30 x i8], [30 x i8]* %15, i64 0, i64 0
store i8* %44, i8** %16
%45 = load i32*, i32** %6
%46 = getelementptr inbounds [500 x i8], [500 x i8]* %13, i64 0, i64 0
%47 = bitcast [30 x i8]* %15 to i8**
%48 = call i32 @fscanf(i32* %45, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32* %8, i32* %9, i32* %10, i32* %11, i8* %12, i8* %46, i32* %14, i8** %47)
%49 = icmp ne i32 %48, 8
br i1 %49, label %50, label %55
50: ; preds = %43
%51 = load i32, i32* @stderr
%52 = call i32 @fprintf(i32 %51, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%53 = load i32, i32* @EXIT_FAILURE
%54 = call i32 @exit(i32 %53)
unreachable
55: ; preds = %43
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8** %17
%56 = load i8, i8* %12
%57 = sext i8 %56 to i32
switch i32 %57, label %65 [
i32 75, label %58
i32 84, label %59
i32 66, label %60
i32 83, label %61
i32 82, label %62
i32 87, label %63
i32 67, label %64
]
58: ; preds = %55
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8** %17
br label %65
59: ; preds = %55
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8** %17
br label %65
60: ; preds = %55
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8** %17
br label %65
61: ; preds = %55
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8** %17
br label %65
62: ; preds = %55
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i8** %17
br label %65
63: ; preds = %55
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i8** %17
br label %65
64: ; preds = %55
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i8** %17
br label %65
65: ; preds = %55, %64, %63, %62, %61, %60, %59, %58
%66 = load i32, i32* %9
%67 = call %struct.passwd* @getpwuid(i32 %66)
store %struct.passwd* %67, %struct.passwd** %19
%68 = load %struct.passwd*, %struct.passwd** %19
%69 = icmp ne %struct.passwd* %68, null
br i1 %69, label %70, label %74
70: ; preds = %65
%71 = load %struct.passwd*, %struct.passwd** %19
%72 = getelementptr inbounds %struct.passwd, %struct.passwd* %71, i32 0, i32 0
%73 = load i8*, i8** %72
store i8* %73, i8** %18
br label %79
74: ; preds = %65
%75 = load i32, i32* %9
%76 = getelementptr inbounds [10 x i8], [10 x i8]* %20, i64 0, i64 0
%77 = call i32 @itoa(i32 %75, i8* %76, i32 10)
%78 = getelementptr inbounds [10 x i8], [10 x i8]* %20, i64 0, i64 0
store i8* %78, i8** %18
br label %79
79: ; preds = %74, %70
%80 = load i32, i32* %14
%81 = call i8* @readable_fs(i32 %80)
store i8* %81, i8** %21
%82 = load i8*, i8** %16
%83 = load i8, i8* %82
%84 = sext i8 %83 to i32
%85 = icmp eq i32 %84, 47
br i1 %85, label %86, label %89
86: ; preds = %79
%87 = load i8*, i8** %16
%88 = call i8* @basename(i8* %87)
store i8* %88, i8** %16
br label %89
89: ; preds = %86, %79
%90 = load i32, i32* %8
%91 = load i8*, i8** %18
%92 = load i8*, i8** %17
%93 = load i32, i32* %11
%94 = load i8*, i8** %16
%95 = load i8*, i8** %21
%96 = getelementptr inbounds [500 x i8], [500 x i8]* %13, i64 0, i64 0
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.14, i64 0, i64 0), i32 %90, i8* %91, i8* %92, i32 %93, i8* %94, i8* %95, i8* %96)
%98 = load i8*, i8** %21
%99 = call i32 @free(i8* %98)
br label %37
}

LLVM IR (-O2):
%struct.passwd = type { i8* }
@.str = [11 x i8] c"/sys/tasks\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [21 x i8] c"Could not read tasks\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
@.str.4 = [33 x i8] c"%d %d %d %d %c \22%500[^\22]\22 %d %s\0A\00"
@stderr = global i32 0
@.str.5 = [17 x i8] c"Matching error.\0A\00"
@.str.6 = [8 x i8] c"Unknown\00"
@.str.7 = [10 x i8] c"31mKilled\00"
@.str.8 = [14 x i8] c"31mTerminated\00"
@.str.9 = [12 x i8] c"35mBlocking\00"
@.str.10 = [11 x i8] c"36mStopped\00"
@.str.11 = [11 x i8] c"32mRunning\00"
@.str.12 = [11 x i8] c"39mWaiting\00"
@.str.13 = [11 x i8] c"33mSyscall\00"
@.str.14 = [42 x i8] c"%5d %-8s \1B[%-11s\1B[m %5d %-8s %-10s %-15s\0A\00"
@str = [43 x i8] c" PID User State PPID TTY Mem\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
%8 = alloca [500 x i8]
%9 = alloca i32
%10 = alloca [30 x i8]
%11 = alloca [10 x i8]
%12 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %18
14: ; preds = %2
%15 = tail call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%16 = load i32, i32* @EXIT_FAILURE
%17 = tail call i32 @exit(i32 %16)
unreachable
18: ; preds = %2
%19 = tail call dereferenceable_or_null(1024) i8* @malloc(i32 1024)
%20 = tail call i32 @fgets(i8* %19, i32 1024, i32* %12)
%21 = tail call i32 @free(i8* %19)
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
%23 = call i64 @feof(i32* %12)
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %35
25: ; preds = %18
%26 = bitcast i32* %3 to i8*
%27 = bitcast i32* %4 to i8*
%28 = bitcast i32* %5 to i8*
%29 = bitcast i32* %6 to i8*
%30 = getelementptr inbounds [500 x i8], [500 x i8]* %8, i64 0, i64 0
%31 = bitcast i32* %9 to i8*
%32 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 0
%33 = bitcast [30 x i8]* %10 to i8**
%34 = getelementptr inbounds [10 x i8], [10 x i8]* %11, i64 0, i64 0
br label %37
35: ; preds = %74, %18
%36 = load i32, i32* @EXIT_SUCCESS
ret i32 %36
37: ; preds = %25, %74
%38 = call i32 @fscanf(i32* %12, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32* %3, i32* %4, i32* %5, i32* %6, i8* %7, i8* %30, i32* %9, i8** %33)
%39 = icmp eq i32 %38, 8
br i1 %39, label %45, label %40
40: ; preds = %37
%41 = load i32, i32* @stderr
%42 = call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%43 = load i32, i32* @EXIT_FAILURE
%44 = call i32 @exit(i32 %43)
unreachable
45: ; preds = %37
%46 = load i8, i8* %7
%47 = sext i8 %46 to i32
switch i32 %47, label %55 [
i32 75, label %48
i32 84, label %49
i32 66, label %50
i32 83, label %51
i32 82, label %52
i32 87, label %53
i32 67, label %54
]
48: ; preds = %45
br label %55
49: ; preds = %45
br label %55
50: ; preds = %45
br label %55
51: ; preds = %45
br label %55
52: ; preds = %45
br label %55
53: ; preds = %45
br label %55
54: ; preds = %45
br label %55
55: ; preds = %45, %54, %53, %52, %51, %50, %49, %48
%56 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), %45 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), %54 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), %53 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), %52 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), %51 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), %50 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), %49 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), %48 ]
%57 = load i32, i32* %4
%58 = call %struct.passwd* @getpwuid(i32 %57)
%59 = icmp eq %struct.passwd* %58, null
br i1 %59, label %63, label %60
60: ; preds = %55
%61 = getelementptr inbounds %struct.passwd, %struct.passwd* %58, i64 0, i32 0
%62 = load i8*, i8** %61
br label %66
63: ; preds = %55
%64 = load i32, i32* %4
%65 = call i32 @itoa(i32 %64, i8* %34, i32 10)
br label %66
66: ; preds = %63, %60
%67 = phi i8* [ %62, %60 ], [ %34, %63 ]
%68 = load i32, i32* %9
%69 = call i8* @readable_fs(i32 %68)
%70 = load i8, i8* %32
%71 = icmp eq i8 %70, 47
br i1 %71, label %72, label %74
72: ; preds = %66
%73 = call i8* @basename(i8* %32)
br label %74
74: ; preds = %72, %66
%75 = phi i8* [ %73, %72 ], [ %32, %66 ]
%76 = load i32, i32* %3
%77 = load i32, i32* %6
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.14, i64 0, i64 0), i32 %76, i8* %67, i8* %56, i32 %77, i8* %75, i8* %69, i8* %30)
%79 = call i32 @free(i8* %69)
%80 = call i64 @feof(i32* %12)
%81 = icmp eq i64 %80, 0
br i1 %81, label %37, label %35
}