xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
char *malloc(int);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *get_date(void) {
  time_t timer;
  struct tm *tm_info;
  char *date = malloc(25 * sizeof(char));
  time(&timer);
  tm_info = localtime(&timer);
  strftime(date, 25, "[%d/%m/%Y %H:%M:%S]", tm_info);
  return date;
}


x86 assembly (clang, -O0):
<get_date>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x19,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
lea    -0x4(%rbp),%rdi
call   1040 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x19,%esi
lea    0xe80(%rip),%rdx
call   1060 <strftime@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_date>:
push   %r14
push   %rbx
push   %rax
mov    $0x19,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <time@plt>
mov    %r14,%rdi
call   1030 <localtime@plt>
lea    0xe93(%rip),%rdx
mov    %rbx,%rdi
mov    $0x19,%esi
mov    %rax,%rcx
call   1060 <strftime@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [20 x i8] c"[%d/%m/%Y %H:%M:%S]\00"
define i8* @get_date() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = alloca i8*
%4 = call i8* @malloc(i32 25)
store i8* %4, i8** %3
%5 = call i32 @time(i32* %1)
%6 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %6, %struct.tm** %2
%7 = load i8*, i8** %3
%8 = load %struct.tm*, %struct.tm** %2
%9 = call i32 @strftime(i8* %7, i32 25, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), %struct.tm* %8)
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [20 x i8] c"[%d/%m/%Y %H:%M:%S]\00"
define i8* @get_date() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call dereferenceable_or_null(25) i8* @malloc(i32 25)
%4 = call i32 @time(i32* %1)
%5 = call %struct.tm* @localtime(i32* %1)
%6 = call i32 @strftime(i8* %3, i32 25, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ menuSolo();
int /*<<< orphan*/ systemeSauvegardeSolo();
void solo(void) {
  systemeSauvegardeSolo();
  menuSolo();
}


x86 assembly (clang, -O0):
<solo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <systemeSauvegardeSolo@plt>
mov    $0x0,%al
call   1040 <menuSolo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<solo>:
push   %rax
xor    %eax,%eax
call   1030 <systemeSauvegardeSolo@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <menuSolo@plt>

LLVM IR (-O0):
define void @solo() {
%1 = call i32 (...) @systemeSauvegardeSolo()
%2 = call i32 (...) @menuSolo()
ret void
}

LLVM IR (-O2):
define void @solo() {
%1 = tail call i32 (...) @systemeSauvegardeSolo()
%2 = tail call i32 (...) @menuSolo()
ret void
}
unsigned int bi_reverse(unsigned int code, signed int len) {
  unsigned int res = (unsigned int)0;
  do {
    res = res | code & (unsigned int)1;
    code = code >> 1;
    res = res << 1;
    len = len - 1;
  } while (len > 0);
  return res >> 1;
}


x86 assembly (clang, -O0):
<bi_reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
and    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1111 <bi_reverse+0x11>
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bi_reverse>:
add    $0x1,%esi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edi,%eax
and    $0x1,%eax
or     %ecx,%eax
shr    %edi
lea    (%rax,%rax,1),%ecx
add    $0xffffffff,%esi
cmp    $0x1,%esi
jg     1110 <bi_reverse+0x10>
and    $0x7fffffff,%eax
ret

LLVM IR (-O0):
define i32 @bi_reverse(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = and i32 %8, 1
%10 = or i32 %7, %9
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = lshr i32 %11, 1
store i32 %12, i32* %3
%13 = load i32, i32* %5
%14 = shl i32 %13, 1
store i32 %14, i32* %5
%15 = load i32, i32* %4
%16 = sub nsw i32 %15, 1
store i32 %16, i32* %4
br label %17
17: ; preds = %6
%18 = load i32, i32* %4
%19 = icmp sgt i32 %18, 0
br i1 %19, label %6, label %20
20: ; preds = %17
%21 = load i32, i32* %5
%22 = lshr i32 %21, 1
ret i32 %22
}

LLVM IR (-O2):
define i32 @bi_reverse(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %9, %3 ]
%5 = phi i32 [ %1, %2 ], [ %11, %3 ]
%6 = phi i32 [ 0, %2 ], [ %10, %3 ]
%7 = and i32 %4, 1
%8 = or i32 %6, %7
%9 = lshr i32 %4, 1
%10 = shl i32 %8, 1
%11 = add nsw i32 %5, -1
%12 = icmp sgt i32 %5, 1
br i1 %12, label %3, label %13
13: ; preds = %3
%14 = and i32 %8, 2147483647
ret i32 %14
}
/* Variables and functions */
int write(int, void *, size_t);
int Write(int fd, void *buf, size_t sz) { return write(fd, buf, sz); }


