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

/* Variables and functions */
int /*<<< orphan*/ memrev64(int /*<<< orphan*/ *);
uint64_t intrev64(uint64_t v) {
  memrev64(&v);
  return v;
}


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

x86 assembly (clang, -O2):
<intrev64>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <memrev64@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @intrev64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @memrev64(i32* %2)
%4 = load i32, i32* %2
ret i32 %4
}
/* Variables and functions */
scalar_t__ strlen(char *);
int /*<<< orphan*/ strncasecmp(char *, char *, scalar_t__);
int is_abbrev(char *s1, char *s2) {
  if (strlen(s2) < strlen(s1)) {
    return (0);
  }
  return (!strncasecmp(s2, s1, strlen(s1)));
}


x86 assembly (clang, -O0):
<is_abbrev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
jge    1162 <is_abbrev+0x42>
movl   $0x0,-0x4(%rbp)
jmp    119b <is_abbrev+0x7b>
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    %rax,%rdx
call   1040 <strncasecmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_abbrev>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rax,%rbx
mov    %r15,%rdi
call   1030 <strlen@plt>
mov    %rax,%rdx
xor    %eax,%eax
cmp    %rdx,%rbx
jl     115c <is_abbrev+0x3c>
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <strncasecmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @is_abbrev(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = icmp slt i64 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = tail call i32 @strncasecmp(i8* %1, i8* %0, i64 %4)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %9, %6 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void fibonacci(int n) {
  int a = 0, b = 1, temp;
  while (b <= n) {
    printf("%i ", b);
    temp = b;
    b += a;
    a = temp;
  }
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     115e <fibonacci+0x4e>
mov    -0xc(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <fibonacci+0x19>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    1147 <fibonacci+0x37>
mov    %edi,%r15d
mov    $0x1,%ebp
xor    %ebx,%ebx
lea    0xed4(%rip),%r14
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
add    %ebp,%eax
mov    %ebp,%ebx
mov    %eax,%ebp
cmp    %r15d,%eax
jle    1130 <fibonacci+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i \00"
define void @fibonacci(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ 1, %1 ]
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = add nsw i32 %4, %5
%8 = icmp sgt i32 %7, %0
br i1 %8, label %9, label %3
9: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ ed_swap_8(int /*<<< orphan*/);
void *ed_swap_8p(void *x) {
  *(uint64_t *)x = ed_swap_8(*(uint64_t *)x);
  return x;
}


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

x86 assembly (clang, -O2):
<ed_swap_8p>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <ed_swap_8@plt>
mov    %eax,(%rbx)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @ed_swap_8p(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = call i32 @ed_swap_8(i32 %5)
%7 = load i8*, i8** %2
%8 = bitcast i8* %7 to i32*
store i32 %6, i32* %8
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
define i8* @ed_swap_8p(i8* returned %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @ed_swap_8(i32 %3)
store i32 %4, i32* %2
ret i8* %0
}
__attribute__((always_)) int register_trace_mm_page_free_direct(
    void (*probe)(void *__data, struct page *page, unsigned int order),
    void *data) {
  return -38;
}


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

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

LLVM IR (-O0):
%struct.page = type opaque
define i32 @register_trace_mm_page_free_direct(void (i8*, %struct.page*, i32)* %0, i8* %1) {
%3 = alloca void (i8*, %struct.page*, i32)*
%4 = alloca i8*
store void (i8*, %struct.page*, i32)* %0, void (i8*, %struct.page*, i32)** %3
store i8* %1, i8** %4
ret i32 -38
}

LLVM IR (-O2):
%struct.page = type opaque
define i32 @register_trace_mm_page_free_direct(void (i8*, %struct.page*, i32)* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -38
}
/* Variables and functions */
char const *cfg_mvp_get_file(char *);
const char *cfg_mvp_get_codeloader_file(void) {
  return cfg_mvp_get_file("codeloader");
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"codeloader\00"
define i8* @cfg_mvp_get_codeloader_file() {
%1 = call i8* @cfg_mvp_get_file(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [11 x i8] c"codeloader\00"
define i8* @cfg_mvp_get_codeloader_file() {
%1 = tail call i8* @cfg_mvp_get_file(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int strlen(char const *);
int _check_string(const char *string) {
  if (NULL == string || 255 < strlen(string)) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<_check_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
je     1140 <_check_string+0x30>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    $0xff,%eax
cmp    %ecx,%eax
jge    114c <_check_string+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1153 <_check_string+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_string>:
test   %rdi,%rdi
je     112f <_check_string+0x1f>
push   %rax
call   1030 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x100,%ecx
setge  %al
neg    %eax
add    $0x8,%rsp
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @_check_string(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp sgt i32 %4, 255
%6 = sext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ -1, %1 ], [ %6, %3 ]
ret i32 %8
}
int test_007(int a, int b, int c) {
  int x = a != 1;
  int y = b - x;
  return c + y;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x1,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
xor    %eax,%eax
cmp    $0x1,%edi
setne  %al
sub    %eax,%esi
lea    (%rsi,%rdx,1),%eax
ret

LLVM IR (-O0):
define i32 @test_007(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 1
%11 = zext i1 %10 to i32
store i32 %11, i32* %7
%12 = load i32, i32* %5
%13 = load i32, i32* %7
%14 = sub nsw i32 %12, %13
store i32 %14, i32* %8
%15 = load i32, i32* %6
%16 = load i32, i32* %8
%17 = add nsw i32 %15, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @test_007(i32 %0, i32 %1, i32 %2) {
%4 = icmp ne i32 %0, 1
%5 = sext i1 %4 to i32
%6 = add i32 %5, %1
%7 = add nsw i32 %6, %2
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ gettw(double, double *, double *);
double twtail(double twstat) {
  double dens, tail;
  static int ncall = 0;
  ++ncall;
  gettw(twstat, &tail, &dens);
  return tail;
}


x86 assembly (clang, -O0):
<twtail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2f09(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f00(%rip)
movsd  -0x8(%rbp),%xmm0
lea    -0x18(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <gettw@plt>
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twtail>:
sub    $0x18,%rsp
addl   $0x1,0x2f11(%rip)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <gettw@plt>
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@twtail.ncall = internal global i32 0
define double @twtail(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load i32, i32* @twtail.ncall
%6 = add nsw i32 %5, 1
store i32 %6, i32* @twtail.ncall
%7 = load double, double* %2
%8 = call i32 @gettw(double %7, double* %4, double* %3)
%9 = load double, double* %4
ret double %9
}

LLVM IR (-O2):
@twtail.ncall = internal unnamed_addr global i32 0
define double @twtail(double %0) {
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %2 to i8*
%5 = bitcast double* %3 to i8*
%6 = load i32, i32* @twtail.ncall
%7 = add nsw i32 %6, 1
store i32 %7, i32* @twtail.ncall
%8 = call i32 @gettw(double %0, double* %3, double* %2)
%9 = load double, double* %3
ret double %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int read(int, int /*<<< orphan*/ *, int);
int read_mac(int fd, uint8_t mac[6]) {
  int err;
  err = read(fd, mac, 6);
  do {
  } while (0);
  return err;
}


x86 assembly (clang, -O0):
<read_mac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x6,%edx
call   1030 <read@plt>
mov    %eax,-0x14(%rbp)
jmp    1138 <read_mac+0x28>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_mac>:
mov    $0x6,%edx
jmp    1030 <read@plt>

LLVM IR (-O0):
define i32 @read_mac(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32, i32* %3
%7 = load i32*, i32** %4
%8 = call i32 @read(i32 %6, i32* %7, i32 6)
store i32 %8, i32* %5
br label %9
9: ; preds = %2
br label %10
10: ; preds = %9
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @read_mac(i32 %0, i32* nocapture %1) {
%3 = tail call i32 @read(i32 %0, i32* %1, i32 6)
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t mul02(uint8_t v) {
  uint16_t u = v << 1;
  if (u > 0xff) {
    u = u - 0x100;
    u = u ^ 0x1b;
  }
  return (uint8_t)u;
}


x86 assembly (clang, -O0):
<mul02>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jle    1131 <mul02+0x31>
mov    -0x8(%rbp),%eax
sub    $0x100,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    $0x1b,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul02>:
lea    (%rdi,%rdi,1),%ecx
lea    (%rdi,%rdi,1),%eax
add    $0xffffff00,%eax
xor    $0x1b,%eax
cmp    $0x100,%ecx
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @mul02(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = shl i32 %4, 1
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 255
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 256
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = xor i32 %11, 27
store i32 %12, i32* %3
br label %13
13: ; preds = %8, %1
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @mul02(i32 %0) {
%2 = shl i32 %0, 1
%3 = icmp sgt i32 %2, 255
%4 = add nsw i32 %2, -256
%5 = xor i32 %4, 27
%6 = select i1 %3, i32 %5, i32 %2
ret i32 %6
}
int p(int n, unsigned o) { return n - o; }


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

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

LLVM IR (-O0):
define i32 @p(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 = sub i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @p(i32 %0, i32 %1) {
%3 = sub i32 %0, %1
ret i32 %3
}
/* Type definitions */
struct vec3i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec3i_slide(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
__attribute__((always_)) struct vec3i *
psvec3i_slide(struct vec3i *result, struct vec3i *a, struct vec3i *b) {
  vec3i_slide((int32_t *)result, (int32_t *)a, (int32_t *)b);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec3i_slide>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec3i_slide@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec3i = type { i32 }
define %struct.vec3i* @psvec3i_slide(%struct.vec3i* %0, %struct.vec3i* %1, %struct.vec3i* %2) {
%4 = alloca %struct.vec3i*
%5 = alloca %struct.vec3i*
%6 = alloca %struct.vec3i*
store %struct.vec3i* %0, %struct.vec3i** %4
store %struct.vec3i* %1, %struct.vec3i** %5
store %struct.vec3i* %2, %struct.vec3i** %6
%7 = load %struct.vec3i*, %struct.vec3i** %4
%8 = bitcast %struct.vec3i* %7 to i32*
%9 = load %struct.vec3i*, %struct.vec3i** %5
%10 = bitcast %struct.vec3i* %9 to i32*
%11 = load %struct.vec3i*, %struct.vec3i** %6
%12 = bitcast %struct.vec3i* %11 to i32*
%13 = call i32 @vec3i_slide(i32* %8, i32* %10, i32* %12)
%14 = load %struct.vec3i*, %struct.vec3i** %4
ret %struct.vec3i* %14
}

LLVM IR (-O2):
%struct.vec3i = type { i32 }
define %struct.vec3i* @psvec3i_slide(%struct.vec3i* returned %0, %struct.vec3i* %1, %struct.vec3i* %2) {
%4 = getelementptr %struct.vec3i, %struct.vec3i* %0, i64 0, i32 0
%5 = getelementptr %struct.vec3i, %struct.vec3i* %1, i64 0, i32 0
%6 = getelementptr %struct.vec3i, %struct.vec3i* %2, i64 0, i32 0
%7 = tail call i32 @vec3i_slide(i32* %4, i32* %5, i32* %6)
ret %struct.vec3i* %0
}
unsigned char fn2(unsigned char p1, int p2) { return p2 >= 2 ? p1 : p1 >> p2; }


x86 assembly (clang, -O0):
<fn2>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     1123 <fn2+0x23>
movzbl -0x1(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    112f <fn2+0x2f>
movzbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn2>:
xor    %ecx,%ecx
cmp    $0x2,%esi
cmovl  %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
ret

LLVM IR (-O0):
define zeroext i8 @fn2(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sge i32 %5, 2
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
br label %15
10: ; preds = %2
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = load i32, i32* %4
%14 = ashr i32 %12, %13
br label %15
15: ; preds = %10, %7
%16 = phi i32 [ %9, %7 ], [ %14, %10 ]
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @fn2(i8 zeroext %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
%4 = zext i8 %0 to i32
%5 = select i1 %3, i32 0, i32 %1
%6 = lshr i32 %4, %5
%7 = trunc i32 %6 to i8
ret i8 %7
}
void gtk_rc_flags_get_type() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ free(struct hdhomerun_control_sock_t *);
int /*<<< orphan*/
hdhomerun_control_close_sock(struct hdhomerun_control_sock_t *);
void hdhomerun_control_destroy(struct hdhomerun_control_sock_t *cs) {
  hdhomerun_control_close_sock(cs);
  free(cs);
}


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

x86 assembly (clang, -O2):
<hdhomerun_control_destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <hdhomerun_control_close_sock@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.hdhomerun_control_sock_t = type { i32 }
define void @hdhomerun_control_destroy(%struct.hdhomerun_control_sock_t* %0) {
%2 = alloca %struct.hdhomerun_control_sock_t*
store %struct.hdhomerun_control_sock_t* %0, %struct.hdhomerun_control_sock_t** %2
%3 = load %struct.hdhomerun_control_sock_t*, %struct.hdhomerun_control_sock_t** %2
%4 = call i32 @hdhomerun_control_close_sock(%struct.hdhomerun_control_sock_t* %3)
%5 = load %struct.hdhomerun_control_sock_t*, %struct.hdhomerun_control_sock_t** %2
%6 = call i32 @free(%struct.hdhomerun_control_sock_t* %5)
ret void
}

LLVM IR (-O2):
%struct.hdhomerun_control_sock_t = type { i32 }
define void @hdhomerun_control_destroy(%struct.hdhomerun_control_sock_t* %0) {
%2 = tail call i32 @hdhomerun_control_close_sock(%struct.hdhomerun_control_sock_t* %0)
%3 = tail call i32 @free(%struct.hdhomerun_control_sock_t* %0)
ret void
}
/* Variables and functions */
size_t zero_or_ten(int /*<<< orphan*/);
void l2_concrete_no_overrun_Good_FP() {
  int a[10];
  a[zero_or_ten(0)] = 0;
}


x86 assembly (clang, -O0):
<l2_concrete_no_overrun_Good_FP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
xor    %edi,%edi
call   1030 <zero_or_ten@plt>
movl   $0x0,-0x30(%rbp,%rax,4)
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @l2_concrete_no_overrun_Good_FP() {
%1 = alloca [10 x i32]
%2 = call i64 @zero_or_ten(i32 0)
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %2
store i32 0, i32* %3
ret void
}

LLVM IR (-O2):
define void @l2_concrete_no_overrun_Good_FP() {
%1 = tail call i64 @zero_or_ten(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(int, char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello SPCleaner!\n");
  print(1, "Hello World!\n");
  print(2, "Hello World!\n");
  print(3, "Hello World!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
lea    0xec4(%rip),%rsi
call   1040 <print@plt>
mov    $0x2,%edi
lea    0xeb3(%rip),%rsi
call   1040 <print@plt>
mov    $0x3,%edi
lea    0xea2(%rip),%rsi
call   1040 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
call   1040 <print@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
call   1040 <print@plt>
mov    $0x3,%edi
mov    %rbx,%rsi
call   1040 <print@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Hello SPCleaner!\0A\00"
@.str.1 = [14 x i8] c"Hello World!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @print(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @print(i32 2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @print(i32 3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"Hello World!\0A\00"
@str = [17 x i8] c"Hello SPCleaner!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @print(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @print(i32 2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @print(i32 3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void memhead(int osvers, int osrel, int ossub) {
  printf("memtotal memfree buffers cached dirty slabmem"
         "  swptotal swpfree _mem_");
}


x86 assembly (clang, -O0):
<memhead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [70 x i8] c"memtotal memfree buffers cached dirty slabmem swptotal swpfree _mem_\00"
define void @memhead(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
%7 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [70 x i8] c"memtotal memfree buffers cached dirty slabmem swptotal swpfree _mem_\00"
define void @memhead(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ pthread_self();
unsigned long pthread_safe_id_fn(void) {
  return ((unsigned long)pthread_self());
}


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

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

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

LLVM IR (-O2):
define i64 @pthread_safe_id_fn() {
%1 = tail call i64 (...) @pthread_self()
ret i64 %1
}
char *_zlibhelp() {
  return "Zlib not available; input must be decompressed.\nInstall Zlib "
         "(www.zlib.org) and rerun ./configure to add support.\n";
}


x86 assembly (clang, -O0):
<_zlibhelp>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_zlibhelp>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [115 x i8] c"Zlib not available; input must be decompressed.\0AInstall Zlib (www.zlib.org) and rerun ./configure to add support.\0A\00"
define i8* @_zlibhelp() {
ret i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [115 x i8] c"Zlib not available; input must be decompressed.\0AInstall Zlib (www.zlib.org) and rerun ./configure to add support.\0A\00"
define i8* @_zlibhelp() {
ret i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str, i64 0, i64 0)
}
int test_imm_A8int64_highword_reg(long long val) {
  return ((val >> 32) & (0xA8 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_A8int64_highword_reg>:
movabs $0xa800000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A8int64_highword_reg(i64 %0) {
%2 = and i64 %0, 721554505728
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int analogRead(int pin) {
  int val = 0;
  printf("Enter a sensor value 0-1023: ");
  scanf("%d", &val);
  return val;
}


x86 assembly (clang, -O0):
<analogRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<analogRead>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Enter a sensor value 0-1023: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @analogRead(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
@.str = [30 x i8] c"Enter a sensor value 0-1023: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @analogRead(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
ret i32 %6
}
/* Variables and functions */
int f(int, double);
int main() { return f(10, 1.0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
movsd  0xed4(%rip),%xmm0
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movsd  0xee8(%rip),%xmm0
mov    $0xa,%edi
jmp    1030 <f@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 10, double 1.000000e+00)
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 10, double 1.000000e+00)
ret i32 %1
}
int stack_downwards_helper(char *xp) {
  char y;
  return &y < xp;
}


x86 assembly (clang, -O0):
<stack_downwards_helper>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0x9(%rbp),%rax
cmp    -0x8(%rbp),%rax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stack_downwards_helper>:
lea    -0x1(%rsp),%rcx
xor    %eax,%eax
cmp    %rdi,%rcx
setb   %al
ret

LLVM IR (-O0):
define i32 @stack_downwards_helper(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ult i8* %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @stack_downwards_helper(i8* readnone %0) {
%2 = alloca i8
%3 = icmp ult i8* %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __pid_t;

/* Variables and functions */
int /*<<< orphan*/ wait4(int /*<<< orphan*/, int *, int, int /*<<< orphan*/ *);
__pid_t waitpid(__pid_t pid, int *wait_stat, int options) {
  return wait4(pid, wait_stat, options, NULL);
}


x86 assembly (clang, -O0):
<waitpid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <wait4@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitpid>:
xor    %ecx,%ecx
jmp    1030 <wait4@plt>

LLVM IR (-O0):
define i32 @waitpid(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
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = load i32, i32* %6
%10 = call i32 @wait4(i32 %7, i32* %8, i32 %9, i32* null)
ret i32 %10
}

LLVM IR (-O2):
define i32 @waitpid(i32 %0, i32* %1, i32 %2) {
%4 = tail call i32 @wait4(i32 %0, i32* %1, i32 %2, i32* null)
ret i32 %4
}
/* Variables and functions */
const char *next_line(const char *b) {
  while (1) {
    switch (*b) {
    case '\n':
      return b + 1;
    case '\0':
      return NULL;
    }
    b++;
  }
}


x86 assembly (clang, -O0):
<next_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
test   %eax,%eax
je     1141 <next_line+0x41>
jmp    111f <next_line+0x1f>
mov    -0x14(%rbp),%eax
sub    $0xa,%eax
jne    114e <next_line+0x4e>
jmp    1130 <next_line+0x30>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    115f <next_line+0x5f>
movq   $0x0,-0x8(%rbp)
jmp    115f <next_line+0x5f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <next_line+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_line>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rax
movsbl -0x1(%rax),%ecx
test   %ecx,%ecx
je     1122 <next_line+0x22>
cmp    $0xa,%ecx
jne    1110 <next_line+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @next_line(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %1, %12
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
switch i32 %7, label %12 [
i32 10, label %8
i32 0, label %11
]
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8* %10, i8** %2
br label %15
11: ; preds = %4
store i8* null, i8** %2
br label %15
12: ; preds = %4
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %3
br label %4
15: ; preds = %11, %8
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
define i8* @next_line(i8* %0) {
br label %2
2: ; preds = %1, %8
%3 = phi i8* [ %0, %1 ], [ %9, %8 ]
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %8 [
i32 10, label %6
i32 0, label %10
]
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %10
8: ; preds = %2
%9 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
10: ; preds = %2, %6
%11 = phi i8* [ %7, %6 ], [ null, %2 ]
ret i8* %11
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

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


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

x86 assembly (clang, -O2):
<_chmod>:
jmp    1030 <chmod@plt>

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

LLVM IR (-O2):
define i32 @_chmod(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @chmod(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ yar_log_ex(int, char *, char *);
int yar_check_previous_run(char *pfile) {
  if (access(pfile, F_OK) == 0) {
    yar_log_ex(0x8, "There is already a yar_sever run, pid '%s'", pfile);
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<yar_check_previous_run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1040 <access@plt>
cmp    $0x0,%rax
jne    1169 <yar_check_previous_run+0x49>
mov    -0x10(%rbp),%rdx
mov    $0x8,%edi
lea    0xea8(%rip),%rsi
call   1030 <yar_log_ex@plt>
movl   $0x0,-0x4(%rbp)
jmp    1170 <yar_check_previous_run+0x50>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yar_check_previous_run>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
call   1040 <access@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1141 <yar_check_previous_run+0x21>
pop    %rbx
ret
lea    0xeb8(%rip),%rsi
mov    $0x8,%edi
mov    %rbx,%rdx
call   1030 <yar_log_ex@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@F_OK = global i32 0
@.str = [43 x i8] c"There is already a yar_sever run, pid '%s'\00"
define i32 @yar_check_previous_run(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i32, i32* @F_OK
%6 = call i64 @access(i8* %4, i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @yar_log_ex(i32 8, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %9)
store i32 0, i32* %2
br label %12
11: ; preds = %1
store i32 1, i32* %2
br label %12
12: ; preds = %11, %8
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@F_OK = global i32 0
@.str = [43 x i8] c"There is already a yar_sever run, pid '%s'\00"
define i32 @yar_check_previous_run(i8* %0) {
%2 = load i32, i32* @F_OK
%3 = tail call i64 @access(i8* %0, i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @yar_log_ex(i32 8, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ 0, %5 ], [ 1, %1 ]
ret i32 %8
}
int CheckExp(int arr1[], int arr2[]) {
  int isEqual = 1;
  int i;
  for (i = 0; i < 3; i++) {
    if (arr1[i] != arr2[i]) {
      isEqual = 0;
      break;
    }
  }
  return isEqual;
}


x86 assembly (clang, -O0):
<CheckExp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    115f <CheckExp+0x5f>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
je     114c <CheckExp+0x4c>
movl   $0x0,-0x14(%rbp)
jmp    115f <CheckExp+0x5f>
jmp    1151 <CheckExp+0x51>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111a <CheckExp+0x1a>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckExp>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
jne    111b <CheckExp+0x1b>
mov    0x4(%rdi),%ecx
cmp    0x4(%rsi),%ecx
jne    111b <CheckExp+0x1b>
mov    0x8(%rdi),%ecx
xor    %eax,%eax
cmp    0x8(%rsi),%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @CheckExp(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 1, i32* %5
store i32 0, i32* %6
br label %7
7: ; preds = %24, %2
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %27
10: ; preds = %7
%11 = load i32*, i32** %3
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = load i32*, i32** %4
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
%20 = load i32, i32* %19
%21 = icmp ne i32 %15, %20
br i1 %21, label %22, label %23
22: ; preds = %10
store i32 0, i32* %5
br label %27
23: ; preds = %10
br label %24
24: ; preds = %23
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
store i32 %26, i32* %6
br label %7
27: ; preds = %22, %7
%28 = load i32, i32* %5
ret i32 %28
}

LLVM IR (-O2):
define i32 @CheckExp(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %19
6: ; preds = %2
%7 = getelementptr inbounds i32, i32* %0, i64 1
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %1, i64 1
%10 = load i32, i32* %9
%11 = icmp eq i32 %8, %10
br i1 %11, label %12, label %19
12: ; preds = %6
%13 = getelementptr inbounds i32, i32* %0, i64 2
%14 = load i32, i32* %13
%15 = getelementptr inbounds i32, i32* %1, i64 2
%16 = load i32, i32* %15
%17 = icmp eq i32 %14, %16
%18 = zext i1 %17 to i32
br label %19
19: ; preds = %12, %6, %2
%20 = phi i32 [ 0, %2 ], [ 0, %6 ], [ %18, %12 ]
ret i32 %20
}
/* Type definitions */
typedef int /*<<< orphan*/ mbstate_t;

/* Variables and functions */
int __infer_nondet_int();
int mbsinit(const mbstate_t *ps) { return __infer_nondet_int(); }


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

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

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

LLVM IR (-O2):
define i32 @mbsinit(i32* nocapture readnone %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;
typedef int u_char;

/* Variables and functions */
int /*<<< orphan*/ do_read(int *, int);
uint32_t do_read_number(void) {
  u_char num;
  do_read(&num, 1);
  if (num & 0x80)
    return ((uint32_t)num & 0x7f) | (do_read_number() << 7);
  return (uint32_t)num;
}


x86 assembly (clang, -O0):
<do_read_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <do_read@plt>
mov    -0x8(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1167 <do_read_number+0x47>
mov    -0x8(%rbp),%eax
and    $0x7f,%eax
mov    %eax,-0xc(%rbp)
call   1040 <do_read_number@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
shl    $0x7,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    116d <do_read_number+0x4d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_read_number>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rdi
mov    $0x1,%esi
call   1030 <do_read@plt>
mov    0xc(%rsp),%ebx
test   $0x80,%bl
je     114a <do_read_number+0x2a>
and    $0x7f,%ebx
call   1040 <do_read_number@plt>
shl    $0x7,%eax
or     %eax,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @do_read_number() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @do_read(i32* %1, i32 1)
%4 = load i32, i32* %1
%5 = and i32 %4, 128
%6 = icmp eq i32 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %0
%8 = and i32 %4, 127
%9 = call i32 @do_read_number()
%10 = shl i32 %9, 7
%11 = or i32 %10, %8
br label %12
12: ; preds = %0, %7
%13 = phi i32 [ %11, %7 ], [ %4, %0 ]
ret i32 %13
}
int GRWFIL(fd, nbytes, buf, w_fd, w_nbytes, w_buf)
int *fd, *nbytes;
char *buf;
int w_fd, w_nbytes, w_buf;
{ return write(*fd, (void *)buf, *nbytes); }


x86 assembly (clang, -O0):
<GRWFIL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    $0x0,%al
call   1030 <write@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GRWFIL>:
mov    (%rdi),%edi
mov    (%rsi),%eax
mov    %rdx,%rsi
mov    %eax,%edx
xor    %eax,%eax
jmp    1030 <write@plt>

LLVM IR (-O0):
define i32 @GRWFIL(i32* %0, i32* %1, i8* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32* %0, i32** %7
store i32* %1, i32** %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %13
%15 = load i8*, i8** %9
%16 = load i32*, i32** %8
%17 = load i32, i32* %16
%18 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %14, i8* %15, i32 %17)
ret i32 %18
}

LLVM IR (-O2):
define i32 @GRWFIL(i32* nocapture %0, i32* nocapture %1, i8* %2, i32 %3, i32 %4, i32 %5) {
%7 = load i32, i32* %0
%8 = load i32, i32* %1
%9 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %7, i8* %2, i32 %8)
ret i32 %9
}
int dns_v_api(void) { return 0x20140612; }


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

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

LLVM IR (-O0):
define i32 @dns_v_api() {
ret i32 538183186
}

LLVM IR (-O2):
define i32 @dns_v_api() {
ret i32 538183186
}
/* Type definitions */
struct bst {
  int dummy;
};

/* Variables and functions */
struct bst *bst_leftmost(struct bst *);
struct bst *bst_first(struct bst *t) {
  return bst_leftmost(t);
}


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

x86 assembly (clang, -O2):
<bst_first>:
jmp    1030 <bst_leftmost@plt>

LLVM IR (-O0):
%struct.bst = type { i32 }
define %struct.bst* @bst_first(%struct.bst* %0) {
%2 = alloca %struct.bst*
store %struct.bst* %0, %struct.bst** %2
%3 = load %struct.bst*, %struct.bst** %2
%4 = call %struct.bst* @bst_leftmost(%struct.bst* %3)
ret %struct.bst* %4
}

LLVM IR (-O2):
%struct.bst = type { i32 }
define %struct.bst* @bst_first(%struct.bst* %0) {
%2 = tail call %struct.bst* @bst_leftmost(%struct.bst* %0)
ret %struct.bst* %2
}
void ff_hevc_put_hevc_bi_epel_v12_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_v12_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IIRSOS(float *, int, float *, int, int, int);
scalar_t__ malloc(int);
float *filterdata(float *signal, int sig_length) {
  float *temp = (float *)malloc(sizeof(float) * sig_length);
  IIRSOS(signal, sig_length, temp, 128, 1000, 1);
  return temp;
}


x86 assembly (clang, -O0):
<filterdata>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    $0x80,%ecx
mov    $0x3e8,%r8d
mov    $0x1,%r9d
call   1040 <IIRSOS@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filterdata>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x0(,%r15,4),%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %r15d,%esi
mov    %rax,%rdx
mov    $0x80,%ecx
mov    $0x3e8,%r8d
mov    $0x1,%r9d
call   1040 <IIRSOS@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define float* @filterdata(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
%5 = alloca float*
store float* %0, float** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = mul i64 4, %7
%9 = trunc i64 %8 to i32
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to float*
store float* %11, float** %5
%12 = load float*, float** %3
%13 = load i32, i32* %4
%14 = load float*, float** %5
%15 = call i32 @IIRSOS(float* %12, i32 %13, float* %14, i32 128, i32 1000, i32 1)
%16 = load float*, float** %5
ret float* %16
}

LLVM IR (-O2):
define float* @filterdata(float* %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to float*
%6 = tail call i32 @IIRSOS(float* %0, i32 %1, float* %5, i32 128, i32 1000, i32 1)
ret float* %5
}