xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ ceil(float);
int range_tri(float r, float w, int m) { return (int)ceil(r + w / 2); }


x86 assembly (clang, -O0):
<range_tri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xec9(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
call   1030 <ceil@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<range_tri>:
mulss  0xee8(%rip),%xmm1
addss  %xmm1,%xmm0
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define i32 @range_tri(float %0, float %1, i32 %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca i32
store float %0, float* %4
store float %1, float* %5
store i32 %2, i32* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fdiv float %8, 2.000000e+00
%10 = fadd float %7, %9
%11 = call i64 @ceil(float %10)
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @range_tri(float %0, float %1, i32 %2) {
%4 = fmul float %1, 5.000000e-01
%5 = fadd float %4, %0
%6 = tail call i64 @ceil(float %5)
%7 = trunc i64 %6 to i32
ret i32 %7
}
void cleanUpTwoPass() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @h110hello() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void AnsiTerm_color_reset(void) { printf("\x1B[0m"); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[0m\00"
define void @AnsiTerm_color_reset() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
void stringCopy(char *origem, char *destino) {
  char *cursor = origem;
  char *cn = destino;
  for (; *cursor != '\0'; ++cursor, ++cn) {
    *cn = *cursor;
  }
  *cn = '\0';
}


x86 assembly (clang, -O0):
<stringCopy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1155 <stringCopy+0x55>
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111c <stringCopy+0x1c>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringCopy>:
mov    (%rdi),%al
test   %al,%al
je     1121 <stringCopy+0x21>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
mov    %al,(%rsi)
add    $0x1,%rsi
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <stringCopy+0x10>
movb   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define void @stringCopy(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %1, %2 ]
%8 = phi i8* [ %9, %5 ], [ %0, %2 ]
store i8 %6, i8* %7
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %1, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ dummy();
f2(unsigned long int x, unsigned long int y) {
  if (x == 0)
    dummy();
  x -= y;
  if (x < ~(~(unsigned long int)0 >> 1))
    abort();
  return x;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1142 <f2+0x22>
mov    $0x0,%al
call   1030 <dummy@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
movabs $0x8000000000000000,%rax
cmp    %rax,-0x8(%rbp)
jae    116c <f2+0x4c>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1136 <f2+0x16>
xor    %eax,%eax
call   1030 <dummy@plt>
sub    %r14,%rbx
jns    1145 <f2+0x25>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define i32 @f2(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (...) @dummy()
br label %9
9: ; preds = %7, %2
%10 = load i64, i64* %4
%11 = load i64, i64* %3
%12 = sub i64 %11, %10
store i64 %12, i64* %3
%13 = load i64, i64* %3
%14 = icmp ult i64 %13, -9223372036854775808
br i1 %14, label %15, label %17
15: ; preds = %9
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %9
%18 = load i64, i64* %3
%19 = trunc i64 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @f2(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @dummy()
br label %6
6: ; preds = %4, %2
%7 = sub i64 %0, %1
%8 = icmp sgt i64 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 (...) @abort()
unreachable
11: ; preds = %6
%12 = trunc i64 %7 to i32
ret i32 %12
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
unsigned long long __bswap32(int);
uint64_t __bswap64(uint64_t __x) {
  return (__bswap32(__x) + (0ULL << 32)) | __bswap32(__x >> 32);
}


x86 assembly (clang, -O0):
<__bswap64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <__bswap32@plt>
add    $0x0,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x20,%ecx
sar    %cl,%edi
call   1030 <__bswap32@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
or     %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__bswap64>:
push   %rbx
call   1030 <__bswap32@plt>
mov    %rax,%rbx
call   1030 <__bswap32@plt>
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__bswap64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @__bswap32(i32 %3)
%5 = add i64 %4, 0
%6 = load i32, i32* %2
%7 = ashr i32 %6, 32
%8 = call i64 @__bswap32(i32 %7)
%9 = or i64 %5, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @__bswap64(i32 %0) {
%2 = tail call i64 @__bswap32(i32 %0)
%3 = tail call i64 @__bswap32(i32 poison)
%4 = or i64 %3, %2
%5 = trunc i64 %4 to i32
ret i32 %5
}
unsigned int csum_fold(unsigned int sum) {
  while (sum >> 16)
    sum = (sum & 0xffff) + (sum >> 16);
  return ~sum;
}


x86 assembly (clang, -O0):
<csum_fold>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
cmp    $0x0,%eax
je     112e <csum_fold+0x2e>
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <csum_fold+0x7>
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<csum_fold>:
mov    %edi,%eax
cmp    $0x10000,%edi
jb     1121 <csum_fold+0x21>
nopw   0x0(%rax,%rax,1)
mov    %eax,%ecx
shr    $0x10,%ecx
movzwl %ax,%eax
add    %ecx,%eax
cmp    $0xffff,%eax
ja     1110 <csum_fold+0x10>
not    %eax
ret

LLVM IR (-O0):
define i32 @csum_fold(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = lshr i32 %4, 16
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i32, i32* %2
%9 = and i32 %8, 65535
%10 = load i32, i32* %2
%11 = lshr i32 %10, 16
%12 = add i32 %9, %11
store i32 %12, i32* %2
br label %3
13: ; preds = %3
%14 = load i32, i32* %2
%15 = xor i32 %14, -1
ret i32 %15
}

LLVM IR (-O2):
define i32 @csum_fold(i32 %0) {
%2 = icmp ult i32 %0, 65536
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = lshr i32 %4, 16
%6 = and i32 %4, 65535
%7 = add nuw nsw i32 %6, %5
%8 = icmp ult i32 %7, 65536
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ %0, %1 ], [ %7, %3 ]
%11 = xor i32 %10, -1
ret i32 %11
}
void gtk_cell_renderer_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_cell_renderer_get_type() {
ret void
}
void nbdbg(char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @nbdbg(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get(int);
int /*<<< orphan*/ init(int);
int /*<<< orphan*/ lruCacheFree();
int /*<<< orphan*/ set(int, int);
int main(int argc, char **argv) {
  init(5);
  get(1);
  set(1, 1);
  get(2);
  lruCacheFree();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x5,%edi
call   1040 <init@plt>
mov    $0x1,%edi
call   1050 <get@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1060 <set@plt>
mov    $0x2,%edi
call   1050 <get@plt>
mov    $0x0,%al
call   1030 <lruCacheFree@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1040 <init@plt>
mov    $0x1,%edi
call   1050 <get@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1060 <set@plt>
mov    $0x2,%edi
call   1050 <get@plt>
xor    %eax,%eax
call   1030 <lruCacheFree@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @init(i32 5)
%7 = call i32 @get(i32 1)
%8 = call i32 @set(i32 1, i32 1)
%9 = call i32 @get(i32 2)
%10 = call i32 (...) @lruCacheFree()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @init(i32 5)
%4 = tail call i32 @get(i32 1)
%5 = tail call i32 @set(i32 1, i32 1)
%6 = tail call i32 @get(i32 2)
%7 = tail call i32 (...) @lruCacheFree()
ret i32 0
}
void emptyHandler(void) {}


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

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

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

LLVM IR (-O2):
define void @emptyHandler() {
ret void
}
int flip(int d) {
  int n;
  int converted = 0;
  for (n = 0; n < 8; n++) {
    if (d & (1 << (7 - n))) {
      converted |= (1 << n);
    }
  }
  return converted;
}


x86 assembly (clang, -O0):
<flip>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1161 <flip+0x61>
mov    -0x4(%rbp),%eax
mov    $0x7,%ecx
sub    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     114e <flip+0x4e>
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1153 <flip+0x53>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <flip+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flip>:
rol    $0x4,%dil
mov    %edi,%eax
and    $0x33,%al
shl    $0x2,%al
shr    $0x2,%dil
and    $0x33,%dil
or     %al,%dil
mov    %edi,%eax
and    $0x55,%al
add    %al,%al
shr    %dil
and    $0x55,%dil
or     %al,%dil
movzbl %dil,%eax
ret

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

LLVM IR (-O2):
define i32 @flip(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = call i8 @llvm.bitreverse.i8(i8 %2)
%4 = zext i8 %3 to i32
ret i32 %4
}
void __go_runtime_error(int i) {}


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

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

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

LLVM IR (-O2):
define void @__go_runtime_error(i32 %0) {
ret void
}
double _orbita_models_pseudo_isothermal_Mr(const void *par, const double R) {
  double Vc_sq = *((double *)par), Rc_sq = *((double *)par + 1);
  double R_sq = ((R) * (R));
  return Vc_sq * (R * R_sq / Rc_sq) / (1. + R_sq / Rc_sq);
}


x86 assembly (clang, -O0):
<_orbita_models_pseudo_isothermal_Mr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
divsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm2
divsd  -0x20(%rbp),%xmm2
movsd  0xe9f(%rip),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_orbita_models_pseudo_isothermal_Mr>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
movsd  0x8(%rdi),%xmm1
unpcklpd %xmm1,%xmm1
divpd  %xmm1,%xmm0
movsd  (%rdi),%xmm1
mulsd  %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  0xecf(%rip),%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @_orbita_models_pseudo_isothermal_Mr(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
store double %10, double* %5
%11 = load i8*, i8** %3
%12 = bitcast i8* %11 to double*
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
store double %14, double* %6
%15 = load double, double* %4
%16 = load double, double* %4
%17 = fmul double %15, %16
store double %17, double* %7
%18 = load double, double* %5
%19 = load double, double* %4
%20 = load double, double* %7
%21 = fmul double %19, %20
%22 = load double, double* %6
%23 = fdiv double %21, %22
%24 = fmul double %18, %23
%25 = load double, double* %7
%26 = load double, double* %6
%27 = fdiv double %25, %26
%28 = fadd double 1.000000e+00, %27
%29 = fdiv double %24, %28
ret double %29
}

LLVM IR (-O2):
define double @_orbita_models_pseudo_isothermal_Mr(i8* nocapture %0, double %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = getelementptr inbounds i8, i8* %0, i64 8
%6 = bitcast i8* %5 to double*
%7 = load double, double* %6
%8 = fmul double %1, %1
%9 = fmul double %8, %1
%10 = insertelement <2 x double> poison, double %9, i64 0
%11 = insertelement <2 x double> %10, double %8, i64 1
%12 = insertelement <2 x double> poison, double %7, i64 0
%13 = shufflevector <2 x double> %12, <2 x double> poison, <2 x i32> zeroinitializer
%14 = fdiv <2 x double> %11, %13
%15 = extractelement <2 x double> %14, i64 0
%16 = fmul double %4, %15
%17 = extractelement <2 x double> %14, i64 1
%18 = fadd double %17, 1.000000e+00
%19 = fdiv double %16, %18
ret double %19
}
char *bstrcat(char *dst, const char *src) {
  while (*dst) {
    dst++;
  }
  while (*src) {
    *dst++ = *src++;
  }
  *dst = 0;
  return dst;
}


x86 assembly (clang, -O0):
<bstrcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     112a <bstrcat+0x2a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <bstrcat+0xc>
jmp    112f <bstrcat+0x2f>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1163 <bstrcat+0x63>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    112f <bstrcat+0x2f>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bstrcat>:
mov    %rdi,%rax
add    $0x1,%rdi
cmpb   $0x0,(%rax)
jne    1100 <bstrcat>
mov    (%rsi),%cl
test   %cl,%cl
je     1136 <bstrcat+0x36>
mov    $0xffffffffffffffff,%rax
nopl   0x0(%rax)
mov    %cl,(%rdi,%rax,1)
movzbl 0x2(%rsi,%rax,1),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1120 <bstrcat+0x20>
add    %rax,%rdi
mov    %rdi,%rax
movb   $0x0,(%rax)
ret

LLVM IR (-O0):
define i8* @bstrcat(i8* %0, i8* %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** %3
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
br label %5
12: ; preds = %5
br label %13
13: ; preds = %17, %12
%14 = load i8*, i8** %4
%15 = load i8, i8* %14
%16 = icmp ne i8 %15, 0
br i1 %16, label %17, label %23
17: ; preds = %13
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %4
%20 = load i8, i8* %18
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
store i8 %20, i8* %21
br label %13
23: ; preds = %13
%24 = load i8*, i8** %3
store i8 0, i8* %24
%25 = load i8*, i8** %3
ret i8* %25
}

LLVM IR (-O2):
define i8* @bstrcat(i8* %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = load i8, i8* %1
%10 = icmp eq i8 %9, 0
br i1 %10, label %19, label %11
11: ; preds = %8, %11
%12 = phi i8 [ %17, %11 ], [ %9, %8 ]
%13 = phi i8* [ %15, %11 ], [ %1, %8 ]
%14 = phi i8* [ %16, %11 ], [ %4, %8 ]
%15 = getelementptr inbounds i8, i8* %13, i64 1
%16 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %12, i8* %14
%17 = load i8, i8* %15
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %11
19: ; preds = %11, %8
%20 = phi i8* [ %4, %8 ], [ %16, %11 ]
store i8 0, i8* %20
ret i8* %20
}
/* Type definitions */
typedef int /*<<< orphan*/ t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int t[6];
  printf("%d", sizeof(t) / sizeof(int));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 6)
ret i32 0
}
/* Variables and functions */
int tb_init_impl(char const *);
bool tb_init(const char *_path) { return tb_init_impl(_path); }


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

x86 assembly (clang, -O2):
<tb_init>:
jmp    1030 <tb_init_impl@plt>

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

LLVM IR (-O2):
define i32 @tb_init(i8* %0) {
%2 = tail call i32 @tb_init_impl(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
void tacheB(void) {
  int i = 0;
  long j;
  puts("------> DEBUT tache B");
  while (1) {
    for (j = 0; j < 30000L; j++)
      ;
    printf("======> Dans tache B %d\n", i);
    i++;
  }
}


x86 assembly (clang, -O0):
<tacheB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
movq   $0x0,-0x10(%rbp)
cmpq   $0x7530,-0x10(%rbp)
jge    1167 <tacheB+0x47>
jmp    1156 <tacheB+0x36>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1143 <tacheB+0x23>
mov    -0x4(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113b <tacheB+0x1b>

x86 assembly (clang, -O2):
<tacheB>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
lea    0xedd(%rip),%r14
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
add    $0x1,%ebx
jmp    1140 <tacheB+0x20>

LLVM IR (-O0):
@.str = [22 x i8] c"------> DEBUT tache B\00"
@.str.1 = [25 x i8] c"======> Dans tache B %d\0A\00"
define void @tacheB() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i32 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %0, %12
store i64 0, i64* %2
br label %5
5: ; preds = %9, %4
%6 = load i64, i64* %2
%7 = icmp slt i64 %6, 30000
br i1 %7, label %8, label %12
8: ; preds = %5
br label %9
9: ; preds = %8
%10 = load i64, i64* %2
%11 = add nsw i64 %10, 1
store i64 %11, i64* %2
br label %5
12: ; preds = %5
%13 = load i32, i32* %1
%14 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %1
%16 = add nsw i32 %15, 1
store i32 %16, i32* %1
br label %4
}

LLVM IR (-O2):
@.str = [22 x i8] c"------> DEBUT tache B\00"
@.str.1 = [25 x i8] c"======> Dans tache B %d\0A\00"
define void @tacheB() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = add nuw nsw i32 %3, 1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void help(char *program) {
  printf("Server %s -p <port>\n", program);
  return;
}


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

x86 assembly (clang, -O2):
<help>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Server %s -p <port>\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Server %s -p <port>\0A\00"
define void @help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
long nthprime(int);
int /*<<< orphan*/ printf(char *, long);
int main() {
  long int prime;
  prime = nthprime(10001);
  printf("The solution is: %li\n", prime);
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"The solution is: %li\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = call i64 @nthprime(i32 10001)
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"The solution is: %li\0A\00"
define i32 @main() {
%1 = tail call i64 @nthprime(i32 10001)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i32 0
}
/* Type definitions */
typedef char wchar_t;

/* Variables and functions */
int /*<<< orphan*/ wcsncpy(char *, char const *, size_t);
void wszcopy(wchar_t *dst, const wchar_t *src, size_t dst_size) {
  wcsncpy(dst, src, dst_size - 1);
  dst[dst_size - 1] = '\0';
}


x86 assembly (clang, -O0):
<wszcopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
sub    $0x1,%rdx
call   1030 <wcsncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wszcopy>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rdx
call   1030 <wcsncpy@plt>
movb   $0x0,-0x1(%rbx,%r14,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @wszcopy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = sub i64 %9, 1
%11 = call i32 @wcsncpy(i8* %7, i8* %8, i64 %10)
%12 = load i8*, i8** %4
%13 = load i64, i64* %6
%14 = sub i64 %13, 1
%15 = getelementptr inbounds i8, i8* %12, i64 %14
store i8 0, i8* %15
ret void
}

LLVM IR (-O2):
define void @wszcopy(i8* %0, i8* %1, i64 %2) {
%4 = add i64 %2, -1
%5 = tail call i32 @wcsncpy(i8* %0, i8* %1, i64 %4)
%6 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 0, i8* %6
ret void
}
int main() {
  char t[] = "asdf";
  char s[] = "asdf";
  s[0] = 'A';
  return s[0] == t[0];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0xeef(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xeea(%rip),%al
mov    %al,-0x5(%rbp)
mov    0xedd(%rip),%eax
mov    %eax,-0xe(%rbp)
mov    0xed8(%rip),%al
mov    %al,-0xa(%rbp)
movb   $0x41,-0xe(%rbp)
movsbl -0xe(%rbp),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.t = [5 x i8] c"asdf\00"
@__const.main.s = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca [5 x i8]
store i32 0, i32* %1
%4 = bitcast [5 x i8]* %2 to i8*
%5 = bitcast [5 x i8]* %3 to i8*
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
store i8 65, i8* %6
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dispGivenAsciiChars(char, char);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
main(void) {
  char sChar, eChar;
  printf("Enter starting character\n");
  scanf("%d", &sChar);
  printf("Enter ending character\n");
  scanf("%d", &eChar);
  dispGivenAsciiChars(sChar, eChar);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
lea    -0x2(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x1(%rbp),%al
movsbl %al,%edi
movsbl -0x2(%rbp),%esi
call   1040 <dispGivenAsciiChars@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rbx
lea    0xf(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
lea    0xe(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movsbl 0xf(%rsp),%edi
movsbl 0xe(%rsp),%esi
call   1040 <dispGivenAsciiChars@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Enter starting character\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [24 x i8] c"Enter ending character\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%7 = load i8, i8* %1
%8 = load i8, i8* %2
%9 = call i32 @dispGivenAsciiChars(i8 signext %7, i8 signext %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [25 x i8] c"Enter starting character\00"
@str.3 = [23 x i8] c"Enter ending character\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 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), i8* %1)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.3, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%7 = load i8, i8* %1
%8 = load i8, i8* %2
%9 = call i32 @dispGivenAsciiChars(i8 signext %7, i8 signext %8)
ret i32 0
}
int test_imm_F8int64_lowword_mem(long long *val) {
  return ((*val) & (0xF8 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_F8int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 248
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void PAGE_ModelEvent() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ rread(unsigned char *, int);
long recnum() {
  unsigned char buf[4];
  rread(buf, sizeof(buf));
  return buf[0] | ((unsigned)buf[1] << 8) | ((unsigned long)buf[2] << 16) |
         ((unsigned long)buf[3] << 24);
}


x86 assembly (clang, -O0):
<recnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
mov    $0x4,%esi
call   1030 <rread@plt>
movzbl -0x4(%rbp),%eax
movzbl -0x3(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,%eax
movzbl -0x2(%rbp),%ecx
shl    $0x10,%rcx
or     %rcx,%rax
movzbl -0x1(%rbp),%ecx
shl    $0x18,%rcx
or     %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recnum>:
push   %rax
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <rread@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @recnum() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i32 @rread(i8* %2, i32 4)
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 1
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 8
%11 = or i32 %6, %10
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 2
%14 = load i8, i8* %13
%15 = zext i8 %14 to i64
%16 = shl i64 %15, 16
%17 = or i64 %12, %16
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 3
%19 = load i8, i8* %18
%20 = zext i8 %19 to i64
%21 = shl i64 %20, 24
%22 = or i64 %17, %21
ret i64 %22
}

LLVM IR (-O2):
define i64 @recnum() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i32 @rread(i8* %2, i32 4)
%4 = load i8, i8* %2
%5 = zext i8 %4 to i64
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 1
%7 = load i8, i8* %6
%8 = zext i8 %7 to i64
%9 = shl nuw nsw i64 %8, 8
%10 = or i64 %9, %5
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 2
%12 = load i8, i8* %11
%13 = zext i8 %12 to i64
%14 = shl nuw nsw i64 %13, 16
%15 = or i64 %10, %14
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 3
%17 = load i8, i8* %16
%18 = zext i8 %17 to i64
%19 = shl nuw nsw i64 %18, 24
%20 = or i64 %15, %19
ret i64 %20
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
m_xor() { ol("XOR  AX,BX"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"XOR AX,BX\00"
define i32 @m_xor() {
%1 = alloca i32
%2 = call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [11 x i8] c"XOR AX,BX\00"
define i32 @m_xor() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
double a_x(double r, double x) { return x * (1. - r) / r; }


x86 assembly (clang, -O0):
<a_x>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xee5(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_x>:
movsd  0xef8(%rip),%xmm2
subsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm2
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @a_x(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = fsub double 1.000000e+00, %6
%8 = fmul double %5, %7
%9 = load double, double* %3
%10 = fdiv double %8, %9
ret double %10
}

LLVM IR (-O2):
define double @a_x(double %0, double %1) {
%3 = fsub double 1.000000e+00, %0
%4 = fmul double %3, %1
%5 = fdiv double %4, %0
ret double %5
}
/* Variables and functions */
scalar_t__ cst_safe_alloc(int);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
char *cst_strdup(const char *str) {
  char *nstr = NULL;
  if (str) {
    nstr = ((char *)cst_safe_alloc(sizeof(char) * (strlen(str) + 1)));
    strcpy(nstr, str);
  }
  return nstr;
}


x86 assembly (clang, -O0):
<cst_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1179 <cst_strdup+0x49>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <cst_safe_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cst_strdup>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1159 <cst_strdup+0x29>
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <cst_safe_alloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
jmp    115c <cst_strdup+0x2c>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @cst_strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = tail call i64 @cst_safe_alloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @strcpy(i8* %7, i8* %0)
br label %9
9: ; preds = %3, %1
%10 = phi i8* [ %7, %3 ], [ null, %1 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ decsasd(int /*<<< orphan*/);
int /*<<< orphan*/ decssdt(int);
int /*<<< orphan*/ restore_ttymodes();
void restore_status(void) {
  decsasd(0);
  decssdt(1);
  restore_ttymodes();
}


x86 assembly (clang, -O0):
<restore_status>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <decsasd@plt>
mov    $0x1,%edi
call   1050 <decssdt@plt>
mov    $0x0,%al
call   1040 <restore_ttymodes@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<restore_status>:
push   %rax
xor    %edi,%edi
call   1030 <decsasd@plt>
mov    $0x1,%edi
call   1050 <decssdt@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <restore_ttymodes@plt>

LLVM IR (-O0):
define void @restore_status() {
%1 = call i32 @decsasd(i32 0)
%2 = call i32 @decssdt(i32 1)
%3 = call i32 (...) @restore_ttymodes()
ret void
}

LLVM IR (-O2):
define void @restore_status() {
%1 = tail call i32 @decsasd(i32 0)
%2 = tail call i32 @decssdt(i32 1)
%3 = tail call i32 (...) @restore_ttymodes()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memblockq_set_maxrewind() {
  printf("NOT IMPLEMENTED:"
         "pa_memblockq_set_maxrewind"
         "\n");
}


x86 assembly (clang, -O0):
<pa_memblockq_set_maxrewind>:
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_memblockq_set_maxrewind>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [43 x i8] c"NOT IMPLEMENTED:pa_memblockq_set_maxrewind\00"
define i32 @pa_memblockq_set_maxrewind() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int8_t;
typedef scalar_t__ u_int16_t;

/* Variables and functions */
int /*<<< orphan*/ inb(scalar_t__);
int /*<<< orphan*/ outb(int /*<<< orphan*/, scalar_t__);
u_int8_t readb_idx_reg(u_int16_t port, u_int8_t index) {
  outb(index, port - 1);
  return inb(port);
}


x86 assembly (clang, -O0):
<readb_idx_reg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
sub    $0x1,%rsi
call   1030 <outb@plt>
mov    -0x8(%rbp),%rdi
call   1040 <inb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readb_idx_reg>:
push   %rbx
mov    %esi,%eax
mov    %rdi,%rbx
lea    -0x1(%rdi),%rsi
mov    %eax,%edi
call   1030 <outb@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <inb@plt>

LLVM IR (-O0):
define i32 @readb_idx_reg(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i64, i64* %3
%7 = sub nsw i64 %6, 1
%8 = call i32 @outb(i32 %5, i64 %7)
%9 = load i64, i64* %3
%10 = call i32 @inb(i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @readb_idx_reg(i64 %0, i32 %1) {
%3 = add nsw i64 %0, -1
%4 = tail call i32 @outb(i32 %1, i64 %3)
%5 = tail call i32 @inb(i64 %0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ inverse(long, long);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, long *, long *);
int main() {
  long m, n;
  scanf("%ld %ld", &m, &n);
  printf("%ld\n", inverse(m, n));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1050 <scanf@plt>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1040 <inverse@plt>
lea    0xea8(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%ld %ld\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
%4 = bitcast i64* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2)
%6 = load i64, i64* %1
%7 = load i64, i64* %2
%8 = call i32 @inverse(i64 %6, i64 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
int next_pow_2(int n) {
  if (n & (n - 1) == 0) {
    return n;
  }
  int p = 1;
  while (p < n) {
    p = p << 1;
  }
  return p;
}


x86 assembly (clang, -O0):
<next_pow_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    $0x0,%ecx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1132 <next_pow_2+0x32>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1159 <next_pow_2+0x59>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1153 <next_pow_2+0x53>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1139 <next_pow_2+0x39>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_pow_2>:
cmp    $0x1,%edi
sete   %al
test   %dil,%al
je     110e <next_pow_2+0xe>
mov    %edi,%eax
ret
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %edi,%eax
jl     1120 <next_pow_2+0x20>
ret

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

LLVM IR (-O2):
define i32 @next_pow_2(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = zext i1 %2 to i32
%4 = and i32 %3, %0
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1, %6
%7 = phi i32 [ %9, %6 ], [ 1, %1 ]
%8 = icmp slt i32 %7, %0
%9 = shl i32 %7, 1
br i1 %8, label %6, label %10
10: ; preds = %6, %1
%11 = phi i32 [ %0, %1 ], [ %7, %6 ]
ret i32 %11
}
void cmos_post_init(void) {}


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

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

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

LLVM IR (-O2):
define void @cmos_post_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void flushout() {
  fflush(stdout);
  return;
}


x86 assembly (clang, -O0):
<flushout>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flushout>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @flushout() {
%1 = load i32, i32* @stdout
%2 = call i32 @fflush(i32 %1)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @flushout() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fflush(i32 %1)
ret void
}