#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 /*<<< orphan*/ ll_init();
int /*<<< orphan*/ ll_stop();
int /*<<< orphan*/ search(char const *, char *, char *);
int main() {
  const char *mp3 = "../tests/data_empty.mp3";
  const char *pdf = "../tests/data_empty.pdf";
  ll_init();
  search(mp3, "http://creativecommons.org/ns#license", "id3.so");
  search(mp3, "http://ns.adobe.com/xap/1.0/rights/WebStatement", "id3.so");
  search(mp3, "http://creativecommons.org/ns#morePermissions", NULL);
  search(pdf, "http://creativecommons.org/ns#morePermissions", "exempi.so");
  ll_stop();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1050 <ll_init@plt>
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
lea    0xee8(%rip),%rdx
call   1030 <search@plt>
mov    -0x10(%rbp),%rdi
lea    0xedf(%rip),%rsi
lea    0xed1(%rip),%rdx
call   1030 <search@plt>
mov    -0x10(%rbp),%rdi
lea    0xef8(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <search@plt>
mov    -0x18(%rbp),%rdi
lea    0xee4(%rip),%rsi
lea    0xf0b(%rip),%rdx
call   1030 <search@plt>
mov    $0x0,%al
call   1040 <ll_stop@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <ll_init@plt>
lea    0xebe(%rip),%rbx
lea    0xee7(%rip),%rsi
lea    0xf06(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <search@plt>
lea    0xefb(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <search@plt>
lea    0xf19(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %edx,%edx
call   1030 <search@plt>
lea    0xe90(%rip),%rdi
lea    0xf2c(%rip),%rdx
mov    %r14,%rsi
call   1030 <search@plt>
xor    %eax,%eax
call   1040 <ll_stop@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [24 x i8] c"../tests/data_empty.mp3\00"
@.str.1 = [24 x i8] c"../tests/data_empty.pdf\00"
@.str.2 = [38 x i8] c"http://creativecommons.org/ns#license\00"
@.str.3 = [7 x i8] c"id3.so\00"
@.str.4 = [48 x i8] c"http://ns.adobe.com/xap/1.0/rights/WebStatement\00"
@.str.5 = [46 x i8] c"http://creativecommons.org/ns#morePermissions\00"
@.str.6 = [10 x i8] c"exempi.so\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8** %3
%4 = call i32 (...) @ll_init()
%5 = load i8*, i8** %2
%6 = call i32 @search(i8* %5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = call i32 @search(i8* %7, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%9 = load i8*, i8** %2
%10 = call i32 @search(i8* %9, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0), i8* null)
%11 = load i8*, i8** %3
%12 = call i32 @search(i8* %11, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 (...) @ll_stop()
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"../tests/data_empty.mp3\00"
@.str.1 = [24 x i8] c"../tests/data_empty.pdf\00"
@.str.2 = [38 x i8] c"http://creativecommons.org/ns#license\00"
@.str.3 = [7 x i8] c"id3.so\00"
@.str.4 = [48 x i8] c"http://ns.adobe.com/xap/1.0/rights/WebStatement\00"
@.str.5 = [46 x i8] c"http://creativecommons.org/ns#morePermissions\00"
@.str.6 = [10 x i8] c"exempi.so\00"
define i32 @main() {
%1 = tail call i32 (...) @ll_init()
%2 = tail call i32 @search(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @search(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 @search(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0), i8* null)
%5 = tail call i32 @search(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%6 = tail call i32 (...) @ll_stop()
ret i32 0
}