xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ malloc(int);
int main() {
  double a;
  double b[10];
  double c[20][30];
  double *d;
  double *p, *q, *r, *s, *t;
  d = (double *)malloc(sizeof(double) * 40);
#pragma acc data create(a, b, c, d [0:40])
  {
#pragma acc host_data use_device(a)
    p = &a;
#pragma acc host_data use_device(b, c, d)
    {
      q = b;
      r = (double *)c;
      s = &c[2][3];
      s = &b[3];
      t = d;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1350,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x140,%edi
call   1030 <malloc@plt>
mov    %rax,-0x1328(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x1330(%rbp)
lea    -0x60(%rbp),%rax
mov    %rax,-0x1338(%rbp)
lea    -0x1320(%rbp),%rax
mov    %rax,-0x1340(%rbp)
lea    -0x1320(%rbp),%rax
add    $0x1e0,%rax
add    $0x18,%rax
mov    %rax,-0x1348(%rbp)
lea    -0x60(%rbp),%rax
add    $0x18,%rax
mov    %rax,-0x1348(%rbp)
mov    -0x1328(%rbp),%rax
mov    %rax,-0x1350(%rbp)
xor    %eax,%eax
add    $0x1350,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x140,%edi
call   1030 <malloc@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca [10 x double]
%4 = alloca [20 x [30 x double]]
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
store i32 0, i32* %1
%11 = call i64 @malloc(i32 320)
%12 = inttoptr i64 %11 to double*
store double* %12, double** %5
store double* %2, double** %6
%13 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 0
store double* %13, double** %7
%14 = getelementptr inbounds [20 x [30 x double]], [20 x [30 x double]]* %4, i64 0, i64 0
%15 = bitcast [30 x double]* %14 to double*
store double* %15, double** %8
%16 = getelementptr inbounds [20 x [30 x double]], [20 x [30 x double]]* %4, i64 0, i64 2
%17 = getelementptr inbounds [30 x double], [30 x double]* %16, i64 0, i64 3
store double* %17, double** %9
%18 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 3
store double* %18, double** %9
%19 = load double*, double** %5
store double* %19, double** %10
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 320)
ret i32 0
}
/* Type definitions */
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ strftime(char *, int, char *, struct tm const *);
char *asctime_r(const struct tm *tm, char *buf) {
  strftime(buf, (26 + 2), "%c\n", tm);
  return buf;
}


x86 assembly (clang, -O0):
<asctime_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1c,%esi
lea    0xecc(%rip),%rdx
call   1030 <strftime@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asctime_r>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rcx
lea    0xee2(%rip),%rdx
mov    %rsi,%rdi
mov    $0x1c,%esi
call   1030 <strftime@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [4 x i8] c"%c\0A\00"
define i8* @asctime_r(%struct.tm* %0, i8* %1) {
%3 = alloca %struct.tm*
%4 = alloca i8*
store %struct.tm* %0, %struct.tm** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load %struct.tm*, %struct.tm** %3
%7 = call i32 @strftime(i8* %5, i32 28, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
%8 = load i8*, i8** %4
ret i8* %8
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [4 x i8] c"%c\0A\00"
define i8* @asctime_r(%struct.tm* %0, i8* returned %1) {
%3 = tail call i32 @strftime(i8* %1, i32 28, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %struct.tm* %0)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int key_cmp(const void *key1, const void *key2) {
  assert(key1 != NULL && key2 != NULL);
  int *a = (int *)key1;
  int *b = (int *)key2;
  return *a < *b;
}


x86 assembly (clang, -O0):
<key_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x21(%rbp)
je     113b <key_cmp+0x2b>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<key_cmp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
test   %rdi,%rdi
setne  %al
test   %rsi,%rsi
setne  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
mov    (%rbx),%ecx
xor    %eax,%eax
cmp    (%r14),%ecx
setl   %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @key_cmp(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = bitcast i8* %0 to i32*
%9 = bitcast i8* %1 to i32*
%10 = load i32, i32* %8
%11 = load i32, i32* %9
%12 = icmp slt i32 %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
void csv_log_initialize(struct _nlTestSuite *inSuite, int inResult,
                        int inWidth) {
  printf("'#1:','%-*s','%s'\n", inWidth, "Initialize",
         inResult == -1 ? "FAILED" : "PASSED");
}


x86 assembly (clang, -O0):
<csv_log_initialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xef6(%rip),%rcx
lea    0xee8(%rip),%rax
cmp    $0xffffffff,%edx
cmove  %rax,%rcx
lea    0xebc(%rip),%rdi
lea    0xec8(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csv_log_initialize>:
cmp    $0xffffffff,%esi
lea    0xf04(%rip),%rax
lea    0xf04(%rip),%rcx
cmove  %rax,%rcx
lea    0xed4(%rip),%rdi
lea    0xee0(%rip),%rax
mov    %edx,%esi
mov    %rax,%rdx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct._nlTestSuite = type opaque
@.str = [19 x i8] c"':','%-*s','%s'\0A\00"
@.str.1 = [11 x i8] c"Initialize\00"
@.str.2 = [7 x i8] c"FAILED\00"
@.str.3 = [7 x i8] c"PASSED\00"
define void @csv_log_initialize(%struct._nlTestSuite* %0, i32 %1, i32 %2) {
%4 = alloca %struct._nlTestSuite*
%5 = alloca i32
%6 = alloca i32
store %struct._nlTestSuite* %0, %struct._nlTestSuite** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, -1
%10 = zext i1 %9 to i64
%11 = select i1 %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %11)
ret void
}

LLVM IR (-O2):
%struct._nlTestSuite = type opaque
@.str = [19 x i8] c"':','%-*s','%s'\0A\00"
@.str.1 = [11 x i8] c"Initialize\00"
@.str.2 = [7 x i8] c"FAILED\00"
@.str.3 = [7 x i8] c"PASSED\00"
define void @csv_log_initialize(%struct._nlTestSuite* nocapture readnone %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, -1
%5 = select i1 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret void
}
__attribute__((__always___)) void _xend_rtm(void) {
  asm volatile(".byte 0x0f,0x01,0xd5" ::: "memory");
}


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

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

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

LLVM IR (-O2):
define void @_xend_rtm() {
tail call void asm sideeffect ".byte 0x0f,0x01,0xd5", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int rand();
int Random(int min, int max) { return rand() % max + min; }


x86 assembly (clang, -O0):
<Random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Random>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Random(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @rand()
%6 = load i32, i32* %4
%7 = srem i32 %5, %6
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @Random(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, %1
%5 = add nsw i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ squeeze(char *, char *);
int main(void) {
  char s1[50] = "Hello, world !";
  puts(s1);
  puts("We are the knights who say ni !");
  squeeze(s1, "We are the knights who say ni !");
  puts(s1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x32,%edx
call   1050 <memcpy@plt>
lea    -0x40(%rbp),%rdi
call   1040 <puts@plt>
lea    0xed5(%rip),%rdi
call   1040 <puts@plt>
lea    -0x40(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1030 <squeeze@plt>
lea    -0x40(%rbp),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
movaps 0xef2(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed6(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeba(%rip),%xmm0
movaps %xmm0,(%rsp)
movw   $0x0,0x30(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xecf(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <squeeze@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.s1 = [50 x i8] c"Hello, world !\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [32 x i8] c"We are the knights who say ni !\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = bitcast [50 x i8]* %1 to i8*
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%4 = call i32 @puts(i8* %3)
%5 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%7 = call i32 @squeeze(i8* %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%9 = call i32 @puts(i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s1 = [50 x i8] c"Hello, world !\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [32 x i8] c"We are the knights who say ni !\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = call i32 @puts(i8* %2)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @squeeze(i8* %2, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @puts(i8* %2)
ret i32 0
}
/* Type definitions */
struct timeval {
  long tv_sec;
};

/* Variables and functions */
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ timersub(struct timeval *, struct timeval *,
                            struct timeval *);
long get_timeout(struct timeval *timeout) {
  struct timeval now, result;
  if (gettimeofday(&now, NULL) < 0)
    return -1;
  timersub(timeout, &now, &result);
  return result.tv_sec;
}


x86 assembly (clang, -O0):
<get_timeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0x0,%rax
jge    1150 <get_timeout+0x30>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1169 <get_timeout+0x49>
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1040 <timersub@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_timeout>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
test   %rax,%rax
js     114f <get_timeout+0x2f>
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
mov    %rbx,%rdi
call   1040 <timersub@plt>
mov    (%rsp),%rax
jmp    1156 <get_timeout+0x36>
mov    $0xffffffffffffffff,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i64 }
define i64 @get_timeout(%struct.timeval* %0) {
%2 = alloca i64
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval
%5 = alloca %struct.timeval
store %struct.timeval* %0, %struct.timeval** %3
%6 = call i64 @gettimeofday(%struct.timeval* %4, i32* null)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i64 -1, i64* %2
br label %14
9: ; preds = %1
%10 = load %struct.timeval*, %struct.timeval** %3
%11 = call i32 @timersub(%struct.timeval* %10, %struct.timeval* %4, %struct.timeval* %5)
%12 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%13 = load i64, i64* %12
store i64 %13, i64* %2
br label %14
14: ; preds = %9, %8
%15 = load i64, i64* %2
ret i64 %15
}

LLVM IR (-O2):
%struct.timeval = type { i64 }
define i64 @get_timeout(%struct.timeval* %0) {
%2 = alloca %struct.timeval
%3 = alloca %struct.timeval
%4 = bitcast %struct.timeval* %2 to i8*
%5 = bitcast %struct.timeval* %3 to i8*
%6 = call i64 @gettimeofday(%struct.timeval* %2, i32* null)
%7 = icmp slt i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = call i32 @timersub(%struct.timeval* %0, %struct.timeval* %2, %struct.timeval* %3)
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
%11 = load i64, i64* %10
br label %12
12: ; preds = %1, %8
%13 = phi i64 [ %11, %8 ], [ -1, %1 ]
ret i64 %13
}
/* Type definitions */
struct widget {
  int dummy;
};
struct view {
  int dummy;
};

/* Variables and functions */
struct widget *createwidget(struct view *);
int /*<<< orphan*/ widget_toggle_init(struct widget *, char *, char *,
                                      unsigned int);
void pool_create_toggle(struct view *view, char *id, char *in,
                        unsigned int state) {
  struct widget *widget = createwidget(view);
  widget_toggle_init(widget, id, in, state);
}


x86 assembly (clang, -O0):
<pool_create_toggle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <createwidget@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1040 <widget_toggle_init@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pool_create_toggle>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %rdx,%rbx
mov    %rsi,%rbp
call   1030 <createwidget@plt>
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <widget_toggle_init@plt>

LLVM IR (-O0):
%struct.view = type { i32 }
%struct.widget = type { i32 }
define void @pool_create_toggle(%struct.view* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca %struct.view*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca %struct.widget*
store %struct.view* %0, %struct.view** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load %struct.view*, %struct.view** %5
%11 = call %struct.widget* @createwidget(%struct.view* %10)
store %struct.widget* %11, %struct.widget** %9
%12 = load %struct.widget*, %struct.widget** %9
%13 = load i8*, i8** %6
%14 = load i8*, i8** %7
%15 = load i32, i32* %8
%16 = call i32 @widget_toggle_init(%struct.widget* %12, i8* %13, i8* %14, i32 %15)
ret void
}

LLVM IR (-O2):
%struct.view = type { i32 }
%struct.widget = type { i32 }
define void @pool_create_toggle(%struct.view* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call %struct.widget* @createwidget(%struct.view* %0)
%6 = tail call i32 @widget_toggle_init(%struct.widget* %5, i8* %1, i8* %2, i32 %3)
ret void
}
/* Variables and functions */
char *banner(char);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int i;
  for (i = 0; i < 26; i++)
    printf("%s\n", banner('A' + i));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1a,-0x8(%rbp)
jge    116b <main+0x4b>
mov    -0x8(%rbp),%eax
add    $0x41,%eax
movsbl %al,%edi
call   1040 <banner@plt>
mov    %rax,%rsi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xffffffe6,%ebx
lea    0xed0(%rip),%r14
lea    0x5b(%rbx),%eax
movsbl %al,%edi
call   1040 <banner@plt>
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
inc    %ebx
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %12, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 26
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 65, %7
%9 = trunc i32 %8 to i8
%10 = call i8* @banner(i8 signext %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %6
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %3
15: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %7, %1 ]
%3 = trunc i32 %2 to i8
%4 = add nuw nsw i8 %3, 65
%5 = tail call i8* @banner(i8 signext %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = add nuw nsw i32 %2, 1
%8 = icmp eq i32 %7, 26
br i1 %8, label %9, label %1
9: ; preds = %1
ret i32 0
}
int count(int num) {
  int total = 0;
  while (num) {
    total += num % 10;
    num /= 10;
  }
  return total;
}


x86 assembly (clang, -O0):
<count>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113c <count+0x3c>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    -0x8(%rbp),%edx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <count+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count>:
xor    %eax,%eax
test   %edi,%edi
je     113b <count+0x3b>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
lea    (%rdi,%rdi,1),%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%esi
sub    %edx,%esi
add    %esi,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <count+0x10>
ret

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

LLVM IR (-O2):
define i32 @count(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = srem i32 %5, 10
%7 = add nsw i32 %4, %6
%8 = sdiv i32 %5, 10
%9 = add i32 %5, 9
%10 = icmp ult i32 %9, 19
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ ChebCell_reset(int, long long, int *, double *, void *,
                                  void *);
void cheb_resetCell(int level, long long morton_index, int *tree_position,
                    double *spatial_position, void *userCell, void *userData) {
  ChebCell_reset(level, morton_index, tree_position, spatial_position, userCell,
                 userData);
}


x86 assembly (clang, -O0):
<cheb_resetCell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <ChebCell_reset@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cheb_resetCell>:
jmp    1030 <ChebCell_reset@plt>

LLVM IR (-O0):
define void @cheb_resetCell(i32 %0, i64 %1, i32* %2, double* %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i64
%9 = alloca i32*
%10 = alloca double*
%11 = alloca i8*
%12 = alloca i8*
store i32 %0, i32* %7
store i64 %1, i64* %8
store i32* %2, i32** %9
store double* %3, double** %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = load i32, i32* %7
%14 = load i64, i64* %8
%15 = load i32*, i32** %9
%16 = load double*, double** %10
%17 = load i8*, i8** %11
%18 = load i8*, i8** %12
%19 = call i32 @ChebCell_reset(i32 %13, i64 %14, i32* %15, double* %16, i8* %17, i8* %18)
ret void
}

LLVM IR (-O2):
define void @cheb_resetCell(i32 %0, i64 %1, i32* %2, double* %3, i8* %4, i8* %5) {
%7 = tail call i32 @ChebCell_reset(i32 %0, i64 %1, i32* %2, double* %3, i8* %4, i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void set_default_colour(void) { printf("\033[0;37m"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"\1B[0;37m\00"
define void @set_default_colour() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B[0;37m\00"
define void @set_default_colour() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ timer_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int timer_getoverrun(timer_t timerid) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<timer_getoverrun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_getoverrun>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @timer_getoverrun(i32 %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 -1
}
float calculate_ewma(const float old_ewma, const float new_value,
                     const float factor) {
  if (old_ewma == 0)
    return new_value;
  else
    return factor * new_value + (1.0 - factor) * old_ewma;
}


x86 assembly (clang, -O0):
<calculate_ewma>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1139 <calculate_ewma+0x39>
jp     1139 <calculate_ewma+0x39>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1176 <calculate_ewma+0x76>
movss  -0x10(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xea8(%rip),%xmm0
subsd  %xmm2,%xmm0
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_ewma>:
xorps  %xmm3,%xmm3
ucomiss %xmm3,%xmm0
jne    110e <calculate_ewma+0xe>
jp     110e <calculate_ewma+0xe>
movaps %xmm1,%xmm0
ret
mulss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
cvtss2sd %xmm2,%xmm2
movsd  0xede(%rip),%xmm3
subsd  %xmm2,%xmm3
cvtss2sd %xmm0,%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @calculate_ewma(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 = fcmp oeq float %8, 0.000000e+00
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load float, float* %6
store float %11, float* %4
br label %24
12: ; preds = %3
%13 = load float, float* %7
%14 = load float, float* %6
%15 = fmul float %13, %14
%16 = fpext float %15 to double
%17 = load float, float* %7
%18 = fpext float %17 to double
%19 = fsub double 1.000000e+00, %18
%20 = load float, float* %5
%21 = fpext float %20 to double
%22 = call double @llvm.fmuladd.f64(double %19, double %21, double %16)
%23 = fptrunc double %22 to float
store float %23, float* %4
br label %24
24: ; preds = %12, %10
%25 = load float, float* %4
ret float %25
}

LLVM IR (-O2):
define float @calculate_ewma(float %0, float %1, float %2) {
%4 = fcmp oeq float %0, 0.000000e+00
br i1 %4, label %13, label %5
5: ; preds = %3
%6 = fmul float %1, %2
%7 = fpext float %6 to double
%8 = fpext float %2 to double
%9 = fsub double 1.000000e+00, %8
%10 = fpext float %0 to double
%11 = tail call double @llvm.fmuladd.f64(double %9, double %10, double %7)
%12 = fptrunc double %11 to float
br label %13
13: ; preds = %3, %5
%14 = phi float [ %12, %5 ], [ %1, %3 ]
ret float %14
}
unsigned char _DndByteOrder(void) {
  static unsigned char byte_order = 0;
  if (!byte_order) {
    unsigned int endian = 1;
    byte_order = (*((char *)&endian)) ? 'l' : 'B';
  }
  return byte_order;
}


x86 assembly (clang, -O0):
<_DndByteOrder>:
push   %rbp
mov    %rsp,%rbp
cmpb   $0x0,0x2f16(%rip)
jne    1132 <_DndByteOrder+0x32>
movl   $0x1,-0x4(%rbp)
movsbl -0x4(%rbp),%edx
mov    $0x42,%eax
mov    $0x6c,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,0x2eef(%rip)
movzbl 0x2ee8(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_DndByteOrder>:
cmpb   $0x0,0x2f1a(%rip)
jne    1110 <_DndByteOrder+0x10>
movb   $0x1,0x2f11(%rip)
mov    $0x6c,%al
ret

LLVM IR (-O0):
@_DndByteOrder.byte_order = internal global i8 0
define zeroext i8 @_DndByteOrder() {
%1 = alloca i32
%2 = load i8, i8* @_DndByteOrder.byte_order
%3 = icmp ne i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %0
store i32 1, i32* %1
%5 = bitcast i32* %1 to i8*
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 108, i32 66
%11 = trunc i32 %10 to i8
store i8 %11, i8* @_DndByteOrder.byte_order
br label %12
12: ; preds = %4, %0
%13 = load i8, i8* @_DndByteOrder.byte_order
ret i8 %13
}

LLVM IR (-O2):
@_DndByteOrder.byte_order = internal unnamed_addr global i1 false
define zeroext i8 @_DndByteOrder() {
%1 = load i1, i1* @_DndByteOrder.byte_order
br i1 %1, label %3, label %2
2: ; preds = %0
store i1 true, i1* @_DndByteOrder.byte_order
br label %3
3: ; preds = %2, %0
ret i8 108
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float stdlib_strided_sstdevyc(int, float, float *, int);
int main() {
  float x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  float v = stdlib_strided_sstdevyc(N, 1.0f, x, stride);
  printf("sample standard deviation: %f\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%edx
movss  0xe8c(%rip),%xmm0
call   1030 <stdlib_strided_sstdevyc@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
movss  0xebd(%rip),%xmm0
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1030 <stdlib_strided_sstdevyc@plt>
lea    0xed4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [31 x i8] c"sample standard deviation: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = bitcast [8 x float]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call float @stdlib_strided_sstdevyc(i32 %6, float 1.000000e+00, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [31 x i8] c"sample standard deviation: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call float @stdlib_strided_sstdevyc(i32 4, float 1.000000e+00, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
int test_imm_21uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x21 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_21uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0x21,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_21uint64_highword_mem>:
testb  $0x21,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_21uint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 33
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_21uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 141733920768
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_channel_map_parse() {
  printf("NOT IMPLEMENTED:"
         "pa_channel_map_parse"
         "\n");
}


x86 assembly (clang, -O0):
<pa_channel_map_parse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [38 x i8] c"NOT IMPLEMENTED:pa_channel_map_parse\0A\00"
define i32 @pa_channel_map_parse() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [37 x i8] c"NOT IMPLEMENTED:pa_channel_map_parse\00"
define i32 @pa_channel_map_parse() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
double log(double x) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  (void)(x);
  return 0;
}


x86 assembly (clang, -O0):
<log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xec3(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.log = [4 x i8] c"log\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @log(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__FUNCTION__.log, i64 0, i64 0))
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
%7 = load double, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.log = [4 x i8] c"log\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @log(double %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__FUNCTION__.log, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret double 0.000000e+00
}
/* Variables and functions */
scalar_t__ pthread_self();
unsigned long CRYPTO_thread_id(void) { return (unsigned long)pthread_self(); }


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

x86 assembly (clang, -O2):
<CRYPTO_thread_id>:
xor    %eax,%eax
jmp    1030 <pthread_self@plt>

LLVM IR (-O0):
define i64 @CRYPTO_thread_id() {
%1 = call i64 (...) @pthread_self()
ret i64 %1
}

LLVM IR (-O2):
define i64 @CRYPTO_thread_id() {
%1 = tail call i64 (...) @pthread_self()
ret i64 %1
}
int str_utf8_isstart(char c) {
  if ((c & 0xC0) == 0x80)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<str_utf8_isstart>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
jne    112a <str_utf8_isstart+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1131 <str_utf8_isstart+0x31>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_utf8_isstart>:
and    $0xc0,%dil
xor    %eax,%eax
cmp    $0x80,%dil
setne  %al
ret

LLVM IR (-O0):
define i32 @str_utf8_isstart(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 192
%7 = icmp eq i32 %6, 128
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %10
9: ; preds = %1
store i32 1, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @str_utf8_isstart(i8 signext %0) {
%2 = and i8 %0, -64
%3 = icmp ne i8 %2, -128
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ rand();
void random_matrix_double(double *a, const unsigned int rows,
                          const unsigned int cols) {
  for (unsigned int i = 0; i < rows * cols; i++) {
    a[i] = (double)rand();
  }
}


x86 assembly (clang, -O0):
<random_matrix_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
cmp    %ecx,%eax
jae    1161 <random_matrix_double+0x51>
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <random_matrix_double+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_matrix_double>:
push   %r15
push   %r14
push   %rbx
imul   %edx,%esi
test   %esi,%esi
je     114e <random_matrix_double+0x3e>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <random_matrix_double+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @random_matrix_double(double* %0, i32 %1, i32 %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store double* %0, double** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %21, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = mul i32 %10, %11
%13 = icmp ult i32 %9, %12
br i1 %13, label %14, label %24
14: ; preds = %8
%15 = call i64 (...) @rand()
%16 = sitofp i64 %15 to double
%17 = load double*, double** %4
%18 = load i32, i32* %7
%19 = zext i32 %18 to i64
%20 = getelementptr inbounds double, double* %17, i64 %19
store double %16, double* %20
br label %21
21: ; preds = %14
%22 = load i32, i32* %7
%23 = add i32 %22, 1
store i32 %23, i32* %7
br label %8
24: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @random_matrix_double(double* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = mul i32 %2, %1
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = zext i32 %4 to i64
br label %9
8: ; preds = %9, %3
ret void
9: ; preds = %6, %9
%10 = phi i64 [ 0, %6 ], [ %14, %9 ]
%11 = tail call i64 (...) @rand()
%12 = sitofp i64 %11 to double
%13 = getelementptr inbounds double, double* %0, i64 %10
store double %12, double* %13
%14 = add nuw nsw i64 %10, 1
%15 = icmp eq i64 %14, %7
br i1 %15, label %8, label %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strncpy(unsigned char *, char *, int);
void __getusername(unsigned char *username) {
  char Name[150];
  printf("Encryption support not yet implemented for non-windows systems.");
  strncpy(username, Name, 150);
}


x86 assembly (clang, -O0):
<__getusername>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
mov    $0x96,%edx
call   1030 <strncpy@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getusername>:
push   %rbx
sub    $0xa0,%rsp
mov    %rdi,%rbx
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
mov    $0x96,%edx
call   1030 <strncpy@plt>
add    $0xa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [64 x i8] c"Encryption support not yet implemented for non-windows systems.\00"
define void @__getusername(i8* %0) {
%2 = alloca i8*
%3 = alloca [150 x i8]
store i8* %0, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = getelementptr inbounds [150 x i8], [150 x i8]* %3, i64 0, i64 0
%7 = call i32 @strncpy(i8* %5, i8* %6, i32 150)
ret void
}

LLVM IR (-O2):
@.str = [64 x i8] c"Encryption support not yet implemented for non-windows systems.\00"
define void @__getusername(i8* %0) {
%2 = alloca [150 x i8]
%3 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @strncpy(i8* %0, i8* %3, i32 150)
ret void
}
void delay_loop(long count) {
  while (count != 0L)
    count--;
}


x86 assembly (clang, -O0):
<delay_loop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1124 <delay_loop+0x24>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <delay_loop+0x8>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @delay_loop(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
br label %3
3: ; preds = %6, %1
%4 = load i64, i64* %2
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i64, i64* %2
%8 = add nsw i64 %7, -1
store i64 %8, i64* %2
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @delay_loop(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yyjscript_scan_string(char const *);
int /*<<< orphan*/ yyjscript_switch_to_buffer(int /*<<< orphan*/);
void initFlex(const char *_code) {
  yyjscript_switch_to_buffer(yyjscript_scan_string(_code));
}


x86 assembly (clang, -O0):
<initFlex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <yyjscript_scan_string@plt>
mov    %eax,%edi
call   1030 <yyjscript_switch_to_buffer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initFlex>:
push   %rax
call   1040 <yyjscript_scan_string@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <yyjscript_switch_to_buffer@plt>

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

LLVM IR (-O2):
define void @initFlex(i8* %0) {
%2 = tail call i32 @yyjscript_scan_string(i8* %0)
%3 = tail call i32 @yyjscript_switch_to_buffer(i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fread(double *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
double *malloc(int);
double *BinRead(FILE *fin, int n) {
  double *x_ptr;
  x_ptr = malloc(n * sizeof(double));
  fread(x_ptr, sizeof(double), n, fin);
  fseek(fin, 0, SEEK_SET);
  return x_ptr;
}


x86 assembly (clang, -O0):
<BinRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rcx
mov    $0x8,%esi
call   1030 <fread@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e6e(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BinRead>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
lea    0x0(,%rbx,8),%edi
call   1040 <malloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    $0x8,%esi
mov    %ebx,%edx
mov    %r14,%rcx
call   1030 <fread@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1050 <fseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
define double* @BinRead(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 8
%9 = trunc i64 %8 to i32
%10 = call double* @malloc(i32 %9)
store double* %10, double** %5
%11 = load double*, double** %5
%12 = load i32, i32* %4
%13 = load i32*, i32** %3
%14 = call i32 @fread(double* %11, i32 8, i32 %12, i32* %13)
%15 = load i32*, i32** %3
%16 = load i32, i32* @SEEK_SET
%17 = call i32 @fseek(i32* %15, i32 0, i32 %16)
%18 = load double*, double** %5
ret double* %18
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define noalias double* @BinRead(i32* nocapture %0, i32 %1) {
%3 = shl i32 %1, 3
%4 = tail call double* @malloc(i32 %3)
%5 = tail call i32 @fread(double* %4, i32 8, i32 %1, i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i32 0, i32 %6)
ret double* %4
}
/* Variables and functions */
int /*<<< orphan*/ gl_destroy_until(int /*<<< orphan*/ *);
int /*<<< orphan*/ gl_push(int /*<<< orphan*/ *);
int main() {
  gl_push(NULL);
  gl_destroy_until(NULL);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @gl_push(i32* null)
%2 = tail call i32 @gl_destroy_until(i32* null)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_usage(char *program_name) {
  printf("Usage : %s <file-path>\n", program_name);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Usage : %s <file-path>\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Usage : %s <file-path>\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}