x86 assembly (clang, -O0):
<Write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Write>:
jmp    1030 <write@plt>

LLVM IR (-O0):
define i32 @Write(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @write(i32 %7, i8* %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @Write(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
scalar_t__ INW(int);
int /*<<< orphan*/ OUTW(int, int);
unsigned long gfx_get_frame_buffer_size(void) {
  unsigned long value;
  OUTW(0xAC1C, 0xFC53);
  OUTW(0xAC1C, 0x0200);
  value = (unsigned long)(INW(0xAC1E)) & 0xFFl;
  return (value << 19);
}


x86 assembly (clang, -O0):
<gfx_get_frame_buffer_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xac1c,%edi
mov    $0xfc53,%esi
call   1040 <OUTW@plt>
mov    $0xac1c,%edi
mov    $0x200,%esi
call   1040 <OUTW@plt>
mov    $0xac1e,%edi
call   1030 <INW@plt>
and    $0xff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x13,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gfx_get_frame_buffer_size>:
push   %rax
mov    $0xac1c,%edi
mov    $0xfc53,%esi
call   1040 <OUTW@plt>
mov    $0xac1c,%edi
mov    $0x200,%esi
call   1040 <OUTW@plt>
mov    $0xac1e,%edi
call   1030 <INW@plt>
movzbl %al,%eax
shl    $0x13,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @gfx_get_frame_buffer_size() {
%1 = alloca i64
%2 = call i32 @OUTW(i32 44060, i32 64595)
%3 = call i32 @OUTW(i32 44060, i32 512)
%4 = call i64 @INW(i32 44062)
%5 = and i64 %4, 255
store i64 %5, i64* %1
%6 = load i64, i64* %1
%7 = shl i64 %6, 19
ret i64 %7
}

LLVM IR (-O2):
define i64 @gfx_get_frame_buffer_size() {
%1 = tail call i32 @OUTW(i32 44060, i32 64595)
%2 = tail call i32 @OUTW(i32 44060, i32 512)
%3 = tail call i64 @INW(i32 44062)
%4 = shl i64 %3, 19
%5 = and i64 %4, 133693440
ret i64 %5
}
void gdk_window_get_children() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_get_children() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ record_fun(void *, char);
void __cyg_profile_func_exit(void *this, void *callsite) {
  record_fun(this, 'X');
}


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

x86 assembly (clang, -O2):
<__cyg_profile_func_exit>:
mov    $0x58,%esi
jmp    1030 <record_fun@plt>

LLVM IR (-O0):
define void @__cyg_profile_func_exit(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @record_fun(i8* %5, i8 signext 88)
ret void
}

LLVM IR (-O2):
define void @__cyg_profile_func_exit(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @record_fun(i8* %0, i8 signext 88)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void CSPLIT_freeSplitCookieList(char **splitCookieList) {
  char **l = splitCookieList;
  while (*l) {
    free(*l);
    l++;
  }
}


x86 assembly (clang, -O0):
<CSPLIT_freeSplitCookieList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     114f <CSPLIT_freeSplitCookieList+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <CSPLIT_freeSplitCookieList+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CSPLIT_freeSplitCookieList>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1131 <CSPLIT_freeSplitCookieList+0x21>
add    $0x8,%rbx
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1120 <CSPLIT_freeSplitCookieList+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @CSPLIT_freeSplitCookieList(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %9, %4 ], [ %2, %1 ]
%6 = phi i8** [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @free(i8* %5)
%8 = getelementptr inbounds i8*, i8** %6, i64 1
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void exynos5_default_sdhci0(void) {}


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

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

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

LLVM IR (-O2):
define void @exynos5_default_sdhci0() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
char *init_mascara(unsigned int tamanho_palavra) {
  unsigned int i;
  char *mascara = (char *)malloc(sizeof(char) * (tamanho_palavra + 1));
  for (i = 0; i < tamanho_palavra; i++) {
    mascara[i] = '_';
  }
  mascara[i] = '\0';
  return mascara;
}


x86 assembly (clang, -O0):
<init_mascara>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
shl    $0x0,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    115e <init_mascara+0x4e>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
movb   $0x5f,(%rax,%rcx,1)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1139 <init_mascara+0x29>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_mascara>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%ebx
lea    0x1(%rbx),%edi
call   1040 <malloc@plt>
mov    %rax,%r15
test   %ebx,%ebx
je     114b <init_mascara+0x2b>
mov    %ebx,%r14d
mov    %r15,%rdi
mov    $0x5f,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
jmp    114e <init_mascara+0x2e>
xor    %r14d,%r14d
movb   $0x0,(%r15,%r14,1)
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @init_mascara(i32 %0) {
%2 = add i32 %0, 1
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i8*
%5 = icmp eq i32 %0, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = zext i32 %0 to i64
%8 = zext i32 %0 to i64
br label %9
9: ; preds = %6, %1
%10 = phi i64 [ 0, %1 ], [ %8, %6 ]
%11 = getelementptr inbounds i8, i8* %4, i64 %10
store i8 0, i8* %11
ret i8* %4
}
/* Variables and functions */
int object_refcount_down(void *);
int thread_reap_check(void *ptr) { return object_refcount_down(ptr); }


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

x86 assembly (clang, -O2):
<thread_reap_check>:
jmp    1030 <object_refcount_down@plt>

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

LLVM IR (-O2):
define i32 @thread_reap_check(i8* %0) {
%2 = tail call i32 @object_refcount_down(i8* %0)
ret i32 %2
}
/* Variables and functions */
char *TestFunction();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  char *exePath = argv[0];
  (void)argc;
  fprintf(stdout, "1: %s: Called %s", exePath, TestFunction());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e98(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <TestFunction@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rdx
mov    %rax,%rcx
lea    0xe93(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    (%rsi),%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
xor    %eax,%eax
call   1030 <TestFunction@plt>
lea    0xec3(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [17 x i8] c"1: %s: Called %s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
store i8* %9, i8** %6
%10 = load i32, i32* %4
%11 = load i32, i32* @stdout
%12 = load i8*, i8** %6
%13 = call i8* (...) @TestFunction()
%14 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %13)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [17 x i8] c"1: %s: Called %s\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = load i32, i32* @stdout
%5 = tail call i8* (...) @TestFunction()
%6 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %5)
ret i32 0
}
/* Type definitions */
struct macioDevice {
  int dummy;
};
struct device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ freeDevice(struct device *);
void macioFreeDevice(struct macioDevice *dev) {
  freeDevice((struct device *)dev);
}


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

x86 assembly (clang, -O2):
<macioFreeDevice>:
jmp    1030 <freeDevice@plt>

LLVM IR (-O0):
%struct.macioDevice = type { i32 }
%struct.device = type { i32 }
define void @macioFreeDevice(%struct.macioDevice* %0) {
%2 = alloca %struct.macioDevice*
store %struct.macioDevice* %0, %struct.macioDevice** %2
%3 = load %struct.macioDevice*, %struct.macioDevice** %2
%4 = bitcast %struct.macioDevice* %3 to %struct.device*
%5 = call i32 @freeDevice(%struct.device* %4)
ret void
}

LLVM IR (-O2):
%struct.macioDevice = type { i32 }
%struct.device = type { i32 }
define void @macioFreeDevice(%struct.macioDevice* %0) {
%2 = bitcast %struct.macioDevice* %0 to %struct.device*
%3 = tail call i32 @freeDevice(%struct.device* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int mkdir(char const *, int /*<<< orphan*/);
int fu_Mkdir(const char *path, int mode) { return mkdir(path, (mode_t)mode); }


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

x86 assembly (clang, -O2):
<fu_Mkdir>:
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define i32 @fu_Mkdir(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @mkdir(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int solve(int **, int, int);
int solvenext(int arr[][10], int i, int j) {
  if (j < 9)
    return solve(arr, i, j + 1);
  else
    return solve(arr, i + 1, 1);
}


x86 assembly (clang, -O0):
<solvenext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
cmpl   $0x9,-0x18(%rbp)
jge    1146 <solvenext+0x36>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
call   1030 <solve@plt>
mov    %eax,-0x4(%rbp)
jmp    115d <solvenext+0x4d>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    $0x1,%edx
call   1030 <solve@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solvenext>:
lea    0x1(%rdx),%eax
xor    %ecx,%ecx
cmp    $0x9,%edx
setge  %cl
mov    $0x1,%edx
cmovl  %eax,%edx
add    %ecx,%esi
jmp    1030 <solve@plt>

LLVM IR (-O0):
define i32 @solvenext([10 x i32]* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca [10 x i32]*
%6 = alloca i32
%7 = alloca i32
store [10 x i32]* %0, [10 x i32]** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = icmp slt i32 %8, 9
br i1 %9, label %10, label %17
10: ; preds = %3
%11 = load [10 x i32]*, [10 x i32]** %5
%12 = bitcast [10 x i32]* %11 to i32**
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = add nsw i32 %14, 1
%16 = call i32 @solve(i32** %12, i32 %13, i32 %15)
store i32 %16, i32* %4
br label %23
17: ; preds = %3
%18 = load [10 x i32]*, [10 x i32]** %5
%19 = bitcast [10 x i32]* %18 to i32**
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
%22 = call i32 @solve(i32** %19, i32 %21, i32 1)
store i32 %22, i32* %4
br label %23
23: ; preds = %17, %10
%24 = load i32, i32* %4
ret i32 %24
}

LLVM IR (-O2):
define i32 @solvenext([10 x i32]* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %2, 9
%5 = bitcast [10 x i32]* %0 to i32**
%6 = add nsw i32 %2, 1
%7 = select i1 %4, i32 %6, i32 1
%8 = xor i1 %4, true
%9 = zext i1 %8 to i32
%10 = add nsw i32 %9, %1
%11 = tail call i32 @solve(i32** %5, i32 %10, i32 %7)
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ IntDisable(int);
int /*<<< orphan*/ IntUnregister(int);
void USBIntUnregister(unsigned long ulBase) {
  ;
  IntUnregister(60);
  IntDisable(60);
}


x86 assembly (clang, -O0):
<USBIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x3c,%edi
call   1040 <IntUnregister@plt>
mov    $0x3c,%edi
call   1030 <IntDisable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBIntUnregister>:
push   %rax
mov    $0x3c,%edi
call   1040 <IntUnregister@plt>
mov    $0x3c,%edi
pop    %rax
jmp    1030 <IntDisable@plt>

LLVM IR (-O0):
define void @USBIntUnregister(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @IntUnregister(i32 60)
%4 = call i32 @IntDisable(i32 60)
ret void
}

LLVM IR (-O2):
define void @USBIntUnregister(i64 %0) {
%2 = tail call i32 @IntUnregister(i32 60)
%3 = tail call i32 @IntDisable(i32 60)
ret void
}
/* Type definitions */
typedef scalar_t__ key_t;

/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
int msgctl(int, int /*<<< orphan*/, int /*<<< orphan*/ *);
int msgget(scalar_t__, int /*<<< orphan*/);
int msgrm(key_t key, int id) {
  if (key) {
    id = msgget(key, 0);
    if (id == -1)
      return -1;
  }
  return msgctl(id, IPC_RMID, NULL);
}


x86 assembly (clang, -O0):
<msgrm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1163 <msgrm+0x43>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <msgget@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    115e <msgrm+0x3e>
movl   $0xffffffff,-0x4(%rbp)
jmp    117b <msgrm+0x5b>
jmp    1163 <msgrm+0x43>
mov    -0x14(%rbp),%edi
mov    0x2e73(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <msgctl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msgrm>:
push   %rax
test   %rdi,%rdi
je     1134 <msgrm+0x14>
xor    %esi,%esi
call   1030 <msgget@plt>
mov    %eax,%esi
cmp    $0xffffffff,%eax
je     1149 <msgrm+0x29>
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
mov    %esi,%edi
mov    %eax,%esi
xor    %edx,%edx
pop    %rax
jmp    1040 <msgctl@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@IPC_RMID = global i32 0
define i32 @msgrm(i64 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
%6 = load i64, i64* %4
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i64, i64* %4
%10 = call i32 @msgget(i64 %9, i32 0)
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 -1, i32* %3
br label %19
14: ; preds = %8
br label %15
15: ; preds = %14, %2
%16 = load i32, i32* %5
%17 = load i32, i32* @IPC_RMID
%18 = call i32 @msgctl(i32 %16, i32 %17, i32* null)
store i32 %18, i32* %3
br label %19
19: ; preds = %15, %13
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@IPC_RMID = global i32 0
define i32 @msgrm(i64 %0, i32 %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @msgget(i64 %0, i32 0)
%6 = icmp eq i32 %5, -1
br i1 %6, label %11, label %7
7: ; preds = %4, %2
%8 = phi i32 [ %5, %4 ], [ %1, %2 ]
%9 = load i32, i32* @IPC_RMID
%10 = tail call i32 @msgctl(i32 %8, i32 %9, i32* null)
br label %11
11: ; preds = %4, %7
%12 = phi i32 [ %10, %7 ], [ -1, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ cgau5(double *, int, double *, double *, int, int);
void cgau5_packet(double *x, int sigInLength, double *f, int sigOutLength,
                  double ys) {
  cgau5(x, sigInLength, f, f + sigInLength, sigOutLength, 1);
  return;
}


x86 assembly (clang, -O0):
<cgau5_packet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x18(%rbp),%rcx
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x1c(%rbp),%r8d
mov    $0x1,%r9d
call   1030 <cgau5@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgau5_packet>:
mov    %ecx,%r8d
movslq %esi,%rsi
lea    (%rdx,%rsi,8),%rcx
mov    $0x1,%r9d
jmp    1030 <cgau5@plt>

LLVM IR (-O0):
define void @cgau5_packet(double* %0, i32 %1, double* %2, i32 %3, double %4) {
%6 = alloca double*
%7 = alloca i32
%8 = alloca double*
%9 = alloca i32
%10 = alloca double
store double* %0, double** %6
store i32 %1, i32* %7
store double* %2, double** %8
store i32 %3, i32* %9
store double %4, double* %10
%11 = load double*, double** %6
%12 = load i32, i32* %7
%13 = load double*, double** %8
%14 = load double*, double** %8
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds double, double* %14, i64 %16
%18 = load i32, i32* %9
%19 = call i32 @cgau5(double* %11, i32 %12, double* %13, double* %17, i32 %18, i32 1)
ret void
}

LLVM IR (-O2):
define void @cgau5_packet(double* %0, i32 %1, double* %2, i32 %3, double %4) {
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds double, double* %2, i64 %6
%8 = tail call i32 @cgau5(double* %0, i32 %1, double* %2, double* %7, i32 %3, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test();
int /*<<< orphan*/ test2();
int main() {
  test();
  test2();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test@plt>
mov    $0x0,%al
call   1030 <test2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test@plt>
xor    %eax,%eax
call   1030 <test2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test()
%3 = call i32 (...) @test2()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test()
%2 = tail call i32 (...) @test2()
ret i32 0
}
void wifi_rsp_endpoint_close(const struct wifi_msg_endpoint_close_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_endpoint_close_rsp_t = type opaque
define void @wifi_rsp_endpoint_close(%struct.wifi_msg_endpoint_close_rsp_t* nocapture %0) {
ret void
}
int GetResponse(const char request[], const char expectedCmd[], int checkRc) {
  int err = 0;
  return err;
}


x86 assembly (clang, -O0):
<GetResponse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @GetResponse(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @GetResponse(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
unsigned int coprime_check(unsigned int m, unsigned int n) {
  unsigned int rem;
  while (n != 0) {
    rem = m % n;
    m = n;
    n = rem;
  }
  return m;
}


x86 assembly (clang, -O0):
<coprime_check>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1130 <coprime_check+0x30>
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <coprime_check+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<coprime_check>:
mov    %edi,%eax
test   %esi,%esi
je     111e <coprime_check+0x1e>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
xor    %edx,%edx
div    %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <coprime_check+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @coprime_check(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = urem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}
int eb_int_to_d1b(int src, unsigned char *tgt) {
  if (src < -127 || src > 127) {
    *tgt = (unsigned char)(0x80);
    return 0;
  } else {
    if (src >= 0) {
      *tgt = (unsigned char)(src);
      return 1;
    } else {
      *tgt = (unsigned char)(-(~(src - 1)));
      return -1;
    }
  }
}


x86 assembly (clang, -O0):
<eb_int_to_d1b>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0xffffff81,-0x8(%rbp)
jl     111f <eb_int_to_d1b+0x1f>
cmpl   $0x7f,-0x8(%rbp)
jle    1132 <eb_int_to_d1b+0x32>
mov    -0x10(%rbp),%rax
movb   $0x80,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    116f <eb_int_to_d1b+0x6f>
cmpl   $0x0,-0x8(%rbp)
jl     1153 <eb_int_to_d1b+0x53>
mov    -0x8(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    116f <eb_int_to_d1b+0x6f>
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
xor    $0xffffffff,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eb_int_to_d1b>:
mov    %edi,%eax
lea    -0x80(%rax),%ecx
cmp    $0xffffff00,%ecx
ja     1113 <eb_int_to_d1b+0x13>
movb   $0x80,(%rsi)
xor    %eax,%eax
ret
mov    %al,(%rsi)
sar    $0x1f,%eax
or     $0x1,%eax
ret

LLVM IR (-O0):
define i32 @eb_int_to_d1b(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, -127
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 127
br i1 %10, label %11, label %13
11: ; preds = %8, %2
%12 = load i8*, i8** %5
store i8 -128, i8* %12
store i32 0, i32* %3
br label %27
13: ; preds = %8
%14 = load i32, i32* %4
%15 = icmp sge i32 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i32, i32* %4
%18 = trunc i32 %17 to i8
%19 = load i8*, i8** %5
store i8 %18, i8* %19
store i32 1, i32* %3
br label %27
20: ; preds = %13
%21 = load i32, i32* %4
%22 = sub nsw i32 %21, 1
%23 = xor i32 %22, -1
%24 = sub nsw i32 0, %23
%25 = trunc i32 %24 to i8
%26 = load i8*, i8** %5
store i8 %25, i8* %26
store i32 -1, i32* %3
br label %27
27: ; preds = %20, %16, %11
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @eb_int_to_d1b(i32 %0, i8* nocapture writeonly %1) {
%3 = add i32 %0, -128
%4 = icmp ult i32 %3, -255
br i1 %4, label %5, label %6
5: ; preds = %2
store i8 -128, i8* %1
br label %10
6: ; preds = %2
%7 = icmp sgt i32 %0, -1
%8 = trunc i32 %0 to i8
store i8 %8, i8* %1
%9 = select i1 %7, i32 1, i32 -1
br label %10
10: ; preds = %6, %5
%11 = phi i32 [ 0, %5 ], [ %9, %6 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
int /*<<< orphan*/ *opendir(char const *);
int test_if_dir(const char *dir) {
  DIR *dp = opendir(dir);
  if (dp == NULL)
    return 0;
  closedir(dp);
  return 1;
}


x86 assembly (clang, -O0):
<test_if_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1150 <test_if_dir+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1160 <test_if_dir+0x40>
mov    -0x18(%rbp),%rdi
call   1040 <closedir@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_if_dir>:
push   %rax
call   1030 <opendir@plt>
test   %rax,%rax
je     113a <test_if_dir+0x1a>
mov    %rax,%rdi
call   1040 <closedir@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @test_if_dir(i8* nocapture %0) {
%2 = tail call i32* @opendir(i8* %0)
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @closedir(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int);
void nw_one_test(void **state) {
  assert_int_equal((((0x80ul) << 7) & ~0x8080808080808080ul), 0x4000ul);
  assert_int_equal((((0x8040201008040201ul) << 7) & ~0x8080808080808080ul),
                   0x2010080402010000ul);
}


x86 assembly (clang, -O0):
<nw_one_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4000,%esi
mov    %esi,%edi
call   1030 <assert_int_equal@plt>
mov    $0x2010000,%esi
mov    %esi,%edi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nw_one_test>:
push   %rax
mov    $0x4000,%edi
mov    $0x4000,%esi
call   1030 <assert_int_equal@plt>
mov    $0x2010000,%edi
mov    $0x2010000,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @nw_one_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @assert_int_equal(i32 16384, i32 16384)
%4 = call i32 @assert_int_equal(i32 33619968, i32 33619968)
ret void
}

LLVM IR (-O2):
define void @nw_one_test(i8** nocapture readnone %0) {
%2 = tail call i32 @assert_int_equal(i32 16384, i32 16384)
%3 = tail call i32 @assert_int_equal(i32 33619968, i32 33619968)
ret void
}
/* Type definitions */
struct flexarray {
  int dummy;
};

/* Variables and functions */
int flexarray_set(struct flexarray *, int /*<<< orphan*/, void *);
int /*<<< orphan*/ flexarray_size(struct flexarray *);
int flexarray_append(struct flexarray *flex, void *data) {
  return flexarray_set(flex, flexarray_size(flex), data);
}


x86 assembly (clang, -O0):
<flexarray_append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <flexarray_size@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
call   1040 <flexarray_set@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flexarray_append>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <flexarray_size@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <flexarray_set@plt>

LLVM IR (-O0):
%struct.flexarray = type { i32 }
define i32 @flexarray_append(%struct.flexarray* %0, i8* %1) {
%3 = alloca %struct.flexarray*
%4 = alloca i8*
store %struct.flexarray* %0, %struct.flexarray** %3
store i8* %1, i8** %4
%5 = load %struct.flexarray*, %struct.flexarray** %3
%6 = load %struct.flexarray*, %struct.flexarray** %3
%7 = call i32 @flexarray_size(%struct.flexarray* %6)
%8 = load i8*, i8** %4
%9 = call i32 @flexarray_set(%struct.flexarray* %5, i32 %7, i8* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.flexarray = type { i32 }
define i32 @flexarray_append(%struct.flexarray* %0, i8* %1) {
%3 = tail call i32 @flexarray_size(%struct.flexarray* %0)
%4 = tail call i32 @flexarray_set(%struct.flexarray* %0, i32 %3, i8* %1)
ret i32 %4
}
short alpha_numeric(char a) {
  if ((a >= 48 && a <= 57) || (a >= 65 && a <= 90) || (a >= 97 && a <= 122))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<alpha_numeric>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%eax
cmp    $0x30,%eax
jl     1124 <alpha_numeric+0x24>
movsbl -0x3(%rbp),%eax
cmp    $0x39,%eax
jle    1158 <alpha_numeric+0x58>
movsbl -0x3(%rbp),%eax
cmp    $0x41,%eax
jl     113e <alpha_numeric+0x3e>
movsbl -0x3(%rbp),%eax
cmp    $0x5a,%eax
jle    1158 <alpha_numeric+0x58>
movsbl -0x3(%rbp),%eax
cmp    $0x61,%eax
jl     1163 <alpha_numeric+0x63>
movsbl -0x3(%rbp),%eax
cmp    $0x7a,%eax
jg     1163 <alpha_numeric+0x63>
movw   $0x1,-0x2(%rbp)
jmp    1169 <alpha_numeric+0x69>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alpha_numeric>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x1a,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define signext i16 @alpha_numeric(i8 signext %0) {
%2 = alloca i16
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %27, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 65
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 90
br i1 %18, label %27, label %19
19: ; preds = %15, %11
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp sge i32 %21, 97
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp sle i32 %25, 122
br i1 %26, label %27, label %28
27: ; preds = %23, %15, %7
store i16 1, i16* %2
br label %29
28: ; preds = %23, %19
store i16 0, i16* %2
br label %29
29: ; preds = %28, %27
%30 = load i16, i16* %2
ret i16 %30
}

LLVM IR (-O2):
define signext i16 @alpha_numeric(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 26
%7 = or i1 %3, %6
%8 = zext i1 %7 to i16
ret i16 %8
}
int hash(int k_len) { return (k_len); }


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

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

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

LLVM IR (-O2):
define i32 @hash(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, size_t, int /*<<< orphan*/);
size_t ftell(int /*<<< orphan*/ *);
size_t get_file_size(FILE *fp) {
  size_t restore = ftell(fp);
  size_t end = 0;
  fseek(fp, 0, SEEK_END);
  end = ftell(fp);
  fseek(fp, restore, SEEK_SET);
  return end;
}


x86 assembly (clang, -O0):
<get_file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e9c(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e65(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file_size>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r15
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @get_file_size(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @ftell(i32* %5)
store i64 %6, i64* %3
store i64 0, i64* %4
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i64 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i64 @ftell(i32* %10)
store i64 %11, i64* %4
%12 = load i32*, i32** %2
%13 = load i64, i64* %3
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i64 %13, i32 %14)
%16 = load i64, i64* %4
ret i64 %16
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @get_file_size(i32* nocapture %0) {
%2 = tail call i64 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i64 0, i32 %3)
%5 = tail call i64 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i64 %2, i32 %6)
ret i64 %5
}
int qcompare(void const *a, void const *b) {
  int pa = *((int *)a) - *((int *)b);
  return pa;
}


x86 assembly (clang, -O0):
<qcompare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qcompare>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @qcompare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
%12 = sub nsw i32 %8, %11
store i32 %12, i32* %5
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
define i32 @qcompare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
void gdk_x11_gc_get_xgc() {}


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

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

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

LLVM IR (-O2):
define void @gdk_x11_gc_get_xgc() {
ret void
}
void prologize(p) char *p;
{
  if (!p)
    return;
  while (*p) {
    if (*p == '\'')
      *p = 'h';
    if (!isalnum(*p))
      *p = '_';
    p++;
  }
}


x86 assembly (clang, -O0):
<prologize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <prologize+0x1c>
jmp    1182 <prologize+0x72>
jmp    1131 <prologize+0x21>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1182 <prologize+0x72>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x27,%eax
jne    1155 <prologize+0x45>
mov    -0x8(%rbp),%rax
movb   $0x68,(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%eax
jne    1171 <prologize+0x61>
mov    -0x8(%rbp),%rax
movb   $0x5f,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1131 <prologize+0x21>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prologize>:
push   %rbx
test   %rdi,%rdi
je     1156 <prologize+0x46>
mov    %rdi,%rbx
jmp    1124 <prologize+0x14>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
movzbl (%rbx),%eax
cmp    $0x27,%al
je     1140 <prologize+0x30>
test   %al,%al
jne    1145 <prologize+0x35>
jmp    1156 <prologize+0x46>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movb   $0x68,(%rbx)
mov    $0x68,%al
movsbl %al,%edi
call   1030 <isalnum@plt>
test   %eax,%eax
jne    1120 <prologize+0x10>
movb   $0x5f,(%rbx)
jmp    1120 <prologize+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @prologize(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %15, label %3
3: ; preds = %1, %13
%4 = phi i8* [ %14, %13 ], [ %0, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %7 [
i8 0, label %15
i8 39, label %6
]
6: ; preds = %3
store i8 104, i8* %4
br label %7
7: ; preds = %3, %6
%8 = phi i8 [ %5, %3 ], [ 104, %6 ]
%9 = sext i8 %8 to i32
%10 = tail call i32 @isalnum(i32 %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %7
store i8 95, i8* %4
br label %13
13: ; preds = %12, %7
%14 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
15: ; preds = %3, %1
ret void
}