xunge/DecIR huggingface dataset:
int xmlUCSIsHanunoo(int code) {
  return (((code >= 0x1720) && (code <= 0x173F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsHanunoo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1720,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsHanunoo+0x26>
cmpl   $0x173f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsHanunoo>:
and    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x1720,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsHanunoo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 5920
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 5951
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsHanunoo(i32 %0) {
%2 = and i32 %0, -32
%3 = icmp eq i32 %2, 5920
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, int *, int);
int **new_matrix2i(int, int);
int **new_matrix2i_data(int n, int m, int *data) {
  int **X = new_matrix2i(n, m);
  memcpy(X[0], data, n * m * sizeof(int));
  return X;
}


x86 assembly (clang, -O0):
<new_matrix2i_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <new_matrix2i@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_matrix2i_data>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
call   1040 <new_matrix2i@plt>
mov    %rax,%r15
mov    (%rax),%rdi
imul   %ebp,%ebx
shl    $0x2,%ebx
mov    %r14,%rsi
mov    %ebx,%edx
call   1030 <memcpy@plt>
mov    %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32** @new_matrix2i_data(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* %4
%9 = load i32, i32* %5
%10 = call i32** @new_matrix2i(i32 %8, i32 %9)
store i32** %10, i32*** %7
%11 = load i32**, i32*** %7
%12 = getelementptr inbounds i32*, i32** %11, i64 0
%13 = load i32*, i32** %12
%14 = load i32*, i32** %6
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = mul nsw i32 %15, %16
%18 = sext i32 %17 to i64
%19 = mul i64 %18, 4
%20 = trunc i64 %19 to i32
%21 = call i32 @memcpy(i32* %13, i32* %14, i32 %20)
%22 = load i32**, i32*** %7
ret i32** %22
}

LLVM IR (-O2):
define i32** @new_matrix2i_data(i32 %0, i32 %1, i32* %2) {
%4 = tail call i32** @new_matrix2i(i32 %0, i32 %1)
%5 = load i32*, i32** %4
%6 = shl i32 %0, 2
%7 = mul i32 %6, %1
%8 = tail call i32 @memcpy(i32* %5, i32* %2, i32 %7)
ret i32** %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ puts(char *);
void print_help(void) {
  printf("nTox %.1f - Command-line tox-core client\n", 0.1);
  puts("Options:");
  puts("\t-h\t-\tPrint this help and exit.");
  puts("\t-f\t-\tSpecify a keyfile to read (or write to) from.");
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xedd(%rip),%rdi
movsd  0xecd(%rip),%xmm0
call   1040 <printf@plt>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
lea    0xef0(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
push   %rax
lea    0xee0(%rip),%rdi
movsd  0xed0(%rip),%xmm0
call   1040 <printf@plt>
lea    0xef6(%rip),%rdi
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
lea    0xf07(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"nTox %.1f - Command-line tox-core client\0A\00"
@.str.1 = [9 x i8] c"Options:\00"
@.str.2 = [32 x i8] c"\09-h\09-\09Print this help and exit.\00"
@.str.3 = [52 x i8] c"\09-f\09-\09Specify a keyfile to read (or write to) from.\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), double 1.000000e-01)
%2 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"nTox %.1f - Command-line tox-core client\0A\00"
@.str.1 = [9 x i8] c"Options:\00"
@.str.2 = [32 x i8] c"\09-h\09-\09Print this help and exit.\00"
@.str.3 = [52 x i8] c"\09-f\09-\09Specify a keyfile to read (or write to) from.\00"
define void @print_help() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), double 1.000000e-01)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
ret void
}
void llong_to_float(float *dest, long long *src) { *dest = (float)*src; }


x86 assembly (clang, -O0):
<llong_to_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cvtsi2ssq (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<llong_to_float>:
cvtsi2ssq (%rsi),%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @llong_to_float(float* %0, i64* %1) {
%3 = alloca float*
%4 = alloca i64*
store float* %0, float** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to float
%8 = load float*, float** %3
store float %7, float* %8
ret void
}

LLVM IR (-O2):
define void @llong_to_float(float* nocapture writeonly %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = sitofp i64 %3 to float
store float %4, float* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_SETLK;
int /*<<< orphan*/ F_UNLCK;
int fd_fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/, char *);
int fd_unlock(int fd, char *filepath) {
  return fd_fcntl(fd, F_SETLK, F_UNLCK, filepath);
}


x86 assembly (clang, -O0):
<fd_unlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
mov    0x2eae(%rip),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rcx
call   1030 <fd_fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_unlock>:
mov    %rsi,%rcx
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
mov    0x2ebd(%rip),%rax
mov    (%rax),%edx
jmp    1030 <fd_fcntl@plt>

LLVM IR (-O0):
@F_SETLK = global i32 0
@F_UNLCK = global i32 0
define i32 @fd_unlock(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i32, i32* @F_SETLK
%7 = load i32, i32* @F_UNLCK
%8 = load i8*, i8** %4
%9 = call i32 @fd_fcntl(i32 %5, i32 %6, i32 %7, i8* %8)
ret i32 %9
}

LLVM IR (-O2):
@F_SETLK = global i32 0
@F_UNLCK = global i32 0
define i32 @fd_unlock(i32 %0, i8* %1) {
%3 = load i32, i32* @F_SETLK
%4 = load i32, i32* @F_UNLCK
%5 = tail call i32 @fd_fcntl(i32 %0, i32 %3, i32 %4, i8* %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ stdout;
void dump_char(char c) {
  putchar(c);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<dump_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_char>:
push   %rax
call   1030 <putchar@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @dump_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @putchar(i8 signext %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @dump_char(i8 signext %0) {
%2 = tail call i32 @putchar(i8 signext %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
int get_permissions_kd(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_permissions_kd() {
ret i32 0
}
/* Variables and functions */
int _cmp_size_t(const void *l, const void *r) {
  size_t *pl = (size_t *)l;
  size_t *pr = (size_t *)r;
  if (*pl > *pr)
    return 1;
  else if (*pl < *pr)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<_cmp_size_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jbe    113c <_cmp_size_t+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1163 <_cmp_size_t+0x63>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jae    115c <_cmp_size_t+0x5c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <_cmp_size_t+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cmp_size_t>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
cmp    %rcx,%rax
sbb    %edx,%edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovbe %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @_cmp_size_t(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ugt i64 %5, %6
%8 = icmp ult i64 %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
double e2_d(double a, double b) { return (a * a - b * b) / (a * a); }


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

x86 assembly (clang, -O2):
<e2_d>:
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
movapd %xmm0,%xmm2
subsd  %xmm1,%xmm2
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @e2_d(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* %3
%7 = load double, double* %4
%8 = load double, double* %4
%9 = fmul double %7, %8
%10 = fneg double %9
%11 = call double @llvm.fmuladd.f64(double %5, double %6, double %10)
%12 = load double, double* %3
%13 = load double, double* %3
%14 = fmul double %12, %13
%15 = fdiv double %11, %14
ret double %15
}

LLVM IR (-O2):
define double @e2_d(double %0, double %1) {
%3 = fneg double %1
%4 = fmul double %3, %1
%5 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %4)
%6 = fmul double %0, %0
%7 = fdiv double %5, %6
ret double %7
}
/* Variables and functions */
double acos(double);
double sacos(double a) {
  if (a > 1)
    a = 1;
  if (a < -1)
    a = -1;
  return acos(a);
}


x86 assembly (clang, -O0):
<sacos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1141 <sacos+0x31>
movsd  0xec4(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xebf(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1161 <sacos+0x51>
movsd  0xeac(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <acos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sacos>:
movsd  0xee8(%rip),%xmm1
minsd  %xmm0,%xmm1
movsd  0xee4(%rip),%xmm0
maxsd  %xmm1,%xmm0
jmp    1030 <acos@plt>

LLVM IR (-O0):
define double @sacos(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 1.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
store double 1.000000e+00, double* %2
br label %6
6: ; preds = %5, %1
%7 = load double, double* %2
%8 = fcmp olt double %7, -1.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
store double -1.000000e+00, double* %2
br label %10
10: ; preds = %9, %6
%11 = load double, double* %2
%12 = call double @acos(double %11)
ret double %12
}

LLVM IR (-O2):
define double @sacos(double %0) {
%2 = fcmp ogt double %0, 1.000000e+00
%3 = select i1 %2, double 1.000000e+00, double %0
%4 = fcmp olt double %3, -1.000000e+00
%5 = select i1 %4, double -1.000000e+00, double %3
%6 = tail call double @acos(double %5)
ret double %6
}
void X509_NAME_ENTRY_set_data(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_andnot_pd(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_sqrt_pd(int /*<<< orphan*/);
__m128d t2(__m128d a, __m128d b) {
  a = _mm_sqrt_pd(a);
  b = _mm_sqrt_pd(b);
  return _mm_andnot_pd(a, b);
}


x86 assembly (clang, -O0):
<t2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <_mm_sqrt_pd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <_mm_sqrt_pd@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_andnot_pd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t2>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1040 <_mm_sqrt_pd@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <_mm_sqrt_pd@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_mm_andnot_pd@plt>

LLVM IR (-O0):
define i32 @t2(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 = call i32 @_mm_sqrt_pd(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @_mm_sqrt_pd(i32 %7)
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @_mm_andnot_pd(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @t2(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_sqrt_pd(i32 %0)
%4 = tail call i32 @_mm_sqrt_pd(i32 %1)
%5 = tail call i32 @_mm_andnot_pd(i32 %3, i32 %4)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int strlen(char *);
int getfontline(char *lineP, int max, FILE *inputP) {
  if (fgets(lineP, max, inputP) == NULL)
    return 0;
  else
    return strlen(lineP);
}


x86 assembly (clang, -O0):
<getfontline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1040 <fgets@plt>
cmp    $0x0,%rax
jne    1159 <getfontline+0x39>
movl   $0x0,-0x4(%rbp)
jmp    1165 <getfontline+0x45>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getfontline>:
push   %rbx
mov    %rdi,%rbx
call   1040 <fgets@plt>
test   %rax,%rax
je     1137 <getfontline+0x17>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @getfontline(i8* %0, i32 %1, i32* nocapture %2) {
%4 = tail call i32* @fgets(i8* %0, i32 %1, i32* %2)
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @strlen(i8* %0)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ 0, %3 ]
ret i32 %9
}
/* Variables and functions */
double __nv_dsub_rz(double, double);
double __dsub_rz(double __a, double __b) { return __nv_dsub_rz(__a, __b); }


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

x86 assembly (clang, -O2):
<__dsub_rz>:
jmp    1030 <__nv_dsub_rz@plt>

LLVM IR (-O0):
define double @__dsub_rz(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 = call double @__nv_dsub_rz(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @__dsub_rz(double %0, double %1) {
%3 = tail call double @__nv_dsub_rz(double %0, double %1)
ret double %3
}
int size_of_wpp_ends(int threads) {
  return 4 * threads * threads - 2 * threads;
}


x86 assembly (clang, -O0):
<size_of_wpp_ends>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
imul   -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_of_wpp_ends>:
lea    -0x2(,%rdi,4),%eax
imul   %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @size_of_wpp_ends(i32 %0) {
%2 = shl nsw i32 %0, 2
%3 = add i32 %2, -2
%4 = mul i32 %3, %0
ret i32 %4
}
int main() {
  int val = ({
    int i;
    int sum = 0;
    for (i = 0; i < 10; i++) {
      sum += i;
    }
    sum++;
    sum;
  });
  return val + 2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    113a <main+0x3a>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <main+0x19>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 48
}
int testBit_fun_uint(unsigned x, unsigned i) { return (x & 1 << i) != 0; }


x86 assembly (clang, -O0):
<testBit_fun_uint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<testBit_fun_uint>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @testBit_fun_uint(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 = shl i32 1, %6
%8 = and i32 %5, %7
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @testBit_fun_uint(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = and i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ IPPROTO_TCP;
int setsockopt(int, int /*<<< orphan*/, int, int *, int);
int socket_tcpnodelay(int s) {
  int opt = 1;
  return setsockopt(s, IPPROTO_TCP, 1, &opt, sizeof opt);
}


x86 assembly (clang, -O0):
<socket_tcpnodelay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_tcpnodelay>:
push   %rax
movl   $0x1,0x4(%rsp)
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rcx
mov    $0x1,%edx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
pop    %rcx
ret

LLVM IR (-O0):
@IPPROTO_TCP = global i32 0
define i32 @socket_tcpnodelay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @IPPROTO_TCP
%6 = call i32 @setsockopt(i32 %4, i32 %5, i32 1, i32* %3, i32 4)
ret i32 %6
}

LLVM IR (-O2):
@IPPROTO_TCP = global i32 0
define i32 @socket_tcpnodelay(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = load i32, i32* @IPPROTO_TCP
%5 = call i32 @setsockopt(i32 %0, i32 %4, i32 1, i32* %2, i32 4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *);
char *strdup(char *);
char *get_sys_string(char *table_name, char *attribute_name,
                     char *database_datatype) {
  char buffer[1024];
  sprintf(buffer,
          "echo \"alter table %s modify %s %s;\" | sql.e 2>&1 | "
          "html_paragraph_wrapper",
          table_name, attribute_name, database_datatype);
  return strdup(buffer);
}


x86 assembly (clang, -O0):
<get_sys_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x420(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xeaf(%rip),%rsi
call   1030 <sprintf@plt>
lea    -0x420(%rbp),%rdi
call   1040 <strdup@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_sys_string>:
push   %rbx
sub    $0x400,%rsp
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xec8(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [74 x i8] c"echo \22alter table %s modify %s %s;\22 | sql.e 2>&1 | html_paragraph_wrapper\00"
define i8* @get_sys_string(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [1024 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11)
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%14 = call i8* @strdup(i8* %13)
ret i8* %14
}

LLVM IR (-O2):
@.str = [74 x i8] c"echo \22alter table %s modify %s %s;\22 | sql.e 2>&1 | html_paragraph_wrapper\00"
define noalias i8* @get_sys_string(i8* %0, i8* %1, i8* %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2)
%7 = call i8* @strdup(i8* %5)
ret i8* %7
}
/* Type definitions */
struct stat {
  int st_gid;
};
typedef int gid_t;

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
gid_t fsop_path_group(const char *path) {
  struct stat st;
  if (stat(path, &st) < 0)
    return -1;
  return st.st_gid;
}


x86 assembly (clang, -O0):
<fsop_path_group>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    113f <fsop_path_group+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1145 <fsop_path_group+0x35>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsop_path_group>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
js     1129 <fsop_path_group+0x19>
mov    (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @fsop_path_group(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
const char *get_lame_os_bitness(void) {
  static const char *const strXX = "";
  static const char *const str32 = "32bits";
  static const char *const str64 = "64bits";
  switch (sizeof(void *)) {
  case 4:
    return str32;
  case 8:
    return str64;
  default:
    return strXX;
  }
}


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

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

LLVM IR (-O0):
@get_lame_os_bitness.strXX = internal constant i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i32 0, i32 0)
@.str = [1 x i8] zeroinitializer
@get_lame_os_bitness.str32 = internal constant i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0)
@.str.1 = [7 x i8] c"32bits\00"
@get_lame_os_bitness.str64 = internal constant i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0)
@.str.2 = [7 x i8] c"64bits\00"
define i8* @get_lame_os_bitness() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0)
}

LLVM IR (-O2):
@.str.2 = [7 x i8] c"64bits\00"
define i8* @get_lame_os_bitness() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ strtol(char const *, char **, int /*<<< orphan*/);
size_t strToLong(const char *str, int32_t *val, int8_t base) {
  char *endptr;
  *val = strtol(str, &endptr, base);
  return endptr - str;
}


x86 assembly (clang, -O0):
<strToLong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    -0x20(%rbp),%rsi
call   1030 <strtol@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strToLong>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%rsi
call   1030 <strtol@plt>
mov    %eax,(%r14)
mov    (%rsp),%rax
sub    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @strToLong(i8* %0, i32* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %6
%10 = call i32 @strtol(i8* %8, i8** %7, i32 %9)
%11 = load i32*, i32** %5
store i32 %10, i32* %11
%12 = load i8*, i8** %7
%13 = load i8*, i8** %4
%14 = ptrtoint i8* %12 to i64
%15 = ptrtoint i8* %13 to i64
%16 = sub i64 %14, %15
ret i64 %16
}

LLVM IR (-O2):
define i64 @strToLong(i8* %0, i32* nocapture writeonly %1, i32 %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
%6 = call i32 @strtol(i8* %0, i8** %4, i32 %2)
store i32 %6, i32* %1
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
ret i64 %10
}
/* Variables and functions */
scalar_t__ fives(int);
int factorial_zeros(int n) {
  int count = 0;
  for (int i = 2; i <= n; i++) {
    count += fives(i);
  }
  return count;
}


x86 assembly (clang, -O0):
<factorial_zeros>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1158 <factorial_zeros+0x48>
mov    -0xc(%rbp),%edi
call   1030 <fives@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <factorial_zeros+0x19>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<factorial_zeros>:
push   %rbp
push   %r14
push   %rbx
xor    %ebp,%ebp
cmp    $0x2,%edi
jl     114c <factorial_zeros+0x3c>
mov    %edi,%r14d
neg    %r14d
xor    %ebp,%ebp
mov    $0x2,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <fives@plt>
add    %eax,%ebp
lea    (%r14,%rbx,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1130 <factorial_zeros+0x20>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @factorial_zeros(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %3, label %5
3: ; preds = %5, %1
%4 = phi i32 [ 0, %1 ], [ %10, %5 ]
ret i32 %4
5: ; preds = %1, %5
%6 = phi i32 [ %11, %5 ], [ 2, %1 ]
%7 = phi i32 [ %10, %5 ], [ 0, %1 ]
%8 = tail call i64 @fives(i32 %6)
%9 = trunc i64 %8 to i32
%10 = add i32 %7, %9
%11 = add nuw i32 %6, 1
%12 = icmp eq i32 %6, %0
br i1 %12, label %3, label %5
}
/* Variables and functions */
int strlen(char *);
int filename_typeof(char *s) {
  s += strlen(s) - 2;
  if (*s == '.')
    return (*(s + 1));
  return (' ');
}


x86 assembly (clang, -O0):
<filename_typeof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
sub    $0x2,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    1158 <filename_typeof+0x48>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    115f <filename_typeof+0x4f>
movl   $0x20,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filename_typeof>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%rcx
mov    $0x20,%eax
cmpb   $0x2e,-0x2(%rcx,%rbx,1)
jne    112d <filename_typeof+0x1d>
movsbl -0x1(%rbx,%rcx,1),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @filename_typeof(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 46
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = getelementptr inbounds i8, i8* %5, i64 1
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
br label %12
12: ; preds = %1, %8
%13 = phi i32 [ %11, %8 ], [ 32, %1 ]
ret i32 %13
}
int getgid(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @getgid() {
ret i32 1
}

LLVM IR (-O2):
define i32 @getgid() {
ret i32 1
}
int main() {
  int dizi[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  int dizi_2[10];
  return 0;
}


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

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

LLVM IR (-O0):
@__const.main.dizi = [10 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9]
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca [10 x i32]
store i32 0, i32* %1
%4 = bitcast [10 x i32]* %2 to i8*
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ stdout;
void print_test_name(const char *name) {
  printf("    %-40s : ", name);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<print_test_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_test_name>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [13 x i8] c" %-40s : \00"
@stdout = global i32 0
define void @print_test_name(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c" %-40s : \00"
@stdout = global i32 0
define void @print_test_name(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
double phicaley(const double x) {
  return (x - 1.0) * (x - 1.0) * (x - 1.0) * (x - 1.0) / (x * x);
}


x86 assembly (clang, -O0):
<phicaley>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xed9(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xec4(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xeaf(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<phicaley>:
movsd  0xef8(%rip),%xmm2
addsd  %xmm0,%xmm2
movapd %xmm2,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @phicaley(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 1.000000e+00
%5 = load double, double* %2
%6 = fsub double %5, 1.000000e+00
%7 = fmul double %4, %6
%8 = load double, double* %2
%9 = fsub double %8, 1.000000e+00
%10 = fmul double %7, %9
%11 = load double, double* %2
%12 = fsub double %11, 1.000000e+00
%13 = fmul double %10, %12
%14 = load double, double* %2
%15 = load double, double* %2
%16 = fmul double %14, %15
%17 = fdiv double %13, %16
ret double %17
}

LLVM IR (-O2):
define double @phicaley(double %0) {
%2 = fadd double %0, -1.000000e+00
%3 = fmul double %2, %2
%4 = fmul double %2, %3
%5 = fmul double %2, %4
%6 = fmul double %0, %0
%7 = fdiv double %5, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ StabilizationSettingsHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void StabilizationSettingsRequestUpdate() {
  UAVObjRequestUpdate(StabilizationSettingsHandle());
}


x86 assembly (clang, -O0):
<StabilizationSettingsRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <StabilizationSettingsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<StabilizationSettingsRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <StabilizationSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @StabilizationSettingsRequestUpdate() {
%1 = call i32 (...) @StabilizationSettingsHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @StabilizationSettingsRequestUpdate() {
%1 = tail call i32 (...) @StabilizationSettingsHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
unsigned xrop3_4_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D | T;
  stk2 = ~stk2;
  stk1 = S & stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_4_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_4_1_0>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_4_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
ret i32 %3
}
int check_client_addr(struct sockaddr_in *addr) { return 0; }


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

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

LLVM IR (-O0):
%struct.sockaddr_in = type opaque
define i32 @check_client_addr(%struct.sockaddr_in* %0) {
%2 = alloca %struct.sockaddr_in*
store %struct.sockaddr_in* %0, %struct.sockaddr_in** %2
ret i32 0
}

LLVM IR (-O2):
%struct.sockaddr_in = type opaque
define i32 @check_client_addr(%struct.sockaddr_in* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct rtc_time {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ RTC_RD_TIME;
int tst_rtc_ioctl(char const *, int /*<<< orphan*/, struct rtc_time *);
int tst_rtc_gettime(const char *rtc_dev, struct rtc_time *rtc_tm) {
  return tst_rtc_ioctl(rtc_dev, RTC_RD_TIME, rtc_tm);
}


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

x86 assembly (clang, -O2):
<tst_rtc_gettime>:
mov    %rsi,%rdx
mov    0x2ebe(%rip),%rax
mov    (%rax),%esi
jmp    1030 <tst_rtc_ioctl@plt>

LLVM IR (-O0):
%struct.rtc_time = type { i32 }
@RTC_RD_TIME = global i32 0
define i32 @tst_rtc_gettime(i8* %0, %struct.rtc_time* %1) {
%3 = alloca i8*
%4 = alloca %struct.rtc_time*
store i8* %0, i8** %3
store %struct.rtc_time* %1, %struct.rtc_time** %4
%5 = load i8*, i8** %3
%6 = load i32, i32* @RTC_RD_TIME
%7 = load %struct.rtc_time*, %struct.rtc_time** %4
%8 = call i32 @tst_rtc_ioctl(i8* %5, i32 %6, %struct.rtc_time* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.rtc_time = type { i32 }
@RTC_RD_TIME = global i32 0
define i32 @tst_rtc_gettime(i8* %0, %struct.rtc_time* %1) {
%3 = load i32, i32* @RTC_RD_TIME
%4 = tail call i32 @tst_rtc_ioctl(i8* %0, i32 %3, %struct.rtc_time* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(const char *progname) {
  printf("\nThree command line arguments required:\n");
  printf("1: .srt File of test image names.\n");
  printf("2: Prefix for output file names.\n");
  printf("3: List of directorys to read distances files from.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
call   1030 <printf@plt>
lea    0xf17(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [41 x i8] c"\0AThree command line arguments required:\0A\00"
@.str.1 = [35 x i8] c"1: .srt File of test image names.\0A\00"
@.str.2 = [34 x i8] c"2: Prefix for output file names.\0A\00"
@.str.3 = [53 x i8] c"3: List of directorys to read distances files from.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [40 x i8] c"\0AThree command line arguments required:\00"
@str.4 = [34 x i8] c"1: .srt File of test image names.\00"
@str.5 = [33 x i8] c"2: Prefix for output file names.\00"
@str.6 = [52 x i8] c"3: List of directorys to read distances files from.\00"
define void @usage(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.5, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.6, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ pmu_set_sleep_clk(int, int, int, int);
void pmu_set_sleep_radio() { pmu_set_sleep_clk(0xF, 0xA, 0x5, 0xF); }


x86 assembly (clang, -O0):
<pmu_set_sleep_radio>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf,%ecx
mov    $0xa,%esi
mov    $0x5,%edx
mov    %ecx,%edi
call   1030 <pmu_set_sleep_clk@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_set_sleep_radio>:
mov    $0xf,%edi
mov    $0xa,%esi
mov    $0x5,%edx
mov    $0xf,%ecx
jmp    1030 <pmu_set_sleep_clk@plt>

LLVM IR (-O0):
define void @pmu_set_sleep_radio() {
%1 = call i32 @pmu_set_sleep_clk(i32 15, i32 10, i32 5, i32 15)
ret void
}

LLVM IR (-O2):
define void @pmu_set_sleep_radio() {
%1 = tail call i32 @pmu_set_sleep_clk(i32 15, i32 10, i32 5, i32 15)
ret void
}