xunge/DecIR huggingface dataset:
short permissao(semente, senha)
char *semente, *senha;
{
  char buffer[32];
  encrypt((unsigned char *)semente, (unsigned char *)buffer);
  return (!strcmp(senha, buffer));
}


x86 assembly (clang, -O0):
<permissao>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1030 <encrypt@plt>
mov    -0x10(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cwtl
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<permissao>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <encrypt@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define signext i16 @permissao(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [32 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%8 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @encrypt to i32 (i8*, i8*, ...)*)(i8* %6, i8* %7)
%9 = load i8*, i8** %4
%10 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%11 = call i32 @strcmp(i8* %9, i8* %10)
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
%15 = trunc i32 %14 to i16
ret i16 %15
}

LLVM IR (-O2):
define signext i16 @permissao(i8* %0, i8* nocapture %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @encrypt to i32 (i8*, i8*, ...)*)(i8* %0, i8* %4)
%6 = call i32 @strcmp(i8* dereferenceable(1) %1, i8* %4)
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i16
ret i16 %8
}
double MtoMI(double M) { return M * 0.000621371192; }


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

x86 assembly (clang, -O2):
<MtoMI>:
mulsd  0xef8(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @MtoMI(double %0) {
%2 = fmul double %0, 0x3F445C7079626FB0
ret double %2
}
char *langDbgMemAy8950() { return "AY8950 Sample RAM"; }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"AY8950 Sample RAM\00"
define i8* @langDbgMemAy8950() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [18 x i8] c"AY8950 Sample RAM\00"
define i8* @langDbgMemAy8950() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}
int compare_hash_codes(unsigned int code1, unsigned int code2) {
  return code1 - code2;
}


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

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

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

