#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 (*FooProc)();

/* Variables and functions */
int /*<<< orphan*/ RTLD_LAZY;
int dlclose(void *);
char *dlerror();
void *dlopen(char *, int /*<<< orphan*/);
scalar_t__ dlsym(void *, char *);
char *getenv(char *);
int /*<<< orphan*/ printf(char *, ...);
long strtol(char const *, char **, int /*<<< orphan*/);
int stub1();
int main(int argc, const char *argv[]) {
  const char *env = getenv("DYLD_LIBRARY_PATH");
  if (env == NULL) {
    printf("[BEGIN] dlopen-DYLD_LIBRARY_PATH\n");
    printf("[FAIL] dlopen-DYLD_LIBRARY_PATH, env not set\n");
    return 0;
  }
  const char *valueStr = argv[1];
  if (valueStr == NULL) {
    printf("[BEGIN] dlopen-DYLD_LIBRARY_PATH\n");
    printf("[FAIL] dlopen-DYLD_LIBRARY_PATH, arg1 value not set\n");
    return 0;
  }
  char *end;
  long value = strtol(valueStr, &end, 0);
  printf("[BEGIN] dlopen-DYLD_LIBRARY_PATH %s\n", env);
  void *handle = dlopen("/bogus/libfoo.dylib", RTLD_LAZY);
  if (handle == NULL) {
    printf("dlerror(): %s\n", dlerror());
    printf("[FAIL] dlopen-DYLD_LIBRARY_PATH %s\n", env);
    return 0;
  }
  typedef int (*FooProc)();
  FooProc sym = (FooProc)dlsym(handle, "foo");
  if (sym == NULL) {
    printf("dlerror(): %s\n", dlerror());
    printf("[FAIL] dlopen-DYLD_LIBRARY_PATH %s\n", env);
    return 0;
  }
  int result = (*sym)();
  if (result != value) {
    printf("result=%d, expected %ld (str=%s)\n", result, value, valueStr);
    printf("[FAIL] dlopen-DYLD_LIBRARY_PATH %s\n", env);
    return 0;
  }
  int r = dlclose(handle);
  if (r != 0) {
    printf("dlclose() returned %d\n", r);
    printf("[FAIL] dlopen-DYLD_LIBRARY_PATH %s\n", env);
    return 0;
  }
  void *handle2 = dlopen("/junk/libfoo.dylib", RTLD_LAZY);
  if (handle2 == NULL) {
    printf("dlerror(): %s\n", dlerror());
    printf("[FAIL] dlopen-DYLD_LIBRARY_PATH %s\n", env);
    return 0;
  }
  printf("[PASS] dlopen-DYLD_LIBRARY_PATH %s\n", env);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe73(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    11c9 <main+0x59>
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13e1 <main+0x271>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1208 <main+0x98>
lea    0xe2b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13e1 <main+0x271>
mov    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
xor    %edx,%edx
call   1070 <strtol@plt>
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2dac(%rip),%rax
mov    (%rax),%esi
lea    0xe7f(%rip),%rdi
call   1060 <dlopen@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1287 <main+0x117>
mov    $0x0,%al
call   1040 <dlerror@plt>
mov    %rax,%rsi
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13e1 <main+0x271>
mov    -0x38(%rbp),%rdi
lea    0xe71(%rip),%rsi
call   1080 <dlsym@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    12dc <main+0x16c>
mov    $0x0,%al
call   1040 <dlerror@plt>
mov    %rax,%rsi
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xe16(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13e1 <main+0x271>
mov    $0x0,%al
call   *-0x40(%rbp)
mov    %eax,-0x44(%rbp)
movslq -0x44(%rbp),%rax
cmp    -0x30(%rbp),%rax
je     1329 <main+0x1b9>
mov    -0x44(%rbp),%esi
mov    -0x30(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xe03(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13e1 <main+0x271>
mov    -0x38(%rbp),%rdi
call   1090 <dlclose@plt>
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x48(%rbp)
je     136e <main+0x1fe>
mov    -0x48(%rbp),%esi
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xd84(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13e1 <main+0x271>
mov    0x2c6b(%rip),%rax
mov    (%rax),%esi
lea    0xdc2(%rip),%rdi
call   1060 <dlopen@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
jne    13c8 <main+0x258>
mov    $0x0,%al
call   1040 <dlerror@plt>
mov    %rax,%rsi
lea    0xd2d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xd2a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13e1 <main+0x271>
mov    -0x18(%rbp),%rsi
lea    0xd80(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0xf8c(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1243 <main+0xc3>
mov    0x8(%rbx),%r12
test   %r12,%r12
je     125d <main+0xdd>
mov    %rax,%r14
lea    0x8(%rsp),%rsi
mov    %r12,%rdi
xor    %edx,%edx
call   1080 <strtol@plt>
mov    %rax,%r15
lea    0xe32(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2e01(%rip),%r13
mov    0x0(%r13),%esi
lea    0xe3b(%rip),%rdi
call   1070 <dlopen@plt>
test   %rax,%rax
je     12ad <main+0x12d>
mov    %rax,%rbx
lea    0xe6a(%rip),%rsi
mov    %rax,%rdi
call   1090 <dlsym@plt>
test   %rax,%rax
je     12ad <main+0x12d>
mov    %rax,%rcx
xor    %eax,%eax
call   *%rcx
movslq %eax,%rcx
cmp    %rcx,%r15
jne    1277 <main+0xf7>
mov    %rbx,%rdi
call   10a0 <dlclose@plt>
test   %eax,%eax
je     128f <main+0x10f>
lea    0xe5d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    12c5 <main+0x145>
lea    0xeca(%rip),%rdi
call   1050 <puts@plt>
lea    0xedf(%rip),%rdi
call   1050 <puts@plt>
jmp    12d6 <main+0x156>
lea    0xeb0(%rip),%rdi
call   1050 <puts@plt>
lea    0xe70(%rip),%rdi
call   1050 <puts@plt>
jmp    12d6 <main+0x156>
lea    0xdf2(%rip),%rdi
mov    %eax,%esi
mov    %r15,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1060 <printf@plt>
jmp    12c5 <main+0x145>
mov    0x0(%r13),%esi
lea    0xe0f(%rip),%rdi
call   1070 <dlopen@plt>
test   %rax,%rax
je     12ad <main+0x12d>
lea    0xe11(%rip),%rdi
jmp    12cc <main+0x14c>
xor    %eax,%eax
call   1040 <dlerror@plt>
lea    0xd7e(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xd7c(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [18 x i8] c"DYLD_LIBRARY_PATH\00"
@.str.1 = [34 x i8] c"[BEGIN] dlopen-DYLD_LIBRARY_PATH\0A\00"
@.str.2 = [46 x i8] c"[FAIL] dlopen-DYLD_LIBRARY_PATH, env not set\0A\00"
@.str.3 = [53 x i8] c"[FAIL] dlopen-DYLD_LIBRARY_PATH, arg1 value not set\0A\00"
@.str.4 = [37 x i8] c"[BEGIN] dlopen-DYLD_LIBRARY_PATH %s\0A\00"
@.str.5 = [20 x i8] c"/bogus/libfoo.dylib\00"
@RTLD_LAZY = global i32 0
@.str.6 = [15 x i8] c"dlerror(): %s\0A\00"
@.str.7 = [36 x i8] c"[FAIL] dlopen-DYLD_LIBRARY_PATH %s\0A\00"
@.str.8 = [4 x i8] c"foo\00"
@.str.9 = [34 x i8] c"result=%d, expected %ld (str=%s)\0A\00"
@.str.10 = [23 x i8] c"dlclose() returned %d\0A\00"
@.str.11 = [19 x i8] c"/junk/libfoo.dylib\00"
@.str.12 = [36 x i8] c"[PASS] dlopen-DYLD_LIBRARY_PATH %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i32 (...)*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = call i8* @getenv(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i8* %15, i8** %6
%16 = load i8*, i8** %6
%17 = icmp eq i8* %16, null
br i1 %17, label %18, label %21
18: ; preds = %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %92
21: ; preds = %2
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
store i8* %24, i8** %7
%25 = load i8*, i8** %7
%26 = icmp eq i8* %25, null
br i1 %26, label %27, label %30
27: ; preds = %21
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %3
br label %92
30: ; preds = %21
%31 = load i8*, i8** %7
%32 = call i64 @strtol(i8* %31, i8** %8, i32 0)
store i64 %32, i64* %9
%33 = load i8*, i8** %6
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* %33)
%35 = load i32, i32* @RTLD_LAZY
%36 = call i8* @dlopen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %35)
store i8* %36, i8** %10
%37 = load i8*, i8** %10
%38 = icmp eq i8* %37, null
br i1 %38, label %39, label %44
39: ; preds = %30
%40 = call i8* (...) @dlerror()
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %40)
%42 = load i8*, i8** %6
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i8* %42)
store i32 0, i32* %3
br label %92
44: ; preds = %30
%45 = load i8*, i8** %10
%46 = call i64 @dlsym(i8* %45, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%47 = inttoptr i64 %46 to i32 (...)*
store i32 (...)* %47, i32 (...)** %11
%48 = load i32 (...)*, i32 (...)** %11
%49 = icmp eq i32 (...)* %48, null
br i1 %49, label %50, label %55
50: ; preds = %44
%51 = call i8* (...) @dlerror()
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %51)
%53 = load i8*, i8** %6
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i8* %53)
store i32 0, i32* %3
br label %92
55: ; preds = %44
%56 = load i32 (...)*, i32 (...)** %11
%57 = call i32 (...) %56()
store i32 %57, i32* %12
%58 = load i32, i32* %12
%59 = sext i32 %58 to i64
%60 = load i64, i64* %9
%61 = icmp ne i64 %59, %60
br i1 %61, label %62, label %69
62: ; preds = %55
%63 = load i32, i32* %12
%64 = load i64, i64* %9
%65 = load i8*, i8** %7
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), i32 %63, i64 %64, i8* %65)
%67 = load i8*, i8** %6
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i8* %67)
store i32 0, i32* %3
br label %92
69: ; preds = %55
%70 = load i8*, i8** %10
%71 = call i32 @dlclose(i8* %70)
store i32 %71, i32* %13
%72 = load i32, i32* %13
%73 = icmp ne i32 %72, 0
br i1 %73, label %74, label %79
74: ; preds = %69
%75 = load i32, i32* %13
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i32 %75)
%77 = load i8*, i8** %6
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i8* %77)
store i32 0, i32* %3
br label %92
79: ; preds = %69
%80 = load i32, i32* @RTLD_LAZY
%81 = call i8* @dlopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), i32 %80)
store i8* %81, i8** %14
%82 = load i8*, i8** %14
%83 = icmp eq i8* %82, null
br i1 %83, label %84, label %89
84: ; preds = %79
%85 = call i8* (...) @dlerror()
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %85)
%87 = load i8*, i8** %6
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i8* %87)
store i32 0, i32* %3
br label %92
89: ; preds = %79
%90 = load i8*, i8** %6
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0), i8* %90)
store i32 0, i32* %3
br label %92
92: ; preds = %89, %84, %74, %62, %50, %39, %27, %18
%93 = load i32, i32* %3
ret i32 %93
}

