xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void pl(char *str) {
  putchar('\n');
  while (*str)
    putchar(*str++);
}


x86 assembly (clang, -O0):
<pl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114f <pl+0x3f>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    1126 <pl+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pl>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rbx),%al
test   %al,%al
je     1143 <pl+0x33>
add    $0x1,%rbx
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <pl+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @pl(i8* nocapture %0) {
%2 = tail call i32 @putchar(i8 signext 10)
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %1, %5
%6 = phi i8 [ %10, %5 ], [ %3, %1 ]
%7 = phi i8* [ %8, %5 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = tail call i32 @putchar(i8 signext %6)
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %1
ret void
}
int isPrime(int n) {
  int i = 2, j = 0;
  while (n % i != 0 && i++ < n)
    j++;
  if (j == (n - 2))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isPrime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
xor    %eax,%eax
cmp    $0x0,%edx
mov    %al,-0x11(%rbp)
je     113e <isPrime+0x3e>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
cmp    -0x8(%rbp),%eax
setl   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    114e <isPrime+0x4e>
jmp    115c <isPrime+0x5c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1115 <isPrime+0x15>
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jne    1179 <isPrime+0x79>
movl   $0x1,-0x4(%rbp)
jmp    1180 <isPrime+0x80>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPrime>:
xor    %ecx,%ecx
cmp    $0x3,%edi
jl     1123 <isPrime+0x23>
mov    %edi,%eax
and    $0x1,%eax
je     1123 <isPrime+0x23>
xor    %ecx,%ecx
lea    0x3(%rcx),%esi
add    $0x1,%ecx
mov    %edi,%eax
cltd
idiv   %esi
cmp    %edi,%esi
jge    1123 <isPrime+0x23>
test   %edx,%edx
jne    1110 <isPrime+0x10>
add    $0xfffffffe,%edi
xor    %eax,%eax
cmp    %edi,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @isPrime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 2, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %18, %1
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = srem i32 %7, %8
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %6
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1
store i32 %13, i32* %4
%14 = load i32, i32* %3
%15 = icmp slt i32 %12, %14
br label %16
16: ; preds = %11, %6
%17 = phi i1 [ false, %6 ], [ %15, %11 ]
br i1 %17, label %18, label %21
18: ; preds = %16
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %16
%22 = load i32, i32* %5
%23 = load i32, i32* %3
%24 = sub nsw i32 %23, 2
%25 = icmp eq i32 %22, %24
br i1 %25, label %26, label %27
26: ; preds = %21
store i32 1, i32* %2
br label %28
27: ; preds = %21
store i32 0, i32* %2
br label %28
28: ; preds = %27, %26
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
define i32 @isPrime(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp ne i32 %2, 0
%4 = icmp sgt i32 %0, 2
%5 = and i1 %4, %3
br i1 %5, label %6, label %15
6: ; preds = %1, %6
%7 = phi i32 [ %10, %6 ], [ 0, %1 ]
%8 = phi i32 [ %9, %6 ], [ 2, %1 ]
%9 = add nuw nsw i32 %8, 1
%10 = add nuw nsw i32 %7, 1
%11 = srem i32 %0, %9
%12 = icmp ne i32 %11, 0
%13 = icmp slt i32 %9, %0
%14 = and i1 %13, %12
br i1 %14, label %6, label %15
15: ; preds = %6, %1
%16 = phi i32 [ 0, %1 ], [ %10, %6 ]
%17 = add nsw i32 %0, -2
%18 = icmp eq i32 %16, %17
%19 = zext i1 %18 to i32
ret i32 %19
}
int __attribute__((no)) foo(int a __attribute__((unused)), long long b) {
  return (int)b;
}


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

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

LLVM IR (-O0):
define i32 @foo(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i64 %1) {
%3 = trunc i64 %1 to i32
ret i32 %3
}
unsigned xrop3_233_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  unsigned stk4;
  stk4 = D & S;
  stk4 = ~stk4;
  stk3 = T & stk4;
  stk2 = S ^ stk3;
  stk1 = D ^ stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_233_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
and    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_233_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
not    %edi
and    %edi,%eax
xor    %ecx,%eax
xor    $0xffffff00,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_233_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
store i32 %17, i32* %6
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = or i32 %20, %22
store i32 %23, i32* %7
%24 = load i32, i32* %5
%25 = load i32, i32* %6
%26 = and i32 %24, %25
store i32 %26, i32* %11
%27 = load i32, i32* %11
%28 = xor i32 %27, -1
store i32 %28, i32* %11
%29 = load i32, i32* %7
%30 = load i32, i32* %11
%31 = and i32 %29, %30
store i32 %31, i32* %10
%32 = load i32, i32* %6
%33 = load i32, i32* %10
%34 = xor i32 %32, %33
store i32 %34, i32* %9
%35 = load i32, i32* %5
%36 = load i32, i32* %9
%37 = xor i32 %35, %36
store i32 %37, i32* %8
%38 = load i32, i32* %8
%39 = xor i32 %38, -1
store i32 %39, i32* %8
%40 = load i32, i32* %8
ret i32 %40
}

LLVM IR (-O2):
define i32 @xrop3_233_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %3, -1
%8 = and i32 %6, %7
%9 = xor i32 %4, %8
%10 = xor i32 %9, -256
ret i32 %10
}
int Operand_soffsetx4_decode(unsigned int *valp) {
  unsigned soffsetx4_0, offset_0;
  offset_0 = *valp & 0x3ffff;
  soffsetx4_0 = 0x4 + ((((int)offset_0 << 14) >> 14) << 2);
  *valp = soffsetx4_0;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_soffsetx4_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x3ffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0xe,%eax
sar    $0xe,%eax
shl    $0x2,%eax
add    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_soffsetx4_decode>:
mov    (%rdi),%eax
shl    $0xe,%eax
sar    $0xc,%eax
add    $0x4,%eax
mov    %eax,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @Operand_soffsetx4_decode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 14
%4 = ashr exact i32 %3, 12
%5 = add nsw i32 %4, 4
store i32 %5, i32* %0
ret i32 0
}
unsigned long insert_bba(unsigned long insn, long value, const char **errmsg) {
  return insn | (((insn >> 16) & 0x1f) << 11);
}


