xunge/DecIR huggingface dataset:
void bfqg_stats_update_io_merged(struct bfq_group *bfqg, int op, int op_flags) {
}


x86 assembly (clang, -O0):
<bfqg_stats_update_io_merged>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.bfq_group = type opaque
define void @bfqg_stats_update_io_merged(%struct.bfq_group* %0, i32 %1, i32 %2) {
%4 = alloca %struct.bfq_group*
%5 = alloca i32
%6 = alloca i32
store %struct.bfq_group* %0, %struct.bfq_group** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.bfq_group = type opaque
define void @bfqg_stats_update_io_merged(%struct.bfq_group* nocapture %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
char *stpcpy(char *, char *);
int main(void) {
  char buffer[10];
  char *to = buffer;
  to = stpcpy(to, "foo");
  to = stpcpy(to, "bar");
  puts(buffer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xe(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xebe(%rip),%rsi
call   1040 <stpcpy@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1040 <stpcpy@plt>
mov    %rax,-0x18(%rbp)
lea    -0xe(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x6f6f66,0xc(%rsp)
movl   $0x726162,0xf(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"foo\00"
@.str.1 = [4 x i8] c"bar\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @stpcpy(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i8* @stpcpy(i8* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i8* %8, i8** %3
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%10 = call i32 @puts(i8* %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 3
%4 = bitcast [10 x i8]* %1 to i32*
store i32 7303014, i32* %4
%5 = bitcast i8* %3 to i32*
store i32 7496034, i32* %5
%6 = call i32 @puts(i8* %2)
ret i32 0
}
void XInternAtom() {}


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

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

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

LLVM IR (-O2):
define void @XInternAtom() {
ret void
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int offset(int, int /*<<< orphan*/, int, int);
int owl_eyespace(int, int);
int autohelperowl_vital_apat15(struct pattern *patt, int transformation,
                               int move, int color, int action) {
  int A;
  (void)patt;
  (void)color;
  (void)action;
  A = offset(-1, 0, move, transformation);
  return owl_eyespace(move, A);
}


x86 assembly (clang, -O0):
<autohelperowl_vital_apat15>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1040 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1030 <owl_eyespace@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_vital_apat15>:
push   %rbx
mov    %edx,%ebx
mov    %esi,%ecx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1040 <offset@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <owl_eyespace@plt>

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_vital_apat15(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 -1, i32 0, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %8
%19 = load i32, i32* %11
%20 = call i32 @owl_eyespace(i32 %18, i32 %19)
ret i32 %20
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_vital_apat15(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 -1, i32 0, i32 %2, i32 %1)
%7 = tail call i32 @owl_eyespace(i32 %2, i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ R_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
int file_readable(char *path) { return access(path, R_OK) == 0; }


x86 assembly (clang, -O0):
<file_readable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_readable>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@R_OK = global i32 0
define i32 @file_readable(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @R_OK
%5 = call i64 @access(i8* %3, i32 %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@R_OK = global i32 0
define i32 @file_readable(i8* nocapture %0) {
%2 = load i32, i32* @R_OK
%3 = tail call i64 @access(i8* %0, i32 %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
scalar_t__ validatey(int);
int validate(int x, int y) {
  int ret = 0, i;
  for (i = x; i < y; i++) {
    if (validatey(i)) {
      ret = i;
      break;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<validate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1167 <validate+0x57>
mov    -0x10(%rbp),%edi
call   1030 <validatey@plt>
cmp    $0x0,%rax
je     1154 <validate+0x44>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1167 <validate+0x57>
jmp    1159 <validate+0x49>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112b <validate+0x1b>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate>:
push   %rbp
push   %r14
push   %rbx
xor    %r14d,%r14d
cmp    %esi,%edi
jge    1138 <validate+0x28>
mov    %esi,%ebx
mov    %edi,%ebp
nop
mov    %ebp,%edi
call   1030 <validatey@plt>
test   %rax,%rax
jne    1135 <validate+0x25>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1120 <validate+0x10>
jmp    1138 <validate+0x28>
mov    %ebp,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @validate(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
br i1 %3, label %4, label %11
4: ; preds = %2, %8
%5 = phi i32 [ %9, %8 ], [ %0, %2 ]
%6 = tail call i64 @validatey(i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = add nsw i32 %5, 1
%10 = icmp eq i32 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %8, %4, %2
%12 = phi i32 [ 0, %2 ], [ %5, %4 ], [ 0, %8 ]
ret i32 %12
}
char *ngettext(const char *msgid1, const char *msgid2, unsigned long int n) {
  return (char *)((n == 1) ? msgid1 : msgid2);
}


x86 assembly (clang, -O0):
<ngettext>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x1,-0x18(%rbp)
jne    1128 <ngettext+0x28>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1130 <ngettext+0x30>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ngettext>:
mov    %rdi,%rax
cmp    $0x1,%rdx
cmovne %rsi,%rax
ret

LLVM IR (-O0):
define i8* @ngettext(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = icmp eq i64 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = load i8*, i8** %4
br label %13
11: ; preds = %3
%12 = load i8*, i8** %5
br label %13
13: ; preds = %11, %9
%14 = phi i8* [ %10, %9 ], [ %12, %11 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @ngettext(i8* readnone %0, i8* readnone %1, i64 %2) {
%4 = icmp eq i64 %2, 1
%5 = select i1 %4, i8* %0, i8* %1
ret i8* %5
}
/* Variables and functions */
scalar_t__ strtol(char *, char **, int);
char *parseInt(char *s, int *ip) {
  char *endp;
  *ip = (int)strtol(s, &endp, 10);
  if (s == endp)
    return 0;
  else
    return endp;
}


x86 assembly (clang, -O0):
<parseInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jne    1155 <parseInt+0x45>
movq   $0x0,-0x8(%rbp)
jmp    115d <parseInt+0x4d>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseInt>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,(%r14)
mov    (%rsp),%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
cmovne %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @parseInt(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 = call i64 @strtol(i8* %7, i8** %6, i32 10)
%9 = trunc i64 %8 to i32
%10 = load i32*, i32** %5
store i32 %9, i32* %10
%11 = load i8*, i8** %4
%12 = load i8*, i8** %6
%13 = icmp eq i8* %11, %12
br i1 %13, label %14, label %15
14: ; preds = %2
store i8* null, i8** %3
br label %17
15: ; preds = %2
%16 = load i8*, i8** %6
store i8* %16, i8** %3
br label %17
17: ; preds = %15, %14
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
define i8* @parseInt(i8* %0, i32* nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i64 @strtol(i8* %0, i8** %3, i32 10)
%6 = trunc i64 %5 to i32
store i32 %6, i32* %1
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, %0
%9 = select i1 %8, i8* null, i8* %7
ret i8* %9
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int pthread_attr_setguardsize(pthread_attr_t *a, size_t b) { assert(0); }


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

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

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

LLVM IR (-O2):
define i32 @pthread_attr_setguardsize(i32* nocapture readnone %0, i64 %1) {
%3 = tail call i32 @assert(i32 0)
ret i32 undef
}
char int_to_base(int b) {
  if (b == 0)
    return 'A';
  else if (b == 1)
    return 'C';
  else if (b == 2)
    return 'G';
  else
    return 'T';
}


x86 assembly (clang, -O0):
<int_to_base>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111a <int_to_base+0x1a>
movb   $0x41,-0x1(%rbp)
jmp    1144 <int_to_base+0x44>
cmpl   $0x1,-0x8(%rbp)
jne    112d <int_to_base+0x2d>
movb   $0x43,-0x1(%rbp)
jmp    1144 <int_to_base+0x44>
cmpl   $0x2,-0x8(%rbp)
jne    1140 <int_to_base+0x40>
movb   $0x47,-0x1(%rbp)
jmp    1144 <int_to_base+0x44>
movb   $0x54,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_to_base>:
lea    0x0(,%rdi,8),%ecx
mov    $0x474341,%edx
shr    %cl,%edx
cmp    $0x3,%edi
mov    $0x54,%eax
cmovb  %edx,%eax
ret

LLVM IR (-O0):
define signext i8 @int_to_base(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8 65, i8* %2
br label %16
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %7
store i8 67, i8* %2
br label %16
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 2
br i1 %13, label %14, label %15
14: ; preds = %11
store i8 71, i8* %2
br label %16
15: ; preds = %11
store i8 84, i8* %2
br label %16
16: ; preds = %15, %14, %10, %6
%17 = load i8, i8* %2
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @int_to_base(i32 %0) {
%2 = icmp ult i32 %0, 3
%3 = trunc i32 %0 to i24
%4 = shl i24 %3, 3
%5 = lshr i24 4670273, %4
%6 = trunc i24 %5 to i8
%7 = select i1 %2, i8 %6, i8 84
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printmatch(char match[]) { printf("%s", match); }


x86 assembly (clang, -O0):
<printmatch>:
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):
<printmatch>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @printmatch(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void expect_fault_on_read_execonly_key(void *p1, int pkey) { return; }


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

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

LLVM IR (-O0):
define void @expect_fault_on_read_execonly_key(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @expect_fault_on_read_execonly_key(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
double __ocml_floor_f64(double);
double floor(double x) { return __ocml_floor_f64(x); }


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

x86 assembly (clang, -O2):
<floor>:
jmp    1030 <__ocml_floor_f64@plt>

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

LLVM IR (-O2):
define double @floor(double %0) {
%2 = tail call double @__ocml_floor_f64(double %0)
ret double %2
}
__if_exists(Type) { int var23; }


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

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

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

LLVM IR (-O2):
define i32 @__if_exists(i32 %0) {
ret i32 undef
}
/* Variables and functions */
double RAND_MAX;
double rand();
float frand() { return (rand() + 1.0) / (RAND_MAX + 1.0); }


x86 assembly (clang, -O0):
<frand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
movsd  0xedd(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xed1(%rip),%xmm1
mov    0x2eb2(%rip),%rax
addsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<frand>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
movsd  0xee0(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    0x2ebd(%rip),%rax
addsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define float @frand() {
%1 = call double (...) @rand()
%2 = fadd double %1, 1.000000e+00
%3 = load double, double* @RAND_MAX
%4 = fadd double %3, 1.000000e+00
%5 = fdiv double %2, %4
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define float @frand() {
%1 = tail call double (...) @rand()
%2 = fadd double %1, 1.000000e+00
%3 = load double, double* @RAND_MAX
%4 = fadd double %3, 1.000000e+00
%5 = fdiv double %2, %4
%6 = fptrunc double %5 to float
ret float %6
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ isolate_lowest_set(scalar_t__);
int is_power_of_two_non_zero(uint32_t x) { return isolate_lowest_set(x) == x; }


x86 assembly (clang, -O0):
<is_power_of_two_non_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <isolate_lowest_set@plt>
cmp    -0x8(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_power_of_two_non_zero>:
push   %rbx
mov    %rdi,%rbx
call   1030 <isolate_lowest_set@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_power_of_two_non_zero(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @isolate_lowest_set(i64 %3)
%5 = load i64, i64* %2
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_power_of_two_non_zero(i64 %0) {
%2 = tail call i64 @isolate_lowest_set(i64 %0)
%3 = icmp eq i64 %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
void setint(arrayptr, num_cols, row, col, value) int *arrayptr;
short num_cols;
short row, col;
int value;
{
  int position;
  position = row * num_cols + col;
  *(arrayptr + position) = value;
}


x86 assembly (clang, -O0):
<setint>:
push   %rbp
mov    %rsp,%rbp
mov    %ecx,%eax
mov    %edx,%ecx
mov    %si,%dx
mov    %rdi,-0x8(%rbp)
mov    %dx,-0xa(%rbp)
mov    %cx,-0xc(%rbp)
mov    %ax,-0xe(%rbp)
mov    %r8d,-0x14(%rbp)
movswl -0xc(%rbp),%eax
movswl -0xa(%rbp),%ecx
imul   %ecx,%eax
movswl -0xe(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setint>:
movswl %dx,%eax
movswl %si,%edx
imul   %eax,%edx
movswl %cx,%eax
add    %edx,%eax
cltq
mov    %r8d,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @setint(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i16
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = trunc i32 %1 to i16
%13 = trunc i32 %2 to i16
%14 = trunc i32 %3 to i16
store i32* %0, i32** %6
store i16 %12, i16* %7
store i16 %13, i16* %8
store i16 %14, i16* %9
store i32 %4, i32* %10
%15 = load i16, i16* %8
%16 = sext i16 %15 to i32
%17 = load i16, i16* %7
%18 = sext i16 %17 to i32
%19 = mul nsw i32 %16, %18
%20 = load i16, i16* %9
%21 = sext i16 %20 to i32
%22 = add nsw i32 %19, %21
store i32 %22, i32* %11
%23 = load i32, i32* %10
%24 = load i32*, i32** %6
%25 = load i32, i32* %11
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %24, i64 %26
store i32 %23, i32* %27
ret void
}

LLVM IR (-O2):
define void @setint(i32* nocapture writeonly %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = shl i32 %2, 16
%7 = ashr exact i32 %6, 16
%8 = shl i32 %1, 16
%9 = ashr exact i32 %8, 16
%10 = mul nsw i32 %7, %9
%11 = shl i32 %3, 16
%12 = ashr exact i32 %11, 16
%13 = add nsw i32 %10, %12
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %0, i64 %14
store i32 %4, i32* %15
ret void
}
void X509_keyid_get0(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_keyid_get0() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int /*<<< orphan*/ iswdigit(int /*<<< orphan*/);
void uninitvar_iswdigit(void) {
  wint_t i;
  (void)iswdigit(i);
}


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

x86 assembly (clang, -O2):
<uninitvar_iswdigit>:
jmp    1030 <iswdigit@plt>

LLVM IR (-O0):
define void @uninitvar_iswdigit() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = call i32 @iswdigit(i32 %2)
ret void
}

LLVM IR (-O2):
define void @uninitvar_iswdigit() {
%1 = tail call i32 @iswdigit(i32 undef)
ret void
}
/* Variables and functions */
int toRep(float);
int __unordsf2(float a, float b) {
  const unsigned aAbs =
      toRep(a) & (((1) << (23 + ((sizeof(unsigned) * 8) - 23 - 1))) - 1U);
  const unsigned bAbs =
      toRep(b) & (((1) << (23 + ((sizeof(unsigned) * 8) - 23 - 1))) - 1U);
  return aAbs > ((((1) << (23 + ((sizeof(unsigned) * 8) - 23 - 1))) - 1U) ^
                 (((1) << 23) - 1U)) ||
         bAbs > ((((1) << (23 + ((sizeof(unsigned) * 8) - 23 - 1))) - 1U) ^
                 (((1) << 23) - 1U));
}


x86 assembly (clang, -O0):
<__unordsf2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <toRep@plt>
and    $0x7fffffff,%eax
mov    %eax,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <toRep@plt>
and    $0x7fffffff,%eax
mov    %eax,-0x10(%rbp)
mov    $0x1,%al
cmpl   $0x7f800000,-0xc(%rbp)
mov    %al,-0x11(%rbp)
ja     1165 <__unordsf2+0x55>
cmpl   $0x7f800000,-0x10(%rbp)
seta   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__unordsf2>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0xc(%rsp)
call   1030 <toRep@plt>
mov    %eax,%ebx
and    $0x7fffffff,%ebx
movss  0xc(%rsp),%xmm0
call   1030 <toRep@plt>
and    $0x7fffffff,%eax
cmp    $0x7f800001,%ebx
setae  %cl
cmp    $0x7f800001,%eax
setae  %al
or     %cl,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__unordsf2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i32
%6 = alloca i32
store float %0, float* %3
store float %1, float* %4
%7 = load float, float* %3
%8 = call i32 @toRep(float %7)
%9 = and i32 %8, 2147483647
store i32 %9, i32* %5
%10 = load float, float* %4
%11 = call i32 @toRep(float %10)
%12 = and i32 %11, 2147483647
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = icmp ugt i32 %13, 2139095040
br i1 %14, label %18, label %15
15: ; preds = %2
%16 = load i32, i32* %6
%17 = icmp ugt i32 %16, 2139095040
br label %18
18: ; preds = %15, %2
%19 = phi i1 [ true, %2 ], [ %17, %15 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @__unordsf2(float %0, float %1) {
%3 = tail call i32 @toRep(float %0)
%4 = and i32 %3, 2147483647
%5 = tail call i32 @toRep(float %1)
%6 = and i32 %5, 2147483647
%7 = icmp ugt i32 %4, 2139095040
%8 = icmp ugt i32 %6, 2139095040
%9 = select i1 %7, i1 true, i1 %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage:\n"
         "action: LOCK/LOCKWAIT/UNLOCK/TESTLOCK\n"
         "type: READ/WRITE\n"
         "whence: SET/CUR/END\n"
         "filelock path action type offset whence len\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [127 x i8] c"Usage:\0Aaction: LOCK/LOCKWAIT/UNLOCK/TESTLOCK\0Atype: READ/WRITE\0Awhence: SET/CUR/END\0Afilelock path action type offset whence len\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [126 x i8] c"Usage:\0Aaction: LOCK/LOCKWAIT/UNLOCK/TESTLOCK\0Atype: READ/WRITE\0Awhence: SET/CUR/END\0Afilelock path action type offset whence len\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([126 x i8], [126 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
void int_to_str4(unsigned int i, unsigned char *s) {
  int loop = 4;
  while (loop--) {
    *s++ = i >> 24;
    i <<= 8;
  }
  *s = '\0';
  return;
}


x86 assembly (clang, -O0):
<int_to_str4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     114d <int_to_str4+0x4d>
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <int_to_str4+0x12>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_to_str4>:
mov    %edi,%eax
mov    %edi,%ecx
shr    $0x18,%ecx
mov    %cl,(%rsi)
mov    %edi,%ecx
shr    $0x10,%ecx
mov    %cl,0x1(%rsi)
mov    %ah,0x2(%rsi)
mov    %al,0x3(%rsi)
movb   $0x0,0x4(%rsi)
ret

LLVM IR (-O0):
define void @int_to_str4(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 4, i32* %5
br label %6
6: ; preds = %10, %2
%7 = load i32, i32* %5
%8 = add nsw i32 %7, -1
store i32 %8, i32* %5
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load i32, i32* %3
%12 = lshr i32 %11, 24
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %4
store i8 %13, i8* %14
%16 = load i32, i32* %3
%17 = shl i32 %16, 8
store i32 %17, i32* %3
br label %6
18: ; preds = %6
%19 = load i8*, i8** %4
store i8 0, i8* %19
ret void
}

LLVM IR (-O2):
define void @int_to_str4(i32 %0, i8* nocapture writeonly %1) {
%3 = lshr i32 %0, 24
%4 = trunc i32 %3 to i8
%5 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %4, i8* %1
%6 = lshr i32 %0, 16
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %7, i8* %5
%9 = lshr i32 %0, 8
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %10, i8* %8
%12 = trunc i32 %0 to i8
%13 = getelementptr inbounds i8, i8* %1, i64 4
store i8 %12, i8* %11
store i8 0, i8* %13
ret void
}
int ptrace_sandbox_run_processes(struct pt_sandbox *p_sandbox) {
  (void)p_sandbox;
  return -1;
}


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

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

LLVM IR (-O0):
%struct.pt_sandbox = type opaque
define i32 @ptrace_sandbox_run_processes(%struct.pt_sandbox* %0) {
%2 = alloca %struct.pt_sandbox*
store %struct.pt_sandbox* %0, %struct.pt_sandbox** %2
%3 = load %struct.pt_sandbox*, %struct.pt_sandbox** %2
ret i32 -1
}

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define i32 @ptrace_sandbox_run_processes(%struct.pt_sandbox* nocapture readnone %0) {
ret i32 -1
}
void C(void) {}


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

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

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

LLVM IR (-O2):
define void @C() {
ret void
}
/* Variables and functions */
bool is_leap_year(unsigned int year) {
  return ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0));
}


x86 assembly (clang, -O0):
<is_leap_year>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3,%eax
cmp    $0x0,%eax
jne    1130 <is_leap_year+0x30>
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
xor    %edx,%edx
div    %ecx
mov    $0x1,%al
cmp    $0x0,%edx
mov    %al,-0x5(%rbp)
jne    1145 <is_leap_year+0x45>
mov    -0x4(%rbp),%eax
mov    $0x190,%ecx
xor    %edx,%edx
div    %ecx
cmp    $0x0,%edx
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_leap_year>:
test   $0x3,%dil
jne    1122 <is_leap_year+0x22>
mov    %edi,%eax
imul   $0x51eb851f,%rax,%rax
shr    $0x25,%rax
imul   $0x64,%eax,%ecx
mov    %edi,%edx
mov    $0x1,%eax
sub    %ecx,%edx
je     1122 <is_leap_year+0x22>
ret
imul   $0xc28f5c29,%edi,%ecx
ror    $0x4,%ecx
xor    %eax,%eax
cmp    $0xa3d70b,%ecx
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_leap_year(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp ne i32 %2, 0
%4 = urem i32 %0, 100
%5 = icmp eq i32 %4, 0
%6 = or i1 %3, %5
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = urem i32 %0, 400
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %1, %7
%12 = phi i32 [ %10, %7 ], [ 1, %1 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ def_El();
int /*<<< orphan*/ def_G();
int /*<<< orphan*/ def_O();
int /*<<< orphan*/ def_P();
void def_logo(void) {
  def_O();
  def_P();
  def_El();
  def_G();
}


x86 assembly (clang, -O0):
<def_logo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <def_O@plt>
mov    $0x0,%al
call   1060 <def_P@plt>
mov    $0x0,%al
call   1050 <def_El@plt>
mov    $0x0,%al
call   1030 <def_G@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<def_logo>:
push   %rax
xor    %eax,%eax
call   1040 <def_O@plt>
xor    %eax,%eax
call   1060 <def_P@plt>
xor    %eax,%eax
call   1050 <def_El@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <def_G@plt>

LLVM IR (-O0):
define void @def_logo() {
%1 = call i32 (...) @def_O()
%2 = call i32 (...) @def_P()
%3 = call i32 (...) @def_El()
%4 = call i32 (...) @def_G()
ret void
}

LLVM IR (-O2):
define void @def_logo() {
%1 = tail call i32 (...) @def_O()
%2 = tail call i32 (...) @def_P()
%3 = tail call i32 (...) @def_El()
%4 = tail call i32 (...) @def_G()
ret void
}
/* Variables and functions */
scalar_t__ dlsym(void *, char *);
int wsrep_check_iface_version(char *, char *);
int wsrep_check_version_symbol(void *dlh) {
  char **dlversion = NULL;
  dlversion = (char **)dlsym(dlh, "wsrep_interface_version");
  if (dlversion == NULL)
    return 0;
  return wsrep_check_iface_version(*dlversion, "25");
}


x86 assembly (clang, -O0):
<wsrep_check_version_symbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1040 <dlsym@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115f <wsrep_check_version_symbol+0x3f>
movl   $0x0,-0x4(%rbp)
jmp    1175 <wsrep_check_version_symbol+0x55>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
lea    0xeab(%rip),%rsi
call   1030 <wsrep_check_iface_version@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wsrep_check_version_symbol>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <dlsym@plt>
test   %rax,%rax
je     1142 <wsrep_check_version_symbol+0x22>
mov    (%rax),%rdi
lea    0xedc(%rip),%rsi
pop    %rax
jmp    1030 <wsrep_check_iface_version@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"wsrep_interface_version\00"
@.str.1 = [3 x i8] c"25\00"
define i32 @wsrep_check_version_symbol(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** null, i8*** %4
%5 = load i8*, i8** %3
%6 = call i64 @dlsym(i8* %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%7 = inttoptr i64 %6 to i8**
store i8** %7, i8*** %4
%8 = load i8**, i8*** %4
%9 = icmp eq i8** %8, null
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 0, i32* %2
br label %15
11: ; preds = %1
%12 = load i8**, i8*** %4
%13 = load i8*, i8** %12
%14 = call i32 @wsrep_check_iface_version(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 %14, i32* %2
br label %15
15: ; preds = %11, %10
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@.str = [24 x i8] c"wsrep_interface_version\00"
@.str.1 = [3 x i8] c"25\00"
define i32 @wsrep_check_version_symbol(i8* %0) {
%2 = tail call i64 @dlsym(i8* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = inttoptr i64 %2 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @wsrep_check_iface_version(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
void psi_ttwu_dequeue(struct task_struct *p) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @psi_ttwu_dequeue(%struct.task_struct* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ p1(char);
int p2(int x, int y) {
  char c;
  c = 'a';
  p1(c);
  return x + y;
}


x86 assembly (clang, -O0):
<p2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movb   $0x61,-0x9(%rbp)
movsbl -0x9(%rbp),%edi
call   1030 <p1@plt>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p2>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x61,%edi
call   1030 <p1@plt>
add    %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @p2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8 97, i8* %5
%6 = load i8, i8* %5
%7 = call i32 @p1(i8 signext %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @p2(i32 %0, i32 %1) {
%3 = tail call i32 @p1(i8 signext 97)
%4 = add nsw i32 %1, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ LDA_();
int /*<<< orphan*/ c64_memAbsoluteAddrX();
void LDA_absx(void) {
  c64_memAbsoluteAddrX();
  LDA_();
}


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

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

LLVM IR (-O0):
define void @LDA_absx() {
%1 = call i32 (...) @c64_memAbsoluteAddrX()
%2 = call i32 (...) @LDA_()
ret void
}

LLVM IR (-O2):
define void @LDA_absx() {
%1 = tail call i32 (...) @c64_memAbsoluteAddrX()
%2 = tail call i32 (...) @LDA_()
ret void
}
int foo4(int n) {
  char arr[n];
  arr[0] = 1;
  return 0;
}


x86 assembly (clang, -O0):
<foo4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
mov    %rcx,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rax
sub    %rdx,%rax
mov    %rax,%rsp
mov    %rcx,-0x18(%rbp)
movb   $0x1,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo4(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %3
%8 = alloca i8, i64 %6
store i64 %6, i64* %4
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 1, i8* %9
%10 = load i8*, i8** %3
ret i32 0
}

LLVM IR (-O2):
define i32 @foo4(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, char *);
int /*<<< orphan*/ pthread_self();
char *str_accumulate(char *);
void *process(void *arg) {
  char *res;
  res = str_accumulate("Result of ");
  res = str_accumulate((char *)arg);
  res = str_accumulate(" thread");
  printf("Thread %lx: \"%s\"\n", pthread_self(), res);
  return NULL;
}


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1050 <str_accumulate@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <str_accumulate@plt>
mov    %rax,-0x10(%rbp)
lea    0xeab(%rip),%rdi
call   1050 <str_accumulate@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
call   1050 <str_accumulate@plt>
mov    %rbx,%rdi
call   1050 <str_accumulate@plt>
lea    0xebc(%rip),%rdi
call   1050 <str_accumulate@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <pthread_self@plt>
lea    0xeae(%rip),%rdi
mov    %eax,%esi
mov    %rbx,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Result of \00"
@.str.1 = [8 x i8] c" thread\00"
@.str.2 = [18 x i8] c"Thread %lx: \22%s\22\0A\00"
define i8* @process(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i8* @str_accumulate(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i8* %4, i8** %3
%5 = load i8*, i8** %2
%6 = call i8* @str_accumulate(i8* %5)
store i8* %6, i8** %3
%7 = call i8* @str_accumulate(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
store i8* %7, i8** %3
%8 = call i32 (...) @pthread_self()
%9 = load i8*, i8** %3
%10 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %8, i8* %9)
ret i8* null
}

LLVM IR (-O2):
@.str = [11 x i8] c"Result of \00"
@.str.1 = [8 x i8] c" thread\00"
@.str.2 = [18 x i8] c"Thread %lx: \22%s\22\0A\00"
define noalias i8* @process(i8* %0) {
%2 = tail call i8* @str_accumulate(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = tail call i8* @str_accumulate(i8* %0)
%4 = tail call i8* @str_accumulate(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (...) @pthread_self()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %5, i8* %4)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void data_read_miss(void) {
  int *i = (void *)0x87654320;
  printf("%i\n", *i);
}


x86 assembly (clang, -O0):
<data_read_miss>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x87654320,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<data_read_miss>:
mov    $0x87654320,%eax
mov    (%rax),%esi
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%i\0A\00"
define void @data_read_miss() {
%1 = alloca i32*
store i32* inttoptr (i64 2271560480 to i32*), i32** %1
%2 = load i32*, i32** %1
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define void @data_read_miss() {
%1 = load i32, i32* inttoptr (i64 2271560480 to i32*)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void slib_close() {}


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

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

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

LLVM IR (-O2):
define void @slib_close() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ ofl_error_type_print(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/);
int /*<<< orphan*/ *open_memstream(char **, size_t *);
char *ofl_error_type_to_string(uint16_t type) {
  char *str;
  size_t str_size;
  FILE *stream = open_memstream(&str, &str_size);
  ofl_error_type_print(stream, type);
  fclose(stream);
  return str;
}


x86 assembly (clang, -O0):
<ofl_error_type_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <open_memstream@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1050 <ofl_error_type_print@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ofl_error_type_to_string>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebp
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <open_memstream@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
call   1050 <ofl_error_type_print@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ofl_error_type_to_string(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32*
store i32 %0, i32* %2
%6 = call i32* @open_memstream(i8** %3, i64* %4)
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = load i32, i32* %2
%9 = call i32 @ofl_error_type_print(i32* %7, i32 %8)
%10 = load i32*, i32** %5
%11 = call i32 @fclose(i32* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @ofl_error_type_to_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = bitcast i8** %2 to i8*
%5 = bitcast i64* %3 to i8*
%6 = call i32* @open_memstream(i8** %2, i64* %3)
%7 = call i32 @ofl_error_type_print(i32* %6, i32 %0)
%8 = call i32 @fclose(i32* %6)
%9 = load i8*, i8** %2
ret i8* %9
}
int switch2(int a) {
  switch (a) {
  case 1 ... 11:
    return 11;
    break;
  case 33:
    return 333;
    break;
  case 55:
    return 55;
    break;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<switch2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffffff,%eax
sub    $0xb,%eax
jb     1140 <switch2+0x40>
jmp    111e <switch2+0x1e>
mov    -0xc(%rbp),%eax
sub    $0x21,%eax
je     114c <switch2+0x4c>
jmp    112f <switch2+0x2f>
mov    -0xc(%rbp),%eax
sub    $0x37,%eax
je     1158 <switch2+0x58>
jmp    1164 <switch2+0x64>
movl   $0xb,-0x4(%rbp)
jmp    116b <switch2+0x6b>
movl   $0x14d,-0x4(%rbp)
jmp    116b <switch2+0x6b>
movl   $0x37,-0x4(%rbp)
jmp    116b <switch2+0x6b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<switch2>:
mov    $0xb,%eax
lea    -0x1(%rdi),%ecx
cmp    $0xb,%ecx
jae    110e <switch2+0xe>
ret
cmp    $0x37,%edi
je     111e <switch2+0x1e>
cmp    $0x21,%edi
jne    1124 <switch2+0x24>
mov    $0x14d,%eax
ret
mov    $0x37,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @switch2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 1, label %5
i32 2, label %5
i32 3, label %5
i32 4, label %5
i32 5, label %5
i32 6, label %5
i32 7, label %5
i32 8, label %5
i32 9, label %5
i32 10, label %5
i32 11, label %5
i32 33, label %6
i32 55, label %7
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 11, i32* %2
br label %9
6: ; preds = %1
store i32 333, i32* %2
br label %9
7: ; preds = %1
store i32 55, i32* %2
br label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @switch2(i32 %0) {
switch i32 %0, label %4 [
i32 1, label %5
i32 2, label %5
i32 3, label %5
i32 4, label %5
i32 5, label %5
i32 6, label %5
i32 7, label %5
i32 8, label %5
i32 9, label %5
i32 10, label %5
i32 11, label %5
i32 33, label %2
i32 55, label %3
]
2: ; preds = %1
br label %5
3: ; preds = %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %4, %3, %2
%6 = phi i32 [ -1, %4 ], [ 55, %3 ], [ 333, %2 ], [ 11, %1 ], [ 11, %1 ], [ 11, %1 ], [ 11, %1 ], [ 11, %1 ], [ 11, %1 ], [ 11, %1 ], [ 11, %1 ], [ 11, %1 ], [ 11, %1 ], [ 11, %1 ]
ret i32 %6
}
int binary_search_ints(int v, int a[], int n) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @binary_search_ints(i32 %0, i32* nocapture readnone %1, i32 %2) {
ret i32 -1
}