xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printMinusRow() {
  int i;
  for (i = 0; i < 70; i++) {
    printf("-");
  }
}


x86 assembly (clang, -O0):
<printMinusRow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x46,-0x4(%rbp)
jge    1143 <printMinusRow+0x33>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <printMinusRow+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMinusRow>:
push   %rbx
mov    $0x46,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <printMinusRow+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @printMinusRow() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @putchar(i32 45)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 70
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
void write_bytes(char *mem, unsigned int offset, char value) {
  *(mem + offset) = value;
}


x86 assembly (clang, -O0):
<write_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_bytes>:
mov    %esi,%eax
mov    %dl,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @write_bytes(i8* %0, i32 %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%7 = load i8, i8* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
store i8 %7, i8* %11
ret void
}

LLVM IR (-O2):
define void @write_bytes(i8* nocapture writeonly %0, i32 %1, i8 signext %2) {
%4 = zext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %2, i8* %5
ret void
}
void gtk_tree_view_move_column_after() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_move_column_after() {
ret void
}
gets(char *__str) {}


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

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

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

LLVM IR (-O2):
define i32 @gets(i8* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
float duration(int distance, float velocity, float headWind) {
  if (velocity < headWind) {
    printf("You will not reach the destination.\n");
    return 0.0;
  }
  float totalVelocity = velocity - headWind;
  float estimatedDuration = distance / totalVelocity;
  return estimatedDuration;
}


x86 assembly (clang, -O0):
<duration>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1151 <duration+0x41>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1179 <duration+0x69>
movss  -0xc(%rbp),%xmm0
subss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
divss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<duration>:
ucomiss %xmm0,%xmm1
jbe    112a <duration+0x1a>
push   %rax
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
xorps  %xmm0,%xmm0
add    $0x8,%rsp
ret
subss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %edi,%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
@.str = [37 x i8] c"You will not reach the destination.\0A\00"
define float @duration(i32 %0, float %1, float %2) {
%4 = alloca float
%5 = alloca i32
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store i32 %0, i32* %5
store float %1, float* %6
store float %2, float* %7
%10 = load float, float* %6
%11 = load float, float* %7
%12 = fcmp olt float %10, %11
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
store float 0.000000e+00, float* %4
br label %24
15: ; preds = %3
%16 = load float, float* %6
%17 = load float, float* %7
%18 = fsub float %16, %17
store float %18, float* %8
%19 = load i32, i32* %5
%20 = sitofp i32 %19 to float
%21 = load float, float* %8
%22 = fdiv float %20, %21
store float %22, float* %9
%23 = load float, float* %9
store float %23, float* %4
br label %24
24: ; preds = %15, %13
%25 = load float, float* %4
ret float %25
}

LLVM IR (-O2):
@str = [36 x i8] c"You will not reach the destination.\00"
define float @duration(i32 %0, float %1, float %2) {
%4 = fcmp olt float %1, %2
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
br label %11
7: ; preds = %3
%8 = fsub float %1, %2
%9 = sitofp i32 %0 to float
%10 = fdiv float %9, %8
br label %11
11: ; preds = %7, %5
%12 = phi float [ 0.000000e+00, %5 ], [ %10, %7 ]
ret float %12
}
/* Variables and functions */
int /*<<< orphan*/ noalias_callee(int *);
void noalias_caller(int *x) { noalias_callee(x); }


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

x86 assembly (clang, -O2):
<noalias_caller>:
jmp    1030 <noalias_callee@plt>

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

LLVM IR (-O2):
define void @noalias_caller(i32* %0) {
%2 = tail call i32 @noalias_callee(i32* %0)
ret void
}
int main() {
  unsigned long t1 = (unsigned long)1;
  unsigned long t2 = 1;
  return t1 + t2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
store i64 1, i64* %2
store i64 1, i64* %3
%4 = load i64, i64* %2
%5 = load i64, i64* %3
%6 = add i64 %4, %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
ret i32 2
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
uint32_t mmio_readl(uint32_t *addr) { return *(volatile uint32_t *)addr; }


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

x86 assembly (clang, -O2):
<mmio_readl>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @mmio_readl(i32* %0) {
%2 = load volatile i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int partition(double *, int, int);
void quicksort(double *list, int lo, int hi) {
  if (lo < hi) {
    int p = partition(list, lo, hi);
    quicksort(list, lo, p - 1);
    quicksort(list, p + 1, hi);
  }
}


x86 assembly (clang, -O0):
<quicksort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1174 <quicksort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <quicksort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quicksort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quicksort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <quicksort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quicksort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @quicksort(double* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(double* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quicksort(double* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char *, char);
int main() {
  char *str1 = "Hello World!";
  return !(strchr(str1, '!') != NULL);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x21,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32* @strchr(i8* %3, i8 signext 33)
%5 = icmp ne i32* %4, null
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = tail call i32* @strchr(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 signext 33)
%2 = icmp eq i32* %1, null
%3 = zext i1 %2 to i32
ret i32 %3
}
void foo062(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo062(i32 %0) {
ret void
}
/* Type definitions */
struct suffix_mult {
  int dummy;
};

/* Variables and functions */
unsigned int xstrtoull_range_sfx(char const *, int, unsigned int, unsigned int,
                                 struct suffix_mult const *);
unsigned int xstrtou_range_sfx(const char *str, int b, unsigned int l,
                               unsigned int u, const struct suffix_mult *sfx) {
  return xstrtoull_range_sfx(str, b, l, u, sfx);
}


x86 assembly (clang, -O0):
<xstrtou_range_sfx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
call   1030 <xstrtoull_range_sfx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrtou_range_sfx>:
jmp    1030 <xstrtoull_range_sfx@plt>

LLVM IR (-O0):
%struct.suffix_mult = type { i32 }
define i32 @xstrtou_range_sfx(i8* %0, i32 %1, i32 %2, i32 %3, %struct.suffix_mult* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.suffix_mult*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store %struct.suffix_mult* %4, %struct.suffix_mult** %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load %struct.suffix_mult*, %struct.suffix_mult** %10
%16 = call i32 @xstrtoull_range_sfx(i8* %11, i32 %12, i32 %13, i32 %14, %struct.suffix_mult* %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.suffix_mult = type { i32 }
define i32 @xstrtou_range_sfx(i8* %0, i32 %1, i32 %2, i32 %3, %struct.suffix_mult* %4) {
%6 = tail call i32 @xstrtoull_range_sfx(i8* %0, i32 %1, i32 %2, i32 %3, %struct.suffix_mult* %4)
ret i32 %6
}
/* Type definitions */
struct cpufreq_stats {
  int dummy;
};

/* Variables and functions */
struct cpufreq_stats *sysfs_get_stats(unsigned int, unsigned long long *);
struct cpufreq_stats *cpufreq_get_stats(unsigned int cpu,
                                        unsigned long long *total_time) {
  struct cpufreq_stats *ret;
  ret = sysfs_get_stats(cpu, total_time);
  return (ret);
}


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

x86 assembly (clang, -O2):
<cpufreq_get_stats>:
jmp    1030 <sysfs_get_stats@plt>

LLVM IR (-O0):
%struct.cpufreq_stats = type { i32 }
define %struct.cpufreq_stats* @cpufreq_get_stats(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca %struct.cpufreq_stats*
store i32 %0, i32* %3
store i64* %1, i64** %4
%6 = load i32, i32* %3
%7 = load i64*, i64** %4
%8 = call %struct.cpufreq_stats* @sysfs_get_stats(i32 %6, i64* %7)
store %struct.cpufreq_stats* %8, %struct.cpufreq_stats** %5
%9 = load %struct.cpufreq_stats*, %struct.cpufreq_stats** %5
ret %struct.cpufreq_stats* %9
}

LLVM IR (-O2):
%struct.cpufreq_stats = type { i32 }
define %struct.cpufreq_stats* @cpufreq_get_stats(i32 %0, i64* %1) {
%3 = tail call %struct.cpufreq_stats* @sysfs_get_stats(i32 %0, i64* %1)
ret %struct.cpufreq_stats* %3
}
/* Type definitions */
struct utimbuf {
  int dummy;
};

/* Variables and functions */
int xbp_utime(char const *, struct utimbuf *);
int __wrap_utime(const char *filename, struct utimbuf *times) {
  return xbp_utime(filename, times);
}


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

x86 assembly (clang, -O2):
<__wrap_utime>:
jmp    1030 <xbp_utime@plt>

LLVM IR (-O0):
%struct.utimbuf = type { i32 }
define i32 @__wrap_utime(i8* %0, %struct.utimbuf* %1) {
%3 = alloca i8*
%4 = alloca %struct.utimbuf*
store i8* %0, i8** %3
store %struct.utimbuf* %1, %struct.utimbuf** %4
%5 = load i8*, i8** %3
%6 = load %struct.utimbuf*, %struct.utimbuf** %4
%7 = call i32 @xbp_utime(i8* %5, %struct.utimbuf* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.utimbuf = type { i32 }
define i32 @__wrap_utime(i8* %0, %struct.utimbuf* %1) {
%3 = tail call i32 @xbp_utime(i8* %0, %struct.utimbuf* %1)
ret i32 %3
}
void complab(l) { out2p(90, l); }


x86 assembly (clang, -O0):
<complab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x5a,%edi
mov    $0x0,%al
call   1030 <out2p@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<complab>:
mov    %edi,%esi
mov    $0x5a,%edi
xor    %eax,%eax
jmp    1030 <out2p@plt>

LLVM IR (-O0):
define void @complab(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, i32, ...) bitcast (i32 (...)* @out2p to i32 (i32, i32, ...)*)(i32 90, i32 %3)
ret void
}

LLVM IR (-O2):
define void @complab(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @out2p to i32 (i32, i32, ...)*)(i32 90, i32 %0)
ret void
}
void vvadpFinal() {}


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

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

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

LLVM IR (-O2):
define void @vvadpFinal() {
ret void
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t rcr0(void) {
  uint64_t val;
  __asm volatile("movq %%cr0,%0" : "=r"(val));
  return val;
}


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

x86 assembly (clang, -O2):
<rcr0>:
mov    %cr0,%rax
ret

LLVM IR (-O0):
define i8* @rcr0() {
%1 = alloca i8*
%2 = call i8* asm sideeffect "movq %cr0,$0", "=r,~{dirflag},~{fpsr},~{flags}"()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
ret i8* %3
}

LLVM IR (-O2):
define i8* @rcr0() {
%1 = tail call i8* asm sideeffect "movq %cr0,$0", "=r,~{dirflag},~{fpsr},~{flags}"()
ret i8* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ mp_decode_strl(char const **);
const char *mp_decode_str(const char **data, uint32_t *len) {
  assert(len != NULL);
  *len = mp_decode_strl(data);
  const char *str = *data;
  *data += *len;
  return str;
}


x86 assembly (clang, -O0):
<mp_decode_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1040 <mp_decode_strl@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
movslq %edx,%rdx
add    %rdx,%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_decode_str>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rsi,%rsi
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rdi
call   1040 <mp_decode_strl@plt>
mov    %eax,(%r14)
mov    (%rbx),%rcx
cltq
add    %rcx,%rax
mov    %rax,(%rbx)
mov    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @mp_decode_str(i8** %0, i32* %1) {
%3 = alloca i8**
%4 = alloca i32*
%5 = alloca i8*
store i8** %0, i8*** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = icmp ne i32* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8**, i8*** %3
%11 = call i32 @mp_decode_strl(i8** %10)
%12 = load i32*, i32** %4
store i32 %11, i32* %12
%13 = load i8**, i8*** %3
%14 = load i8*, i8** %13
store i8* %14, i8** %5
%15 = load i32*, i32** %4
%16 = load i32, i32* %15
%17 = load i8**, i8*** %3
%18 = load i8*, i8** %17
%19 = sext i32 %16 to i64
%20 = getelementptr inbounds i8, i8* %18, i64 %19
store i8* %20, i8** %17
%21 = load i8*, i8** %5
ret i8* %21
}

LLVM IR (-O2):
define i8* @mp_decode_str(i8** %0, i32* writeonly %1) {
%3 = icmp ne i32* %1, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @mp_decode_strl(i8** %0)
store i32 %6, i32* %1
%7 = load i8*, i8** %0
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds i8, i8* %7, i64 %8
store i8* %9, i8** %0
ret i8* %7
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
char *gdbwire_strdup(const char *str) {
  char *result = NULL;
  if (str) {
    size_t length_to_allocate = strlen(str) + 1;
    result = malloc(length_to_allocate * sizeof(char));
    if (result) {
      strcpy(result, str);
    }
  }
  return result;
}


x86 assembly (clang, -O0):
<gdbwire_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     118f <gdbwire_strdup+0x5f>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
shl    $0x0,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     118a <gdbwire_strdup+0x5a>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    118f <gdbwire_strdup+0x5f>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdbwire_strdup>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1161 <gdbwire_strdup+0x31>
mov    %rdi,%r14
call   1040 <strlen@plt>
add    $0x1,%eax
movslq %eax,%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     1161 <gdbwire_strdup+0x31>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    1163 <gdbwire_strdup+0x33>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @gdbwire_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %2
store i8* null, i8** %3
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %22
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @strlen(i8* %8)
%10 = add nsw i32 %9, 1
%11 = sext i32 %10 to i64
store i64 %11, i64* %4
%12 = load i64, i64* %4
%13 = mul i64 %12, 1
%14 = call i8* @malloc(i64 %13)
store i8* %14, i8** %3
%15 = load i8*, i8** %3
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %21
17: ; preds = %7
%18 = load i8*, i8** %3
%19 = load i8*, i8** %2
%20 = call i32 @strcpy(i8* %18, i8* %19)
br label %21
21: ; preds = %17, %7
br label %22
22: ; preds = %21, %1
%23 = load i8*, i8** %3
ret i8* %23
}

LLVM IR (-O2):
define i8* @gdbwire_strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = sext i32 %5 to i64
%7 = tail call i8* @malloc(i64 %6)
%8 = icmp eq i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = tail call i32 @strcpy(i8* %7, i8* %0)
br label %11
11: ; preds = %3, %9, %1
%12 = phi i8* [ null, %1 ], [ %7, %9 ], [ null, %3 ]
ret i8* %12
}
unsigned int is_power_of_two(unsigned int v) { return (v && !(v & (v - 1))); }


x86 assembly (clang, -O0):
<is_power_of_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112c <is_power_of_two+0x2c>
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_power_of_two>:
test   %edi,%edi
je     110f <is_power_of_two+0xf>
lea    -0x1(%rdi),%ecx
xor    %eax,%eax
test   %ecx,%edi
sete   %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_power_of_two(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 %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = sub i32 %7, 1
%9 = and i32 %6, %8
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
br label %12
12: ; preds = %5, %1
%13 = phi i1 [ false, %1 ], [ %11, %5 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_power_of_two(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @llvm.ctpop.i32(i32 %0)
%5 = icmp ult i32 %4, 2
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ child_main();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int /*<<< orphan*/ perror(char *);
pid_t make_child() {
  pid_t pid;
  if ((pid = fork()) < 0) {
    perror("fork error");
    exit(EXIT_FAILURE);
  } else if (pid > 0) {
    return pid;
  }
  child_main();
}


x86 assembly (clang, -O0):
<make_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <fork@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jge    1177 <make_child+0x37>
lea    0xe9c(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
cmpq   $0x0,-0x10(%rbp)
jle    118f <make_child+0x4f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    119b <make_child+0x5b>
jmp    1194 <make_child+0x54>
mov    $0x0,%al
call   1030 <child_main@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_child>:
push   %rbx
xor    %eax,%eax
call   1060 <fork@plt>
test   %rax,%rax
js     115e <make_child+0x1e>
mov    %rax,%rbx
jne    1159 <make_child+0x19>
xor    %eax,%eax
call   1030 <child_main@plt>
mov    %rbx,%rax
pop    %rbx
ret
lea    0xe9b(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"fork error\00"
@EXIT_FAILURE = global i32 0
define i64 @make_child() {
%1 = alloca i64
%2 = alloca i64
%3 = call i64 (...) @fork()
store i64 %3, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
%10 = load i64, i64* %2
%11 = icmp sgt i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = load i64, i64* %2
store i64 %13, i64* %1
br label %17
14: ; preds = %9
br label %15
15: ; preds = %14
%16 = call i32 (...) @child_main()
br label %17
17: ; preds = %15, %12
%18 = load i64, i64* %1
ret i64 %18
}

LLVM IR (-O2):
@.str = [11 x i8] c"fork error\00"
@EXIT_FAILURE = global i32 0
define i64 @make_child() {
%1 = tail call i64 (...) @fork()
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
7: ; preds = %0
%8 = icmp eq i64 %1, 0
br i1 %8, label %9, label %11
9: ; preds = %7
%10 = tail call i32 (...) @child_main()
br label %11
11: ; preds = %7, %9
ret i64 %1
}
/* Variables and functions */
char *strchr(char *, char);
void chomp(char *p) {
  if ((p = strchr(p, '\n')))
    *p = '\0';
}


x86 assembly (clang, -O0):
<chomp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     113f <chomp+0x2f>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chomp>:
push   %rax
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1123 <chomp+0x13>
movb   $0x0,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @chomp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strchr(i8* %3, i8 signext 10)
store i8* %4, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i8*, i8** %2
store i8 0, i8* %7
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @chomp(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 10)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ helper(int);
void main() {
  for (int i = 0; i < 100; i++)
    helper(i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    113f <main+0x2f>
mov    -0x4(%rbp),%edi
call   1030 <helper@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <helper@plt>
add    $0x1,%ebx
cmp    $0x64,%ebx
jne    1120 <main+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 100
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @helper(i32 %6)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @main() {
br label %2
1: ; preds = %2
ret void
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 @helper(i32 %3)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 100
br i1 %6, label %1, label %2
}
unsigned int pna_hash(unsigned int key, int bits) {
  unsigned int hash = key;
  hash = key >> (sizeof(unsigned int) - bits);
  hash = (hash >> 1) | 0x01;
  return hash;
}


x86 assembly (clang, -O0):
<pna_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
movslq -0x8(%rbp),%rdx
mov    $0x4,%ecx
sub    %rdx,%rcx
shr    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
or     $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pna_hash>:
mov    %edi,%eax
mov    $0x4,%cl
sub    %sil,%cl
shr    %cl,%eax
shr    %eax
or     $0x1,%eax
ret

LLVM IR (-O0):
define i32 @pna_hash(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
store i32 %6, i32* %5
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = sub i64 4, %9
%11 = trunc i64 %10 to i32
%12 = lshr i32 %7, %11
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = lshr i32 %13, 1
%15 = or i32 %14, 1
store i32 %15, i32* %5
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @pna_hash(i32 %0, i32 %1) {
%3 = sub i32 4, %1
%4 = lshr i32 %0, %3
%5 = lshr i32 %4, 1
%6 = or i32 %5, 1
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ little_endian_read_16(int /*<<< orphan*/ const *, int);
uint16_t bnep_event_channel_closed_get_source_uuid(const uint8_t *event) {
  return little_endian_read_16(event, 4);
}


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

x86 assembly (clang, -O2):
<bnep_event_channel_closed_get_source_uuid>:
mov    $0x4,%esi
jmp    1030 <little_endian_read_16@plt>

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

LLVM IR (-O2):
define i32 @bnep_event_channel_closed_get_source_uuid(i32* %0) {
%2 = tail call i32 @little_endian_read_16(i32* %0, i32 4)
ret i32 %2
}
int _CsvWriter_delimiterIsAccepted(const char *delimiter) {
  char actualDelimiter = *delimiter;
  if (actualDelimiter == '\n' || actualDelimiter == '\r' ||
      actualDelimiter == '\0' || actualDelimiter == '\"') {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<_CsvWriter_delimiterIsAccepted>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0xa,%eax
je     1145 <_CsvWriter_delimiterIsAccepted+0x45>
movsbl -0x11(%rbp),%eax
cmp    $0xd,%eax
je     1145 <_CsvWriter_delimiterIsAccepted+0x45>
movsbl -0x11(%rbp),%eax
cmp    $0x0,%eax
je     1145 <_CsvWriter_delimiterIsAccepted+0x45>
movsbl -0x11(%rbp),%eax
cmp    $0x22,%eax
jne    1151 <_CsvWriter_delimiterIsAccepted+0x51>
movl   $0x0,-0x4(%rbp)
jmp    1158 <_CsvWriter_delimiterIsAccepted+0x58>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_CsvWriter_delimiterIsAccepted>:
movzbl (%rdi),%ecx
cmp    $0x22,%rcx
ja     111c <_CsvWriter_delimiterIsAccepted+0x1c>
xor    %eax,%eax
movabs $0x400002401,%rdx
bt     %rcx,%rdx
jae    111c <_CsvWriter_delimiterIsAccepted+0x1c>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @_CsvWriter_delimiterIsAccepted(i8* nocapture %0) {
%2 = load i8, i8* %0
switch i8 %2, label %3 [
i8 34, label %4
i8 13, label %4
i8 10, label %4
i8 0, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %3
%5 = phi i32 [ 1, %3 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ]
ret i32 %5
}
void foo_1_2_1_1_2_1_1_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_1_1_2_1_1_2_1() {
ret void
}
/* Type definitions */
struct trie_node {
  int dummy;
};

/* Variables and functions */
struct trie_node *new_node();
struct trie_node *new_trie(void) {
  return new_node();
}


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

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

LLVM IR (-O0):
%struct.trie_node = type { i32 }
define %struct.trie_node* @new_trie() {
%1 = call %struct.trie_node* (...) @new_node()
ret %struct.trie_node* %1
}

LLVM IR (-O2):
%struct.trie_node = type { i32 }
define %struct.trie_node* @new_trie() {
%1 = tail call %struct.trie_node* (...) @new_node()
ret %struct.trie_node* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct trace_seq {
  int dummy;
};

/* Variables and functions */
scalar_t__ le16toh(int /*<<< orphan*/);
unsigned long long process___le16_to_cpup(struct trace_seq *s,
                                          unsigned long long *args) {
  uint16_t *val = (uint16_t *)(unsigned long)args[0];
  return val ? (long long)le16toh(*val) : 0;
}


x86 assembly (clang, -O0):
<process___le16_to_cpup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114a <process___le16_to_cpup+0x3a>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
call   1030 <le16toh@plt>
mov    %rax,-0x20(%rbp)
jmp    1155 <process___le16_to_cpup+0x45>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    1155 <process___le16_to_cpup+0x45>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process___le16_to_cpup>:
mov    (%rsi),%rax
test   %rax,%rax
je     111f <process___le16_to_cpup+0xf>
mov    (%rax),%edi
jmp    1030 <le16toh@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.trace_seq = type { i32 }
define i64 @process___le16_to_cpup(%struct.trace_seq* %0, i64* %1) {
%3 = alloca %struct.trace_seq*
%4 = alloca i64*
%5 = alloca i32*
store %struct.trace_seq* %0, %struct.trace_seq** %3
store i64* %1, i64** %4
%6 = load i64*, i64** %4
%7 = getelementptr inbounds i64, i64* %6, i64 0
%8 = load i64, i64* %7
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %5
%10 = load i32*, i32** %5
%11 = icmp ne i32* %10, null
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = call i64 @le16toh(i32 %14)
br label %17
16: ; preds = %2
br label %17
17: ; preds = %16, %12
%18 = phi i64 [ %15, %12 ], [ 0, %16 ]
ret i64 %18
}

LLVM IR (-O2):
%struct.trace_seq = type { i32 }
define i64 @process___le16_to_cpup(%struct.trace_seq* nocapture readnone %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = inttoptr i64 %3 to i32*
%7 = load i32, i32* %6
%8 = tail call i64 @le16toh(i32 %7)
br label %9
9: ; preds = %2, %5
%10 = phi i64 [ %8, %5 ], [ 0, %2 ]
ret i64 %10
}
/* Type definitions */
struct ringbuf_t {
  int dummy;
};

/* Variables and functions */
size_t ringbuf_buffer_size(struct ringbuf_t const *);
size_t ringbuf_capacity(const struct ringbuf_t *rb) {
  return ringbuf_buffer_size(rb) - 1;
}


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

x86 assembly (clang, -O2):
<ringbuf_capacity>:
push   %rax
call   1030 <ringbuf_buffer_size@plt>
add    $0xffffffffffffffff,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ringbuf_t = type { i32 }
define i64 @ringbuf_capacity(%struct.ringbuf_t* %0) {
%2 = alloca %struct.ringbuf_t*
store %struct.ringbuf_t* %0, %struct.ringbuf_t** %2
%3 = load %struct.ringbuf_t*, %struct.ringbuf_t** %2
%4 = call i64 @ringbuf_buffer_size(%struct.ringbuf_t* %3)
%5 = sub i64 %4, 1
ret i64 %5
}

LLVM IR (-O2):
%struct.ringbuf_t = type { i32 }
define i64 @ringbuf_capacity(%struct.ringbuf_t* %0) {
%2 = tail call i64 @ringbuf_buffer_size(%struct.ringbuf_t* %0)
%3 = add i64 %2, -1
ret i64 %3
}
void ScaleRowDown38_3_Box_Any_SSSE3() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @foo639() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ network_before_start();
int /*<<< orphan*/ network_udp_start();
void network_init() {
  network_before_start();
  network_udp_start();
}


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

x86 assembly (clang, -O2):
<network_init>:
push   %rax
xor    %eax,%eax
call   1040 <network_before_start@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <network_udp_start@plt>

LLVM IR (-O0):
define void @network_init() {
%1 = call i32 (...) @network_before_start()
%2 = call i32 (...) @network_udp_start()
ret void
}

LLVM IR (-O2):
define void @network_init() {
%1 = tail call i32 (...) @network_before_start()
%2 = tail call i32 (...) @network_udp_start()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test(char *, char *);
int main() {
  char out[4];
  test("aab", out);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"aab\00"
define i32 @main() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i32 @test(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
void sigchld_handler(int s) {}


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

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

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

LLVM IR (-O2):
define void @sigchld_handler(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ EINTR;
int close(int);
scalar_t__ errno;
int sca_close(int FileDescriptor) {
  int value;
  value = -1;
  errno = EINTR;
  while (value == -1 && errno == EINTR) {
    value = close(FileDescriptor);
  }
}


x86 assembly (clang, -O0):
<sca_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    0x2eaf(%rip),%rax
mov    (%rax),%rcx
mov    0x2ead(%rip),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
cmpl   $0xffffffff,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jne    115f <sca_close+0x4f>
mov    0x2e94(%rip),%rax
mov    (%rax),%rax
mov    0x2e82(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    116f <sca_close+0x5f>
jmp    117f <sca_close+0x6f>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0xc(%rbp)
jmp    1136 <sca_close+0x26>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sca_close>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%ebx
mov    0x2eba(%rip),%r14
mov    (%r14),%rax
mov    0x2eb8(%rip),%r15
mov    %rax,(%r15)
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1144 <sca_close+0x34>
mov    (%r14),%rax
cmp    %rax,(%r15)
je     1130 <sca_close+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@EINTR = global i64 0
@errno = global i64 0
define i32 @sca_close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 -1, i32* %4
%5 = load i64, i64* @EINTR
store i64 %5, i64* @errno
br label %6
6: ; preds = %15, %1
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i64, i64* @errno
%11 = load i64, i64* @EINTR
%12 = icmp eq i64 %10, %11
br label %13
13: ; preds = %9, %6
%14 = phi i1 [ false, %6 ], [ %12, %9 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i32, i32* %3
%17 = call i32 @close(i32 %16)
store i32 %17, i32* %4
br label %6
18: ; preds = %13
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@EINTR = global i64 0
@errno = global i64 0
define i32 @sca_close(i32 %0) {
%2 = load i64, i64* @EINTR
store i64 %2, i64* @errno
br label %3
3: ; preds = %1, %3
%4 = tail call i32 @close(i32 %0)
%5 = icmp eq i32 %4, -1
%6 = load i64, i64* @errno
%7 = load i64, i64* @EINTR
%8 = icmp eq i64 %6, %7
%9 = select i1 %5, i1 %8, i1 false
br i1 %9, label %3, label %10
10: ; preds = %3
ret i32 undef
}
/* Variables and functions */
scalar_t__ floor(float);
int fround(float flt) { return (int)floor(flt + 0.5f); }


x86 assembly (clang, -O0):
<fround>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
call   1030 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fround>:
addss  0xee8(%rip),%xmm0
jmp    1030 <floor@plt>

LLVM IR (-O0):
define i32 @fround(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fadd float %3, 5.000000e-01
%5 = call i64 @floor(float %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @fround(float %0) {
%2 = fadd float %0, 5.000000e-01
%3 = tail call i64 @floor(float %2)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void test2(void) {
  int x = 3, y = 2, z;
  z = (x < y) ? x++ : y++;
  if (z != 2)
    abort();
  if (x != 3)
    abort();
  if (y != 3)
    abort();
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1145 <test2+0x35>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
mov    %eax,-0x10(%rbp)
jmp    1153 <test2+0x43>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
je     116a <test2+0x5a>
mov    $0x0,%al
call   1030 <abort@plt>
cmpl   $0x3,-0x4(%rbp)
je     117b <test2+0x6b>
mov    $0x0,%al
call   1030 <abort@plt>
cmpl   $0x3,-0x8(%rbp)
je     118c <test2+0x7c>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test2() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 3, i32* %1
store i32 2, i32* %2
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = icmp slt i32 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %13
10: ; preds = %0
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %13
13: ; preds = %10, %7
%14 = phi i32 [ %8, %7 ], [ %11, %10 ]
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = icmp ne i32 %15, 2
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = call i32 (...) @abort()
unreachable
19: ; preds = %13
%20 = load i32, i32* %1
%21 = icmp ne i32 %20, 3
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 (...) @abort()
unreachable
24: ; preds = %19
%25 = load i32, i32* %2
%26 = icmp ne i32 %25, 3
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 (...) @abort()
unreachable
29: ; preds = %24
ret void
}

LLVM IR (-O2):
define void @test2() {
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
int utils_file_exists(const char *filename) {
  struct stat f;
  return stat(filename, &f) == 0 ? 1 : 0;
}


x86 assembly (clang, -O0):
<utils_file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utils_file_exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @utils_file_exists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 1, i32 0
ret i32 %8
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @utils_file_exists(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
%6 = zext i1 %5 to i32
ret i32 %6
}