#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 storage_backend {
  int dummy;
};
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
int /*<<< orphan*/ errno;
struct storage_backend *init_storage_file(char const *);
struct storage_backend *init_storage_memcached(char const *);
struct storage_backend *init_storage_null();
struct storage_backend *init_storage_rados(char const *);
struct storage_backend *init_storage_ro_composite(char const *);
struct storage_backend *init_storage_ro_http_proxy(char const *);
int /*<<< orphan*/ log_message(int, char *, ...);
scalar_t__ stat(char const *, struct stat *);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
scalar_t__ strlen(char const *);
char const *strstr(char const *, char *);
struct storage_backend *init_storage_backend(const char *options) {
  struct stat st;
  struct storage_backend *store = NULL;
  if (strlen(options) == 0) {
    log_message(3, "init_storage_backend: Options string was empty");
    return NULL;
  }
  if (options[0] == '/') {
    if (stat(options, &st) != 0) {
      log_message(3, "init_storage_backend: Failed to stat %s with error: %s",
                  options, strerror(errno));
      return NULL;
    }
    if (S_ISDIR(st.st_mode)) {
      log_message(
          0, "init_storage_backend: initialising file storage backend at: %s",
          options);
      store = init_storage_file(options);
      return store;
    } else {
      log_message(3, "init_storage_backend: %s is not a directory", options,
                  strerror(errno));
      return NULL;
    }
  }
  if (strstr(options, "rados://") == options) {
    log_message(
        0, "init_storage_backend: initialising rados storage backend at: %s",
        options);
    store = init_storage_rados(options);
    return store;
  }
  if (strstr(options, "memcached://") == options) {
    log_message(
        0,
        "init_storage_backend: initialising memcached storage backend at: %s",
        options);
    store = init_storage_memcached(options);
    return store;
  }
  if (strstr(options, "ro_http_proxy://") == options) {
    log_message(0,
                "init_storage_backend: initialising ro_http_proxy storage "
                "backend at: %s",
                options);
    store = init_storage_ro_http_proxy(options);
    return store;
  }
  if (strstr(options, "composite:{") == options) {
    log_message(0,
                "init_storage_backend: initialising ro_composite storage "
                "backend at: %s",
                options);
    store = init_storage_ro_composite(options);
    return store;
  }
  if (strstr(options, "null://") == options) {
    log_message(
        0, "init_storage_backend: initialising null storage backend at: %s",
        options);
    store = init_storage_null();
    return store;
  }
  log_message(
      3, "init_storage_backend: No valid storage backend found for options: %s",
      options);
  return store;
}


