xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main(void) {
  int i = 0;
  float mas[5] = {1, 2, 3, 4, 5};
  for (i = 0; i < 5; i++)
    printf("%f\n", mas[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xece(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    117a <main+0x6a>
movslq -0x8(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114c <main+0x3c>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xefc(%rip),%rbx
movss  0xee0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xed4(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xec8(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xebc(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xeb0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.mas = [5 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00]
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [5 x float]
store i32 0, i32* %1
store i32 0, i32* %2
%4 = bitcast [5 x float]* %3 to i8*
store i32 0, i32* %2
br label %5
5: ; preds = %14, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [5 x float], [5 x float]* %3, i64 0, i64 %10
%12 = load float, float* %11
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %12)
br label %14
14: ; preds = %8
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %5
17: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 1.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 2.000000e+00)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 3.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 4.000000e+00)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 5.000000e+00)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ extern_func1_6(int, char *, unsigned long);
void extern_func1_5(int a, char *b, unsigned long c) {
  extern_func1_6(a, b, c);
}


x86 assembly (clang, -O0):
<extern_func1_5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <extern_func1_6@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extern_func1_5>:
jmp    1030 <extern_func1_6@plt>

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

LLVM IR (-O2):
define void @extern_func1_5(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @extern_func1_6(i32 %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
void const *GppcFinfoV1();
const void *pg_finfo_spifunc1(void) { return GppcFinfoV1(); }


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

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

LLVM IR (-O0):
define i8* @pg_finfo_spifunc1() {
%1 = call i8* (...) @GppcFinfoV1()
ret i8* %1
}

LLVM IR (-O2):
define i8* @pg_finfo_spifunc1() {
%1 = tail call i8* (...) @GppcFinfoV1()
ret i8* %1
}
void rt2x00rfkill_suspend(struct rt2x00_dev *rt2x00dev) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
%struct.rt2x00_dev = type opaque
define void @rt2x00rfkill_suspend(%struct.rt2x00_dev* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_SETMASK;
scalar_t__ sigdelset(int /*<<< orphan*/ *, int);
int sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int sigrelse(int sig) {
  sigset_t set;
  sigprocmask(SIG_SETMASK, NULL, &set);
  if (sigdelset(&set, sig) < 0)
    return -1;
  return sigprocmask(SIG_SETMASK, &set, NULL);
}


x86 assembly (clang, -O0):
<sigrelse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
lea    -0xc(%rbp),%rdx
call   1030 <sigprocmask@plt>
mov    -0x8(%rbp),%esi
lea    -0xc(%rbp),%rdi
call   1040 <sigdelset@plt>
cmp    $0x0,%rax
jge    1163 <sigrelse+0x43>
movl   $0xffffffff,-0x4(%rbp)
jmp    117c <sigrelse+0x5c>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    -0xc(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigrelse>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    0x2eb6(%rip),%r15
mov    (%r15),%edi
lea    0xc(%rsp),%r14
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <sigprocmask@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <sigdelset@plt>
test   %rax,%rax
js     1164 <sigrelse+0x44>
mov    (%r15),%edi
lea    0xc(%rsp),%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
jmp    1169 <sigrelse+0x49>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SIG_SETMASK = global i32 0
define i32 @sigrelse(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* @SIG_SETMASK
%6 = call i32 @sigprocmask(i32 %5, i32* null, i32* %4)
%7 = load i32, i32* %3
%8 = call i64 @sigdelset(i32* %4, i32 %7)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %14
11: ; preds = %1
%12 = load i32, i32* @SIG_SETMASK
%13 = call i32 @sigprocmask(i32 %12, i32* %4, i32* null)
store i32 %13, i32* %2
br label %14
14: ; preds = %11, %10
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@SIG_SETMASK = global i32 0
define i32 @sigrelse(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @SIG_SETMASK
%5 = call i32 @sigprocmask(i32 %4, i32* null, i32* %2)
%6 = call i64 @sigdelset(i32* %2, i32 %0)
%7 = icmp slt i64 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load i32, i32* @SIG_SETMASK
%10 = call i32 @sigprocmask(i32 %9, i32* %2, i32* null)
br label %11
11: ; preds = %1, %8
%12 = phi i32 [ %10, %8 ], [ -1, %1 ]
ret i32 %12
}
int bch_ecc_bits_to_bytes(int ecc_bits) { return (ecc_bits * 14 + 7) / 8; }


x86 assembly (clang, -O0):
<bch_ecc_bits_to_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0xe,-0x4(%rbp),%eax
add    $0x7,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<bch_ecc_bits_to_bytes>:
mov    %edi,%eax
shl    $0x4,%eax
sub    %edi,%eax
sub    %edi,%eax
lea    0x7(%rax),%ecx
add    $0xe,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @bch_ecc_bits_to_bytes(i32 %0) {
%2 = mul nsw i32 %0, 14
%3 = add nsw i32 %2, 7
%4 = sdiv i32 %3, 8
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ verifnom(char *);
int main() {
  char chaine[100];
  printf("veuillez inserez votre nom en majuscule:\n");
  gets(chaine);
  verifnom(chaine);
  return 0;
  system("pause");
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xec4(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1030 <verifnom@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"veuillez inserez votre nom en majuscule:\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%7 = call i32 @verifnom(i8* %6)
ret i32 0
}

LLVM IR (-O2):
@str = [41 x i8] c"veuillez inserez votre nom en majuscule:\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call i32 @verifnom(i8* %2)
ret i32 0
}
void func2() {
  int i1;
  int i2;
  i1 = i2;
}


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

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

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

LLVM IR (-O2):
define void @func2() {
ret void
}
int deflateInit2_(struct z_stream_s *strm, int level, int method,
                  int windowBits, int memLevel, int strategy,
                  const char *version, int stream_size) {
  return -2;
}


x86 assembly (clang, -O0):
<deflateInit2_>:
push   %rbp
mov    %rsp,%rbp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    $0xfffffffe,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.z_stream_s = type opaque
define i32 @deflateInit2_(%struct.z_stream_s* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i8* %6, i32 %7) {
%9 = alloca %struct.z_stream_s*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i32
store %struct.z_stream_s* %0, %struct.z_stream_s** %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i8* %6, i8** %15
store i32 %7, i32* %16
ret i32 -2
}

LLVM IR (-O2):
%struct.z_stream_s = type opaque
define i32 @deflateInit2_(%struct.z_stream_s* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i8* nocapture readnone %6, i32 %7) {
ret i32 -2
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_sll_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test59(__m64 a, __m64 b) { return _mm_sll_pi16(a, b); }


x86 assembly (clang, -O0):
<test59>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_sll_pi16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test59>:
jmp    1030 <_mm_sll_pi16@plt>

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

LLVM IR (-O2):
define i32 @test59(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_sll_pi16(i32 %0, i32 %1)
ret i32 %3
}
double asin(double x) { return x; }


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

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

LLVM IR (-O0):
define double @asin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
ret double %3
}

LLVM IR (-O2):
define double @asin(double returned %0) {
ret double %0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
scalar_t__ readint16(int const *);
uint32_t readint32(const uint8_t *c) {
  uint32_t total = c[3];
  total *= 0x100;
  total += c[2];
  total *= 0x10000;
  total += readint16(c);
  return total;
}


x86 assembly (clang, -O0):
<readint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x10,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <readint16@plt>
mov    %rax,%rcx
movslq -0xc(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readint32>:
push   %rbx
mov    0xc(%rdi),%ebx
shl    $0x8,%ebx
add    0x8(%rdi),%ebx
shl    $0x10,%ebx
call   1030 <readint16@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @readint32(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 3
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = mul nsw i32 %7, 256
store i32 %8, i32* %3
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 2
%11 = load i32, i32* %10
%12 = load i32, i32* %3
%13 = add nsw i32 %12, %11
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = mul nsw i32 %14, 65536
store i32 %15, i32* %3
%16 = load i32*, i32** %2
%17 = call i64 @readint16(i32* %16)
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = add nsw i64 %19, %17
%21 = trunc i64 %20 to i32
store i32 %21, i32* %3
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @readint32(i32* %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
%4 = shl nsw i32 %3, 8
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load i32, i32* %5
%7 = add nsw i32 %4, %6
%8 = shl nsw i32 %7, 16
%9 = tail call i64 @readint16(i32* %0)
%10 = trunc i64 %9 to i32
%11 = add i32 %8, %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int sum = 0;
  int i;
#pragma offload target(mic)
#pragma omp parallel for reduction(+ : sum)
  for (i = 1; i <= 1000; i++) {
    sum += i;
  }
  printf("Sum is %d\n", sum);
  assert(sum == (1000 * (1000 + 1)) / 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x3e8,-0xc(%rbp)
jg     1161 <main+0x41>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <main+0x1d>
mov    -0x8(%rbp),%esi
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x7a314,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"Sum is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 1000
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = add nsw i32 %9, %8
store i32 %10, i32* %2
br label %11
11: ; preds = %7
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
%15 = load i32, i32* %2
%16 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 500500
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"Sum is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 500500)
%2 = tail call i32 @assert(i32 1)
ret i32 0
}
void long_val_compare_and_swap(long *p, long i, long j, long *q) {
  *q = __sync_val_compare_and_swap(p, i, j);
}


x86 assembly (clang, -O0):
<long_val_compare_and_swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rdx
lock cmpxchg %rdx,(%rcx)
mov    %rax,%rcx
sete   %al
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<long_val_compare_and_swap>:
mov    %rsi,%rax
lock cmpxchg %rdx,(%rdi)
mov    %rax,(%rcx)
ret

LLVM IR (-O0):
define void @long_val_compare_and_swap(i64* %0, i64 %1, i64 %2, i64* %3) {
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64*
store i64* %0, i64** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64* %3, i64** %8
%9 = load i64*, i64** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = cmpxchg i64* %9, i64 %10, i64 %11 seq_cst seq_cst
%13 = extractvalue { i64, i1 } %12, 0
%14 = load i64*, i64** %8
store i64 %13, i64* %14
ret void
}

LLVM IR (-O2):
define void @long_val_compare_and_swap(i64* nocapture %0, i64 %1, i64 %2, i64* nocapture writeonly %3) {
%5 = cmpxchg i64* %0, i64 %1, i64 %2 seq_cst seq_cst
%6 = extractvalue { i64, i1 } %5, 0
store i64 %6, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void handleData4(char *data, int len) {
  printf("# vulnserver_cov: Handledata4: %i\n", len);
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"# vulnserver_cov: Handledata4: %i\0A\00"
define void @handleData4(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"# vulnserver_cov: Handledata4: %i\0A\00"
define void @handleData4(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
char *m_xmalloc(scalar_t__);
char *strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *m_strdup(const char *text) {
  char *p = m_xmalloc(strlen(text) + 1);
  return strcpy(p, text);
}


x86 assembly (clang, -O0):
<m_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <m_xmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_strdup>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <m_xmalloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @m_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @m_xmalloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i8* @strcpy(i8* %8, i8* %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @m_strdup(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @m_xmalloc(i64 %3)
%5 = tail call i8* @strcpy(i8* dereferenceable(1) %4, i8* dereferenceable(1) %0)
ret i8* %4
}
unsigned int f2u0(double x) {
  union {
    double f;
    unsigned int u[2];
  } cvt;
  cvt.f = x;
  return cvt.u[0];
}


x86 assembly (clang, -O0):
<f2u0>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2u0>:
movq   %xmm0,%rax
ret

LLVM IR (-O0):
%union.anon = type { double }
define i32 @f2u0(double %0) {
%2 = alloca double
%3 = alloca %union.anon
store double %0, double* %2
%4 = load double, double* %2
%5 = bitcast %union.anon* %3 to double*
store double %4, double* %5
%6 = bitcast %union.anon* %3 to [2 x i32]*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @f2u0(double %0) {
%2 = bitcast double %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fputs("Usage: timeout [-F] [-q] -- dur command [cmd args ..]\n", stderr);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<emit_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<emit_help>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"Usage: timeout [-F] [-q] -- dur command [cmd args ..]\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [55 x i8] c"Usage: timeout [-F] [-q] -- dur command [cmd args ..]\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/ *);
void voxel_space_write_byte(FILE *f, uint8_t val) { fwrite(&val, 1, 1, f); }


x86 assembly (clang, -O0):
<voxel_space_write_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<voxel_space_write_byte>:
mov    %rdi,%rax
movsbl %sil,%edi
mov    %rax,%rsi
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define void @voxel_space_write_byte(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 = call i32 @fwrite(i32* %4, i32 1, i32 1, i32* %5)
ret void
}

LLVM IR (-O2):
define void @voxel_space_write_byte(i32* nocapture %0, i32 %1) {
%3 = shl i32 %1, 24
%4 = ashr exact i32 %3, 24
%5 = tail call i32 @fputc(i32 %4, i32* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ int8_t;

/* Variables and functions */
int8_t signum_i8(int8_t i) {
  if (i > 0)
    return 1;
  if (i < 0)
    return (-1);
  return 0;
}


x86 assembly (clang, -O0):
<signum_i8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    1120 <signum_i8+0x20>
movq   $0x1,-0x8(%rbp)
jmp    1140 <signum_i8+0x40>
cmpq   $0x0,-0x10(%rbp)
jge    1138 <signum_i8+0x38>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1140 <signum_i8+0x40>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signum_i8>:
mov    %rdi,%rcx
sar    $0x3f,%rcx
test   %rdi,%rdi
mov    $0x1,%eax
cmovle %rcx,%rax
ret

LLVM IR (-O0):
define i64 @signum_i8(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 1, i64* %2
br label %12
7: ; preds = %1
%8 = load i64, i64* %3
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7
store i64 -1, i64* %2
br label %12
11: ; preds = %7
store i64 0, i64* %2
br label %12
12: ; preds = %11, %10, %6
%13 = load i64, i64* %2
ret i64 %13
}

LLVM IR (-O2):
define i64 @signum_i8(i64 %0) {
%2 = ashr i64 %0, 63
%3 = icmp slt i64 %0, 1
%4 = select i1 %3, i64 %2, i64 1
ret i64 %4
}
bar() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @bar() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void sleep_seconds(int seconds) { sleep(seconds); }


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

x86 assembly (clang, -O2):
<sleep_seconds>:
jmp    1030 <sleep@plt>

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

LLVM IR (-O2):
define void @sleep_seconds(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
ret void
}
/* Type definitions */
typedef unsigned char uint;

/* Variables and functions */
int unpack_long_tag_and_class(unsigned char **, unsigned char **, unsigned char,
                              unsigned char);
int unpack_tagcls(unsigned char **p, unsigned char **e, unsigned char tagcls) {
  uint newtag = (tagcls & 0x1f);
  uint newcls = (tagcls & 0xe0);
  return unpack_long_tag_and_class(p, e, newtag, newcls);
}


x86 assembly (clang, -O0):
<unpack_tagcls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
and    $0x1f,%eax
mov    %al,-0x12(%rbp)
movzbl -0x11(%rbp),%eax
and    $0xe0,%eax
mov    %al,-0x13(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x12(%rbp),%al
movzbl %al,%edx
movzbl -0x13(%rbp),%ecx
call   1030 <unpack_long_tag_and_class@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_tagcls>:
mov    %edx,%ecx
and    $0x1f,%edx
and    $0xffffffe0,%ecx
jmp    1030 <unpack_long_tag_and_class@plt>

LLVM IR (-O0):
define i32 @unpack_tagcls(i8** %0, i8** %1, i8 zeroext %2) {
%4 = alloca i8**
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8** %0, i8*** %4
store i8** %1, i8*** %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = and i32 %10, 31
%12 = trunc i32 %11 to i8
store i8 %12, i8* %7
%13 = load i8, i8* %6
%14 = zext i8 %13 to i32
%15 = and i32 %14, 224
%16 = trunc i32 %15 to i8
store i8 %16, i8* %8
%17 = load i8**, i8*** %4
%18 = load i8**, i8*** %5
%19 = load i8, i8* %7
%20 = load i8, i8* %8
%21 = call i32 @unpack_long_tag_and_class(i8** %17, i8** %18, i8 zeroext %19, i8 zeroext %20)
ret i32 %21
}

LLVM IR (-O2):
define i32 @unpack_tagcls(i8** %0, i8** %1, i8 zeroext %2) {
%4 = and i8 %2, 31
%5 = and i8 %2, -32
%6 = tail call i32 @unpack_long_tag_and_class(i8** %0, i8** %1, i8 zeroext %4, i8 zeroext %5)
ret i32 %6
}
/* Variables and functions */
scalar_t__ git__malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
char *git__substrdup(const char *start, size_t n) {
  char *ptr = (char *)git__malloc(n + 1);
  memcpy(ptr, start, n);
  ptr[n] = '\0';
  return ptr;
}


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

x86 assembly (clang, -O2):
<git__substrdup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
lea    0x1(%rsi),%rdi
call   1030 <git__malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @git__substrdup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = add i64 %6, 1
%8 = call i64 @git__malloc(i64 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = load i8*, i8** %3
%12 = load i64, i64* %4
%13 = call i32 @memcpy(i8* %10, i8* %11, i64 %12)
%14 = load i8*, i8** %5
%15 = load i64, i64* %4
%16 = getelementptr inbounds i8, i8* %14, i64 %15
store i8 0, i8* %16
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define i8* @git__substrdup(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i64 @git__malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %1)
%7 = getelementptr inbounds i8, i8* %5, i64 %1
store i8 0, i8* %7
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int mountFileSystem(const char *path, const char *reference, const char *type) {
  errno = ENOSYS;
  return 0;
}


x86 assembly (clang, -O0):
<mountFileSystem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ed1(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb8(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mountFileSystem>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @mountFileSystem(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 i32, i32* @ENOSYS
store i32 %7, i32* @errno
ret i32 0
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @mountFileSystem(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32 0
}
/* Variables and functions */
int t1() { return 77; }


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

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

LLVM IR (-O0):
define i32 @t1() {
ret i32 77
}

LLVM IR (-O2):
define i32 @t1() {
ret i32 77
}
char *langRomTypeExtRam512() { return "512kB External RAM"; }


x86 assembly (clang, -O0):
<langRomTypeExtRam512>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<langRomTypeExtRam512>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [19 x i8] c"512kB External RAM\00"
define i8* @langRomTypeExtRam512() {
ret i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [19 x i8] c"512kB External RAM\00"
define i8* @langRomTypeExtRam512() {
ret i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ md5_do_hmac(void *, unsigned char *, int, unsigned long,
                               unsigned char *);
int /*<<< orphan*/ memcmp(unsigned char *, unsigned char *, int);
int md5_verify(void *handle, unsigned char *blk, int len, unsigned long seq) {
  unsigned char correct[16];
  md5_do_hmac(handle, blk, len, seq, correct);
  return !memcmp(correct, blk + len, 16);
}


x86 assembly (clang, -O0):
<md5_verify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
lea    -0x30(%rbp),%r8
call   1030 <md5_do_hmac@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
add    %rax,%rsi
mov    $0x10,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md5_verify>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rsp,%r15
mov    %r15,%r8
call   1030 <md5_do_hmac@plt>
movslq %ebx,%rsi
add    %r14,%rsi
mov    %r15,%rdi
mov    $0x10,%edx
call   1040 <memcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @md5_verify(i8* %0, i8* %1, i32 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i64
%9 = alloca [16 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i64 %3, i64* %8
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i64, i64* %8
%14 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%15 = call i32 @md5_do_hmac(i8* %10, i8* %11, i32 %12, i64 %13, i8* %14)
%16 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%17 = load i8*, i8** %6
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = call i32 @memcmp(i8* %16, i8* %20, i32 16)
%22 = icmp ne i32 %21, 0
%23 = xor i1 %22, true
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @md5_verify(i8* %0, i8* %1, i32 %2, i64 %3) {
%5 = alloca [16 x i8]
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%7 = call i32 @md5_do_hmac(i8* %0, i8* %1, i32 %2, i64 %3, i8* %6)
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i8, i8* %1, i64 %8
%10 = call i32 @memcmp(i8* %6, i8* %9, i32 16)
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}
int always_return_0(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @always_return_0() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EBADF;
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __libc_tcdrain(int fd) {
  if (fd < 0) {
    __set_errno(EBADF);
    return -1;
  }
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__libc_tcdrain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    113f <__libc_tcdrain+0x2f>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1154 <__libc_tcdrain+0x44>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__libc_tcdrain>:
push   %rax
test   %edi,%edi
jns    111e <__libc_tcdrain+0xe>
mov    0x2ebc(%rip),%rax
jmp    1125 <__libc_tcdrain+0x15>
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EBADF = global i32 0
@ENOSYS = global i32 0
define i32 @__libc_tcdrain(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @EBADF
%8 = call i32 @__set_errno(i32 %7)
store i32 -1, i32* %2
br label %12
9: ; preds = %1
%10 = load i32, i32* @ENOSYS
%11 = call i32 @__set_errno(i32 %10)
store i32 -1, i32* %2
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@EBADF = global i32 0
@ENOSYS = global i32 0
define i32 @__libc_tcdrain(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = load i32, i32* @EBADF
%4 = load i32, i32* @ENOSYS
%5 = select i1 %2, i32 %3, i32 %4
%6 = tail call i32 @__set_errno(i32 %5)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int free_jambo(void *v) {
  char *str = (char *)v;
  printf("free_jambo called: %s\n", str);
  return 0;
}


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

x86 assembly (clang, -O2):
<free_jambo>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [23 x i8] c"free_jambo called: %s\0A\00"
define i32 @free_jambo(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
void strcopy(char *source, char *dest) {
  while (*source) {
    *(dest) = *(source);
    source++;
    dest++;
  }
}


x86 assembly (clang, -O0):
<strcopy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1142 <strcopy+0x42>
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <strcopy+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcopy>:
mov    (%rdi),%al
test   %al,%al
je     1120 <strcopy+0x20>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %al,(%rsi,%rcx,1)
movzbl 0x1(%rdi,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    1110 <strcopy+0x10>
ret

LLVM IR (-O0):
define void @strcopy(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 %17
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = load i8*, i8** %4
store i8 %11, i8* %12
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %3
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %4
br label %5
17: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @strcopy(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
ret void
}
int max_remainder(int a) {
  int max_n = 0;
  if (a % 2 == 0)
    max_n = a / 2 - 1;
  else
    max_n = a / 2;
  return 2 * max_n * a;
}


x86 assembly (clang, -O0):
<max_remainder>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1138 <max_remainder+0x38>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <max_remainder+0x46>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
imul   -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_remainder>:
mov    %edi,%eax
and    $0x1,%eax
mov    %edi,%ecx
shr    $0x1f,%ecx
add    %edi,%ecx
shr    %ecx
add    %ecx,%eax
add    $0xffffffff,%eax
imul   %edi,%eax
add    %eax,%eax
ret

LLVM IR (-O0):
define i32 @max_remainder(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = srem i32 %4, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %2
%9 = sdiv i32 %8, 2
%10 = sub nsw i32 %9, 1
store i32 %10, i32* %3
br label %14
11: ; preds = %1
%12 = load i32, i32* %2
%13 = sdiv i32 %12, 2
store i32 %13, i32* %3
br label %14
14: ; preds = %11, %7
%15 = load i32, i32* %3
%16 = mul nsw i32 2, %15
%17 = load i32, i32* %2
%18 = mul nsw i32 %16, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @max_remainder(i32 %0) {
%2 = and i32 %0, 1
%3 = sdiv i32 %0, 2
%4 = add nsw i32 %2, -1
%5 = add nsw i32 %3, %4
%6 = shl i32 %0, 1
%7 = mul i32 %6, %5
ret i32 %7
}
unsigned int _cc3_i2c_send(unsigned int num, unsigned int *buffer) { return 1; }


x86 assembly (clang, -O0):
<_cc3_i2c_send>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @_cc3_i2c_send(i32 %0, i32* nocapture readnone %1) {
ret i32 1
}
double mismatch_rdp(double p, double q, void *data) {
  (void)data;
  return ((1 - p) * q / 3 + (1 - q) * p / 3 + 2 * p * q / 9);
}


x86 assembly (clang, -O0):
<mismatch_rdp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movsd  0xefe(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xee4(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xee0(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xec6(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xeae(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xe94(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mismatch_rdp>:
movsd  0xef8(%rip),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
divsd  0xef0(%rip),%xmm2
unpcklpd %xmm0,%xmm3
addsd  %xmm0,%xmm0
movapd 0xee8(%rip),%xmm4
subpd  %xmm3,%xmm4
shufpd $0x2,%xmm4,%xmm0
unpcklpd %xmm1,%xmm1
mulpd  %xmm1,%xmm0
divpd  0xedf(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @mismatch_rdp(double %0, double %1, i8* %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i8*
store double %0, double* %4
store double %1, double* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load double, double* %4
%9 = fsub double 1.000000e+00, %8
%10 = load double, double* %5
%11 = fmul double %9, %10
%12 = fdiv double %11, 3.000000e+00
%13 = load double, double* %5
%14 = fsub double 1.000000e+00, %13
%15 = load double, double* %4
%16 = fmul double %14, %15
%17 = fdiv double %16, 3.000000e+00
%18 = fadd double %12, %17
%19 = load double, double* %4
%20 = fmul double 2.000000e+00, %19
%21 = load double, double* %5
%22 = fmul double %20, %21
%23 = fdiv double %22, 9.000000e+00
%24 = fadd double %18, %23
ret double %24
}

LLVM IR (-O2):
define double @mismatch_rdp(double %0, double %1, i8* nocapture readnone %2) {
%4 = fsub double 1.000000e+00, %1
%5 = fmul double %4, %0
%6 = fdiv double %5, 3.000000e+00
%7 = insertelement <2 x double> poison, double %0, i64 0
%8 = shufflevector <2 x double> %7, <2 x double> poison, <2 x i32> zeroinitializer
%9 = fmul <2 x double> %8, <double 2.000000e+00, double poison>
%10 = fsub <2 x double> <double poison, double 1.000000e+00>, %8
%11 = shufflevector <2 x double> %9, <2 x double> %10, <2 x i32> <i32 0, i32 3>
%12 = insertelement <2 x double> poison, double %1, i64 0
%13 = shufflevector <2 x double> %12, <2 x double> poison, <2 x i32> zeroinitializer
%14 = fmul <2 x double> %11, %13
%15 = fdiv <2 x double> %14, <double 9.000000e+00, double 3.000000e+00>
%16 = extractelement <2 x double> %15, i64 1
%17 = fadd double %16, %6
%18 = extractelement <2 x double> %15, i64 0
%19 = fadd double %18, %17
ret double %19
}
int orInstruction(int i, int j) {
  int mask = i | j;
  return mask;
}


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

x86 assembly (clang, -O2):
<orInstruction>:
mov    %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @orInstruction(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = or i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @orInstruction(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
void ai_finalize(struct CalculationInfo *info) {}


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

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

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

LLVM IR (-O2):
%struct.CalculationInfo = type opaque
define void @ai_finalize(%struct.CalculationInfo* nocapture %0) {
ret void
}
int test_imm_67uint32_reg(unsigned int val) {
  return ((val) & (0x67 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_67uint32_reg>:
test   $0x67,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_67uint32_reg(i32 %0) {
%2 = and i32 %0, 103
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}