xunge/DecIR huggingface dataset:
void TIM5_IRQHandler(void) {}


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

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

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

LLVM IR (-O2):
define void @TIM5_IRQHandler() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int RAND_MAX;
int random();
uint32_t gtpv1u_new_teid(void) {
  return random() + random() % (RAND_MAX - 1) + 1;
}


x86 assembly (clang, -O0):
<gtpv1u_new_teid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <random@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
mov    0x2eb8(%rip),%rcx
mov    (%rcx),%ecx
sub    $0x1,%ecx
cltd
idiv   %ecx
mov    -0x4(%rbp),%eax
add    %edx,%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtpv1u_new_teid>:
push   %rbx
xor    %eax,%eax
call   1030 <random@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <random@plt>
mov    0x2ec0(%rip),%rcx
mov    (%rcx),%ecx
add    $0xffffffff,%ecx
cltd
idiv   %ecx
lea    (%rbx,%rdx,1),%eax
add    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@RAND_MAX = global i32 0
define i32 @gtpv1u_new_teid() {
%1 = call i32 (...) @random()
%2 = call i32 (...) @random()
%3 = load i32, i32* @RAND_MAX
%4 = sub nsw i32 %3, 1
%5 = srem i32 %2, %4
%6 = add nsw i32 %1, %5
%7 = add nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
@RAND_MAX = global i32 0
define i32 @gtpv1u_new_teid() {
%1 = tail call i32 (...) @random()
%2 = tail call i32 (...) @random()
%3 = load i32, i32* @RAND_MAX
%4 = add nsw i32 %3, -1
%5 = srem i32 %2, %4
%6 = add i32 %1, 1
%7 = add i32 %6, %5
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ close_source();
int /*<<< orphan*/ init_ff();
int /*<<< orphan*/ init_tb_index();
int /*<<< orphan*/ read_source(char *);
int main(int argc, char *argv[]) {
  init_tb_index();
  init_ff();
  read_source(argv[1]);
  close_source();
  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)
mov    $0x0,%al
call   1050 <init_tb_index@plt>
mov    $0x0,%al
call   1030 <init_ff@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <read_source@plt>
mov    $0x0,%al
call   1060 <close_source@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
call   1050 <init_tb_index@plt>
xor    %eax,%eax
call   1030 <init_ff@plt>
mov    0x8(%rbx),%rdi
call   1040 <read_source@plt>
xor    %eax,%eax
call   1060 <close_source@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
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 (...) @init_tb_index()
%7 = call i32 (...) @init_ff()
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @read_source(i8* %10)
%12 = call i32 (...) @close_source()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 (...) @init_tb_index()
%4 = tail call i32 (...) @init_ff()
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @read_source(i8* %6)
%8 = tail call i32 (...) @close_source()
ret i32 0
}
int RECOIL_GetZxLineOffset(int y) {
  return ((y & 192) << 5) + ((y & 7) << 8) + ((y & 56) << 2);
}


x86 assembly (clang, -O0):
<RECOIL_GetZxLineOffset>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xc0,%eax
shl    $0x5,%eax
mov    -0x4(%rbp),%ecx
and    $0x7,%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0x38,%ecx
shl    $0x2,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RECOIL_GetZxLineOffset>:
mov    %edi,%eax
shl    $0x5,%eax
and    $0x1800,%eax
mov    %edi,%ecx
and    $0x7,%ecx
shl    $0x8,%ecx
or     %eax,%ecx
and    $0x38,%edi
lea    (%rcx,%rdi,4),%eax
ret

LLVM IR (-O0):
define i32 @RECOIL_GetZxLineOffset(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 192
%5 = shl i32 %4, 5
%6 = load i32, i32* %2
%7 = and i32 %6, 7
%8 = shl i32 %7, 8
%9 = add nsw i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 56
%12 = shl i32 %11, 2
%13 = add nsw i32 %9, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @RECOIL_GetZxLineOffset(i32 %0) {
%2 = shl i32 %0, 5
%3 = and i32 %2, 6144
%4 = shl i32 %0, 8
%5 = and i32 %4, 1792
%6 = or i32 %3, %5
%7 = shl i32 %0, 2
%8 = and i32 %7, 224
%9 = or i32 %6, %8
ret i32 %9
}
double clo0(void *context) {
  if (context)
    return *((double *)context) + 6;
  return 6;
}


x86 assembly (clang, -O0):
<clo0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     112d <clo0+0x2d>
mov    -0x10(%rbp),%rax
movsd  0xee1(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113a <clo0+0x3a>
movsd  0xecb(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clo0>:
test   %rdi,%rdi
je     1112 <clo0+0x12>
movsd  (%rdi),%xmm0
addsd  0xeef(%rip),%xmm0
ret
movsd  0xee6(%rip),%xmm0
ret

LLVM IR (-O0):
define double @clo0(i8* %0) {
%2 = alloca double
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to double*
%9 = load double, double* %8
%10 = fadd double %9, 6.000000e+00
store double %10, double* %2
br label %12
11: ; preds = %1
store double 6.000000e+00, double* %2
br label %12
12: ; preds = %11, %6
%13 = load double, double* %2
ret double %13
}

LLVM IR (-O2):
define double @clo0(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = bitcast i8* %0 to double*
%5 = load double, double* %4
%6 = fadd double %5, 6.000000e+00
br label %7
7: ; preds = %1, %3
%8 = phi double [ %6, %3 ], [ 6.000000e+00, %1 ]
ret double %8
}
int strcmp(s1, s2)
char *s1, *s2;
{
  while (*s1 == *s2++)
    if (*s1++ == '\0')
      return 0;
  return (*s1 - *--s2);
}


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

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

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %11, %9 ]
%5 = phi i8* [ %1, %2 ], [ %10, %9 ]
%6 = load i8, i8* %4
%7 = load i8, i8* %5
%8 = icmp eq i8 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = getelementptr inbounds i8, i8* %4, i64 1
%12 = icmp eq i8 %6, 0
br i1 %12, label %17, label %3
13: ; preds = %3
%14 = sext i8 %6 to i32
%15 = sext i8 %7 to i32
%16 = sub nsw i32 %14, %15
br label %17
17: ; preds = %9, %13
%18 = phi i32 [ %16, %13 ], [ 0, %9 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *getvec(size_t size) {
  void *mem = malloc(size);
  if (!mem) {
    fprintf(stderr, "Out of memory error!\n");
    exit(1);
  }
  return mem;
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Out of memory error!\0A\00"
define noalias i8* @getvec(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int read_until_delim(int, char *, size_t, int /*<<< orphan*/);
int get_str(int s, char *buf, size_t len) {
  int r = read_until_delim(s, buf, len, 0);
  if (r > 0)
    r--;
  return (r);
}


x86 assembly (clang, -O0):
<get_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <read_until_delim@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    114b <get_str+0x3b>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_str>:
push   %rax
xor    %ecx,%ecx
call   1030 <read_until_delim@plt>
xor    %ecx,%ecx
test   %eax,%eax
setg   %cl
sub    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @get_str(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @read_until_delim(i32 %0, i8* %1, i64 %2, i32 0)
%5 = icmp sgt i32 %4, 0
%6 = sext i1 %5 to i32
%7 = add nsw i32 %4, %6
ret i32 %7
}
void sayHello(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ MD5_Final(unsigned char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ MD5_Init(int /*<<< orphan*/ *);
int /*<<< orphan*/ MD5_Update(int /*<<< orphan*/ *, unsigned char const *,
                              unsigned int);
scalar_t__ strlen(char *);
void Curl_md5it(unsigned char *outbuffer, const unsigned char *input) {
  MD5_CTX ctx;
  MD5_Init(&ctx);
  MD5_Update(&ctx, input, (unsigned int)strlen((char *)input));
  MD5_Final(outbuffer, &ctx);
}


x86 assembly (clang, -O0):
<Curl_md5it>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
call   1050 <MD5_Init@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
lea    -0x14(%rbp),%rdi
call   1060 <MD5_Update@plt>
mov    -0x8(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <MD5_Final@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Curl_md5it>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xc(%rsp),%r15
mov    %r15,%rdi
call   1050 <MD5_Init@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1060 <MD5_Update@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <MD5_Final@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @Curl_md5it(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = call i32 @MD5_Init(i32* %5)
%7 = load i8*, i8** %4
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = trunc i64 %9 to i32
%11 = call i32 @MD5_Update(i32* %5, i8* %7, i32 %10)
%12 = load i8*, i8** %3
%13 = call i32 @MD5_Final(i8* %12, i32* %5)
ret void
}

LLVM IR (-O2):
define void @Curl_md5it(i8* %0, i8* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @MD5_Init(i32* %3)
%6 = call i64 @strlen(i8* dereferenceable(1) %1)
%7 = trunc i64 %6 to i32
%8 = call i32 @MD5_Update(i32* %3, i8* %1, i32 %7)
%9 = call i32 @MD5_Final(i8* %0, i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ArgText();
int /*<<< orphan*/ CNameOf(int /*<<< orphan*/);
int /*<<< orphan*/ Log(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ Me();
int /*<<< orphan*/ TextOf(int /*<<< orphan*/);
void Act_Bug(void) {
  Log("Bug Entry: %s - %s\n", CNameOf(Me()), TextOf(ArgText()));
}


x86 assembly (clang, -O0):
<Act_Bug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <Me@plt>
mov    %eax,%edi
call   1030 <CNameOf@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <ArgText@plt>
mov    %eax,%edi
call   1070 <TextOf@plt>
mov    -0x4(%rbp),%esi
mov    %eax,%edx
lea    0xe7d(%rip),%rdi
call   1050 <Log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Act_Bug>:
push   %rbx
xor    %eax,%eax
call   1060 <Me@plt>
mov    %eax,%edi
call   1030 <CNameOf@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <ArgText@plt>
mov    %eax,%edi
call   1070 <TextOf@plt>
lea    0xe8a(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
pop    %rbx
jmp    1050 <Log@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Bug Entry: %s - %s\0A\00"
define void @Act_Bug() {
%1 = call i32 (...) @Me()
%2 = call i32 @CNameOf(i32 %1)
%3 = call i32 (...) @ArgText()
%4 = call i32 @TextOf(i32 %3)
%5 = call i32 @Log(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Bug Entry: %s - %s\0A\00"
define void @Act_Bug() {
%1 = tail call i32 (...) @Me()
%2 = tail call i32 @CNameOf(i32 %1)
%3 = tail call i32 (...) @ArgText()
%4 = tail call i32 @TextOf(i32 %3)
%5 = tail call i32 @Log(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4)
ret void
}
int ceph_stable_mod(int x, int b, int bmask) {
  if ((x & bmask) < b)
    return x & bmask;
  else
    return x & (bmask >> 1);
}


x86 assembly (clang, -O0):
<ceph_stable_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    112a <ceph_stable_mod+0x2a>
mov    -0x8(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1138 <ceph_stable_mod+0x38>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
sar    $0x1,%ecx
and    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceph_stable_mod>:
mov    %edx,%eax
and    %edi,%eax
sar    %edx
and    %edi,%edx
cmp    %esi,%eax
cmovge %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @ceph_stable_mod(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %2, %0
%5 = icmp slt i32 %4, %1
%6 = ashr i32 %2, 1
%7 = and i32 %6, %0
%8 = select i1 %5, i32 %4, i32 %7
ret i32 %8
}
void RTAvlrooGCPtrGetRoot(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlrooGCPtrGetRoot() {
ret void
}
/* Variables and functions */
int XMain();
int oz_APIMain() { return XMain(); }


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

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

LLVM IR (-O0):
define i32 @oz_APIMain() {
%1 = call i32 (...) @XMain()
ret i32 %1
}

LLVM IR (-O2):
define i32 @oz_APIMain() {
%1 = tail call i32 (...) @XMain()
ret i32 %1
}
void workqueue_shutdown(void) {}


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

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

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

LLVM IR (-O2):
define void @workqueue_shutdown() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xlfail(char *);
void badfop(void) { xlfail("bad floating point operation"); }


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"bad floating point operation\00"
define void @badfop() {
%1 = call i32 @xlfail(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"bad floating point operation\00"
define void @badfop() {
%1 = tail call i32 @xlfail(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void UARTModemControlSet(uint32_t ui32Base, uint32_t ui32Control) {
  uint32_t ui32Temp;
  ASSERT(ui32Base == 0x4000D000);
  ASSERT((ui32Control & ~(0x00000800 | 0x00000400)) == 0);
  ui32Temp = (*((volatile uint32_t *)(ui32Base + 0x00000030)));
  ui32Temp |= (ui32Control & (0x00000800 | 0x00000400));
  (*((volatile uint32_t *)(ui32Base + 0x00000030))) = ui32Temp;
}


x86 assembly (clang, -O0):
<UARTModemControlSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x4000d000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%eax
and    $0xfffff3ff,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0xc00,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTModemControlSet>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x4000d000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
test   $0xfffff3ff,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rax
and    $0xc00,%ebx
or     %ebx,0x30(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @UARTModemControlSet(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 = icmp eq i32 %6, 1073795072
%8 = zext i1 %7 to i32
%9 = call i32 @ASSERT(i32 %8)
%10 = load i32, i32* %4
%11 = and i32 %10, -3073
%12 = icmp eq i32 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @ASSERT(i32 %13)
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 48
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
%19 = load volatile i32, i32* %18
store i32 %19, i32* %5
%20 = load i32, i32* %4
%21 = and i32 %20, 3072
%22 = load i32, i32* %5
%23 = or i32 %22, %21
store i32 %23, i32* %5
%24 = load i32, i32* %5
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 48
%27 = sext i32 %26 to i64
%28 = inttoptr i64 %27 to i32*
store volatile i32 %24, i32* %28
ret void
}

LLVM IR (-O2):
define void @UARTModemControlSet(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1073795072
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = and i32 %1, -3073
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
%9 = tail call i32 @ASSERT(i32 %8)
%10 = add nsw i32 %0, 48
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
%13 = load volatile i32, i32* %12
%14 = and i32 %1, 3072
%15 = or i32 %13, %14
store volatile i32 %15, i32* %12
ret void
}
signed int Thrd_extra_bit_information(signed int t) {
  signed int Byte_Count = 0;
  unsigned int return_value_Thrd_Get_Bits1$1;
  do {
    return_value_Thrd_Get_Bits1$1 = Thrd_Get_Bits1(t);
    if (return_value_Thrd_Get_Bits1$1 == 0u)
      goto __CPROVER_DUMP_L2;
    Thrd_Flush_Buffer(t, 8);
    Byte_Count = Byte_Count + 1;
  } while ((_Bool)1);
__CPROVER_DUMP_L2:;
  return Byte_Count;
}


x86 assembly (clang, -O0):
<Thrd_extra_bit_information>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <Thrd_Get_Bits1@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    114e <Thrd_extra_bit_information+0x2e>
jmp    117a <Thrd_extra_bit_information+0x5a>
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
mov    $0x0,%al
call   1040 <Thrd_Flush_Buffer@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1132 <Thrd_extra_bit_information+0x12>
jmp    1175 <Thrd_extra_bit_information+0x55>
jmp    117a <Thrd_extra_bit_information+0x5a>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Thrd_extra_bit_information>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <Thrd_Get_Bits1@plt>
test   %eax,%eax
je     115e <Thrd_extra_bit_information+0x3e>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebx,%edi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <Thrd_Flush_Buffer@plt>
add    $0x1,%ebp
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <Thrd_Get_Bits1@plt>
test   %eax,%eax
jne    1140 <Thrd_extra_bit_information+0x20>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Thrd_extra_bit_information(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %16, %1
%6 = load i32, i32* %2
%7 = call i32 (i32, ...) bitcast (i32 (...)* @Thrd_Get_Bits1 to i32 (i32, ...)*)(i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %5
br label %18
11: ; preds = %5
%12 = load i32, i32* %2
%13 = call i32 (i32, i32, ...) bitcast (i32 (...)* @Thrd_Flush_Buffer to i32 (i32, i32, ...)*)(i32 %12, i32 8)
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %16
16: ; preds = %11
br i1 true, label %5, label %17
17: ; preds = %16
br label %18
18: ; preds = %17, %10
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @Thrd_extra_bit_information(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @Thrd_Get_Bits1 to i32 (i32, ...)*)(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @Thrd_Flush_Buffer to i32 (i32, i32, ...)*)(i32 %0, i32 8)
%7 = add nuw nsw i32 %5, 1
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @Thrd_Get_Bits1 to i32 (i32, ...)*)(i32 %0)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %4
10: ; preds = %4, %1
%11 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %11
}
_Complex float f(float x, float y) {
  _Complex float z = {x, y};
  return z;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
movss  %xmm1,-0x18(%rbp)
movss  %xmm0,-0x14(%rbp)
movss  -0x18(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0x4(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
unpcklps %xmm1,%xmm0
ret

LLVM IR (-O0):
define <2 x float> @f(float %0, float %1) {
%3 = alloca { float, float }
%4 = alloca float
%5 = alloca float
%6 = alloca { float, float }
store float %0, float* %4
store float %1, float* %5
%7 = load float, float* %4
%8 = load float, float* %5
%9 = getelementptr inbounds { float, float }, { float, float }* %6, i32 0, i32 0
%10 = getelementptr inbounds { float, float }, { float, float }* %6, i32 0, i32 1
store float %7, float* %9
store float %8, float* %10
%11 = getelementptr inbounds { float, float }, { float, float }* %6, i32 0, i32 0
%12 = load float, float* %11
%13 = getelementptr inbounds { float, float }, { float, float }* %6, i32 0, i32 1
%14 = load float, float* %13
%15 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%16 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
store float %12, float* %15
store float %14, float* %16
%17 = bitcast { float, float }* %3 to <2 x float>*
%18 = load <2 x float>, <2 x float>* %17
ret <2 x float> %18
}

LLVM IR (-O2):
define <2 x float> @f(float %0, float %1) {
%3 = insertelement <2 x float> undef, float %0, i64 0
%4 = insertelement <2 x float> %3, float %1, i64 1
ret <2 x float> %4
}
double cos(double x) { return 0; }


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

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

LLVM IR (-O0):
define double @cos(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @cos(double %0) {
ret double 0.000000e+00
}
void MPI_Irecv() {}


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

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

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

LLVM IR (-O2):
define void @MPI_Irecv() {
ret void
}
double OP_Add(double op1, double op2) { return op1 + op2; }


x86 assembly (clang, -O0):
<OP_Add>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP_Add>:
addsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @OP_Add(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
double kub(int x) { return x * x * x; }


x86 assembly (clang, -O0):
<kub>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<kub>:
mov    %edi,%eax
imul   %edi,%eax
imul   %edi,%eax
cvtsi2sd %eax,%xmm0
ret

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

LLVM IR (-O2):
define double @kub(i32 %0) {
%2 = mul nsw i32 %0, %0
%3 = mul nsw i32 %2, %0
%4 = sitofp i32 %3 to double
ret double %4
}
void __div0(void) {
  extern void hang(void);
  hang();
}


x86 assembly (clang, -O0):
<__div0>:
push   %rbp
mov    %rsp,%rbp
call   1030 <hang@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__div0>:
jmp    1030 <hang@plt>

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

LLVM IR (-O2):
define void @__div0() {
tail call void @hang()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_no_vowels(char const *const);
int /*<<< orphan*/ printf(char *, ...);
void test(const char *const s) {
  printf("Input  : %s\n", s);
  printf("Output : ");
  print_no_vowels(s);
  printf("\n");
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <print_no_vowels@plt>
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1050 <print_no_vowels@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Input : %s\0A\00"
@.str.1 = [10 x i8] c"Output : \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @test(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%6 = load i8*, i8** %2
%7 = call i32 @print_no_vowels(i8* %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Input : %s\0A\00"
@.str.1 = [10 x i8] c"Output : \00"
define void @test(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @print_no_vowels(i8* %0)
%5 = tail call i32 @putchar(i32 10)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ bitmap_unit;
};
typedef TYPE_1__ XImage;

/* Variables and functions */
int get_XImage_bitmap_unit(void *_p) {
  return (int)((XImage *)_p)->bitmap_unit;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XImage_bitmap_unit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XImage_bitmap_unit(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_realpath() {
  printf("NOT IMPLEMENTED:"
         "pa_realpath"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"NOT IMPLEMENTED:pa_realpath\0A\00"
define i32 @pa_realpath() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [28 x i8] c"NOT IMPLEMENTED:pa_realpath\00"
define i32 @pa_realpath() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
float rand();
int main(int argc, char **argv) {
  float x = rand();
  float y = rand();
  return (int)(x * y) + (x / y) + (x - y);
}


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   1030 <rand@plt>
movss  %xmm0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
mulss  -0x18(%rbp),%xmm0
cvttss2si %xmm0,%eax
cvtsi2ss %eax,%xmm0
movss  -0x14(%rbp),%xmm1
divss  -0x18(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm1
subss  -0x18(%rbp),%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
movss  0x4(%rsp),%xmm3
movaps %xmm3,%xmm1
mulss  %xmm0,%xmm1
cvttps2dq %xmm1,%xmm1
cvtdq2ps %xmm1,%xmm1
movaps %xmm3,%xmm2
divss  %xmm0,%xmm2
addss  %xmm1,%xmm2
subss  %xmm0,%xmm3
addss  %xmm2,%xmm3
cvttss2si %xmm3,%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 float
%7 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call float (...) @rand()
store float %8, float* %6
%9 = call float (...) @rand()
store float %9, float* %7
%10 = load float, float* %6
%11 = load float, float* %7
%12 = fmul float %10, %11
%13 = fptosi float %12 to i32
%14 = sitofp i32 %13 to float
%15 = load float, float* %6
%16 = load float, float* %7
%17 = fdiv float %15, %16
%18 = fadd float %14, %17
%19 = load float, float* %6
%20 = load float, float* %7
%21 = fsub float %19, %20
%22 = fadd float %18, %21
%23 = fptosi float %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call float (...) @rand()
%4 = tail call float (...) @rand()
%5 = fmul float %3, %4
%6 = fptosi float %5 to i32
%7 = sitofp i32 %6 to float
%8 = fdiv float %3, %4
%9 = fadd float %8, %7
%10 = fsub float %3, %4
%11 = fadd float %10, %9
%12 = fptosi float %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void beep(void) { putchar('\007'); }


x86 assembly (clang, -O0):
<beep>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
call   1030 <putchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<beep>:
mov    $0x7,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @beep() {
%1 = call i32 @putchar(i8 signext 7)
ret void
}

LLVM IR (-O2):
define void @beep() {
%1 = tail call i32 @putchar(i8 signext 7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ strcmp(char *, char *);
void palindrome(char *str, char *strr) {
  if (strcmp(str, strr) == 0) {
    printf("The word is a palindrome.\n");
  } else {
    printf("The word is not a palindrome.\n");
  }
}


x86 assembly (clang, -O0):
<palindrome>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1158 <palindrome+0x38>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
jmp    1164 <palindrome+0x44>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<palindrome>:
push   %rax
call   1040 <strcmp@plt>
test   %rax,%rax
lea    0xeee(%rip),%rax
lea    0xec9(%rip),%rdi
cmove  %rax,%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"The word is a palindrome.\0A\00"
@.str.1 = [31 x i8] c"The word is not a palindrome.\0A\00"
define void @palindrome(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %13
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
ret void
}

LLVM IR (-O2):
@str = [30 x i8] c"The word is not a palindrome.\00"
@str.2 = [26 x i8] c"The word is a palindrome.\00"
define void @palindrome(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret void
}
int compare_for_k_min(const void *v1, const void *v2) {
  return *(*(float **)v1) > *(*(float **)v2) ? 1 : -1;
}


x86 assembly (clang, -O0):
<compare_for_k_min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movss  (%rax),%xmm1
mov    $0xffffffff,%eax
mov    $0x1,%ecx
ucomiss %xmm1,%xmm0
cmova  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_for_k_min>:
mov    (%rdi),%rax
movss  (%rax),%xmm0
mov    (%rsi),%rax
xor    %ecx,%ecx
ucomiss (%rax),%xmm0
seta   %cl
lea    (%rcx,%rcx,1),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @compare_for_k_min(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to float**
%7 = load float*, float** %6
%8 = load float, float* %7
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to float**
%11 = load float*, float** %10
%12 = load float, float* %11
%13 = fcmp ogt float %8, %12
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 1, i32 -1
ret i32 %15
}

LLVM IR (-O2):
define i32 @compare_for_k_min(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float**
%4 = load float*, float** %3
%5 = load float, float* %4
%6 = bitcast i8* %1 to float**
%7 = load float*, float** %6
%8 = load float, float* %7
%9 = fcmp ogt float %5, %8
%10 = select i1 %9, i32 1, i32 -1
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ _cause(int);
void _cause_bp() { _cause(5); }


x86 assembly (clang, -O0):
<_cause_bp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <_cause@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cause_bp>:
mov    $0x5,%edi
jmp    1030 <_cause@plt>

LLVM IR (-O0):
define void @_cause_bp() {
%1 = call i32 @_cause(i32 5)
ret void
}

LLVM IR (-O2):
define void @_cause_bp() {
%1 = tail call i32 @_cause(i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
void print_marker(const char *marker, const char *descr) {
  printf("%s : %s\n", marker, descr);
}


x86 assembly (clang, -O0):
<print_marker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_marker>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"%s : %s\0A\00"
define void @print_marker(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
scalar_t__ isdigit(char const);
int alldigits(const char *s) {
  while (isdigit(*s))
    s++;
  return *s == '\0';
}


x86 assembly (clang, -O0):
<alldigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1143 <alldigits+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <alldigits+0xc>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alldigits>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%edi
call   1030 <isdigit@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1120 <alldigits+0x10>
xor    %eax,%eax
cmpb   $0x0,-0x1(%rbx)
sete   %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @alldigits(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isdigit(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = load i8, i8* %3
%10 = icmp eq i8 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int delaunay_reduce_2D(double **, double **, int const, double const);
int del_delaunay_reduce_2D(double min_lattice[3][3], double lattice[3][3],
                           const int unique_axis, const double symprec) {
  ;
  return delaunay_reduce_2D(min_lattice, lattice, unique_axis, symprec);
}


x86 assembly (clang, -O0):
<del_delaunay_reduce_2D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
movsd  -0x20(%rbp),%xmm0
call   1030 <delaunay_reduce_2D@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<del_delaunay_reduce_2D>:
jmp    1030 <delaunay_reduce_2D@plt>

LLVM IR (-O0):
define i32 @del_delaunay_reduce_2D([3 x double]* %0, [3 x double]* %1, i32 %2, double %3) {
%5 = alloca [3 x double]*
%6 = alloca [3 x double]*
%7 = alloca i32
%8 = alloca double
store [3 x double]* %0, [3 x double]** %5
store [3 x double]* %1, [3 x double]** %6
store i32 %2, i32* %7
store double %3, double* %8
%9 = load [3 x double]*, [3 x double]** %5
%10 = bitcast [3 x double]* %9 to double**
%11 = load [3 x double]*, [3 x double]** %6
%12 = bitcast [3 x double]* %11 to double**
%13 = load i32, i32* %7
%14 = load double, double* %8
%15 = call i32 @delaunay_reduce_2D(double** %10, double** %12, i32 %13, double %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @del_delaunay_reduce_2D([3 x double]* %0, [3 x double]* %1, i32 %2, double %3) {
%5 = bitcast [3 x double]* %0 to double**
%6 = bitcast [3 x double]* %1 to double**
%7 = tail call i32 @delaunay_reduce_2D(double** %5, double** %6, i32 %2, double %3)
ret i32 %7
}
/* Variables and functions */
unsigned short si475xFMRX_get_frequency();
unsigned short si47xxFMRX_get_frequency(void) {
  return si475xFMRX_get_frequency();
}


x86 assembly (clang, -O0):
<si47xxFMRX_get_frequency>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <si475xFMRX_get_frequency@plt>
movzwl %ax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @si47xxFMRX_get_frequency() {
%1 = call zeroext i16 (...) @si475xFMRX_get_frequency()
ret i16 %1
}

LLVM IR (-O2):
define zeroext i16 @si47xxFMRX_get_frequency() {
%1 = tail call zeroext i16 (...) @si475xFMRX_get_frequency()
ret i16 %1
}
/* Type definitions */
struct timeval {
  long long tv_usec;
  scalar_t__ tv_sec;
};
typedef long long int64_t;

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int64_t get_ts(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (int64_t)tv.tv_sec * 1000000LL + tv.tv_usec;
}


x86 assembly (clang, -O0):
<get_ts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x8(%rbp),%rax
add    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ts>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x10(%rsp),%rax
add    0x8(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @get_ts() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = mul nsw i64 %4, 1000000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = add nsw i64 %5, %7
ret i64 %8
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @get_ts() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
ret i64 %9
}