xunge/DecIR huggingface dataset:
int lpt(int n, int *lambda) {
  register int i = 1;
  *lambda = 0;
  while (i < n) {
    i <<= 1;
    ++(*lambda);
  }
  return (i);
}


x86 assembly (clang, -O0):
<lpt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1141 <lpt+0x41>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    111c <lpt+0x1c>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lpt>:
cmp    $0x2,%edi
jl     111c <lpt+0x1c>
xor    %ecx,%ecx
mov    $0x1,%eax
nopl   0x0(%rax)
add    %eax,%eax
add    $0x1,%ecx
cmp    %edi,%eax
jl     1110 <lpt+0x10>
mov    %ecx,(%rsi)
ret
mov    $0x1,%eax
xor    %ecx,%ecx
mov    %ecx,(%rsi)
ret

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

LLVM IR (-O2):
define i32 @lpt(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %10
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 1, %2 ]
%6 = phi i32 [ %8, %4 ], [ 0, %2 ]
%7 = shl i32 %5, 1
%8 = add nuw nsw i32 %6, 1
%9 = icmp slt i32 %7, %0
br i1 %9, label %4, label %10
10: ; preds = %4, %2
%11 = phi i32 [ 0, %2 ], [ %8, %4 ]
%12 = phi i32 [ 1, %2 ], [ %7, %4 ]
store i32 %11, i32* %1
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ LOG_CRIT;
int /*<<< orphan*/ abort();
int /*<<< orphan*/ logx(int /*<<< orphan*/, char *, char const *, unsigned int,
                        unsigned int, unsigned int);
void __dm_parity_assert_fail(unsigned int expected, unsigned int got,
                             unsigned int line, const char *function) {
  logx(LOG_CRIT, "invalid parity at %s:%d, %08x != %08x", function, line, got,
       expected);
  abort();
}


