xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, unsigned char *);
int strlen(char *);
unsigned char *get_string(unsigned char *buffer, char *mystring) {
  if (mystring)
    strcpy(mystring, buffer);
  return buffer + strlen(mystring) + 1;
}


x86 assembly (clang, -O0):
<get_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1148 <get_string+0x28>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x1,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_string>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
test   %rsi,%rsi
je     113a <get_string+0x1a>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
add    %r14,%rax
add    $0x1,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @get_string(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @strcpy(i8* %1, i8* %0)
br label %6
6: ; preds = %4, %2
%7 = tail call i32 @strlen(i8* %1)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = getelementptr inbounds i8, i8* %9, i64 1
ret i8* %10
}
/* Variables and functions */
void foobar() {}


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

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

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

LLVM IR (-O2):
define void @foobar() {
ret void
}
/* Variables and functions */
void *h(size_t);
void *i(size_t n) { return h(n); }


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

x86 assembly (clang, -O2):
<i>:
jmp    1030 <h@plt>

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

LLVM IR (-O2):
define i8* @i(i64 %0) {
%2 = tail call i8* @h(i64 %0)
ret i8* %2
}
void gtk_text_view_get_justification() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_view_get_justification() {
ret void
}
/* Variables and functions */
scalar_t__ __builtin_llceilf(float);
int /*<<< orphan*/ link_failure_builtin_llceilf();
void test_builtin_llceilf(float f) {
  if (__builtin_llceilf(f) != __builtin_llceilf(f))
    link_failure_builtin_llceilf();
}


x86 assembly (clang, -O0):
<test_builtin_llceilf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <__builtin_llceilf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <__builtin_llceilf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_builtin_llceilf+0x3c>
mov    $0x0,%al
call   1030 <link_failure_builtin_llceilf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_llceilf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1040 <__builtin_llceilf@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1040 <__builtin_llceilf@plt>
cmp    %rax,%rbx
jne    1149 <test_builtin_llceilf+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_builtin_llceilf@plt>

