xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ reqbuf;

/* Variables and functions */
int ph_rpc(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char const *);
int phSetFollowMe(const char *uri) {
  char reqbuf[1000];
  snprintf(reqbuf, sizeof(reqbuf), "FOLLOWME TO=%s", uri);
  return ph_rpc(reqbuf);
}


x86 assembly (clang, -O0):
<phSetFollowMe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x3e8,%esi
lea    0xeba(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x3f0(%rbp),%rdi
call   1040 <ph_rpc@plt>
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<phSetFollowMe>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rdi,%rcx
lea    0xece(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <ph_rpc@plt>
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"FOLLOWME TO=%s\00"
define i32 @phSetFollowMe(i8* %0) {
%2 = alloca i8*
%3 = alloca [1000 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @snprintf(i8* %4, i32 1000, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%8 = call i32 @ph_rpc(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
@.str = [15 x i8] c"FOLLOWME TO=%s\00"
define i32 @phSetFollowMe(i8* %0) {
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 1000, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @ph_rpc(i8* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ merge(int, int, int);
void mergesort(int p, int r) {
  if (p < r) {
    int q = (p + r) / 2;
    mergesort(p, q);
    mergesort(q + 1, r);
    merge(p, q, r);
  }
}


x86 assembly (clang, -O0):
<mergesort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1172 <mergesort+0x52>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <mergesort@plt>
mov    -0xc(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
call   1040 <mergesort@plt>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <merge@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mergesort>:
cmp    %esi,%edi
jge    1160 <mergesort+0x40>
push   %r15
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%r15d
lea    (%r14,%r15,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%esi
call   1040 <mergesort@plt>
lea    0x1(%rbx),%edi
mov    %r14d,%esi
call   1040 <mergesort@plt>
mov    %r15d,%edi
mov    %ebx,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <merge@plt>
ret

LLVM IR (-O0):
define void @mergesort(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 = icmp slt i32 %6, %7
br i1 %8, label %9, label %23
9: ; preds = %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = add nsw i32 %10, %11
%13 = sdiv i32 %12, 2
store i32 %13, i32* %5
%14 = load i32, i32* %3
%15 = load i32, i32* %5
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
%18 = load i32, i32* %4
%19 = load i32, i32* %3
%20 = load i32, i32* %5
%21 = load i32, i32* %4
%22 = call i32 @merge(i32 %19, i32 %20, i32 %21)
br label %23
23: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
define void @mergesort(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
br i1 %3, label %5, label %4
4: ; preds = %2, %5
ret void
5: ; preds = %2
%6 = add nsw i32 %1, %0
%7 = sdiv i32 %6, 2
tail call void @mergesort(i32 %0, i32 %7)
%8 = add nsw i32 %7, 1
tail call void @mergesort(i32 %8, i32 %1)
%9 = tail call i32 @merge(i32 %0, i32 %7, i32 %1)
br label %4
}
void do_verbose(const char *msg) {}


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

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

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

LLVM IR (-O2):
define void @do_verbose(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, void *, int);
void ft_putchar_fd_unsigned(unsigned short c, int fd) {
  write(fd, (void *)&c, 1);
}


x86 assembly (clang, -O0):
<ft_putchar_fd_unsigned>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x2(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putchar_fd_unsigned>:
push   %rax
mov    %esi,%eax
mov    %di,0x6(%rsp)
lea    0x6(%rsp),%rsi
mov    %eax,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @ft_putchar_fd_unsigned(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = bitcast i16* %3 to i8*
%7 = call i32 @write(i32 %5, i8* %6, i32 1)
ret void
}

LLVM IR (-O2):
define void @ft_putchar_fd_unsigned(i16 zeroext %0, i32 %1) {
%3 = alloca i16
store i16 %0, i16* %3
%4 = bitcast i16* %3 to i8*
%5 = call i32 @write(i32 %1, i8* %4, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g();
f() {
  do
    g();
  while (sizeof(char));
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <g@plt>
mov    $0x1,%al
test   $0x1,%al
jne    1118 <f+0x8>
jmp    112e <f+0x1e>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <g@plt>
jmp    1120 <f+0x10>

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
br label %2
2: ; preds = %4, %0
%3 = call i32 (...) @g()
br label %4
4: ; preds = %2
br i1 true, label %2, label %5
5: ; preds = %4
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @f() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @g()
br label %1
}
void gtk_tree_path_up() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_path_up() {
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int c;
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  c = 0;
  while (x + y > 0) {
    if (x > y) {
      x = x - 1;
    } else {
      if (x == y) {
        x = x - 1;
      } else {
        y = y - 1;
      }
    }
    c = c + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
cmp    $0x0,%eax
jle    1199 <main+0x89>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1163 <main+0x53>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    118b <main+0x7b>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    117d <main+0x6d>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1186 <main+0x76>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    118b <main+0x7b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <main+0x2a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %4
store i32 0, i32* %2
br label %7
7: ; preds = %30, %0
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %8, %9
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %33
12: ; preds = %7
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = icmp sgt i32 %13, %14
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = load i32, i32* %3
%18 = sub nsw i32 %17, 1
store i32 %18, i32* %3
br label %30
19: ; preds = %12
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = icmp eq i32 %20, %21
br i1 %22, label %23, label %26
23: ; preds = %19
%24 = load i32, i32* %3
%25 = sub nsw i32 %24, 1
store i32 %25, i32* %3
br label %29
26: ; preds = %19
%27 = load i32, i32* %4
%28 = sub nsw i32 %27, 1
store i32 %28, i32* %4
br label %29
29: ; preds = %26, %23
br label %30
30: ; preds = %29, %16
%31 = load i32, i32* %2
%32 = add nsw i32 %31, 1
store i32 %32, i32* %2
br label %7
33: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
int strcoll(register const char *s1, register const char *s2) {
  while (*s1 == *s2++) {
    if (*s1++ == '\0') {
      return 0;
    }
  }
  return *s1 - *--s2;
}


x86 assembly (clang, -O0):
<strcoll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1159 <strcoll+0x59>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1154 <strcoll+0x54>
movl   $0x0,-0x4(%rbp)
jmp    1178 <strcoll+0x78>
jmp    110c <strcoll+0xc>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x18(%rbp)
movsbl -0x1(%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcoll>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi,%rcx,1),%eax
movsbl (%rsi,%rcx,1),%edx
cmp    %dl,%al
jne    1127 <strcoll+0x27>
add    $0x1,%rcx
test   %al,%al
jne    1110 <strcoll+0x10>
xor    %eax,%eax
ret
sub    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @strcoll(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %11, %9 ]
%5 = phi i8* [ %1, %2 ], [ %10, %9 ]
%6 = load i8, i8* %4
%7 = load i8, i8* %5
%8 = icmp eq i8 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = getelementptr inbounds i8, i8* %4, i64 1
%12 = icmp eq i8 %6, 0
br i1 %12, label %17, label %3
13: ; preds = %3
%14 = sext i8 %6 to i32
%15 = sext i8 %7 to i32
%16 = sub nsw i32 %14, %15
br label %17
17: ; preds = %9, %13
%18 = phi i32 [ %16, %13 ], [ 0, %9 ]
ret i32 %18
}
sfunc123(int a, int b) { return a * b + 2; }


x86 assembly (clang, -O0):
<sfunc123>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
add    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfunc123>:
imul   %esi,%edi
lea    0x2(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @sfunc123(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = add nsw i32 %3, 2
ret i32 %4
}
char *gdb_hex(char *str, int nbytes) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @gdb_hex(i8* nocapture readnone %0, i32 %1) {
ret i8* undef
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int getc(int /*<<< orphan*/ *);
uint32_t readLittleInt(FILE *file) {
  uint32_t c1 = getc(file);
  uint32_t c2 = getc(file) << 8;
  uint32_t c3 = getc(file) << 16;
  uint32_t c4 = getc(file) << 24;
  return (c1 | c2 | c3 | c4);
}


x86 assembly (clang, -O0):
<readLittleInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
shl    $0x8,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
shl    $0x10,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
shl    $0x18,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
or     -0x14(%rbp),%eax
or     -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readLittleInt>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r15
call   1030 <getc@plt>
mov    %eax,%r14d
mov    %r15,%rdi
call   1030 <getc@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
mov    %r15,%rdi
call   1030 <getc@plt>
mov    %eax,%ebx
shl    $0x10,%ebx
mov    %r15,%rdi
call   1030 <getc@plt>
shl    $0x18,%eax
or     %ebx,%eax
or     %r14d,%ebp
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @readLittleInt(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %2
%7 = load i32*, i32** %2
%8 = call i32 @getc(i32* %7)
store i32 %8, i32* %3
%9 = load i32*, i32** %2
%10 = call i32 @getc(i32* %9)
%11 = shl i32 %10, 8
store i32 %11, i32* %4
%12 = load i32*, i32** %2
%13 = call i32 @getc(i32* %12)
%14 = shl i32 %13, 16
store i32 %14, i32* %5
%15 = load i32*, i32** %2
%16 = call i32 @getc(i32* %15)
%17 = shl i32 %16, 24
store i32 %17, i32* %6
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = or i32 %18, %19
%21 = load i32, i32* %5
%22 = or i32 %20, %21
%23 = load i32, i32* %6
%24 = or i32 %22, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @readLittleInt(i32* nocapture %0) {
%2 = tail call i32 @getc(i32* %0)
%3 = tail call i32 @getc(i32* %0)
%4 = shl i32 %3, 8
%5 = tail call i32 @getc(i32* %0)
%6 = shl i32 %5, 16
%7 = tail call i32 @getc(i32* %0)
%8 = shl i32 %7, 24
%9 = or i32 %4, %2
%10 = or i32 %9, %6
%11 = or i32 %10, %8
ret i32 %11
}
char *strrchr(char *s, int c) {
  char *ret = 0;
  do {
    if (*s == c)
      ret = (char *)s;
  } while (*s++);
  return (ret);
}


x86 assembly (clang, -O0):
<strrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    112b <strrchr+0x2b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1130 <strrchr+0x30>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
jne    1113 <strrchr+0x13>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strrchr>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi),%ecx
cmp    %esi,%ecx
cmove  %rdi,%rax
add    $0x1,%rdi
test   %ecx,%ecx
jne    1110 <strrchr+0x10>
ret

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

LLVM IR (-O2):
define i8* @strrchr(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %10, %3 ]
%5 = phi i8* [ null, %2 ], [ %9, %3 ]
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, %1
%9 = select i1 %8, i8* %4, i8* %5
%10 = getelementptr inbounds i8, i8* %4, i64 1
%11 = icmp eq i8 %6, 0
br i1 %11, label %12, label %3
12: ; preds = %3
ret i8* %9
}
double sin(double x) {
  double x2 = x * x;
  return ((((.00015148419 * x2 - .00467376557) * x2 + .07968967928) * x2 -
           .64596371106) *
              x2 +
          1.57079631847) *
         x;
}


x86 assembly (clang, -O0):
<sin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xef3(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeef(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeca(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xead(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe90(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sin>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xef0(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xeec(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xee8(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xee4(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xee0(%rip),%xmm2
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @sin(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fmul double %4, %5
store double %6, double* %3
%7 = load double, double* %3
%8 = call double @llvm.fmuladd.f64(double 0x3F23DAF748A890AF, double %7, double 0xBF7324CC645B6D0E)
%9 = load double, double* %3
%10 = call double @llvm.fmuladd.f64(double %8, double %9, double 0x3FB4668AF65619A5)
%11 = load double, double* %3
%12 = call double @llvm.fmuladd.f64(double %10, double %11, double 0xBFE4ABBC16ACF9CD)
%13 = load double, double* %3
%14 = call double @llvm.fmuladd.f64(double %12, double %13, double 0x3FF921FB520817F7)
%15 = load double, double* %2
%16 = fmul double %14, %15
ret double %16
}

LLVM IR (-O2):
define double @sin(double %0) {
%2 = fmul double %0, %0
%3 = tail call double @llvm.fmuladd.f64(double %2, double 0x3F23DAF748A890AF, double 0xBF7324CC645B6D0E)
%4 = tail call double @llvm.fmuladd.f64(double %3, double %2, double 0x3FB4668AF65619A5)
%5 = tail call double @llvm.fmuladd.f64(double %4, double %2, double 0xBFE4ABBC16ACF9CD)
%6 = tail call double @llvm.fmuladd.f64(double %5, double %2, double 0x3FF921FB520817F7)
%7 = fmul double %6, %0
ret double %7
}
OP(ed, e3) {}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
ret i32 undef
}
void gtk_button_clicked() {}


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

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

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

LLVM IR (-O2):
define void @gtk_button_clicked() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endl();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
void pausar(void) {
  getchar();
  printf("Press any key to continue . . .");
  endl();
  getchar();
}


x86 assembly (clang, -O0):
<pausar>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <getchar@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <endl@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pausar>:
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <endl@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getchar@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Press any key to continue . . .\00"
define void @pausar() {
%1 = call i32 (...) @getchar()
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @endl()
%4 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Press any key to continue . . .\00"
define void @pausar() {
%1 = tail call i32 (...) @getchar()
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @endl()
%4 = tail call i32 (...) @getchar()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t size) {
  void *ptr;
  ptr = malloc(size);
  if (ptr == NULL) {
    fprintf(stderr, "MALLOC FAILURE!\n");
    exit(127);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <xmalloc+0x43>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x7f,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x7f,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"MALLOC FAILURE!\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 127)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"MALLOC FAILURE!\0A\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 127)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ system(char *);
void wyswietl(char *n_pliku) {
  char polecenie[1024];
  strcpy(polecenie, "display ");
  strcat(polecenie, n_pliku);
  strcat(polecenie, " &");
  system(polecenie);
}


x86 assembly (clang, -O0):
<wyswietl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
lea    0xeb3(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0x410(%rbp),%rdi
lea    0xe99(%rip),%rsi
call   1050 <strcat@plt>
lea    -0x410(%rbp),%rdi
call   1040 <system@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wyswietl>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rdi,%r14
lea    0xebc(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcat@plt>
lea    0xea8(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"display \00"
@.str.1 = [3 x i8] c" &\00"
define void @wyswietl(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%7 = load i8*, i8** %2
%8 = call i32 @strcat(i8* %6, i8* %7)
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%10 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%12 = call i32 @system(i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"display \00"
@.str.1 = [3 x i8] c" &\00"
define void @wyswietl(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @strcat(i8* %3, i8* %0)
%6 = call i32 @strcat(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @system(i8* %3)
ret void
}
int TriangularNumber(int n) {
  int sum = 0;
  for (int i = 0; i < n; i++) {
    sum += i;
  }
  return sum;
}


x86 assembly (clang, -O0):
<TriangularNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1138 <TriangularNumber+0x38>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <TriangularNumber+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TriangularNumber>:
test   %edi,%edi
jle    1118 <TriangularNumber+0x18>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
shr    %rcx
lea    (%rcx,%rdi,1),%eax
add    $0xffffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @TriangularNumber(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %13
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = zext i32 %4 to i33
%6 = add nsw i32 %0, -2
%7 = zext i32 %6 to i33
%8 = mul i33 %5, %7
%9 = lshr i33 %8, 1
%10 = trunc i33 %9 to i32
%11 = add i32 %10, %0
%12 = add i32 %11, -1
br label %13
13: ; preds = %3, %1
%14 = phi i32 [ 0, %1 ], [ %12, %3 ]
ret i32 %14
}
double rtclock() { return 0; }


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

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

LLVM IR (-O0):
define double @rtclock() {
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @rtclock() {
ret double 0.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ ENGINE;

/* Variables and functions */
int e_gmp_finish(ENGINE *e) { return 1; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ KAPI_save_as_header_uint(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
void KAPI_save_as_header_uint_list(FILE *fp, int i) {
  FILE *fpTmp = fp;
  KAPI_save_as_header_uint(fp, i);
  fwrite(",", sizeof(char), 1, fpTmp);
}


x86 assembly (clang, -O0):
<KAPI_save_as_header_uint_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <KAPI_save_as_header_uint@plt>
mov    -0x18(%rbp),%rcx
lea    0xeb2(%rip),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KAPI_save_as_header_uint_list>:
push   %rbx
mov    %rdi,%rbx
call   1030 <KAPI_save_as_header_uint@plt>
mov    $0x2c,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <fputc@plt>

LLVM IR (-O0):
@.str = [2 x i8] c",\00"
define void @KAPI_save_as_header_uint_list(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
store i32* %6, i32** %5
%7 = load i32*, i32** %3
%8 = load i32, i32* %4
%9 = call i32 @KAPI_save_as_header_uint(i32* %7, i32 %8)
%10 = load i32*, i32** %5
%11 = call i32 @fwrite(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32* %10)
ret void
}

LLVM IR (-O2):
define void @KAPI_save_as_header_uint_list(i32* %0, i32 %1) {
%3 = tail call i32 @KAPI_save_as_header_uint(i32* %0, i32 %1)
%4 = tail call i32 @fputc(i32 44, i32* %0)
ret void
}
void ff_hevc_put_hevc_uni_epel_h48_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_h48_10_sse4() {
ret void
}
int tegra_dvfs_alt_freqs_set(struct dvfs *d, unsigned long *alt_freqs) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.dvfs = type opaque
define i32 @tegra_dvfs_alt_freqs_set(%struct.dvfs* %0, i64* %1) {
%3 = alloca %struct.dvfs*
%4 = alloca i64*
store %struct.dvfs* %0, %struct.dvfs** %3
store i64* %1, i64** %4
ret i32 0
}

LLVM IR (-O2):
%struct.dvfs = type opaque
define i32 @tegra_dvfs_alt_freqs_set(%struct.dvfs* nocapture readnone %0, i64* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int /*<<< orphan*/ __infer_nondet_int();
wint_t towlower(wint_t wc) { return __infer_nondet_int(); }


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

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

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

LLVM IR (-O2):
define i32 @towlower(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Variables and functions */
void *compare_ulong_context(void) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @compare_ulong_context() {
ret i8* null
}
/* Variables and functions */
int strlen(char *);
char toupper(char);
char *supper(char *str) {
  int i;
  for (i = 0; i < strlen(str); ++i) {
    str[i] = toupper(str[i]);
  }
  return str;
}


x86 assembly (clang, -O0):
<supper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    117b <supper+0x5b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <supper+0x13>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<supper>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
test   %eax,%eax
jle    1161 <supper+0x41>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1030 <toupper@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1140 <supper+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @supper(i8* returned %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call signext i8 @toupper(i8 signext %7)
store i8 %8, i8* %6
%9 = add nuw nsw i64 %5, 1
%10 = tail call i32 @strlen(i8* %0)
%11 = sext i32 %10 to i64
%12 = icmp slt i64 %9, %11
br i1 %12, label %4, label %13
13: ; preds = %4, %1
ret i8* %0
}
void s3c_pm_arch_show_resume_irqs(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ free(struct clib_object *);
void delete_clib_object(struct clib_object *inObject) {
  if (inObject) {
    free(inObject);
  }
}


x86 assembly (clang, -O0):
<delete_clib_object>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <delete_clib_object+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_clib_object>:
test   %rdi,%rdi
je     111a <delete_clib_object+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.clib_object = type { i32 }
define void @delete_clib_object(%struct.clib_object* %0) {
%2 = alloca %struct.clib_object*
store %struct.clib_object* %0, %struct.clib_object** %2
%3 = load %struct.clib_object*, %struct.clib_object** %2
%4 = icmp ne %struct.clib_object* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.clib_object*, %struct.clib_object** %2
%7 = call i32 @free(%struct.clib_object* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.clib_object = type { i32 }
define void @delete_clib_object(%struct.clib_object* %0) {
%2 = icmp eq %struct.clib_object* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.clib_object* %0)
br label %5
5: ; preds = %3, %1
ret void
}
void HibernateWakeSet(unsigned long ulWakeFlags) {
  ;
  (*((volatile unsigned long *)(0x400FC010))) =
      (ulWakeFlags |
       ((*((volatile unsigned long *)(0x400FC010))) & ~(0x10 | 0x08)));
}


x86 assembly (clang, -O0):
<HibernateWakeSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x400fc010,%eax
mov    (%rax),%rax
and    $0xffffffffffffffe7,%rax
or     %rax,%rcx
mov    $0x400fc010,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateWakeSet>:
mov    0x400fc010,%rax
40
and    $0xffffffffffffffe7,%rax
or     %rdi,%rax
mov    %rax,0x400fc010
40
ret

LLVM IR (-O0):
define void @HibernateWakeSet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%5 = and i64 %4, -25
%6 = or i64 %3, %5
store volatile i64 %6, i64* inttoptr (i64 1074774032 to i64*)
ret void
}

LLVM IR (-O2):
define void @HibernateWakeSet(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%3 = and i64 %2, -25
%4 = or i64 %3, %0
store volatile i64 %4, i64* inttoptr (i64 1074774032 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sort(int *, int, int);
int findMedian(int arr[], int low, int high, int n) {
  sort(arr, low, high);
  return arr[n / 2];
}


x86 assembly (clang, -O0):
<findMedian>:
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    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <sort@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findMedian>:
push   %r14
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %rdi,%r14
call   1030 <sort@plt>
mov    %ebx,%eax
shr    $0x1f,%eax
add    %ebx,%eax
sar    %eax
cltq
mov    (%r14,%rax,4),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @findMedian(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @sort(i32* %0, i32 %1, i32 %2)
%6 = sdiv i32 %3, 2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
ret i32 %9
}
/* Variables and functions */
void PrintMemoryLabels(void) {}


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

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

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

LLVM IR (-O2):
define void @PrintMemoryLabels() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(double *);
int /*<<< orphan*/ math_vector_divide(double *, double, size_t, double *);
double math_vector_norm(double *, size_t);
void math_vector_normalize(double *vector, size_t size) {
  assert(vector);
  double norm = math_vector_norm(vector, size);
  if (norm == 0.0) {
    return;
  }
  math_vector_divide(vector, norm, size, vector);
}


x86 assembly (clang, -O0):
<math_vector_normalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <math_vector_norm@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1178 <math_vector_normalize+0x48>
jp     1178 <math_vector_normalize+0x48>
jmp    118e <math_vector_normalize+0x5e>
mov    -0x8(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1030 <math_vector_divide@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_vector_normalize>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <math_vector_norm@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    115e <math_vector_normalize+0x2e>
jp     115e <math_vector_normalize+0x2e>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <math_vector_divide@plt>

LLVM IR (-O0):
define void @math_vector_normalize(double* %0, i64 %1) {
%3 = alloca double*
%4 = alloca i64
%5 = alloca double
store double* %0, double** %3
store i64 %1, i64* %4
%6 = load double*, double** %3
%7 = call i32 @assert(double* %6)
%8 = load double*, double** %3
%9 = load i64, i64* %4
%10 = call double @math_vector_norm(double* %8, i64 %9)
store double %10, double* %5
%11 = load double, double* %5
%12 = fcmp oeq double %11, 0.000000e+00
br i1 %12, label %13, label %14
13: ; preds = %2
br label %20
14: ; preds = %2
%15 = load double*, double** %3
%16 = load double, double* %5
%17 = load i64, i64* %4
%18 = load double*, double** %3
%19 = call i32 @math_vector_divide(double* %15, double %16, i64 %17, double* %18)
br label %20
20: ; preds = %14, %13
ret void
}

LLVM IR (-O2):
define void @math_vector_normalize(double* %0, i64 %1) {
%3 = tail call i32 @assert(double* %0)
%4 = tail call double @math_vector_norm(double* %0, i64 %1)
%5 = fcmp oeq double %4, 0.000000e+00
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @math_vector_divide(double* %0, double %4, i64 %1, double* %0)
br label %8
8: ; preds = %2, %6
ret void
}
int luminance(const unsigned char *c) {
  return ((c[2] * 54 + c[1] * 182 + c[0] * 20) >> 8);
}


x86 assembly (clang, -O0):
<luminance>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%eax
imul   $0x36,%eax,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
imul   $0xb6,%ecx,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
imul   $0x14,%ecx,%ecx
add    %ecx,%eax
sar    $0x8,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<luminance>:
movzbl 0x2(%rdi),%eax
imul   $0x36,%eax,%eax
movzbl 0x1(%rdi),%ecx
imul   $0xb6,%ecx,%ecx
add    %eax,%ecx
movzbl (%rdi),%eax
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,4),%eax
shr    $0x8,%eax
ret

LLVM IR (-O0):
define i32 @luminance(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 2
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = mul nsw i32 %6, 54
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = mul nsw i32 %11, 182
%13 = add nsw i32 %7, %12
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = mul nsw i32 %17, 20
%19 = add nsw i32 %13, %18
%20 = ashr i32 %19, 8
ret i32 %20
}

LLVM IR (-O2):
define i32 @luminance(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = mul nuw nsw i32 %4, 54
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = mul nuw nsw i32 %8, 182
%10 = add nuw nsw i32 %9, %5
%11 = load i8, i8* %0
%12 = zext i8 %11 to i32
%13 = mul nuw nsw i32 %12, 20
%14 = add nuw nsw i32 %10, %13
%15 = lshr i32 %14, 8
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_wfd_cfg_ext_listen_time_usage(void) {
  printf("Usage : wfd_cfg_ext_listen_time [<duration> <interval>]\n");
  printf("If extended listen timing parameters are provided, "
         "'set' is performed otherwise 'get' is performed.\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [57 x i8] c"Usage : wfd_cfg_ext_listen_time [<duration> <interval>]\0A\00"
@.str.1 = [101 x i8] c"If extended listen timing parameters are provided, 'set' is performed otherwise 'get' is performed.\0A\00"
define void @print_wfd_cfg_ext_listen_time_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [56 x i8] c"Usage : wfd_cfg_ext_listen_time [<duration> <interval>]\00"
@str.2 = [100 x i8] c"If extended listen timing parameters are provided, 'set' is performed otherwise 'get' is performed.\00"
define void @print_wfd_cfg_ext_listen_time_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([100 x i8], [100 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void __attribute__((regparm(3))) memcpy_10(void *dest, void *src) {
  memcpy(dest, src, 10);
}


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

x86 assembly (clang, -O2):
<memcpy_10>:
mov    $0xa,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @memcpy_10(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 @memcpy(i8* %5, i8* %6, i32 10)
ret void
}

LLVM IR (-O2):
define void @memcpy_10(i8* %0, i8* %1) {
%3 = tail call i32 @memcpy(i8* %0, i8* %1, i32 10)
ret void
}
void av_mdct_init() {}


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

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

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

LLVM IR (-O2):
define void @av_mdct_init() {
ret void
}