xunge/DecIR huggingface dataset:
/* Variables and functions */
int partition(int *, int, int);
void quick_sort(int values[], int begin, int end) {
  if (begin >= end)
    return;
  int p = partition(values, begin, end);
  quick_sort(values, begin, p - 1);
  quick_sort(values, p + 1, end);
}


x86 assembly (clang, -O0):
<quick_sort>:
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
jl     1143 <quick_sort+0x23>
jmp    1179 <quick_sort+0x59>
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 <quick_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quick_sort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quick_sort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quick_sort+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 <quick_sort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quick_sort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @quick_sort(i32* %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(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quick_sort(i32* %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 strcpy(const char *source, char *dest) {
  while (*source) {
    *dest = *source;
    dest++;
    source++;
  }
  *dest = 0;
  return 0;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1142 <strcpy+0x42>
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <strcpy+0xc>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    (%rdi),%al
test   %al,%al
je     1121 <strcpy+0x21>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
mov    %al,(%rsi)
add    $0x1,%rsi
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <strcpy+0x10>
movb   $0x0,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @strcpy(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 = %9, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = load i8*, i8** %4
store i8 %11, i8* %12
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %4
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
br label %5
17: ; preds = %5
%18 = load i8*, i8** %4
store i8 0, i8* %18
ret i32 0
}

LLVM IR (-O2):
define i32 @strcpy(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = phi i8* [ %10, %5 ], [ %0, %2 ]
store i8 %6, i8* %7
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %1, %2 ], [ %9, %5 ]
store i8 0, i8* %14
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void usage() {
  char *s = "Usage: issd_compute_server [option]\n";
  puts(s);
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"Usage: issd_compute_server [option]\0A\00"
define void @usage() {
%1 = alloca i8*
store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @puts(i8* %2)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"Usage: issd_compute_server [option]\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned char galois_mult_by_two(unsigned char);
unsigned char galois_mult_by_thirteen(unsigned char val) {
  return galois_mult_by_two(galois_mult_by_two(galois_mult_by_two(val) ^ val)) ^
         val;
}


x86 assembly (clang, -O0):
<galois_mult_by_thirteen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <galois_mult_by_two@plt>
movzbl %al,%eax
movzbl -0x1(%rbp),%ecx
xor    %ecx,%eax
movzbl %al,%edi
call   1030 <galois_mult_by_two@plt>
movzbl %al,%edi
call   1030 <galois_mult_by_two@plt>
movzbl %al,%eax
movzbl -0x1(%rbp),%ecx
xor    %ecx,%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<galois_mult_by_thirteen>:
push   %rbx
mov    %edi,%ebx
call   1030 <galois_mult_by_two@plt>
xor    %bl,%al
movzbl %al,%edi
call   1030 <galois_mult_by_two@plt>
movzbl %al,%edi
call   1030 <galois_mult_by_two@plt>
xor    %bl,%al
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @galois_mult_by_thirteen(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call zeroext i8 @galois_mult_by_two(i8 zeroext %3)
%5 = zext i8 %4 to i32
%6 = load i8, i8* %2
%7 = zext i8 %6 to i32
%8 = xor i32 %5, %7
%9 = trunc i32 %8 to i8
%10 = call zeroext i8 @galois_mult_by_two(i8 zeroext %9)
%11 = call zeroext i8 @galois_mult_by_two(i8 zeroext %10)
%12 = zext i8 %11 to i32
%13 = load i8, i8* %2
%14 = zext i8 %13 to i32
%15 = xor i32 %12, %14
%16 = trunc i32 %15 to i8
ret i8 %16
}

LLVM IR (-O2):
define zeroext i8 @galois_mult_by_thirteen(i8 zeroext %0) {
%2 = tail call zeroext i8 @galois_mult_by_two(i8 zeroext %0)
%3 = xor i8 %2, %0
%4 = tail call zeroext i8 @galois_mult_by_two(i8 zeroext %3)
%5 = tail call zeroext i8 @galois_mult_by_two(i8 zeroext %4)
%6 = xor i8 %5, %0
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ strspn(char *, char *);
char *strstr(char *, char *);
char *lac_find_value(char *s) {
  char *p = NULL;
  p = strstr(s, "=");
  p += strspn(p, "= ");
  if (*p == 0) {
    return NULL;
  }
  return p;
}


x86 assembly (clang, -O0):
<lac_find_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1030 <strspn@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1185 <lac_find_value+0x65>
movq   $0x0,-0x8(%rbp)
jmp    118d <lac_find_value+0x6d>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lac_find_value>:
push   %rbx
mov    $0x3d,%esi
call   1030 <strchr@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rsi
mov    %rax,%rdi
call   1040 <strspn@plt>
movslq %eax,%rcx
lea    (%rbx,%rcx,1),%rdx
xor    %eax,%eax
cmpb   $0x0,(%rbx,%rcx,1)
cmovne %rdx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str.1 = [3 x i8] c"= \00"
define i8* @lac_find_value(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 61)
%3 = tail call i32 @strspn(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %2, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = select i1 %7, i8* null, i8* %5
ret i8* %8
}
const char *Thread_Brief(void) { return "Concurrent Execution"; }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"Concurrent Execution\00"
define i8* @Thread_Brief() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [21 x i8] c"Concurrent Execution\00"
define i8* @Thread_Brief() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}
int fltcmp(float f1, float f2) {
  float epsilon = f1 - f2;
  if (epsilon < 0.0)
    return -1;
  else if (epsilon > 0.0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<fltcmp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    113f <fltcmp+0x3f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <fltcmp+0x68>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1161 <fltcmp+0x61>
movl   $0x1,-0x4(%rbp)
jmp    1168 <fltcmp+0x68>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fltcmp>:
subss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
xor    %ecx,%ecx
ucomiss %xmm1,%xmm0
seta   %cl
ucomiss %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fltcmp(float %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fsub float %7, %8
store float %9, float* %6
%10 = load float, float* %6
%11 = fpext float %10 to double
%12 = fcmp olt double %11, 0.000000e+00
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %20
14: ; preds = %2
%15 = load float, float* %6
%16 = fpext float %15 to double
%17 = fcmp ogt double %16, 0.000000e+00
br i1 %17, label %18, label %19
18: ; preds = %14
store i32 1, i32* %3
br label %20
19: ; preds = %14
store i32 0, i32* %3
br label %20
20: ; preds = %19, %18, %13
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @fltcmp(float %0, float %1) {
%3 = fsub float %0, %1
%4 = fcmp olt float %3, 0.000000e+00
%5 = fcmp ogt float %3, 0.000000e+00
%6 = zext i1 %5 to i32
%7 = select i1 %4, i32 -1, i32 %6
ret i32 %7
}
/* Variables and functions */
long long round(double);
long long llround(double x) { return round(x); }


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

x86 assembly (clang, -O2):
<llround>:
jmp    1030 <round@plt>

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

LLVM IR (-O2):
define i64 @llround(double %0) {
%2 = tail call i64 @round(double %0)
ret i64 %2
}
int main(int a) {
  int i = 0;
  a = a + 1;
  return a + 1;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0) {
%2 = add nsw i32 %0, 2
ret i32 %2
}
void udelay20(void) {
  volatile int i;
  for (i = 0; i < 500; i++)
    ;
}


x86 assembly (clang, -O0):
<udelay20>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    $0x1f4,%eax
jge    112c <udelay20+0x2c>
jmp    111e <udelay20+0x1e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <udelay20+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<udelay20>:
movl   $0x0,-0x4(%rsp)
mov    -0x4(%rsp),%eax
cmp    $0x1f3,%eax
jg     1130 <udelay20+0x30>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
addl   $0x1,-0x4(%rsp)
mov    -0x4(%rsp),%eax
cmp    $0x1f4,%eax
jl     1120 <udelay20+0x20>
ret

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

LLVM IR (-O2):
define void @udelay20() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 0, i32* %1
%3 = load volatile i32, i32* %1
%4 = icmp slt i32 %3, 500
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = load volatile i32, i32* %1
%7 = add nsw i32 %6, 1
store volatile i32 %7, i32* %1
%8 = load volatile i32, i32* %1
%9 = icmp slt i32 %8, 500
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret void
}
void mp_squh_use_in1fft(int n, int radix, double inoutfft[], int out[],
                        int nfft) {
  void mp_mul_csqu_nt_d1(int nfft, double d1[]);
  void mp_mul_d2i(int n, int radix, int nfft, double din[], int out[]);
  mp_mul_csqu_nt_d1(nfft, inoutfft);
  mp_mul_d2i(n, radix, nfft, inoutfft, out);
}


x86 assembly (clang, -O0):
<mp_squh_use_in1fft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <mp_mul_csqu_nt_d1@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
call   1040 <mp_mul_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_squh_use_in1fft>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%ebp
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %esi,%r15d
mov    %edi,%r12d
mov    %r8d,%edi
mov    %rdx,%rsi
call   1030 <mp_mul_csqu_nt_d1@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %rbx,%rcx
mov    %r14,%r8
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <mp_mul_d2i@plt>

LLVM IR (-O0):
define void @mp_squh_use_in1fft(i32 %0, i32 %1, double* %2, i32* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca double*
%9 = alloca i32*
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store double* %2, double** %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%11 = load i32, i32* %10
%12 = load double*, double** %8
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = load i32, i32* %10
%16 = load double*, double** %8
%17 = load i32*, i32** %9
ret void
}

LLVM IR (-O2):
define void @mp_squh_use_in1fft(i32 %0, i32 %1, double* %2, i32* %3, i32 %4) {
tail call void @mp_mul_csqu_nt_d1(i32 %4, double* %2)
tail call void @mp_mul_d2i(i32 %0, i32 %1, i32 %4, double* %2, i32* %3)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ SIGSEGV;
int /*<<< orphan*/ printf(char *);
scalar_t__ raise(int /*<<< orphan*/);
int main(void) {
  if (raise(SIGSEGV) == 0)
    printf("Successfully sent the signal\n");
  else
    printf("Failed to send signal\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
cmp    $0x0,%rax
jne    1158 <main+0x38>
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
jmp    1164 <main+0x44>
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
test   %rax,%rax
lea    0xedd(%rip),%rax
lea    0xec0(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGSEGV = global i32 0
@.str = [30 x i8] c"Successfully sent the signal\0A\00"
@.str.1 = [23 x i8] c"Failed to send signal\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @SIGSEGV
%3 = call i64 @raise(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}

LLVM IR (-O2):
@SIGSEGV = global i32 0
@EXIT_SUCCESS = global i32 0
@str = [22 x i8] c"Failed to send signal\00"
@str.2 = [29 x i8] c"Successfully sent the signal\00"
define i32 @main() {
%1 = load i32, i32* @SIGSEGV
%2 = tail call i64 @raise(i32 %1)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0)
%5 = tail call i32 @puts(i8* dereferenceable(1) %4)
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ pr_inf(char *);
int stress_set_socket_zerocopy(const char *opt) {
  (void)opt;
  pr_inf("sock: cannot enable sock-zerocopy, MSG_ZEROCOPY is not available\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [66 x i8] c"sock: cannot enable sock-zerocopy, MSG_ZEROCOPY is not available\0A\00"
define i32 @stress_set_socket_zerocopy(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @pr_inf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [66 x i8] c"sock: cannot enable sock-zerocopy, MSG_ZEROCOPY is not available\0A\00"
define i32 @stress_set_socket_zerocopy(i8* nocapture readnone %0) {
%2 = tail call i32 @pr_inf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int zero(int *p1, int *p2) {
  while ((++p1) <= p2)
    *p1 = 0;
}


x86 assembly (clang, -O0):
<zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
cmp    -0x18(%rbp),%rax
ja     1131 <zero+0x31>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    110c <zero+0xc>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero>:
mov    %rdi,%rdx
add    $0x4,%rdi
cmp    %rsi,%rdi
ja     1141 <zero+0x31>
push   %rax
lea    0x8(%rdx),%rax
add    $0x1,%rsi
cmp    %rsi,%rax
cmova  %rax,%rsi
not    %rdx
add    %rsi,%rdx
and    $0xfffffffffffffffc,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @zero(i32* writeonly %0, i32* readnone %1) {
%3 = ptrtoint i32* %0 to i64
%4 = getelementptr i32, i32* %0, i64 1
%5 = icmp ugt i32* %4, %1
br i1 %5, label %16, label %6
6: ; preds = %2
%7 = bitcast i32* %4 to i8*
%8 = ptrtoint i32* %1 to i64
%9 = add i64 %3, 8
%10 = add nuw i64 %8, 1
%11 = call i64 @llvm.umax.i64(i64 %9, i64 %10)
%12 = add i64 %11, -5
%13 = sub i64 %12, %3
%14 = add i64 %13, 4
%15 = and i64 %14, -4
br label %16
16: ; preds = %6, %2
ret i32 undef
}
void socket_close(fd) int fd;
{ close(fd); }


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

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

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

LLVM IR (-O2):
define void @socket_close(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %0)
ret void
}
/* Variables and functions */
int __delete(char const *);
int /*<<< orphan*/ __inc_remove_counter();
int __carbon_delete(const char *path) {
  int res = __delete(path);
  if (res == 0) {
    __inc_remove_counter();
  }
  return res;
}


x86 assembly (clang, -O0):
<__carbon_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__delete@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1149 <__carbon_delete+0x29>
mov    $0x0,%al
call   1040 <__inc_remove_counter@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__carbon_delete>:
push   %rbx
call   1030 <__delete@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1133 <__carbon_delete+0x13>
xor    %eax,%eax
call   1040 <__inc_remove_counter@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__carbon_delete(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @__delete(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @__inc_remove_counter()
br label %10
10: ; preds = %8, %1
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @__carbon_delete(i8* %0) {
%2 = tail call i32 @__delete(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @__inc_remove_counter()
br label %6
6: ; preds = %4, %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char **argv) {
  char *str = "abcdefghijklm";
  char buf[10];
  strcpy(buf, str);
  printf("%s", buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x22(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x22(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rsi
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xece(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"abcdefghijklm\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int sm_reply_search(void *data, int len) {
  printf("search result: %s\n", (char *)data);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [19 x i8] c"search result: %s\0A\00"
define i32 @sm_reply_search(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ setup_dash();
int main(int argv, char **argc) {
  setup_dash();
  while (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)
mov    $0x0,%al
call   1030 <setup_dash@plt>
jmp    112d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <setup_dash@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <main+0x10>

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 = call i32 (...) @setup_dash()
br label %7
7: ; preds = %2, %7
br label %7
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @setup_dash()
br label %4
4: ; preds = %2, %4
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ simpleLine(unsigned short volatile *, short, short, short,
                              short, unsigned short, unsigned short);
void line(volatile unsigned short *vram, short xpos, short ypos, short dx,
          short dy, unsigned short count, unsigned short color) {
  simpleLine(vram, xpos, ypos, dx, dy, count, color);
}


x86 assembly (clang, -O0):
<line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %r8d,-0x24(%rbp)
mov    %ecx,%eax
mov    -0x24(%rbp),%ecx
mov    %eax,-0x20(%rbp)
mov    %edx,%eax
mov    -0x20(%rbp),%edx
mov    %eax,-0x1c(%rbp)
mov    %esi,%eax
mov    -0x1c(%rbp),%esi
mov    %eax,-0x18(%rbp)
mov    %rdi,%r8
mov    -0x18(%rbp),%edi
mov    %r9w,%ax
mov    0x10(%rbp),%r9w
mov    %r8,-0x8(%rbp)
mov    %di,-0xa(%rbp)
mov    %si,-0xc(%rbp)
mov    %dx,-0xe(%rbp)
mov    %cx,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%si
mov    -0xc(%rbp),%dx
mov    -0xe(%rbp),%cx
mov    -0x10(%rbp),%r8w
mov    -0x12(%rbp),%ax
movswl %si,%esi
movswl %dx,%edx
movswl %cx,%ecx
movswl %r8w,%r8d
movzwl %ax,%r9d
movzwl 0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <simpleLine@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line>:
jmp    1030 <simpleLine@plt>

LLVM IR (-O0):
define void @line(i16* %0, i16 signext %1, i16 signext %2, i16 signext %3, i16 signext %4, i16 zeroext %5, i16 zeroext %6) {
%8 = alloca i16*
%9 = alloca i16
%10 = alloca i16
%11 = alloca i16
%12 = alloca i16
%13 = alloca i16
%14 = alloca i16
store i16* %0, i16** %8
store i16 %1, i16* %9
store i16 %2, i16* %10
store i16 %3, i16* %11
store i16 %4, i16* %12
store i16 %5, i16* %13
store i16 %6, i16* %14
%15 = load i16*, i16** %8
%16 = load i16, i16* %9
%17 = load i16, i16* %10
%18 = load i16, i16* %11
%19 = load i16, i16* %12
%20 = load i16, i16* %13
%21 = load i16, i16* %14
%22 = call i32 @simpleLine(i16* %15, i16 signext %16, i16 signext %17, i16 signext %18, i16 signext %19, i16 zeroext %20, i16 zeroext %21)
ret void
}

LLVM IR (-O2):
define void @line(i16* %0, i16 signext %1, i16 signext %2, i16 signext %3, i16 signext %4, i16 zeroext %5, i16 zeroext %6) {
%8 = tail call i32 @simpleLine(i16* %0, i16 signext %1, i16 signext %2, i16 signext %3, i16 signext %4, i16 zeroext %5, i16 zeroext %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __mf_set_options(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char *, int);
int main() {
  char *foo;
  char *bar;
  __mf_set_options("-check-initialization");
  foo = (char *)malloc(10);
  bar = (char *)malloc(10);
  memcpy(foo + 1, bar + 1, 9);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1050 <__mf_set_options@plt>
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
mov    $0x9,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1050 <__mf_set_options@plt>
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0xa,%edi
call   1040 <malloc@plt>
add    $0x1,%rbx
lea    0x1(%rax),%rsi
mov    %rbx,%rdi
mov    $0x9,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"-check-initialization\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 @__mf_set_options(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%5 = call i64 @malloc(i32 10)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %2
%7 = call i64 @malloc(i32 10)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = call i32 @memcpy(i8* %10, i8* %12, i32 9)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"-check-initialization\00"
define i32 @main() {
%1 = tail call i32 @__mf_set_options(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i64 @malloc(i32 10)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i64 @malloc(i32 10)
%5 = inttoptr i64 %4 to i8*
%6 = getelementptr inbounds i8, i8* %3, i64 1
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = tail call i32 @memcpy(i8* %6, i8* %7, i32 9)
ret i32 0
}
/* Variables and functions */
void *dispatch_get_global_queue(long priority, unsigned long flags) {
  return NULL;
}


x86 assembly (clang, -O0):
<dispatch_get_global_queue>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @dispatch_get_global_queue(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @dispatch_get_global_queue(i64 %0, i64 %1) {
ret i8* null
}
/* Variables and functions */
int pm8901_mpp_config(unsigned int, int, unsigned int, unsigned int);
int pm8901_mpp_config_analog_input(unsigned mpp, unsigned level,
                                   unsigned control) {
  return pm8901_mpp_config(mpp, 3, level, control);
}


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

x86 assembly (clang, -O2):
<pm8901_mpp_config_analog_input>:
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x3,%esi
jmp    1030 <pm8901_mpp_config@plt>

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

LLVM IR (-O2):
define i32 @pm8901_mpp_config_analog_input(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @pm8901_mpp_config(i32 %0, i32 3, i32 %1, i32 %2)
ret i32 %4
}
/* Type definitions */
struct evconnlistener {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void listener_error(struct evconnlistener *evlistener, void *user_data) {
  fprintf(stderr, "Error on socket listener: %s\n", strerror(errno));
  exit(-1);
}


x86 assembly (clang, -O0):
<listener_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    %rax,%rdx
lea    0xe99(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<listener_error>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xeb1(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
%struct.evconnlistener = type { i32 }
@stderr = global i32 0
@.str = [30 x i8] c"Error on socket listener: %s\0A\00"
@errno = global i32 0
define void @listener_error(%struct.evconnlistener* %0, i8* %1) {
%3 = alloca %struct.evconnlistener*
%4 = alloca i8*
store %struct.evconnlistener* %0, %struct.evconnlistener** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i32, i32* @errno
%7 = call i8* @strerror(i32 %6)
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
%struct.evconnlistener = type { i32 }
@stderr = global i32 0
@.str = [30 x i8] c"Error on socket listener: %s\0A\00"
@errno = global i32 0
define void @listener_error(%struct.evconnlistener* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = load i32, i32* @errno
%5 = tail call i8* @strerror(i32 %4)
%6 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_slli_pi32(int /*<<< orphan*/, int);
__m64 test_mm_slli_pi32(__m64 a) { return _mm_slli_pi32(a, 3); }


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

x86 assembly (clang, -O2):
<test_mm_slli_pi32>:
mov    $0x3,%esi
jmp    1030 <_mm_slli_pi32@plt>

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

LLVM IR (-O2):
define i32 @test_mm_slli_pi32(i32 %0) {
%2 = tail call i32 @_mm_slli_pi32(i32 %0, i32 3)
ret i32 %2
}
/* Variables and functions */
scalar_t__ isspace(char);
size_t strlen(char *);
char *ltrim(char *src) {
  size_t i = 0;
  char *p = src;
  size_t len = strlen(src);
  for (; (i < len) && (isspace(*p)); p++) {
    ;
  }
  return p;
}


x86 assembly (clang, -O0):
<ltrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    -0x20(%rbp),%rcx
mov    %al,-0x21(%rbp)
jae    1172 <ltrim+0x52>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    1182 <ltrim+0x62>
jmp    1198 <ltrim+0x78>
jmp    1187 <ltrim+0x67>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1149 <ltrim+0x29>
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltrim>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1134 <ltrim+0x24>
movsbl %al,%edi
nopl   (%rax)
call   1030 <isspace@plt>
test   %rax,%rax
je     1134 <ltrim+0x24>
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
jmp    1120 <ltrim+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ltrim(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1
%5 = tail call i64 @isspace(i8 signext %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %4, %7
%8 = phi i8* [ %9, %7 ], [ %0, %4 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = tail call i64 @isspace(i8 signext %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %7
13: ; preds = %7, %4, %1
%14 = phi i8* [ %0, %1 ], [ %0, %4 ], [ %9, %7 ]
ret i8* %14
}
double log10(double n) { return 0.0; }


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

x86 assembly (clang, -O2):
<log10>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @log10(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @log10(double %0) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int i;
  unsigned long long j;
  i = 10;
  j = 100;
  j = (unsigned long long)i;
  assert(j == 10);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
movq   $0x64,-0x10(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0xa,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 10, i32* %1
store i64 100, i64* %2
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = icmp eq i64 %5, 10
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
XOffsetRegion() {}


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

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

LLVM IR (-O0):
define i32 @XOffsetRegion() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XOffsetRegion() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void show_help(void) {
  printf("Usage: %s [OPTION]...\n\nOptions:\n    -h, --help\t\tdisplay this "
         "help\n    -V, --version\tdisplay version information\n\nReport bugs "
         "to <bulliver@gmail.com>\n",
         "df");
}


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

x86 assembly (clang, -O2):
<show_help>:
lea    0xee9(%rip),%rdi
lea    0xf78(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [150 x i8] c"Usage: %s [OPTION]...\0A\0AOptions:\0A -h, --help\09\09display this help\0A -V, --version\09display version information\0A\0AReport bugs to <bulliver@gmail.com>\0A\00"
@.str.1 = [3 x i8] c"df\00"
define void @show_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [150 x i8] c"Usage: %s [OPTION]...\0A\0AOptions:\0A -h, --help\09\09display this help\0A -V, --version\09display version information\0A\0AReport bugs to <bulliver@gmail.com>\0A\00"
@.str.1 = [3 x i8] c"df\00"
define void @show_help() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello(void) { printf("hello!!\n"); }


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"hello!!\00"
define void @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int __m128i;

/* Variables and functions */
__m128i _mm_F(__m128i x, __m128i y, __m128i z) { return ((x) ^ (y) ^ (z)); }


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

x86 assembly (clang, -O2):
<_mm_F>:
mov    %edi,%eax
xor    %esi,%eax
xor    %edx,%eax
ret

LLVM IR (-O0):
define i32 @_mm_F(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = xor i32 %7, %8
%10 = load i32, i32* %6
%11 = xor i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @_mm_F(i32 %0, i32 %1, i32 %2) {
%4 = xor i32 %1, %0
%5 = xor i32 %4, %2
ret i32 %5
}
int count_occurrences(char *string, char c) {
  int count;
  for (count = 0; string[count]; string[count] == c ? count++ : *string++)
    ;
  return count;
}


x86 assembly (clang, -O0):
<count_occurrences>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1169 <count_occurrences+0x69>
jmp    112c <count_occurrences+0x2c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    1152 <count_occurrences+0x52>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1164 <count_occurrences+0x64>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
jmp    1115 <count_occurrences+0x15>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_occurrences>:
mov    (%rdi),%cl
test   %cl,%cl
je     1132 <count_occurrences+0x32>
xor    %r8d,%r8d
nopl   0x0(%rax)
xor    %eax,%eax
xor    %edx,%edx
cmp    %sil,%cl
sete   %al
setne  %dl
add    %rdx,%rdi
mov    %r8d,%ecx
add    %rcx,%rax
movzbl (%rdi,%rax,1),%ecx
mov    %eax,%r8d
test   %cl,%cl
jne    1110 <count_occurrences+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @count_occurrences(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i32
store i8* %0, i8** %3
store i8 %1, i8* %4
store i32 0, i32* %5
br label %6
6: ; preds = %32, %2
%7 = load i8*, i8** %3
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = icmp ne i8 %11, 0
br i1 %12, label %13, label %34
13: ; preds = %6
br label %14
14: ; preds = %13
%15 = load i8*, i8** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = load i8, i8* %4
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %20, %22
br i1 %23, label %24, label %27
24: ; preds = %14
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
store i32 %26, i32* %5
br label %32
27: ; preds = %14
%28 = load i8*, i8** %3
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %3
%30 = load i8, i8* %28
%31 = sext i8 %30 to i32
br label %32
32: ; preds = %27, %24
%33 = phi i32 [ %25, %24 ], [ %31, %27 ]
br label %6
34: ; preds = %6
%35 = load i32, i32* %5
ret i32 %35
}

LLVM IR (-O2):
define i32 @count_occurrences(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %19, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %17, %5 ], [ %3, %2 ]
%7 = phi i32 [ %14, %5 ], [ 0, %2 ]
%8 = phi i8* [ %12, %5 ], [ %0, %2 ]
%9 = icmp eq i8 %6, %1
%10 = xor i1 %9, true
%11 = zext i1 %10 to i64
%12 = getelementptr i8, i8* %8, i64 %11
%13 = zext i1 %9 to i32
%14 = add nuw nsw i32 %7, %13
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %12, i64 %15
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %5
19: ; preds = %5, %2
%20 = phi i32 [ 0, %2 ], [ %14, %5 ]
ret i32 %20
}