xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ RandomCollisionLayerP__0__SubSend__ready();
void SoftwareAckLayerC__0__RadioSend__ready(void) {
  RandomCollisionLayerP__0__SubSend__ready();
}


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

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

LLVM IR (-O0):
define void @SoftwareAckLayerC__0__RadioSend__ready() {
%1 = call i32 (...) @RandomCollisionLayerP__0__SubSend__ready()
ret void
}

LLVM IR (-O2):
define void @SoftwareAckLayerC__0__RadioSend__ready() {
%1 = tail call i32 (...) @RandomCollisionLayerP__0__SubSend__ready()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abnormal();
int /*<<< orphan*/ normal();
int /*<<< orphan*/ puts(char *);
int main(void) {
  normal();
  abnormal();
  puts("test_carray success");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <normal@plt>
mov    $0x0,%al
call   1040 <abnormal@plt>
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"test_carray success\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @normal()
%3 = call i32 (...) @abnormal()
%4 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"test_carray success\00"
define i32 @main() {
%1 = tail call i32 (...) @normal()
%2 = tail call i32 (...) @abnormal()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
long long int(llabs)(long long int value) { return value < 0 ? -value : value; }


x86 assembly (clang, -O0):
<llabs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <llabs+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <llabs+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<llabs>:
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @llabs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub nsw i64 0, %6
br label %10
8: ; preds = %1
%9 = load i64, i64* %2
br label %10
10: ; preds = %8, %5
%11 = phi i64 [ %7, %5 ], [ %9, %8 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @llabs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ handler_not_implemented(char *);
void defaultCallbackHandler() { handler_not_implemented("CALLBACK_HANDLER"); }


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

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"CALLBACK_HANDLER\00"
define void @defaultCallbackHandler() {
%1 = tail call i32 @handler_not_implemented(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int n_plus_two(int);
int /*<<< orphan*/ printf(char *, int);
int main(int arfc, char **arfv) {
  int x = 9;
  printf("%d\n", n_plus_two(x));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x9,%edi
call   1030 <n_plus_two@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @n_plus_two(i32 9)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
int ipe_shutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ipe_shutdown() {
ret i32 0
}
void op_code_normal_case0x7F(void) {}


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

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

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

LLVM IR (-O2):
define void @op_code_normal_case0x7F() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ depth_0();
__attribute__((always_)) void depth_1(void) { depth_0(); }


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

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

LLVM IR (-O0):
define void @depth_1() {
%1 = call i32 (...) @depth_0()
ret void
}

LLVM IR (-O2):
define void @depth_1() {
%1 = tail call i32 (...) @depth_0()
ret void
}
/* Variables and functions */
char *r_index(char *, char);
int strlen(char *);
char *clean_filename(char *fn) {
  char *end = fn + strlen(fn);
  if (r_index(fn, '/')) {
    fn = r_index(fn, '/') + 1;
  }
  return fn;
}


x86 assembly (clang, -O0):
<clean_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1040 <r_index@plt>
cmp    $0x0,%rax
je     117b <clean_filename+0x5b>
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1040 <r_index@plt>
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean_filename>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1040 <r_index@plt>
test   %rax,%rax
je     114f <clean_filename+0x2f>
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1040 <r_index@plt>
mov    %rax,%rbx
add    $0x1,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @clean_filename(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @r_index(i8* %0, i8 signext 47)
%4 = icmp eq i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call i8* @r_index(i8* %0, i8 signext 47)
%7 = getelementptr inbounds i8, i8* %6, i64 1
br label %8
8: ; preds = %5, %1
%9 = phi i8* [ %7, %5 ], [ %0, %1 ]
ret i8* %9
}
/* Variables and functions */
int putchar(char);
int puts(const char *s) {
  while (*s) {
    putchar(*(s++));
  }
  return (putchar('\n'));
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <puts+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    111c <puts+0xc>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <puts+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define i32 @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i32 @putchar(i8 signext %5)
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = tail call i32 @putchar(i8 signext 10)
ret i32 %12
}
int pathIsAbsolute(const char *path) {
  if (path && path[0] == '/')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<pathIsAbsolute>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     112f <pathIsAbsolute+0x2f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    112f <pathIsAbsolute+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1136 <pathIsAbsolute+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathIsAbsolute>:
test   %rdi,%rdi
je     110f <pathIsAbsolute+0xf>
mov    $0x1,%eax
cmpb   $0x2f,(%rdi)
je     1111 <pathIsAbsolute+0x11>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @pathIsAbsolute(i8* %0) {
%2 = alloca i32
%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 %13
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 47
br i1 %11, label %12, label %13
12: ; preds = %6
store i32 1, i32* %2
br label %14
13: ; preds = %6, %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @pathIsAbsolute(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 47
br i1 %5, label %7, label %6
6: ; preds = %3, %1
br label %7
7: ; preds = %3, %6
%8 = phi i32 [ 0, %6 ], [ 1, %3 ]
ret i32 %8
}
/* Type definitions */
struct xfs_inode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __xfs_iflock(struct xfs_inode *);
int /*<<< orphan*/ xfs_iflock_nowait(struct xfs_inode *);
void xfs_iflock(struct xfs_inode *ip) {
  if (!xfs_iflock_nowait(ip)) {
    __xfs_iflock(ip);
  }
}


x86 assembly (clang, -O0):
<xfs_iflock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <xfs_iflock_nowait@plt>
cmp    $0x0,%eax
jne    1147 <xfs_iflock+0x27>
mov    -0x8(%rbp),%rdi
call   1030 <__xfs_iflock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfs_iflock>:
push   %rbx
mov    %rdi,%rbx
call   1040 <xfs_iflock_nowait@plt>
test   %eax,%eax
je     112f <xfs_iflock+0xf>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <__xfs_iflock@plt>

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

LLVM IR (-O2):
%struct.xfs_inode = type { i32 }
define void @xfs_iflock(%struct.xfs_inode* %0) {
%2 = tail call i32 @xfs_iflock_nowait(%struct.xfs_inode* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @__xfs_iflock(%struct.xfs_inode* %0)
br label %6
6: ; preds = %4, %1
ret void
}
main() {
  register unsigned long i;
  float k;
  ;
  for (i = 0; i < 10000000; i++)
    ;
  ;
  ;
  for (k = 0; k < 10000000; k++)
    ;
  ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x989680,-0x10(%rbp)
jae    1137 <main+0x37>
jmp    1126 <main+0x26>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1113 <main+0x13>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xeb9(%rip),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    116d <main+0x6d>
jmp    1156 <main+0x56>
movss  0xea6(%rip),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    113f <main+0x3f>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca float
store i32 0, i32* %1
store i64 0, i64* %2
br label %4
4: ; preds = %8, %0
%5 = load i64, i64* %2
%6 = icmp ult i64 %5, 10000000
br i1 %6, label %7, label %11
7: ; preds = %4
br label %8
8: ; preds = %7
%9 = load i64, i64* %2
%10 = add i64 %9, 1
store i64 %10, i64* %2
br label %4
11: ; preds = %4
store float 0.000000e+00, float* %3
br label %12
12: ; preds = %16, %11
%13 = load float, float* %3
%14 = fcmp olt float %13, 1.000000e+07
br i1 %14, label %15, label %19
15: ; preds = %12
br label %16
16: ; preds = %15
%17 = load float, float* %3
%18 = fadd float %17, 1.000000e+00
store float %18, float* %3
br label %12
19: ; preds = %12
%20 = load i32, i32* %1
ret i32 %20
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void r(x) int x[restrict];
{}


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

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

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

LLVM IR (-O2):
define void @r(i32* noalias nocapture %0) {
ret void
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ d_name;
};

/* Variables and functions */
int /*<<< orphan*/ display_one_adapter_info(int /*<<< orphan*/);
int search_fc_adapter(struct dirent *dp, void *arg __attribute__((unused))) {
  display_one_adapter_info(dp->d_name);
  return 0;
}


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

x86 assembly (clang, -O2):
<search_fc_adapter>:
push   %rax
mov    (%rdi),%edi
call   1030 <display_one_adapter_info@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.dirent = type { i32 }
define i32 @search_fc_adapter(%struct.dirent* %0, i8* %1) {
%3 = alloca %struct.dirent*
%4 = alloca i8*
store %struct.dirent* %0, %struct.dirent** %3
store i8* %1, i8** %4
%5 = load %struct.dirent*, %struct.dirent** %3
%6 = getelementptr inbounds %struct.dirent, %struct.dirent* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 @display_one_adapter_info(i32 %7)
ret i32 0
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
define i32 @search_fc_adapter(%struct.dirent* nocapture %0, i8* nocapture readnone %1) {
%3 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = tail call i32 @display_one_adapter_info(i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ GPIO3_Combined_0_15_DriverIRQHandler();
__attribute__((weak)) void GPIO3_Combined_0_15_IRQHandler(void) {
  GPIO3_Combined_0_15_DriverIRQHandler();
}


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

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

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

LLVM IR (-O2):
define weak void @GPIO3_Combined_0_15_IRQHandler() {
%1 = tail call i32 (...) @GPIO3_Combined_0_15_DriverIRQHandler()
ret void
}
int i2c_bulkread(void *hDevice, unsigned char chip, unsigned char addr,
                 unsigned char *data, unsigned short length) {
  return 0;
}


x86 assembly (clang, -O0):
<i2c_bulkread>:
push   %rbp
mov    %rsp,%rbp
mov    %r8w,%ax
mov    %rdi,-0x8(%rbp)
mov    %sil,-0x9(%rbp)
mov    %dl,-0xa(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %ax,-0x1a(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @i2c_bulkread(i8* %0, i8 zeroext %1, i8 zeroext %2, i8* %3, i16 zeroext %4) {
%6 = alloca i8*
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8*
%10 = alloca i16
store i8* %0, i8** %6
store i8 %1, i8* %7
store i8 %2, i8* %8
store i8* %3, i8** %9
store i16 %4, i16* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @i2c_bulkread(i8* nocapture readnone %0, i8 zeroext %1, i8 zeroext %2, i8* nocapture readnone %3, i16 zeroext %4) {
ret i32 0
}
/* Variables and functions */
int create(char *, int);
int create_file(char *path_arg) { return create(path_arg, 2); }


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

x86 assembly (clang, -O2):
<create_file>:
mov    $0x2,%esi
jmp    1030 <create@plt>

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

LLVM IR (-O2):
define i32 @create_file(i8* %0) {
%2 = tail call i32 @create(i8* %0, i32 2)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ cu_fail_assertation(char *, int, char *);
int /*<<< orphan*/ cu_success_assertation();
void testFalseAndNotEquals(void) {
  if (!((0))) {
    cu_success_assertation();
  } else {
    cu_fail_assertation("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/esromneb/"
                        "embedded-c-unit-test/refs/heads/master/demo/tests.c",
                        61,
                        "0"
                        " is not false");
  };
  if (((1)) != ((2))) {
    cu_success_assertation();
  } else {
    cu_fail_assertation("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/esromneb/"
                        "embedded-c-unit-test/refs/heads/master/demo/tests.c",
                        65,
                        "1"
                        " equals "
                        "2");
  };
}


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

x86 assembly (clang, -O2):
<testFalseAndNotEquals>:
push   %rax
xor    %eax,%eax
call   1030 <cu_success_assertation@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <cu_success_assertation@plt>

LLVM IR (-O0):
define void @testFalseAndNotEquals() {
%1 = call i32 (...) @cu_success_assertation()
%2 = call i32 (...) @cu_success_assertation()
ret void
}

LLVM IR (-O2):
define void @testFalseAndNotEquals() {
%1 = tail call i32 (...) @cu_success_assertation()
%2 = tail call i32 (...) @cu_success_assertation()
ret void
}
/* Variables and functions */
int test_rr(int, int, int);
int test_rr_10_2_3(int argc, const char **argv) { return test_rr(10, 2, 3); }


x86 assembly (clang, -O0):
<test_rr_10_2_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xa,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <test_rr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_rr_10_2_3>:
mov    $0xa,%edi
mov    $0x2,%esi
mov    $0x3,%edx
jmp    1030 <test_rr@plt>

LLVM IR (-O0):
define i32 @test_rr_10_2_3(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @test_rr(i32 10, i32 2, i32 3)
ret i32 %5
}

LLVM IR (-O2):
define i32 @test_rr_10_2_3(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @test_rr(i32 10, i32 2, i32 3)
ret i32 %3
}
void unmap_section_data(struct section_mapping *map) { (void)map; }


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

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

LLVM IR (-O0):
%struct.section_mapping = type opaque
define void @unmap_section_data(%struct.section_mapping* %0) {
%2 = alloca %struct.section_mapping*
store %struct.section_mapping* %0, %struct.section_mapping** %2
%3 = load %struct.section_mapping*, %struct.section_mapping** %2
ret void
}

LLVM IR (-O2):
%struct.section_mapping = type opaque
define void @unmap_section_data(%struct.section_mapping* nocapture %0) {
ret void
}
/* Type definitions */
typedef int speed_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_speed(char const *prompt, speed_t s) {
  printf("%s %d\n", prompt, s);
  switch (s) {
  default:
    printf("unknown enum %d\n", s);
    break;
  }
}


x86 assembly (clang, -O0):
<print_speed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_speed>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s %d\0A\00"
@.str.1 = [17 x i8] c"unknown enum %d\0A\00"
define void @print_speed(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
%8 = load i32, i32* %4
switch i32 %8, label %9 [
]
9: ; preds = %2
%10 = load i32, i32* %4
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %9
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s %d\0A\00"
@.str.1 = [17 x i8] c"unknown enum %d\0A\00"
define void @print_speed(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret void
}
int doubleGT(const void *a, const void *b) {
  double da = *(double *)a;
  double db = *(double *)b;
  if (da == db)
    return 0;
  return (da > db) ? 1 : -1;
}


x86 assembly (clang, -O0):
<doubleGT>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jne    1148 <doubleGT+0x48>
jp     1148 <doubleGT+0x48>
movl   $0x0,-0x4(%rbp)
jmp    1166 <doubleGT+0x66>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    $0xffffffff,%eax
mov    $0x1,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<doubleGT>:
movsd  (%rdi),%xmm0
xor    %eax,%eax
xor    %ecx,%ecx
ucomisd (%rsi),%xmm0
seta   %cl
lea    -0x1(%rcx,%rcx,1),%ecx
cmovne %ecx,%eax
cmovp  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @doubleGT(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
store double %10, double* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to double*
%13 = load double, double* %12
store double %13, double* %7
%14 = load double, double* %6
%15 = load double, double* %7
%16 = fcmp oeq double %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 0, i32* %3
br label %24
18: ; preds = %2
%19 = load double, double* %6
%20 = load double, double* %7
%21 = fcmp ogt double %19, %20
%22 = zext i1 %21 to i64
%23 = select i1 %21, i32 1, i32 -1
store i32 %23, i32* %3
br label %24
24: ; preds = %18, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @doubleGT(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp oeq double %4, %6
%8 = fcmp ogt double %4, %6
%9 = select i1 %8, i32 1, i32 -1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
int f(int year, int month) { return (month <= 2) ? (year - 1) : (year); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jg     1122 <f+0x22>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <f+0x28>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
xor    %ecx,%ecx
cmp    $0x3,%esi
setl   %cl
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sle i32 %5, 2
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
br label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %7
%13 = phi i32 [ %9, %7 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 3
%4 = sext i1 %3 to i32
%5 = add nsw i32 %4, %0
ret i32 %5
}
unsigned atou(char **s) {
  unsigned x;
  for (x = 0; **s - '0' < 10U; ++*s)
    x = 10 * x + (**s - '0');
  return x;
}


x86 assembly (clang, -O0):
<atou>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
cmp    $0xa,%eax
jae    114e <atou+0x4e>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
movsbl (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    110f <atou+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atou>:
mov    (%rdi),%rcx
movsbl (%rcx),%edx
add    $0xffffffd0,%edx
xor    %eax,%eax
cmp    $0x9,%edx
ja     1138 <atou+0x38>
add    $0x1,%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
lea    (%rax,%rax,4),%eax
lea    (%rdx,%rax,2),%eax
mov    %rcx,(%rdi)
movsbl (%rcx),%edx
add    $0xffffffd0,%edx
add    $0x1,%rcx
cmp    $0xa,%edx
jb     1120 <atou+0x20>
ret

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

LLVM IR (-O2):
define i32 @atou(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = add nsw i32 %4, -48
%6 = icmp ult i32 %5, 10
br i1 %6, label %7, label %18
7: ; preds = %1, %7
%8 = phi i32 [ %16, %7 ], [ %5, %1 ]
%9 = phi i8* [ %13, %7 ], [ %2, %1 ]
%10 = phi i32 [ %12, %7 ], [ 0, %1 ]
%11 = mul i32 %10, 10
%12 = add i32 %8, %11
%13 = getelementptr inbounds i8, i8* %9, i64 1
store i8* %13, i8** %0
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = add nsw i32 %15, -48
%17 = icmp ult i32 %16, 10
br i1 %17, label %7, label %18
18: ; preds = %7, %1
%19 = phi i32 [ 0, %1 ], [ %12, %7 ]
ret i32 %19
}
/* Variables and functions */
int isip_check(char const *, int);
int isipv6ip(const char *str) { return isip_check(str, 1); }


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

x86 assembly (clang, -O2):
<isipv6ip>:
mov    $0x1,%esi
jmp    1030 <isip_check@plt>

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

LLVM IR (-O2):
define i32 @isipv6ip(i8* %0) {
%2 = tail call i32 @isip_check(i8* %0, i32 1)
ret i32 %2
}
/* Type definitions */
typedef long off_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fseeko(int /*<<< orphan*/ *, long, int);
int fseek(FILE *fp, long l_offset, int whence) {
  off_t offset;
  offset = l_offset;
  return fseeko(fp, offset, whence);
}


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

x86 assembly (clang, -O2):
<fseek>:
jmp    1030 <fseeko@plt>

LLVM IR (-O0):
define i32 @fseek(i32* %0, i64 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%8 = load i64, i64* %5
store i64 %8, i64* %7
%9 = load i32*, i32** %4
%10 = load i64, i64* %7
%11 = load i32, i32* %6
%12 = call i32 @fseeko(i32* %9, i64 %10, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @fseek(i32* nocapture %0, i64 %1, i32 %2) {
%4 = tail call i32 @fseeko(i32* %0, i64 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int errno;
int ret_code(void) {
  int e = errno;
  if (e > 0)
    return -e;
  return e;
}


x86 assembly (clang, -O0):
<ret_code>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1127 <ret_code+0x27>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112d <ret_code+0x2d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ret_code>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    %ecx,%eax
neg    %eax
cmovns %ecx,%eax
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @ret_code() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @errno
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = sub nsw i32 0, %7
store i32 %8, i32* %1
br label %11
9: ; preds = %0
%10 = load i32, i32* %2
store i32 %10, i32* %1
br label %11
11: ; preds = %9, %6
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @ret_code() {
%1 = load i32, i32* @errno
%2 = tail call i32 @llvm.abs.i32(i32 %1, i1 false)
%3 = sub i32 0, %2
ret i32 %3
}
/* Variables and functions */
int M_PI_2;
int pow(int, int);
int sin(int);
float ElasticEaseOut(float p) {
  return sin(-13 * M_PI_2 * (p + 1)) * pow(2, -10 * p) + 1;
}


x86 assembly (clang, -O0):
<ElasticEaseOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    0x2eb4(%rip),%rax
imul   $0xfffffff3,(%rax),%eax
cvtsi2ss %eax,%xmm0
movss  0xebe(%rip),%xmm1
addss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
call   1030 <sin@plt>
mov    %eax,-0x8(%rbp)
movss  0xe9d(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
imul   %ecx,%eax
add    $0x1,%eax
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ElasticEaseOut>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
mov    0x2eb6(%rip),%rax
imul   $0xfffffff3,(%rax),%eax
cvtsi2ss %eax,%xmm2
movss  0xebf(%rip),%xmm1
addss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
cvttss2si %xmm1,%edi
call   1030 <sin@plt>
mov    %eax,%ebx
movss  0xc(%rsp),%xmm0
mulss  0xea2(%rip),%xmm0
cvttss2si %xmm0,%esi
mov    $0x2,%edi
call   1040 <pow@plt>
imul   %ebx,%eax
add    $0x1,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@M_PI_2 = global i32 0
define float @ElasticEaseOut(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load i32, i32* @M_PI_2
%4 = mul nsw i32 -13, %3
%5 = sitofp i32 %4 to float
%6 = load float, float* %2
%7 = fadd float %6, 1.000000e+00
%8 = fmul float %5, %7
%9 = fptosi float %8 to i32
%10 = call i32 @sin(i32 %9)
%11 = load float, float* %2
%12 = fmul float -1.000000e+01, %11
%13 = fptosi float %12 to i32
%14 = call i32 @pow(i32 2, i32 %13)
%15 = mul nsw i32 %10, %14
%16 = add nsw i32 %15, 1
%17 = sitofp i32 %16 to float
ret float %17
}

LLVM IR (-O2):
@M_PI_2 = global i32 0
define float @ElasticEaseOut(float %0) {
%2 = load i32, i32* @M_PI_2
%3 = mul nsw i32 %2, -13
%4 = sitofp i32 %3 to float
%5 = fadd float %0, 1.000000e+00
%6 = fmul float %5, %4
%7 = fptosi float %6 to i32
%8 = tail call i32 @sin(i32 %7)
%9 = fmul float %0, -1.000000e+01
%10 = fptosi float %9 to i32
%11 = tail call i32 @pow(i32 2, i32 %10)
%12 = mul nsw i32 %11, %8
%13 = add nsw i32 %12, 1
%14 = sitofp i32 %13 to float
ret float %14
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void print_usage(FILE *fp) {
  fprintf(fp, "Usage:\tdec2bin [OPTIONS] NUMBER[s]\n");
}


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

x86 assembly (clang, -O2):
<print_usage>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x23,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"Usage:\09dec2bin [OPTIONS] NUMBER[s]\0A\00"
define void @print_usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"Usage:\09dec2bin [OPTIONS] NUMBER[s]\0A\00"
define void @print_usage(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i64 35, i64 1, i32* %0)
ret void
}
__attribute__((always_)) int tdMatchCost(int len, int len_bits, int dst_bits) {
  int match_bits = len * 8;
  return (len_bits + dst_bits) - match_bits;
}


x86 assembly (clang, -O0):
<tdMatchCost>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tdMatchCost>:
shl    $0x3,%edi
sub    %edi,%esi
lea    (%rsi,%rdx,1),%eax
ret

LLVM IR (-O0):
define i32 @tdMatchCost(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = mul nsw i32 %8, 8
store i32 %9, i32* %7
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = add nsw i32 %10, %11
%13 = load i32, i32* %7
%14 = sub nsw i32 %12, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @tdMatchCost(i32 %0, i32 %1, i32 %2) {
%4 = mul i32 %0, -8
%5 = add i32 %4, %1
%6 = add i32 %5, %2
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int main() {
  char na[1000];
  sprintf(na, "%s", "hello world");
  printf("%s\n", &(na[0]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
lea    0xec0(%rip),%rsi
lea    0xebc(%rip),%rdx
call   1040 <sprintf@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x3e8,%rsp
movabs $0x6f77206f6c6c6568,%rax
20 77 6f
mov    %rax,(%rsp)
movl   $0x646c72,0x8(%rsp)
lea    0xed8(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3e8,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [12 x i8] c"hello world\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [12 x i8] c"hello world\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
}
int test_imm_67int32_mem(int *val) {
  return ((*val) & (0x67 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_67int32_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, 103
%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_67int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 103
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
unsigned int compare_and_swap64(volatile unsigned long long *address,
                                unsigned long old_value,
                                unsigned long new_value) {
  unsigned long prev = 0;
  asm volatile("lock ; "
               "cmpxchgq %1,%2"
               : "=a"(prev)
               : "r"(new_value), "m"(*address), "0"(old_value)
               : "memory");
  return prev == old_value;
}


x86 assembly (clang, -O0):
<compare_and_swap64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rax
lock cmpxchg %rcx,(%rdx)
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_and_swap64>:
mov    %rsi,%rax
lock cmpxchg %rdx,(%rdi)
xor    %ecx,%ecx
cmp    %rsi,%rax
sete   %cl
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare_and_swap64(i64* %0, i64 %1, i64 %2) {
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64* %0, i64** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
store i64 0, i64* %7
%8 = load i64, i64* %6
%9 = load i64*, i64** %4
%10 = load i64, i64* %5
%11 = call i64 asm sideeffect "lock ; cmpxchgq $1,$2", "={ax},r,*m,0,~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %8, i64* elementtype(i64) %9, i64 %10)
store i64 %11, i64* %7
%12 = load i64, i64* %7
%13 = load i64, i64* %5
%14 = icmp eq i64 %12, %13
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @compare_and_swap64(i64* %0, i64 %1, i64 %2) {
%4 = tail call i64 asm sideeffect "lock ; cmpxchgq $1,$2", "={ax},r,*m,0,~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %2, i64* elementtype(i64) %0, i64 %1)
%5 = icmp eq i64 %4, %1
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int f1();
int /*<<< orphan*/ printf(char *, int);
int f2(int i) {
  printf("%d\n", i);
  return f1();
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <f1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <f1@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @f2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 (...) @f1()
ret i32 %5
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @f2(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 (...) @f1()
ret i32 %3
}
void no_op() { int x = 0; }


x86 assembly (clang, -O0):
<no_op>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @no_op() {
ret void
}
char plugin_format() { return 'c'; }


x86 assembly (clang, -O0):
<plugin_format>:
push   %rbp
mov    %rsp,%rbp
mov    $0x63,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<plugin_format>:
mov    $0x63,%al
ret

LLVM IR (-O0):
define signext i8 @plugin_format() {
ret i8 99
}

LLVM IR (-O2):
define signext i8 @plugin_format() {
ret i8 99
}
void inter_homunculus_sql_final(void) { return; }


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

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

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

LLVM IR (-O2):
define void @inter_homunculus_sql_final() {
ret void
}
/* Variables and functions */
double fctr(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int n;
  printf("ingresa numero factorial:");
  scanf("%d", &n);
  printf("el valor es:%.0f\n", fctr(n));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1030 <fctr@plt>
lea    0xeb8(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <fctr@plt>
lea    0xebd(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"ingresa numero factorial:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [18 x i8] c"el valor es:%.0f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call double @fctr(i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"ingresa numero factorial:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [18 x i8] c"el valor es:%.0f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 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 = load i32, i32* %1
%6 = call double @fctr(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double %6)
ret i32 0
}
int EtherdevStartup(int verbose) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @EtherdevStartup(i32 %0) {
ret i32 0
}
void send_message(void *message, struct node *node) {}


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

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

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

LLVM IR (-O2):
%struct.node = type opaque
define void @send_message(i8* nocapture %0, %struct.node* nocapture %1) {
ret void
}
void ble_rsp_system_whitelist_append(
    const struct ble_msg_system_whitelist_append_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_system_whitelist_append_rsp_t = type opaque
define void @ble_rsp_system_whitelist_append(%struct.ble_msg_system_whitelist_append_rsp_t* nocapture %0) {
ret void
}
void type_fun_placeholder(void) {}


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

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

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

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