LLVM IR (-O2):
define i32 @compare_hash_codes(i32 %0, i32 %1) {
%3 = sub i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int converttofixed(int n) {
  if (n < 131072 && n >= (-131072))
    return n * 16384;
  else {
    printf("converttofixed Overflow\n");
    return 0;
  }
}


x86 assembly (clang, -O0):
<converttofixed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x20000,-0x8(%rbp)
jge    1143 <converttofixed+0x33>
cmpl   $0xfffe0000,-0x8(%rbp)
jl     1143 <converttofixed+0x33>
mov    -0x8(%rbp),%eax
shl    $0xe,%eax
mov    %eax,-0x4(%rbp)
jmp    1156 <converttofixed+0x46>
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<converttofixed>:
mov    %edi,%eax
lea    0x20000(%rax),%ecx
cmp    $0x3ffff,%ecx
ja     1124 <converttofixed+0x14>
shl    $0xe,%eax
ret
push   %rax
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"converttofixed Overflow\0A\00"
define i32 @converttofixed(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 131072
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, -131072
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = mul nsw i32 %10, 16384
store i32 %11, i32* %2
br label %14
12: ; preds = %6, %1
%13 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@str = [24 x i8] c"converttofixed Overflow\00"
define i32 @converttofixed(i32 %0) {
%2 = add i32 %0, 131072
%3 = icmp ult i32 %2, 262144
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = shl nsw i32 %0, 14
br label %8
6: ; preds = %1
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ 0, %6 ]
ret i32 %9
}
/* Type definitions */
struct mutex_lock {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ unlock(struct mutex_lock *);
void cleanup_lock(void *data) {
  struct mutex_lock *lock = data;
  unlock(lock);
}


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

x86 assembly (clang, -O2):
<cleanup_lock>:
jmp    1030 <unlock@plt>

LLVM IR (-O0):
%struct.mutex_lock = type { i32 }
define void @cleanup_lock(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.mutex_lock*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.mutex_lock*
store %struct.mutex_lock* %5, %struct.mutex_lock** %3
%6 = load %struct.mutex_lock*, %struct.mutex_lock** %3
%7 = call i32 @unlock(%struct.mutex_lock* %6)
ret void
}

LLVM IR (-O2):
%struct.mutex_lock = type { i32 }
define void @cleanup_lock(i8* %0) {
%2 = bitcast i8* %0 to %struct.mutex_lock*
%3 = tail call i32 @unlock(%struct.mutex_lock* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PTRACE_TRACEME;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ ptrace(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/ *,
                  int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
__attribute__((constructor)) void check_ptrace(void) {
  if (ptrace(PTRACE_TRACEME, 0, NULL, NULL) < 0) {
    fprintf(stdout, "No debugging, dude.\n");
    exit(0);
  }
}


x86 assembly (clang, -O0):
<check_ptrace>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1040 <ptrace@plt>
cmp    $0x0,%rax
jge    1171 <check_ptrace+0x41>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
lea    0xe9b(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1050 <exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_ptrace>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <ptrace@plt>
test   %rax,%rax
js     114c <check_ptrace+0x1c>
pop    %rax
ret
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@PTRACE_TRACEME = global i32 0
@stdout = global i32 0
@.str = [21 x i8] c"No debugging, dude.\0A\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @check_ptrace, i8* null }]
define void @check_ptrace() {
%1 = load i32, i32* @PTRACE_TRACEME
%2 = call i64 @ptrace(i32 %1, i32 0, i32* null, i32* null)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i32, i32* @stdout
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 0)
unreachable
8: ; preds = %0
ret void
}

LLVM IR (-O2):
@PTRACE_TRACEME = global i32 0
@stdout = global i32 0
@.str = [21 x i8] c"No debugging, dude.\0A\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @check_ptrace, i8* null }]
define void @check_ptrace() {
%1 = load i32, i32* @PTRACE_TRACEME
%2 = tail call i64 @ptrace(i32 %1, i32 0, i32* null, i32* null)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %0
ret void
}
double cubicEaseOutd(double p) {
  double f = (p - 1);
  return f * f * f + 1;
}


x86 assembly (clang, -O0):
<cubicEaseOutd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec6(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cubicEaseOutd>:
addsd  0xef8(%rip),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
addsd  0xeec(%rip),%xmm0
ret

LLVM IR (-O0):
define double @cubicEaseOutd(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fsub double %4, 1.000000e+00
store double %5, double* %3
%6 = load double, double* %3
%7 = load double, double* %3
%8 = fmul double %6, %7
%9 = load double, double* %3
%10 = call double @llvm.fmuladd.f64(double %8, double %9, double 1.000000e+00)
ret double %10
}

LLVM IR (-O2):
define double @cubicEaseOutd(double %0) {
%2 = fadd double %0, -1.000000e+00
%3 = fmul double %2, %2
%4 = tail call double @llvm.fmuladd.f64(double %3, double %2, double 1.000000e+00)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("First sentence.\n");
  printf("Second sentence.\nThird sentence.\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [16 x i8] c"First sentence.\00"
@str.2 = [33 x i8] c"Second sentence.\0AThird sentence.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
char *short_displ_cmplt(i)
unsigned long i;
{
  if (((i >> 5) & 1) == 0)
    return "";
  else if ((i >> 13) & 1)
    return ",mb";
  else
    return ",ma";
}


x86 assembly (clang, -O0):
<short_displ_cmplt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x5,%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    112e <short_displ_cmplt+0x2e>
lea    0xee2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    115f <short_displ_cmplt+0x5f>
mov    -0x10(%rbp),%rax
shr    $0xd,%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1154 <short_displ_cmplt+0x54>
lea    0xeb5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    115f <short_displ_cmplt+0x5f>
lea    0xea9(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<short_displ_cmplt>:
test   $0x2000,%edi
lea    0xef7(%rip),%rax
lea    0xeec(%rip),%rcx
cmove  %rax,%rcx
test   $0x20,%dil
lea    0xee4(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c",mb\00"
@.str.2 = [4 x i8] c",ma\00"
define i8* @short_displ_cmplt(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = lshr i64 %4, 5
%6 = and i64 %5, 1
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %2
br label %16
9: ; preds = %1
%10 = load i64, i64* %3
%11 = lshr i64 %10, 13
%12 = and i64 %11, 1
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %9
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %16
15: ; preds = %9
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %16
16: ; preds = %15, %14, %8
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c",mb\00"
@.str.2 = [4 x i8] c",ma\00"
define i8* @short_displ_cmplt(i64 %0) {
%2 = and i64 %0, 32
%3 = icmp eq i64 %2, 0
%4 = and i64 %0, 8192
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%7 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %6
ret i8* %7
}
int cop_execute(void (*function)()) {
  (*(volatile unsigned int *)(0x4001501C) = ((unsigned int)function));
  (*(volatile unsigned int *)(0x60007004) = (0x0));
  return 1;
}


x86 assembly (clang, -O0):
<cop_execute>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%ecx
mov    $0x4001501c,%eax
mov    %ecx,(%rax)
mov    $0x60007004,%eax
movl   $0x0,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cop_execute>:
mov    %edi,0x4001501c
movl   $0x0,0x60007004
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @cop_execute(void (...)* %0) {
%2 = alloca void (...)*
store void (...)* %0, void (...)** %2
%3 = load void (...)*, void (...)** %2
%4 = ptrtoint void (...)* %3 to i32
store volatile i32 %4, i32* inttoptr (i64 1073827868 to i32*)
store volatile i32 0, i32* inttoptr (i64 1610641412 to i32*)
ret i32 1
}

LLVM IR (-O2):
define i32 @cop_execute(void (...)* %0) {
%2 = ptrtoint void (...)* %0 to i64
%3 = trunc i64 %2 to i32
store volatile i32 %3, i32* inttoptr (i64 1073827868 to i32*)
store volatile i32 0, i32* inttoptr (i64 1610641412 to i32*)
ret i32 1
}
/* Variables and functions */
int wdog_set_debug(int);
int wdog_debug(int enable) { return wdog_set_debug(enable); }


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

x86 assembly (clang, -O2):
<wdog_debug>:
jmp    1030 <wdog_set_debug@plt>

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

LLVM IR (-O2):
define i32 @wdog_debug(i32 %0) {
%2 = tail call i32 @wdog_set_debug(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __m512i;

/* Variables and functions */
int /*<<< orphan*/ _mm512_ror_epi32(int /*<<< orphan*/, int);
__attribute__((always_)) __m512i rot8_512(__m512i x) {
  return _mm512_ror_epi32(x, 8);
}


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

x86 assembly (clang, -O2):
<rot8_512>:
mov    $0x8,%esi
jmp    1030 <_mm512_ror_epi32@plt>

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

LLVM IR (-O2):
define i32 @rot8_512(i32 %0) {
%2 = tail call i32 @_mm512_ror_epi32(i32 %0, i32 8)
ret i32 %2
}
unsigned short extractUpper16(void *address) {
  unsigned int addr = (unsigned int)address;
  return (addr >> 16) + ((addr >> 15) & 1);
}


x86 assembly (clang, -O0):
<extractUpper16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
mov    -0xc(%rbp),%ecx
shr    $0xf,%ecx
and    $0x1,%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<extractUpper16>:
mov    %edi,%eax
shr    $0x10,%eax
shr    $0xf,%edi
and    $0x1,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @extractUpper16(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = lshr i32 %6, 16
%8 = load i32, i32* %3
%9 = lshr i32 %8, 15
%10 = and i32 %9, 1
%11 = add i32 %7, %10
%12 = trunc i32 %11 to i16
ret i16 %12
}

LLVM IR (-O2):
define zeroext i16 @extractUpper16(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = lshr i32 %3, 16
%5 = lshr i32 %3, 15
%6 = and i32 %5, 1
%7 = add nuw nsw i32 %6, %4
%8 = trunc i32 %7 to i16
ret i16 %8
}
void gtk_image_get_storage_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_image_get_storage_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ socket_put_char(unsigned int);
void socket_put_string(unsigned string[]) {
  unsigned i = 0;
  while (string[i]) {
    socket_put_char(string[i]);
    i++;
  }
}


x86 assembly (clang, -O0):
<socket_put_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
cmpl   $0x0,(%rax,%rcx,4)
je     1151 <socket_put_string+0x41>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    (%rax,%rcx,4),%edi
call   1030 <socket_put_char@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <socket_put_string+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_put_string>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%edi
test   %edi,%edi
je     1141 <socket_put_string+0x31>
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
call   1030 <socket_put_char@plt>
mov    %ebp,%eax
mov    (%rbx,%rax,4),%edi
add    $0x1,%ebp
test   %edi,%edi
jne    1130 <socket_put_string+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @socket_put_string(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %11, %4 ], [ %2, %1 ]
%6 = phi i32 [ %8, %4 ], [ 0, %1 ]
%7 = tail call i32 @socket_put_char(i32 %5)
%8 = add i32 %6, 1
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getc(int /*<<< orphan*/);
int /*<<< orphan*/ push(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
void key() { push(getc(stdin)); }


x86 assembly (clang, -O0):
<key>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1040 <getc@plt>
mov    %eax,%edi
call   1030 <push@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<key>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1040 <getc@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <push@plt>

LLVM IR (-O0):
@stdin = global i32 0
define void @key() {
%1 = load i32, i32* @stdin
%2 = call i32 @getc(i32 %1)
%3 = call i32 @push(i32 %2)
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
define void @key() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @getc(i32 %1)
%3 = tail call i32 @push(i32 %2)
ret void
}
double not_equal(double a, double b) { return a != b; }


x86 assembly (clang, -O0):
<not_equal>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<not_equal>:
cmpneqsd %xmm1,%xmm0
movsd  0xef3(%rip),%xmm1
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @not_equal(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp une double %5, %6
%8 = zext i1 %7 to i32
%9 = sitofp i32 %8 to double
ret double %9
}

LLVM IR (-O2):
define double @not_equal(double %0, double %1) {
%3 = fcmp une double %0, %1
%4 = uitofp i1 %3 to double
ret double %4
}
/* Type definitions */
struct _perf_cpu {
  int dummy;
};

/* Variables and functions */
int pf_profiling_stop(struct _perf_cpu *, int /*<<< orphan*/);
int pf_profiling_allstop(struct _perf_cpu *cpu) {
  return (pf_profiling_stop(cpu, 0));
}


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

x86 assembly (clang, -O2):
<pf_profiling_allstop>:
xor    %esi,%esi
jmp    1030 <pf_profiling_stop@plt>

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

LLVM IR (-O2):
%struct._perf_cpu = type { i32 }
define i32 @pf_profiling_allstop(%struct._perf_cpu* %0) {
%2 = tail call i32 @pf_profiling_stop(%struct._perf_cpu* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
double lgamma(double);
double betaln(double x, double y) {
  if (0) {
    assert(x > 0.0 && y > 0.0);
  }
  return (lgamma(x) + lgamma(y) - lgamma(x + y));
}


x86 assembly (clang, -O0):
<betaln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <lgamma@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <lgamma@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1030 <lgamma@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<betaln>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
call   1030 <lgamma@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <lgamma@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
call   1030 <lgamma@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @betaln(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call double @lgamma(double %5)
%7 = load double, double* %4
%8 = call double @lgamma(double %7)
%9 = fadd double %6, %8
%10 = load double, double* %3
%11 = load double, double* %4
%12 = fadd double %10, %11
%13 = call double @lgamma(double %12)
%14 = fsub double %9, %13
ret double %14
}

LLVM IR (-O2):
define double @betaln(double %0, double %1) {
%3 = tail call double @lgamma(double %0)
%4 = tail call double @lgamma(double %1)
%5 = fadd double %3, %4
%6 = fadd double %0, %1
%7 = tail call double @lgamma(double %6)
%8 = fsub double %5, %7
ret double %8
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_wday;
};

/* Variables and functions */
int /*<<< orphan*/ localtime_r(int /*<<< orphan*/ *, struct tm *);
int weekday(time_t *time) {
  struct tm dtm;
  localtime_r(time, &dtm);
  int retval = dtm.tm_wday;
  return retval;
}


x86 assembly (clang, -O0):
<weekday>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <localtime_r@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<weekday>:
push   %rax
mov    %rsp,%rsi
call   1030 <localtime_r@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @weekday(i32* %0) {
%2 = alloca i32*
%3 = alloca %struct.tm
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @localtime_r(i32* %5, %struct.tm* %3)
%7 = getelementptr inbounds %struct.tm, %struct.tm* %3, i32 0, i32 0
%8 = load i32, i32* %7
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @weekday(i32* %0) {
%2 = alloca %struct.tm
%3 = bitcast %struct.tm* %2 to i8*
%4 = call i32 @localtime_r(i32* %0, %struct.tm* %2)
%5 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
void vsync_suspend_speed_eval(void) {}


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

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

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

LLVM IR (-O2):
define void @vsync_suspend_speed_eval() {
ret void
}
void smerror_dummy(int prio, const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @smerror_dummy(i32 %0, i8* nocapture %1, ...) {
ret void
}
/* Variables and functions */
int integer_key_comparison(const void *const key1, const void *const key2) {
  if (key1 == NULL)
    return 0;
  if (key2 == NULL)
    return 0;
  int *key_a = (int *)key1;
  int *key_b = (int *)key2;
  if (*key_a == *key_b)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<integer_key_comparison>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1123 <integer_key_comparison+0x23>
movl   $0x0,-0x4(%rbp)
jmp    116f <integer_key_comparison+0x6f>
cmpq   $0x0,-0x18(%rbp)
jne    113a <integer_key_comparison+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    116f <integer_key_comparison+0x6f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jne    1168 <integer_key_comparison+0x68>
movl   $0x1,-0x4(%rbp)
jmp    116f <integer_key_comparison+0x6f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<integer_key_comparison>:
xor    %eax,%eax
test   %rdi,%rdi
je     1115 <integer_key_comparison+0x15>
test   %rsi,%rsi
je     1115 <integer_key_comparison+0x15>
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
sete   %al
ret

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

LLVM IR (-O2):
define i32 @integer_key_comparison(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %13, label %6
6: ; preds = %2
%7 = bitcast i8* %0 to i32*
%8 = bitcast i8* %1 to i32*
%9 = load i32, i32* %7
%10 = load i32, i32* %8
%11 = icmp eq i32 %9, %10
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %2, %6
%14 = phi i32 [ %12, %6 ], [ 0, %2 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void io_writer(uint8_t addr, uint8_t byte) { return; }


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

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

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

LLVM IR (-O2):
define void @io_writer(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_idl_pvwave_comment_entities();
int /*<<< orphan*/ test_idl_pvwave_comments();
int /*<<< orphan*/ test_idl_pvwave_is_language();
void all_idl_pvwave_tests() {
  test_idl_pvwave_is_language();
  test_idl_pvwave_comments();
  test_idl_pvwave_comment_entities();
}


x86 assembly (clang, -O0):
<all_idl_pvwave_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <test_idl_pvwave_is_language@plt>
mov    $0x0,%al
call   1040 <test_idl_pvwave_comments@plt>
mov    $0x0,%al
call   1030 <test_idl_pvwave_comment_entities@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<all_idl_pvwave_tests>:
push   %rax
xor    %eax,%eax
call   1050 <test_idl_pvwave_is_language@plt>
xor    %eax,%eax
call   1040 <test_idl_pvwave_comments@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test_idl_pvwave_comment_entities@plt>

LLVM IR (-O0):
define void @all_idl_pvwave_tests() {
%1 = call i32 (...) @test_idl_pvwave_is_language()
%2 = call i32 (...) @test_idl_pvwave_comments()
%3 = call i32 (...) @test_idl_pvwave_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_idl_pvwave_tests() {
%1 = tail call i32 (...) @test_idl_pvwave_is_language()
%2 = tail call i32 (...) @test_idl_pvwave_comments()
%3 = tail call i32 (...) @test_idl_pvwave_comment_entities()
ret void
}
long long test_03(volatile long long *x) { return x[5]; }


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

x86 assembly (clang, -O2):
<test_03>:
mov    0x28(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @test_03(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 5
%5 = load volatile i64, i64* %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @test_03(i64* %0) {
%2 = getelementptr inbounds i64, i64* %0, i64 5
%3 = load volatile i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ threaded_chat_call(void *);
void chat_call(char *arg) { threaded_chat_call((void *)arg); }


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

x86 assembly (clang, -O2):
<chat_call>:
jmp    1030 <threaded_chat_call@plt>

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

LLVM IR (-O2):
define void @chat_call(i8* %0) {
%2 = tail call i32 @threaded_chat_call(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vp8_variance(unsigned char *, int, unsigned char *, int, int,
                                int, unsigned int *, int *);
unsigned int vp8_get8x8var_c(unsigned char *src_ptr, int source_stride,
                             unsigned char *ref_ptr, int recon_stride,
                             unsigned int *SSE, int *Sum) {
  vp8_variance(src_ptr, source_stride, ref_ptr, recon_stride, 8, 8, SSE, Sum);
  return (*SSE - (((*Sum) * (*Sum)) >> 6));
}


x86 assembly (clang, -O0):
<vp8_get8x8var_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r10
mov    -0x30(%rbp),%rax
mov    $0x8,%r9d
mov    %r9d,%r8d
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <vp8_variance@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    -0x30(%rbp),%rcx
mov    (%rcx),%ecx
mov    -0x30(%rbp),%rdx
imul   (%rdx),%ecx
sar    $0x6,%ecx
sub    %ecx,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vp8_get8x8var_c>:
push   %r14
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8,%rbx
mov    $0x8,%r8d
mov    $0x8,%r9d
push   %r14
push   %rbx
call   1030 <vp8_variance@plt>
add    $0x10,%rsp
mov    (%rbx),%eax
mov    (%r14),%ecx
imul   %ecx,%ecx
shr    $0x6,%ecx
sub    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @vp8_get8x8var_c(i8* %0, i32 %1, i8* %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32*
store i8* %0, i8** %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%13 = load i8*, i8** %7
%14 = load i32, i32* %8
%15 = load i8*, i8** %9
%16 = load i32, i32* %10
%17 = load i32*, i32** %11
%18 = load i32*, i32** %12
%19 = call i32 @vp8_variance(i8* %13, i32 %14, i8* %15, i32 %16, i32 8, i32 8, i32* %17, i32* %18)
%20 = load i32*, i32** %11
%21 = load i32, i32* %20
%22 = load i32*, i32** %12
%23 = load i32, i32* %22
%24 = load i32*, i32** %12
%25 = load i32, i32* %24
%26 = mul nsw i32 %23, %25
%27 = ashr i32 %26, 6
%28 = sub i32 %21, %27
ret i32 %28
}

LLVM IR (-O2):
define i32 @vp8_get8x8var_c(i8* %0, i32 %1, i8* %2, i32 %3, i32* %4, i32* %5) {
%7 = tail call i32 @vp8_variance(i8* %0, i32 %1, i8* %2, i32 %3, i32 8, i32 8, i32* %4, i32* %5)
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = mul nsw i32 %9, %9
%11 = lshr i32 %10, 6
%12 = sub i32 %8, %11
ret i32 %12
}
int putchar(int c __attribute__((unused))) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @putchar(i32 %0) {
ret i32 0
}
/* Variables and functions */
int header_opal_event_log();
int opal_event_summarise_hdr(void) { return header_opal_event_log(); }


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

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

LLVM IR (-O0):
define i32 @opal_event_summarise_hdr() {
%1 = call i32 (...) @header_opal_event_log()
ret i32 %1
}

LLVM IR (-O2):
define i32 @opal_event_summarise_hdr() {
%1 = tail call i32 (...) @header_opal_event_log()
ret i32 %1
}
/* Variables and functions */
int climbStairs(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%d\n", climbStairs(70));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @climbStairs(i32 70)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
unsigned char crc16_low(unsigned short crc) { return crc & 0xFF; }


x86 assembly (clang, -O0):
<crc16_low>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xff,%eax
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @crc16_low(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 255
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @crc16_low(i16 zeroext %0) {
%2 = trunc i16 %0 to i8
ret i8 %2
}
/* Variables and functions */
int errno;
int plexlog_posix_errno_get(void) { return errno; }


x86 assembly (clang, -O0):
<plexlog_posix_errno_get>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<plexlog_posix_errno_get>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @plexlog_posix_errno_get() {
%1 = load i32, i32* @errno
ret i32 %1
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @plexlog_posix_errno_get() {
%1 = load i32, i32* @errno
ret i32 %1
}
/* Variables and functions */
scalar_t__ isPalindrome(int);
int /*<<< orphan*/ printf(char *);
int main() {
  int n = 12321;
  if (isPalindrome(n))
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3021,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <isPalindrome@plt>
cmp    $0x0,%rax
je     1159 <main+0x39>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
jmp    1165 <main+0x45>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3021,%edi
call   1040 <isPalindrome@plt>
test   %rax,%rax
lea    0xecb(%rip),%rax
lea    0xec7(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"Yes\0A\00"
@.str.1 = [4 x i8] c"No\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 12321, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isPalindrome(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret i32 0
}

LLVM IR (-O2):
@str = [3 x i8] c"No\00"
@str.2 = [4 x i8] c"Yes\00"
define i32 @main() {
%1 = tail call i64 @isPalindrome(i32 12321)
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
/* Variables and functions */
size_t stun_align(size_t l) { return (l + 3) & ~3; }


x86 assembly (clang, -O0):
<stun_align>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x3,%rax
and    $0xfffffffffffffffc,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stun_align>:
lea    0x3(%rdi),%rax
and    $0xfffffffffffffffc,%rax
ret

LLVM IR (-O0):
define i64 @stun_align(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 3
%5 = and i64 %4, -4
ret i64 %5
}

LLVM IR (-O2):
define i64 @stun_align(i64 %0) {
%2 = add i64 %0, 3
%3 = and i64 %2, -4
ret i64 %3
}
int connected(int p, int q, int id[]) { return id[p] == id[q]; }


x86 assembly (clang, -O0):
<connected>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
movslq -0x8(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<connected>:
movslq %edi,%rax
mov    (%rdx,%rax,4),%ecx
movslq %esi,%rsi
xor    %eax,%eax
cmp    (%rdx,%rsi,4),%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @connected(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32*, i32** %6
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
%11 = load i32, i32* %10
%12 = load i32*, i32** %6
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = icmp eq i32 %11, %16
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @connected(i32 %0, i32 %1, i32* nocapture %2) {
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds i32, i32* %2, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds i32, i32* %2, i64 %7
%9 = load i32, i32* %8
%10 = icmp eq i32 %6, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
float floating_point_bit_fields_message2_signal2_encode(double value) {
  return (float)(value);
}


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

x86 assembly (clang, -O2):
<floating_point_bit_fields_message2_signal2_encode>:
cvtsd2ss %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define float @floating_point_bit_fields_message2_signal2_encode(double %0) {
%2 = fptrunc double %0 to float
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ __builtin_ia32_loadups(float const *);
__m128 __attribute__((__always___, __nodebug__)) _mm_loadu_ps(const float *p) {
  return __builtin_ia32_loadups(p);
}


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

x86 assembly (clang, -O2):
<_mm_loadu_ps>:
jmp    1030 <__builtin_ia32_loadups@plt>

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

LLVM IR (-O2):
define i32 @_mm_loadu_ps(float* %0) {
%2 = tail call i32 @__builtin_ia32_loadups(float* %0)
ret i32 %2
}
char plugin_format() { return 't'; }


x86 assembly (clang, -O0):
<plugin_format>:
push   %rbp
mov    %rsp,%rbp
mov    $0x74,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<plugin_format>:
mov    $0x74,%al
ret

LLVM IR (-O0):
define signext i8 @plugin_format() {
ret i8 116
}

LLVM IR (-O2):
define signext i8 @plugin_format() {
ret i8 116
}
int test18(int x, int y) {
  int z;
  if (x && y && (z = 1)) {
    return z;
  }
  return 0;
}


x86 assembly (clang, -O0):
<test18>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     113f <test18+0x3f>
cmpl   $0x0,-0xc(%rbp)
je     113f <test18+0x3f>
movl   $0x1,-0x10(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1134 <test18+0x34>
jmp    113f <test18+0x3f>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <test18+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test18>:
test   %edi,%edi
setne  %al
test   %esi,%esi
setne  %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @test18(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void test_builtin_longjmp(void **buffer) { __builtin_longjmp(buffer, 1); }


x86 assembly (clang, -O0):
<test_builtin_longjmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rbp
mov    0x8(%rcx),%rax
mov    0x10(%rcx),%rsp
jmp    *%rax

x86 assembly (clang, -O2):
<test_builtin_longjmp>:
push   %rbp
mov    (%rdi),%rbp
mov    0x8(%rdi),%rax
mov    0x10(%rdi),%rsp
jmp    *%rax

LLVM IR (-O0):
define void @test_builtin_longjmp(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = bitcast i8** %3 to i8*
unreachable
}

LLVM IR (-O2):
define void @test_builtin_longjmp(i8** %0) {
%2 = bitcast i8** %0 to i8*
tail call void @llvm.eh.sjlj.longjmp(i8* %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ TCSBRK;
int ioctl(int, int /*<<< orphan*/, int);
int __libc_tcdrain(int fd) { return ioctl(fd, TCSBRK, 1); }


x86 assembly (clang, -O0):
<__libc_tcdrain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ecb(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__libc_tcdrain>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edx
jmp    1030 <ioctl@plt>

LLVM IR (-O0):
@TCSBRK = global i32 0
define i32 @__libc_tcdrain(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @TCSBRK
%5 = call i32 @ioctl(i32 %3, i32 %4, i32 1)
ret i32 %5
}

LLVM IR (-O2):
@TCSBRK = global i32 0
define i32 @__libc_tcdrain(i32 %0) {
%2 = load i32, i32* @TCSBRK
%3 = tail call i32 @ioctl(i32 %0, i32 %2, i32 1)
ret i32 %3
}
void fn3(int i) { i++; }


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

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

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

LLVM IR (-O2):
define void @fn3(i32 %0) {
ret void
}