x86 assembly (clang, -O0):
<init_storage_backend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x0,%rax
jne    1207 <init_storage_backend+0x47>
mov    $0x3,%edi
lea    0xe0d(%rip),%rsi
mov    $0x0,%al
call   10b0 <log_message@plt>
movq   $0x0,-0x8(%rbp)
jmp    146b <init_storage_backend+0x2ab>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    12e6 <init_storage_backend+0x126>
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   10a0 <stat@plt>
cmp    $0x0,%rax
je     126a <init_storage_backend+0xaa>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    0x2da3(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
mov    -0x28(%rbp),%rdx
mov    %eax,%ecx
mov    $0x3,%edi
lea    0xdd9(%rip),%rsi
mov    $0x0,%al
call   10b0 <log_message@plt>
movq   $0x0,-0x8(%rbp)
jmp    146b <init_storage_backend+0x2ab>
mov    -0x18(%rbp),%edi
call   1070 <S_ISDIR@plt>
cmp    $0x0,%rax
je     12aa <init_storage_backend+0xea>
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
lea    0xddd(%rip),%rsi
mov    $0x0,%al
call   10b0 <log_message@plt>
mov    -0x10(%rbp),%rdi
call   1030 <init_storage_file@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    146b <init_storage_backend+0x2ab>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    0x2d27(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
mov    -0x30(%rbp),%rdx
mov    %eax,%ecx
mov    $0x3,%edi
lea    0xdd3(%rip),%rsi
mov    $0x0,%al
call   10b0 <log_message@plt>
movq   $0x0,-0x8(%rbp)
jmp    146b <init_storage_backend+0x2ab>
mov    -0x10(%rbp),%rdi
lea    0xde0(%rip),%rsi
call   10e0 <strstr@plt>
cmp    -0x10(%rbp),%rax
jne    132e <init_storage_backend+0x16e>
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
lea    0xdcd(%rip),%rsi
mov    $0x0,%al
call   10b0 <log_message@plt>
mov    -0x10(%rbp),%rdi
call   1040 <init_storage_rados@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    146b <init_storage_backend+0x2ab>
mov    -0x10(%rbp),%rdi
lea    0xde1(%rip),%rsi
call   10e0 <strstr@plt>
cmp    -0x10(%rbp),%rax
jne    1376 <init_storage_backend+0x1b6>
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
lea    0xdd2(%rip),%rsi
mov    $0x0,%al
call   10b0 <log_message@plt>
mov    -0x10(%rbp),%rdi
call   1080 <init_storage_memcached@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    146b <init_storage_backend+0x2ab>
mov    -0x10(%rbp),%rdi
lea    0xdea(%rip),%rsi
call   10e0 <strstr@plt>
cmp    -0x10(%rbp),%rax
jne    13be <init_storage_backend+0x1fe>
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
lea    0xddf(%rip),%rsi
mov    $0x0,%al
call   10b0 <log_message@plt>
mov    -0x10(%rbp),%rdi
call   1090 <init_storage_ro_http_proxy@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    146b <init_storage_backend+0x2ab>
mov    -0x10(%rbp),%rdi
lea    0xdfb(%rip),%rsi
call   10e0 <strstr@plt>
cmp    -0x10(%rbp),%rax
jne    1406 <init_storage_backend+0x246>
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
lea    0xdeb(%rip),%rsi
mov    $0x0,%al
call   10b0 <log_message@plt>
mov    -0x10(%rbp),%rdi
call   1050 <init_storage_ro_composite@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    146b <init_storage_backend+0x2ab>
mov    -0x10(%rbp),%rdi
lea    0xe06(%rip),%rsi
call   10e0 <strstr@plt>
cmp    -0x10(%rbp),%rax
jne    144c <init_storage_backend+0x28c>
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
lea    0xdf2(%rip),%rsi
mov    $0x0,%al
call   10b0 <log_message@plt>
mov    $0x0,%al
call   10c0 <init_storage_null@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    146b <init_storage_backend+0x2ab>
mov    -0x10(%rbp),%rdx
mov    $0x3,%edi
lea    0xe02(%rip),%rsi
mov    $0x0,%al
call   10b0 <log_message@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_storage_backend>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%al
cmp    $0x2f,%al
je     11dc <init_storage_backend+0x2c>
test   %al,%al
jne    121e <init_storage_backend+0x6e>
lea    0xe38(%rip),%rsi
xor    %r14d,%r14d
mov    $0x3,%edi
xor    %eax,%eax
call   10b0 <log_message@plt>
jmp    12f4 <init_storage_backend+0x144>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   10a0 <stat@plt>
test   %rax,%rax
je     12c5 <init_storage_backend+0x115>
mov    0x2de9(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
lea    0xe2a(%rip),%rsi
xor    %r14d,%r14d
mov    $0x3,%edi
mov    %rbx,%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   10b0 <log_message@plt>
jmp    12f4 <init_storage_backend+0x144>
lea    0xeac(%rip),%rsi
mov    $0x8,%edx
mov    %rbx,%rdi
call   1040 <strncmp@plt>
test   %eax,%eax
je     12ff <init_storage_backend+0x14f>
lea    0xed9(%rip),%rsi
mov    $0xc,%edx
mov    %rbx,%rdi
call   1040 <strncmp@plt>
test   %eax,%eax
je     1321 <init_storage_backend+0x171>
lea    0xf0e(%rip),%rsi
mov    $0x10,%edx
mov    %rbx,%rdi
call   1040 <strncmp@plt>
test   %eax,%eax
je     1343 <init_storage_backend+0x193>
lea    0xf4b(%rip),%rsi
mov    $0xb,%edx
mov    %rbx,%rdi
call   1040 <strncmp@plt>
test   %eax,%eax
je     137f <init_storage_backend+0x1cf>
lea    0xf82(%rip),%rsi
mov    $0x7,%edx
mov    %rbx,%rdi
call   1040 <strncmp@plt>
test   %eax,%eax
je     13a1 <init_storage_backend+0x1f1>
lea    0xfad(%rip),%rsi
xor    %r14d,%r14d
mov    $0x3,%edi
mov    %rbx,%rdx
xor    %eax,%eax
call   10b0 <log_message@plt>
jmp    12f4 <init_storage_backend+0x144>
mov    (%rsp),%edi
call   1070 <S_ISDIR@plt>
test   %rax,%rax
je     1365 <init_storage_backend+0x1b5>
lea    0xd89(%rip),%rsi
xor    %edi,%edi
mov    %rbx,%rdx
xor    %eax,%eax
call   10b0 <log_message@plt>
mov    %rbx,%rdi
call   1030 <init_storage_file@plt>
mov    %rax,%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xdd4(%rip),%rsi
xor    %edi,%edi
mov    %rbx,%rdx
xor    %eax,%eax
call   10b0 <log_message@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <init_storage_rados@plt>
lea    0xdff(%rip),%rsi
xor    %edi,%edi
mov    %rbx,%rdx
xor    %eax,%eax
call   10b0 <log_message@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1080 <init_storage_memcached@plt>
lea    0xe32(%rip),%rsi
xor    %edi,%edi
mov    %rbx,%rdx
xor    %eax,%eax
call   10b0 <log_message@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1090 <init_storage_ro_http_proxy@plt>
mov    0x2c74(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
lea    0xd2b(%rip),%rsi
jmp    1205 <init_storage_backend+0x55>
lea    0xe4a(%rip),%rsi
xor    %edi,%edi
mov    %rbx,%rdx
xor    %eax,%eax
call   10b0 <log_message@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1060 <init_storage_ro_composite@plt>
lea    0xe77(%rip),%rsi
xor    %edi,%edi
mov    %rbx,%rdx
xor    %eax,%eax
call   10b0 <log_message@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    10c0 <init_storage_null@plt>

LLVM IR (-O0):
%struct.storage_backend = type { i32 }
%struct.stat = type { i32 }
@.str = [47 x i8] c"init_storage_backend: Options string was empty\00"
@.str.1 = [55 x i8] c"init_storage_backend: Failed to stat %s with error: %s\00"
@errno = global i32 0
@.str.2 = [63 x i8] c"init_storage_backend: initialising file storage backend at: %s\00"
@.str.3 = [44 x i8] c"init_storage_backend: %s is not a directory\00"
@.str.4 = [9 x i8] c"rados://\00"
@.str.5 = [64 x i8] c"init_storage_backend: initialising rados storage backend at: %s\00"
@.str.6 = [13 x i8] c"memcached://\00"
@.str.7 = [68 x i8] c"init_storage_backend: initialising memcached storage backend at: %s\00"
@.str.8 = [17 x i8] c"ro_http_proxy://\00"
@.str.9 = [72 x i8] c"init_storage_backend: initialising ro_http_proxy storage backend at: %s\00"
@.str.10 = [12 x i8] c"composite:{\00"
@.str.11 = [71 x i8] c"init_storage_backend: initialising ro_composite storage backend at: %s\00"
@.str.12 = [8 x i8] c"null://\00"
@.str.13 = [63 x i8] c"init_storage_backend: initialising null storage backend at: %s\00"
@.str.14 = [69 x i8] c"init_storage_backend: No valid storage backend found for options: %s\00"
define %struct.storage_backend* @init_storage_backend(i8* %0) {
%2 = alloca %struct.storage_backend*
%3 = alloca i8*
%4 = alloca %struct.stat
%5 = alloca %struct.storage_backend*
store i8* %0, i8** %3
store %struct.storage_backend* null, %struct.storage_backend** %5
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 (i32, i8*, ...) @log_message(i32 3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
store %struct.storage_backend* null, %struct.storage_backend** %2
br label %100
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 0
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 47
br i1 %16, label %17, label %42
17: ; preds = %11
%18 = load i8*, i8** %3
%19 = call i64 @stat(i8* %18, %struct.stat* %4)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %26
21: ; preds = %17
%22 = load i8*, i8** %3
%23 = load i32, i32* @errno
%24 = call i32 @strerror(i32 %23)
%25 = call i32 (i32, i8*, ...) @log_message(i32 3, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i8* %22, i32 %24)
store %struct.storage_backend* null, %struct.storage_backend** %2
br label %100
26: ; preds = %17
%27 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%28 = load i32, i32* %27
%29 = call i64 @S_ISDIR(i32 %28)
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %37
31: ; preds = %26
%32 = load i8*, i8** %3
%33 = call i32 (i32, i8*, ...) @log_message(i32 0, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), i8* %32)
%34 = load i8*, i8** %3
%35 = call %struct.storage_backend* @init_storage_file(i8* %34)
store %struct.storage_backend* %35, %struct.storage_backend** %5
%36 = load %struct.storage_backend*, %struct.storage_backend** %5
store %struct.storage_backend* %36, %struct.storage_backend** %2
br label %100
37: ; preds = %26
%38 = load i8*, i8** %3
%39 = load i32, i32* @errno
%40 = call i32 @strerror(i32 %39)
%41 = call i32 (i32, i8*, ...) @log_message(i32 3, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i8* %38, i32 %40)
store %struct.storage_backend* null, %struct.storage_backend** %2
br label %100
42: ; preds = %11
%43 = load i8*, i8** %3
%44 = call i8* @strstr(i8* %43, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%45 = load i8*, i8** %3
%46 = icmp eq i8* %44, %45
br i1 %46, label %47, label %53
47: ; preds = %42
%48 = load i8*, i8** %3
%49 = call i32 (i32, i8*, ...) @log_message(i32 0, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0), i8* %48)
%50 = load i8*, i8** %3
%51 = call %struct.storage_backend* @init_storage_rados(i8* %50)
store %struct.storage_backend* %51, %struct.storage_backend** %5
%52 = load %struct.storage_backend*, %struct.storage_backend** %5
store %struct.storage_backend* %52, %struct.storage_backend** %2
br label %100
53: ; preds = %42
%54 = load i8*, i8** %3
%55 = call i8* @strstr(i8* %54, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%56 = load i8*, i8** %3
%57 = icmp eq i8* %55, %56
br i1 %57, label %58, label %64
58: ; preds = %53
%59 = load i8*, i8** %3
%60 = call i32 (i32, i8*, ...) @log_message(i32 0, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.7, i64 0, i64 0), i8* %59)
%61 = load i8*, i8** %3
%62 = call %struct.storage_backend* @init_storage_memcached(i8* %61)
store %struct.storage_backend* %62, %struct.storage_backend** %5
%63 = load %struct.storage_backend*, %struct.storage_backend** %5
store %struct.storage_backend* %63, %struct.storage_backend** %2
br label %100
64: ; preds = %53
%65 = load i8*, i8** %3
%66 = call i8* @strstr(i8* %65, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%67 = load i8*, i8** %3
%68 = icmp eq i8* %66, %67
br i1 %68, label %69, label %75
69: ; preds = %64
%70 = load i8*, i8** %3
%71 = call i32 (i32, i8*, ...) @log_message(i32 0, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.9, i64 0, i64 0), i8* %70)
%72 = load i8*, i8** %3
%73 = call %struct.storage_backend* @init_storage_ro_http_proxy(i8* %72)
store %struct.storage_backend* %73, %struct.storage_backend** %5
%74 = load %struct.storage_backend*, %struct.storage_backend** %5
store %struct.storage_backend* %74, %struct.storage_backend** %2
br label %100
75: ; preds = %64
%76 = load i8*, i8** %3
%77 = call i8* @strstr(i8* %76, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0))
%78 = load i8*, i8** %3
%79 = icmp eq i8* %77, %78
br i1 %79, label %80, label %86
80: ; preds = %75
%81 = load i8*, i8** %3
%82 = call i32 (i32, i8*, ...) @log_message(i32 0, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.11, i64 0, i64 0), i8* %81)
%83 = load i8*, i8** %3
%84 = call %struct.storage_backend* @init_storage_ro_composite(i8* %83)
store %struct.storage_backend* %84, %struct.storage_backend** %5
%85 = load %struct.storage_backend*, %struct.storage_backend** %5
store %struct.storage_backend* %85, %struct.storage_backend** %2
br label %100
86: ; preds = %75
%87 = load i8*, i8** %3
%88 = call i8* @strstr(i8* %87, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%89 = load i8*, i8** %3
%90 = icmp eq i8* %88, %89
br i1 %90, label %91, label %96
91: ; preds = %86
%92 = load i8*, i8** %3
%93 = call i32 (i32, i8*, ...) @log_message(i32 0, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.13, i64 0, i64 0), i8* %92)
%94 = call %struct.storage_backend* (...) @init_storage_null()
store %struct.storage_backend* %94, %struct.storage_backend** %5
%95 = load %struct.storage_backend*, %struct.storage_backend** %5
store %struct.storage_backend* %95, %struct.storage_backend** %2
br label %100
96: ; preds = %86
%97 = load i8*, i8** %3
%98 = call i32 (i32, i8*, ...) @log_message(i32 3, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.14, i64 0, i64 0), i8* %97)
%99 = load %struct.storage_backend*, %struct.storage_backend** %5
store %struct.storage_backend* %99, %struct.storage_backend** %2
br label %100
100: ; preds = %96, %91, %80, %69, %58, %47, %37, %31, %21, %9
%101 = load %struct.storage_backend*, %struct.storage_backend** %2
ret %struct.storage_backend* %101
}

LLVM IR (-O2):
%struct.storage_backend = type { i32 }
%struct.stat = type { i32 }
@.str = [47 x i8] c"init_storage_backend: Options string was empty\00"
@.str.1 = [55 x i8] c"init_storage_backend: Failed to stat %s with error: %s\00"
@errno = global i32 0
@.str.2 = [63 x i8] c"init_storage_backend: initialising file storage backend at: %s\00"
@.str.3 = [44 x i8] c"init_storage_backend: %s is not a directory\00"
@.str.4 = [9 x i8] c"rados://\00"
@.str.5 = [64 x i8] c"init_storage_backend: initialising rados storage backend at: %s\00"
@.str.6 = [13 x i8] c"memcached://\00"
@.str.7 = [68 x i8] c"init_storage_backend: initialising memcached storage backend at: %s\00"
@.str.8 = [17 x i8] c"ro_http_proxy://\00"
@.str.9 = [72 x i8] c"init_storage_backend: initialising ro_http_proxy storage backend at: %s\00"
@.str.10 = [12 x i8] c"composite:{\00"
@.str.11 = [71 x i8] c"init_storage_backend: initialising ro_composite storage backend at: %s\00"
@.str.12 = [8 x i8] c"null://\00"
@.str.13 = [63 x i8] c"init_storage_backend: initialising null storage backend at: %s\00"
@.str.14 = [69 x i8] c"init_storage_backend: No valid storage backend found for options: %s\00"
define %struct.storage_backend* @init_storage_backend(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = load i8, i8* %0
switch i8 %4, label %26 [
i8 0, label %5
i8 47, label %7
]
5: ; preds = %1
%6 = tail call i32 (i32, i8*, ...) @log_message(i32 3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
br label %58
7: ; preds = %1
%8 = call i64 @stat(i8* %0, %struct.stat* %2)
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %7
%11 = load i32, i32* @errno
%12 = call i32 @strerror(i32 %11)
%13 = call i32 (i32, i8*, ...) @log_message(i32 3, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i8* %0, i32 %12)
br label %58
14: ; preds = %7
%15 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%16 = load i32, i32* %15
%17 = call i64 @S_ISDIR(i32 %16)
%18 = icmp eq i64 %17, 0
br i1 %18, label %22, label %19
19: ; preds = %14
%20 = call i32 (i32, i8*, ...) @log_message(i32 0, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%21 = call %struct.storage_backend* @init_storage_file(i8* %0)
br label %58
22: ; preds = %14
%23 = load i32, i32* @errno
%24 = call i32 @strerror(i32 %23)
%25 = call i32 (i32, i8*, ...) @log_message(i32 3, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i8* %0, i32 %24)
br label %58
26: ; preds = %1
%27 = tail call i32 @strncmp(i8* %0, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i64 8)
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = tail call i32 (i32, i8*, ...) @log_message(i32 0, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0), i8* %0)
%31 = tail call %struct.storage_backend* @init_storage_rados(i8* %0)
br label %58
32: ; preds = %26
%33 = tail call i32 @strncmp(i8* %0, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i64 12)
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = tail call i32 (i32, i8*, ...) @log_message(i32 0, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.7, i64 0, i64 0), i8* %0)
%37 = tail call %struct.storage_backend* @init_storage_memcached(i8* %0)
br label %58
38: ; preds = %32
%39 = tail call i32 @strncmp(i8* %0, i8* dereferenceable(17) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i64 16)
%40 = icmp eq i32 %39, 0
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = tail call i32 (i32, i8*, ...) @log_message(i32 0, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.9, i64 0, i64 0), i8* %0)
%43 = tail call %struct.storage_backend* @init_storage_ro_http_proxy(i8* %0)
br label %58
44: ; preds = %38
%45 = tail call i32 @strncmp(i8* %0, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i64 11)
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %50
47: ; preds = %44
%48 = tail call i32 (i32, i8*, ...) @log_message(i32 0, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.11, i64 0, i64 0), i8* %0)
%49 = tail call %struct.storage_backend* @init_storage_ro_composite(i8* %0)
br label %58
50: ; preds = %44
%51 = tail call i32 @strncmp(i8* %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i64 7)
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %56
53: ; preds = %50
%54 = tail call i32 (i32, i8*, ...) @log_message(i32 0, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.13, i64 0, i64 0), i8* %0)
%55 = tail call %struct.storage_backend* (...) @init_storage_null()
br label %58
56: ; preds = %50
%57 = tail call i32 (i32, i8*, ...) @log_message(i32 3, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.14, i64 0, i64 0), i8* %0)
br label %58
58: ; preds = %56, %53, %47, %41, %35, %29, %22, %19, %10, %5
%59 = phi %struct.storage_backend* [ null, %5 ], [ null, %10 ], [ %21, %19 ], [ null, %22 ], [ %31, %29 ], [ %37, %35 ], [ %43, %41 ], [ %49, %47 ], [ %55, %53 ], [ null, %56 ]
ret %struct.storage_backend* %59
}