LLVM IR (-O2):
@.str = [18 x i8] c"DYLD_LIBRARY_PATH\00"
@.str.4 = [37 x i8] c"[BEGIN] dlopen-DYLD_LIBRARY_PATH %s\0A\00"
@.str.5 = [20 x i8] c"/bogus/libfoo.dylib\00"
@RTLD_LAZY = global i32 0
@.str.6 = [15 x i8] c"dlerror(): %s\0A\00"
@.str.7 = [36 x i8] c"[FAIL] dlopen-DYLD_LIBRARY_PATH %s\0A\00"
@.str.8 = [4 x i8] c"foo\00"
@.str.9 = [34 x i8] c"result=%d, expected %ld (str=%s)\0A\00"
@.str.10 = [23 x i8] c"dlclose() returned %d\0A\00"
@.str.11 = [19 x i8] c"/junk/libfoo.dylib\00"
@.str.12 = [36 x i8] c"[PASS] dlopen-DYLD_LIBRARY_PATH %s\0A\00"
@str.13 = [52 x i8] c"[FAIL] dlopen-DYLD_LIBRARY_PATH, arg1 value not set\00"
@str.14 = [33 x i8] c"[BEGIN] dlopen-DYLD_LIBRARY_PATH\00"
@str.15 = [45 x i8] c"[FAIL] dlopen-DYLD_LIBRARY_PATH, env not set\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i8*
%4 = tail call i8* @getenv(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.14, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.15, i64 0, i64 0))
br label %54
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.14, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.13, i64 0, i64 0))
br label %54
16: ; preds = %9
%17 = bitcast i8** %3 to i8*
%18 = call i64 @strtol(i8* %11, i8** %3, i32 0)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* %4)
%20 = load i32, i32* @RTLD_LAZY
%21 = tail call i8* @dlopen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %20)
%22 = icmp eq i8* %21, null
br i1 %22, label %23, label %26
23: ; preds = %16
%24 = tail call i8* (...) @dlerror()
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %24)
br label %51
26: ; preds = %16
%27 = tail call i64 @dlsym(i8* %21, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = tail call i8* (...) @dlerror()
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %30)
br label %51
32: ; preds = %26
%33 = inttoptr i64 %27 to i32 (...)*
%34 = tail call i32 (...) %33()
%35 = sext i32 %34 to i64
%36 = icmp eq i64 %18, %35
br i1 %36, label %39, label %37
37: ; preds = %32
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), i32 %34, i64 %18, i8* %11)
br label %51
39: ; preds = %32
%40 = tail call i32 @dlclose(i8* %21)
%41 = icmp eq i32 %40, 0
br i1 %41, label %44, label %42
42: ; preds = %39
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i32 %40)
br label %51
44: ; preds = %39
%45 = load i32, i32* @RTLD_LAZY
%46 = tail call i8* @dlopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), i32 %45)
%47 = icmp eq i8* %46, null
br i1 %47, label %48, label %51
48: ; preds = %44
%49 = tail call i8* (...) @dlerror()
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %49)
br label %51
51: ; preds = %44, %29, %42, %48, %37, %23
%52 = phi i8* [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), %29 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), %42 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), %48 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), %37 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), %23 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0), %44 ]
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %52, i8* %4)
br label %54
54: ; preds = %13, %51, %6
ret i32 0
}