xunge/DecIR huggingface dataset:
void rs_push(int item, int *items, int cap, int *_size) {
  int size = *_size;
  items[(cap - 1) - size] = item;
  *_size = size + 1;
}


x86 assembly (clang, -O0):
<rs_push>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
sub    -0x24(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rs_push>:
mov    (%rcx),%r8d
mov    %r8d,%eax
not    %eax
add    %edx,%eax
cltq
mov    %edi,(%rsi,%rax,4)
add    $0x1,%r8d
mov    %r8d,(%rcx)
ret

LLVM IR (-O0):
define void @rs_push(i32 %0, i32* %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%10 = load i32*, i32** %8
%11 = load i32, i32* %10
store i32 %11, i32* %9
%12 = load i32, i32* %5
%13 = load i32*, i32** %6
%14 = load i32, i32* %7
%15 = sub nsw i32 %14, 1
%16 = load i32, i32* %9
%17 = sub nsw i32 %15, %16
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %13, i64 %18
store i32 %12, i32* %19
%20 = load i32, i32* %9
%21 = add nsw i32 %20, 1
%22 = load i32*, i32** %8
store i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
define void @rs_push(i32 %0, i32* nocapture writeonly %1, i32 %2, i32* nocapture %3) {
%5 = load i32, i32* %3
%6 = xor i32 %5, -1
%7 = add i32 %6, %2
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %1, i64 %8
store i32 %0, i32* %9
%10 = add nsw i32 %5, 1
store i32 %10, i32* %3
ret void
}
void qdF(const char *x) { char *y = x; }


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

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

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

LLVM IR (-O2):
define void @qdF(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ PASS(char *);
int main(int argc, const char *argv[]) {
  PASS("template");
  return EXIT_SUCCESS;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"template\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @PASS(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@.str = [9 x i8] c"template\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @PASS(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Variables and functions */
int f43(int *);
int f44(int *p) { return f43(p); }


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

x86 assembly (clang, -O2):
<f44>:
jmp    1030 <f43@plt>

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

LLVM IR (-O2):
define i32 @f44(i32* %0) {
%2 = tail call i32 @f43(i32* %0)
ret i32 %2
}
void pre_main(void) {}


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

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

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

LLVM IR (-O2):
define void @pre_main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kd_cput(char, int /*<<< orphan*/, int);
void kd_put(char c) { kd_cput(c, 0, 7); }


x86 assembly (clang, -O0):
<kd_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %esi,%esi
mov    $0x7,%edx
movsbl -0x1(%rbp),%edi
call   1030 <kd_cput@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kd_put>:
xor    %esi,%esi
mov    $0x7,%edx
jmp    1030 <kd_cput@plt>

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

LLVM IR (-O2):
define void @kd_put(i8 signext %0) {
%2 = tail call i32 @kd_cput(i8 signext %0, i32 0, i32 7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ naive_matcher(char *, char *);
void test_naive() {
  char cs[] = "2359023141526739921";
  char ds[] = "59023141526";
  naive_matcher(cs, ds);
}


x86 assembly (clang, -O0):
<test_naive>:
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    0xedc(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xed6(%rip),%rax
mov    %rax,-0x2c(%rbp)
mov    0xed4(%rip),%eax
mov    %eax,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
call   1030 <naive_matcher@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_naive>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x313239,0x20(%rsp)
movabs $0x3134313332303935,%rax
31 34 31
mov    %rax,(%rsp)
movl   $0x363235,0x8(%rsp)
lea    0x10(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <naive_matcher@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.test_naive.cs = [20 x i8] c"2359023141526739921\00"
@__const.test_naive.ds = [12 x i8] c"59023141526\00"
define void @test_naive() {
%1 = alloca [20 x i8]
%2 = alloca [12 x i8]
%3 = bitcast [20 x i8]* %1 to i8*
%4 = bitcast [12 x i8]* %2 to i8*
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%7 = call i32 @naive_matcher(i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@__const.test_naive.cs = [20 x i8] c"2359023141526739921\00"
@__const.test_naive.ds = [12 x i8] c"59023141526\00"
define void @test_naive() {
%1 = alloca [20 x i8]
%2 = alloca [12 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%5 = call i32 @naive_matcher(i8* %3, i8* %4)
ret void
}
void flexarray_print(void **wordArray) {
  int capacity = (sizeof(wordArray) / sizeof(wordArray[0][0]));
  int i;
  for (i = 0; i < capacity; i++) {
    printf("%s\n", wordArray[i]);
  }
}


x86 assembly (clang, -O0):
<flexarray_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x8,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115e <flexarray_print+0x4e>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112a <flexarray_print+0x1a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flexarray_print>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <puts@plt>
mov    0x8(%rbx),%rdi
call   1030 <puts@plt>
mov    0x10(%rbx),%rdi
call   1030 <puts@plt>
mov    0x18(%rbx),%rdi
call   1030 <puts@plt>
mov    0x20(%rbx),%rdi
call   1030 <puts@plt>
mov    0x28(%rbx),%rdi
call   1030 <puts@plt>
mov    0x30(%rbx),%rdi
call   1030 <puts@plt>
mov    0x38(%rbx),%rdi
pop    %rbx
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
define void @flexarray_print(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @puts(i8* dereferenceable(1) %2)
%4 = getelementptr inbounds i8*, i8** %0, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
%7 = getelementptr inbounds i8*, i8** %0, i64 2
%8 = load i8*, i8** %7
%9 = tail call i32 @puts(i8* dereferenceable(1) %8)
%10 = getelementptr inbounds i8*, i8** %0, i64 3
%11 = load i8*, i8** %10
%12 = tail call i32 @puts(i8* dereferenceable(1) %11)
%13 = getelementptr inbounds i8*, i8** %0, i64 4
%14 = load i8*, i8** %13
%15 = tail call i32 @puts(i8* dereferenceable(1) %14)
%16 = getelementptr inbounds i8*, i8** %0, i64 5
%17 = load i8*, i8** %16
%18 = tail call i32 @puts(i8* dereferenceable(1) %17)
%19 = getelementptr inbounds i8*, i8** %0, i64 6
%20 = load i8*, i8** %19
%21 = tail call i32 @puts(i8* dereferenceable(1) %20)
%22 = getelementptr inbounds i8*, i8** %0, i64 7
%23 = load i8*, i8** %22
%24 = tail call i32 @puts(i8* dereferenceable(1) %23)
ret void
}
int CharIsTokenDelimiter(int ch) {
  if (ch <= 32) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<CharIsTokenDelimiter>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jg     111d <CharIsTokenDelimiter+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1124 <CharIsTokenDelimiter+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CharIsTokenDelimiter>:
xor    %eax,%eax
cmp    $0x21,%edi
setl   %al
ret

LLVM IR (-O0):
define i32 @CharIsTokenDelimiter(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 32
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @CharIsTokenDelimiter(i32 %0) {
%2 = icmp slt i32 %0, 33
%3 = zext i1 %2 to i32
ret i32 %3
}
char *optparse_longopts_arg(char *option) {
  for (; *option && *option != '='; option++)
    ;
  if (*option == '=')
    return option + 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<optparse_longopts_arg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     112d <optparse_longopts_arg+0x2d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    113d <optparse_longopts_arg+0x3d>
jmp    1153 <optparse_longopts_arg+0x53>
jmp    1142 <optparse_longopts_arg+0x42>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <optparse_longopts_arg+0x8>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
jne    1174 <optparse_longopts_arg+0x74>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    117c <optparse_longopts_arg+0x7c>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<optparse_longopts_arg>:
add    $0x1,%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl -0x1(%rdi),%ecx
test   %cl,%cl
je     1123 <optparse_longopts_arg+0x23>
cmp    $0x3d,%cl
je     1123 <optparse_longopts_arg+0x23>
add    $0x1,%rdi
jmp    1110 <optparse_longopts_arg+0x10>
xor    %eax,%eax
cmp    $0x3d,%cl
cmove  %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @optparse_longopts_arg(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 61, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
%8 = icmp eq i8 %4, 61
%9 = getelementptr inbounds i8, i8* %3, i64 1
%10 = select i1 %8, i8* %9, i8* null
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ SuperDelay();
void masterReset() {
  *(volatile unsigned int *)(0xFFFFFFE0 + 0x0C) = 64;
  SuperDelay();
}


x86 assembly (clang, -O0):
<masterReset>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffec,%eax
movl   $0x40,(%rax)
mov    $0x0,%al
call   1030 <SuperDelay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<masterReset>:
mov    $0xffffffec,%eax
movl   $0x40,(%rax)
xor    %eax,%eax
jmp    1030 <SuperDelay@plt>

LLVM IR (-O0):
define void @masterReset() {
store volatile i32 64, i32* inttoptr (i64 4294967276 to i32*)
%1 = call i32 (...) @SuperDelay()
ret void
}

LLVM IR (-O2):
define void @masterReset() {
store volatile i32 64, i32* inttoptr (i64 4294967276 to i32*)
%1 = tail call i32 (...) @SuperDelay()
ret void
}
/* Type definitions */
struct _citrus_lookup {
  int dummy;
};

/* Variables and functions */
scalar_t__ seq_next_plain(struct _citrus_lookup *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *);
int seq_get_num_entries_plain(struct _citrus_lookup *cl) {
  int num;
  num = 0;
  while (seq_next_plain(cl, NULL, NULL) == 0)
    num++;
  return num;
}


x86 assembly (clang, -O0):
<seq_get_num_entries_plain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1030 <seq_next_plain@plt>
cmp    $0x0,%rax
jne    114b <seq_get_num_entries_plain+0x3b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <seq_get_num_entries_plain+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_get_num_entries_plain>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0xffffffff,%ebx
nopl   0x0(%rax)
mov    %r14,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <seq_next_plain@plt>
add    $0x1,%ebx
test   %rax,%rax
je     1120 <seq_get_num_entries_plain+0x10>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct._citrus_lookup = type { i32 }
define i32 @seq_get_num_entries_plain(%struct._citrus_lookup* %0) {
%2 = alloca %struct._citrus_lookup*
%3 = alloca i32
store %struct._citrus_lookup* %0, %struct._citrus_lookup** %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load %struct._citrus_lookup*, %struct._citrus_lookup** %2
%6 = call i64 @seq_next_plain(%struct._citrus_lookup* %5, i32* null, i32* null)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
br label %4
11: ; preds = %4
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
%struct._citrus_lookup = type { i32 }
define i32 @seq_get_num_entries_plain(%struct._citrus_lookup* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %6, %2 ]
%4 = tail call i64 @seq_next_plain(%struct._citrus_lookup* %0, i32* null, i32* null)
%5 = icmp eq i64 %4, 0
%6 = add nuw nsw i32 %3, 1
br i1 %5, label %2, label %7
7: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int ast_hashtab_compare_strings_nocase(const void *a, const void *b) {
  return strcasecmp((const char *)a, (const char *)b);
}


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

x86 assembly (clang, -O2):
<ast_hashtab_compare_strings_nocase>:
jmp    1030 <strcasecmp@plt>

LLVM IR (-O0):
define i32 @ast_hashtab_compare_strings_nocase(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 = load i8*, i8** %4
%7 = call i32 @strcasecmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @ast_hashtab_compare_strings_nocase(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcasecmp(i8* %0, i8* %1)
ret i32 %3
}
/* Type definitions */
struct genlist_link {
  int dummy;
};
struct entry_list_link {
  int dummy;
};
struct entry {
  int dummy;
};

/* Variables and functions */
scalar_t__ genlist_link_data(struct genlist_link const *);
struct entry *entry_list_link_data(const struct entry_list_link *plink) {
  return (
      (struct entry *)genlist_link_data((const struct genlist_link *)plink));
}


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

x86 assembly (clang, -O2):
<entry_list_link_data>:
jmp    1030 <genlist_link_data@plt>

LLVM IR (-O0):
%struct.entry = type { i32 }
%struct.entry_list_link = type { i32 }
%struct.genlist_link = type { i32 }
define %struct.entry* @entry_list_link_data(%struct.entry_list_link* %0) {
%2 = alloca %struct.entry_list_link*
store %struct.entry_list_link* %0, %struct.entry_list_link** %2
%3 = load %struct.entry_list_link*, %struct.entry_list_link** %2
%4 = bitcast %struct.entry_list_link* %3 to %struct.genlist_link*
%5 = call i64 @genlist_link_data(%struct.genlist_link* %4)
%6 = inttoptr i64 %5 to %struct.entry*
ret %struct.entry* %6
}

LLVM IR (-O2):
%struct.entry = type { i32 }
%struct.entry_list_link = type { i32 }
%struct.genlist_link = type { i32 }
define %struct.entry* @entry_list_link_data(%struct.entry_list_link* %0) {
%2 = bitcast %struct.entry_list_link* %0 to %struct.genlist_link*
%3 = tail call i64 @genlist_link_data(%struct.genlist_link* %2)
%4 = inttoptr i64 %3 to %struct.entry*
ret %struct.entry* %4
}
/* Variables and functions */
char *strchr(char *, int);
int strlen(char *);
char *xstrchrnul(char *s, int c) {
  char *r = strchr(s, c);
  if (r)
    return r;
  return (char *)s + strlen(s);
}


x86 assembly (clang, -O0):
<xstrchrnul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1157 <xstrchrnul+0x37>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <xstrchrnul+0x58>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrchrnul>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strchr@plt>
test   %rax,%rax
je     1130 <xstrchrnul+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @xstrchrnul(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = call i8* @strchr(i8* %7, i32 %8)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i8*, i8** %6
store i8* %13, i8** %3
br label %20
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = load i8*, i8** %4
%17 = call i32 @strlen(i8* %16)
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %15, i64 %18
store i8* %19, i8** %3
br label %20
20: ; preds = %14, %12
%21 = load i8*, i8** %3
ret i8* %21
}

LLVM IR (-O2):
define i8* @xstrchrnul(i8* %0, i32 %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @strlen(i8* %0)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
br label %9
9: ; preds = %2, %5
%10 = phi i8* [ %8, %5 ], [ %3, %2 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char toupper(char);
int fn_arg_char_ptr(char *str) {
  printf("passed value is %s\n", str);
  char *ptr = NULL;
  for (ptr = str; *ptr; ptr++)
    *ptr = toupper(*ptr);
  return 0;
}


x86 assembly (clang, -O0):
<fn_arg_char_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     117e <fn_arg_char_ptr+0x5e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    114c <fn_arg_char_ptr+0x2c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_arg_char_ptr>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    (%rbx),%al
test   %al,%al
je     1156 <fn_arg_char_ptr+0x36>
add    $0x1,%rbx
nopl   (%rax)
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1140 <fn_arg_char_ptr+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"passed value is %s\0A\00"
define i32 @fn_arg_char_ptr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %4)
store i8* null, i8** %3
%6 = load i8*, i8** %2
store i8* %6, i8** %3
br label %7
7: ; preds = %16, %1
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %19
11: ; preds = %7
%12 = load i8*, i8** %3
%13 = load i8, i8* %12
%14 = call signext i8 @toupper(i8 signext %13)
%15 = load i8*, i8** %3
store i8 %14, i8* %15
br label %16
16: ; preds = %11
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %3
br label %7
19: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"passed value is %s\0A\00"
define i32 @fn_arg_char_ptr(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %1, %5
%6 = phi i8 [ %10, %5 ], [ %3, %1 ]
%7 = phi i8* [ %9, %5 ], [ %0, %1 ]
%8 = tail call signext i8 @toupper(i8 signext %6)
store i8 %8, i8* %7
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %1
ret i32 0
}
/* Variables and functions */
size_t strlen(const char *p) {
  const char *e = p;
  while (*e++)
    ;
  return e - p - 1;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,(%rax)
je     112d <strlen+0x2d>
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

LLVM IR (-O0):
define i64 @strlen(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 = %10, %1
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %3
%8 = load i8, i8* %6
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %5
br label %5
11: ; preds = %5
%12 = load i8*, i8** %3
%13 = load i8*, i8** %2
%14 = ptrtoint i8* %12 to i64
%15 = ptrtoint i8* %13 to i64
%16 = sub i64 %14, %15
%17 = sub nsw i64 %16, 1
ret i64 %17
}

LLVM IR (-O2):
define i64 @strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %4 to i64
%9 = ptrtoint i8* %0 to i64
%10 = xor i64 %9, -1
%11 = add i64 %8, %10
ret i64 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ mpz_init(int /*<<< orphan*/);
extern void ZINIT(mpz_t *z, char *format, ...) {
  mpz_init(*z);
  ;
}


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

x86 assembly (clang, -O2):
<ZINIT>:
mov    (%rdi),%edi
jmp    1030 <mpz_init@plt>

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

LLVM IR (-O2):
define void @ZINIT(i32* nocapture %0, i8* nocapture readnone %1, ...) {
%3 = load i32, i32* %0
%4 = tail call i32 @mpz_init(i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int8_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int8_t stdlib_ndarray_set_ptr_int16(uint8_t *idx, const int16_t v) {
  *(int16_t *)idx = v;
  return 0;
}


x86 assembly (clang, -O0):
<stdlib_ndarray_set_ptr_int16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_ndarray_set_ptr_int16>:
mov    %esi,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @stdlib_ndarray_set_ptr_int16(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret i32 0
}
/* Variables and functions */
int printw(char const *, long);
int l_printw(const char *fmt, long i) { return (printw(fmt, i)); }


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

x86 assembly (clang, -O2):
<l_printw>:
jmp    1030 <printw@plt>

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

LLVM IR (-O2):
define i32 @l_printw(i8* %0, i64 %1) {
%3 = tail call i32 @printw(i8* %0, i64 %1)
ret i32 %3
}
/* Variables and functions */
double atof(char const *);
double c_atof(const char *arg0) { return atof(arg0); }


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

x86 assembly (clang, -O2):
<c_atof>:
jmp    1030 <atof@plt>

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

LLVM IR (-O2):
define double @c_atof(i8* nocapture %0) {
%2 = tail call double @atof(i8* %0)
ret double %2
}
int cmpfunc(const void *a, const void *b) {
  if (*(int *)b > *(int *)a) {
    return -1;
  } else if (*(int *)b < *(int *)a) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<cmpfunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jle    112a <cmpfunc+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1154 <cmpfunc+0x54>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    1148 <cmpfunc+0x48>
movl   $0x1,-0x4(%rbp)
jmp    1154 <cmpfunc+0x54>
jmp    114d <cmpfunc+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpfunc>:
mov    (%rsi),%eax
xor    %ecx,%ecx
cmp    (%rdi),%eax
setl   %cl
mov    $0xffffffff,%eax
cmovle %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cmpfunc(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%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 = icmp sgt i32 %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %25
14: ; preds = %2
%15 = load i8*, i8** %5
%16 = bitcast i8* %15 to i32*
%17 = load i32, i32* %16
%18 = load i8*, i8** %4
%19 = bitcast i8* %18 to i32*
%20 = load i32, i32* %19
%21 = icmp slt i32 %17, %20
br i1 %21, label %22, label %23
22: ; preds = %14
store i32 1, i32* %3
br label %25
23: ; preds = %14
br label %24
24: ; preds = %23
store i32 0, i32* %3
br label %25
25: ; preds = %24, %22, %13
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @cmpfunc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = icmp sgt i32 %4, %6
%8 = icmp slt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float stdlib_strided_ssumpw(int, 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_ssumpw(N, x, stride);
  printf("sum: %f\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%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
call   1040 <stdlib_strided_ssumpw@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_ssumpw@plt>
lea    0xecc(%rip),%rdi
call   1030 <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 = [9 x i8] c"sum: %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_ssumpw(i32 %6, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 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 = [9 x i8] c"sum: %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_ssumpw(i32 4, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int MPI_Abort(int comm, int errorcode) {
  exit(1);
  return 0;
}


x86 assembly (clang, -O0):
<MPI_Abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<MPI_Abort>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @MPI_Abort(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define i32 @MPI_Abort(i32 %0, i32 %1) {
%3 = tail call i32 @exit(i32 1)
unreachable
}
int main() {
  unsigned short value = 0;
  __asm__("pushw $0x1234; popw %0" : "=r"(value));
  return value == 0x1234;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movw   $0x0,-0x6(%rbp)
pushw  $0x1234
pop    %ax
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%eax
cmp    $0x1234,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
pushw  $0x1234
pop    %ax
movzwl %ax,%ecx
xor    %eax,%eax
cmp    $0x1234,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
store i32 0, i32* %1
store i16 0, i16* %2
%3 = call i16 asm "pushw $$0x1234; popw $0", "=r,~{dirflag},~{fpsr},~{flags}"()
store i16 %3, i16* %2
%4 = load i16, i16* %2
%5 = zext i16 %4 to i32
%6 = icmp eq i32 %5, 4660
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i16 asm "pushw $$0x1234; popw $0", "=r,~{dirflag},~{fpsr},~{flags}"()
%2 = icmp eq i16 %1, 4660
%3 = zext i1 %2 to i32
ret i32 %3
}
float __mulsf3(float a __attribute__((unused)),
               float b __attribute__((unused))) {
  return 0.0;
}


x86 assembly (clang, -O0):
<__mulsf3>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @__mulsf3(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @__mulsf3(float %0, float %1) {
ret float 0.000000e+00
}
/* Type definitions */
struct wl_touch {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
void *wl_proxy_get_user_data(struct wl_proxy *);
void *wl_touch_get_user_data(struct wl_touch *wl_touch) {
  return wl_proxy_get_user_data((struct wl_proxy *)wl_touch);
}


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

x86 assembly (clang, -O2):
<wl_touch_get_user_data>:
jmp    1030 <wl_proxy_get_user_data@plt>

LLVM IR (-O0):
%struct.wl_touch = type { i32 }
%struct.wl_proxy = type { i32 }
define i8* @wl_touch_get_user_data(%struct.wl_touch* %0) {
%2 = alloca %struct.wl_touch*
store %struct.wl_touch* %0, %struct.wl_touch** %2
%3 = load %struct.wl_touch*, %struct.wl_touch** %2
%4 = bitcast %struct.wl_touch* %3 to %struct.wl_proxy*
%5 = call i8* @wl_proxy_get_user_data(%struct.wl_proxy* %4)
ret i8* %5
}

LLVM IR (-O2):
%struct.wl_touch = type { i32 }
%struct.wl_proxy = type { i32 }
define i8* @wl_touch_get_user_data(%struct.wl_touch* %0) {
%2 = bitcast %struct.wl_touch* %0 to %struct.wl_proxy*
%3 = tail call i8* @wl_proxy_get_user_data(%struct.wl_proxy* %2)
ret i8* %3
}
/* Variables and functions */
int g(int);
int f(int x) {
  if (x <= 0)
    return 0;
  else
    return g(x) + g(x + 1);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1131 <f+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1151 <f+0x41>
mov    -0x8(%rbp),%edi
call   1030 <g@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
add    $0x1,%edi
call   1030 <g@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
test   %edi,%edi
jle    1133 <f+0x23>
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <g@plt>
mov    %eax,%ebp
add    $0x1,%ebx
mov    %ebx,%edi
call   1030 <g@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 @g(i32 %0)
%5 = add nuw nsw i32 %0, 1
%6 = tail call i32 @g(i32 %5)
%7 = add nsw i32 %6, %4
br label %8
8: ; preds = %1, %3
%9 = phi i32 [ %7, %3 ], [ 0, %1 ]
ret i32 %9
}
int test_imm_64int16_reg(short val) {
  return ((val) & (-0x64 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_64int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff9c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_64int16_reg>:
test   $0xff9c,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_64int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -100
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_64int16_reg(i16 signext %0) {
%2 = and i16 %0, -100
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_epi64(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_mul_epu32(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_slli_epi64(int /*<<< orphan*/, int);
__m128i fBlaMka(__m128i x, __m128i y) {
  __m128i z = _mm_mul_epu32(x, y);
  z = _mm_slli_epi64(z, 1);
  z = _mm_add_epi64(z, x);
  z = _mm_add_epi64(z, y);
  return z;
}


x86 assembly (clang, -O0):
<fBlaMka>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_mul_epu32@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x1,%esi
call   1050 <_mm_slli_epi64@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1040 <_mm_add_epi64@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <_mm_add_epi64@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fBlaMka>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <_mm_mul_epu32@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1050 <_mm_slli_epi64@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1040 <_mm_add_epi64@plt>
mov    %eax,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <_mm_add_epi64@plt>

LLVM IR (-O0):
define i32 @fBlaMka(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @_mm_mul_epu32(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = call i32 @_mm_slli_epi64(i32 %9, i32 1)
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = load i32, i32* %3
%13 = call i32 @_mm_add_epi64(i32 %11, i32 %12)
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = call i32 @_mm_add_epi64(i32 %14, i32 %15)
store i32 %16, i32* %5
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
define i32 @fBlaMka(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_mul_epu32(i32 %0, i32 %1)
%4 = tail call i32 @_mm_slli_epi64(i32 %3, i32 1)
%5 = tail call i32 @_mm_add_epi64(i32 %4, i32 %0)
%6 = tail call i32 @_mm_add_epi64(i32 %5, i32 %1)
ret i32 %6
}
void RTBldCfgCompiler(void) {}


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

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

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

LLVM IR (-O2):
define void @RTBldCfgCompiler() {
ret void
}
void d_putsl(register unsigned char *ptr, register signed long data) {
  *ptr++ = ((unsigned long)data & 0xff000000UL) >> 24;
  *ptr++ = ((unsigned long)data & 0x00ff0000UL) >> 16;
  *ptr++ = ((unsigned long)data & 0x0000ff00UL) >> 8;
  *ptr = ((unsigned long)data & 0x000000ffUL) >> 0;
}


x86 assembly (clang, -O0):
<d_putsl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movabs $0xff000000,%rax
and    -0x10(%rbp),%rax
shr    $0x18,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
and    $0xff0000,%rax
shr    $0x10,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
and    $0xff00,%rax
shr    $0x8,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
shr    $0x0,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_putsl>:
bswap  %esi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @d_putsl(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = and i64 %5, 4278190080
%7 = lshr i64 %6, 24
%8 = trunc i64 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %3
store i8 %8, i8* %9
%11 = load i64, i64* %4
%12 = and i64 %11, 16711680
%13 = lshr i64 %12, 16
%14 = trunc i64 %13 to i8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
store i8 %14, i8* %15
%17 = load i64, i64* %4
%18 = and i64 %17, 65280
%19 = lshr i64 %18, 8
%20 = trunc i64 %19 to i8
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
store i8 %20, i8* %21
%23 = load i64, i64* %4
%24 = and i64 %23, 255
%25 = lshr i64 %24, 0
%26 = trunc i64 %25 to i8
%27 = load i8*, i8** %3
store i8 %26, i8* %27
ret void
}

LLVM IR (-O2):
define void @d_putsl(i8* nocapture writeonly %0, i64 %1) {
%3 = lshr i64 %1, 24
%4 = trunc i64 %3 to i8
%5 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %4, i8* %0
%6 = lshr i64 %1, 16
%7 = trunc i64 %6 to i8
%8 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %7, i8* %5
%9 = lshr i64 %1, 8
%10 = trunc i64 %9 to i8
%11 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %10, i8* %8
%12 = trunc i64 %1 to i8
store i8 %12, i8* %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ interrupt_hw_handler(int /*<<< orphan*/);
void _critical_input() { interrupt_hw_handler(0); }


x86 assembly (clang, -O0):
<_critical_input>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <interrupt_hw_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_critical_input>:
xor    %edi,%edi
jmp    1030 <interrupt_hw_handler@plt>

LLVM IR (-O0):
define void @_critical_input() {
%1 = call i32 @interrupt_hw_handler(i32 0)
ret void
}

LLVM IR (-O2):
define void @_critical_input() {
%1 = tail call i32 @interrupt_hw_handler(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, int /*<<< orphan*/);
void _log(char *c) { die(c, 0); }


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

x86 assembly (clang, -O2):
<_log>:
xor    %esi,%esi
jmp    1030 <die@plt>

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

LLVM IR (-O2):
define void @_log(i8* %0) {
%2 = tail call i32 @die(i8* %0, i32 0)
ret void
}
int clock_get_freq(void) { return 16000000; }


x86 assembly (clang, -O0):
<clock_get_freq>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf42400,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock_get_freq>:
mov    $0xf42400,%eax
ret

LLVM IR (-O0):
define i32 @clock_get_freq() {
ret i32 16000000
}

LLVM IR (-O2):
define i32 @clock_get_freq() {
ret i32 16000000
}
/* Variables and functions */
int /*<<< orphan*/ init(char *);
int ok();
int /*<<< orphan*/ test();
int main() {
  init("for loop");
  test();
  return ok();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <init@plt>
mov    $0x0,%al
call   1050 <test@plt>
mov    $0x0,%al
call   1030 <ok@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <init@plt>
xor    %eax,%eax
call   1050 <test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ok@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"for loop\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @init(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test()
%4 = call i32 (...) @ok()
ret i32 %4
}

LLVM IR (-O2):
@.str = [9 x i8] c"for loop\00"
define i32 @main() {
%1 = tail call i32 @init(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test()
%3 = tail call i32 (...) @ok()
ret i32 %3
}