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

/* Variables and functions */
scalar_t__ ENOENT;
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
scalar_t__ errno;
int /*<<< orphan*/ *opendir(char *);
int is_it_a_directory(char *localfile) {
  DIR *dir;
  dir = opendir(localfile);
  if (dir != NULL) {
    closedir(dir);
    return (1);
  } else if (ENOENT == errno) {
    return (0);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<is_it_a_directory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1159 <is_it_a_directory+0x39>
mov    -0x18(%rbp),%rdi
call   1040 <closedir@plt>
movl   $0x1,-0x4(%rbp)
jmp    1186 <is_it_a_directory+0x66>
mov    0x2e70(%rip),%rax
mov    (%rax),%rax
mov    0x2e76(%rip),%rcx
cmp    (%rcx),%rax
jne    117f <is_it_a_directory+0x5f>
movl   $0x0,-0x4(%rbp)
jmp    1186 <is_it_a_directory+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_it_a_directory>:
push   %rax
call   1030 <opendir@plt>
test   %rax,%rax
je     113a <is_it_a_directory+0x1a>
mov    %rax,%rdi
call   1040 <closedir@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOENT = global i64 0
@errno = global i64 0
define i32 @is_it_a_directory(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @opendir(i8* %5)
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32*, i32** %4
%11 = call i32 @closedir(i32* %10)
store i32 1, i32* %2
br label %18
12: ; preds = %1
%13 = load i64, i64* @ENOENT
%14 = load i64, i64* @errno
%15 = icmp eq i64 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 0, i32* %2
br label %18
17: ; preds = %12
store i32 0, i32* %2
br label %18
18: ; preds = %17, %16, %9
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@ENOENT = global i64 0
@errno = global i64 0
define i32 @is_it_a_directory(i8* nocapture %0) {
%2 = tail call i32* @opendir(i8* %0)
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @closedir(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *baby(void *arg) {
  printf("\n   Baby bird beginning");
  printf("\n   Baby bird finishing");
  return (NULL);
}


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

x86 assembly (clang, -O2):
<baby>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"\0A Baby bird beginning\00"
@.str.1 = [24 x i8] c"\0A Baby bird finishing\00"
define i8* @baby(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [24 x i8] c"\0A Baby bird beginning\00"
@.str.1 = [24 x i8] c"\0A Baby bird finishing\00"
define noalias i8* @baby(i8* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret i8* null
}
/* Variables and functions */
scalar_t__ malloc(int);
void foo2() {
  int **p = (int **)malloc(20);
  p++;
  { int ***q = (int ***)p; }
}


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x14,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo2>:
mov    $0x14,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define void @foo2() {
%1 = alloca i32**
%2 = alloca i32***
%3 = call i64 @malloc(i32 20)
%4 = inttoptr i64 %3 to i32**
store i32** %4, i32*** %1
%5 = load i32**, i32*** %1
%6 = getelementptr inbounds i32*, i32** %5, i32 1
store i32** %6, i32*** %1
%7 = load i32**, i32*** %1
%8 = bitcast i32** %7 to i32***
store i32*** %8, i32**** %2
ret void
}

LLVM IR (-O2):
define void @foo2() {
%1 = tail call i64 @malloc(i32 20)
ret void
}
int isquare(int x) { return (x * x); }


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

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

LLVM IR (-O0):
define i32 @isquare(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
ret i32 %5
}

LLVM IR (-O2):
define i32 @isquare(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
void print_EOF() { printf("%d", EOF); }


x86 assembly (clang, -O0):
<print_EOF>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_EOF>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@EOF = global i32 0
define void @print_EOF() {
%1 = load i32, i32* @EOF
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@EOF = global i32 0
define void @print_EOF() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ rol(scalar_t__, int);
void round(uint32_t *a, uint32_t b, uint32_t *c, uint32_t d, uint32_t e,
           uint32_t f, uint32_t x, uint32_t k, int r) {
  *a = rol(*a + f + x + k, r) + e;
  *c = rol(*c, 10);
}


x86 assembly (clang, -O0):
<round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
add    -0x30(%rbp),%rdi
add    0x10(%rbp),%rdi
add    0x18(%rbp),%rdi
mov    0x20(%rbp),%esi
call   1030 <rol@plt>
mov    %rax,%rcx
add    -0x28(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    $0xa,%esi
call   1030 <rol@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<round>:
push   %r15
push   %r14
push   %rbx
mov    %r8,%r14
mov    %rdx,%r15
mov    %rdi,%rbx
mov    0x30(%rsp),%esi
add    0x20(%rsp),%r9
add    0x28(%rsp),%r9
add    (%rdi),%r9
mov    %r9,%rdi
call   1030 <rol@plt>
add    %r14,%rax
mov    %rax,(%rbx)
mov    (%r15),%rdi
mov    $0xa,%esi
call   1030 <rol@plt>
mov    %rax,(%r15)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @round(i64* %0, i64 %1, i64* %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i32 %8) {
%10 = alloca i64*
%11 = alloca i64
%12 = alloca i64*
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i32
store i64* %0, i64** %10
store i64 %1, i64* %11
store i64* %2, i64** %12
store i64 %3, i64* %13
store i64 %4, i64* %14
store i64 %5, i64* %15
store i64 %6, i64* %16
store i64 %7, i64* %17
store i32 %8, i32* %18
%19 = load i64*, i64** %10
%20 = load i64, i64* %19
%21 = load i64, i64* %15
%22 = add nsw i64 %20, %21
%23 = load i64, i64* %16
%24 = add nsw i64 %22, %23
%25 = load i64, i64* %17
%26 = add nsw i64 %24, %25
%27 = load i32, i32* %18
%28 = call i64 @rol(i64 %26, i32 %27)
%29 = load i64, i64* %14
%30 = add nsw i64 %28, %29
%31 = load i64*, i64** %10
store i64 %30, i64* %31
%32 = load i64*, i64** %12
%33 = load i64, i64* %32
%34 = call i64 @rol(i64 %33, i32 10)
%35 = load i64*, i64** %12
store i64 %34, i64* %35
ret void
}

LLVM IR (-O2):
define void @round(i64* nocapture %0, i64 %1, i64* nocapture %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i32 %8) {
%10 = load i64, i64* %0
%11 = add i64 %6, %5
%12 = add i64 %11, %7
%13 = add i64 %12, %10
%14 = tail call i64 @rol(i64 %13, i32 %8)
%15 = add nsw i64 %14, %4
store i64 %15, i64* %0
%16 = load i64, i64* %2
%17 = tail call i64 @rol(i64 %16, i32 10)
store i64 %17, i64* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ displayRenderer(char *);
int main() {
  displayRenderer("material");
  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 <displayRenderer@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <displayRenderer@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"material\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @displayRenderer(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"material\00"
define i32 @main() {
%1 = tail call i32 @displayRenderer(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void foo(void) { asm("# " : : : "ebx"); }


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

x86 assembly (clang, -O2):
<foo>:
push   %rbx
pop    %rbx
ret

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

LLVM IR (-O2):
define void @foo() {
tail call void asm sideeffect "# ", "~{ebx},~{dirflag},~{fpsr},~{flags}"()
ret void
}
int nxtd_bt_connect(struct nxtd_nxt_bt *nxt) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.nxtd_nxt_bt = type opaque
define i32 @nxtd_bt_connect(%struct.nxtd_nxt_bt* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Conversion(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("请输入一个十进制数：\n");
  scanf("%d", &n);
  printf("转换后的八进制数为：\n");
  Conversion(n);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <Conversion@plt>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xebb(%rip),%rdi
call   1040 <puts@plt>
lea    0xeac(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
lea    0xebd(%rip),%rdi
call   1040 <puts@plt>
mov    0x4(%rsp),%edi
call   1050 <Conversion@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E4\B8\80\E4\B8\AA\E5\8D\81\E8\BF\9B\E5\88\B6\E6\95\B0\EF\BC\9A\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [32 x i8] c"\E8\BD\AC\E6\8D\A2\E5\90\8E\E7\9A\84\E5\85\AB\E8\BF\9B\E5\88\B6\E6\95\B0\E4\B8\BA\EF\BC\9A\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = call i32 @Conversion(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [31 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E4\B8\80\E4\B8\AA\E5\8D\81\E8\BF\9B\E5\88\B6\E6\95\B0\EF\BC\9A\00"
@str.4 = [31 x i8] c"\E8\BD\AC\E6\8D\A2\E5\90\8E\E7\9A\84\E5\85\AB\E8\BF\9B\E5\88\B6\E6\95\B0\E4\B8\BA\EF\BC\9A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.4, i64 0, i64 0))
%6 = load i32, i32* %1
%7 = call i32 @Conversion(i32 %6)
%8 = call i32 @putchar(i32 10)
ret i32 0
}
int nork(int a, int b) { return ~(a | b); }


x86 assembly (clang, -O0):
<nork>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
or     -0x8(%rbp),%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nork>:
mov    %edi,%eax
or     %esi,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @nork(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 = or i32 %5, %6
%8 = xor i32 %7, -1
ret i32 %8
}

LLVM IR (-O2):
define i32 @nork(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = xor i32 %3, -1
ret i32 %4
}
void SetRow_NEON() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @nseel_asm_uminus_end() {
ret void
}
double JHKeyframeAnimationFunctionEaseOutBack(double t, double b, double c,
                                              double d) {
  const double s = 1.70158;
  return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
}


x86 assembly (clang, -O0):
<JHKeyframeAnimationFunctionEaseOutBack>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  0xef0(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
divsd  -0x20(%rbp),%xmm2
movsd  0xec4(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  %xmm2,-0x8(%rbp)
mulsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
movsd  0xeb1(%rip),%xmm3
mulsd  %xmm3,%xmm1
movsd  0xead(%rip),%xmm3
addsd  %xmm3,%xmm1
mulsd  %xmm1,%xmm2
movsd  0xe8d(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<JHKeyframeAnimationFunctionEaseOutBack>:
divsd  %xmm3,%xmm0
addsd  0xef4(%rip),%xmm0
movapd %xmm0,%xmm3
mulsd  0xef0(%rip),%xmm0
mulsd  %xmm3,%xmm3
addsd  0xeec(%rip),%xmm0
mulsd  %xmm3,%xmm0
addsd  0xee8(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @JHKeyframeAnimationFunctionEaseOutBack(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
store double 1.701580e+00, double* %9
%10 = load double, double* %7
%11 = load double, double* %5
%12 = load double, double* %8
%13 = fdiv double %11, %12
%14 = fsub double %13, 1.000000e+00
store double %14, double* %5
%15 = load double, double* %5
%16 = fmul double %14, %15
%17 = load double, double* %5
%18 = call double @llvm.fmuladd.f64(double 2.701580e+00, double %17, double 1.701580e+00)
%19 = call double @llvm.fmuladd.f64(double %16, double %18, double 1.000000e+00)
%20 = load double, double* %6
%21 = call double @llvm.fmuladd.f64(double %10, double %19, double %20)
ret double %21
}

LLVM IR (-O2):
define double @JHKeyframeAnimationFunctionEaseOutBack(double %0, double %1, double %2, double %3) {
%5 = fdiv double %0, %3
%6 = fadd double %5, -1.000000e+00
%7 = fmul double %6, %6
%8 = tail call double @llvm.fmuladd.f64(double %6, double 2.701580e+00, double 1.701580e+00)
%9 = tail call double @llvm.fmuladd.f64(double %7, double %8, double 1.000000e+00)
%10 = tail call double @llvm.fmuladd.f64(double %2, double %9, double %1)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x7f() {
  Assert_real((isxdigit(127) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              640, ("isxdigit should be 0 for 0x7f"));
}


x86 assembly (clang, -O0):
<t_isxdigit_0x7f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f,%edi
call   1030 <isxdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x280,%edx
lea    0xf5c(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isxdigit_0x7f>:
push   %rax
mov    $0x7f,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x280,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x7f\00"
define void @t_isxdigit_0x7f() {
%1 = call i64 @isxdigit(i32 127)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 640, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x7f\00"
define void @t_isxdigit_0x7f() {
%1 = tail call i64 @isxdigit(i32 127)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 640, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hlt();
int /*<<< orphan*/ print_emerg(char const *);
void die(const char *str) {
  print_emerg(str);
  do {
    hlt();
  } while (1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <print_emerg@plt>
mov    $0x0,%al
call   1030 <hlt@plt>
mov    $0x1,%al
test   $0x1,%al
jne    1135 <die+0x15>
jmp    114b <die+0x2b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<die>:
push   %rax
call   1040 <print_emerg@plt>
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <hlt@plt>
jmp    1130 <die+0x10>

LLVM IR (-O0):
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @print_emerg(i8* %3)
br label %5
5: ; preds = %7, %1
%6 = call i32 (...) @hlt()
br label %7
7: ; preds = %5
br i1 true, label %5, label %8
8: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @die(i8* %0) {
%2 = tail call i32 @print_emerg(i8* %0)
br label %3
3: ; preds = %3, %1
%4 = tail call i32 (...) @hlt()
br label %3
}
long Long_bit_MINUS_and(long x, long y) { return x & y; }


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

x86 assembly (clang, -O2):
<Long_bit_MINUS_and>:
mov    %rdi,%rax
and    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @Long_bit_MINUS_and(i64 %0, i64 %1) {
%3 = and i64 %1, %0
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ sclass_univ_delete_entry(int /*<<< orphan*/,
                                            int /*<<< orphan*/ const *,
                                            int /*<<< orphan*/);
uint8_t sclass_delete_entry(uint8_t nleng, const uint8_t *name) {
  return sclass_univ_delete_entry(nleng, name, 0);
}


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

x86 assembly (clang, -O2):
<sclass_delete_entry>:
xor    %edx,%edx
jmp    1030 <sclass_univ_delete_entry@plt>

LLVM IR (-O0):
define i32 @sclass_delete_entry(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 = call i32 @sclass_univ_delete_entry(i32 %5, i32* %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @sclass_delete_entry(i32 %0, i32* %1) {
%3 = tail call i32 @sclass_univ_delete_entry(i32 %0, i32* %1, i32 0)
ret i32 %3
}
int test_imm_ABint32_mem(int *val) {
  return ((*val) & (0xAB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_ABint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0xab,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_ABint32_mem>:
testb  $0xab,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_ABint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 171
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ M_PI_2;
float sinf(float);
float sine_out(float step, float max_steps, float max_val) {
  return max_val * sinf((((float)step / max_steps)) * (float)M_PI_2);
}


x86 assembly (clang, -O0):
<sine_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
mov    0x2ea6(%rip),%rax
cvtsi2ssq (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1030 <sinf@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sine_out>:
push   %rax
movss  %xmm2,0x4(%rsp)
divss  %xmm1,%xmm0
mov    0x2ec6(%rip),%rax
xorps  %xmm1,%xmm1
cvtsi2ssq (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1030 <sinf@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI_2 = global i64 0
define float @sine_out(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = fdiv float %8, %9
%11 = load i64, i64* @M_PI_2
%12 = sitofp i64 %11 to float
%13 = fmul float %10, %12
%14 = call float @sinf(float %13)
%15 = fmul float %7, %14
ret float %15
}

LLVM IR (-O2):
@M_PI_2 = global i64 0
define float @sine_out(float %0, float %1, float %2) {
%4 = fdiv float %0, %1
%5 = load i64, i64* @M_PI_2
%6 = sitofp i64 %5 to float
%7 = fmul float %4, %6
%8 = tail call float @sinf(float %7)
%9 = fmul float %8, %2
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello from prog2.c\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Hello from prog2.c\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"Hello from prog2.c\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void smile(void) { printf("Smile!"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"Smile!\00"
define void @smile() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Smile!\00"
define void @smile() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
int even(int n) {
  int ret;
  if (0 == n % 2) {
    ret = 1;
  } else
    ret = 0;
  return ret;
}


x86 assembly (clang, -O0):
<even>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %eax,%eax
cmp    %edx,%eax
jne    1128 <even+0x28>
movl   $0x1,-0x8(%rbp)
jmp    112f <even+0x2f>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<even>:
mov    %edi,%eax
not    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @even(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = srem i32 %4, 2
%6 = icmp eq i32 0, %5
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %3
br label %9
8: ; preds = %1
store i32 0, i32* %3
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @even(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
ret i32 %3
}
int test_compress(unsigned char *b) { return b[0] == 31 && b[1] == 157; }


x86 assembly (clang, -O0):
<test_compress>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x1f,%ecx
mov    %al,-0x9(%rbp)
jne    1130 <test_compress+0x30>
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0x9d,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_compress>:
xor    %eax,%eax
cmpb   $0x1f,(%rdi)
jne    1110 <test_compress+0x10>
xor    %eax,%eax
cmpb   $0x9d,0x1(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @test_compress(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp eq i32 %6, 31
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = icmp eq i32 %12, 157
br label %14
14: ; preds = %8, %1
%15 = phi i1 [ false, %1 ], [ %13, %8 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @test_compress(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 31
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, -99
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %4, %1
%10 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %10
}
/* Variables and functions */
int strcmp(void const *, void const *);
int cmp_cache(const void *p1, const void *p2) { return strcmp(p1, p2); }


x86 assembly (clang, -O0):
<cmp_cache>:
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   1030 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_cache>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @cmp_cache(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
double RAND_MAX;
double rand();
int psuedo_rand(int max) {
  return (1 + (int)((double)max * rand() / (RAND_MAX + 1.0)));
}


x86 assembly (clang, -O0):
<psuedo_rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xec0(%rip),%xmm1
mov    0x2ea1(%rip),%rax
addsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psuedo_rand>:
push   %rax
cvtsi2sd %edi,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
mulsd  (%rsp),%xmm0
mov    0x2ebb(%rip),%rax
movsd  (%rax),%xmm1
addsd  0xec7(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define i32 @psuedo_rand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = call double (...) @rand()
%6 = fmul double %4, %5
%7 = load double, double* @RAND_MAX
%8 = fadd double %7, 1.000000e+00
%9 = fdiv double %6, %8
%10 = fptosi double %9 to i32
%11 = add nsw i32 1, %10
ret i32 %11
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define i32 @psuedo_rand(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = tail call double (...) @rand()
%4 = fmul double %3, %2
%5 = load double, double* @RAND_MAX
%6 = fadd double %5, 1.000000e+00
%7 = fdiv double %4, %6
%8 = fptosi double %7 to i32
%9 = add nsw i32 %8, 1
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void wordout_writefooter(FILE *outptr) {
  fprintf(outptr, "</b:Sources>\n");
  fflush(outptr);
}


x86 assembly (clang, -O0):
<wordout_writefooter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wordout_writefooter>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fflush@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"</b:Sources>\0A\00"
define void @wordout_writefooter(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fflush(i32* %5)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"</b:Sources>\0A\00"
define void @wordout_writefooter(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13, i64 1, i32* %0)
%3 = tail call i32 @fflush(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ETHERNET_PMT_DriverIRQHandler();
__attribute__((weak)) void ETHERNET_PMT_IRQHandler(void) {
  ETHERNET_PMT_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @ETHERNET_PMT_IRQHandler() {
%1 = call i32 (...) @ETHERNET_PMT_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @ETHERNET_PMT_IRQHandler() {
%1 = tail call i32 (...) @ETHERNET_PMT_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i440fx_write(int /*<<< orphan*/, int, int,
                                int /*<<< orphan*/ *);
void i440fx_pci_reset(void) {
  i440fx_write(0, 0x59, 0x00, NULL);
  i440fx_write(0, 0x72, 0x02, NULL);
}


x86 assembly (clang, -O0):
<i440fx_pci_reset>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0x59,%esi
xor    %eax,%eax
mov    %eax,%ecx
mov    %edx,%edi
call   1030 <i440fx_write@plt>
xor    %edi,%edi
mov    $0x72,%esi
mov    $0x2,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <i440fx_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i440fx_pci_reset>:
push   %rax
xor    %edi,%edi
mov    $0x59,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <i440fx_write@plt>
xor    %edi,%edi
mov    $0x72,%esi
mov    $0x2,%edx
xor    %ecx,%ecx
pop    %rax
jmp    1030 <i440fx_write@plt>

LLVM IR (-O0):
define void @i440fx_pci_reset() {
%1 = call i32 @i440fx_write(i32 0, i32 89, i32 0, i32* null)
%2 = call i32 @i440fx_write(i32 0, i32 114, i32 2, i32* null)
ret void
}

LLVM IR (-O2):
define void @i440fx_pci_reset() {
%1 = tail call i32 @i440fx_write(i32 0, i32 89, i32 0, i32* null)
%2 = tail call i32 @i440fx_write(i32 0, i32 114, i32 2, i32* null)
ret void
}
int bad_func(int x) {
#pragma critTer : 6 : resources / functionName.c:
  return 0;
#pragma critTer : 7 : resources / functionName.c:
}


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

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

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

LLVM IR (-O2):
define i32 @bad_func(i32 %0) {
ret i32 0
}
/* Variables and functions */
int fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int printstr(const char *string) {
  return fprintf(stderr, "string: %s\n", string);
}


x86 assembly (clang, -O0):
<printstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printstr>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"string: %s\0A\00"
define i32 @printstr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"string: %s\0A\00"
define i32 @printstr(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ __u64;

/* Variables and functions */
scalar_t__ xsk_umem__extract_addr(scalar_t__);
scalar_t__ xsk_umem__extract_offset(scalar_t__);
__u64 xsk_umem__add_offset_to_addr(__u64 addr) {
  return xsk_umem__extract_addr(addr) + xsk_umem__extract_offset(addr);
}


x86 assembly (clang, -O0):
<xsk_umem__add_offset_to_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <xsk_umem__extract_addr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <xsk_umem__extract_offset@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xsk_umem__add_offset_to_addr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <xsk_umem__extract_addr@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1040 <xsk_umem__extract_offset@plt>
add    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @xsk_umem__add_offset_to_addr(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @xsk_umem__extract_addr(i64 %3)
%5 = load i64, i64* %2
%6 = call i64 @xsk_umem__extract_offset(i64 %5)
%7 = add nsw i64 %4, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @xsk_umem__add_offset_to_addr(i64 %0) {
%2 = tail call i64 @xsk_umem__extract_addr(i64 %0)
%3 = tail call i64 @xsk_umem__extract_offset(i64 %0)
%4 = add nsw i64 %3, %2
ret i64 %4
}
int test2() { return 0; }


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

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

LLVM IR (-O0):
define i32 @test2() {
ret i32 0
}

LLVM IR (-O2):
define i32 @test2() {
ret i32 0
}
void __DELETE_java_util_Collections_EmptyMap(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_util_Collections_EmptyMap(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int f(int n) { return (n > 0) - (n < 0); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x0,-0x4(%rbp)
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
test   %edi,%edi
setg   %al
sar    $0x1f,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
%5 = zext i1 %4 to i32
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 0
%8 = zext i1 %7 to i32
%9 = sub nsw i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = zext i1 %2 to i32
%4 = ashr i32 %0, 31
%5 = add nsw i32 %4, %3
ret i32 %5
}
void tmrm_hash_memory_cursor_finish(void *context) {}


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

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

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

LLVM IR (-O2):
define void @tmrm_hash_memory_cursor_finish(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f1();
int main() { f1(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @f1()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f1()
ret i32 0
}
float vmax_sse(float *v, int n) { return 0.0; }


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

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

LLVM IR (-O0):
define float @vmax_sse(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @vmax_sse(float* nocapture readnone %0, i32 %1) {
ret float 0.000000e+00
}
void __attribute__((section(".after_vectors"))) Default_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<Default_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Default_Handler+0x9>
jmp    1109 <Default_Handler+0x9>

x86 assembly (clang, -O2):
<Default_Handler>:
jmp    1100 <Default_Handler>

LLVM IR (-O0):
define void @Default_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Default_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ handaction(int *, int);
int simplify_action(int /*<<< orphan*/, int, int, int);
int handaction_simple(int *hand, int dealercard, int allow_double,
                      int allow_split, int allow_surrender) {
  return simplify_action(handaction(hand, dealercard), allow_double,
                         allow_split, allow_surrender);
}


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

x86 assembly (clang, -O2):
<handaction_simple>:
push   %rbp
push   %r14
push   %rbx
mov    %r8d,%r14d
mov    %ecx,%ebp
mov    %edx,%ebx
call   1030 <handaction@plt>
mov    %eax,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <simplify_action@plt>

LLVM IR (-O0):
define i32 @handaction_simple(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = call i32 @handaction(i32* %11, i32 %12)
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = call i32 @simplify_action(i32 %13, i32 %14, i32 %15, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @handaction_simple(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @handaction(i32* %0, i32 %1)
%7 = tail call i32 @simplify_action(i32 %6, i32 %2, i32 %3, i32 %4)
ret i32 %7
}
void a() {
  int a = 1;
  float b = 0.4f;
  double c = 0.05;
  char e = 'a';
  char *p = &e;
  int size = sizeof(a);
  int pSize = sizeof(p);
  printf("%d\n", size);
  printf("%d\n", pSize);
  printf("%d", 13 + 7);
}


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x1,-0x4(%rbp)
movss  0xee1(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movsd  0xecc(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movb   $0x61,-0x11(%rbp)
lea    -0x11(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x8,-0x28(%rbp)
mov    -0x24(%rbp),%esi
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe94(%rip),%rdi
mov    $0x14,%esi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
mov    $0x14,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define void @a() {
%1 = alloca i32
%2 = alloca float
%3 = alloca double
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 1, i32* %1
store float 0x3FD99999A0000000, float* %2
store double 5.000000e-02, double* %3
store i8 97, i8* %4
store i8* %4, i8** %5
store i32 4, i32* %6
store i32 8, i32* %7
%8 = load i32, i32* %6
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %7
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 20)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define void @a() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 20)
ret void
}
/* Variables and functions */
double fabs(double);
double normalizeAngle(double);
double lonDistNowrap(double lon1, double lon2) {
  double lon11 = normalizeAngle(lon1);
  double lon22 = normalizeAngle(lon2);
  if (lon22 < lon11)
    lon22 += 360.0;
  return (fabs(lon22 - lon11));
}


x86 assembly (clang, -O0):
<lonDistNowrap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <normalizeAngle@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <normalizeAngle@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1166 <lonDistNowrap+0x56>
movsd  0xea4(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movaps 0xe99(%rip),%xmm1
pand   %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lonDistNowrap>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
call   1030 <normalizeAngle@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <normalizeAngle@plt>
movsd  0xec8(%rip),%xmm2
addsd  %xmm0,%xmm2
movapd %xmm0,%xmm1
movsd  0x10(%rsp),%xmm3
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
subsd  %xmm3,%xmm1
andpd  0xead(%rip),%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @lonDistNowrap(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = call double @normalizeAngle(double %7)
store double %8, double* %5
%9 = load double, double* %4
%10 = call double @normalizeAngle(double %9)
store double %10, double* %6
%11 = load double, double* %6
%12 = load double, double* %5
%13 = fcmp olt double %11, %12
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = load double, double* %6
%16 = fadd double %15, 3.600000e+02
store double %16, double* %6
br label %17
17: ; preds = %14, %2
%18 = load double, double* %6
%19 = load double, double* %5
%20 = fsub double %18, %19
%21 = call double @llvm.fabs.f64(double %20)
ret double %21
}

LLVM IR (-O2):
define double @lonDistNowrap(double %0, double %1) {
%3 = tail call double @normalizeAngle(double %0)
%4 = tail call double @normalizeAngle(double %1)
%5 = fcmp olt double %4, %3
%6 = fadd double %4, 3.600000e+02
%7 = select i1 %5, double %6, double %4
%8 = fsub double %7, %3
%9 = tail call double @llvm.fabs.f64(double %8)
ret double %9
}