x86 assembly (clang, -O0):
<insert_bba>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
shr    $0x10,%rcx
and    $0x1f,%rcx
shl    $0xb,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert_bba>:
mov    %rdi,%rax
shr    $0x5,%rax
and    $0xf800,%eax
or     %rdi,%rax
ret

LLVM IR (-O0):
define i64 @insert_bba(i64 %0, i64 %1, i8** %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8**
store i64 %0, i64* %4
store i64 %1, i64* %5
store i8** %2, i8*** %6
%7 = load i64, i64* %4
%8 = load i64, i64* %4
%9 = lshr i64 %8, 16
%10 = and i64 %9, 31
%11 = shl i64 %10, 11
%12 = or i64 %7, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @insert_bba(i64 %0, i64 %1, i8** nocapture readnone %2) {
%4 = lshr i64 %0, 5
%5 = and i64 %4, 63488
%6 = or i64 %5, %0
ret i64 %6
}
int check_prime(int num) {
  int j, r;
  if (num == 1)
    return 0;
  for (j = 2; j < num; j++) {
    r = num % j;
    if (r == 0)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<check_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    111d <check_prime+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    116a <check_prime+0x6a>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1163 <check_prime+0x63>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1150 <check_prime+0x50>
movl   $0x0,-0x4(%rbp)
jmp    116a <check_prime+0x6a>
jmp    1155 <check_prime+0x55>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <check_prime+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_prime>:
xor    %ecx,%ecx
cmp    $0x1,%edi
jne    110a <check_prime+0xa>
mov    %ecx,%eax
ret
cmp    $0x3,%edi
jl     1130 <check_prime+0x30>
mov    $0x2,%esi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1107 <check_prime+0x7>
add    $0x1,%esi
cmp    %esi,%edi
jne    1120 <check_prime+0x20>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @check_prime(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = icmp sgt i32 %0, 2
br i1 %4, label %7, label %12
5: ; preds = %7
%6 = icmp eq i32 %11, %0
br i1 %6, label %12, label %7
7: ; preds = %3, %5
%8 = phi i32 [ %11, %5 ], [ 2, %3 ]
%9 = srem i32 %0, %8
%10 = icmp eq i32 %9, 0
%11 = add nuw nsw i32 %8, 1
br i1 %10, label %12, label %5
12: ; preds = %7, %5, %3, %1
%13 = phi i32 [ 0, %1 ], [ 1, %3 ], [ 0, %7 ], [ 1, %5 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int rand();
void print_value(int type) {
  if (type == 2) {
    printf("\"blah\"");
  } else {
    printf("%d", rand() % 1024);
  }
}


x86 assembly (clang, -O0):
<print_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    1148 <print_value+0x28>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1167 <print_value+0x47>
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x400,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_value>:
cmp    $0x2,%edi
jne    1133 <print_value+0x13>
lea    0xed4(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>
push   %rax
xor    %eax,%eax
call   1040 <rand@plt>
lea    0x3ff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffc00,%ecx
sub    %ecx,%eax
lea    0xeb2(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"\22blah\22\00"
@.str.1 = [3 x i8] c"%d\00"
define void @print_value(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 2
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %11
7: ; preds = %1
%8 = call i32 (...) @rand()
%9 = srem i32 %8, 1024
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"\22blah\22\00"
@.str.1 = [3 x i8] c"%d\00"
define void @print_value(i32 %0) {
%2 = icmp eq i32 %0, 2
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %9
5: ; preds = %1
%6 = tail call i32 (...) @rand()
%7 = srem i32 %6, 1024
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yyerror(char *);
void mips32_r2_inst() {
  yyerror("Warning: MIPS32 Rev 2 instruction is not implemented. Instruction "
          "ignored.");
}


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

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

LLVM IR (-O0):
@.str = [75 x i8] c"Warning: MIPS32 Rev 2 instruction is not implemented. Instruction ignored.\00"
define void @mips32_r2_inst() {
%1 = call i32 @yyerror(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [75 x i8] c"Warning: MIPS32 Rev 2 instruction is not implemented. Instruction ignored.\00"
define void @mips32_r2_inst() {
%1 = tail call i32 @yyerror(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ a_and(int *, int);
void a_and_64(volatile uint64_t *p, uint64_t v) {
  a_and((int *)p, v);
  a_and((int *)p + 1, v >> 32);
}


x86 assembly (clang, -O0):
<a_and_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <a_and@plt>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0xc(%rbp),%esi
mov    $0x20,%ecx
sar    %cl,%esi
call   1030 <a_and@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_and_64>:
push   %rbx
mov    %rdi,%rbx
call   1030 <a_and@plt>
add    $0x4,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <a_and@plt>

LLVM IR (-O0):
define void @a_and_64(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 @a_and(i32* %5, i32 %6)
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %4
%11 = ashr i32 %10, 32
%12 = call i32 @a_and(i32* %9, i32 %11)
ret void
}

LLVM IR (-O2):
define void @a_and_64(i32* %0, i32 %1) {
%3 = tail call i32 @a_and(i32* %0, i32 %1)
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = tail call i32 @a_and(i32* %4, i32 poison)
ret void
}
/* Type definitions */
typedef scalar_t__ int8_t;
typedef float int32_t;

/* Variables and functions */
float frexpf(float, int *);
void FlattenFloat(int32_t *mantissa, int8_t *exponent, float number) {
  int exp;
  int32_t mant;
  const int32_t MAXVAL = 0x7FFFFFFF;
  float fractional_mant;
  fractional_mant = frexpf(number, &exp);
  mant = MAXVAL * fractional_mant;
  *mantissa = mant;
  *exponent = (int8_t)exp;
  return;
}


x86 assembly (clang, -O0):
<FlattenFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movss  0xed3(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x14(%rbp),%xmm0
lea    -0x18(%rbp),%rdi
call   1030 <frexpf@plt>
movss  %xmm0,-0x24(%rbp)
movss  0xeb3(%rip),%xmm0
mulss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movslq -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlattenFloat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x4(%rsp),%rdi
call   1030 <frexpf@plt>
mulss  0xed4(%rip),%xmm0
movss  %xmm0,(%rbx)
movslq 0x4(%rsp),%rax
mov    %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @FlattenFloat(float* %0, i64* %1, float %2) {
%4 = alloca float*
%5 = alloca i64*
%6 = alloca float
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float* %0, float** %4
store i64* %1, i64** %5
store float %2, float* %6
store float 0x41E0000000000000, float* %9
%11 = load float, float* %6
%12 = call float @frexpf(float %11, i32* %7)
store float %12, float* %10
%13 = load float, float* %10
%14 = fmul float 0x41E0000000000000, %13
store float %14, float* %8
%15 = load float, float* %8
%16 = load float*, float** %4
store float %15, float* %16
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = load i64*, i64** %5
store i64 %18, i64* %19
ret void
}

LLVM IR (-O2):
define void @FlattenFloat(float* nocapture writeonly %0, i64* nocapture writeonly %1, float %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call float @frexpf(float %2, i32* %4)
%7 = fmul float %6, 0x41E0000000000000
store float %7, float* %0
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
store i64 %9, i64* %1
ret void
}
void ajObooutExit(void) { return; }


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

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

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

LLVM IR (-O2):
define void @ajObooutExit() {
ret void
}
int operacao(int k) {
  k--;
  return k * k;
}


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

x86 assembly (clang, -O2):
<operacao>:
lea    -0x1(%rdi),%eax
imul   %eax,%eax
ret

LLVM IR (-O0):
define i32 @operacao(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, -1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = mul nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @operacao(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = mul nsw i32 %2, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, char const *, char const *);
int toupper(char const);
char *sethomefile(char *buf, const char *userid, const char *filename) {
  sprintf(buf, "home/%c/%s/%s", toupper(userid[0]), userid, filename);
  return buf;
}


x86 assembly (clang, -O0):
<sethomefile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%edx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xea3(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sethomefile>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
movsbl (%rsi),%edi
call   1030 <toupper@plt>
lea    0xec3(%rip),%rsi
mov    %r15,%rdi
mov    %eax,%edx
mov    %rbx,%rcx
mov    %r14,%r8
call   1040 <sprintf@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [14 x i8] c"home/%c/%s/%s\00"
define i8* @sethomefile(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = call i32 @toupper(i8 signext %10)
%12 = load i8*, i8** %5
%13 = load i8*, i8** %6
%14 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %11, i8* %12, i8* %13)
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
@.str = [14 x i8] c"home/%c/%s/%s\00"
define i8* @sethomefile(i8* returned writeonly %0, i8* %1, i8* %2) {
%4 = load i8, i8* %1
%5 = tail call i32 @toupper(i8 signext %4)
%6 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %1, i8* %2)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fizzbuzz() { printf("FizzBuzz\n"); }


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"FizzBuzz\00"
define void @fizzbuzz() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ calc_parse();
int /*<<< orphan*/ feof(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int main(void) {
  while (!feof(stdin)) {
    calc_parse();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
call   1030 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1152 <main+0x32>
jmp    115e <main+0x3e>
mov    $0x0,%al
call   1040 <calc_parse@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ec0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edi
call   1030 <feof@plt>
test   %eax,%eax
jne    1144 <main+0x24>
xor    %eax,%eax
call   1040 <calc_parse@plt>
jmp    1130 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* @stdin
%4 = call i32 @feof(i32 %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (...) @calc_parse()
br label %2
9: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @feof(i32 %1)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0, %4
%5 = tail call i32 (...) @calc_parse()
%6 = load i32, i32* @stdin
%7 = tail call i32 @feof(i32 %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %4, label %9
9: ; preds = %4, %0
ret i32 0
}
void pci_restore_ats_state(struct pci_dev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @pci_restore_ats_state(%struct.pci_dev* nocapture %0) {
ret void
}
/* Variables and functions */
int putfil(char);
int zputfil(char c) { return (putfil(c)); }


x86 assembly (clang, -O0):
<zputfil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <putfil@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zputfil>:
jmp    1030 <putfil@plt>

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

LLVM IR (-O2):
define i32 @zputfil(i8 signext %0) {
%2 = tail call i32 @putfil(i8 signext %0)
ret i32 %2
}
/* Variables and functions */
double gengam(double, double);
void gamm_rndc(int n, double a, double b, double *array) {
  int i;
  for (i = 0; i < n; i++)
    *(array + i) = gengam(a, b);
}


x86 assembly (clang, -O0):
<gamm_rndc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1166 <gamm_rndc+0x56>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1030 <gengam@plt>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1130 <gamm_rndc+0x20>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gamm_rndc>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
test   %edi,%edi
jle    114f <gamm_rndc+0x3f>
mov    %rsi,%r14
mov    %edi,%r15d
xor    %ebx,%ebx
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1030 <gengam@plt>
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <gamm_rndc+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @gamm_rndc(i32 %0, double %1, double %2, double* nocapture writeonly %3) {
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %14
6: ; preds = %4
%7 = zext i32 %0 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %12, %8 ]
%10 = tail call double @gengam(double %1, double %2)
%11 = getelementptr inbounds double, double* %3, i64 %9
store double %10, double* %11
%12 = add nuw nsw i64 %9, 1
%13 = icmp eq i64 %12, %7
br i1 %13, label %14, label %8
14: ; preds = %8, %4
ret void
}
/* Variables and functions */
double __infer_nondet_double();
double expm1(double x) { return __infer_nondet_double(); }


x86 assembly (clang, -O0):
<expm1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_double@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @expm1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double (...) @__infer_nondet_double()
ret double %3
}

LLVM IR (-O2):
define double @expm1(double %0) {
%2 = tail call double (...) @__infer_nondet_double()
ret double %2
}
/* Variables and functions */
scalar_t__ random();
void Mesh_System_RandomNumber(unsigned char *buffer, unsigned char length) {
  while (length--) {
    *buffer++ = (unsigned char)random();
  }
}


x86 assembly (clang, -O0):
<Mesh_System_RandomNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    %al,%cl
add    $0xff,%cl
mov    %cl,-0x9(%rbp)
cmp    $0x0,%al
je     1154 <Mesh_System_RandomNumber+0x44>
mov    $0x0,%al
call   1030 <random@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1122 <Mesh_System_RandomNumber+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mesh_System_RandomNumber>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1144 <Mesh_System_RandomNumber+0x34>
mov    %rdi,%r14
movzbl %sil,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <random@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
cmp    %bl,%r15b
jne    1130 <Mesh_System_RandomNumber+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @Mesh_System_RandomNumber(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
br label %5
5: ; preds = %9, %2
%6 = load i8, i8* %4
%7 = add i8 %6, -1
store i8 %7, i8* %4
%8 = icmp ne i8 %6, 0
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = call i64 (...) @random()
%11 = trunc i64 %10 to i8
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %3
store i8 %11, i8* %12
br label %5
14: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @Mesh_System_RandomNumber(i8* nocapture writeonly %0, i8 zeroext %1) {
%3 = icmp eq i8 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i8 [ %7, %4 ], [ %1, %2 ]
%6 = phi i8* [ %10, %4 ], [ %0, %2 ]
%7 = add i8 %5, -1
%8 = tail call i64 (...) @random()
%9 = trunc i64 %8 to i8
%10 = getelementptr inbounds i8, i8* %6, i64 1
store i8 %9, i8* %6
%11 = icmp eq i8 %7, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %2
ret void
}
/* Type definitions */
struct rtattr {
  int dummy;
};

/* Variables and functions */
char const *RTA_DATA(struct rtattr const *);
const char *rta_getattr_str(const struct rtattr *rta) { return RTA_DATA(rta); }


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

x86 assembly (clang, -O2):
<rta_getattr_str>:
jmp    1030 <RTA_DATA@plt>

LLVM IR (-O0):
%struct.rtattr = type { i32 }
define i8* @rta_getattr_str(%struct.rtattr* %0) {
%2 = alloca %struct.rtattr*
store %struct.rtattr* %0, %struct.rtattr** %2
%3 = load %struct.rtattr*, %struct.rtattr** %2
%4 = call i8* @RTA_DATA(%struct.rtattr* %3)
ret i8* %4
}

LLVM IR (-O2):
%struct.rtattr = type { i32 }
define i8* @rta_getattr_str(%struct.rtattr* %0) {
%2 = tail call i8* @RTA_DATA(%struct.rtattr* %0)
ret i8* %2
}
void __cyg_profile_func_exit(void *func, void *caller) {}


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

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

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

LLVM IR (-O2):
define void @__cyg_profile_func_exit(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
double td1(float a) { return a; }


x86 assembly (clang, -O0):
<td1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<td1>:
cvtss2sd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @td1(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
ret double %4
}

LLVM IR (-O2):
define double @td1(float %0) {
%2 = fpext float %0 to double
ret double %2
}
int try_userprofile_envvar_for_home(void) {
  {
    log_prefix("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/cosminadrianpopescu/vifm/"
               "refs/heads/master/src/cfg/config.c",
               __FUNCTION__, 264);
    log_msg("Entered into this function");
  };
  return 0;
}


x86 assembly (clang, -O0):
<try_userprofile_envvar_for_home>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xf64(%rip),%rsi
mov    $0x108,%edx
mov    $0x0,%al
call   1030 <log_prefix@plt>
lea    0xf71(%rip),%rdi
mov    $0x0,%al
call   1040 <log_msg@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<try_userprofile_envvar_for_home>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xf67(%rip),%rsi
mov    $0x108,%edx
xor    %eax,%eax
call   1030 <log_prefix@plt>
lea    0xf74(%rip),%rdi
xor    %eax,%eax
call   1040 <log_msg@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cosminadrianpopescu/vifm/refs/heads/master/src/cfg/config.c\00"
@__FUNCTION__.try_userprofile_envvar_for_home = [32 x i8] c"try_userprofile_envvar_for_home\00"
@.str.1 = [27 x i8] c"Entered into this function\00"
define i32 @try_userprofile_envvar_for_home() {
%1 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @log_prefix to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @__FUNCTION__.try_userprofile_envvar_for_home, i64 0, i64 0), i32 264)
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @log_msg to i32 (i8*, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cosminadrianpopescu/vifm/refs/heads/master/src/cfg/config.c\00"
@__FUNCTION__.try_userprofile_envvar_for_home = [32 x i8] c"try_userprofile_envvar_for_home\00"
@.str.1 = [27 x i8] c"Entered into this function\00"
define i32 @try_userprofile_envvar_for_home() {
%1 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @log_prefix to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @__FUNCTION__.try_userprofile_envvar_for_home, i64 0, i64 0), i32 264)
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @log_msg to i32 (i8*, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SN_close_env(struct SN_env *);
extern void german_UTF_8_close_env(struct SN_env *z) { SN_close_env(z); }


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

x86 assembly (clang, -O2):
<german_UTF_8_close_env>:
jmp    1030 <SN_close_env@plt>

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

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @german_UTF_8_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0)
ret void
}
void test_Struct5(void) {}


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

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

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

LLVM IR (-O2):
define void @test_Struct5() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xbd() {
  Assert_real((isalnum(189) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              950, ("isalnum should be 0 for 0xbd"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xbd>:
push   %rax
mov    $0xbd,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3b6,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xbd\00"
define void @t_isalnum_0xbd() {
%1 = tail call i64 @isalnum(i32 189)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 950, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Puzzle();
int main() {
  int i;
  for (i = 0; i < 100; i++)
    Puzzle();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1145 <main+0x35>
mov    $0x0,%al
call   1030 <Puzzle@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <Puzzle@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 100
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 (...) @Puzzle()
br label %8
8: ; preds = %6
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %3
11: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 (...) @Puzzle()
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 100
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char const *);
int scanf(char *, int *);
int prompt_value(const char *msg, int *result) {
  puts(msg);
  int retVal = scanf("%d", result);
  return (retVal == 1) ? 0 : 1;
}


x86 assembly (clang, -O0):
<prompt_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
mov    -0x10(%rbp),%rsi
lea    0xebc(%rip),%rdi
call   1040 <scanf@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x1,%edx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prompt_value>:
push   %rbx
mov    %rsi,%rbx
call   1030 <puts@plt>
lea    0xed0(%rip),%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @prompt_value(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i8*, i8** %3
%7 = call i32 @puts(i8* %6)
%8 = load i32*, i32** %4
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 1
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 0, i32 1
ret i32 %13
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @prompt_value(i8* nocapture %0, i32* %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) %0)
%4 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = icmp ne i32 %4, 1
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
void main() {
  int a, b, t;
  printf("enter the a and b value:\n");
  scanf("%d %d", &a, &b);
  t = a % b;
  ;
  printf("t=%d", t);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
cltd
idivl  (%rsp)
lea    0xea6(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [26 x i8] c"enter the a and b value:\0A\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [5 x i8] c"t=%d\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = srem i32 %6, %7
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [5 x i8] c"t=%d\00"
@str = [25 x i8] c"enter the a and b value:\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = srem i32 %7, %8
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atol(char *);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main() {
  printf("%ld\n", atol("123a"));
  printf("%ld\n", atol("a123"));
  printf("%ld\n", atol("a123a"));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee0(%rip),%rdi
call   1040 <atol@plt>
mov    %eax,%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
call   1040 <atol@plt>
mov    %eax,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
lea    0xeab(%rip),%rdi
call   1040 <atol@plt>
mov    %eax,%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee3(%rip),%rdi
call   1040 <atol@plt>
lea    0xecc(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
call   1040 <atol@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xeaf(%rip),%rdi
call   1040 <atol@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%ld\0A\00"
@.str.1 = [5 x i8] c"123a\00"
@.str.2 = [5 x i8] c"a123\00"
@.str.3 = [6 x i8] c"a123a\00"
define i32 @main() {
%1 = call i32 @atol(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @atol(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @atol(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
@.str.1 = [5 x i8] c"123a\00"
@.str.2 = [5 x i8] c"a123\00"
@.str.3 = [6 x i8] c"a123a\00"
define i32 @main() {
%1 = tail call i32 @atol(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @atol(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @atol(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}