xunge/DecIR huggingface dataset:
float foo21(double a, double b, double c) { return (float)(a - b * c); }


x86 assembly (clang, -O0):
<foo21>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo21>:
mulsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @foo21(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = fneg double %8
%11 = call double @llvm.fmuladd.f64(double %10, double %9, double %7)
%12 = fptrunc double %11 to float
ret float %12
}

LLVM IR (-O2):
define float @foo21(double %0, double %1, double %2) {
%4 = fneg double %1
%5 = tail call double @llvm.fmuladd.f64(double %4, double %2, double %0)
%6 = fptrunc double %5 to float
ret float %6
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_fork;
scalar_t__ syscall_0(int /*<<< orphan*/);
pid_t fork(void) {
  pid_t return_code;
  return_code = (pid_t)syscall_0(SYS_fork);
  return return_code;
}


x86 assembly (clang, -O0):
<fork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall_0@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fork>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall_0@plt>

LLVM IR (-O0):
@SYS_fork = global i32 0
define i64 @fork() {
%1 = alloca i64
%2 = load i32, i32* @SYS_fork
%3 = call i64 @syscall_0(i32 %2)
store i64 %3, i64* %1
%4 = load i64, i64* %1
ret i64 %4
}

LLVM IR (-O2):
@SYS_fork = global i32 0
define i64 @fork() {
%1 = load i32, i32* @SYS_fork
%2 = tail call i64 @syscall_0(i32 %1)
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOTTY;
int /*<<< orphan*/ errno;
int tcsetpgrp(int fd, pid_t pgrp) {
  errno = ENOTTY;
  return -1;
}


x86 assembly (clang, -O0):
<tcsetpgrp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ed7(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebe(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@ENOTTY = global i32 0
@errno = global i32 0
define i32 @tcsetpgrp(i32 %0, i32 %1) {
%3 = load i32, i32* @ENOTTY
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
float gfx_getScreenHeight();
scalar_t__ gfx_getScreenWidth();
float gfx_getScrAspect() {
  return (float)gfx_getScreenWidth() / gfx_getScreenHeight();
}


x86 assembly (clang, -O0):
<gfx_getScrAspect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <gfx_getScreenWidth@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <gfx_getScreenHeight@plt>
movaps %xmm0,%xmm1
movss  -0x4(%rbp),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gfx_getScrAspect>:
push   %rax
xor    %eax,%eax
call   1040 <gfx_getScreenWidth@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1030 <gfx_getScreenHeight@plt>
movss  0x4(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @gfx_getScrAspect() {
%1 = call i64 (...) @gfx_getScreenWidth()
%2 = sitofp i64 %1 to float
%3 = call float (...) @gfx_getScreenHeight()
%4 = fdiv float %2, %3
ret float %4
}

LLVM IR (-O2):
define float @gfx_getScrAspect() {
%1 = tail call i64 (...) @gfx_getScreenWidth()
%2 = sitofp i64 %1 to float
%3 = tail call float (...) @gfx_getScreenHeight()
%4 = fdiv float %2, %3
ret float %4
}
void __attribute__((no)) HEX00_strutilsDatInit(void) {}


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

x86 assembly (clang, -O2):
ret

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

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


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

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

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

LLVM IR (-O2):
define void @LK_Key1_scanf() {
ret void
}
int test_imm_75int16_mem(short *val) {
  return ((*val) & (0x75 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_75int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, 117
%7 = icmp ne i32 %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_75int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 117
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ uni();
double get_rand_double(const double xmin, const double xmax) {
  return (xmin + (double)uni() * (xmax - xmin) / (double)1.0);
}


x86 assembly (clang, -O0):
<get_rand_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <uni@plt>
movsd  -0x18(%rbp),%xmm0
cvtsi2sd %rax,%xmm1
movsd  -0x10(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xead(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rand_double>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <uni@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @get_rand_double(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 i64 (...) @uni()
%7 = sitofp i64 %6 to double
%8 = load double, double* %4
%9 = load double, double* %3
%10 = fsub double %8, %9
%11 = fmul double %7, %10
%12 = fdiv double %11, 1.000000e+00
%13 = fadd double %5, %12
ret double %13
}

LLVM IR (-O2):
define double @get_rand_double(double %0, double %1) {
%3 = tail call i64 (...) @uni()
%4 = sitofp i64 %3 to double
%5 = fsub double %1, %0
%6 = fmul double %5, %4
%7 = fadd double %6, %0
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ _Mem_Free(void *, int /*<<< orphan*/, int /*<<< orphan*/,
                             char const *, int);
void CL_AsyncStream_Free(void *data, const char *filename, int fileline) {
  _Mem_Free(data, 0, 0, filename, fileline);
}


x86 assembly (clang, -O0):
<CL_AsyncStream_Free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
xor    %edx,%edx
mov    %edx,%esi
call   1030 <_Mem_Free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CL_AsyncStream_Free>:
mov    %edx,%r8d
mov    %rsi,%rcx
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <_Mem_Free@plt>

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

LLVM IR (-O2):
define void @CL_AsyncStream_Free(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @_Mem_Free(i8* %0, i32 0, i32 0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int rand64();
double rand_uni() { return (rand64() >> 10) * 1. / 18014398509481984.0; }


x86 assembly (clang, -O0):
<rand_uni>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand64@plt>
sar    $0xa,%eax
cvtsi2sd %eax,%xmm0
movsd  0xede(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeca(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_uni>:
push   %rax
xor    %eax,%eax
call   1030 <rand64@plt>
sar    $0xa,%eax
cvtsi2sd %eax,%xmm0
mulsd  0xed9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rand_uni() {
%1 = call i32 (...) @rand64()
%2 = ashr i32 %1, 10
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 1.000000e+00
%5 = fdiv double %4, 0x4350000000000000
ret double %5
}

LLVM IR (-O2):
define double @rand_uni() {
%1 = tail call i32 (...) @rand64()
%2 = ashr i32 %1, 10
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x3C90000000000000
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int main(void) {
  unsigned int x = 4;
  unsigned int y = 2;
  unsigned int z = 2;
  unsigned int a = (x > y) << z;
  printf("a = %d\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x10(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"a = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
int length() {
  char str[20];
  int length;
  printf("Enter the string :\t");
  gets(str);
  length = strlen(str);
  printf("Length of the string is : %d \n", length);
}


x86 assembly (clang, -O0):
<length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<length>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0xeb7(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Enter the string :\09\00"
@.str.1 = [31 x i8] c"Length of the string is : %d \0A\00"
define i32 @length() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%6 = call i32 @gets(i8* %5)
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%8 = call i32 @strlen(i8* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [20 x i8] c"Enter the string :\09\00"
@.str.1 = [31 x i8] c"Length of the string is : %d \0A\00"
define i32 @length() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call i32 @strlen(i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 undef
}
int gotodiff(int x, int y) {
  int rval;
  if (x < y)
    goto less;
  rval = x - y;
  goto done;
less:
  rval = y - x;
done:
  return rval;
}


x86 assembly (clang, -O0):
<gotodiff>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    111b <gotodiff+0x1b>
jmp    1129 <gotodiff+0x29>
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1132 <gotodiff+0x32>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @gotodiff(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = sub nsw i32 %1, %0
%5 = sub nsw i32 %0, %1
%6 = select i1 %3, i32 %4, i32 %5
ret i32 %6
}
char http_url_fromhex(char ch) {
  return (((unsigned)(ch) - '0') < 10) ? ch - '0' : ((ch) | 0x20) - 'a' + 10;
}


x86 assembly (clang, -O0):
<http_url_fromhex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
cmp    $0xa,%eax
jae    1129 <http_url_fromhex+0x29>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1139 <http_url_fromhex+0x39>
movsbl -0x1(%rbp),%eax
or     $0x20,%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_url_fromhex>:
lea    -0x30(%rdi),%ecx
or     $0x20,%dil
add    $0xa9,%dil
cmp    $0xa,%ecx
movzbl %dil,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @http_url_fromhex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub i32 %4, 48
%6 = icmp ult i32 %5, 10
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 48
br label %17
11: ; preds = %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = or i32 %13, 32
%15 = sub nsw i32 %14, 97
%16 = add nsw i32 %15, 10
br label %17
17: ; preds = %11, %7
%18 = phi i32 [ %10, %7 ], [ %16, %11 ]
%19 = trunc i32 %18 to i8
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @http_url_fromhex(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -48
%4 = icmp ult i32 %3, 10
%5 = or i32 %2, 32
%6 = add nsw i32 %5, 169
%7 = select i1 %4, i32 %3, i32 %6
%8 = trunc i32 %7 to i8
ret i8 %8
}
void ff_hevc_put_hevc_epel_h64_8_sse4() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @foo_1_2_1_1_1_2_2_2_2() {
ret void
}
/* Variables and functions */
bool alphabetic(const char c) {
  return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
}


x86 assembly (clang, -O0):
<alphabetic>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <alphabetic+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    114e <alphabetic+0x4e>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x3(%rbp)
jl     1148 <alphabetic+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alphabetic>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @alphabetic(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %20, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 90
br label %18
18: ; preds = %14, %10
%19 = phi i1 [ false, %10 ], [ %17, %14 ]
br label %20
20: ; preds = %18, %6
%21 = phi i1 [ true, %6 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @alphabetic(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ android_memory_barrier();
void android_atomic_acquire_store(int32_t value, volatile int32_t *ptr) {
  *ptr = value;
  android_memory_barrier();
}


x86 assembly (clang, -O0):
<android_atomic_acquire_store>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1030 <android_memory_barrier@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<android_atomic_acquire_store>:
mov    %edi,(%rsi)
xor    %eax,%eax
jmp    1030 <android_memory_barrier@plt>

LLVM IR (-O0):
define void @android_atomic_acquire_store(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
store volatile i32 %5, i32* %6
%7 = call i32 (...) @android_memory_barrier()
ret void
}

LLVM IR (-O2):
define void @android_atomic_acquire_store(i32 %0, i32* %1) {
store volatile i32 %0, i32* %1
%3 = tail call i32 (...) @android_memory_barrier()
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
int isdir(const char *path) {
  struct stat statbuf;
  if (stat(path, &statbuf) != 0) {
    return 1;
  } else {
    if (S_ISDIR(statbuf.st_mode) == 0) {
      return 1;
    } else {
      return 0;
    }
  }
}


x86 assembly (clang, -O0):
<isdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
je     114f <isdir+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1174 <isdir+0x54>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
jne    116d <isdir+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1174 <isdir+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <isdir+0x18>
pop    %rcx
ret
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @isdir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %2
br label %16
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i64 @S_ISDIR(i32 %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %9
store i32 1, i32* %2
br label %16
15: ; preds = %9
store i32 0, i32* %2
br label %16
16: ; preds = %15, %14, %8
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @isdir(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISDIR(i32 %8)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 1, %1 ], [ %11, %6 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int manipulateStream(char *byteStream, int length) {
  printf("Called manipulateStream\n");
  return 1;
}


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

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

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

LLVM IR (-O2):
@str = [24 x i8] c"Called manipulateStream\00"
define i32 @manipulateStream(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll37(struct __test_metadata *);
void wrapper_epoll37(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll37(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll37>:
jmp    1030 <epoll37@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll37(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll37(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll37(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll37(%struct.__test_metadata* %0)
ret void
}
double Sqr(double v) { return v * v; }


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

x86 assembly (clang, -O2):
<Sqr>:
mulsd  %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define double @Sqr(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
void print_addr_hex(uint8_t *addr) {
  printf("%x:%x:%x:%x\n", addr[0], addr[1], addr[2], addr[3]);
}


x86 assembly (clang, -O0):
<print_addr_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%r8d
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_addr_hex>:
mov    (%rdi),%esi
mov    0x4(%rdi),%edx
mov    0x8(%rdi),%ecx
mov    0xc(%rdi),%r8d
lea    0xedd(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"%x:%x:%x:%x\0A\00"
define void @print_addr_hex(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %0, i64 3
%8 = load i32, i32* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 %6, i32 %8)
ret void
}
/* Type definitions */
struct goertzel_d {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ goertzel_d_feed_one(struct goertzel_d *, unsigned char);
void goertzel_d_feed(struct goertzel_d *s, unsigned char *samples,
                     size_t sample_bytes) {
  size_t i;
  for (i = 0; i < sample_bytes; i++)
    goertzel_d_feed_one(s, samples[i]);
}


x86 assembly (clang, -O0):
<goertzel_d_feed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1160 <goertzel_d_feed+0x50>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%esi
call   1030 <goertzel_d_feed_one@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <goertzel_d_feed+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<goertzel_d_feed>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdx,%rdx
je     1146 <goertzel_d_feed+0x36>
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movzbl (%r14,%rbx,1),%esi
mov    %r15,%rdi
call   1030 <goertzel_d_feed_one@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <goertzel_d_feed+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.goertzel_d = type { i32 }
define void @goertzel_d_feed(%struct.goertzel_d* %0, i8* %1, i64 %2) {
%4 = alloca %struct.goertzel_d*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store %struct.goertzel_d* %0, %struct.goertzel_d** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
store i64 0, i64* %7
br label %8
8: ; preds = %19, %3
%9 = load i64, i64* %7
%10 = load i64, i64* %6
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = load %struct.goertzel_d*, %struct.goertzel_d** %4
%14 = load i8*, i8** %5
%15 = load i64, i64* %7
%16 = getelementptr inbounds i8, i8* %14, i64 %15
%17 = load i8, i8* %16
%18 = call i32 @goertzel_d_feed_one(%struct.goertzel_d* %13, i8 zeroext %17)
br label %19
19: ; preds = %12
%20 = load i64, i64* %7
%21 = add i64 %20, 1
store i64 %21, i64* %7
br label %8
22: ; preds = %8
ret void
}

LLVM IR (-O2):
%struct.goertzel_d = type { i32 }
define void @goertzel_d_feed(%struct.goertzel_d* %0, i8* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %12, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %10, %5 ], [ 0, %3 ]
%7 = getelementptr inbounds i8, i8* %1, i64 %6
%8 = load i8, i8* %7
%9 = tail call i32 @goertzel_d_feed_one(%struct.goertzel_d* %0, i8 zeroext %8)
%10 = add nuw i64 %6, 1
%11 = icmp eq i64 %10, %2
br i1 %11, label %12, label %5
12: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void tjoho2(int a) {
  if (a)
    printf("Hej\n");
}


x86 assembly (clang, -O0):
<tjoho2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1131 <tjoho2+0x21>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tjoho2>:
test   %edi,%edi
je     1120 <tjoho2+0x10>
lea    0xee5(%rip),%rdi
jmp    1030 <puts@plt>
ret

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

LLVM IR (-O2):
@str = [4 x i8] c"Hej\00"
define void @tjoho2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void help(void) {
  printf("[Usage]:\n"
         "	serialtool [device] -b[bound rate] -d[databits] -s[stopbits] "
         "-p[parity]\n"
         "		[device]:\tSystem Device number.\n"
         "\t\t\tNote:This program will NOT CHECK this information\n"
         "		-b[boundrate]..As you See, choose 1200, 2400, 4800, "
         "9600, 19200, 38400, 57600, 115200\n"
         "		-d[databits] Choose 7 or 8\n"
         "		-s[stopbits] Choose 1 or 2\n"
         "		-p[parity] The Parity, choose N(None), E(Even Parity), "
         "O(Odd Parity)\n");
  exit(0);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [387 x i8] c"[Usage]:\0A\09serialtool [device] -b[bound rate] -d[databits] -s[stopbits] -p[parity]\0A\09\09[device]:\09System Device number.\0A\09\09\09Note:This program will NOT CHECK this information\0A\09\09-b[boundrate]..As you See, choose 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200\0A\09\09-d[databits] Choose 7 or 8\0A\09\09-s[stopbits] Choose 1 or 2\0A\09\09-p[parity] The Parity, choose N(None), E(Even Parity), O(Odd Parity)\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([387 x i8], [387 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [386 x i8] c"[Usage]:\0A\09serialtool [device] -b[bound rate] -d[databits] -s[stopbits] -p[parity]\0A\09\09[device]:\09System Device number.\0A\09\09\09Note:This program will NOT CHECK this information\0A\09\09-b[boundrate]..As you See, choose 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200\0A\09\09-d[databits] Choose 7 or 8\0A\09\09-s[stopbits] Choose 1 or 2\0A\09\09-p[parity] The Parity, choose N(None), E(Even Parity), O(Odd Parity)\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([386 x i8], [386 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
int b_entry() {
  int *p = (int *)(&b_entry) - 1;
  return *p;
}


x86 assembly (clang, -O0):
<b_entry>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @b_entry() {
%1 = alloca i32*
store i32* getelementptr inbounds (i32, i32* bitcast (i32 ()* @b_entry to i32*), i64 -1), i32** %1
%2 = load i32*, i32** %1
%3 = load i32, i32* %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @b_entry() {
%1 = load i32, i32* getelementptr inbounds (i32, i32* bitcast (i32 ()* @b_entry to i32*), i64 -1)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ __off_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int posix_fallocate(int fd, __off_t offset, __off_t len) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<posix_fallocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_fallocate>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @posix_fallocate(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* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @posix_fallocate(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
size_t stdc_FCAC2E8E(int /*<<< orphan*/ *, char const *, size_t);
size_t mbstowcs(wchar_t *dest, const char *src, size_t max) {
  return stdc_FCAC2E8E(dest, src, max);
}


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

x86 assembly (clang, -O2):
<mbstowcs>:
jmp    1030 <stdc_FCAC2E8E@plt>

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

LLVM IR (-O2):
define i64 @mbstowcs(i32* %0, i8* %1, i64 %2) {
%4 = tail call i64 @stdc_FCAC2E8E(i32* %0, i8* %1, i64 %2)
ret i64 %4
}
int test_imm_FDuint32_reg(unsigned int val) {
  return ((val) & (0xFD << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_FDuint32_reg(i32 %0) {
%2 = and i32 %0, 253
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ handle_MSG(int /*<<< orphan*/);
int gen_MSG() { handle_MSG(0); }


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

x86 assembly (clang, -O2):
<gen_MSG>:
xor    %edi,%edi
jmp    1030 <handle_MSG@plt>

LLVM IR (-O0):
define i32 @gen_MSG() {
%1 = alloca i32
%2 = call i32 @handle_MSG(i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @gen_MSG() {
%1 = tail call i32 @handle_MSG(i32 0)
ret i32 undef
}
/* Variables and functions */
long LONG_MIN;
long lgc(long n) {
  if (n < 1)
    return LONG_MIN;
  else if (n == 1)
    return 0;
  long x = 1, l = 0;
  while (x < n) {
    x <<= 1;
    l++;
  }
  return l;
}


x86 assembly (clang, -O0):
<lgc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x1,-0x10(%rbp)
jge    1126 <lgc+0x26>
mov    0x2ece(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1186 <lgc+0x86>
cmpq   $0x1,-0x10(%rbp)
jne    113e <lgc+0x3e>
movq   $0x0,-0x8(%rbp)
jmp    1186 <lgc+0x86>
jmp    1143 <lgc+0x43>
movq   $0x1,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    117e <lgc+0x7e>
mov    -0x18(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1153 <lgc+0x53>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lgc>:
test   %rdi,%rdi
jle    110e <lgc+0xe>
cmp    $0x1,%rdi
jne    1119 <lgc+0x19>
xor    %eax,%eax
ret
mov    0x2ed3(%rip),%rax
mov    (%rax),%rax
ret
mov    $0x1,%ecx
xor    %eax,%eax
add    %rcx,%rcx
add    $0x1,%rax
cmp    %rdi,%rcx
jl     1120 <lgc+0x20>
ret

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

LLVM IR (-O2):
@LONG_MIN = global i64 0
define i64 @lgc(i64 %0) {
%2 = icmp slt i64 %0, 1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = load i64, i64* @LONG_MIN
br label %13
5: ; preds = %1
%6 = icmp eq i64 %0, 1
br i1 %6, label %13, label %7
7: ; preds = %5, %7
%8 = phi i64 [ %11, %7 ], [ 0, %5 ]
%9 = phi i64 [ %10, %7 ], [ 1, %5 ]
%10 = shl i64 %9, 1
%11 = add nuw nsw i64 %8, 1
%12 = icmp slt i64 %10, %0
br i1 %12, label %7, label %13
13: ; preds = %7, %5, %3
%14 = phi i64 [ %4, %3 ], [ 0, %5 ], [ %11, %7 ]
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ br_info_set(char const *);
int /*<<< orphan*/ iptables_set();
int set_vpls_bridge(const char *br_name) {
  br_info_set(br_name);
  iptables_set();
  return 0;
}


x86 assembly (clang, -O0):
<set_vpls_bridge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <br_info_set@plt>
mov    $0x0,%al
call   1030 <iptables_set@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_vpls_bridge>:
push   %rax
call   1040 <br_info_set@plt>
xor    %eax,%eax
call   1030 <iptables_set@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @set_vpls_bridge(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @br_info_set(i8* %3)
%5 = call i32 (...) @iptables_set()
ret i32 0
}

LLVM IR (-O2):
define i32 @set_vpls_bridge(i8* %0) {
%2 = tail call i32 @br_info_set(i8* %0)
%3 = tail call i32 (...) @iptables_set()
ret i32 0
}
void ff_hevc_put_hevc_uni_qpel_hv32_10_avx2() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xc9\00"
define void @t_isgraph_0xc9() {
%1 = tail call i64 @isgraph(i32 201)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1010, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
__attribute__((no, noclone)) void f(int *qi, double *qd) {
  int i = *qi;
  *qd = 0;
  *qi = i;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movq   $0x0,(%rsi)
ret

LLVM IR (-O0):
define void @f(i32* %0, double* %1) {
%3 = alloca i32*
%4 = alloca double*
%5 = alloca i32
store i32* %0, i32** %3
store double* %1, double** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load double*, double** %4
store double 0.000000e+00, double* %8
%9 = load i32, i32* %5
%10 = load i32*, i32** %3
store i32 %9, i32* %10
ret void
}

LLVM IR (-O2):
define void @f(i32* nocapture %0, double* nocapture writeonly %1) {
store double 0.000000e+00, double* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execve(char *, char *, int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  execve("bash", "ls", NULL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
lea    0xed1(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <execve@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"bash\00"
@.str.1 = [3 x i8] c"ls\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @execve(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret i32 0
}