xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_lock(int /*<<< orphan*/ *);
int pthread_mutex_trylock(int /*<<< orphan*/ *);
int evthread_posix_lock(unsigned mode, void *_lock) {
  pthread_mutex_t *lock = _lock;
  if (mode & 0x10)
    return pthread_mutex_trylock(lock);
  else
    return pthread_mutex_lock(lock);
}


x86 assembly (clang, -O0):
<evthread_posix_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1157 <evthread_posix_lock+0x37>
mov    -0x18(%rbp),%rdi
call   1030 <pthread_mutex_trylock@plt>
mov    %eax,-0x4(%rbp)
jmp    1163 <evthread_posix_lock+0x43>
mov    -0x18(%rbp),%rdi
call   1040 <pthread_mutex_lock@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evthread_posix_lock>:
test   $0x10,%dil
jne    112e <evthread_posix_lock+0xe>
mov    %rsi,%rdi
jmp    1040 <pthread_mutex_lock@plt>
mov    %rsi,%rdi
jmp    1030 <pthread_mutex_trylock@plt>

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

LLVM IR (-O2):
define i32 @evthread_posix_lock(i32 %0, i8* %1) {
%3 = bitcast i8* %1 to i32*
%4 = and i32 %0, 16
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @pthread_mutex_trylock(i32* %3)
br label %10
8: ; preds = %2
%9 = tail call i32 @pthread_mutex_lock(i32* %3)
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ %7, %6 ], [ %9, %8 ]
ret i32 %11
}
int constrain_int(int x, int min, int max) {
  if (min > max) {
    return min;
  }
  if (x < min) {
    return min;
  } else if (x > max) {
    return max;
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<constrain_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1124 <constrain_int+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <constrain_int+0x58>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113b <constrain_int+0x3b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <constrain_int+0x58>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1152 <constrain_int+0x52>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <constrain_int+0x58>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<constrain_int>:
cmp    %edx,%edi
mov    %edi,%eax
cmovg  %edx,%eax
cmp    %edx,%esi
cmovg  %esi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @constrain_int(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, %2
%5 = icmp slt i32 %0, %1
%6 = or i1 %5, %4
%7 = icmp sgt i32 %0, %2
%8 = select i1 %7, i32 %2, i32 %0
%9 = select i1 %6, i32 %1, i32 %8
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
int ns_name_compress(char const *, int /*<<< orphan*/ *, size_t,
                     int /*<<< orphan*/ const **, int /*<<< orphan*/ const **);
int dn_comp(const char *src, u_char *dst, int dstsiz, u_char **dnptrs,
            u_char **lastdnptr) {
  return (ns_name_compress(src, dst, (size_t)dstsiz, (const u_char **)dnptrs,
                           (const u_char **)lastdnptr));
}


x86 assembly (clang, -O0):
<dn_comp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <ns_name_compress@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dn_comp>:
movslq %edx,%rdx
jmp    1030 <ns_name_compress@plt>

LLVM IR (-O0):
define i32 @dn_comp(i8* %0, i32* %1, i32 %2, i32** %3, i32** %4) {
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32**
%10 = alloca i32**
store i8* %0, i8** %6
store i32* %1, i32** %7
store i32 %2, i32* %8
store i32** %3, i32*** %9
store i32** %4, i32*** %10
%11 = load i8*, i8** %6
%12 = load i32*, i32** %7
%13 = load i32, i32* %8
%14 = sext i32 %13 to i64
%15 = load i32**, i32*** %9
%16 = load i32**, i32*** %10
%17 = call i32 @ns_name_compress(i8* %11, i32* %12, i64 %14, i32** %15, i32** %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @dn_comp(i8* %0, i32* %1, i32 %2, i32** %3, i32** %4) {
%6 = sext i32 %2 to i64
%7 = tail call i32 @ns_name_compress(i8* %0, i32* %1, i64 %6, i32** %3, i32** %4)
ret i32 %7
}
double funcion(double a, unsigned valor) {
  double x = 1.0;
  unsigned j;
  for (j = 0; j < valor; j++) {
    x *= a;
  }
  return x;
}


x86 assembly (clang, -O0):
<funcion>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  0xeec(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1149 <funcion+0x49>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1120 <funcion+0x20>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcion>:
test   %edi,%edi
je     111b <funcion+0x1b>
lea    -0x1(%rdi),%ecx
mov    %edi,%eax
and    $0x7,%eax
cmp    $0x7,%ecx
jae    1124 <funcion+0x24>
movsd  0xee7(%rip),%xmm1
jmp    1155 <funcion+0x55>
movsd  0xedd(%rip),%xmm0
ret
and    $0xfffffff8,%edi
movsd  0xed1(%rip),%xmm1
nop
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
add    $0xfffffff8,%edi
jne    1130 <funcion+0x30>
test   %eax,%eax
je     1169 <funcion+0x69>
nopl   0x0(%rax)
mulsd  %xmm0,%xmm1
add    $0xffffffff,%eax
jne    1160 <funcion+0x60>
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @funcion(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
%6 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
store double 1.000000e+00, double* %5
store i32 0, i32* %6
br label %7
7: ; preds = %15, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp ult i32 %8, %9
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = load double, double* %3
%13 = load double, double* %5
%14 = fmul double %13, %12
store double %14, double* %5
br label %15
15: ; preds = %11
%16 = load i32, i32* %6
%17 = add i32 %16, 1
store i32 %17, i32* %6
br label %7
18: ; preds = %7
%19 = load double, double* %5
ret double %19
}

LLVM IR (-O2):
define double @funcion(double %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %33, label %4
4: ; preds = %2
%5 = add i32 %1, -1
%6 = and i32 %1, 7
%7 = icmp ult i32 %5, 7
br i1 %7, label %23, label %8
8: ; preds = %4
%9 = and i32 %1, -8
br label %10
10: ; preds = %10, %8
%11 = phi double [ 1.000000e+00, %8 ], [ %20, %10 ]
%12 = phi i32 [ 0, %8 ], [ %21, %10 ]
%13 = fmul double %11, %0
%14 = fmul double %13, %0
%15 = fmul double %14, %0
%16 = fmul double %15, %0
%17 = fmul double %16, %0
%18 = fmul double %17, %0
%19 = fmul double %18, %0
%20 = fmul double %19, %0
%21 = add i32 %12, 8
%22 = icmp eq i32 %21, %9
br i1 %22, label %23, label %10
23: ; preds = %10, %4
%24 = phi double [ undef, %4 ], [ %20, %10 ]
%25 = phi double [ 1.000000e+00, %4 ], [ %20, %10 ]
%26 = icmp eq i32 %6, 0
br i1 %26, label %33, label %27
27: ; preds = %23, %27
%28 = phi double [ %30, %27 ], [ %25, %23 ]
%29 = phi i32 [ %31, %27 ], [ 0, %23 ]
%30 = fmul double %28, %0
%31 = add i32 %29, 1
%32 = icmp eq i32 %31, %6
br i1 %32, label %33, label %27
33: ; preds = %23, %27, %2
%34 = phi double [ 1.000000e+00, %2 ], [ %24, %23 ], [ %30, %27 ]
ret double %34
}
/* Variables and functions */
int /*<<< orphan*/ g();
int main(int argc, char *argv[]) {
  g();
  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 <g@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @g()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @g()
ret i32 0
}
void S_EndPrecaching(void) {}


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

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

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

LLVM IR (-O2):
define void @S_EndPrecaching() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, float);
float sysfs_write_attr_str(char const *, char *, int, int /*<<< orphan*/ *);
int sysfs_write_attr_float(const char *path, float data) {
  float rc;
  ssize_t write_len;
  char buff[32];
  snprintf(buff, 32, "%f", data);
  rc = sysfs_write_attr_str(path, buff, 32, &write_len);
  return rc;
}


x86 assembly (clang, -O0):
<sysfs_write_attr_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
lea    -0x40(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
mov    $0x20,%esi
lea    0xeba(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x20,%edx
lea    -0x14(%rbp),%rcx
call   1040 <sysfs_write_attr_str@plt>
movss  %xmm0,-0x10(%rbp)
cvttss2si -0x10(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysfs_write_attr_float>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rdi,%rbx
lea    0xecf(%rip),%rdx
lea    0x10(%rsp),%r14
mov    %r14,%rdi
mov    $0x20,%esi
call   1030 <snprintf@plt>
lea    0xc(%rsp),%rcx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x20,%edx
call   1040 <sysfs_write_attr_str@plt>
cvttss2si %xmm0,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i32 @sysfs_write_attr_float(i8* %0, float %1) {
%3 = alloca i8*
%4 = alloca float
%5 = alloca float
%6 = alloca i32
%7 = alloca [32 x i8]
store i8* %0, i8** %3
store float %1, float* %4
%8 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%9 = load float, float* %4
%10 = call i32 @snprintf(i8* %8, i32 32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %9)
%11 = load i8*, i8** %3
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%13 = call float @sysfs_write_attr_str(i8* %11, i8* %12, i32 32, i32* %6)
store float %13, float* %5
%14 = load float, float* %5
%15 = fptosi float %14 to i32
ret i32 %15
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @sysfs_write_attr_float(i8* %0, float %1) {
%3 = alloca i32
%4 = alloca [32 x i8]
%5 = bitcast i32* %3 to i8*
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%7 = call i32 @snprintf(i8* %6, i32 32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %1)
%8 = call float @sysfs_write_attr_str(i8* %0, i8* %6, i32 32, i32* %3)
%9 = fptosi float %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
int main() {
  char c_string[100];
  int len;
  printf("请输入字符串 ==>");
  gets(c_string);
  len = strlen(c_string);
  printf("输入字符串长度是 %d \n", len);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%esi
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [23 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E5\AD\97\E7\AC\A6\E4\B8\B2 ==>\00"
@.str.1 = [30 x i8] c"\E8\BE\93\E5\85\A5\E5\AD\97\E7\AC\A6\E4\B8\B2\E9\95\BF\E5\BA\A6\E6\98\AF %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = call i32 @gets(i8* %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = call i32 @strlen(i8* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E5\AD\97\E7\AC\A6\E4\B8\B2 ==>\00"
@.str.1 = [30 x i8] c"\E8\BE\93\E5\85\A5\E5\AD\97\E7\AC\A6\E4\B8\B2\E9\95\BF\E5\BA\A6\E6\98\AF %d \0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call i32 @strlen(i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
double average(double a, double b) { return (a + b) / 2; }


x86 assembly (clang, -O0):
<average>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<average>:
addsd  %xmm1,%xmm0
mulsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @average(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fadd double %5, %6
%8 = fdiv double %7, 2.000000e+00
ret double %8
}

LLVM IR (-O2):
define double @average(double %0, double %1) {
%3 = fadd double %0, %1
%4 = fmul double %3, 5.000000e-01
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ debug_of_logging();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("CONFIG_FOO is not defined\n");
  printf("CONFIG_BAR is not defined\n");
  debug_of_logging();
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [26 x i8] c"CONFIG_FOO is not defined\00"
@str.2 = [26 x i8] c"CONFIG_BAR is not defined\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 (...) @debug_of_logging()
ret i32 0
}
int atomicFetchAndSub(volatile int *i, int j) {
  return __sync_fetch_and_sub(i, j);
}


x86 assembly (clang, -O0):
<atomicFetchAndSub>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%eax
neg    %eax
lock xadd %eax,(%rcx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomicFetchAndSub>:
mov    %esi,%eax
neg    %eax
lock xadd %eax,(%rdi)
ret

LLVM IR (-O0):
define i32 @atomicFetchAndSub(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = atomicrmw sub i32* %5, i32 %6 seq_cst
ret i32 %7
}

LLVM IR (-O2):
define i32 @atomicFetchAndSub(i32* nocapture %0, i32 %1) {
%3 = atomicrmw sub i32* %0, i32 %1 seq_cst
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int getsockopt(int fd, int level, int optname, void *optval,
               socklen_t *optlen) {
  __set_errno(ENOSYS);
  return -1;
}


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

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

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @getsockopt(i32 %0, i32 %1, i32 %2, i8* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32* %4, i32** %10
%11 = load i32, i32* @ENOSYS
%12 = call i32 @__set_errno(i32 %11)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @getsockopt(i32 %0, i32 %1, i32 %2, i8* nocapture readnone %3, i32* nocapture readnone %4) {
%6 = load i32, i32* @ENOSYS
%7 = tail call i32 @__set_errno(i32 %6)
ret i32 -1
}
int config_CS_ANTICASC(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @config_CS_ANTICASC() {
ret i32 0
}
int getInvisibleFromInvisibleActiveElement(int element) {
  return (element == (864 + 11)   ? 62
          : element == (864 + 12) ? 46
          : element == (864 + 13) ? 316
                                  : element);
}


x86 assembly (clang, -O0):
<getInvisibleFromInvisibleActiveElement>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x36b,-0x4(%rbp)
jne    1121 <getInvisibleFromInvisibleActiveElement+0x21>
mov    $0x3e,%eax
mov    %eax,-0x8(%rbp)
jmp    1167 <getInvisibleFromInvisibleActiveElement+0x67>
cmpl   $0x36c,-0x4(%rbp)
jne    113b <getInvisibleFromInvisibleActiveElement+0x3b>
mov    $0x2e,%eax
mov    %eax,-0xc(%rbp)
jmp    1161 <getInvisibleFromInvisibleActiveElement+0x61>
cmpl   $0x36d,-0x4(%rbp)
jne    1155 <getInvisibleFromInvisibleActiveElement+0x55>
mov    $0x13c,%eax
mov    %eax,-0x10(%rbp)
jmp    115b <getInvisibleFromInvisibleActiveElement+0x5b>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getInvisibleFromInvisibleActiveElement>:
cmp    $0x36b,%edi
je     1116 <getInvisibleFromInvisibleActiveElement+0x16>
cmp    $0x36c,%edi
jne    111c <getInvisibleFromInvisibleActiveElement+0x1c>
mov    $0x2e,%eax
ret
mov    $0x3e,%eax
ret
cmp    $0x36d,%edi
mov    $0x13c,%eax
cmovne %edi,%eax
ret

LLVM IR (-O0):
define i32 @getInvisibleFromInvisibleActiveElement(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 875
br i1 %4, label %5, label %6
5: ; preds = %1
br label %20
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 876
br i1 %8, label %9, label %10
9: ; preds = %6
br label %18
10: ; preds = %6
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 877
br i1 %12, label %13, label %14
13: ; preds = %10
br label %16
14: ; preds = %10
%15 = load i32, i32* %2
br label %16
16: ; preds = %14, %13
%17 = phi i32 [ 316, %13 ], [ %15, %14 ]
br label %18
18: ; preds = %16, %9
%19 = phi i32 [ 46, %9 ], [ %17, %16 ]
br label %20
20: ; preds = %18, %5
%21 = phi i32 [ 62, %5 ], [ %19, %18 ]
ret i32 %21
}

LLVM IR (-O2):
define i32 @getInvisibleFromInvisibleActiveElement(i32 %0) {
switch i32 %0, label %2 [
i32 875, label %6
i32 876, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 877
%4 = select i1 %3, i32 316, i32 %0
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %2
%7 = phi i32 [ 62, %1 ], [ %4, %2 ], [ 46, %5 ]
ret i32 %7
}
/* Type definitions */
typedef scalar_t__ uint64_t;
struct timespec {
  unsigned long long tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
uint64_t nanos_since_epoch() {
  struct timespec t;
  clock_gettime(CLOCK_REALTIME, &t);
  return t.tv_sec * 1000000000ULL + t.tv_nsec;
}


x86 assembly (clang, -O0):
<nanos_since_epoch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,-0x10(%rbp),%rax
3b
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nanos_since_epoch>:
sub    $0x18,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,0x8(%rsp),%rax
9a 3b
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@CLOCK_REALTIME = global i32 0
define i64 @nanos_since_epoch() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000000000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%8 = load i64, i64* %7
%9 = add i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@CLOCK_REALTIME = global i32 0
define i64 @nanos_since_epoch() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = mul i64 %6, 1000000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add i64 %7, %9
ret i64 %10
}
/* Variables and functions */
int f3(int);
int f4(int f4arg) {
  int f4loc;
  f4loc = f3(f4arg - 1);
  return f4loc;
}


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

x86 assembly (clang, -O2):
<f4>:
add    $0xffffffff,%edi
jmp    1030 <f3@plt>

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

LLVM IR (-O2):
define i32 @f4(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = tail call i32 @f3(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ write_instr(int);
void eval_bit_and(void) { write_instr(0x20); }


x86 assembly (clang, -O0):
<eval_bit_and>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
call   1030 <write_instr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_bit_and>:
mov    $0x20,%edi
jmp    1030 <write_instr@plt>

LLVM IR (-O0):
define void @eval_bit_and() {
%1 = call i32 @write_instr(i32 32)
ret void
}

LLVM IR (-O2):
define void @eval_bit_and() {
%1 = tail call i32 @write_instr(i32 32)
ret void
}
void foo793(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo793(i32 %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int ones(int, int);
int x_true_vars(int, int);
int q(uint32_t rn, int rank, int num_true_vars) {
  uint32_t m;
  if (num_true_vars > rank) {
    return -1;
  }
  m = x_true_vars(rank, num_true_vars);
  return ones(rn & m, rank);
}


x86 assembly (clang, -O0):
<q>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1149 <q+0x29>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <q+0x48>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1040 <x_true_vars@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
and    -0x14(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <ones@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q>:
cmp    %esi,%edx
jle    112a <q+0xa>
mov    $0xffffffff,%eax
ret
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
mov    %edx,%esi
call   1040 <x_true_vars@plt>
and    %eax,%ebp
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <ones@plt>

LLVM IR (-O0):
define i32 @q(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %3
store i32 -1, i32* %4
br label %22
13: ; preds = %3
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = call i32 @x_true_vars(i32 %14, i32 %15)
store i32 %16, i32* %8
%17 = load i32, i32* %5
%18 = load i32, i32* %8
%19 = and i32 %17, %18
%20 = load i32, i32* %6
%21 = call i32 @ones(i32 %19, i32 %20)
store i32 %21, i32* %4
br label %22
22: ; preds = %13, %12
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
define i32 @q(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, %1
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = tail call i32 @x_true_vars(i32 %1, i32 %2)
%7 = and i32 %6, %0
%8 = tail call i32 @ones(i32 %7, i32 %1)
br label %9
9: ; preds = %3, %5
%10 = phi i32 [ %8, %5 ], [ -1, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ ERR_free_strings();
void free_crypto(void) { ERR_free_strings(); }


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

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

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

LLVM IR (-O2):
define void @free_crypto() {
%1 = tail call i32 (...) @ERR_free_strings()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CL_InitInputDynvars();
void CL_InitDynvars(void) { CL_InitInputDynvars(); }


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

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

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

LLVM IR (-O2):
define void @CL_InitDynvars() {
%1 = tail call i32 (...) @CL_InitInputDynvars()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void asmheader() {
  printf("#assemble/link with 'gcc file.s -o file\n");
  printf("	.text\n");
  printf(".globl _main\n");
  printf("_main:\n");
  printf("	pushl	%%ebp\n");
}


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

x86 assembly (clang, -O2):
<asmheader>:
push   %rax
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
lea    0xf02(%rip),%rdi
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
lea    0xea8(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"#assemble/link with 'gcc file.s -o file\0A\00"
@.str.1 = [8 x i8] c"\09.text\0A\00"
@.str.2 = [14 x i8] c".globl _main\0A\00"
@.str.3 = [8 x i8] c"_main:\0A\00"
@.str.4 = [14 x i8] c"\09pushl\09%%ebp\0A\00"
define void @asmheader() {
%1 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.4 = [14 x i8] c"\09pushl\09%%ebp\0A\00"
@str = [40 x i8] c"#assemble/link with 'gcc file.s -o file\00"
@str.5 = [7 x i8] c"\09.text\00"
@str.6 = [13 x i8] c".globl _main\00"
@str.7 = [7 x i8] c"_main:\00"
define void @asmheader() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
ret void
}
void backbuffer_(n) int *n;
{ backbuffer(*n); }


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

x86 assembly (clang, -O2):
<backbuffer_>:
mov    (%rdi),%edi
xor    %eax,%eax
jmp    1030 <backbuffer@plt>

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

LLVM IR (-O2):
define void @backbuffer_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @backbuffer to i32 (i32, ...)*)(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, double);
void print_soln(int n, int nrhs, double *soln) {
  register int i;
  for (i = 0; i < n; i++)
    printf("\t%d: %.10f\n", i, soln[i]);
}


x86 assembly (clang, -O0):
<print_soln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115f <print_soln+0x4f>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <print_soln+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_soln>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1149 <print_soln+0x39>
mov    %rdx,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%rbx,8),%xmm0
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_soln+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [12 x i8] c"\09%d: %.10f\0A\00"
define void @print_soln(i32 %0, i32 %1, double* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store double* %2, double** %6
store i32 0, i32* %7
br label %8
8: ; preds = %20, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = load i32, i32* %7
%14 = load double*, double** %6
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds double, double* %14, i64 %16
%18 = load double, double* %17
%19 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %13, double %18)
br label %20
20: ; preds = %12
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
store i32 %22, i32* %7
br label %8
23: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"\09%d: %.10f\0A\00"
define void @print_soln(i32 %0, i32 %1, double* nocapture %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %13, %7 ]
%9 = getelementptr inbounds double, double* %2, i64 %8
%10 = load double, double* %9
%11 = trunc i64 %8 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %11, double %10)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %15, label %7
15: ; preds = %7, %3
ret void
}
/* Variables and functions */
char getchar();
void wait_for_key(void) {
  while (getchar() != '\n')
    ;
}


x86 assembly (clang, -O0):
<wait_for_key>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <wait_for_key+0x9>
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1131 <wait_for_key+0x21>
jmp    1119 <wait_for_key+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_for_key>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <wait_for_key+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @wait_for_key() {
br label %1
1: ; preds = %5, %0
%2 = call signext i8 (...) @getchar()
%3 = sext i8 %2 to i32
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @wait_for_key() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ process_file(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int main(void) {
  process_file(stdin);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <process_file@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stdin
%3 = call i32 @process_file(i32 %2)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @process_file(i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void PrintHash(const unsigned char *hash, int size) {
  int i;
  for (i = 0; i < size; i++) {
    printf("%02x", hash[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<PrintHash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <PrintHash+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movzbl (%rax,%rcx,1),%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <PrintHash+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintHash>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1158 <PrintHash+0x38>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movzbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <PrintHash+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%02x\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @PrintHash(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %21
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %10
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%02x\00"
define void @PrintHash(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = tail call i32 @putchar(i32 10)
ret void
}
void UI_dup_error_string(void) {}


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

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

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

LLVM IR (-O2):
define void @UI_dup_error_string() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void term_flush() { fflush(stdout); }


x86 assembly (clang, -O0):
<term_flush>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_flush>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @term_flush() {
%1 = load i32, i32* @stdout
%2 = call i32 @fflush(i32 %1)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @term_flush() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fflush(i32 %1)
ret void
}
void genbc1f_test() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ HTTP_NOTFOUND;
int /*<<< orphan*/ evhttp_send_error(struct evhttp_request *,
                                     int /*<<< orphan*/, char *);
void notfound(struct evhttp_request *request, void *params) {
  evhttp_send_error(request, HTTP_NOTFOUND, "Not Found");
}


x86 assembly (clang, -O0):
<notfound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdx
call   1030 <evhttp_send_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<notfound>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdx
jmp    1030 <evhttp_send_error@plt>

LLVM IR (-O0):
%struct.evhttp_request = type { i32 }
@HTTP_NOTFOUND = global i32 0
@.str = [10 x i8] c"Not Found\00"
define void @notfound(%struct.evhttp_request* %0, i8* %1) {
%3 = alloca %struct.evhttp_request*
%4 = alloca i8*
store %struct.evhttp_request* %0, %struct.evhttp_request** %3
store i8* %1, i8** %4
%5 = load %struct.evhttp_request*, %struct.evhttp_request** %3
%6 = load i32, i32* @HTTP_NOTFOUND
%7 = call i32 @evhttp_send_error(%struct.evhttp_request* %5, i32 %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.evhttp_request = type { i32 }
@HTTP_NOTFOUND = global i32 0
@.str = [10 x i8] c"Not Found\00"
define void @notfound(%struct.evhttp_request* %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @HTTP_NOTFOUND
%4 = tail call i32 @evhttp_send_error(%struct.evhttp_request* %0, i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
int isblank(int c) {
  switch (c) {
  case ' ':
  case '\t':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<isblank>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x9,%eax
je     112c <isblank+0x2c>
jmp    111b <isblank+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
jne    1138 <isblank+0x38>
jmp    112c <isblank+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    113f <isblank+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isblank>:
cmp    $0x20,%edi
sete   %al
cmp    $0x9,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isblank(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 32, label %5
i32 9, label %5
]
5: ; preds = %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @isblank(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = icmp eq i32 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void *malloc(size_t);
void *assert_malloc(size_t size) {
  void *result = malloc(size);
  assert(result != NULL || size == 0);
  return result;
}


x86 assembly (clang, -O0):
<assert_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
jne    1154 <assert_malloc+0x34>
cmpq   $0x0,-0x8(%rbp)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_malloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
setne  %al
test   %rbx,%rbx
sete   %cl
or     %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @assert_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load i64, i64* %2
%10 = icmp eq i64 %9, 0
br label %11
11: ; preds = %8, %1
%12 = phi i1 [ true, %1 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define noalias i8* @assert_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp ne i8* %2, null
%4 = icmp eq i64 %0, 0
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ arc(int, int, int, int, int, int);
int circle(int x, int y, int r) {
  arc(x, y, x + r, y, x + r, y);
  return 0;
}


x86 assembly (clang, -O0):
<circle>:
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),%esi
mov    -0x4(%rbp),%edx
add    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%r8d
add    -0xc(%rbp),%r8d
mov    -0x8(%rbp),%r9d
call   1030 <arc@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<circle>:
push   %rax
add    %edi,%edx
mov    %esi,%ecx
mov    %edx,%r8d
mov    %esi,%r9d
call   1030 <arc@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @circle(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* %4
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %5
%13 = load i32, i32* %4
%14 = load i32, i32* %6
%15 = add nsw i32 %13, %14
%16 = load i32, i32* %5
%17 = call i32 @arc(i32 %7, i32 %8, i32 %11, i32 %12, i32 %15, i32 %16)
ret i32 0
}

LLVM IR (-O2):
define i32 @circle(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, %0
%5 = tail call i32 @arc(i32 %0, i32 %1, i32 %4, i32 %1, i32 %4, i32 %1)
ret i32 0
}