x86 assembly (clang, -O0):
<__dm_parity_assert_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0x4(%rbp),%r9d
lea    0xeac(%rip),%rsi
call   1040 <logx@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<__dm_parity_assert_fail>:
push   %rax
mov    %edx,%eax
mov    %esi,%r8d
mov    %edi,%r9d
mov    0x2eb8(%rip),%rdx
mov    (%rdx),%edi
lea    0xec7(%rip),%rsi
mov    %rcx,%rdx
mov    %eax,%ecx
call   1040 <logx@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@LOG_CRIT = global i32 0
@.str = [38 x i8] c"invalid parity at %s:%d, %08x != %08x\00"
define void @__dm_parity_assert_fail(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* @LOG_CRIT
%10 = load i8*, i8** %8
%11 = load i32, i32* %7
%12 = load i32, i32* %6
%13 = load i32, i32* %5
%14 = call i32 @logx(i32 %9, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %11, i32 %12, i32 %13)
%15 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@LOG_CRIT = global i32 0
@.str = [38 x i8] c"invalid parity at %s:%d, %08x != %08x\00"
define void @__dm_parity_assert_fail(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = load i32, i32* @LOG_CRIT
%6 = tail call i32 @logx(i32 %5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %2, i32 %1, i32 %0)
%7 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ eset(int);
scalar_t__ strcpy(char *, char *);
int Mstrcpy(int nargs, int *argsv) {
  if (nargs < 2) {
    eset(21);
    return -1;
  }
  char *a = (char *)argsv[0];
  char *b = (char *)argsv[1];
  int x = (int)strcpy(a, b);
  return x;
}


x86 assembly (clang, -O0):
<Mstrcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    114f <Mstrcpy+0x2f>
mov    $0x15,%edi
call   1040 <eset@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    117c <Mstrcpy+0x5c>
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq 0x4(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mstrcpy>:
push   %rax
cmp    $0x1,%edi
jg     1137 <Mstrcpy+0x17>
mov    $0x15,%edi
call   1040 <eset@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
movslq (%rsi),%rdi
movslq 0x4(%rsi),%rsi
call   1030 <strcpy@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @Mstrcpy(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @eset(i32 21)
store i32 -1, i32* %3
br label %29
13: ; preds = %2
%14 = load i32*, i32** %5
%15 = getelementptr inbounds i32, i32* %14, i64 0
%16 = load i32, i32* %15
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i8*
store i8* %18, i8** %6
%19 = load i32*, i32** %5
%20 = getelementptr inbounds i32, i32* %19, i64 1
%21 = load i32, i32* %20
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i8*
store i8* %23, i8** %7
%24 = load i8*, i8** %6
%25 = load i8*, i8** %7
%26 = call i64 @strcpy(i8* %24, i8* %25)
%27 = trunc i64 %26 to i32
store i32 %27, i32* %8
%28 = load i32, i32* %8
store i32 %28, i32* %3
br label %29
29: ; preds = %13, %11
%30 = load i32, i32* %3
ret i32 %30
}

LLVM IR (-O2):
define i32 @Mstrcpy(i32 %0, i32* nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @eset(i32 21)
br label %16
6: ; preds = %2
%7 = load i32, i32* %1
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
%10 = getelementptr inbounds i32, i32* %1, i64 1
%11 = load i32, i32* %10
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i8*
%14 = tail call i64 @strcpy(i8* %9, i8* %13)
%15 = trunc i64 %14 to i32
br label %16
16: ; preds = %6, %4
%17 = phi i32 [ -1, %4 ], [ %15, %6 ]
ret i32 %17
}
int fib(int x) {
  if (x == 1 || x == 2) {
    return 1;
  } else {
    return fib(x - 1) + fib(x - 2);
  }
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     112f <fib+0x1f>
cmpl   $0x2,-0x8(%rbp)
jne    113b <fib+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    115e <fib+0x4e>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
add    $0xffffffff,%ebp
mov    $0x1,%ebx
cmp    $0x2,%ebp
jb     1144 <fib+0x34>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebp,%edi
call   1030 <fib@plt>
add    %eax,%ebx
add    $0xfffffffe,%ebp
cmp    $0x1,%ebp
ja     1130 <fib+0x20>
add    $0x1,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 2
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %11, %4 ], [ %2, %1 ]
%6 = phi i32 [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %10, %4 ], [ 0, %1 ]
%8 = tail call i32 @fib(i32 %5)
%9 = add nsw i32 %6, -2
%10 = add nsw i32 %8, %7
%11 = add i32 %6, -3
%12 = icmp ult i32 %11, 2
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = add i32 %10, 1
br label %15
15: ; preds = %13, %1
%16 = phi i32 [ 1, %1 ], [ %14, %13 ]
ret i32 %16
}
void mat2_copy(float *dst, float *src) {
  dst[0] = src[0];
  dst[1] = src[1];
  dst[2] = src[2];
  dst[3] = src[3];
}


x86 assembly (clang, -O0):
<mat2_copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat2_copy>:
movss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rdi)
movss  0xc(%rsi),%xmm0
movss  %xmm0,0xc(%rdi)
ret

LLVM IR (-O0):
define void @mat2_copy(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %3
%9 = getelementptr inbounds float, float* %8, i64 0
store float %7, float* %9
%10 = load float*, float** %4
%11 = getelementptr inbounds float, float* %10, i64 1
%12 = load float, float* %11
%13 = load float*, float** %3
%14 = getelementptr inbounds float, float* %13, i64 1
store float %12, float* %14
%15 = load float*, float** %4
%16 = getelementptr inbounds float, float* %15, i64 2
%17 = load float, float* %16
%18 = load float*, float** %3
%19 = getelementptr inbounds float, float* %18, i64 2
store float %17, float* %19
%20 = load float*, float** %4
%21 = getelementptr inbounds float, float* %20, i64 3
%22 = load float, float* %21
%23 = load float*, float** %3
%24 = getelementptr inbounds float, float* %23, i64 3
store float %22, float* %24
ret void
}

LLVM IR (-O2):
define void @mat2_copy(float* nocapture writeonly %0, float* nocapture %1) {
%3 = load float, float* %1
store float %3, float* %0
%4 = getelementptr inbounds float, float* %1, i64 1
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %0, i64 1
store float %5, float* %6
%7 = getelementptr inbounds float, float* %1, i64 2
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %0, i64 2
store float %8, float* %9
%10 = getelementptr inbounds float, float* %1, i64 3
%11 = load float, float* %10
%12 = getelementptr inbounds float, float* %0, i64 3
store float %11, float* %12
ret void
}
unsigned int cpumask_any_but(const struct cpumask *mask, unsigned int cpu) {
  return 1;
}


x86 assembly (clang, -O0):
<cpumask_any_but>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.cpumask = type opaque
define i32 @cpumask_any_but(%struct.cpumask* %0, i32 %1) {
%3 = alloca %struct.cpumask*
%4 = alloca i32
store %struct.cpumask* %0, %struct.cpumask** %3
store i32 %1, i32* %4
ret i32 1
}

LLVM IR (-O2):
%struct.cpumask = type opaque
define i32 @cpumask_any_but(%struct.cpumask* nocapture readnone %0, i32 %1) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
__attribute__((always_)) __m128i addv(__m128i a, __m128i b) {
  return _mm_add_epi32(a, b);
}


x86 assembly (clang, -O0):
<addv>:
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_add_epi32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addv>:
jmp    1030 <_mm_add_epi32@plt>

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

LLVM IR (-O2):
define i32 @addv(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_add_epi32(i32 %0, i32 %1)
ret i32 %3
}
yyTerm(f) { printf("%s", f); }


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

x86 assembly (clang, -O2):
<yyTerm>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @yyTerm(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 undef
}
/* Variables and functions */
int errno;
int set_errno(int code) {
  errno = code;
  return -1;
}


x86 assembly (clang, -O0):
<set_errno>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    0x2ecf(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_errno>:
mov    0x2ed9(%rip),%rax
mov    %edi,(%rax)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @set_errno(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @set_errno(i32 %0) {
store i32 %0, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ OveroSyncSettingsHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void OveroSyncSettingsUpdated() { UAVObjUpdated(OveroSyncSettingsHandle()); }


x86 assembly (clang, -O0):
<OveroSyncSettingsUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <OveroSyncSettingsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @OveroSyncSettingsUpdated() {
%1 = call i32 (...) @OveroSyncSettingsHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @OveroSyncSettingsUpdated() {
%1 = tail call i32 (...) @OveroSyncSettingsHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
int is_matrix(const int symbology) {
  int result = 0;
  switch (symbology) {
  case 58:
  case 71:
  case 97:
  case 102:
  case 92:
  case 104:
  case 112:
  case 128:
  case 141:
  case 142:
  case 116:
  case 115:
  case 143:
  case 145:
    result = 1;
    break;
  }
  return result;
}


x86 assembly (clang, -O0):
<is_matrix>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffc6,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x57,%eax
ja     113e <is_matrix+0x3e>
mov    -0x10(%rbp),%rax
lea    0xed2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_matrix>:
xor    %eax,%eax
add    $0xffffffc6,%edi
cmp    $0x57,%edi
ja     111f <is_matrix+0x1f>
lea    0xeef(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @is_matrix(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
switch i32 %4, label %6 [
i32 58, label %5
i32 71, label %5
i32 97, label %5
i32 102, label %5
i32 92, label %5
i32 104, label %5
i32 112, label %5
i32 128, label %5
i32 141, label %5
i32 142, label %5
i32 116, label %5
i32 115, label %5
i32 143, label %5
i32 145, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %3
br label %6
6: ; preds = %1, %5
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_matrix(i32 %0) {
switch i32 %0, label %3 [
i32 58, label %2
i32 71, label %2
i32 97, label %2
i32 102, label %2
i32 92, label %2
i32 104, label %2
i32 112, label %2
i32 128, label %2
i32 141, label %2
i32 142, label %2
i32 116, label %2
i32 115, label %2
i32 143, label %2
i32 145, label %2
]
2: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
br label %3
3: ; preds = %1, %2
%4 = phi i32 [ 0, %1 ], [ 1, %2 ]
ret i32 %4
}
/* Type definitions */
struct imgImage {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ imgFreeImage(struct imgImage *);
int /*<<< orphan*/ imgFreePixelBuffers(struct imgImage *);
void imgFreeAll(struct imgImage *img) {
  if (!img)
    return;
  imgFreePixelBuffers(img);
  imgFreeImage(img);
}


x86 assembly (clang, -O0):
<imgFreeAll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <imgFreeAll+0x1c>
jmp    114e <imgFreeAll+0x2e>
mov    -0x8(%rbp),%rdi
call   1040 <imgFreePixelBuffers@plt>
mov    -0x8(%rbp),%rdi
call   1030 <imgFreeImage@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imgFreeAll>:
test   %rdi,%rdi
je     1137 <imgFreeAll+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <imgFreePixelBuffers@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <imgFreeImage@plt>
ret

LLVM IR (-O0):
%struct.imgImage = type { i32 }
define void @imgFreeAll(%struct.imgImage* %0) {
%2 = alloca %struct.imgImage*
store %struct.imgImage* %0, %struct.imgImage** %2
%3 = load %struct.imgImage*, %struct.imgImage** %2
%4 = icmp ne %struct.imgImage* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load %struct.imgImage*, %struct.imgImage** %2
%8 = call i32 @imgFreePixelBuffers(%struct.imgImage* %7)
%9 = load %struct.imgImage*, %struct.imgImage** %2
%10 = call i32 @imgFreeImage(%struct.imgImage* %9)
br label %11
11: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.imgImage = type { i32 }
define void @imgFreeAll(%struct.imgImage* %0) {
%2 = icmp eq %struct.imgImage* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @imgFreePixelBuffers(%struct.imgImage* %0)
%5 = tail call i32 @imgFreeImage(%struct.imgImage* %0)
br label %6
6: ; preds = %1, %3
ret void
}
double ls_costN_nm10_sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : x; }


x86 assembly (clang, -O0):
<ls_costN_nm10_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <ls_costN_nm10_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <ls_costN_nm10_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <ls_costN_nm10_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <ls_costN_nm10_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_costN_nm10_sign>:
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
andpd  %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @ls_costN_nm10_sign(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load double, double* %2
br label %12
12: ; preds = %10, %9
%13 = phi double [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi double [ -1.000000e+00, %5 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @ls_costN_nm10_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
/* Type definitions */
typedef size_t uint16_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ USBSTK5515_I2C_write(int, size_t *, size_t);
int16_t OSD9616_multiSend(uint16_t *data, uint16_t len) {
  uint16_t x;
  uint16_t cmd[10];
  for (x = 0; x < len; x++) {
    cmd[x] = data[x];
  }
  return USBSTK5515_I2C_write(0x3C, cmd, len);
}


x86 assembly (clang, -O0):
<OSD9616_multiSend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    115c <OSD9616_multiSend+0x4c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,-0x70(%rbp,%rax,8)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <OSD9616_multiSend+0x18>
lea    -0x70(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x3c,%edi
call   1030 <USBSTK5515_I2C_write@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSD9616_multiSend>:
push   %rbx
sub    $0x50,%rsp
mov    %rsi,%rbx
test   %rsi,%rsi
je     1140 <OSD9616_multiSend+0x20>
mov    %rdi,%rsi
lea    0x0(,%rbx,8),%rdx
mov    %rsp,%rdi
call   1040 <memcpy@plt>
mov    %rsp,%rsi
mov    $0x3c,%edi
mov    %rbx,%rdx
call   1030 <USBSTK5515_I2C_write@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @OSD9616_multiSend(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
%6 = alloca [10 x i64]
store i64* %0, i64** %3
store i64 %1, i64* %4
store i64 0, i64* %5
br label %7
7: ; preds = %18, %2
%8 = load i64, i64* %5
%9 = load i64, i64* %4
%10 = icmp ult i64 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i64*, i64** %3
%13 = load i64, i64* %5
%14 = getelementptr inbounds i64, i64* %12, i64 %13
%15 = load i64, i64* %14
%16 = load i64, i64* %5
%17 = getelementptr inbounds [10 x i64], [10 x i64]* %6, i64 0, i64 %16
store i64 %15, i64* %17
br label %18
18: ; preds = %11
%19 = load i64, i64* %5
%20 = add i64 %19, 1
store i64 %20, i64* %5
br label %7
21: ; preds = %7
%22 = getelementptr inbounds [10 x i64], [10 x i64]* %6, i64 0, i64 0
%23 = load i64, i64* %4
%24 = call i32 @USBSTK5515_I2C_write(i32 60, i64* %22, i64 %23)
ret i32 %24
}

LLVM IR (-O2):
define i32 @OSD9616_multiSend(i64* nocapture %0, i64 %1) {
%3 = alloca [10 x i64]
%4 = bitcast [10 x i64]* %3 to i8*
%5 = icmp eq i64 %1, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = bitcast i64* %0 to i8*
%8 = shl nuw i64 %1, 3
br label %9
9: ; preds = %6, %2
%10 = getelementptr inbounds [10 x i64], [10 x i64]* %3, i64 0, i64 0
%11 = call i32 @USBSTK5515_I2C_write(i32 60, i64* %10, i64 %1)
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ term(int);
int c_3(int tt, int *n, char *s) {
  term(1);
  return 0;
}


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

x86 assembly (clang, -O2):
<c_3>:
push   %rax
mov    $0x1,%edi
call   1030 <term@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @c_3(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @term(i32 1)
ret i32 0
}
void ff_hevc_put_hevc_epel_h6_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_h6_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dbg_break();
void __aeabi_unwind_cpp_pr0(void) { dbg_break(); }


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

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

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

LLVM IR (-O2):
define void @__aeabi_unwind_cpp_pr0() {
%1 = tail call i32 (...) @dbg_break()
ret void
}
/* Variables and functions */
int knapsack(int, int, int *, int *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int noItem = 4;
  int knapSize = 10;
  int weights[4] = {5, 4, 6, 3};
  int values[4] = {10, 40, 30, 50};
  printf("Max Value: %d", knapsack(noItem - 1, knapSize, weights, values));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    0xebc(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb9(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb6(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb3(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
lea    -0x20(%rbp),%rdx
lea    -0x30(%rbp),%rcx
call   1040 <knapsack@plt>
mov    %eax,%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x10(%rsp),%rdx
mov    %rsp,%rcx
mov    $0x3,%edi
mov    $0xa,%esi
call   1040 <knapsack@plt>
lea    0xec7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.weights = [4 x i32] [i32 5, i32 4, i32 6, i32 3]
@__const.main.values = [4 x i32] [i32 10, i32 40, i32 30, i32 50]
@.str = [14 x i8] c"Max Value: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [4 x i32]
%5 = alloca [4 x i32]
store i32 0, i32* %1
store i32 4, i32* %2
store i32 10, i32* %3
%6 = bitcast [4 x i32]* %4 to i8*
%7 = bitcast [4 x i32]* %5 to i8*
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 1
%10 = load i32, i32* %3
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 0
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%13 = call i32 @knapsack(i32 %9, i32 %10, i32* %11, i32* %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@__const.main.weights = [4 x i32] [i32 5, i32 4, i32 6, i32 3]
@__const.main.values = [4 x i32] [i32 10, i32 40, i32 30, i32 50]
@.str = [14 x i8] c"Max Value: %d\00"
define i32 @main() {
%1 = alloca [4 x i32]
%2 = alloca [4 x i32]
%3 = bitcast [4 x i32]* %1 to i8*
%4 = bitcast [4 x i32]* %2 to i8*
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%7 = call i32 @knapsack(i32 3, i32 10, i32* %5, i32* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Type definitions */
struct _token_stream {
  int dummy;
};
struct _analyzer {
  int dummy;
};

/* Variables and functions */
struct _token_stream *ts_initial();
struct _token_stream *analyzer_token_stream(struct _analyzer *alz, char *field,
                                            char *query_text) {
  return ts_initial();
}


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

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

LLVM IR (-O0):
%struct._token_stream = type { i32 }
%struct._analyzer = type { i32 }
define %struct._token_stream* @analyzer_token_stream(%struct._analyzer* %0, i8* %1, i8* %2) {
%4 = alloca %struct._analyzer*
%5 = alloca i8*
%6 = alloca i8*
store %struct._analyzer* %0, %struct._analyzer** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = call %struct._token_stream* (...) @ts_initial()
ret %struct._token_stream* %7
}

LLVM IR (-O2):
%struct._token_stream = type { i32 }
%struct._analyzer = type { i32 }
define %struct._token_stream* @analyzer_token_stream(%struct._analyzer* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call %struct._token_stream* (...) @ts_initial()
ret %struct._token_stream* %4
}
/* Variables and functions */
int /*<<< orphan*/ g(int);
void f(int x) { g(x * x); }


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

x86 assembly (clang, -O2):
<f>:
imul   %edi,%edi
jmp    1030 <g@plt>

LLVM IR (-O0):
define void @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %3, %4
%6 = call i32 @g(i32 %5)
ret void
}

LLVM IR (-O2):
define void @f(i32 %0) {
%2 = mul nsw i32 %0, %0
%3 = tail call i32 @g(i32 %2)
ret void
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void RFCHwIntClear(uint32_t ui32Mask) {
  (*((volatile unsigned long *)(0x40041000 + 0x00000008))) = ~ui32Mask;
}


x86 assembly (clang, -O0):
<RFCHwIntClear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
xor    $0xffffffffffffffff,%rcx
mov    $0x40041008,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RFCHwIntClear>:
not    %rdi
mov    %rdi,0x40041008
40
ret

LLVM IR (-O0):
define void @RFCHwIntClear(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = xor i64 %3, -1
store volatile i64 %4, i64* inttoptr (i64 1074008072 to i64*)
ret void
}

LLVM IR (-O2):
define void @RFCHwIntClear(i64 %0) {
%2 = xor i64 %0, -1
store volatile i64 %2, i64* inttoptr (i64 1074008072 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void myPrintHelloMake(void) {
  printf("Hello makefiles!\n");
  return;
}


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"Hello makefiles!\00"
define void @myPrintHelloMake() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
void t5() {
  struct tag5 {
    int a;
  } x;
  struct tag5 *p = &x;
  x.a = 68;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/struct.c",
          40, 68, (*p).a);
  ;
}


x86 assembly (clang, -O0):
<t5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x44,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
lea    0xecc(%rip),%rdi
mov    $0x28,%esi
mov    $0x44,%edx
mov    $0x0,%al
call   1030 <fexpect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t5>:
lea    0xee9(%rip),%rdi
mov    $0x28,%esi
mov    $0x44,%edx
mov    $0x44,%ecx
xor    %eax,%eax
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
%struct.tag5 = type { i32 }
@.str = [129 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/struct.c\00"
define void @t5() {
%1 = alloca %struct.tag5
%2 = alloca %struct.tag5*
store %struct.tag5* %1, %struct.tag5** %2
%3 = getelementptr inbounds %struct.tag5, %struct.tag5* %1, i32 0, i32 0
store i32 68, i32* %3
%4 = load %struct.tag5*, %struct.tag5** %2
%5 = getelementptr inbounds %struct.tag5, %struct.tag5* %4, i32 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 40, i32 68, i32 %6)
ret void
}

LLVM IR (-O2):
%struct.tag5 = type { i32 }
@.str = [129 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/struct.c\00"
define void @t5() {
%1 = tail call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @fexpect to i32 (i8*, i32, i32, i32, ...)*)(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 40, i32 68, i32 68)
ret void
}
char *fun_1(char *p) {
  *(p - 1) = 1;
  *(p - 2) = 1;
  return p - 2;
}


x86 assembly (clang, -O0):
<fun_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x1,-0x1(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,-0x2(%rax)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffffe,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_1>:
movw   $0x101,-0x2(%rdi)
lea    -0x2(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @fun_1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 -1
store i8 1, i8* %4
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 -2
store i8 1, i8* %6
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 -2
ret i8* %8
}

LLVM IR (-O2):
define i8* @fun_1(i8* writeonly %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -1
store i8 1, i8* %2
%3 = getelementptr inbounds i8, i8* %0, i64 -2
store i8 1, i8* %3
ret i8* %3
}
int is_f(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @is_f() {
ret i32 0
}
/* Variables and functions */
int rand();
int random_generate(int min, int max) {
  int number, input;
  number = rand() % (max + 1 - min) + min;
  ;
  return number;
}


x86 assembly (clang, -O0):
<random_generate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
add    -0x4(%rbp),%edx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_generate>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @random_generate(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = call i32 (...) @rand()
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
%10 = load i32, i32* %3
%11 = sub nsw i32 %9, %10
%12 = srem i32 %7, %11
%13 = load i32, i32* %3
%14 = add nsw i32 %12, %13
store i32 %14, i32* %5
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @random_generate(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = srem i32 %3, %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ lib1_func1();
int main() {
  lib1_func1();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @lib1_func1()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @lib1_func1()
ret i32 0
}
/* Variables and functions */
unsigned int getNumDigits(int baseTenNum) {
  return (unsigned int)(log10(baseTenNum)) + 1;
}


x86 assembly (clang, -O0):
<getNumDigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
call   1030 <log10@plt>
cvttsd2si %xmm0,%rax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNumDigits>:
push   %rax
cvtsi2sd %edi,%xmm0
call   1030 <log10@plt>
cvttsd2si %xmm0,%rax
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getNumDigits(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = call double @log10(double %4)
%6 = fptoui double %5 to i32
%7 = add i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @getNumDigits(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = tail call double @log10(double %2)
%4 = fptoui double %3 to i32
%5 = add i32 %4, 1
ret i32 %5
}
int test_imm_D0int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xD0 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_D0int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 893353197568
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
unsigned int hash_key(const char *key) {
  int c;
  unsigned int h = 5381;
  while ((c = *key++))
    h = ((h << 5) + h) + c;
  return h % 97;
}


x86 assembly (clang, -O0):
<hash_key>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1141 <hash_key+0x41>
mov    -0x10(%rbp),%eax
shl    $0x5,%eax
add    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    110f <hash_key+0xf>
mov    -0x10(%rbp),%eax
mov    $0x61,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_key>:
mov    (%rdi),%cl
test   %cl,%cl
je     1145 <hash_key+0x45>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
movsbl %cl,%ecx
mov    %eax,%edx
shl    $0x5,%edx
add    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_key+0x10>
mov    %eax,%ecx
imul   $0x51d07eaf,%rcx,%rcx
shr    $0x20,%rcx
mov    %eax,%edx
sub    %ecx,%edx
shr    %edx
add    %ecx,%edx
shr    $0x6,%edx
imul   $0x61,%edx,%ecx
sub    %ecx,%eax
ret
mov    $0x2e,%eax
ret

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

LLVM IR (-O2):
define i32 @hash_key(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = mul i32 %6, 33
%11 = add i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %11, 97
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 46, %1 ], [ %15, %14 ]
ret i32 %17
}
void vblank(void) {}


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

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

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

LLVM IR (-O2):
define void @vblank() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void dealias_bump_free(void *data) {
  free(data);
  return;
}


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

x86 assembly (clang, -O2):
<dealias_bump_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @dealias_bump_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void *test_anti_range_125(short n) {
  extern void *alloc_anti_range_125(short) __attribute__((alloc_size(1)));
  if ((-0x7fff - 1) + 2 <= n && n <= 1)
    n = (-0x7fff - 1) + 2 - 1;
  return alloc_anti_range_125(n);
}


x86 assembly (clang, -O0):
<test_anti_range_125>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%ecx
mov    $0xffff8002,%eax
cmp    %ecx,%eax
jg     1143 <test_anti_range_125+0x33>
movswl -0x2(%rbp),%eax
cmp    $0x1,%eax
jg     1143 <test_anti_range_125+0x33>
movw   $0x8001,-0x2(%rbp)
movswl -0x2(%rbp),%edi
call   1030 <alloc_anti_range_125@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_125>:
mov    %edi,%eax
add    $0x7ffe,%ax
mov    $0x8001,%eax
cmovs  %edi,%eax
movswl %ax,%edi
jmp    1030 <alloc_anti_range_125@plt>

LLVM IR (-O0):
define i8* @test_anti_range_125(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = icmp sle i32 -32766, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i16, i16* %2
%8 = sext i16 %7 to i32
%9 = icmp sle i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %6
store i16 -32767, i16* %2
br label %11
11: ; preds = %10, %6, %1
%12 = load i16, i16* %2
%13 = call i8* @alloc_anti_range_125(i16 signext %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @test_anti_range_125(i16 signext %0) {
%2 = add i16 %0, 32766
%3 = icmp sgt i16 %2, -1
%4 = select i1 %3, i16 -32767, i16 %0
%5 = tail call i8* @alloc_anti_range_125(i16 signext %4)
ret i8* %5
}
/* Variables and functions */
double fabs(double);
double a5abs(double a) { return fabs(a + 5); }


x86 assembly (clang, -O0):
<a5abs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeff(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movaps 0xee3(%rip),%xmm1
pand   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<a5abs>:
addsd  0xef8(%rip),%xmm0
andpd  0xf00(%rip),%xmm0
ret

LLVM IR (-O0):
define double @a5abs(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 5.000000e+00
%5 = call double @llvm.fabs.f64(double %4)
ret double %5
}

LLVM IR (-O2):
define double @a5abs(double %0) {
%2 = fadd double %0, 5.000000e+00
%3 = tail call double @llvm.fabs.f64(double %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ EA_AY_AI_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int /*<<< orphan*/);
void m68k_op_sf_8_ai(void) { m68ki_write_8(EA_AY_AI_8(), 0); }


x86 assembly (clang, -O0):
<m68k_op_sf_8_ai>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <EA_AY_AI_8@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <m68ki_write_8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_sf_8_ai>:
push   %rax
xor    %eax,%eax
call   1030 <EA_AY_AI_8@plt>
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_sf_8_ai() {
%1 = call i32 (...) @EA_AY_AI_8()
%2 = call i32 @m68ki_write_8(i32 %1, i32 0)
ret void
}

LLVM IR (-O2):
define void @m68k_op_sf_8_ai() {
%1 = tail call i32 (...) @EA_AY_AI_8()
%2 = tail call i32 @m68ki_write_8(i32 %1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
void f10(unsigned int a, unsigned int b) {
  if (b >= 16)
    if ((a / b) == 0x7fffffff / 4)
      link_error();
}


x86 assembly (clang, -O0):
<f10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
jb     1147 <f10+0x37>
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
cmp    $0x1fffffff,%eax
jne    1142 <f10+0x32>
mov    $0x0,%al
call   1030 <link_error@plt>
jmp    1147 <f10+0x37>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f10(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp uge i32 %5, 16
br i1 %6, label %7, label %15
7: ; preds = %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = udiv i32 %8, %9
%11 = icmp eq i32 %10, 536870911
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = call i32 (...) @link_error()
br label %14
14: ; preds = %12, %7
br label %15
15: ; preds = %14, %2
ret void
}

LLVM IR (-O2):
define void @f10(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef scalar_t__ __m128i;

/* Variables and functions */
__m128i __attribute__((__always___, __nodebug__))
_mm_add_epi64(__m128i a, __m128i b) {
  return a + b;
}


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

x86 assembly (clang, -O2):
<_mm_add_epi64>:
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i64 @_mm_add_epi64(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 = load i64, i64* %4
%7 = add nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @_mm_add_epi64(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
ret i64 %3
}
void glFlush(void) {}


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

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

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

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