xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isSpace(char);
char *DelSpace(char *xbuf) {
  char *p;
  for (p = xbuf; isSpace(*p); p++)
    ;
  return (p);
}


x86 assembly (clang, -O0):
<DelSpace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isSpace@plt>
cmp    $0x0,%rax
je     1150 <DelSpace+0x40>
jmp    113f <DelSpace+0x2f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <DelSpace+0x14>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DelSpace>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isSpace@plt>
test   %rax,%rax
jne    1120 <DelSpace+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @DelSpace(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isSpace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
unsigned long f2(unsigned int x) { return (unsigned)__builtin_clz(x); }


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

x86 assembly (clang, -O2):
<f2>:
bsr    %edi,%eax
xor    $0x1f,%eax
ret

LLVM IR (-O0):
define i64 @f2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @llvm.ctlz.i32(i32 %3, i1 true)
%5 = zext i32 %4 to i64
ret i64 %5
}

LLVM IR (-O2):
define i64 @f2(i32 %0) {
%2 = tail call i32 @llvm.ctlz.i32(i32 %0, i1 true)
%3 = zext i32 %2 to i64
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int, int, int);
char *iptoa(char *dest, unsigned int ip) {
  sprintf(dest, "%d.%d.%d.%d", 0xFF & (ip), 0xFF & (ip >> 8), 0xFF & (ip >> 16),
          0xFF & (ip >> 24));
  return dest;
}


