#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 */

/* Variables and functions */
int RTLD_GLOBAL;
int RTLD_LAZY;
scalar_t__ dlclose(void *);
char *dlerror();
void *dlopen(char *, int);
void *dlsym(void *, char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ mtrace();
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ puts(char *);
int main(void) {
  void *h1;
  void *h2;
  int (*fp)(void);
  int *vp;
  mtrace();
  h1 = dlopen("reldepmod1.so", RTLD_LAZY | RTLD_GLOBAL);
  if (h1 == NULL) {
    printf("cannot open reldepmod1.so: %s\n", dlerror());
    exit(1);
  }
  h2 = dlopen("reldepmod4.so", RTLD_LAZY);
  if (h2 == NULL) {
    printf("cannot open reldepmod4.so: %s\n", dlerror());
    exit(1);
  }
  vp = dlsym(h1, "some_var");
  if (vp == NULL) {
    printf("cannot get address of \"some_var\": %s\n", dlerror());
    exit(1);
  }
  *vp = 42;
  fp = dlsym(h2, "call_me");
  if (fp == NULL) {
    printf("cannot get address of \"call_me\": %s\n", dlerror());
    exit(1);
  }
  if (fp() != 0) {
    puts("function \"call_me\" returned wrong result");
    exit(1);
  }
  if (dlclose(h1) != 0) {
    printf("closing h1 failed: %s\n", dlerror());
    exit(1);
  }
  h1 = dlopen("reldepmod1.so", RTLD_LAZY | RTLD_GLOBAL);
  if (h1 == NULL) {
    printf("cannot open reldepmod1.so the second time: %s\n", dlerror());
    exit(1);
  }
  vp = dlsym(h1, "some_var");
  if (vp == NULL) {
    printf("cannot get address of \"some_var\" the second time: %s\n",
           dlerror());
    exit(1);
  }
  if (*vp != 0) {
    puts("variable \"some_var\" not reset");
    exit(1);
  }
  if (dlclose(h1) != 0) {
    printf("closing h1 failed: %s\n", dlerror());
    exit(1);
  }
  if (dlclose(h2) != 0) {
    printf("closing h2 failed: %s\n", dlerror());
    exit(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1080 <mtrace@plt>
mov    0x2e3b(%rip),%rax
mov    (%rax),%esi
mov    0x2e42(%rip),%rax
or     (%rax),%esi
lea    0xe51(%rip),%rdi
call   1060 <dlopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11e3 <main+0x63>
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,%rsi
lea    0xe3a(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    0x2dee(%rip),%rax
mov    (%rax),%esi
lea    0xe3a(%rip),%rdi
call   1060 <dlopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1227 <main+0xa7>
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,%rsi
lea    0xe23(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rdi
lea    0xe28(%rip),%rsi
call   1070 <dlsym@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1266 <main+0xe6>
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,%rsi
lea    0xe0c(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x28(%rbp),%rax
movl   $0x2a,(%rax)
mov    -0x18(%rbp),%rdi
lea    0xe0e(%rip),%rsi
call   1070 <dlsym@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    12af <main+0x12f>
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,%rsi
lea    0xdf1(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
call   *-0x20(%rbp)
cmp    $0x0,%eax
je     12d1 <main+0x151>
lea    0xdf4(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rdi
call   10a0 <dlclose@plt>
cmp    $0x0,%rax
je     1304 <main+0x184>
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,%rsi
lea    0xdea(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    0x2ccd(%rip),%rax
mov    (%rax),%esi
mov    0x2cd4(%rip),%rax
or     (%rax),%esi
lea    0xce3(%rip),%rdi
call   1060 <dlopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1351 <main+0x1d1>
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,%rsi
lea    0xdb4(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rdi
lea    0xcfe(%rip),%rsi
call   1070 <dlsym@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1390 <main+0x210>
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,%rsi
lea    0xda4(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x28(%rbp),%rax
cmpl   $0x0,(%rax)
je     13b3 <main+0x233>
lea    0xdb7(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rdi
call   10a0 <dlclose@plt>
cmp    $0x0,%rax
je     13e6 <main+0x266>
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,%rsi
lea    0xd08(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x18(%rbp),%rdi
call   10a0 <dlclose@plt>
cmp    $0x0,%rax
je     1419 <main+0x299>
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,%rsi
lea    0xd6f(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1080 <mtrace@plt>
mov    0x2e42(%rip),%r15
mov    0x2e4b(%rip),%r12
mov    (%r12),%esi
or     (%r15),%esi
lea    0xe55(%rip),%rdi
call   1060 <dlopen@plt>
test   %rax,%rax
je     12a3 <main+0x123>
mov    %rax,%rbx
mov    (%r15),%esi
lea    0xe67(%rip),%rdi
call   1060 <dlopen@plt>
test   %rax,%rax
je     12b3 <main+0x133>
mov    %rax,%r14
lea    0xe7c(%rip),%rsi
mov    %rbx,%rdi
call   1070 <dlsym@plt>
test   %rax,%rax
je     12c3 <main+0x143>
movl   $0x2a,(%rax)
lea    0xe8d(%rip),%rsi
mov    %r14,%rdi
call   1070 <dlsym@plt>
test   %rax,%rax
je     12d3 <main+0x153>
call   *%rax
test   %eax,%eax
jne    12e3 <main+0x163>
mov    %rbx,%rdi
call   10a0 <dlclose@plt>
test   %rax,%rax
jne    1290 <main+0x110>
mov    (%r12),%esi
or     (%r15),%esi
lea    0xdce(%rip),%rdi
call   1060 <dlopen@plt>
test   %rax,%rax
je     12ec <main+0x16c>
mov    %rax,%rbx
lea    0xe10(%rip),%rsi
mov    %rax,%rdi
call   1070 <dlsym@plt>
test   %rax,%rax
je     12fc <main+0x17c>
cmpl   $0x0,(%rax)
jne    130c <main+0x18c>
mov    %rbx,%rdi
call   10a0 <dlclose@plt>
test   %rax,%rax
jne    1290 <main+0x110>
mov    %r14,%rdi
call   10a0 <dlclose@plt>
test   %rax,%rax
jne    1322 <main+0x1a2>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
xor    %eax,%eax
call   1030 <dlerror@plt>
lea    0xe41(%rip),%rdi
jmp    1330 <main+0x1b0>
xor    %eax,%eax
call   1030 <dlerror@plt>
lea    0xd5d(%rip),%rdi
jmp    1330 <main+0x1b0>
xor    %eax,%eax
call   1030 <dlerror@plt>
lea    0xd7a(%rip),%rdi
jmp    1330 <main+0x1b0>
xor    %eax,%eax
call   1030 <dlerror@plt>
lea    0xd92(%rip),%rdi
jmp    1330 <main+0x1b0>
xor    %eax,%eax
call   1030 <dlerror@plt>
lea    0xdb0(%rip),%rdi
jmp    1330 <main+0x1b0>
lea    0xdcc(%rip),%rdi
jmp    1313 <main+0x193>
xor    %eax,%eax
call   1030 <dlerror@plt>
lea    0xdfc(%rip),%rdi
jmp    1330 <main+0x1b0>
xor    %eax,%eax
call   1030 <dlerror@plt>
lea    0xe1b(%rip),%rdi
jmp    1330 <main+0x1b0>
lea    0xe48(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
xor    %eax,%eax
call   1030 <dlerror@plt>
lea    0xe49(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"reldepmod1.so\00"
@RTLD_LAZY = global i32 0
@RTLD_GLOBAL = global i32 0
@.str.1 = [31 x i8] c"cannot open reldepmod1.so: %s\0A\00"
@.str.2 = [14 x i8] c"reldepmod4.so\00"
@.str.3 = [31 x i8] c"cannot open reldepmod4.so: %s\0A\00"
@.str.4 = [9 x i8] c"some_var\00"
@.str.5 = [38 x i8] c"cannot get address of \22some_var\22: %s\0A\00"
@.str.6 = [8 x i8] c"call_me\00"
@.str.7 = [37 x i8] c"cannot get address of \22call_me\22: %s\0A\00"
@.str.8 = [41 x i8] c"function \22call_me\22 returned wrong result\00"
@.str.9 = [23 x i8] c"closing h1 failed: %s\0A\00"
@.str.10 = [47 x i8] c"cannot open reldepmod1.so the second time: %s\0A\00"
@.str.11 = [54 x i8] c"cannot get address of \22some_var\22 the second time: %s\0A\00"
@.str.12 = [30 x i8] c"variable \22some_var\22 not reset\00"
@.str.13 = [23 x i8] c"closing h2 failed: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32 ()*
%5 = alloca i32*
store i32 0, i32* %1
%6 = call i32 (...) @mtrace()
%7 = load i32, i32* @RTLD_LAZY
%8 = load i32, i32* @RTLD_GLOBAL
%9 = or i32 %7, %8
%10 = call i8* @dlopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %9)
store i8* %10, i8** %2
%11 = load i8*, i8** %2
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %17
13: ; preds = %0
%14 = call i8* (...) @dlerror()
%15 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %0
%18 = load i32, i32* @RTLD_LAZY
%19 = call i8* @dlopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %18)
store i8* %19, i8** %3
%20 = load i8*, i8** %3
%21 = icmp eq i8* %20, null
br i1 %21, label %22, label %26
22: ; preds = %17
%23 = call i8* (...) @dlerror()
%24 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i8* %23)
%25 = call i32 @exit(i32 1)
unreachable
26: ; preds = %17
%27 = load i8*, i8** %2
%28 = call i8* @dlsym(i8* %27, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%29 = bitcast i8* %28 to i32*
store i32* %29, i32** %5
%30 = load i32*, i32** %5
%31 = icmp eq i32* %30, null
br i1 %31, label %32, label %36
32: ; preds = %26
%33 = call i8* (...) @dlerror()
%34 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), i8* %33)
%35 = call i32 @exit(i32 1)
unreachable
36: ; preds = %26
%37 = load i32*, i32** %5
store i32 42, i32* %37
%38 = load i8*, i8** %3
%39 = call i8* @dlsym(i8* %38, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%40 = bitcast i8* %39 to i32 ()*
store i32 ()* %40, i32 ()** %4
%41 = load i32 ()*, i32 ()** %4
%42 = icmp eq i32 ()* %41, null
br i1 %42, label %43, label %47
43: ; preds = %36
%44 = call i8* (...) @dlerror()
%45 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0), i8* %44)
%46 = call i32 @exit(i32 1)
unreachable
47: ; preds = %36
%48 = load i32 ()*, i32 ()** %4
%49 = call i32 %48()
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %47
%52 = call i32 @puts(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0))
%53 = call i32 @exit(i32 1)
unreachable
54: ; preds = %47
%55 = load i8*, i8** %2
%56 = call i64 @dlclose(i8* %55)
%57 = icmp ne i64 %56, 0
br i1 %57, label %58, label %62
58: ; preds = %54
%59 = call i8* (...) @dlerror()
%60 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), i8* %59)
%61 = call i32 @exit(i32 1)
unreachable
62: ; preds = %54
%63 = load i32, i32* @RTLD_LAZY
%64 = load i32, i32* @RTLD_GLOBAL
%65 = or i32 %63, %64
%66 = call i8* @dlopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %65)
store i8* %66, i8** %2
%67 = load i8*, i8** %2
%68 = icmp eq i8* %67, null
br i1 %68, label %69, label %73
69: ; preds = %62
%70 = call i8* (...) @dlerror()
%71 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0), i8* %70)
%72 = call i32 @exit(i32 1)
unreachable
73: ; preds = %62
%74 = load i8*, i8** %2
%75 = call i8* @dlsym(i8* %74, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%76 = bitcast i8* %75 to i32*
store i32* %76, i32** %5
%77 = load i32*, i32** %5
%78 = icmp eq i32* %77, null
br i1 %78, label %79, label %83
79: ; preds = %73
%80 = call i8* (...) @dlerror()
%81 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.11, i64 0, i64 0), i8* %80)
%82 = call i32 @exit(i32 1)
unreachable
83: ; preds = %73
%84 = load i32*, i32** %5
%85 = load i32, i32* %84
%86 = icmp ne i32 %85, 0
br i1 %86, label %87, label %90
87: ; preds = %83
%88 = call i32 @puts(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0))
%89 = call i32 @exit(i32 1)
unreachable
90: ; preds = %83
%91 = load i8*, i8** %2
%92 = call i64 @dlclose(i8* %91)
%93 = icmp ne i64 %92, 0
br i1 %93, label %94, label %98
94: ; preds = %90
%95 = call i8* (...) @dlerror()
%96 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), i8* %95)
%97 = call i32 @exit(i32 1)
unreachable
98: ; preds = %90
%99 = load i8*, i8** %3
%100 = call i64 @dlclose(i8* %99)
%101 = icmp ne i64 %100, 0
br i1 %101, label %102, label %106
102: ; preds = %98
%103 = call i8* (...) @dlerror()
%104 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0), i8* %103)
%105 = call i32 @exit(i32 1)
unreachable
106: ; preds = %98
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"reldepmod1.so\00"
@RTLD_LAZY = global i32 0
@RTLD_GLOBAL = global i32 0
@.str.1 = [31 x i8] c"cannot open reldepmod1.so: %s\0A\00"
@.str.2 = [14 x i8] c"reldepmod4.so\00"
@.str.3 = [31 x i8] c"cannot open reldepmod4.so: %s\0A\00"
@.str.4 = [9 x i8] c"some_var\00"
@.str.5 = [38 x i8] c"cannot get address of \22some_var\22: %s\0A\00"
@.str.6 = [8 x i8] c"call_me\00"
@.str.7 = [37 x i8] c"cannot get address of \22call_me\22: %s\0A\00"
@.str.8 = [41 x i8] c"function \22call_me\22 returned wrong result\00"
@.str.9 = [23 x i8] c"closing h1 failed: %s\0A\00"
@.str.10 = [47 x i8] c"cannot open reldepmod1.so the second time: %s\0A\00"
@.str.11 = [54 x i8] c"cannot get address of \22some_var\22 the second time: %s\0A\00"
@.str.12 = [30 x i8] c"variable \22some_var\22 not reset\00"
@.str.13 = [23 x i8] c"closing h2 failed: %s\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @mtrace()
%2 = load i32, i32* @RTLD_LAZY
%3 = load i32, i32* @RTLD_GLOBAL
%4 = or i32 %3, %2
%5 = tail call i8* @dlopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = tail call i8* (...) @dlerror()
%9 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %0
%12 = load i32, i32* @RTLD_LAZY
%13 = tail call i8* @dlopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = tail call i8* (...) @dlerror()
%17 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i8* %16)
%18 = tail call i32 @exit(i32 1)
unreachable
19: ; preds = %11
%20 = tail call i8* @dlsym(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%21 = icmp eq i8* %20, null
br i1 %21, label %22, label %26
22: ; preds = %19
%23 = tail call i8* (...) @dlerror()
%24 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), i8* %23)
%25 = tail call i32 @exit(i32 1)
unreachable
26: ; preds = %19
%27 = bitcast i8* %20 to i32*
store i32 42, i32* %27
%28 = tail call i8* @dlsym(i8* %13, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%29 = icmp eq i8* %28, null
br i1 %29, label %30, label %34
30: ; preds = %26
%31 = tail call i8* (...) @dlerror()
%32 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0), i8* %31)
%33 = tail call i32 @exit(i32 1)
unreachable
34: ; preds = %26
%35 = bitcast i8* %28 to i32 ()*
%36 = tail call i32 %35()
%37 = icmp eq i32 %36, 0
br i1 %37, label %41, label %38
38: ; preds = %34
%39 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0))
%40 = tail call i32 @exit(i32 1)
unreachable
41: ; preds = %34
%42 = tail call i64 @dlclose(i8* %5)
%43 = icmp eq i64 %42, 0
br i1 %43, label %48, label %44
44: ; preds = %41
%45 = tail call i8* (...) @dlerror()
%46 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), i8* %45)
%47 = tail call i32 @exit(i32 1)
unreachable
48: ; preds = %41
%49 = load i32, i32* @RTLD_LAZY
%50 = load i32, i32* @RTLD_GLOBAL
%51 = or i32 %50, %49
%52 = tail call i8* @dlopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %51)
%53 = icmp eq i8* %52, null
br i1 %53, label %54, label %58
54: ; preds = %48
%55 = tail call i8* (...) @dlerror()
%56 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0), i8* %55)
%57 = tail call i32 @exit(i32 1)
unreachable
58: ; preds = %48
%59 = tail call i8* @dlsym(i8* %52, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%60 = icmp eq i8* %59, null
br i1 %60, label %61, label %65
61: ; preds = %58
%62 = tail call i8* (...) @dlerror()
%63 = tail call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.11, i64 0, i64 0), i8* %62)
%64 = tail call i32 @exit(i32 1)
unreachable
65: ; preds = %58
%66 = bitcast i8* %59 to i32*
%67 = load i32, i32* %66
%68 = icmp eq i32 %67, 0
br i1 %68, label %72, label %69
69: ; preds = %65
%70 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0))
%71 = tail call i32 @exit(i32 1)
unreachable
72: ; preds = %65
%73 = tail call i64 @dlclose(i8* %52)
%74 = icmp eq i64 %73, 0
br i1 %74, label %79, label %75
75: ; preds = %72
%76 = tail call i8* (...) @dlerror()
%77 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), i8* %76)
%78 = tail call i32 @exit(i32 1)
unreachable
79: ; preds = %72
%80 = tail call i64 @dlclose(i8* %13)
%81 = icmp eq i64 %80, 0
br i1 %81, label %86, label %82
82: ; preds = %79
%83 = tail call i8* (...) @dlerror()
%84 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0), i8* %83)
%85 = tail call i32 @exit(i32 1)
unreachable
86: ; preds = %79
ret i32 0
}