#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 udev_device {
  int dummy;
};
struct udev {
  int dummy;
};
struct stat {
  int /*<<< orphan*/ st_mode;
};
struct dirent {
  char *d_name;
};
typedef int /*<<< orphan*/ filename;
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
scalar_t__ S_ISLNK(int /*<<< orphan*/);
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
scalar_t__ isprint(char const);
scalar_t__ lstat(char *, struct stat *);
int /*<<< orphan*/ *opendir(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
struct dirent *readdir(int /*<<< orphan*/ *);
scalar_t__ strcmp(char *, char *);
size_t strlen(char const *);
char *udev_device_get_sysattr_value(struct udev_device *, char *);
int /*<<< orphan*/ udev_device_get_syspath(struct udev_device *);
struct udev *udev_device_get_udev(struct udev_device *);
int /*<<< orphan*/ udev_log_null(struct udev *, char *, char *, ...);
int /*<<< orphan*/ util_strlcat(char *, char *, int);
int /*<<< orphan*/ util_strlcpy(char *, int /*<<< orphan*/, int);
void print_all_attributes(struct udev_device *device, const char *key) {
  struct udev *udev = udev_device_get_udev(device);
  DIR *dir;
  struct dirent *dent;
  dir = opendir(udev_device_get_syspath(device));
  if (dir != NULL) {
    for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) {
      struct stat statbuf;
      char filename[1024];
      const char *value;
      size_t len;
      if (dent->d_name[0] == '.')
        continue;
      if (strcmp(dent->d_name, "uevent") == 0)
        continue;
      if (strcmp(dent->d_name, "dev") == 0)
        continue;
      util_strlcpy(filename, udev_device_get_syspath(device), sizeof(filename));
      util_strlcat(filename, "/", sizeof(filename));
      util_strlcat(filename, dent->d_name, sizeof(filename));
      if (lstat(filename, &statbuf) != 0)
        continue;
      if (S_ISLNK(statbuf.st_mode))
        continue;
      value = udev_device_get_sysattr_value(device, dent->d_name);
      if (value == NULL)
        continue;
      udev_log_null(udev, "attr '%s'='%s'(%zi)\n", dent->d_name, value, len);
      len = strlen(value);
      while (len > 0 && isprint(value[len - 1]))
        len--;
      if (len > 0) {
        udev_log_null(udev, "attribute value of '%s' non-printable, skip\n",
                      dent->d_name);
        continue;
      }
      printf("    %s{%s}==\"%s\"\n", key, dent->d_name, value);
    }
    closedir(dir);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_all_attributes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x450,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <udev_device_get_udev@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <udev_device_get_syspath@plt>
mov    %eax,%edi
call   1070 <opendir@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1466 <print_all_attributes+0x276>
mov    -0x20(%rbp),%rdi
call   10d0 <readdir@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     145d <print_all_attributes+0x26d>
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    125f <print_all_attributes+0x6f>
jmp    144b <print_all_attributes+0x25b>
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
lea    0xd93(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%rax
jne    1281 <print_all_attributes+0x91>
jmp    144b <print_all_attributes+0x25b>
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
lea    0xd78(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%rax
jne    12a3 <print_all_attributes+0xb3>
jmp    144b <print_all_attributes+0x25b>
lea    -0x430(%rbp),%rax
mov    %rax,-0x448(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <udev_device_get_syspath@plt>
mov    -0x448(%rbp),%rdi
mov    %eax,%esi
mov    $0x400,%edx
call   10f0 <util_strlcpy@plt>
lea    -0x430(%rbp),%rdi
lea    0xd30(%rip),%rsi
mov    $0x400,%edx
call   1100 <util_strlcat@plt>
lea    -0x430(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    (%rax),%rsi
mov    $0x400,%edx
call   1100 <util_strlcat@plt>
lea    -0x430(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   10b0 <lstat@plt>
cmp    $0x0,%rax
je     131c <print_all_attributes+0x12c>
jmp    144b <print_all_attributes+0x25b>
mov    -0x30(%rbp),%edi
call   1050 <S_ISLNK@plt>
cmp    $0x0,%rax
je     1333 <print_all_attributes+0x143>
jmp    144b <print_all_attributes+0x25b>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    (%rax),%rsi
call   1110 <udev_device_get_sysattr_value@plt>
mov    %rax,-0x438(%rbp)
cmpq   $0x0,-0x438(%rbp)
jne    135d <print_all_attributes+0x16d>
jmp    144b <print_all_attributes+0x25b>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    (%rax),%rdx
mov    -0x438(%rbp),%rcx
mov    -0x440(%rbp),%r8
lea    0xc90(%rip),%rsi
mov    $0x0,%al
call   1060 <udev_log_null@plt>
mov    -0x438(%rbp),%rdi
call   1080 <strlen@plt>
mov    %rax,-0x440(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x440(%rbp)
mov    %al,-0x449(%rbp)
jbe    13d5 <print_all_attributes+0x1e5>
mov    -0x438(%rbp),%rax
mov    -0x440(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%edi
call   10e0 <isprint@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x449(%rbp)
mov    -0x449(%rbp),%al
test   $0x1,%al
jne    13e8 <print_all_attributes+0x1f8>
jmp    13ff <print_all_attributes+0x20f>
mov    -0x440(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x440(%rbp)
jmp    1397 <print_all_attributes+0x1a7>
cmpq   $0x0,-0x440(%rbp)
jbe    142b <print_all_attributes+0x23b>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    (%rax),%rdx
lea    0xc03(%rip),%rsi
mov    $0x0,%al
call   1060 <udev_log_null@plt>
jmp    144b <print_all_attributes+0x25b>
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rax
mov    (%rax),%rdx
mov    -0x438(%rbp),%rcx
lea    0xc0b(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    -0x20(%rbp),%rdi
call   10d0 <readdir@plt>
mov    %rax,-0x28(%rbp)
jmp    123c <print_all_attributes+0x4c>
mov    -0x20(%rbp),%rdi
call   10a0 <closedir@plt>
lea    0xbf2(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
add    $0x450,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_all_attributes>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x428,%rsp
mov    %rsi,%rbp
mov    %rdi,%r12
call   1050 <udev_device_get_udev@plt>
mov    %rax,%r13
mov    %r12,%rdi
call   1030 <udev_device_get_syspath@plt>
mov    %eax,%edi
call   1080 <opendir@plt>
test   %rax,%rax
je     13b5 <print_all_attributes+0x1b5>
mov    %rax,%rbx
mov    %rbp,0x18(%rsp)
mov    %rax,%rdi
call   10e0 <readdir@plt>
test   %rax,%rax
je     13ad <print_all_attributes+0x1ad>
mov    %rax,%rbp
lea    0x20(%rsp),%r14
jmp    1294 <print_all_attributes+0x94>
mov    0x0(%rbp),%rdx
lea    0xdea(%rip),%rdi
mov    0x18(%rsp),%rsi
mov    %r13,%rcx
xor    %eax,%eax
call   10a0 <printf@plt>
xor    %r15d,%r15d
mov    0x8(%rsp),%r13
nopl   0x0(%rax)
mov    %rbx,%rdi
call   10e0 <readdir@plt>
mov    %rax,%rbp
test   %rax,%rax
je     13ad <print_all_attributes+0x1ad>
mov    0x0(%rbp),%rdi
cmpb   $0x2e,(%rdi)
je     1280 <print_all_attributes+0x80>
lea    0xd5c(%rip),%rsi
call   10d0 <strcmp@plt>
test   %rax,%rax
je     1280 <print_all_attributes+0x80>
mov    0x0(%rbp),%rdi
lea    0xd4e(%rip),%rsi
call   10d0 <strcmp@plt>
test   %rax,%rax
je     1280 <print_all_attributes+0x80>
mov    %r12,%rdi
call   1030 <udev_device_get_syspath@plt>
mov    %r14,%rdi
mov    %eax,%esi
mov    $0x400,%edx
call   1100 <util_strlcpy@plt>
mov    %r14,%rdi
lea    0xd27(%rip),%rsi
mov    $0x400,%edx
call   1110 <util_strlcat@plt>
mov    0x0(%rbp),%rsi
mov    %r14,%rdi
mov    $0x400,%edx
call   1110 <util_strlcat@plt>
mov    %r14,%rdi
lea    0x10(%rsp),%rsi
call   10c0 <lstat@plt>
test   %rax,%rax
jne    1280 <print_all_attributes+0x80>
mov    0x10(%rsp),%edi
call   1060 <S_ISLNK@plt>
test   %rax,%rax
jne    1280 <print_all_attributes+0x80>
mov    %r13,0x8(%rsp)
mov    0x0(%rbp),%rsi
mov    %r12,%rdi
call   1120 <udev_device_get_sysattr_value@plt>
test   %rax,%rax
je     1277 <print_all_attributes+0x77>
mov    %rax,%r13
mov    0x0(%rbp),%rdx
mov    0x8(%rsp),%rdi
lea    0xcb9(%rip),%rsi
mov    %rax,%rcx
mov    %r15,%r8
xor    %eax,%eax
call   1070 <udev_log_null@plt>
mov    %r13,%rdi
call   1090 <strlen@plt>
mov    %rax,%r15
add    $0x1,%r15
cmp    $0x1,%r15
je     125a <print_all_attributes+0x5a>
movsbl -0x2(%r13,%r15,1),%edi
call   10f0 <isprint@plt>
add    $0xffffffffffffffff,%r15
test   %rax,%rax
jne    1370 <print_all_attributes+0x170>
mov    0x0(%rbp),%rdx
mov    0x8(%rsp),%r13
mov    %r13,%rdi
lea    0xc81(%rip),%rsi
xor    %eax,%eax
call   1070 <udev_log_null@plt>
jmp    1280 <print_all_attributes+0x80>
mov    %rbx,%rdi
call   10b0 <closedir@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
add    $0x428,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.udev_device = type { i32 }
%struct.udev = type { i32 }
%struct.dirent = type { i8* }
%struct.stat = type { i32 }
@.str = [7 x i8] c"uevent\00"
@.str.1 = [4 x i8] c"dev\00"
@.str.2 = [2 x i8] c"/\00"
@.str.3 = [21 x i8] c"attr '%s'='%s'(%zi)\0A\00"
@.str.4 = [45 x i8] c"attribute value of '%s' non-printable, skip\0A\00"
@.str.5 = [18 x i8] c" %s{%s}==\22%s\22\0A\00"
@.str.6 = [2 x i8] c"\0A\00"
define void @print_all_attributes(%struct.udev_device* %0, i8* %1) {
%3 = alloca %struct.udev_device*
%4 = alloca i8*
%5 = alloca %struct.udev*
%6 = alloca i32*
%7 = alloca %struct.dirent*
%8 = alloca %struct.stat
%9 = alloca [1024 x i8]
%10 = alloca i8*
%11 = alloca i64
store %struct.udev_device* %0, %struct.udev_device** %3
store i8* %1, i8** %4
%12 = load %struct.udev_device*, %struct.udev_device** %3
%13 = call %struct.udev* @udev_device_get_udev(%struct.udev_device* %12)
store %struct.udev* %13, %struct.udev** %5
%14 = load %struct.udev_device*, %struct.udev_device** %3
%15 = call i32 @udev_device_get_syspath(%struct.udev_device* %14)
%16 = call i32* @opendir(i32 %15)
store i32* %16, i32** %6
%17 = load i32*, i32** %6
%18 = icmp ne i32* %17, null
br i1 %18, label %19, label %127
19: ; preds = %2
%20 = load i32*, i32** %6
%21 = call %struct.dirent* @readdir(i32* %20)
store %struct.dirent* %21, %struct.dirent** %7
br label %22
22: ; preds = %121, %19
%23 = load %struct.dirent*, %struct.dirent** %7
%24 = icmp ne %struct.dirent* %23, null
br i1 %24, label %25, label %124
25: ; preds = %22
%26 = load %struct.dirent*, %struct.dirent** %7
%27 = getelementptr inbounds %struct.dirent, %struct.dirent* %26, i32 0, i32 0
%28 = load i8*, i8** %27
%29 = getelementptr inbounds i8, i8* %28, i64 0
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 46
br i1 %32, label %33, label %34
33: ; preds = %25
br label %121
34: ; preds = %25
%35 = load %struct.dirent*, %struct.dirent** %7
%36 = getelementptr inbounds %struct.dirent, %struct.dirent* %35, i32 0, i32 0
%37 = load i8*, i8** %36
%38 = call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %41
40: ; preds = %34
br label %121
41: ; preds = %34
%42 = load %struct.dirent*, %struct.dirent** %7
%43 = getelementptr inbounds %struct.dirent, %struct.dirent* %42, i32 0, i32 0
%44 = load i8*, i8** %43
%45 = call i64 @strcmp(i8* %44, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %48
47: ; preds = %41
br label %121
48: ; preds = %41
%49 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%50 = load %struct.udev_device*, %struct.udev_device** %3
%51 = call i32 @udev_device_get_syspath(%struct.udev_device* %50)
%52 = call i32 @util_strlcpy(i8* %49, i32 %51, i32 1024)
%53 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%54 = call i32 @util_strlcat(i8* %53, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 1024)
%55 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%56 = load %struct.dirent*, %struct.dirent** %7
%57 = getelementptr inbounds %struct.dirent, %struct.dirent* %56, i32 0, i32 0
%58 = load i8*, i8** %57
%59 = call i32 @util_strlcat(i8* %55, i8* %58, i32 1024)
%60 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%61 = call i64 @lstat(i8* %60, %struct.stat* %8)
%62 = icmp ne i64 %61, 0
br i1 %62, label %63, label %64
63: ; preds = %48
br label %121
64: ; preds = %48
%65 = getelementptr inbounds %struct.stat, %struct.stat* %8, i32 0, i32 0
%66 = load i32, i32* %65
%67 = call i64 @S_ISLNK(i32 %66)
%68 = icmp ne i64 %67, 0
br i1 %68, label %69, label %70
69: ; preds = %64
br label %121
70: ; preds = %64
%71 = load %struct.udev_device*, %struct.udev_device** %3
%72 = load %struct.dirent*, %struct.dirent** %7
%73 = getelementptr inbounds %struct.dirent, %struct.dirent* %72, i32 0, i32 0
%74 = load i8*, i8** %73
%75 = call i8* @udev_device_get_sysattr_value(%struct.udev_device* %71, i8* %74)
store i8* %75, i8** %10
%76 = load i8*, i8** %10
%77 = icmp eq i8* %76, null
br i1 %77, label %78, label %79
78: ; preds = %70
br label %121
79: ; preds = %70
%80 = load %struct.udev*, %struct.udev** %5
%81 = load %struct.dirent*, %struct.dirent** %7
%82 = getelementptr inbounds %struct.dirent, %struct.dirent* %81, i32 0, i32 0
%83 = load i8*, i8** %82
%84 = load i8*, i8** %10
%85 = load i64, i64* %11
%86 = call i32 (%struct.udev*, i8*, i8*, ...) @udev_log_null(%struct.udev* %80, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* %83, i8* %84, i64 %85)
%87 = load i8*, i8** %10
%88 = call i64 @strlen(i8* %87)
store i64 %88, i64* %11
br label %89
89: ; preds = %102, %79
%90 = load i64, i64* %11
%91 = icmp ugt i64 %90, 0
br i1 %91, label %92, label %100
92: ; preds = %89
%93 = load i8*, i8** %10
%94 = load i64, i64* %11
%95 = sub i64 %94, 1
%96 = getelementptr inbounds i8, i8* %93, i64 %95
%97 = load i8, i8* %96
%98 = call i64 @isprint(i8 signext %97)
%99 = icmp ne i64 %98, 0
br label %100
100: ; preds = %92, %89
%101 = phi i1 [ false, %89 ], [ %99, %92 ]
br i1 %101, label %102, label %105
102: ; preds = %100
%103 = load i64, i64* %11
%104 = add i64 %103, -1
store i64 %104, i64* %11
br label %89
105: ; preds = %100
%106 = load i64, i64* %11
%107 = icmp ugt i64 %106, 0
br i1 %107, label %108, label %114
108: ; preds = %105
%109 = load %struct.udev*, %struct.udev** %5
%110 = load %struct.dirent*, %struct.dirent** %7
%111 = getelementptr inbounds %struct.dirent, %struct.dirent* %110, i32 0, i32 0
%112 = load i8*, i8** %111
%113 = call i32 (%struct.udev*, i8*, i8*, ...) @udev_log_null(%struct.udev* %109, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), i8* %112)
br label %121
114: ; preds = %105
%115 = load i8*, i8** %4
%116 = load %struct.dirent*, %struct.dirent** %7
%117 = getelementptr inbounds %struct.dirent, %struct.dirent* %116, i32 0, i32 0
%118 = load i8*, i8** %117
%119 = load i8*, i8** %10
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* %115, i8* %118, i8* %119)
br label %121
121: ; preds = %114, %108, %78, %69, %63, %47, %40, %33
%122 = load i32*, i32** %6
%123 = call %struct.dirent* @readdir(i32* %122)
store %struct.dirent* %123, %struct.dirent** %7
br label %22
124: ; preds = %22
%125 = load i32*, i32** %6
%126 = call i32 @closedir(i32* %125)
br label %127
127: ; preds = %124, %2
%128 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.udev_device = type { i32 }
%struct.stat = type { i32 }
%struct.udev = type { i32 }
%struct.dirent = type { i8* }
@.str = [7 x i8] c"uevent\00"
@.str.1 = [4 x i8] c"dev\00"
@.str.2 = [2 x i8] c"/\00"
@.str.3 = [21 x i8] c"attr '%s'='%s'(%zi)\0A\00"
@.str.4 = [45 x i8] c"attribute value of '%s' non-printable, skip\0A\00"
@.str.5 = [18 x i8] c" %s{%s}==\22%s\22\0A\00"
define void @print_all_attributes(%struct.udev_device* %0, i8* %1) {
%3 = alloca %struct.stat
%4 = alloca [1024 x i8]
%5 = tail call %struct.udev* @udev_device_get_udev(%struct.udev_device* %0)
%6 = tail call i32 @udev_device_get_syspath(%struct.udev_device* %0)
%7 = tail call i32* @opendir(i32 %6)
%8 = icmp eq i32* %7, null
br i1 %8, label %71, label %9
9: ; preds = %2
%10 = tail call %struct.dirent* @readdir(i32* %7)
%11 = icmp eq %struct.dirent* %10, null
br i1 %11, label %69, label %12
12: ; preds = %9
%13 = bitcast %struct.stat* %3 to i8*
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%15 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
br label %16
16: ; preds = %12, %65
%17 = phi i64 [ undef, %12 ], [ %66, %65 ]
%18 = phi %struct.dirent* [ %10, %12 ], [ %67, %65 ]
%19 = getelementptr inbounds %struct.dirent, %struct.dirent* %18, i64 0, i32 0
%20 = load i8*, i8** %19
%21 = load i8, i8* %20
%22 = icmp eq i8 %21, 46
br i1 %22, label %65, label %23
23: ; preds = %16
%24 = call i64 @strcmp(i8* %20, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %65, label %26
26: ; preds = %23
%27 = load i8*, i8** %19
%28 = call i64 @strcmp(i8* %27, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %65, label %30
30: ; preds = %26
%31 = call i32 @udev_device_get_syspath(%struct.udev_device* %0)
%32 = call i32 @util_strlcpy(i8* %14, i32 %31, i32 1024)
%33 = call i32 @util_strlcat(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 1024)
%34 = load i8*, i8** %19
%35 = call i32 @util_strlcat(i8* %14, i8* %34, i32 1024)
%36 = call i64 @lstat(i8* %14, %struct.stat* %3)
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %65
38: ; preds = %30
%39 = load i32, i32* %15
%40 = call i64 @S_ISLNK(i32 %39)
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %65
42: ; preds = %38
%43 = load i8*, i8** %19
%44 = call i8* @udev_device_get_sysattr_value(%struct.udev_device* %0, i8* %43)
%45 = icmp eq i8* %44, null
br i1 %45, label %65, label %46
46: ; preds = %42
%47 = load i8*, i8** %19
%48 = call i32 (%struct.udev*, i8*, i8*, ...) @udev_log_null(%struct.udev* %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* %47, i8* %44, i64 %17)
%49 = call i64 @strlen(i8* %44)
br label %50
50: ; preds = %53, %46
%51 = phi i64 [ %49, %46 ], [ %54, %53 ]
%52 = icmp eq i64 %51, 0
br i1 %52, label %62, label %53
53: ; preds = %50
%54 = add i64 %51, -1
%55 = getelementptr inbounds i8, i8* %44, i64 %54
%56 = load i8, i8* %55
%57 = call i64 @isprint(i8 signext %56)
%58 = icmp eq i64 %57, 0
br i1 %58, label %59, label %50
59: ; preds = %53
%60 = load i8*, i8** %19
%61 = call i32 (%struct.udev*, i8*, i8*, ...) @udev_log_null(%struct.udev* %5, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), i8* %60)
br label %65
62: ; preds = %50
%63 = load i8*, i8** %19
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* %1, i8* %63, i8* %44)
br label %65
65: ; preds = %42, %38, %30, %26, %23, %16, %62, %59
%66 = phi i64 [ %51, %59 ], [ 0, %62 ], [ %17, %16 ], [ %17, %23 ], [ %17, %26 ], [ %17, %30 ], [ %17, %38 ], [ %17, %42 ]
%67 = call %struct.dirent* @readdir(i32* %7)
%68 = icmp eq %struct.dirent* %67, null
br i1 %68, label %69, label %16
69: ; preds = %65, %9
%70 = call i32 @closedir(i32* %7)
br label %71
71: ; preds = %69, %2
%72 = call i32 @putchar(i32 10)
ret void
}