xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Helloworld.\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Helloworld.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ num(int);
int /*<<< orphan*/ rs(int, int /*<<< orphan*/);
int main(int argc, char **argv) {
  int i;
  for (i = 11; i <= 99999; i++) {
    rs(i, num(i));
  }
  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   $0xb,-0x14(%rbp)
cmpl   $0x1869f,-0x14(%rbp)
jg     1170 <main+0x50>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <num@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%esi
call   1040 <rs@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xb,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <num@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <rs@plt>
add    $0x1,%ebx
cmp    $0x186a0,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 11, %2 ], [ %7, %3 ]
%5 = tail call i32 @num(i32 %4)
%6 = tail call i32 @rs(i32 %4, i32 %5)
%7 = add nuw nsw i32 %4, 1
%8 = icmp eq i32 %7, 100000
br i1 %8, label %9, label %3
9: ; preds = %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ emit(char *);
int /*<<< orphan*/ sprintf(char *, char *);
void end_experiment() {
  char line[140];
  sprintf(line, "End");
  emit(line);
}


x86 assembly (clang, -O0):
<end_experiment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
lea    -0x90(%rbp),%rdi
lea    0xec7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x90(%rbp),%rdi
call   1030 <emit@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_experiment>:
sub    $0x98,%rsp
movl   $0x646e45,(%rsp)
mov    %rsp,%rdi
call   1030 <emit@plt>
add    $0x98,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"End\00"
define void @end_experiment() {
%1 = alloca [140 x i8]
%2 = getelementptr inbounds [140 x i8], [140 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [140 x i8], [140 x i8]* %1, i64 0, i64 0
%5 = call i32 @emit(i8* %4)
ret void
}

LLVM IR (-O2):
define void @end_experiment() {
%1 = alloca [140 x i8]
%2 = getelementptr inbounds [140 x i8], [140 x i8]* %1, i64 0, i64 0
%3 = bitcast [140 x i8]* %1 to i32*
store i32 6581829, i32* %3
%4 = call i32 @emit(i8* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int getc_unlocked(int /*<<< orphan*/ *);
int jgetc(FILE *f) { return getc_unlocked(f); }


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

x86 assembly (clang, -O2):
<jgetc>:
jmp    1030 <getc_unlocked@plt>

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

LLVM IR (-O2):
define i32 @jgetc(i32* nocapture %0) {
%2 = tail call i32 @getc_unlocked(i32* %0)
ret i32 %2
}
/* Variables and functions */
unsigned long lrand48();
int get_b_rand(void) {
  static int ph = 32;
  static unsigned long randseq;
  if (ph > 31) {
    ph = 0;
    randseq = lrand48();
  }
  ph++;
  return ((randseq & (1 << (ph - 1))) >> (ph - 1));
}


x86 assembly (clang, -O0):
<get_b_rand>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x1f,0x2f0d(%rip)
jle    1139 <get_b_rand+0x29>
movl   $0x0,0x2efd(%rip)
mov    $0x0,%al
call   1030 <lrand48@plt>
mov    %rax,0x2eff(%rip)
mov    0x2ee9(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ee0(%rip)
mov    0x2ee9(%rip),%rax
mov    0x2ed3(%rip),%ecx
sub    $0x1,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
movslq %ecx,%rcx
and    %rcx,%rax
mov    0x2ebb(%rip),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
shr    %cl,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_b_rand>:
push   %rax
mov    0x2f11(%rip),%ecx
cmp    $0x1f,%ecx
jle    113c <get_b_rand+0x2c>
movl   $0x0,0x2f02(%rip)
xor    %eax,%eax
call   1030 <lrand48@plt>
mov    %rax,0x2f04(%rip)
mov    0x2eee(%rip),%ecx
jmp    1143 <get_b_rand+0x33>
mov    0x2ef5(%rip),%rax
lea    0x1(%rcx),%edx
mov    %edx,0x2edc(%rip)
mov    $0x1,%edx
shl    %cl,%edx
movslq %edx,%rdx
and    %rax,%rdx
shr    %cl,%rdx
mov    %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@get_b_rand.ph = internal global i32 32
@get_b_rand.randseq = internal global i64 0
define i32 @get_b_rand() {
%1 = load i32, i32* @get_b_rand.ph
%2 = icmp sgt i32 %1, 31
br i1 %2, label %3, label %5
3: ; preds = %0
store i32 0, i32* @get_b_rand.ph
%4 = call i64 (...) @lrand48()
store i64 %4, i64* @get_b_rand.randseq
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @get_b_rand.ph
%7 = add nsw i32 %6, 1
store i32 %7, i32* @get_b_rand.ph
%8 = load i64, i64* @get_b_rand.randseq
%9 = load i32, i32* @get_b_rand.ph
%10 = sub nsw i32 %9, 1
%11 = shl i32 1, %10
%12 = sext i32 %11 to i64
%13 = and i64 %8, %12
%14 = load i32, i32* @get_b_rand.ph
%15 = sub nsw i32 %14, 1
%16 = zext i32 %15 to i64
%17 = lshr i64 %13, %16
%18 = trunc i64 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
@get_b_rand.ph = internal unnamed_addr global i32 32
@get_b_rand.randseq = internal unnamed_addr global i64 0
define i32 @get_b_rand() {
%1 = load i32, i32* @get_b_rand.ph
%2 = icmp sgt i32 %1, 31
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = load i64, i64* @get_b_rand.randseq
br label %8
5: ; preds = %0
store i32 0, i32* @get_b_rand.ph
%6 = tail call i64 (...) @lrand48()
store i64 %6, i64* @get_b_rand.randseq
%7 = load i32, i32* @get_b_rand.ph
br label %8
8: ; preds = %3, %5
%9 = phi i64 [ %6, %5 ], [ %4, %3 ]
%10 = phi i32 [ %7, %5 ], [ %1, %3 ]
%11 = add nsw i32 %10, 1
store i32 %11, i32* @get_b_rand.ph
%12 = shl nuw i32 1, %10
%13 = sext i32 %12 to i64
%14 = and i64 %9, %13
%15 = zext i32 %10 to i64
%16 = lshr i64 %14, %15
%17 = trunc i64 %16 to i32
ret i32 %17
}
/* Variables and functions */
char *popString();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
int /*<<< orphan*/ setenv(char *, char *, int);
void basSetEnv() {
  char *varname;
  char *value;
  value = popString();
  varname = popString();
  pushNumber(setenv(varname, value, 1));
}


x86 assembly (clang, -O0):
<basSetEnv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <popString@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <popString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1030 <setenv@plt>
mov    %eax,%edi
call   1050 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basSetEnv>:
push   %rbx
xor    %eax,%eax
call   1040 <popString@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <popString@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <setenv@plt>
mov    %eax,%edi
pop    %rbx
jmp    1050 <pushNumber@plt>

LLVM IR (-O0):
define void @basSetEnv() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* (...) @popString()
store i8* %3, i8** %2
%4 = call i8* (...) @popString()
store i8* %4, i8** %1
%5 = load i8*, i8** %1
%6 = load i8*, i8** %2
%7 = call i32 @setenv(i8* %5, i8* %6, i32 1)
%8 = call i32 @pushNumber(i32 %7)
ret void
}

LLVM IR (-O2):
define void @basSetEnv() {
%1 = tail call i8* (...) @popString()
%2 = tail call i8* (...) @popString()
%3 = tail call i32 @setenv(i8* %2, i8* %1, i32 1)
%4 = tail call i32 @pushNumber(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void compute_exit_unreachable() {
  int k = 0;
  exit(0);
}


x86 assembly (clang, -O0):
<compute_exit_unreachable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<compute_exit_unreachable>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @compute_exit_unreachable() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @compute_exit_unreachable() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
__attribute__((always_)) int api2(int api_no, int arg1, int arg2) {
  int ret = 0;
  __asm__ __volatile__("int $0x44"
                       : "=a"(ret)
                       : "0"(api_no), "b"(arg1), "c"(arg2));
  return ret;
}


x86 assembly (clang, -O0):
<api2>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ebx
mov    -0x14(%rbp),%ecx
int    $0x44
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<api2>:
push   %rbx
mov    %edx,%ecx
mov    %esi,%ebx
mov    %edi,%eax
int    $0x44
pop    %rbx
ret

LLVM IR (-O0):
define i32 @api2(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
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 asm sideeffect "int $$0x44", "={ax},0,{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
ret i32 %12
}

LLVM IR (-O2):
define i32 @api2(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 asm sideeffect "int $$0x44", "={ax},0,{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ bubble_sort();
int /*<<< orphan*/ pr_array2();
main() {
  int i;
  pr_array2();
  bubble_sort();
  pr_array2();
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = call i32 (...) @pr_array2()
%3 = call i32 (...) @bubble_sort()
%4 = call i32 (...) @pr_array2()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @pr_array2()
%2 = tail call i32 (...) @bubble_sort()
%3 = tail call i32 (...) @pr_array2()
ret i32 0
}
int foo1(unsigned a, unsigned b) { return (a < b); }


x86 assembly (clang, -O0):
<foo1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo1>:
xor    %eax,%eax
cmp    %esi,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @foo1(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 = icmp ult i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @foo1(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ X509;

/* Variables and functions */
int /*<<< orphan*/ checkCertificate(int /*<<< orphan*/ *, char *);
int TCLinkDefaultValidate(int x, void *cert) {
  if (x != 0 || cert == NULL)
    return 0;
  return !checkCertificate((X509 *)cert, "pgw1.trustcommerce.com");
}


x86 assembly (clang, -O0):
<TCLinkDefaultValidate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1134 <TCLinkDefaultValidate+0x24>
cmpq   $0x0,-0x10(%rbp)
jne    1140 <TCLinkDefaultValidate+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1160 <TCLinkDefaultValidate+0x50>
mov    -0x10(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <checkCertificate@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TCLinkDefaultValidate>:
xor    %eax,%eax
test   %edi,%edi
jne    113b <TCLinkDefaultValidate+0x2b>
test   %rsi,%rsi
je     113b <TCLinkDefaultValidate+0x2b>
push   %rax
lea    0xedd(%rip),%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <checkCertificate@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"pgw1.trustcommerce.com\00"
define i32 @TCLinkDefaultValidate(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %12
11: ; preds = %8, %2
store i32 0, i32* %3
br label %19
12: ; preds = %8
%13 = load i8*, i8** %5
%14 = bitcast i8* %13 to i32*
%15 = call i32 @checkCertificate(i32* %14, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
store i32 %18, i32* %3
br label %19
19: ; preds = %12, %11
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@.str = [23 x i8] c"pgw1.trustcommerce.com\00"
define i32 @TCLinkDefaultValidate(i32 %0, i8* %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = bitcast i8* %1 to i32*
%8 = tail call i32 @checkCertificate(i32* %7, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %2, %6
%12 = phi i32 [ %10, %6 ], [ 0, %2 ]
ret i32 %12
}
/* Type definitions */
struct peer {
  int dummy;
};

/* Variables and functions */
struct peer *peer_get(int /*<<< orphan*/);
int /*<<< orphan*/ peer_id_for_hash(unsigned int);
struct peer *peer_for_hash(unsigned int h) {
  return peer_get(peer_id_for_hash(h));
}


x86 assembly (clang, -O0):
<peer_for_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <peer_id_for_hash@plt>
mov    %eax,%edi
call   1030 <peer_get@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<peer_for_hash>:
push   %rax
call   1040 <peer_id_for_hash@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <peer_get@plt>

LLVM IR (-O0):
%struct.peer = type { i32 }
define %struct.peer* @peer_for_hash(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @peer_id_for_hash(i32 %3)
%5 = call %struct.peer* @peer_get(i32 %4)
ret %struct.peer* %5
}

LLVM IR (-O2):
%struct.peer = type { i32 }
define %struct.peer* @peer_for_hash(i32 %0) {
%2 = tail call i32 @peer_id_for_hash(i32 %0)
%3 = tail call %struct.peer* @peer_get(i32 %2)
ret %struct.peer* %3
}
ed(pn) int pn;
{ brc(pn, 'J'); }


x86 assembly (clang, -O0):
<ed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x4a,%esi
mov    $0x0,%al
call   1030 <brc@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ed>:
mov    $0x4a,%esi
xor    %eax,%eax
jmp    1030 <brc@plt>

LLVM IR (-O0):
define i32 @ed(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 (i32, i32, ...) bitcast (i32 (...)* @brc to i32 (i32, i32, ...)*)(i32 %4, i32 74)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @ed(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @brc to i32 (i32, i32, ...)*)(i32 %0, i32 74)
ret i32 undef
}
void __RightAfterISR2Handler(void) {}


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

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

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

LLVM IR (-O2):
define void @__RightAfterISR2Handler() {
ret void
}
/* Variables and functions */
int glutGetWindow();
int /*<<< orphan*/ printf(char *, int, int);
void vis(int visState) {
  printf("VIS: win=%d, v=%d\n", glutGetWindow(), visState);
}


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

x86 assembly (clang, -O2):
<vis>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <glutGetWindow@plt>
lea    0xecf(%rip),%rdi
mov    %eax,%esi
mov    %ebx,%edx
pop    %rbx
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [19 x i8] c"VIS: win=%d, v=%d\0A\00"
define void @vis(i32 %0) {
%2 = tail call i32 (...) @glutGetWindow()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %0)
ret void
}
short fn1(short p1, short p2) { return p2 == 0 ? p1 : p1 / p2; }


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x4(%rbp),%eax
cmp    $0x0,%eax
jne    112b <fn1+0x2b>
movswl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1139 <fn1+0x39>
movswl -0x2(%rbp),%eax
movswl -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
test   %si,%si
je     110f <fn1+0xf>
movswl %si,%ecx
movswl %di,%eax
cltd
idiv   %ecx
ret
movzwl %di,%eax
ret

LLVM IR (-O0):
define signext i16 @fn1(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = sext i16 %5 to i32
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i16, i16* %3
%10 = sext i16 %9 to i32
br label %17
11: ; preds = %2
%12 = load i16, i16* %3
%13 = sext i16 %12 to i32
%14 = load i16, i16* %4
%15 = sext i16 %14 to i32
%16 = sdiv i32 %13, %15
br label %17
17: ; preds = %11, %8
%18 = phi i32 [ %10, %8 ], [ %16, %11 ]
%19 = trunc i32 %18 to i16
ret i16 %19
}

LLVM IR (-O2):
define signext i16 @fn1(i16 signext %0, i16 signext %1) {
%3 = icmp eq i16 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i16 %0 to i32
br label %10
6: ; preds = %2
%7 = sext i16 %1 to i32
%8 = sext i16 %0 to i32
%9 = sdiv i32 %8, %7
br label %10
10: ; preds = %6, %4
%11 = phi i32 [ %5, %4 ], [ %9, %6 ]
%12 = trunc i32 %11 to i16
ret i16 %12
}
/* Type definitions */
struct soap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ soap_set_logfile(struct soap *, int, char const *);
void soap_set_sent_logfile(struct soap *soap, const char *logfile) {
  soap_set_logfile(soap, 1, logfile);
}


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

x86 assembly (clang, -O2):
<soap_set_sent_logfile>:
mov    %rsi,%rdx
mov    $0x1,%esi
jmp    1030 <soap_set_logfile@plt>

LLVM IR (-O0):
%struct.soap = type { i32 }
define void @soap_set_sent_logfile(%struct.soap* %0, i8* %1) {
%3 = alloca %struct.soap*
%4 = alloca i8*
store %struct.soap* %0, %struct.soap** %3
store i8* %1, i8** %4
%5 = load %struct.soap*, %struct.soap** %3
%6 = load i8*, i8** %4
%7 = call i32 @soap_set_logfile(%struct.soap* %5, i32 1, i8* %6)
ret void
}

LLVM IR (-O2):
%struct.soap = type { i32 }
define void @soap_set_sent_logfile(%struct.soap* %0, i8* %1) {
%3 = tail call i32 @soap_set_logfile(%struct.soap* %0, i32 1, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ func_cross(double, double, double, int, int, int);
scalar_t__ func_native(double, double, double, int, int, int);
int __attribute__((sysv_abi)) main() {
  if (func_cross(1.0, 2.0, 3.0, 1, 2, 3) != func_native(1.0, 2.0, 3.0, 1, 2, 3))
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb9(%rip),%xmm0
movsd  0xeb9(%rip),%xmm1
movsd  0xeb9(%rip),%xmm2
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1040 <func_cross@plt>
mov    %rax,-0x10(%rbp)
movsd  0xe89(%rip),%xmm0
movsd  0xe89(%rip),%xmm1
movsd  0xe89(%rip),%xmm2
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1050 <func_native@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     11b2 <main+0x82>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movsd  0xec7(%rip),%xmm0
movsd  0xec7(%rip),%xmm1
movsd  0xec7(%rip),%xmm2
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1040 <func_cross@plt>
mov    %rax,%rbx
movsd  0xe98(%rip),%xmm0
movsd  0xe98(%rip),%xmm1
movsd  0xe98(%rip),%xmm2
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1050 <func_native@plt>
cmp    %rax,%rbx
jne    1195 <main+0x65>
xor    %eax,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @func_cross(double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, i32 1, i32 2, i32 3)
%3 = call i64 @func_native(double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, i32 1, i32 2, i32 3)
%4 = icmp ne i64 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @func_cross(double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, i32 1, i32 2, i32 3)
%2 = tail call i64 @func_native(double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, i32 1, i32 2, i32 3)
%3 = icmp eq i64 %1, %2
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_SIG;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int ASN1_item_i2d_fp(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                     int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_SIG_it;
int i2d_PKCS8_fp(FILE *fp, X509_SIG *p8) {
  return ASN1_item_i2d_fp(&X509_SIG_it, fp, p8);
}


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

x86 assembly (clang, -O2):
<i2d_PKCS8_fp>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ecb(%rip),%rdi
jmp    1030 <ASN1_item_i2d_fp@plt>

LLVM IR (-O0):
@X509_SIG_it = global i32 0
define i32 @i2d_PKCS8_fp(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 @ASN1_item_i2d_fp(i32* @X509_SIG_it, i32* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
@X509_SIG_it = global i32 0
define i32 @i2d_PKCS8_fp(i32* %0, i32* %1) {
%3 = tail call i32 @ASN1_item_i2d_fp(i32* @X509_SIG_it, i32* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ isprint(char);
void ascii_increment(char *buf) {
AGAIN:
  (*buf)++;
  if (*buf == '\0') {
    *buf = ' ';
    ascii_increment(buf + 1);
  } else if (!isprint(*buf)) {
    goto AGAIN;
  }
  return;
}


x86 assembly (clang, -O0):
<ascii_increment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
add    $0x1,%cl
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1160 <ascii_increment+0x40>
mov    -0x8(%rbp),%rax
movb   $0x20,(%rax)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1040 <ascii_increment@plt>
jmp    117f <ascii_increment+0x5f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isprint@plt>
cmp    $0x0,%eax
jne    117a <ascii_increment+0x5a>
jmp    112c <ascii_increment+0xc>
jmp    117f <ascii_increment+0x5f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascii_increment>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rbx),%eax
inc    %al
mov    %al,(%rbx)
je     1137 <ascii_increment+0x27>
movsbl %al,%edi
call   1030 <isprint@plt>
test   %eax,%eax
je     1120 <ascii_increment+0x10>
jmp    1140 <ascii_increment+0x30>
movb   $0x20,(%rbx)
add    $0x1,%rbx
jmp    1120 <ascii_increment+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ascii_increment(i8* nocapture %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %9, %8 ]
br label %4
4: ; preds = %10, %2
%5 = load i8, i8* %3
%6 = add i8 %5, 1
store i8 %6, i8* %3
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %4
store i8 32, i8* %3
%9 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
10: ; preds = %4
%11 = tail call i32 @isprint(i8 signext %6)
%12 = icmp eq i32 %11, 0
br i1 %12, label %4, label %13
13: ; preds = %10
ret void
}
/* Variables and functions */
int isspace(char c) {
  return (c == ' ' || c == '\t' || c == '\n' || c == '\12');
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     114d <isspace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     114d <isspace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     114d <isspace+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
cmp    $0x20,%dil
sete   %al
add    $0xf7,%dil
cmp    $0x2,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isspace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 32
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 9
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 10
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 10
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @isspace(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = add i8 %0, -9
%4 = icmp ult i8 %3, 2
%5 = or i1 %2, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ dnansumpw(int /*<<< orphan*/ const, double *, double const *,
                             int /*<<< orphan*/ const);
double stdlib_strided_dnanmeanpw(const int64_t N, const double *X,
                                 const int64_t stride) {
  double W[] = {0.0, 0.0};
  dnansumpw(N, W, X, stride);
  return W[0] / W[1];
}


x86 assembly (clang, -O0):
<stdlib_strided_dnanmeanpw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <memset@plt>
mov    -0x4(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1040 <dnansumpw@plt>
movsd  -0x30(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_strided_dnanmeanpw>:
sub    $0x18,%rsp
mov    %edx,%ecx
mov    %rsi,%rdx
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
call   1030 <dnansumpw@plt>
movsd  (%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @stdlib_strided_dnanmeanpw(i32 %0, double* %1, i32 %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca i32
%7 = alloca [2 x double]
store i32 %0, i32* %4
store double* %1, double** %5
store i32 %2, i32* %6
%8 = bitcast [2 x double]* %7 to i8*
%9 = load i32, i32* %4
%10 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 0, i64 0
%11 = load double*, double** %5
%12 = load i32, i32* %6
%13 = call i32 @dnansumpw(i32 %9, double* %10, double* %11, i32 %12)
%14 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 0, i64 0
%15 = load double, double* %14
%16 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 0, i64 1
%17 = load double, double* %16
%18 = fdiv double %15, %17
ret double %18
}

LLVM IR (-O2):
define double @stdlib_strided_dnanmeanpw(i32 %0, double* %1, i32 %2) {
%4 = alloca [2 x double]
%5 = bitcast [2 x double]* %4 to i8*
%6 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
%7 = call i32 @dnansumpw(i32 %0, double* %6, double* %1, i32 %2)
%8 = load double, double* %6
%9 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 1
%10 = load double, double* %9
%11 = fdiv double %8, %10
ret double %11
}
/* Variables and functions */
int *atoi(char *);
scalar_t__ strcasecmp(char *, char *);
char *strtok_r(int /*<<< orphan*/ *, char *, char **);
int getParamValueInt(char *pcmdStr, char *pParam, int *paramValue) {
  char *str;
  if (strcasecmp(pcmdStr, pParam) == 0) {
    str = strtok_r(NULL, ",", &pcmdStr);
    paramValue = atoi(str);
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<getParamValueInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    118c <getParamValueInt+0x5c>
xor    %eax,%eax
mov    %eax,%edi
lea    0xe9a(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <strtok_r@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <atoi@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x4(%rbp)
jmp    1193 <getParamValueInt+0x63>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getParamValueInt>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,0x8(%rsp)
call   1030 <strcasecmp@plt>
mov    $0xffffffff,%ebx
test   %rax,%rax
jne    114e <getParamValueInt+0x2e>
lea    0xec0(%rip),%rsi
xor    %ebx,%ebx
lea    0x8(%rsp),%rdx
xor    %edi,%edi
call   1040 <strtok_r@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c",\00"
define i32 @getParamValueInt(i8* %0, i8* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32* %2, i32** %7
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i64 @strcasecmp(i8* %9, i8* %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %3
%14 = call i8* @strtok_r(i32* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %5)
store i8* %14, i8** %8
%15 = load i8*, i8** %8
%16 = call i32* @atoi(i8* %15)
store i32* %16, i32** %7
store i32 0, i32* %4
br label %18
17: ; preds = %3
store i32 -1, i32* %4
br label %18
18: ; preds = %17, %13
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
@.str = [2 x i8] c",\00"
define i32 @getParamValueInt(i8* %0, i8* nocapture %1, i32* nocapture readnone %2) {
%4 = alloca i8*
store i8* %0, i8** %4
%5 = tail call i64 @strcasecmp(i8* %0, i8* %1)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i8* @strtok_r(i32* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %4)
br label %9
9: ; preds = %3, %7
%10 = phi i32 [ 0, %7 ], [ -1, %3 ]
ret i32 %10
}
/* Variables and functions */
int fatorial(int);
int fatorialQuadruplo(int n) { return fatorial(2 * n) / fatorial(n); }


x86 assembly (clang, -O0):
<fatorialQuadruplo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
call   1030 <fatorial@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <fatorial@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fatorialQuadruplo>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    (%rbx,%rbx,1),%edi
call   1030 <fatorial@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <fatorial@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fatorialQuadruplo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 2, %3
%5 = call i32 @fatorial(i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @fatorial(i32 %6)
%8 = sdiv i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @fatorialQuadruplo(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = tail call i32 @fatorial(i32 %2)
%4 = tail call i32 @fatorial(i32 %0)
%5 = sdiv i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int inp_emulate(int);
char TOSH_READ_RFM_RXD_PIN() { return 0x01 & (inp_emulate(0x38) >> 2); }


x86 assembly (clang, -O0):
<TOSH_READ_RFM_RXD_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x38,%edi
call   1030 <inp_emulate@plt>
sar    $0x2,%eax
and    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_READ_RFM_RXD_PIN>:
push   %rax
mov    $0x38,%edi
call   1030 <inp_emulate@plt>
shr    $0x2,%al
and    $0x1,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @TOSH_READ_RFM_RXD_PIN() {
%1 = call i32 @inp_emulate(i32 56)
%2 = ashr i32 %1, 2
%3 = and i32 1, %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @TOSH_READ_RFM_RXD_PIN() {
%1 = tail call i32 @inp_emulate(i32 56)
%2 = trunc i32 %1 to i8
%3 = lshr i8 %2, 2
%4 = and i8 %3, 1
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cWriteByte(unsigned char, unsigned char);
void SensorSetReg_HV7131GP(unsigned short uAddr, unsigned short uVal) {
  VIM_SIF_I2cWriteByte((unsigned char)uAddr, (unsigned char)uVal);
}


x86 assembly (clang, -O0):
<SensorSetReg_HV7131GP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
mov    %al,%cl
mov    -0x4(%rbp),%ax
movzbl %cl,%edi
movzbl %al,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetReg_HV7131GP>:
movzbl %dil,%edi
movzbl %sil,%esi
jmp    1030 <VIM_SIF_I2cWriteByte@plt>

LLVM IR (-O0):
define void @SensorSetReg_HV7131GP(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = trunc i16 %5 to i8
%7 = load i16, i16* %4
%8 = trunc i16 %7 to i8
%9 = call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %6, i8 zeroext %8)
ret void
}

LLVM IR (-O2):
define void @SensorSetReg_HV7131GP(i16 zeroext %0, i16 zeroext %1) {
%3 = trunc i16 %0 to i8
%4 = trunc i16 %1 to i8
%5 = tail call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %3, i8 zeroext %4)
ret void
}
void X509V3_EXT_conf(void) {}


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

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

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

LLVM IR (-O2):
define void @X509V3_EXT_conf() {
ret void
}
void udev_selinux_resetfscreatecon(struct udev *udev) {}


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

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

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

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

/* Variables and functions */
uint64_t rotr64(uint64_t x, unsigned n) { return (x >> n) | (x << (64 - n)); }


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

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

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

LLVM IR (-O2):
define i32 @rotr64(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = sub i32 64, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
int precedence(char c) {
  switch (c) {
  case '+':
  case '-':
    return 1;
  case '*':
  case '/':
    return 2;
  case '^':
    return 3;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<precedence>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x2a,%eax
je     116f <precedence+0x6f>
jmp    111f <precedence+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x2b,%eax
je     1163 <precedence+0x63>
jmp    1130 <precedence+0x30>
mov    -0xc(%rbp),%eax
sub    $0x2d,%eax
je     1163 <precedence+0x63>
jmp    1141 <precedence+0x41>
mov    -0xc(%rbp),%eax
sub    $0x2f,%eax
je     116f <precedence+0x6f>
jmp    1152 <precedence+0x52>
mov    -0xc(%rbp),%eax
sub    $0x5e,%eax
je     117b <precedence+0x7b>
jmp    1187 <precedence+0x87>
movl   $0x1,-0x4(%rbp)
jmp    118e <precedence+0x8e>
movl   $0x2,-0x4(%rbp)
jmp    118e <precedence+0x8e>
movl   $0x3,-0x4(%rbp)
jmp    118e <precedence+0x8e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<precedence>:
lea    -0x2a(%rdi),%ecx
cmp    $0x5,%ecx
ja     1123 <precedence+0x23>
mov    $0x1,%eax
lea    0xeec(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x2,%eax
ret
cmp    $0x5e,%edi
jne    112e <precedence+0x2e>
mov    $0x3,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @precedence(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %9 [
i32 43, label %6
i32 45, label %6
i32 42, label %7
i32 47, label %7
i32 94, label %8
]
6: ; preds = %1, %1
store i32 1, i32* %2
br label %10
7: ; preds = %1, %1
store i32 2, i32* %2
br label %10
8: ; preds = %1
store i32 3, i32* %2
br label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %10
10: ; preds = %9, %8, %7, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @precedence(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %5 [
i32 43, label %6
i32 45, label %6
i32 42, label %3
i32 47, label %3
i32 94, label %4
]
3: ; preds = %1, %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %1, %5, %4, %3
%7 = phi i32 [ -1, %5 ], [ 3, %4 ], [ 2, %3 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %7
}
void gtk_tree_store_reorder() {}


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

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

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

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

/* Variables and functions */
int clzll(int /*<<< orphan*/ const);
int u64log2(const uint64_t v) { return 63 - clzll(v); }


x86 assembly (clang, -O0):
<u64log2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <clzll@plt>
mov    %eax,%ecx
mov    $0x3f,%eax
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u64log2>:
push   %rax
call   1030 <clzll@plt>
mov    $0x3f,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @u64log2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @clzll(i32 %3)
%5 = sub nsw i32 63, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @u64log2(i32 %0) {
%2 = tail call i32 @clzll(i32 %0)
%3 = sub nsw i32 63, %2
ret i32 %3
}
void OCSP_RESPBYTES_new(void) {}


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

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

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

LLVM IR (-O2):
define void @OCSP_RESPBYTES_new() {
ret void
}
int div(int f, int s) { return (f / s); }


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

x86 assembly (clang, -O2):
<div>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @div(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 = sdiv i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @div(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
/* Variables and functions */
char *fibonacci_word(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("Enter N: ");
  scanf("%d", &n);
  printf("The fibonacci word at position %d is: %s", n, fibonacci_word(n));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <fibonacci_word@plt>
mov    -0x8(%rbp),%esi
mov    %rax,%rdx
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1040 <fibonacci_word@plt>
lea    0xea7(%rip),%rdi
mov    %ebx,%esi
mov    %rax,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Enter N: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [41 x i8] c"The fibonacci word at position %d is: %s\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 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 = load i32, i32* %1
%6 = call i8* @fibonacci_word(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0), i32 %4, i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Enter N: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [41 x i8] c"The fibonacci word at position %d is: %s\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 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 i8* @fibonacci_word(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0), i32 %5, i8* %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void skiplist_global_init(void) { srand(time(NULL)); }


x86 assembly (clang, -O0):
<skiplist_global_init>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<skiplist_global_init>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <srand@plt>

LLVM IR (-O0):
define void @skiplist_global_init() {
%1 = call i32 @time(i32* null)
%2 = call i32 @srand(i32 %1)
ret void
}

LLVM IR (-O2):
define void @skiplist_global_init() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_dynarray_get() {
  printf("NOT IMPLEMENTED:"
         "pa_dynarray_get"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_dynarray_get\00"
define i32 @pa_dynarray_get() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}