LLVM IR (-O0):
define void @test_builtin_llceilf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @__builtin_llceilf(float %3)
%5 = load float, float* %2
%6 = call i64 @__builtin_llceilf(float %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_builtin_llceilf()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_builtin_llceilf(float %0) {
%2 = tail call i64 @__builtin_llceilf(float %0)
%3 = tail call i64 @__builtin_llceilf(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_builtin_llceilf()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  unsigned int i;
  i = 0;
  float *p;
  p = (float *)&i;
  float f = *p;
  assert(f == 0.0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float*
%3 = alloca float
store i32 0, i32* %1
%4 = bitcast i32* %1 to float*
store float* %4, float** %2
%5 = load float*, float** %2
%6 = load float, float* %5
store float %6, float* %3
%7 = load float, float* %3
%8 = fpext float %7 to double
%9 = fcmp oeq double %8, 0.000000e+00
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_UNBLOCK;
int sys_sigprocmask(int /*<<< orphan*/ const *, int /*<<< orphan*/);
int sys_sigunblock(const sigset_t *set) {
  return sys_sigprocmask(set, SIG_UNBLOCK);
}


x86 assembly (clang, -O0):
<sys_sigunblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
call   1030 <sys_sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_sigunblock>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <sys_sigprocmask@plt>

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

LLVM IR (-O2):
@SIG_UNBLOCK = global i32 0
define i32 @sys_sigunblock(i32* %0) {
%2 = load i32, i32* @SIG_UNBLOCK
%3 = tail call i32 @sys_sigprocmask(i32* %0, i32 %2)
ret i32 %3
}
void swap(char *str1, char *str2) {
  char *temp = str1;
  str1 = str2;
  str2 = temp;
}


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

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

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

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i8* nocapture %1) {
ret void
}
double func(double x, double y, double z) { return x * x + y * y + z * z - .8; }


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xeb7(%rip),%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm2
addsd  %xmm2,%xmm0
addsd  0xee4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @func(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %4
%9 = load double, double* %5
%10 = load double, double* %5
%11 = fmul double %9, %10
%12 = call double @llvm.fmuladd.f64(double %7, double %8, double %11)
%13 = load double, double* %6
%14 = load double, double* %6
%15 = call double @llvm.fmuladd.f64(double %13, double %14, double %12)
%16 = fsub double %15, 8.000000e-01
ret double %16
}

LLVM IR (-O2):
define double @func(double %0, double %1, double %2) {
%4 = fmul double %1, %1
%5 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %4)
%6 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %5)
%7 = fadd double %6, -8.000000e-01
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int syscall_userfaultfd(int flags) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<syscall_userfaultfd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec1(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall_userfaultfd>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @syscall_userfaultfd(i32 %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32 -1
}
/* Type definitions */
struct in_addr {
  scalar_t__ s_addr;
};

/* Variables and functions */
scalar_t__ INADDR_NONE;
scalar_t__ inet_addr(char const *);
int read_ip_addr(struct in_addr *in_addr, const char *str) {
  in_addr->s_addr = inet_addr(str);
  if (in_addr->s_addr == INADDR_NONE)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<read_ip_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <inet_addr@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x2ea7(%rip),%rcx
cmp    (%rcx),%rax
jne    1156 <read_ip_addr+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <read_ip_addr+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_ip_addr>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <inet_addr@plt>
mov    %rax,(%rbx)
mov    0x2ec2(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
sete   %cl
neg    %ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.in_addr = type { i64 }
@INADDR_NONE = global i64 0
define i32 @read_ip_addr(%struct.in_addr* %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.in_addr*
%5 = alloca i8*
store %struct.in_addr* %0, %struct.in_addr** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = call i64 @inet_addr(i8* %6)
%8 = load %struct.in_addr*, %struct.in_addr** %4
%9 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %8, i32 0, i32 0
store i64 %7, i64* %9
%10 = load %struct.in_addr*, %struct.in_addr** %4
%11 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %10, i32 0, i32 0
%12 = load i64, i64* %11
%13 = load i64, i64* @INADDR_NONE
%14 = icmp eq i64 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 -1, i32* %3
br label %17
16: ; preds = %2
store i32 0, i32* %3
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
%struct.in_addr = type { i64 }
@INADDR_NONE = global i64 0
define i32 @read_ip_addr(%struct.in_addr* nocapture writeonly %0, i8* %1) {
%3 = tail call i64 @inet_addr(i8* %1)
%4 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %0, i64 0, i32 0
store i64 %3, i64* %4
%5 = load i64, i64* @INADDR_NONE
%6 = icmp eq i64 %3, %5
%7 = sext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float const, float const);
void glmPrintVector2f(const float v[2]) { printf("[%f,%f]", v[0], v[1]); }


x86 assembly (clang, -O0):
<glmPrintVector2f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmPrintVector2f>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"[%f,%f]\00"
define void @glmPrintVector2f(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %2, float %4)
ret void
}
/* Variables and functions */
int recv(int, char *, int, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  char buffer[6];
  int sock = 0;
  int count = recv(sock, buffer, 6, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
lea    -0x16(%rbp),%rsi
mov    $0x6,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,-0x20(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x2(%rsp),%rsi
xor    %edi,%edi
mov    $0x6,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [6 x i8]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
%9 = load i32, i32* %7
%10 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%11 = call i32 @recv(i32 %9, i8* %10, i32 6, i32 0)
store i32 %11, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x i8]
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%5 = call i32 @recv(i32 0, i8* %4, i32 6, i32 0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
long double wcstox(int /*<<< orphan*/ const *, int /*<<< orphan*/ **, int);
long double wcstold(const wchar_t *restrict s, wchar_t **restrict p) {
  return wcstox(s, p, 2);
}


x86 assembly (clang, -O0):
<wcstold>:
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    $0x2,%edx
call   1030 <wcstox@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcstold>:
mov    $0x2,%edx
jmp    1030 <wcstox@plt>

LLVM IR (-O0):
define x86_fp80 @wcstold(i32* noalias %0, i32** noalias %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 = call x86_fp80 @wcstox(i32* %5, i32** %6, i32 2)
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @wcstold(i32* noalias %0, i32** noalias %1) {
%3 = tail call x86_fp80 @wcstox(i32* %0, i32** %1, i32 2)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ AT91F_InitSdram();
void AT91F_InitMemories() {
  int *pEbi = (int *)0xFFFFFF60;
  pEbi = (int *)0xFFFFFF60;
  *pEbi = 0x00000002;
  pEbi = (int *)0xFFFFFF70;
  *pEbi = 0x00003284;
  AT91F_InitSdram();
}


x86 assembly (clang, -O0):
<AT91F_InitMemories>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xffffff60,%eax
mov    %rax,-0x8(%rbp)
mov    $0xffffff60,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
mov    $0xffffff70,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x3284,(%rax)
mov    $0x0,%al
call   1030 <AT91F_InitSdram@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AT91F_InitMemories>:
mov    $0xffffff60,%eax
movl   $0x2,(%rax)
movl   $0x3284,0x10(%rax)
xor    %eax,%eax
jmp    1030 <AT91F_InitSdram@plt>

LLVM IR (-O0):
define void @AT91F_InitMemories() {
%1 = alloca i32*
store i32* inttoptr (i64 4294967136 to i32*), i32** %1
store i32* inttoptr (i64 4294967136 to i32*), i32** %1
%2 = load i32*, i32** %1
store i32 2, i32* %2
store i32* inttoptr (i64 4294967152 to i32*), i32** %1
%3 = load i32*, i32** %1
store i32 12932, i32* %3
%4 = call i32 (...) @AT91F_InitSdram()
ret void
}

LLVM IR (-O2):
define void @AT91F_InitMemories() {
store i32 2, i32* inttoptr (i64 4294967136 to i32*)
store i32 12932, i32* inttoptr (i64 4294967152 to i32*)
%1 = tail call i32 (...) @AT91F_InitSdram()
ret void
}
/* Variables and functions */
char const *android_dlerror();
const char *hybris_dlerror(void) { return android_dlerror(); }


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

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

LLVM IR (-O0):
define i8* @hybris_dlerror() {
%1 = call i8* (...) @android_dlerror()
ret i8* %1
}

LLVM IR (-O2):
define i8* @hybris_dlerror() {
%1 = tail call i8* (...) @android_dlerror()
ret i8* %1
}
/* Type definitions */
struct dirent {
  scalar_t__ d_type;
};

/* Variables and functions */
scalar_t__ DT_REG;
int isFile(struct dirent *dir) { return (dir->d_type == DT_REG) ? 1 : 0; }


x86 assembly (clang, -O0):
<isFile>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
mov    0x2eca(%rip),%rax
mov    (%rax),%rsi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isFile>:
mov    (%rdi),%rcx
mov    0x2ed6(%rip),%rdx
xor    %eax,%eax
cmp    (%rdx),%rcx
sete   %al
ret

LLVM IR (-O0):
%struct.dirent = type { i64 }
@DT_REG = global i64 0
define i32 @isFile(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %2
%3 = load %struct.dirent*, %struct.dirent** %2
%4 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i32 0, i32 0
%5 = load i64, i64* %4
%6 = load i64, i64* @DT_REG
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 1, i32 0
ret i32 %9
}

LLVM IR (-O2):
%struct.dirent = type { i64 }
@DT_REG = global i64 0
define i32 @isFile(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i64, i64* %2
%4 = load i64, i64* @DT_REG
%5 = icmp eq i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ XCloseDisplay(int /*<<< orphan*/ *);
int /*<<< orphan*/ *XOpenDisplay(int /*<<< orphan*/ *);
int /*<<< orphan*/ XkbLockModifiers(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                    int, int);
int /*<<< orphan*/ XkbUseCoreKbd;
void set_modifier(int mod, int on) {
  Display *display = XOpenDisplay(NULL);
  XkbLockModifiers(display, XkbUseCoreKbd, mod, on ? mod : 0);
  XCloseDisplay(display);
}


x86 assembly (clang, -O0):
<set_modifier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <XOpenDisplay@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     117a <set_modifier+0x4a>
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    1184 <set_modifier+0x54>
xor    %eax,%eax
mov    %eax,-0x24(%rbp)
jmp    1184 <set_modifier+0x54>
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%ecx
call   1040 <XkbLockModifiers@plt>
mov    -0x10(%rbp),%rdi
call   1050 <XCloseDisplay@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_modifier>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%r14d
xor    %edi,%edi
call   1030 <XOpenDisplay@plt>
mov    %rax,%rbp
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
test   %ebx,%ebx
cmovne %r14d,%ebx
mov    %rbp,%rdi
mov    %r14d,%edx
mov    %ebx,%ecx
call   1040 <XkbLockModifiers@plt>
mov    %rbp,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <XCloseDisplay@plt>

LLVM IR (-O0):
@XkbUseCoreKbd = global i32 0
define void @set_modifier(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32* @XOpenDisplay(i32* null)
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = load i32, i32* @XkbUseCoreKbd
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i32, i32* %3
br label %15
14: ; preds = %2
br label %15
15: ; preds = %14, %12
%16 = phi i32 [ %13, %12 ], [ 0, %14 ]
%17 = call i32 @XkbLockModifiers(i32* %7, i32 %8, i32 %9, i32 %16)
%18 = load i32*, i32** %5
%19 = call i32 @XCloseDisplay(i32* %18)
ret void
}

LLVM IR (-O2):
@XkbUseCoreKbd = global i32 0
define void @set_modifier(i32 %0, i32 %1) {
%3 = tail call i32* @XOpenDisplay(i32* null)
%4 = load i32, i32* @XkbUseCoreKbd
%5 = icmp eq i32 %1, 0
%6 = select i1 %5, i32 0, i32 %0
%7 = tail call i32 @XkbLockModifiers(i32* %3, i32 %4, i32 %0, i32 %6)
%8 = tail call i32 @XCloseDisplay(i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ coap_daemon(void *);
void test_task(void *param) { coap_daemon(param); }


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

x86 assembly (clang, -O2):
<test_task>:
jmp    1030 <coap_daemon@plt>

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

LLVM IR (-O2):
define void @test_task(i8* %0) {
%2 = tail call i32 @coap_daemon(i8* %0)
ret void
}
const char *str_stmt_case() { return "case"; }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"case\00"
define i8* @str_stmt_case() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"case\00"
define i8* @str_stmt_case() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("PCIe benchmark (data copy only)");
  puts("\r\n");
  while (1) {
    if ((*(volatile unsigned int *)(0x30000000)) == 0) {
      int value = (*(volatile unsigned int *)(0x30000080));
      *(volatile unsigned int *)(0x30000090) = (value);
    }
  }
  puts("PCIe interface test finished");
  puts("\r\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
mov    $0x30000000,%eax
mov    (%rax),%eax
cmp    $0x0,%eax
jne    115b <main+0x4b>
mov    $0x30000080,%eax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x30000090,%eax
mov    %ecx,(%rax)
jmp    1137 <main+0x27>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefc(%rip),%rdi
call   1030 <puts@plt>
nopl   0x0(%rax)
cmpl   $0x0,0x30000000
jne    1130 <main+0x20>
mov    0x30000080,%eax
mov    %eax,0x30000090
jmp    1130 <main+0x20>

LLVM IR (-O0):
@.str = [32 x i8] c"PCIe benchmark (data copy only)\00"
@.str.1 = [3 x i8] c"\0D\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %0, %11
%6 = load volatile i32, i32* inttoptr (i64 805306368 to i32*)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load volatile i32, i32* inttoptr (i64 805306496 to i32*)
store i32 %9, i32* %2
%10 = load i32, i32* %2
store volatile i32 %10, i32* inttoptr (i64 805306512 to i32*)
br label %11
11: ; preds = %8, %5
br label %5
}

LLVM IR (-O2):
@.str = [32 x i8] c"PCIe benchmark (data copy only)\00"
@.str.1 = [3 x i8] c"\0D\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %3
3: ; preds = %8, %0
%4 = load volatile i32, i32* inttoptr (i64 805306368 to i32*)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = load volatile i32, i32* inttoptr (i64 805306496 to i32*)
store volatile i32 %7, i32* inttoptr (i64 805306512 to i32*)
br label %8
8: ; preds = %6, %3
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ track_stats(void *);
double always1(double _x, void *params) {
  track_stats(params);
  return 1;
}


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

x86 assembly (clang, -O2):
<always1>:
push   %rax
call   1030 <track_stats@plt>
movsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @always1(double %0, i8* %1) {
%3 = alloca double
%4 = alloca i8*
store double %0, double* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @track_stats(i8* %5)
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @always1(double %0, i8* %1) {
%3 = tail call i32 @track_stats(i8* %1)
ret double 1.000000e+00
}
/* Variables and functions */
int getLength(int *);
int *getHints(int *list) { return list + getLength(list) + 2; }


x86 assembly (clang, -O0):
<getHints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getLength@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x8,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getHints>:
push   %rbx
mov    %rdi,%rbx
call   1030 <getLength@plt>
cltq
lea    (%rbx,%rax,4),%rax
add    $0x8,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @getHints(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @getLength(i32* %4)
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %3, i64 %6
%8 = getelementptr inbounds i32, i32* %7, i64 2
ret i32* %8
}

LLVM IR (-O2):
define i32* @getHints(i32* %0) {
%2 = tail call i32 @getLength(i32* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = getelementptr inbounds i32, i32* %4, i64 2
ret i32* %5
}
/* Variables and functions */
int /*<<< orphan*/ bpf_error(char *);
int pfreason_to_num(const char *reason) {
  bpf_error("libpcap was compiled on a machine without pf support");
}


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

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

LLVM IR (-O0):
@.str = [53 x i8] c"libpcap was compiled on a machine without pf support\00"
define i32 @pfreason_to_num(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @bpf_error(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@.str = [53 x i8] c"libpcap was compiled on a machine without pf support\00"
define i32 @pfreason_to_num(i8* nocapture readnone %0) {
%2 = tail call i32 @bpf_error(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
void bitClear(unsigned int *x, int n) {
  int res, mask;
  mask = 1 << n;
  *x = *x & ~mask;
  return;
}


x86 assembly (clang, -O0):
<bitClear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
and    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitClear>:
mov    %esi,%ecx
mov    $0xfffffffe,%eax
rol    %cl,%eax
and    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @bitClear(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
%7 = load i32, i32* %4
%8 = shl i32 1, %7
store i32 %8, i32* %6
%9 = load i32*, i32** %3
%10 = load i32, i32* %9
%11 = load i32, i32* %6
%12 = xor i32 %11, -1
%13 = and i32 %10, %12
%14 = load i32*, i32** %3
store i32 %13, i32* %14
ret void
}

LLVM IR (-O2):
define void @bitClear(i32* nocapture %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = load i32, i32* %0
%5 = xor i32 %3, -1
%6 = and i32 %4, %5
store i32 %6, i32* %0
ret void
}
__attribute__((__no__)) void
do_nothing_small_hole_zero(struct test_small_hole *ptr) {
  if ((unsigned long)ptr > 0x2)
    return;
  else
    return;
}


x86 assembly (clang, -O0):
<do_nothing_small_hole_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x2,%rax
jbe    111b <do_nothing_small_hole_zero+0x1b>
jmp    1120 <do_nothing_small_hole_zero+0x20>
jmp    1120 <do_nothing_small_hole_zero+0x20>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.test_small_hole = type opaque
define void @do_nothing_small_hole_zero(%struct.test_small_hole* %0) {
%2 = alloca %struct.test_small_hole*
store %struct.test_small_hole* %0, %struct.test_small_hole** %2
%3 = load %struct.test_small_hole*, %struct.test_small_hole** %2
%4 = ptrtoint %struct.test_small_hole* %3 to i64
%5 = icmp ugt i64 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
%struct.test_small_hole = type opaque
define void @do_nothing_small_hole_zero(%struct.test_small_hole* nocapture %0) {
ret void
}
void Cassette_Finish(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ SYS_gettimeofday;
int syscall(int /*<<< orphan*/, struct timeval *, int /*<<< orphan*/ *);
int gettimeofday_syscall(struct timeval *tv) {
  return syscall(SYS_gettimeofday, tv, NULL);
}


x86 assembly (clang, -O0):
<gettimeofday_syscall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettimeofday_syscall>:
mov    %rdi,%rsi
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
@SYS_gettimeofday = global i32 0
define i32 @gettimeofday_syscall(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load i32, i32* @SYS_gettimeofday
%4 = load %struct.timeval*, %struct.timeval** %2
%5 = call i32 @syscall(i32 %3, %struct.timeval* %4, i32* null)
ret i32 %5
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
@SYS_gettimeofday = global i32 0
define i32 @gettimeofday_syscall(%struct.timeval* %0) {
%2 = load i32, i32* @SYS_gettimeofday
%3 = tail call i32 @syscall(i32 %2, %struct.timeval* %0, i32* null)
ret i32 %3
}
_Bool dt_valid_yqd(int y, int q, int d) {
  return ((q >= 1 && q <= 4) &&
          (d >= 1 && (d <= 90 || d <= dt_days_in_quarter(y, q))));
}


x86 assembly (clang, -O0):
<dt_valid_yqd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jl     1189 <dt_valid_yqd+0x79>
xor    %eax,%eax
cmpl   $0x4,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jg     1189 <dt_valid_yqd+0x79>
xor    %eax,%eax
cmpl   $0x1,-0xc(%rbp)
mov    %al,-0xe(%rbp)
jl     1183 <dt_valid_yqd+0x73>
mov    $0x1,%al
cmpl   $0x5a,-0xc(%rbp)
mov    %al,-0xf(%rbp)
jle    117d <dt_valid_yqd+0x6d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   1030 <dt_days_in_quarter@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
setle  %al
mov    %al,-0xf(%rbp)
mov    -0xf(%rbp),%al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dt_valid_yqd>:
push   %rbx
lea    -0x1(%rsi),%ecx
xor    %eax,%eax
cmp    $0x3,%ecx
ja     1134 <dt_valid_yqd+0x24>
mov    %edx,%ebx
test   %edx,%edx
jle    1134 <dt_valid_yqd+0x24>
mov    $0x1,%al
cmp    $0x5b,%ebx
jb     1134 <dt_valid_yqd+0x24>
xor    %eax,%eax
call   1030 <dt_days_in_quarter@plt>
cmp    %ebx,%eax
setge  %al
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i1 @dt_valid_yqd(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* %5
%8 = icmp sge i32 %7, 1
br i1 %8, label %9, label %28
9: ; preds = %3
%10 = load i32, i32* %5
%11 = icmp sle i32 %10, 4
br i1 %11, label %12, label %28
12: ; preds = %9
%13 = load i32, i32* %6
%14 = icmp sge i32 %13, 1
br i1 %14, label %15, label %26
15: ; preds = %12
%16 = load i32, i32* %6
%17 = icmp sle i32 %16, 90
br i1 %17, label %24, label %18
18: ; preds = %15
%19 = load i32, i32* %6
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = call i32 (i32, i32, ...) bitcast (i32 (...)* @dt_days_in_quarter to i32 (i32, i32, ...)*)(i32 %20, i32 %21)
%23 = icmp sle i32 %19, %22
br label %24
24: ; preds = %18, %15
%25 = phi i1 [ true, %15 ], [ %23, %18 ]
br label %26
26: ; preds = %24, %12
%27 = phi i1 [ false, %12 ], [ %25, %24 ]
br label %28
28: ; preds = %26, %9, %3
%29 = phi i1 [ false, %9 ], [ false, %3 ], [ %27, %26 ]
ret i1 %29
}

LLVM IR (-O2):
define zeroext i1 @dt_valid_yqd(i32 %0, i32 %1, i32 %2) {
%4 = add i32 %1, -1
%5 = icmp ult i32 %4, 4
%6 = icmp sgt i32 %2, 0
%7 = and i1 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = icmp ult i32 %2, 91
br i1 %9, label %13, label %10
10: ; preds = %8
%11 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @dt_days_in_quarter to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
%12 = icmp sge i32 %11, %2
br label %13
13: ; preds = %10, %8, %3
%14 = phi i1 [ false, %3 ], [ true, %8 ], [ %12, %10 ]
ret i1 %14
}
/* Variables and functions */
char *getenv(char *);
char *fdmi_param_get(char *param_name) {
  char *value;
  value = getenv(param_name);
  if (value != NULL) {
    return value;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<fdmi_param_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1141 <fdmi_param_get+0x31>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1149 <fdmi_param_get+0x39>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdmi_param_get>:
jmp    1030 <getenv@plt>

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

LLVM IR (-O2):
define i8* @fdmi_param_get(i8* nocapture %0) {
%2 = tail call i8* @getenv(i8* %0)
ret i8* %2
}
/* Variables and functions */
int SIGALRM;
int SIGVTALRM;
int /*<<< orphan*/ printf(char *);
void user_func(int sig) {
  if (sig == SIGALRM)
    printf("Catch a signal SIGALRM \n");
  else if (sig == SIGVTALRM)
    printf("Catch a signal SIGVTALRM\n");
}


x86 assembly (clang, -O0):
<user_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ec3(%rip),%rcx
cmp    (%rcx),%eax
jne    113e <user_func+0x2e>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
jmp    1161 <user_func+0x51>
mov    -0x4(%rbp),%eax
mov    0x2e90(%rip),%rcx
cmp    (%rcx),%eax
jne    115c <user_func+0x4c>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
jmp    1161 <user_func+0x51>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<user_func>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jne    1127 <user_func+0x17>
lea    0xef7(%rip),%rdi
jmp    1030 <puts@plt>
mov    0x2eaa(%rip),%rax
cmp    %edi,(%rax)
jne    113e <user_func+0x2e>
lea    0xec7(%rip),%rdi
jmp    1030 <puts@plt>
ret

LLVM IR (-O0):
@SIGALRM = global i32 0
@.str = [25 x i8] c"Catch a signal SIGALRM \0A\00"
@SIGVTALRM = global i32 0
@.str.1 = [26 x i8] c"Catch a signal SIGVTALRM\0A\00"
define void @user_func(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGALRM
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %15
8: ; preds = %1
%9 = load i32, i32* %2
%10 = load i32, i32* @SIGVTALRM
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %8
br label %15
15: ; preds = %14, %6
ret void
}

LLVM IR (-O2):
@SIGALRM = global i32 0
@SIGVTALRM = global i32 0
@str = [25 x i8] c"Catch a signal SIGVTALRM\00"
@str.2 = [24 x i8] c"Catch a signal SIGALRM \00"
define void @user_func(i32 %0) {
%2 = load i32, i32* @SIGALRM
%3 = icmp eq i32 %2, %0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = load i32, i32* @SIGVTALRM
%6 = icmp eq i32 %5, %0
br i1 %6, label %7, label %10
7: ; preds = %4, %1
%8 = phi i8* [ getelementptr inbounds ([24 x i8], [24 x i8]* @str.2, i64 0, i64 0), %1 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0), %4 ]
%9 = tail call i32 @puts(i8* dereferenceable(1) %8)
br label %10
10: ; preds = %7, %4
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t sha1_rol32(uint32_t number, uint8_t bits) {
  return ((number << bits) | (number >> (32 - bits)));
}


x86 assembly (clang, -O0):
<sha1_rol32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha1_rol32>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @sha1_rol32(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 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @sha1_rol32(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_usage(void) {
  printf("Usage: %s -hv | -f file [-o -m -k -x -d -e]\n\n"
         "Options:\n"
         "    -f, --file      backup stream file\n"
         "    -o, --obj       print object headers, including headers for\n"
         "                    deleted objects\n"
         "    -m, --meta      print object metadata\n"
         "    -k, --key       print object key\n"
         "    -x, --hexkey    print object key in hex\n"
         "    -d, --data      print object data\n"
         "    -e, --hexdata   print object data in hex\n"
         "    -v, --version   displays program version\n"
         "    -h, --help      displays help\n\n",
         "read_backup_stream");
  return;
}


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

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

LLVM IR (-O0):
@.str = [480 x i8] c"Usage: %s -hv | -f file [-o -m -k -x -d -e]\0A\0AOptions:\0A -f, --file backup stream file\0A -o, --obj print object headers, including headers for\0A deleted objects\0A -m, --meta print object metadata\0A -k, --key print object key\0A -x, --hexkey print object key in hex\0A -d, --data print object data\0A -e, --hexdata print object data in hex\0A -v, --version displays program version\0A -h, --help displays help\0A\0A\00"
@.str.1 = [19 x i8] c"read_backup_stream\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([480 x i8], [480 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [480 x i8] c"Usage: %s -hv | -f file [-o -m -k -x -d -e]\0A\0AOptions:\0A -f, --file backup stream file\0A -o, --obj print object headers, including headers for\0A deleted objects\0A -m, --meta print object metadata\0A -k, --key print object key\0A -x, --hexkey print object key in hex\0A -d, --data print object data\0A -e, --hexdata print object data in hex\0A -v, --version displays program version\0A -h, --help displays help\0A\0A\00"
@.str.1 = [19 x i8] c"read_backup_stream\00"
define void @print_usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([480 x i8], [480 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned short int f22(unsigned short int x, unsigned long int y) {
  return (x >> (8 * 2 - y)) ^ (x << y);
}


x86 assembly (clang, -O0):
<f22>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
mov    $0x10,%ecx
sub    -0x10(%rbp),%rcx
sar    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    -0x10(%rbp),%rcx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f22>:
mov    $0x10,%cl
sub    %sil,%cl
mov    %edi,%eax
shr    %cl,%eax
mov    %esi,%ecx
shl    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f22(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i64, i64* %4
%8 = sub i64 16, %7
%9 = trunc i64 %8 to i32
%10 = ashr i32 %6, %9
%11 = load i16, i16* %3
%12 = zext i16 %11 to i32
%13 = load i64, i64* %4
%14 = trunc i64 %13 to i32
%15 = shl i32 %12, %14
%16 = xor i32 %10, %15
%17 = trunc i32 %16 to i16
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @f22(i16 zeroext %0, i64 %1) {
%3 = zext i16 %0 to i32
%4 = trunc i64 %1 to i32
%5 = sub i32 16, %4
%6 = lshr i32 %3, %5
%7 = shl i32 %3, %4
%8 = xor i32 %6, %7
%9 = trunc i32 %8 to i16
ret i16 %9
}
/* Variables and functions */
int /*<<< orphan*/ machine_restart(char *);
void machine_emergency_restart(void) { machine_restart("emergency"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"emergency\00"
define void @machine_emergency_restart() {
%1 = call i32 @machine_restart(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"emergency\00"
define void @machine_emergency_restart() {
%1 = tail call i32 @machine_restart(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int hideme(int);
int rand();
int main(int argc, char **argv) {
  int r = rand();
  int s = hideme(r);
  return (r != s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <hideme@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <hideme@plt>
xor    %ecx,%ecx
cmp    %eax,%ebx
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 (...) @rand()
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = call i32 @hideme(i32 %9)
store i32 %10, i32* %7
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = icmp ne i32 %11, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @rand()
%4 = tail call i32 @hideme(i32 %3)
%5 = icmp ne i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}