xunge/DecIR huggingface dataset:
void __attribute__((
    __warning__("curl_easy_setopt expects a "
                "string (char* or char[]) argument for this option")))
__attribute__((__unused__)) __attribute__((__no__))
_curl_easy_setopt_err_string(void) {
  __asm__("");
}


x86 assembly (clang, -O0):
<_curl_easy_setopt_err_string>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_curl_easy_setopt_err_string>:
ret

LLVM IR (-O0):
define void @_curl_easy_setopt_err_string() {
ret void
}

LLVM IR (-O2):
define void @_curl_easy_setopt_err_string() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DAY_4;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_day_4() { return nl_langinfo(DAY_4); }


x86 assembly (clang, -O0):
<langinfo_day_4>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<langinfo_day_4>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
@DAY_4 = global i32 0
define i8* @langinfo_day_4() {
%1 = load i32, i32* @DAY_4
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@DAY_4 = global i32 0
define i8* @langinfo_day_4() {
%1 = load i32, i32* @DAY_4
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ setuid(int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *);
int system(char *);
main() {
  setuid(0);
  char cmdLine[256];
  sprintf(
      cmdLine,
      "nfc-list| egrep '(UID|PUPI)' | awk -F':' '{print $2}' | sed 's/ //g'");
  return system(cmdLine);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1050 <setuid@plt>
lea    -0x110(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1030 <system@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x108,%rsp
xor    %edi,%edi
call   1040 <setuid@plt>
movups 0xefb(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movups 0xedf(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movups 0xec3(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movups 0xea7(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x27672f2f202f73,%rax
mov    %rax,0x3d(%rsp)
mov    %rsp,%rdi
call   1030 <system@plt>
add    $0x108,%rsp
ret

LLVM IR (-O0):
@.str = [69 x i8] c"nfc-list| egrep '(UID|PUPI)' | awk -F':' '{print $2}' | sed 's/ //g'\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [256 x i8]
store i32 0, i32* %1
%3 = call i32 @setuid(i32 0)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%7 = call i32 @system(i8* %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [69 x i8] c"nfc-list| egrep '(UID|PUPI)' | awk -F':' '{print $2}' | sed 's/ //g'\00"
define i32 @main() {
%1 = alloca [256 x i8]
%2 = tail call i32 @setuid(i32 0)
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%4 = call i32 @system(i8* %3)
ret i32 %4
}
void testClosureDDDrV(void (*closure)(double, double, double), double a1,
                      double a2, double a3) {
  (*closure)(a1, a2, a3);
}


x86 assembly (clang, -O0):
<testClosureDDDrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureDDDrV>:
jmp    *%rdi

LLVM IR (-O0):
define void @testClosureDDDrV(void (double, double, double)* %0, double %1, double %2, double %3) {
%5 = alloca void (double, double, double)*
%6 = alloca double
%7 = alloca double
%8 = alloca double
store void (double, double, double)* %0, void (double, double, double)** %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load void (double, double, double)*, void (double, double, double)** %5
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load double, double* %8
ret void
}

LLVM IR (-O2):
define void @testClosureDDDrV(void (double, double, double)* nocapture %0, double %1, double %2, double %3) {
tail call void %0(double %1, double %2, double %3)
ret void
}
unsigned long long _nb_tests_lassert(int i) {
  static unsigned long long count = 0;
  if (!i)
    ++count;
  else if (i < 0)
    count = 0;
  return count;
}


x86 assembly (clang, -O0):
<_nb_tests_lassert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1128 <_nb_tests_lassert+0x28>
mov    0x2f10(%rip),%rax
add    $0x1,%rax
mov    %rax,0x2f05(%rip)
jmp    1142 <_nb_tests_lassert+0x42>
cmpl   $0x0,-0x4(%rbp)
jge    113d <_nb_tests_lassert+0x3d>
movq   $0x0,0x2eeb(%rip)
jmp    1142 <_nb_tests_lassert+0x42>
mov    0x2edf(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nb_tests_lassert>:
test   %edi,%edi
je     110e <_nb_tests_lassert+0xe>
js     1121 <_nb_tests_lassert+0x21>
mov    0x2f1b(%rip),%rax
ret
mov    0x2f13(%rip),%rax
add    $0x1,%rax
mov    %rax,0x2f08(%rip)
ret
movq   $0x0,0x2efc(%rip)
xor    %eax,%eax
ret

LLVM IR (-O0):
@_nb_tests_lassert.count = internal global i64 0
define i64 @_nb_tests_lassert(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i64, i64* @_nb_tests_lassert.count
%7 = add i64 %6, 1
store i64 %7, i64* @_nb_tests_lassert.count
br label %13
8: ; preds = %1
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %8
store i64 0, i64* @_nb_tests_lassert.count
br label %12
12: ; preds = %11, %8
br label %13
13: ; preds = %12, %5
%14 = load i64, i64* @_nb_tests_lassert.count
ret i64 %14
}

LLVM IR (-O2):
@_nb_tests_lassert.count = internal unnamed_addr global i64 0
define i64 @_nb_tests_lassert(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i64, i64* @_nb_tests_lassert.count
%5 = add i64 %4, 1
store i64 %5, i64* @_nb_tests_lassert.count
br label %11
6: ; preds = %1
%7 = icmp slt i32 %0, 0
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = load i64, i64* @_nb_tests_lassert.count
br label %11
10: ; preds = %6
store i64 0, i64* @_nb_tests_lassert.count
br label %11
11: ; preds = %8, %10, %3
%12 = phi i64 [ %9, %8 ], [ 0, %10 ], [ %5, %3 ]
ret i64 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_unlock(int /*<<< orphan*/ *);
int gen_posix_mutex_unlock(pthread_mutex_t *mut) {
  return (pthread_mutex_unlock(mut));
}


x86 assembly (clang, -O0):
<gen_posix_mutex_unlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pthread_mutex_unlock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_posix_mutex_unlock>:
jmp    1030 <pthread_mutex_unlock@plt>

LLVM IR (-O0):
define i32 @gen_posix_mutex_unlock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @pthread_mutex_unlock(i32* %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @gen_posix_mutex_unlock(i32* %0) {
%2 = tail call i32 @pthread_mutex_unlock(i32* %0)
ret i32 %2
}
adrreg0adrx1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((p0[10000000]) <=
      (((double *)(11111111 & ~(__alignof__(double) - 1)))[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrreg0adrx1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x4c4b400(%rax),%xmm1
04
movslq -0x20(%rbp),%rcx
mov    $0xa98ac0,%eax
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     114c <adrreg0adrx1+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <adrreg0adrx1+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrreg0adrx1>:
movslq %esi,%rax
movsd  0xa98ac0(,%rax,8),%xmm0
xor    %eax,%eax
ucomisd 0x4c4b400(%rdx),%xmm0
04
setae  %al
ret

LLVM IR (-O0):
define i32 @adrreg0adrx1(double %0, double %1, i32 %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
store double %0, double* %8
store double %1, double* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%14 = load double*, double** %12
%15 = getelementptr inbounds double, double* %14, i64 10000000
%16 = load double, double* %15
%17 = load i32, i32* %11
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds double, double* inttoptr (i64 11111104 to double*), i64 %18
%20 = load double, double* %19
%21 = fcmp ole double %16, %20
br i1 %21, label %22, label %23
22: ; preds = %6
store i32 1, i32* %7
br label %24
23: ; preds = %6
store i32 0, i32* %7
br label %24
24: ; preds = %23, %22
%25 = load i32, i32* %7
ret i32 %25
}

LLVM IR (-O2):
define i32 @adrreg0adrx1(double %0, double %1, i32 %2, i32 %3, double* nocapture %4, double* nocapture readnone %5) {
%7 = getelementptr inbounds double, double* %4, i64 10000000
%8 = load double, double* %7
%9 = sext i32 %3 to i64
%10 = getelementptr inbounds double, double* inttoptr (i64 11111104 to double*), i64 %9
%11 = load double, double* %10
%12 = fcmp ole double %8, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
void out() {}


x86 assembly (clang, -O0):
<out>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out>:
ret

LLVM IR (-O0):
define void @out() {
ret void
}

LLVM IR (-O2):
define void @out() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void help() {
  printf(
      "\n  bruteforge, a selective data combinator.\n  -----------\n  \n  -c  "
      "pass a valid config file\n  -l  set word lenght (default = max "
      "possible)\n  -n  generate just n words\n  -x  use HEX mode    (default "
      "= CHAR)\n  \n  Output:\n  -b  binary output\n  -w  print out wordlist\n "
      " -q  quiet run\n  \n  v%s, 2017, masterzorag@gmail.com\n  \n  run "
      "test:\n  $ ./bf -c test/test_2\n  $ ./bf -c test/test_3 -x\n\n",
      "0.2.8");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0x1060(%rip),%rsi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
lea    0xee9(%rip),%rdi
lea    0x1064(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [386 x i8] c"\0A bruteforge, a selective data combinator.\0A -----------\0A \0A -c pass a valid config file\0A -l set word lenght (default = max possible)\0A -n generate just n words\0A -x use HEX mode (default = CHAR)\0A \0A Output:\0A -b binary output\0A -w print out wordlist\0A -q quiet run\0A \0A v%s, 2017, masterzorag@gmail.com\0A \0A run test:\0A $ ./bf -c test/test_2\0A $ ./bf -c test/test_3 -x\0A\0A\00"
@.str.1 = [6 x i8] c"0.2.8\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([386 x i8], [386 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [386 x i8] c"\0A bruteforge, a selective data combinator.\0A -----------\0A \0A -c pass a valid config file\0A -l set word lenght (default = max possible)\0A -n generate just n words\0A -x use HEX mode (default = CHAR)\0A \0A Output:\0A -b binary output\0A -w print out wordlist\0A -q quiet run\0A \0A v%s, 2017, masterzorag@gmail.com\0A \0A run test:\0A $ ./bf -c test/test_2\0A $ ./bf -c test/test_3 -x\0A\0A\00"
@.str.1 = [6 x i8] c"0.2.8\00"
define void @help() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([386 x i8], [386 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *compare_strzr_context(void) { return NULL; }


x86 assembly (clang, -O0):
<compare_strzr_context>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_strzr_context>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @compare_strzr_context() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @compare_strzr_context() {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hello WOrld! \n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello WOrld! \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello WOrld! \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ PS_SetBaseFolder(char const *);
void PC_SetBaseFolder(const char *path) { PS_SetBaseFolder(path); }


x86 assembly (clang, -O0):
<PC_SetBaseFolder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <PS_SetBaseFolder@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PC_SetBaseFolder>:
jmp    1030 <PS_SetBaseFolder@plt>

LLVM IR (-O0):
define void @PC_SetBaseFolder(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @PS_SetBaseFolder(i8* %3)
ret void
}

LLVM IR (-O2):
define void @PC_SetBaseFolder(i8* %0) {
%2 = tail call i32 @PS_SetBaseFolder(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void close_socket(int *sock) {
  if (sock != NULL) {
    if (*sock != -1)
      close(*sock);
    (*sock) = -1;
  }
}


x86 assembly (clang, -O0):
<close_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <close_socket+0x39>
mov    -0x8(%rbp),%rax
cmpl   $0xffffffff,(%rax)
je     113f <close_socket+0x2f>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <close@plt>
mov    -0x8(%rbp),%rax
movl   $0xffffffff,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_socket>:
test   %rdi,%rdi
je     112c <close_socket+0x1c>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
cmp    $0xffffffff,%edi
je     1125 <close_socket+0x15>
call   1030 <close@plt>
movl   $0xffffffff,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @close_socket(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %15
5: ; preds = %1
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, -1
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load i32*, i32** %2
%11 = load i32, i32* %10
%12 = call i32 @close(i32 %11)
br label %13
13: ; preds = %9, %5
%14 = load i32*, i32** %2
store i32 -1, i32* %14
br label %15
15: ; preds = %13, %1
ret void
}

LLVM IR (-O2):
define void @close_socket(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = load i32, i32* %0
%5 = icmp eq i32 %4, -1
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @close(i32 %4)
br label %8
8: ; preds = %6, %3
store i32 -1, i32* %0
br label %9
9: ; preds = %8, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *s) {
  printf("Usage: %s cmd [option]\n\nCommands Supported:\n	create\t\t-- "
         "Create a new database.\n	add <file_post>\n	\t\t-- Add or "
         "modify a post\n	del <file_post>\n	\t\t-- Delete a "
         "post\n	get <file_post1> [file_post2 ...]\n	\t\t-- Get a "
         "post in text format\n	info <file_post1> [file_post2 ...]\n	\t\t-- "
         "Retrieve information about the post\n	list\t\t-- List published "
         "posts\n	path\t\t-- Print cblog.cdb path\n	version\t\t-- "
         "Print cblog version\n",
         s);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [401 x i8] c"Usage: %s cmd [option]\0A\0ACommands Supported:\0A\09create\09\09-- Create a new database.\0A\09add <file_post>\0A\09\09\09-- Add or modify a post\0A\09del <file_post>\0A\09\09\09-- Delete a post\0A\09get <file_post1> [file_post2 ...]\0A\09\09\09-- Get a post in text format\0A\09info <file_post1> [file_post2 ...]\0A\09\09\09-- Retrieve information about the post\0A\09list\09\09-- List published posts\0A\09path\09\09-- Print cblog.cdb path\0A\09version\09\09-- Print cblog version\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([401 x i8], [401 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [401 x i8] c"Usage: %s cmd [option]\0A\0ACommands Supported:\0A\09create\09\09-- Create a new database.\0A\09add <file_post>\0A\09\09\09-- Add or modify a post\0A\09del <file_post>\0A\09\09\09-- Delete a post\0A\09get <file_post1> [file_post2 ...]\0A\09\09\09-- Get a post in text format\0A\09info <file_post1> [file_post2 ...]\0A\09\09\09-- Retrieve information about the post\0A\09list\09\09-- List published posts\0A\09path\09\09-- Print cblog.cdb path\0A\09version\09\09-- Print cblog version\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([401 x i8], [401 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
signed int signedint_ignoring_longint(signed int x, long int y) { return x; }


x86 assembly (clang, -O0):
<signedint_ignoring_longint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signedint_ignoring_longint>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @signedint_ignoring_longint(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
ret i32 %5
}

LLVM IR (-O2):
define i32 @signedint_ignoring_longint(i32 returned %0, i64 %1) {
ret i32 %0
}
SORU_1_PROTOTYPE() {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<SORU_1_PROTOTYPE>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <SORU_1_PROTOTYPE+0x9>
jmp    1109 <SORU_1_PROTOTYPE+0x9>

x86 assembly (clang, -O2):
<SORU_1_PROTOTYPE>:
jmp    1100 <SORU_1_PROTOTYPE>

LLVM IR (-O0):
define i32 @SORU_1_PROTOTYPE() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define i32 @SORU_1_PROTOTYPE() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ ButtonConductor_Init();
int /*<<< orphan*/ LcdConductor_Init();
int /*<<< orphan*/ LedConductor_Init();
int /*<<< orphan*/ ReflexTestData_Init();
int /*<<< orphan*/ TimerConductor_Init();
void Executor_Init(void) {
  ButtonConductor_Init();
  LedConductor_Init();
  TimerConductor_Init();
  LcdConductor_Init();
  ReflexTestData_Init();
}


x86 assembly (clang, -O0):
<Executor_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ButtonConductor_Init@plt>
mov    $0x0,%al
call   1060 <LedConductor_Init@plt>
mov    $0x0,%al
call   1050 <TimerConductor_Init@plt>
mov    $0x0,%al
call   1070 <LcdConductor_Init@plt>
mov    $0x0,%al
call   1040 <ReflexTestData_Init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Executor_Init>:
push   %rax
xor    %eax,%eax
call   1030 <ButtonConductor_Init@plt>
xor    %eax,%eax
call   1060 <LedConductor_Init@plt>
xor    %eax,%eax
call   1050 <TimerConductor_Init@plt>
xor    %eax,%eax
call   1070 <LcdConductor_Init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ReflexTestData_Init@plt>

LLVM IR (-O0):
define void @Executor_Init() {
%1 = call i32 (...) @ButtonConductor_Init()
%2 = call i32 (...) @LedConductor_Init()
%3 = call i32 (...) @TimerConductor_Init()
%4 = call i32 (...) @LcdConductor_Init()
%5 = call i32 (...) @ReflexTestData_Init()
ret void
}

LLVM IR (-O2):
define void @Executor_Init() {
%1 = tail call i32 (...) @ButtonConductor_Init()
%2 = tail call i32 (...) @LedConductor_Init()
%3 = tail call i32 (...) @TimerConductor_Init()
%4 = tail call i32 (...) @LcdConductor_Init()
%5 = tail call i32 (...) @ReflexTestData_Init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage_panel() {
  printf("usage: input_test [option]\n");
  printf("  eg. ./panel_test key  \n");
  printf("      ./panel_test vfd  \n");
  printf("      ./panel_test all  \n");
}


x86 assembly (clang, -O0):
<print_usage_panel>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
call   1030 <printf@plt>
lea    0xf11(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage_panel>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef7(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
lea    0xf11(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"usage: input_test [option]\0A\00"
@.str.1 = [26 x i8] c" eg. ./panel_test key \0A\00"
@.str.2 = [26 x i8] c" ./panel_test vfd \0A\00"
@.str.3 = [26 x i8] c" ./panel_test all \0A\00"
define void @print_usage_panel() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"usage: input_test [option]\00"
@str.4 = [25 x i8] c" eg. ./panel_test key \00"
@str.5 = [25 x i8] c" ./panel_test vfd \00"
@str.6 = [25 x i8] c" ./panel_test all \00"
define void @print_usage_panel() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.6, i64 0, i64 0))
ret void
}
int iDiv(int a, int b) { return a / b; }


x86 assembly (clang, -O0):
<iDiv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<iDiv>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @iDiv(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sdiv i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @iDiv(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void RNDResponseSink_RenderingControl_SetVerticalKeystone(
    struct UPnPService *Service, int ErrorCode, void *User) {
  printf("RND Invoke Response: "
         "RenderingControl/SetVerticalKeystone[ErrorCode:%d]()\r\n",
         ErrorCode);
}


x86 assembly (clang, -O0):
<RNDResponseSink_RenderingControl_SetVerticalKeystone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNDResponseSink_RenderingControl_SetVerticalKeystone>:
lea    0xee9(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [76 x i8] c"RND Invoke Response: RenderingControl/SetVerticalKeystone[ErrorCode:%d]()\0D\0A\00"
define void @RNDResponseSink_RenderingControl_SetVerticalKeystone(%struct.UPnPService* %0, i32 %1, i8* %2) {
%4 = alloca %struct.UPnPService*
%5 = alloca i32
%6 = alloca i8*
store %struct.UPnPService* %0, %struct.UPnPService** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [76 x i8] c"RND Invoke Response: RenderingControl/SetVerticalKeystone[ErrorCode:%d]()\0D\0A\00"
define void @RNDResponseSink_RenderingControl_SetVerticalKeystone(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ read(int, char *, int);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
int get_integer(int SD, char *request) {
  static char output[1024];
  write(SD, request, strlen(request));
  read(SD, output, 1024 - 1);
  return atoi(output);
}


x86 assembly (clang, -O0):
<get_integer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    -0x4(%rbp),%edi
lea    0x2ed2(%rip),%rsi
mov    $0x3ff,%edx
call   1050 <read@plt>
lea    0x2ec1(%rip),%rdi
call   1060 <atoi@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_integer>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0x2eed(%rip),%rbx
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x3ff,%edx
call   1050 <read@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <atoi@plt>

LLVM IR (-O0):
@get_integer.output = internal global [1024 x i8] zeroinitializer
define i32 @get_integer(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @write(i32 %5, i8* %6, i32 %8)
%10 = load i32, i32* %3
%11 = call i32 @read(i32 %10, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_integer.output, i64 0, i64 0), i32 1023)
%12 = call i32 @atoi(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_integer.output, i64 0, i64 0))
ret i32 %12
}

LLVM IR (-O2):
@get_integer.output = internal global [1024 x i8] zeroinitializer
define i32 @get_integer(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %3)
%5 = tail call i32 @read(i32 %0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_integer.output, i64 0, i64 0), i32 1023)
%6 = tail call i32 @atoi(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_integer.output, i64 0, i64 0))
ret i32 %6
}
float clamp_to(float value, float min, float max) {
  if (value < min)
    return min;
  if (value > max)
    return max;
  return value;
}


x86 assembly (clang, -O0):
<clamp_to>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <clamp_to+0x35>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <clamp_to+0x5d>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1153 <clamp_to+0x53>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <clamp_to+0x5d>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp_to>:
minss  %xmm0,%xmm2
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm3
andnps %xmm2,%xmm3
andps  %xmm1,%xmm0
orps   %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @clamp_to(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load float, float* %6
store float %12, float* %4
br label %21
13: ; preds = %3
%14 = load float, float* %5
%15 = load float, float* %7
%16 = fcmp ogt float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load float, float* %7
store float %18, float* %4
br label %21
19: ; preds = %13
%20 = load float, float* %5
store float %20, float* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load float, float* %4
ret float %22
}

LLVM IR (-O2):
define float @clamp_to(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = select i1 %5, float %2, float %0
%7 = select i1 %4, float %1, float %6
ret float %7
}
/* Variables and functions */
int __simc(int, int, int /*<<< orphan*/, int /*<<< orphan*/);
int simc_exit(int exit_code) { return __simc(1, exit_code, 0, 0); }


x86 assembly (clang, -O0):
<simc_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x1,%edi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <__simc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simc_exit>:
mov    %edi,%esi
mov    $0x1,%edi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <__simc@plt>

LLVM IR (-O0):
define i32 @simc_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__simc(i32 1, i32 %3, i32 0, i32 0)
ret i32 %4
}

LLVM IR (-O2):
define i32 @simc_exit(i32 %0) {
%2 = tail call i32 @__simc(i32 1, i32 %0, i32 0, i32 0)
ret i32 %2
}
int is_adreno_ib_dump_on_pagef_enabled(struct kgsl_device *device) { return 0; }


x86 assembly (clang, -O0):
<is_adreno_ib_dump_on_pagef_enabled>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_adreno_ib_dump_on_pagef_enabled>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.kgsl_device = type opaque
define i32 @is_adreno_ib_dump_on_pagef_enabled(%struct.kgsl_device* %0) {
%2 = alloca %struct.kgsl_device*
store %struct.kgsl_device* %0, %struct.kgsl_device** %2
ret i32 0
}

LLVM IR (-O2):
%struct.kgsl_device = type opaque
define i32 @is_adreno_ib_dump_on_pagef_enabled(%struct.kgsl_device* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int lrint(double);
int double_to_d16(double x) { return lrint(x * 0x10000); }


x86 assembly (clang, -O0):
<double_to_d16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <lrint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_to_d16>:
mulsd  0xee8(%rip),%xmm0
jmp    1030 <lrint@plt>

LLVM IR (-O0):
define i32 @double_to_d16(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 6.553600e+04
%5 = call i32 @lrint(double %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @double_to_d16(double %0) {
%2 = fmul double %0, 6.553600e+04
%3 = tail call i32 @lrint(double %2)
ret i32 %3
}
double scale_dh11(double x, double y, double z) { return 0.0; }


x86 assembly (clang, -O0):
<scale_dh11>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<scale_dh11>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @scale_dh11(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @scale_dh11(double %0, double %1, double %2) {
ret double 0.000000e+00
}
int f() {
  int i;
  return i + 1;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
ret

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 1
ret i32 %3
}

LLVM IR (-O2):
define i32 @f() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fclose(FILE *stream __attribute__((unused))) { return 0; }


x86 assembly (clang, -O0):
<fclose>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fclose>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @fclose(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @fclose(i32* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ print_idx_field_unicode(int /*<<< orphan*/, char *,
                                           int /*<<< orphan*/ const *, int);
int decode_internal_model(uint8_t idx, const uint8_t *ptr, int len) {
  print_idx_field_unicode(idx, "Internal model", ptr + 2, len - 2);
  return 0;
}


x86 assembly (clang, -O0):
<decode_internal_model>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
add    $0x8,%rdx
mov    -0x14(%rbp),%ecx
sub    $0x2,%ecx
lea    0xec6(%rip),%rsi
call   1030 <print_idx_field_unicode@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_internal_model>:
push   %rax
lea    0x8(%rsi),%rax
lea    -0x2(%rdx),%ecx
lea    0xee1(%rip),%rsi
mov    %rax,%rdx
call   1030 <print_idx_field_unicode@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Internal model\00"
define i32 @decode_internal_model(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = getelementptr inbounds i32, i32* %8, i64 2
%10 = load i32, i32* %6
%11 = sub nsw i32 %10, 2
%12 = call i32 @print_idx_field_unicode(i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %9, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Internal model\00"
define i32 @decode_internal_model(i32 %0, i32* %1, i32 %2) {
%4 = getelementptr inbounds i32, i32* %1, i64 2
%5 = add nsw i32 %2, -2
%6 = tail call i32 @print_idx_field_unicode(i32 %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %4, i32 %5)
ret i32 0
}
/* Variables and functions */
int WEXITSTATUS(int);
int goose_WEXITSTATUS(int status) { return WEXITSTATUS(status); }


x86 assembly (clang, -O0):
<goose_WEXITSTATUS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <WEXITSTATUS@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<goose_WEXITSTATUS>:
jmp    1030 <WEXITSTATUS@plt>

LLVM IR (-O0):
define i32 @goose_WEXITSTATUS(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @WEXITSTATUS(i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @goose_WEXITSTATUS(i32 %0) {
%2 = tail call i32 @WEXITSTATUS(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           unsigned int);
int /*<<< orphan*/ stderr;
void ReturnException(const char *s, unsigned int high, unsigned int lineno) {
  fprintf(stderr,
          "%s:%d:procedure function is about to finish and no return "
          "statement has been executed\n",
          s, lineno);
  _exit(1);
}


x86 assembly (clang, -O0):
<ReturnException>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%ecx
lea    0xeb7(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<ReturnException>:
push   %rax
mov    %edx,%ecx
mov    %rdi,%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [87 x i8] c"%s:%d:procedure function is about to finish and no return statement has been executed\0A\00"
define void @ReturnException(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i32, i32* %6
%10 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9)
%11 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [87 x i8] c"%s:%d:procedure function is about to finish and no return statement has been executed\0A\00"
define void @ReturnException(i8* %0, i32 %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %2)
%6 = tail call i32 @_exit(i32 1)
unreachable
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
unsigned int be16put(void *p, uint16_t v) {
  uint8_t *a;
  a = p;
  a[0] = v >> 8;
  a[1] = v;
  return 2;
}


x86 assembly (clang, -O0):
<be16put>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<be16put>:
mov    %esi,%eax
sar    $0x8,%eax
mov    %eax,(%rdi)
mov    %esi,0x4(%rdi)
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @be16put(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32, i32* %4
%9 = ashr i32 %8, 8
%10 = load i32*, i32** %5
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
%12 = load i32, i32* %4
%13 = load i32*, i32** %5
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32 %12, i32* %14
ret i32 2
}

LLVM IR (-O2):
define i32 @be16put(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = ashr i32 %1, 8
store i32 %4, i32* %3
%5 = getelementptr inbounds i8, i8* %0, i64 4
%6 = bitcast i8* %5 to i32*
store i32 %1, i32* %6
ret i32 2
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *dupstring(char *s) {
  char *t;
  t = malloc(strlen(s) + 1);
  strcpy(t, s);
  return t;
}


x86 assembly (clang, -O0):
<dupstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dupstring>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @dupstring(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @dupstring(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int *, int);
void put16bit(uint8_t **ptr, uint16_t val) {
  val = ((((val) << 8) & 0xFF00) | (((val) >> 8) & 0xFF));
  memcpy(*ptr, &val, 2);
  (*ptr) += 2;
}


x86 assembly (clang, -O0):
<put16bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
and    $0xff00,%eax
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x2,%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x8,%rcx
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put16bit>:
push   %rbx
sub    $0x10,%rsp
rol    $0x8,%si
mov    %rdi,%rbx
movzwl %si,%eax
mov    %eax,0xc(%rsp)
mov    (%rdi),%rdi
lea    0xc(%rsp),%rsi
mov    $0x2,%edx
call   1030 <memcpy@plt>
addq   $0x8,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @put16bit(i32** %0, i32 %1) {
%3 = alloca i32**
%4 = alloca i32
store i32** %0, i32*** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = and i32 %6, 65280
%8 = load i32, i32* %4
%9 = ashr i32 %8, 8
%10 = and i32 %9, 255
%11 = or i32 %7, %10
store i32 %11, i32* %4
%12 = load i32**, i32*** %3
%13 = load i32*, i32** %12
%14 = call i32 @memcpy(i32* %13, i32* %4, i32 2)
%15 = load i32**, i32*** %3
%16 = load i32*, i32** %15
%17 = getelementptr inbounds i32, i32* %16, i64 2
store i32* %17, i32** %15
ret void
}

LLVM IR (-O2):
define void @put16bit(i32** nocapture %0, i32 %1) {
%3 = alloca i32
%4 = trunc i32 %1 to i16
%5 = tail call i16 @llvm.bswap.i16(i16 %4)
%6 = zext i16 %5 to i32
store i32 %6, i32* %3
%7 = load i32*, i32** %0
%8 = call i32 @memcpy(i32* %7, i32* %3, i32 2)
%9 = load i32*, i32** %0
%10 = getelementptr inbounds i32, i32* %9, i64 2
store i32* %10, i32** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOENT;
int /*<<< orphan*/ errno;
int symlink(const char *a, const char *b) {
  errno = ENOENT;
  return -1;
}


x86 assembly (clang, -O0):
<symlink>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec4(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<symlink>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOENT = global i32 0
@errno = global i32 0
define i32 @symlink(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @ENOENT
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOENT = global i32 0
@errno = global i32 0
define i32 @symlink(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @ENOENT
store i32 %3, i32* @errno
ret i32 -1
}
int mycmp(void *a, void *b, int size) {
  while (size--)
    if (*((char *)a + size) != *((char *)b + size))
      return -1;
  return 0;
}


x86 assembly (clang, -O0):
<mycmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x1c(%rbp)
cmp    $0x0,%eax
je     1154 <mycmp+0x54>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     114f <mycmp+0x4f>
movl   $0xffffffff,-0x4(%rbp)
jmp    115b <mycmp+0x5b>
jmp    110f <mycmp+0xf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mycmp>:
movslq %edx,%rax
mov    %rax,%rcx
cs nopw 0x0(%rax,%rax,1)
sub    $0x1,%rcx
jb     112a <mycmp+0x2a>
movzbl -0x1(%rdi,%rax,1),%edx
cmp    -0x1(%rsi,%rax,1),%dl
mov    %rcx,%rax
je     1110 <mycmp+0x10>
mov    $0xffffffff,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @mycmp(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
br label %8
8: ; preds = %27, %3
%9 = load i32, i32* %7
%10 = add nsw i32 %9, -1
store i32 %10, i32* %7
%11 = icmp ne i32 %9, 0
br i1 %11, label %12, label %28
12: ; preds = %8
%13 = load i8*, i8** %5
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = load i8*, i8** %6
%20 = load i32, i32* %7
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %19, i64 %21
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %18, %24
br i1 %25, label %26, label %27
26: ; preds = %12
store i32 -1, i32* %4
br label %29
27: ; preds = %12
br label %8
28: ; preds = %8
store i32 0, i32* %4
br label %29
29: ; preds = %28, %26
%30 = load i32, i32* %4
ret i32 %30
}

LLVM IR (-O2):
define i32 @mycmp(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
br label %5
5: ; preds = %9, %3
%6 = phi i64 [ %7, %9 ], [ %4, %3 ]
%7 = add nsw i64 %6, -1
%8 = icmp eq i64 %6, 0
br i1 %8, label %15, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %0, i64 %7
%11 = load i8, i8* %10
%12 = getelementptr inbounds i8, i8* %1, i64 %7
%13 = load i8, i8* %12
%14 = icmp eq i8 %11, %13
br i1 %14, label %5, label %15
15: ; preds = %5, %9
%16 = phi i32 [ -1, %9 ], [ 0, %5 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int set_mp_flag() {
  system("uci -c/factory set diskconfig.@mp[0].mpsta=1");
  system("uci -c/factory commit diskconfig");
  return 0;
}


x86 assembly (clang, -O0):
<set_mp_flag>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <system@plt>
lea    0xf06(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_mp_flag>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
lea    0xf09(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"uci -c/factory set diskconfig.@mp[0].mpsta=1\00"
@.str.1 = [33 x i8] c"uci -c/factory commit diskconfig\00"
define i32 @set_mp_flag() {
%1 = call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [45 x i8] c"uci -c/factory set diskconfig.@mp[0].mpsta=1\00"
@.str.1 = [33 x i8] c"uci -c/factory commit diskconfig\00"
define i32 @set_mp_flag() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *start(void *arg) {
  assert(0);
  return arg;
}


x86 assembly (clang, -O0):
<start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<start>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @start(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @assert(i32 0)
%4 = load i8*, i8** %2
ret i8* %4
}

LLVM IR (-O2):
define i8* @start(i8* readnone returned %0) {
%2 = tail call i32 @assert(i32 0)
ret i8* %0
}