x86 assembly (clang, -O0):
<iptoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
and    $0xff,%edx
mov    -0xc(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff,%ecx
mov    -0xc(%rbp),%r8d
shr    $0x10,%r8d
and    $0xff,%r8d
mov    -0xc(%rbp),%r9d
shr    $0x18,%r9d
and    $0xff,%r9d
lea    0xea3(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iptoa>:
push   %rbx
mov    %esi,%eax
mov    %rdi,%rbx
movzbl %al,%edx
movzbl %ah,%ecx
shr    $0x10,%esi
movzbl %sil,%r8d
shr    $0x18,%eax
lea    0xed3(%rip),%rsi
mov    %eax,%r9d
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define i8* @iptoa(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 = and i32 255, %6
%8 = load i32, i32* %4
%9 = lshr i32 %8, 8
%10 = and i32 255, %9
%11 = load i32, i32* %4
%12 = lshr i32 %11, 16
%13 = and i32 255, %12
%14 = load i32, i32* %4
%15 = lshr i32 %14, 24
%16 = and i32 255, %15
%17 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %10, i32 %13, i32 %16)
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define i8* @iptoa(i8* returned writeonly %0, i32 %1) {
%3 = and i32 %1, 255
%4 = lshr i32 %1, 8
%5 = and i32 %4, 255
%6 = lshr i32 %1, 16
%7 = and i32 %6, 255
%8 = lshr i32 %1, 24
%9 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5, i32 %7, i32 %8)
ret i8* %0
}
/* Variables and functions */
int Getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
main() {
  int len;
  char line[1000];
  while ((len = Getline(line, 1000)) > 0) {
    if (len > 8)
      printf("%s", line);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <Getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1171 <main+0x51>
cmpl   $0x8,-0x8(%rbp)
jle    116c <main+0x4c>
lea    -0x3f0(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
mov    -0x4(%rbp),%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <Getline@plt>
test   %eax,%eax
jle    1173 <main+0x53>
lea    0xebe(%rip),%r14
mov    %rsp,%rbx
jmp    1161 <main+0x41>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <Getline@plt>
test   %eax,%eax
jle    1173 <main+0x53>
cmp    $0x9,%eax
jb     1150 <main+0x30>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\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 @Getline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0, %10
%6 = phi i32 [ %11, %10 ], [ %3, %0 ]
%7 = icmp ugt i32 %6, 8
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %10
10: ; preds = %8, %5
%11 = call i32 @Getline(i8* %2, i32 1000)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %10, %0
ret i32 0
}
int is_power_of_two(int x) { return (x != 0) && !(x & (x - 1)); }


x86 assembly (clang, -O0):
<is_power_of_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112c <is_power_of_two+0x2c>
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_power_of_two>:
test   %edi,%edi
je     110f <is_power_of_two+0xf>
lea    -0x1(%rdi),%ecx
xor    %eax,%eax
test   %ecx,%edi
sete   %al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_power_of_two(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @llvm.ctpop.i32(i32 %0)
%5 = icmp ult i32 %4, 2
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
int letter(c)
register int c;
{ return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_'); }


x86 assembly (clang, -O0):
<letter>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1120 <letter+0x20>
mov    $0x1,%al
cmpl   $0x7a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1143 <letter+0x43>
cmpl   $0x41,-0x4(%rbp)
jl     1139 <letter+0x39>
mov    $0x1,%al
cmpl   $0x5a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1143 <letter+0x43>
cmpl   $0x5f,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<letter>:
mov    %edi,%eax
and    $0xffffffdf,%eax
add    $0xffffffbf,%eax
cmp    $0x1a,%eax
setb   %al
cmp    $0x5f,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @letter(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %17, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 65
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 90
br i1 %13, label %17, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 95
br label %17
17: ; preds = %14, %11, %5
%18 = phi i1 [ true, %11 ], [ true, %5 ], [ %16, %14 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @letter(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = icmp eq i32 %0, 95
%6 = or i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
double fabs(double);
bool doubleEquality(double a, double b) {
  double d = fabs(a - b);
  return d >= 0.0000000000001;
}


x86 assembly (clang, -O0):
<doubleEquality>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movaps 0xef1(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xecb(%rip),%xmm1
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<doubleEquality>:
subsd  %xmm1,%xmm0
andpd  0xef4(%rip),%xmm0
xor    %eax,%eax
ucomisd 0xefa(%rip),%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @doubleEquality(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fsub double %6, %7
%9 = call double @llvm.fabs.f64(double %8)
store double %9, double* %5
%10 = load double, double* %5
%11 = fcmp oge double %10, 1.000000e-13
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @doubleEquality(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call double @llvm.fabs.f64(double %3)
%5 = fcmp oge double %4, 1.000000e-13
%6 = zext i1 %5 to i32
ret i32 %6
}
int f(int a, int b) { return 0; }


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

x86 assembly (clang, -O2):
<f>:
xor    %eax,%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
ret i32 0
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ SSL;

/* Variables and functions */
int select_server_ctx(int /*<<< orphan*/ *, void *, int /*<<< orphan*/);
int servername_reject_cb(SSL *s, int *ad, void *arg) {
  return select_server_ctx(s, arg, 0);
}


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

x86 assembly (clang, -O2):
<servername_reject_cb>:
mov    %rdx,%rsi
xor    %edx,%edx
jmp    1030 <select_server_ctx@plt>

LLVM IR (-O0):
define i32 @servername_reject_cb(i32* %0, i32* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i8*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %6
%9 = call i32 @select_server_ctx(i32* %7, i8* %8, i32 0)
ret i32 %9
}

LLVM IR (-O2):
define i32 @servername_reject_cb(i32* %0, i32* nocapture readnone %1, i8* %2) {
%4 = tail call i32 @select_server_ctx(i32* %0, i8* %2, i32 0)
ret i32 %4
}
unsigned short font_get_top(struct tff_file_hdr *tff) { return 0; }


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

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

LLVM IR (-O0):
%struct.tff_file_hdr = type opaque
define zeroext i16 @font_get_top(%struct.tff_file_hdr* %0) {
%2 = alloca %struct.tff_file_hdr*
store %struct.tff_file_hdr* %0, %struct.tff_file_hdr** %2
ret i16 0
}

LLVM IR (-O2):
%struct.tff_file_hdr = type opaque
define zeroext i16 @font_get_top(%struct.tff_file_hdr* nocapture readnone %0) {
ret i16 0
}
/* Variables and functions */
int /*<<< orphan*/ do_a();
int /*<<< orphan*/ do_b();
int /*<<< orphan*/ do_c();
int /*<<< orphan*/ do_d();
int /*<<< orphan*/ do_e();
scalar_t__ test_condition();
void test_ifelseifelse() {
  do_a();
  if (test_condition())
    do_b();
  else if (!test_condition())
    do_c();
  else
    do_d();
  do_e();
}


x86 assembly (clang, -O0):
<test_ifelseifelse>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <do_a@plt>
mov    $0x0,%al
call   1040 <test_condition@plt>
cmp    $0x0,%rax
je     1188 <test_ifelseifelse+0x28>
mov    $0x0,%al
call   1050 <do_b@plt>
jmp    11b1 <test_ifelseifelse+0x51>
mov    $0x0,%al
call   1040 <test_condition@plt>
cmp    $0x0,%rax
jne    11a5 <test_ifelseifelse+0x45>
mov    $0x0,%al
call   1080 <do_c@plt>
jmp    11ac <test_ifelseifelse+0x4c>
mov    $0x0,%al
call   1060 <do_d@plt>
jmp    11b1 <test_ifelseifelse+0x51>
mov    $0x0,%al
call   1030 <do_e@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ifelseifelse>:
push   %rax
xor    %eax,%eax
call   1070 <do_a@plt>
xor    %eax,%eax
call   1040 <test_condition@plt>
test   %rax,%rax
je     117d <test_ifelseifelse+0x1d>
xor    %eax,%eax
call   1050 <do_b@plt>
jmp    1199 <test_ifelseifelse+0x39>
xor    %eax,%eax
call   1040 <test_condition@plt>
test   %rax,%rax
je     1192 <test_ifelseifelse+0x32>
xor    %eax,%eax
call   1060 <do_d@plt>
jmp    1199 <test_ifelseifelse+0x39>
xor    %eax,%eax
call   1080 <do_c@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <do_e@plt>

LLVM IR (-O0):
define void @test_ifelseifelse() {
%1 = call i32 (...) @do_a()
%2 = call i64 (...) @test_condition()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @do_b()
br label %14
6: ; preds = %0
%7 = call i64 (...) @test_condition()
%8 = icmp ne i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = call i32 (...) @do_c()
br label %13
11: ; preds = %6
%12 = call i32 (...) @do_d()
br label %13
13: ; preds = %11, %9
br label %14
14: ; preds = %13, %4
%15 = call i32 (...) @do_e()
ret void
}

LLVM IR (-O2):
define void @test_ifelseifelse() {
%1 = tail call i32 (...) @do_a()
%2 = tail call i64 (...) @test_condition()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 (...) @do_b()
br label %13
6: ; preds = %0
%7 = tail call i64 (...) @test_condition()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 (...) @do_c()
br label %13
11: ; preds = %6
%12 = tail call i32 (...) @do_d()
br label %13
13: ; preds = %9, %11, %4
%14 = tail call i32 (...) @do_e()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Error(int, int /*<<< orphan*/, char *, size_t);
int /*<<< orphan*/ errno;
void *malloc(size_t);
void *Malloc(size_t Size) {
  void *Pm;
  if ((Pm = malloc(Size)) == (void *)NULL)
    Error(1, errno, "Cannot malloc %d bytes", Size);
  return (Pm);
}


x86 assembly (clang, -O0):
<Malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1161 <Malloc+0x41>
mov    0x2e96(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edi
lea    0xea4(%rip),%rdx
call   1030 <Error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Malloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1151 <Malloc+0x31>
mov    0x2ea5(%rip),%rax
mov    (%rax),%esi
lea    0xebc(%rip),%rdx
mov    $0x1,%edi
mov    %r14,%rcx
call   1030 <Error@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@errno = global i32 0
@.str = [23 x i8] c"Cannot malloc %d bytes\00"
define i8* @Malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* @errno
%9 = load i64, i64* %2
%10 = call i32 @Error(i32 1, i32 %8, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i64 %9)
br label %11
11: ; preds = %7, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@errno = global i32 0
@.str = [23 x i8] c"Cannot malloc %d bytes\00"
define noalias i8* @Malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @errno
%6 = tail call i32 @Error(i32 1, i32 %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %7
7: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ Msp430AlarmC__1__Alarm__stop();
void TransformAlarmC__1__AlarmFrom__stop(void) {
  Msp430AlarmC__1__Alarm__stop();
}


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

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

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

LLVM IR (-O2):
define void @TransformAlarmC__1__AlarmFrom__stop() {
%1 = tail call i32 (...) @Msp430AlarmC__1__Alarm__stop()
ret void
}
void BN_clear_bit(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_clear_bit() {
ret void
}
void first_GENState(_loc, _Base_GENState) int *_loc, *_Base_GENState;
{ GENState_FIRST_FNC_OBJ(_loc, _Base_GENState); }


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

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

LLVM IR (-O0):
define void @first_GENState(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 (i32*, i32*, ...) bitcast (i32 (...)* @GENState_FIRST_FNC_OBJ to i32 (i32*, i32*, ...)*)(i32* %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @first_GENState(i32* %0, i32* %1) {
%3 = tail call i32 (i32*, i32*, ...) bitcast (i32 (...)* @GENState_FIRST_FNC_OBJ to i32 (i32*, i32*, ...)*)(i32* %0, i32* %1)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
uint8_t dec_to_bcd(char dec) { return (uint8_t)((dec / 10) * 16) + (dec % 10); }


x86 assembly (clang, -O0):
<dec_to_bcd>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
shl    $0x4,%eax
cltq
mov    %rax,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%rax
movslq %edx,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec_to_bcd>:
imul   $0x67,%edi,%eax
movzwl %ax,%ecx
shr    $0xa,%eax
shr    $0xf,%ecx
add    %al,%cl
movsbl %cl,%eax
movzbl %al,%ecx
shl    $0x4,%eax
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%dil
movsbl %dil,%ecx
add    %eax,%ecx
movslq %ecx,%rax
ret

LLVM IR (-O0):
define i64 @dec_to_bcd(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sdiv i32 %4, 10
%6 = mul nsw i32 %5, 16
%7 = sext i32 %6 to i64
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = srem i32 %9, 10
%11 = sext i32 %10 to i64
%12 = add nsw i64 %7, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @dec_to_bcd(i8 signext %0) {
%2 = sdiv i8 %0, 10
%3 = sext i8 %2 to i32
%4 = shl nsw i32 %3, 4
%5 = srem i8 %0, 10
%6 = sext i8 %5 to i32
%7 = add nsw i32 %4, %6
%8 = sext i32 %7 to i64
ret i64 %8
}
void ufshpb_init(struct ufs_hba *hba) {}


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

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

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

LLVM IR (-O2):
%struct.ufs_hba = type opaque
define void @ufshpb_init(%struct.ufs_hba* nocapture %0) {
ret void
}
/* Variables and functions */
float expf(float);
float kneeslope(float x, float k, float linearthreshold) {
  return k * x /
         ((k * linearthreshold + 1.0f) * expf(k * (x - linearthreshold)) - 1);
}


x86 assembly (clang, -O0):
<kneeslope>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xeb8(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
subss  -0xc(%rbp),%xmm1
mulss  %xmm1,%xmm0
call   1030 <expf@plt>
movss  -0x14(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0x10(%rbp),%xmm0
mulss  %xmm2,%xmm1
movss  0xe7a(%rip),%xmm2
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kneeslope>:
push   %rax
movaps %xmm0,%xmm3
mulss  %xmm1,%xmm3
movss  %xmm3,0x4(%rsp)
subss  %xmm2,%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm2,%xmm1
addss  0xece(%rip),%xmm1
movss  %xmm1,(%rsp)
call   1030 <expf@plt>
mulss  (%rsp),%xmm0
addss  0xebb(%rip),%xmm0
movss  0x4(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @kneeslope(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* %5
%8 = load float, float* %4
%9 = fmul float %7, %8
%10 = load float, float* %5
%11 = load float, float* %6
%12 = call float @llvm.fmuladd.f32(float %10, float %11, float 1.000000e+00)
%13 = load float, float* %5
%14 = load float, float* %4
%15 = load float, float* %6
%16 = fsub float %14, %15
%17 = fmul float %13, %16
%18 = call float @expf(float %17)
%19 = call float @llvm.fmuladd.f32(float %12, float %18, float -1.000000e+00)
%20 = fdiv float %9, %19
ret float %20
}

LLVM IR (-O2):
define float @kneeslope(float %0, float %1, float %2) {
%4 = fmul float %0, %1
%5 = tail call float @llvm.fmuladd.f32(float %1, float %2, float 1.000000e+00)
%6 = fsub float %0, %2
%7 = fmul float %6, %1
%8 = tail call float @expf(float %7)
%9 = tail call float @llvm.fmuladd.f32(float %5, float %8, float -1.000000e+00)
%10 = fdiv float %4, %9
ret float %10
}
void releaseTemp(int n) {}


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

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

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

LLVM IR (-O2):
define void @releaseTemp(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ isRep(char *);
int main(int argc, char **argv) {
  if (!isRep(argv[1])) {
    exit(0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <isRep@plt>
cmp    $0x0,%eax
jne    114c <main+0x2c>
xor    %edi,%edi
call   1040 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <isRep@plt>
test   %eax,%eax
je     1132 <main+0x12>
xor    %eax,%eax
pop    %rcx
ret
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @isRep(i8* %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @exit(i32 0)
unreachable
9: ; preds = %2
ret i32 0
}
int HashString(string)
register char *string;
{
  register int result, c;
  result = 0;
  while (1) {
    c = *string;
    string++;
    if (c == 0) {
      break;
    }
    result += (result << 3) + c;
  }
  return result;
}


x86 assembly (clang, -O0):
<HashString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1134 <HashString+0x34>
jmp    1148 <HashString+0x48>
mov    -0xc(%rbp),%eax
shl    $0x3,%eax
add    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <HashString+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HashString>:
mov    (%rdi),%cl
test   %cl,%cl
je     1124 <HashString+0x24>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
lea    (%rax,%rax,8),%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <HashString+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @HashString(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = mul i32 %7, 9
%11 = add i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Type definitions */
struct test_suite {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ test_suite_delete(struct test_suite *);
scalar_t__ test_suite_passed(struct test_suite *);
int /*<<< orphan*/ test_suite_print_results(struct test_suite *);
void test_suite_print_results_and_exit(struct test_suite *suite) {
  int exit_code;
  test_suite_print_results(suite);
  exit_code = test_suite_passed(suite) ? 0 : 1;
  test_suite_delete(suite);
  exit(exit_code);
}


x86 assembly (clang, -O0):
<test_suite_print_results_and_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <test_suite_print_results@plt>
mov    -0x8(%rbp),%rdi
call   1060 <test_suite_passed@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <test_suite_delete@plt>
mov    -0xc(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<test_suite_print_results_and_exit>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <test_suite_print_results@plt>
mov    %rbx,%rdi
call   1060 <test_suite_passed@plt>
xor    %ebp,%ebp
test   %rax,%rax
sete   %bpl
mov    %rbx,%rdi
call   1040 <test_suite_delete@plt>
mov    %ebp,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.test_suite = type { i32 }
define void @test_suite_print_results_and_exit(%struct.test_suite* %0) {
%2 = alloca %struct.test_suite*
%3 = alloca i32
store %struct.test_suite* %0, %struct.test_suite** %2
%4 = load %struct.test_suite*, %struct.test_suite** %2
%5 = call i32 @test_suite_print_results(%struct.test_suite* %4)
%6 = load %struct.test_suite*, %struct.test_suite** %2
%7 = call i64 @test_suite_passed(%struct.test_suite* %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 0, i32 1
store i32 %10, i32* %3
%11 = load %struct.test_suite*, %struct.test_suite** %2
%12 = call i32 @test_suite_delete(%struct.test_suite* %11)
%13 = load i32, i32* %3
%14 = call i32 @exit(i32 %13)
unreachable
}

LLVM IR (-O2):
%struct.test_suite = type { i32 }
define void @test_suite_print_results_and_exit(%struct.test_suite* %0) {
%2 = tail call i32 @test_suite_print_results(%struct.test_suite* %0)
%3 = tail call i64 @test_suite_passed(%struct.test_suite* %0)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @test_suite_delete(%struct.test_suite* %0)
%7 = tail call i32 @exit(i32 %5)
unreachable
}
/* Variables and functions */
int countDigits(unsigned long);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, unsigned long *);
int main() {
  unsigned long n;
  printf("\nEnter a number\n");
  scanf("%lu", &n);
  printf("\nThe number of digits is --> %d\n", countDigits(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <countDigits@plt>
mov    %eax,%esi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rdi
mov    %rsp,%rsi
call   1060 <scanf@plt>
mov    (%rsp),%rdi
call   1050 <countDigits@plt>
lea    0xe98(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"\0AEnter a number\0A\00"
@.str.1 = [4 x i8] c"%lu\00"
@.str.2 = [33 x i8] c"\0AThe number of digits is --> %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %2)
%5 = load i64, i64* %2
%6 = call i32 @countDigits(i64 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%lu\00"
@.str.2 = [33 x i8] c"\0AThe number of digits is --> %d\0A\00"
@str = [16 x i8] c"\0AEnter a number\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%5 = load i64, i64* %1
%6 = call i32 @countDigits(i64 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
int adis16209_configure_ring(struct iio_dev *indio_dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define i32 @adis16209_configure_ring(%struct.iio_dev* nocapture readnone %0) {
ret i32 0
}
void splitDouble(double d, int sides[2]) {
  sides[0] = d;
  sides[1] = (d - sides[0]) * 1000000;
}


x86 assembly (clang, -O0):
<splitDouble>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
cvttsd2si -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
cvtsi2sdl (%rax),%xmm1
subsd  %xmm1,%xmm0
movsd  0xecf(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<splitDouble>:
cvttsd2si %xmm0,%eax
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
subsd  %xmm1,%xmm0
mulsd  0xee8(%rip),%xmm0
mov    %eax,(%rdi)
cvttsd2si %xmm0,%eax
mov    %eax,0x4(%rdi)
ret

LLVM IR (-O0):
define void @splitDouble(double %0, i32* %1) {
%3 = alloca double
%4 = alloca i32*
store double %0, double* %3
store i32* %1, i32** %4
%5 = load double, double* %3
%6 = fptosi double %5 to i32
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
%9 = load double, double* %3
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 0
%12 = load i32, i32* %11
%13 = sitofp i32 %12 to double
%14 = fsub double %9, %13
%15 = fmul double %14, 1.000000e+06
%16 = fptosi double %15 to i32
%17 = load i32*, i32** %4
%18 = getelementptr inbounds i32, i32* %17, i64 1
store i32 %16, i32* %18
ret void
}

LLVM IR (-O2):
define void @splitDouble(double %0, i32* nocapture writeonly %1) {
%3 = fptosi double %0 to i32
store i32 %3, i32* %1
%4 = sitofp i32 %3 to double
%5 = fsub double %0, %4
%6 = fmul double %5, 1.000000e+06
%7 = fptosi double %6 to i32
%8 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %7, i32* %8
ret void
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
char *strdup(const char *str) {
  size_t len;
  char *copy;
  len = strlen(str) + 1;
  copy = malloc(len);
  if (copy != NULL) {
    strcpy(copy, str);
  }
  return copy;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1173 <strdup+0x43>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
add    $0x1,%eax
movslq %eax,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     115a <strdup+0x2a>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @strcpy(i8* %5, i8* %0)
br label %9
9: ; preds = %7, %1
ret i8* %5
}
char rapl_pp0_available() { return 1; }


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

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

LLVM IR (-O0):
define signext i8 @rapl_pp0_available() {
ret i8 1
}

LLVM IR (-O2):
define signext i8 @rapl_pp0_available() {
ret i8 1
}
dg10hello() {}


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

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

LLVM IR (-O0):
define i32 @dg10hello() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @dg10hello() {
ret i32 undef
}
int fun1318() { return 1318; }


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

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

LLVM IR (-O0):
define i32 @fun1318() {
ret i32 1318
}

LLVM IR (-O2):
define i32 @fun1318() {
ret i32 1318
}
/* Variables and functions */
scalar_t__ tan(double);
float tanf(float x) { return (float)tan((double)x); }


x86 assembly (clang, -O0):
<tanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <tan@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tanf>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <tan@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @tanf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @tan(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @tanf(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @tan(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Variables and functions */
char *getRegExMatch(char const *, char const *, int);
char *parseResponse(const char *response) {
  const char *result_regex = "\"result\":\\s*\"(.+)\"";
  return getRegExMatch(result_regex, response, 1);
}


x86 assembly (clang, -O0):
<parseResponse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x1,%edx
call   1030 <getRegExMatch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseResponse>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
mov    $0x1,%edx
jmp    1030 <getRegExMatch@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"\22result\22:\\s*\22(.+)\22\00"
define i8* @parseResponse(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %3
%5 = load i8*, i8** %2
%6 = call i8* @getRegExMatch(i8* %4, i8* %5, i32 1)
ret i8* %6
}

LLVM IR (-O2):
@.str = [19 x i8] c"\22result\22:\\s*\22(.+)\22\00"
define i8* @parseResponse(i8* %0) {
%2 = tail call i8* @getRegExMatch(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0, i32 1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("generate-arctan-tuples-for-GB91\n");
  printf("                                [-i start_idx]\n");
  printf("                                [-j end_idx]\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefc(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1f(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"generate-arctan-tuples-for-GB91\0A\00"
@.str.1 = [48 x i8] c" [-i start_idx]\0A\00"
@.str.2 = [46 x i8] c" [-j end_idx]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [32 x i8] c"generate-arctan-tuples-for-GB91\00"
@str.3 = [47 x i8] c" [-i start_idx]\00"
@str.4 = [45 x i8] c" [-j end_idx]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, struct timer *);
void gettime(struct timer *t) { syscall(228, 2, t); }


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

x86 assembly (clang, -O2):
<gettime>:
mov    %rdi,%rdx
mov    $0xe4,%edi
mov    $0x2,%esi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.timer = type { i32 }
define void @gettime(%struct.timer* %0) {
%2 = alloca %struct.timer*
store %struct.timer* %0, %struct.timer** %2
%3 = load %struct.timer*, %struct.timer** %2
%4 = call i32 @syscall(i32 228, i32 2, %struct.timer* %3)
ret void
}

LLVM IR (-O2):
%struct.timer = type { i32 }
define void @gettime(%struct.timer* %0) {
%2 = tail call i32 @syscall(i32 228, i32 2, %struct.timer* %0)
ret void
}
__float128 calc3(__float128 num) {
  __float128 ret = ((num) - ((((__float128)2.0) * power_of_two(60 - 2))));
  return ret;
}


x86 assembly (clang, -O0):
<calc3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movaps %xmm0,-0x10(%rbp)
movaps -0x10(%rbp),%xmm0
movaps %xmm0,-0x30(%rbp)
xor    %eax,%eax
mov    $0x3a,%edi
call   1030 <power_of_two@plt>
mov    %eax,%edi
call   3880 <__floatsitf>
movaps %xmm0,%xmm1
movaps %xmm1,%xmm0
call   1160 <__addtf3>
movaps %xmm0,%xmm1
movaps -0x30(%rbp),%xmm0
call   2540 <__subtf3>
movaps %xmm0,-0x20(%rbp)
movaps -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret
nopl   0x0(%rax)

x86 assembly (clang, -O2):
<calc3>:
sub    $0x18,%rsp
movaps %xmm0,(%rsp)
mov    $0x3a,%edi
xor    %eax,%eax
call   1030 <power_of_two@plt>
mov    %eax,%edi
call   3870 <__floatsitf>
movaps %xmm0,%xmm1
call   1150 <__addtf3>
movaps %xmm0,%xmm1
movaps (%rsp),%xmm0
add    $0x18,%rsp
jmp    2530 <__subtf3>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)

LLVM IR (-O0):
define fp128 @calc3(fp128 %0) {
%2 = alloca fp128
%3 = alloca fp128
store fp128 %0, fp128* %2
%4 = load fp128, fp128* %2
%5 = call i32 (i32, ...) bitcast (i32 (...)* @power_of_two to i32 (i32, ...)*)(i32 58)
%6 = sitofp i32 %5 to fp128
%7 = call fp128 @llvm.fmuladd.f128(fp128 0xL0000000000000000C000000000000000, fp128 %6, fp128 %4)
store fp128 %7, fp128* %3
%8 = load fp128, fp128* %3
ret fp128 %8
}

LLVM IR (-O2):
define fp128 @calc3(fp128 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @power_of_two to i32 (i32, ...)*)(i32 58)
%3 = sitofp i32 %2 to fp128
%4 = tail call fp128 @llvm.fmuladd.f128(fp128 %3, fp128 0xL0000000000000000C000000000000000, fp128 %0)
ret fp128 %4
}
int is_pointer_in_array(double *p_double_array, double *p_unknown,
                        double last_double) {
  while (*p_double_array != last_double) {
    if (p_double_array == p_unknown)
      return 1;
    p_double_array++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_pointer_in_array>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd -0x20(%rbp),%xmm0
jne    112f <is_pointer_in_array+0x2f>
jp     112f <is_pointer_in_array+0x2f>
jmp    115a <is_pointer_in_array+0x5a>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1149 <is_pointer_in_array+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1161 <is_pointer_in_array+0x61>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1111 <is_pointer_in_array+0x11>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_pointer_in_array>:
movsd  (%rdi),%xmm1
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
ucomisd %xmm0,%xmm1
jne    1118 <is_pointer_in_array+0x18>
jnp    112d <is_pointer_in_array+0x2d>
cmp    %rsi,%rdi
je     1128 <is_pointer_in_array+0x28>
movsd  0x8(%rdi),%xmm1
add    $0x8,%rdi
jmp    1110 <is_pointer_in_array+0x10>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_pointer_in_array(double* %0, double* readnone %1, double %2) {
%4 = load double, double* %0
%5 = fcmp une double %4, %2
br i1 %5, label %9, label %13
6: ; preds = %9
%7 = load double, double* %12
%8 = fcmp une double %7, %2
br i1 %8, label %9, label %13
9: ; preds = %3, %6
%10 = phi double* [ %12, %6 ], [ %0, %3 ]
%11 = icmp eq double* %10, %1
%12 = getelementptr inbounds double, double* %10, i64 1
br i1 %11, label %13, label %6
13: ; preds = %9, %6, %3
%14 = phi i32 [ 0, %3 ], [ 0, %6 ], [ 1, %9 ]
ret i32 %14
}