xunge/DecIR huggingface dataset:
double calcMeanObliquityOfEcliptic(const double t) {
  double seconds;
  double e0;
  seconds = 21.448 - t * (46.8150 + t * (0.00059 - t * (0.001813)));
  e0 = 23.0 + (26.0 + (seconds / 60.0)) / 60.0;
  return e0;
}


x86 assembly (clang, -O0):
<calcMeanObliquityOfEcliptic>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
movsd  0xef1(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xeed(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xecd(%rip),%xmm2
addsd  %xmm2,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe9e(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe78(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe74(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xe60(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xe4c(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcMeanObliquityOfEcliptic>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef0(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xeec(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0xee8(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  0xee4(%rip),%xmm0
divsd  %xmm1,%xmm0
addsd  0xee0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @calcMeanObliquityOfEcliptic(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = load double, double* %2
%7 = load double, double* %2
%8 = fneg double %7
%9 = call double @llvm.fmuladd.f64(double %8, double 1.813000e-03, double 5.900000e-04)
%10 = call double @llvm.fmuladd.f64(double %6, double %9, double 4.681500e+01)
%11 = fneg double %5
%12 = call double @llvm.fmuladd.f64(double %11, double %10, double 2.144800e+01)
store double %12, double* %3
%13 = load double, double* %3
%14 = fdiv double %13, 6.000000e+01
%15 = fadd double 2.600000e+01, %14
%16 = fdiv double %15, 6.000000e+01
%17 = fadd double 2.300000e+01, %16
store double %17, double* %4
%18 = load double, double* %4
ret double %18
}

LLVM IR (-O2):
define double @calcMeanObliquityOfEcliptic(double %0) {
%2 = fneg double %0
%3 = tail call double @llvm.fmuladd.f64(double %2, double 1.813000e-03, double 5.900000e-04)
%4 = tail call double @llvm.fmuladd.f64(double %0, double %3, double 4.681500e+01)
%5 = tail call double @llvm.fmuladd.f64(double %2, double %4, double 2.144800e+01)
%6 = fdiv double %5, 6.000000e+01
%7 = fadd double %6, 2.600000e+01
%8 = fdiv double %7, 6.000000e+01
%9 = fadd double %8, 2.300000e+01
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ free_str(char const *);
char *str_dup(char const *);
void free_str_dup(const char **pstr, const char *nstr) {
  if (pstr == NULL) {
    return;
  }
  free_str(*pstr);
  *pstr = str_dup(nstr);
}


x86 assembly (clang, -O0):
<free_str_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1140 <free_str_dup+0x20>
jmp    115f <free_str_dup+0x3f>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free_str@plt>
mov    -0x10(%rbp),%rdi
call   1040 <str_dup@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_str_dup>:
test   %rdi,%rdi
je     1149 <free_str_dup+0x29>
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free_str@plt>
mov    %r14,%rdi
call   1040 <str_dup@plt>
mov    %rax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @free_str_dup(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8**, i8*** %3
%6 = icmp eq i8** %5, null
br i1 %6, label %7, label %8
7: ; preds = %2
br label %15
8: ; preds = %2
%9 = load i8**, i8*** %3
%10 = load i8*, i8** %9
%11 = call i32 @free_str(i8* %10)
%12 = load i8*, i8** %4
%13 = call i8* @str_dup(i8* %12)
%14 = load i8**, i8*** %3
store i8* %13, i8** %14
br label %15
15: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
define void @free_str_dup(i8** %0, i8* %1) {
%3 = icmp eq i8** %0, null
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i8*, i8** %0
%6 = tail call i32 @free_str(i8* %5)
%7 = tail call i8* @str_dup(i8* %1)
store i8* %7, i8** %0
br label %8
8: ; preds = %2, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ sastantua(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  if (argc != 2)
    return (0);
  sastantua(atoi(argv[1]));
  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)
cmpl   $0x2,-0x8(%rbp)
je     114c <main+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1167 <main+0x47>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1030 <sastantua@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jne    113a <main+0x1a>
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1030 <sastantua@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = tail call i32 @sastantua(i32 %7)
br label %9
9: ; preds = %2, %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
main() {
  char a = 'A';
  if ((a == 'Z') || ((a = 'L') && (a == 'A')))
    ;
  a = a;
  printf("%c", a);
  printf(" Nothing ");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
je     1150 <main+0x40>
movb   $0x4c,-0x5(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1143 <main+0x33>
jmp    1155 <main+0x45>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jne    1155 <main+0x45>
jmp    1155 <main+0x45>
mov    -0x5(%rbp),%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%esi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [10 x i8] c" Nothing \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 65, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 90
br i1 %5, label %11, label %6
6: ; preds = %0
store i8 76, i8* %2
br i1 true, label %7, label %12
7: ; preds = %6
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 65
br i1 %10, label %11, label %12
11: ; preds = %7, %0
br label %12
12: ; preds = %11, %7, %6
%13 = load i8, i8* %2
store i8 %13, i8* %2
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c" Nothing \00"
define i32 @main() {
%1 = tail call i32 @putchar(i32 76)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
long long PAPI_get_real_usec();
void PAPIF_GET_REAL_USEC(long long *time) { *time = PAPI_get_real_usec(); }


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

x86 assembly (clang, -O2):
<PAPIF_GET_REAL_USEC>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <PAPI_get_real_usec@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @PAPIF_GET_REAL_USEC(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = call i64 (...) @PAPI_get_real_usec()
%4 = load i64*, i64** %2
store i64 %3, i64* %4
ret void
}

LLVM IR (-O2):
define void @PAPIF_GET_REAL_USEC(i64* nocapture writeonly %0) {
%2 = tail call i64 (...) @PAPI_get_real_usec()
store i64 %2, i64* %0
ret void
}
void vectorMA(float out[3], const float org[3], float s, const float move[3]) {
  int i;
  for (i = 0; i < 3; i++) {
    out[i] = org[i] + s * move[i];
  }
}


x86 assembly (clang, -O0):
<vectorMA>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x3,-0x24(%rbp)
jge    1168 <vectorMA+0x68>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
movss  -0x14(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    111c <vectorMA+0x1c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vectorMA>:
movss  (%rdx),%xmm1
mulss  %xmm0,%xmm1
addss  (%rsi),%xmm1
movss  %xmm1,(%rdi)
movss  0x4(%rdx),%xmm1
mulss  %xmm0,%xmm1
addss  0x4(%rsi),%xmm1
movss  %xmm1,0x4(%rdi)
mulss  0x8(%rdx),%xmm0
addss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @vectorMA(float* %0, float* %1, float %2, float* %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca float
%8 = alloca float*
%9 = alloca i32
store float* %0, float** %5
store float* %1, float** %6
store float %2, float* %7
store float* %3, float** %8
store i32 0, i32* %9
br label %10
10: ; preds = %30, %4
%11 = load i32, i32* %9
%12 = icmp slt i32 %11, 3
br i1 %12, label %13, label %33
13: ; preds = %10
%14 = load float*, float** %6
%15 = load i32, i32* %9
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds float, float* %14, i64 %16
%18 = load float, float* %17
%19 = load float, float* %7
%20 = load float*, float** %8
%21 = load i32, i32* %9
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds float, float* %20, i64 %22
%24 = load float, float* %23
%25 = call float @llvm.fmuladd.f32(float %19, float %24, float %18)
%26 = load float*, float** %5
%27 = load i32, i32* %9
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds float, float* %26, i64 %28
store float %25, float* %29
br label %30
30: ; preds = %13
%31 = load i32, i32* %9
%32 = add nsw i32 %31, 1
store i32 %32, i32* %9
br label %10
33: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @vectorMA(float* nocapture writeonly %0, float* nocapture %1, float %2, float* nocapture %3) {
%5 = load float, float* %1
%6 = load float, float* %3
%7 = tail call float @llvm.fmuladd.f32(float %2, float %6, float %5)
store float %7, float* %0
%8 = getelementptr inbounds float, float* %1, i64 1
%9 = load float, float* %8
%10 = getelementptr inbounds float, float* %3, i64 1
%11 = load float, float* %10
%12 = tail call float @llvm.fmuladd.f32(float %2, float %11, float %9)
%13 = getelementptr inbounds float, float* %0, i64 1
store float %12, float* %13
%14 = getelementptr inbounds float, float* %1, i64 2
%15 = load float, float* %14
%16 = getelementptr inbounds float, float* %3, i64 2
%17 = load float, float* %16
%18 = tail call float @llvm.fmuladd.f32(float %2, float %17, float %15)
%19 = getelementptr inbounds float, float* %0, i64 2
store float %18, float* %19
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("hello \n"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"hello \0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [7 x i8] c"hello \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int scan_for_uintN(char const *, int, unsigned long long *, char const **);
int scan_for_uint32(const char *_str, unsigned int *ret_, const char **end_) {
  unsigned long long ret;
  int b_err = scan_for_uintN(_str, 32, &ret, end_);
  if (ret_) {
    *ret_ = (unsigned int)ret;
  }
  return b_err;
}


x86 assembly (clang, -O0):
<scan_for_uint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x20,%esi
lea    -0x20(%rbp),%rdx
call   1030 <scan_for_uintN@plt>
mov    %eax,-0x24(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1154 <scan_for_uint32+0x44>
mov    -0x20(%rbp),%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_for_uint32>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rcx
mov    %rsi,%rbx
lea    0x8(%rsp),%rdx
mov    $0x20,%esi
call   1030 <scan_for_uintN@plt>
test   %rbx,%rbx
je     1135 <scan_for_uint32+0x25>
mov    0x8(%rsp),%ecx
mov    %ecx,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @scan_for_uint32(i8* %0, i32* writeonly %1, i8** %2) {
%4 = alloca i64
%5 = bitcast i64* %4 to i8*
%6 = call i32 @scan_for_uintN(i8* %0, i32 32, i64* %4, i8** %2)
%7 = icmp eq i32* %1, null
br i1 %7, label %11, label %8
8: ; preds = %3
%9 = load i64, i64* %4
%10 = trunc i64 %9 to i32
store i32 %10, i32* %1
br label %11
11: ; preds = %8, %3
ret i32 %6
}
int execute_iopl() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_iopl() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
long Debug_memory_MINUS_balance() {
  printf("Error - calling 'memory-balance' without compiling with LOG_MEMORY "
         "enabled.\n");
  exit(1);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [77 x i8] c"Error - calling 'memory-balance' without compiling with LOG_MEMORY enabled.\0A\00"
define i64 @Debug_memory_MINUS_balance() {
%1 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [76 x i8] c"Error - calling 'memory-balance' without compiling with LOG_MEMORY enabled.\00"
define i64 @Debug_memory_MINUS_balance() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
int unit_test_adder(int source, int target) { return source + target; }


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

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

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

LLVM IR (-O2):
define i32 @unit_test_adder(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
int udfexample_ver() { return 8; }


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

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

LLVM IR (-O0):
define i32 @udfexample_ver() {
ret i32 8
}

LLVM IR (-O2):
define i32 @udfexample_ver() {
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ dizi_eleman_basma(int *, int);
int dizi_eleman_topla(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int dizi[15] = {1, 32, 549, 87, 65, 1, 312, 648, 641, 3, 25, 153, 15, 3, 74};
  dizi_eleman_basma(dizi, 15);
  int toplam;
  toplam = dizi_eleman_topla(dizi, 15);
  printf("\nDizimizin elemanlarinin toplami = %d", toplam);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xea6(%rip),%rsi
mov    $0x3c,%edx
call   1060 <memcpy@plt>
lea    -0x40(%rbp),%rdi
mov    $0xf,%esi
call   1050 <dizi_eleman_basma@plt>
lea    -0x40(%rbp),%rdi
mov    $0xf,%esi
call   1030 <dizi_eleman_topla@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
movups 0xef0(%rip),%xmm0
movups %xmm0,0x2c(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea0(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xf,%esi
call   1050 <dizi_eleman_basma@plt>
mov    %rbx,%rdi
mov    $0xf,%esi
call   1030 <dizi_eleman_topla@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.dizi = [15 x i32] [i32 1, i32 32, i32 549, i32 87, i32 65, i32 1, i32 312, i32 648, i32 641, i32 3, i32 25, i32 153, i32 15, i32 3, i32 74]
@.str = [38 x i8] c"\0ADizimizin elemanlarinin toplami = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [15 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [15 x i32]* %2 to i8*
%5 = getelementptr inbounds [15 x i32], [15 x i32]* %2, i64 0, i64 0
%6 = call i32 @dizi_eleman_basma(i32* %5, i32 15)
%7 = getelementptr inbounds [15 x i32], [15 x i32]* %2, i64 0, i64 0
%8 = call i32 @dizi_eleman_topla(i32* %7, i32 15)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.dizi = [15 x i32] [i32 1, i32 32, i32 549, i32 87, i32 65, i32 1, i32 312, i32 648, i32 641, i32 3, i32 25, i32 153, i32 15, i32 3, i32 74]
@.str = [38 x i8] c"\0ADizimizin elemanlarinin toplami = %d\00"
define i32 @main() {
%1 = alloca [15 x i32]
%2 = bitcast [15 x i32]* %1 to i8*
%3 = getelementptr inbounds [15 x i32], [15 x i32]* %1, i64 0, i64 0
%4 = call i32 @dizi_eleman_basma(i32* %3, i32 15)
%5 = call i32 @dizi_eleman_topla(i32* %3, i32 15)
%6 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int myrange01(float x) {
  uint32_t bin = *(uint32_t *)&x;
  if ((bin & 0x7fffffff) == 0)
    return 1;
  if ((bin & 0x80000000) == 0x80000000)
    return 0;
  if (bin > 0x3f800000)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<myrange01>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x7fffffff,%eax
cmp    $0x0,%eax
jne    112c <myrange01+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    116b <myrange01+0x6b>
mov    -0xc(%rbp),%eax
and    $0x80000000,%eax
cmp    $0x80000000,%eax
jne    114b <myrange01+0x4b>
movl   $0x0,-0x4(%rbp)
jmp    116b <myrange01+0x6b>
cmpl   $0x3f800000,-0xc(%rbp)
jle    1164 <myrange01+0x64>
movl   $0x0,-0x4(%rbp)
jmp    116b <myrange01+0x6b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrange01>:
movd   %xmm0,%ecx
test   $0x7fffffff,%ecx
je     111c <myrange01+0x1c>
xor    %eax,%eax
test   %ecx,%ecx
js     111b <myrange01+0x1b>
cmp    $0x3f800001,%ecx
setb   %al
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @myrange01(float %0) {
%2 = alloca i32
%3 = alloca float
%4 = alloca i32
store float %0, float* %3
%5 = bitcast float* %3 to i32*
%6 = load i32, i32* %5
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = and i32 %7, 2147483647
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 1, i32* %2
br label %21
11: ; preds = %1
%12 = load i32, i32* %4
%13 = and i32 %12, -2147483648
%14 = icmp eq i32 %13, -2147483648
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 0, i32* %2
br label %21
16: ; preds = %11
%17 = load i32, i32* %4
%18 = icmp sgt i32 %17, 1065353216
br i1 %18, label %19, label %20
19: ; preds = %16
store i32 0, i32* %2
br label %21
20: ; preds = %16
store i32 1, i32* %2
br label %21
21: ; preds = %20, %19, %15, %10
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @myrange01(float %0) {
%2 = bitcast float %0 to i32
%3 = and i32 %2, 2147483647
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = icmp slt i32 %2, 0
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = icmp ult i32 %2, 1065353217
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %7, %5, %1
%11 = phi i32 [ 1, %1 ], [ 0, %5 ], [ %9, %7 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: usernetctl <interface-config> <up|down|report>\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [55 x i8] c"usage: usernetctl <interface-config> <up|down|report>\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [55 x i8] c"usage: usernetctl <interface-config> <up|down|report>\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct termp {
  int dummy;
};

/* Variables and functions */
size_t term_strlen(struct termp const *, char const *);
size_t term_tbl_strlen(const char *p, void *arg) {
  return (term_strlen((const struct termp *)arg, p));
}


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

x86 assembly (clang, -O2):
<term_tbl_strlen>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <term_strlen@plt>

LLVM IR (-O0):
%struct.termp = type { i32 }
define i64 @term_tbl_strlen(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to %struct.termp*
%7 = load i8*, i8** %3
%8 = call i64 @term_strlen(%struct.termp* %6, i8* %7)
ret i64 %8
}

LLVM IR (-O2):
%struct.termp = type { i32 }
define i64 @term_tbl_strlen(i8* %0, i8* %1) {
%3 = bitcast i8* %1 to %struct.termp*
%4 = tail call i64 @term_strlen(%struct.termp* %3, i8* %0)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ pthread_barrier_init;
int main(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
  (void)pthread_barrier_init;
  exit(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)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@pthread_barrier_init = global i32 0
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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = load i32, i32* @pthread_barrier_init
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@pthread_barrier_init = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @exit(i32 0)
unreachable
}
int test_imm_BBuint16_mem(unsigned short *val) {
  return ((*val) & (0xBB << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_BBuint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, 187
%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_BBuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 187
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
double cos(double);
double SDL_cos(double x) { return cos(x); }


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

x86 assembly (clang, -O2):
<SDL_cos>:
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define double @SDL_cos(double %0) {
%2 = tail call double @cos(double %0)
ret double %2
}
void vhddRefresh() {}


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

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

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

LLVM IR (-O2):
define void @vhddRefresh() {
ret void
}
void rop3_243_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = ~S;
  stk1 = T | stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_243_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_243_1_0>:
not    %sil
or     %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_243_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = xor i32 %10, -1
%12 = trunc i32 %11 to i8
store i8 %12, i8* %8
%13 = load i8, i8* %6
%14 = zext i8 %13 to i32
%15 = load i8, i8* %8
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
%18 = trunc i32 %17 to i8
store i8 %18, i8* %7
%19 = load i8, i8* %7
%20 = zext i8 %19 to i32
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = xor i32 %22, -1
%24 = and i32 %20, %23
%25 = load i8*, i8** %4
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = and i32 %27, %29
%31 = or i32 %24, %30
%32 = trunc i32 %31 to i8
%33 = load i8*, i8** %4
store i8 %32, i8* %33
ret void
}

LLVM IR (-O2):
define void @rop3_243_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, -1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
store i8 %6, i8* %0
ret void
}
int fib(int a) {
  if (a == 0 || a == 1) {
    return 1;
  }
  return fib(a - 1) + fib(a - 2);
}


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

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

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fib(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %8, 2
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i32 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ _outsb(void *, void const *, unsigned long);
void iowrite8_rep(void *addr, const void *src, unsigned long count) {
  _outsb(addr, src, count);
}


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

x86 assembly (clang, -O2):
<iowrite8_rep>:
jmp    1030 <_outsb@plt>

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

LLVM IR (-O2):
define void @iowrite8_rep(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @_outsb(i8* %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
scalar_t__ getch();
char ushell_getc() { return (char)getch(); }


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

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

LLVM IR (-O0):
define signext i8 @ushell_getc() {
%1 = call i64 (...) @getch()
%2 = trunc i64 %1 to i8
ret i8 %2
}

LLVM IR (-O2):
define signext i8 @ushell_getc() {
%1 = tail call i64 (...) @getch()
%2 = trunc i64 %1 to i8
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int func2(int a) {
  assert(0);
  return a + 10;
}


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

x86 assembly (clang, -O2):
<func2>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1030 <assert@plt>
add    $0xa,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @func2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @assert(i32 0)
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 10
ret i32 %5
}

LLVM IR (-O2):
define i32 @func2(i32 %0) {
%2 = tail call i32 @assert(i32 0)
%3 = add nsw i32 %0, 10
ret i32 %3
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int tv_subtract(struct timeval const *, struct timeval const *, int);
int tv_within_sigma(const struct timeval *t1, const struct timeval *t2,
                    unsigned int sigma) {
  const int delta = tv_subtract(t1, t2, 600);
  return -(int)sigma <= delta && delta <= (int)sigma;
}


x86 assembly (clang, -O0):
<tv_within_sigma>:
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),%rsi
mov    $0x258,%edx
call   1030 <tv_subtract@plt>
mov    %eax,-0x18(%rbp)
xor    %ecx,%ecx
sub    -0x14(%rbp),%ecx
xor    %eax,%eax
cmp    -0x18(%rbp),%ecx
mov    %al,-0x19(%rbp)
jg     1157 <tv_within_sigma+0x47>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
setle  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tv_within_sigma>:
push   %rbx
mov    %edx,%ebx
mov    $0x258,%edx
call   1030 <tv_subtract@plt>
mov    %ebx,%ecx
neg    %ecx
cmp    %ecx,%eax
setge  %cl
cmp    %ebx,%eax
setle  %al
and    %cl,%al
movzbl %al,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @tv_within_sigma(%struct.timeval* %0, %struct.timeval* %1, i32 %2) {
%4 = alloca %struct.timeval*
%5 = alloca %struct.timeval*
%6 = alloca i32
%7 = alloca i32
store %struct.timeval* %0, %struct.timeval** %4
store %struct.timeval* %1, %struct.timeval** %5
store i32 %2, i32* %6
%8 = load %struct.timeval*, %struct.timeval** %4
%9 = load %struct.timeval*, %struct.timeval** %5
%10 = call i32 @tv_subtract(%struct.timeval* %8, %struct.timeval* %9, i32 600)
store i32 %10, i32* %7
%11 = load i32, i32* %6
%12 = sub nsw i32 0, %11
%13 = load i32, i32* %7
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %19
15: ; preds = %3
%16 = load i32, i32* %7
%17 = load i32, i32* %6
%18 = icmp sle i32 %16, %17
br label %19
19: ; preds = %15, %3
%20 = phi i1 [ false, %3 ], [ %18, %15 ]
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @tv_within_sigma(%struct.timeval* %0, %struct.timeval* %1, i32 %2) {
%4 = tail call i32 @tv_subtract(%struct.timeval* %0, %struct.timeval* %1, i32 600)
%5 = sub nsw i32 0, %2
%6 = icmp sge i32 %4, %5
%7 = icmp sle i32 %4, %2
%8 = and i1 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *);
int iface1_ver1_constructor(void *context) {
  printf("B - version 1 constructor context %p\n", context);
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"B - version 1 constructor context %p\0A\00"
define i32 @iface1_ver1_constructor(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"B - version 1 constructor context %p\0A\00"
define i32 @iface1_ver1_constructor(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ lt_fatal(char *, int, char *);
scalar_t__ malloc(size_t);
void *xmalloc(size_t num) {
  void *p = (void *)malloc(num);
  if (!p)
    lt_fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/repstd/modified_vlc/refs/heads/master/"
             "bin/.libs/lt-vlc.c",
             332, "memory exhausted");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115c <xmalloc+0x3c>
lea    0xeb5(%rip),%rdi
mov    $0x14c,%esi
lea    0xf3c(%rip),%rdx
call   1030 <lt_fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <xmalloc+0x26>
lea    0xecb(%rip),%rdi
lea    0xf57(%rip),%rdx
mov    $0x14c,%esi
call   1030 <lt_fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/repstd/modified_vlc/refs/heads/master/bin/.libs/lt-vlc.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @lt_fatal(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 332, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/repstd/modified_vlc/refs/heads/master/bin/.libs/lt-vlc.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @lt_fatal(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 332, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}
void grpc_register_security_filters(void) {}


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

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

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

LLVM IR (-O2):
define void @grpc_register_security_filters() {
ret void
}
int linestartswidth(line, needle)
char *line;
char *needle;
{
  while (isspace(*line))
    line++;
  return (strncmp(line, needle, strlen(needle)) == 0);
}


x86 assembly (clang, -O0):
<linestartswidth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1050 <isspace@plt>
cmp    $0x0,%eax
je     1166 <linestartswidth+0x36>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1140 <linestartswidth+0x10>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linestartswidth>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
xchg   %ax,%ax
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1050 <isspace@plt>
test   %eax,%eax
jne    1140 <linestartswidth+0x10>
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @linestartswidth(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %9, %3 ]
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = tail call i32 @isspace(i32 %6)
%8 = icmp eq i32 %7, 0
%9 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %8, label %10, label %3
10: ; preds = %3
%11 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%12 = tail call i32 @strncmp(i8* %4, i8* %1, i64 %11)
%13 = icmp eq i32 %12, 0
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ DoReportAbnormal();
void DoCodeCallMorRtm(void) { DoReportAbnormal(); }


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

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

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

LLVM IR (-O2):
define void @DoCodeCallMorRtm() {
%1 = tail call i32 (...) @DoReportAbnormal()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int hts_reg2bin(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
int bam_reg2bin(uint32_t beg, uint32_t end) {
  return hts_reg2bin(beg, end, 14, 5);
}


x86 assembly (clang, -O0):
<bam_reg2bin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0xe,%edx
mov    $0x5,%ecx
call   1030 <hts_reg2bin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bam_reg2bin>:
mov    $0xe,%edx
mov    $0x5,%ecx
jmp    1030 <hts_reg2bin@plt>

LLVM IR (-O0):
define i32 @bam_reg2bin(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @hts_reg2bin(i32 %5, i32 %6, i32 14, i32 5)
ret i32 %7
}

LLVM IR (-O2):
define i32 @bam_reg2bin(i32 %0, i32 %1) {
%3 = tail call i32 @hts_reg2bin(i32 %0, i32 %1, i32 14, i32 5)
ret i32 %3
}
/* Variables and functions */
char *basename_get_base_name(char *, int /*<<< orphan*/);
scalar_t__ get_line(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
void basename_stdin(void) {
  char filename[1024];
  while (get_line(filename, stdin)) {
    printf("%s\n", basename_get_base_name(filename, 0));
  }
}


x86 assembly (clang, -O0):
<basename_stdin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
lea    -0x400(%rbp),%rdi
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
call   1040 <get_line@plt>
cmp    $0x0,%rax
je     117c <basename_stdin+0x4c>
lea    -0x400(%rbp),%rdi
xor    %esi,%esi
call   1030 <basename_get_base_name@plt>
mov    %rax,%rsi
lea    0xe8e(%rip),%rdi
call   1050 <printf@plt>
jmp    113b <basename_stdin+0xb>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basename_stdin>:
push   %r15
push   %r14
push   %rbx
sub    $0x400,%rsp
mov    0x2ea5(%rip),%r15
mov    (%r15),%esi
mov    %rsp,%rdi
call   1040 <get_line@plt>
test   %rax,%rax
je     1185 <basename_stdin+0x55>
mov    %rsp,%rbx
lea    0xea3(%rip),%r14
nopl   (%rax)
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <basename_get_base_name@plt>
mov    %r14,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    (%r15),%esi
mov    %rbx,%rdi
call   1040 <get_line@plt>
test   %rax,%rax
jne    1160 <basename_stdin+0x30>
add    $0x400,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @basename_stdin() {
%1 = alloca [1024 x i8]
br label %2
2: ; preds = %7, %0
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i64 @get_line(i8* %3, i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%9 = call i8* @basename_get_base_name(i8* %8, i32 0)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @basename_stdin() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i64 @get_line(i8* %2, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %0, %6
%7 = call i8* @basename_get_base_name(i8* %2, i32 0)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32, i32* @stdin
%10 = call i64 @get_line(i8* %2, i32 %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %6
12: ; preds = %6, %0
ret void
}
void gdk_text_property_to_utf8_list_for_display() {}


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

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

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

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