xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ cppUngetc(int const);
int /*<<< orphan*/ skipToMatch(char *);
int skipToNonWhite();
void skipParens(void) {
  const int c = skipToNonWhite();
  if (c == '(')
    skipToMatch("()");
  else
    cppUngetc(c);
}


x86 assembly (clang, -O0):
<skipParens>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <skipToNonWhite@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x28,-0x4(%rbp)
jne    115d <skipParens+0x2d>
lea    0xead(%rip),%rdi
call   1040 <skipToMatch@plt>
jmp    1165 <skipParens+0x35>
mov    -0x4(%rbp),%edi
call   1050 <cppUngetc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipParens>:
push   %rax
xor    %eax,%eax
call   1030 <skipToNonWhite@plt>
cmp    $0x28,%eax
jne    114a <skipParens+0x1a>
lea    0xebc(%rip),%rdi
pop    %rax
jmp    1040 <skipToMatch@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <cppUngetc@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"()\00"
define void @skipParens() {
%1 = tail call i32 (...) @skipToNonWhite()
%2 = icmp eq i32 %1, 40
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @skipToMatch(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = tail call i32 @cppUngetc(i32 %1)
br label %7
7: ; preds = %5, %3
ret void
}
void freeTableRow(char **row) {
  char **cpp;
  if (row) {
    for (cpp = row; *cpp; ++cpp)
      free(*cpp);
    free(row);
  }
}


x86 assembly (clang, -O0):
<freeTableRow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1163 <freeTableRow+0x53>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     115a <freeTableRow+0x4a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    112f <freeTableRow+0x1f>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeTableRow>:
test   %rdi,%rdi
je     1150 <freeTableRow+0x40>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <freeTableRow+0x31>
lea    0x8(%r14),%rbx
nopl   0x0(%rax,%rax,1)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <freeTableRow+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @freeTableRow(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %12, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %10, %6 ], [ %4, %3 ]
%8 = phi i8** [ %9, %6 ], [ %0, %3 ]
tail call void @free(i8* %7)
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %6
12: ; preds = %6, %3
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
br label %14
14: ; preds = %12, %1
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int quaddobl_Newton_series(int idx, int maxdeg, int nbr, int verbose) {
  int fail = 0;
  int idxnbr[3];
  double *c;
  idxnbr[0] = idx;
  idxnbr[1] = maxdeg;
  idxnbr[2] = nbr;
  fail = _ada_use_c2phc4c(693, idxnbr, &verbose, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<quaddobl_Newton_series>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rcx
mov    $0x2b5,%edi
lea    -0x10(%rbp),%rdx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quaddobl_Newton_series>:
sub    $0x18,%rsp
mov    %ecx,0x8(%rsp)
mov    %edi,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    $0x2b5,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @quaddobl_Newton_series(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [3 x i32]
%11 = alloca double*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 0, i32* %9
%12 = load i32, i32* %5
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 0
store i32 %12, i32* %13
%14 = load i32, i32* %6
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 1
store i32 %14, i32* %15
%16 = load i32, i32* %7
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 2
store i32 %16, i32* %17
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 0
%19 = load double*, double** %11
%20 = call i32 @_ada_use_c2phc4c(i32 693, i32* %18, i32* %8, double* %19, i32 0)
store i32 %20, i32* %9
%21 = load i32, i32* %9
ret i32 %21
}

LLVM IR (-O2):
define i32 @quaddobl_Newton_series(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca [3 x i32]
store i32 %3, i32* %5
%7 = bitcast [3 x i32]* %6 to i8*
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32 %0, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
store i32 %1, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
store i32 %2, i32* %10
%11 = call i32 @_ada_use_c2phc4c(i32 693, i32* %8, i32* %5, double* undef, i32 0)
ret i32 %11
}
char *basename(const char *name) {
  const char *base = name;
  while (*name) {
    if (*name++ == '/') {
      base = name;
    }
  }
  return (char *)base;
}


x86 assembly (clang, -O0):
<basename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <basename+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1140 <basename+0x40>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <basename+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<basename>:
mov    %rdi,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     1122 <basename+0x22>
lea    0x1(%rax),%rdx
nopl   (%rax)
cmp    $0x2f,%cl
cmove  %rdx,%rax
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <basename+0x10>
ret

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

LLVM IR (-O2):
define i8* @basename(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = icmp eq i8 %5, 47
%10 = select i1 %9, i8* %8, i8* %6
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i8* [ %0, %1 ], [ %10, %4 ]
ret i8* %14
}
/* Variables and functions */
scalar_t__ do_test_thread_contention_impl(int);
void *do_test_thread_contention(void *v) {
  return (void *)(intptr_t)do_test_thread_contention_impl((int)(intptr_t)v);
}


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

x86 assembly (clang, -O2):
<do_test_thread_contention>:
jmp    1030 <do_test_thread_contention_impl@plt>

LLVM IR (-O0):
define i8* @do_test_thread_contention(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = trunc i64 %4 to i32
%6 = call i64 @do_test_thread_contention_impl(i32 %5)
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @do_test_thread_contention(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i64 @do_test_thread_contention_impl(i32 %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
float fabs(double);
double raizCuadrada(unsigned x, float tol) {
  double term1, term2 = 1;
  do {
    term1 = term2;
    term2 = 0.5 * (term1 + (x / term1));
  } while (fabs(term2 - term1) >= tol);
  return term2;
}


x86 assembly (clang, -O0):
<raizCuadrada>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
mov    -0x4(%rbp),%eax
cvtsi2sd %rax,%xmm0
divsd  -0x10(%rbp),%xmm0
addsd  %xmm0,%xmm1
movsd  0xeb3(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
ucomiss -0x8(%rbp),%xmm0
jae    112d <raizCuadrada+0x1d>
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<raizCuadrada>:
sub    $0x18,%rsp
movss  %xmm0,0x4(%rsp)
mov    %edi,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xece(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movapd %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
divsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
mulsd  0xeae(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
ucomiss 0x4(%rsp),%xmm0
movsd  0x10(%rsp),%xmm0
jae    1140 <raizCuadrada+0x30>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @raizCuadrada(i32 %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca double
%6 = alloca double
store i32 %0, i32* %3
store float %1, float* %4
store double 1.000000e+00, double* %6
br label %7
7: ; preds = %16, %2
%8 = load double, double* %6
store double %8, double* %5
%9 = load double, double* %5
%10 = load i32, i32* %3
%11 = uitofp i32 %10 to double
%12 = load double, double* %5
%13 = fdiv double %11, %12
%14 = fadd double %9, %13
%15 = fmul double 5.000000e-01, %14
store double %15, double* %6
br label %16
16: ; preds = %7
%17 = load double, double* %6
%18 = load double, double* %5
%19 = fsub double %17, %18
%20 = call float @fabs(double %19)
%21 = load float, float* %4
%22 = fcmp oge float %20, %21
br i1 %22, label %7, label %23
23: ; preds = %16
%24 = load double, double* %6
ret double %24
}

LLVM IR (-O2):
define double @raizCuadrada(i32 %0, float %1) {
%3 = uitofp i32 %0 to double
br label %4
4: ; preds = %4, %2
%5 = phi double [ 1.000000e+00, %2 ], [ %8, %4 ]
%6 = fdiv double %3, %5
%7 = fadd double %5, %6
%8 = fmul double %7, 5.000000e-01
%9 = fsub double %8, %5
%10 = tail call float @fabs(double %9)
%11 = fcmp ult float %10, %1
br i1 %11, label %12, label %4
12: ; preds = %4
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ PrintBarCode(char *);
char *cbCalcBarCode();
int /*<<< orphan*/ cbPcodeExec(int, int);
int /*<<< orphan*/ free(char *);
int cbPrintData() {
  char *tmp;
  cbPcodeExec(1, 1);
  PrintBarCode(tmp = cbCalcBarCode());
  free(tmp);
  return 0;
}


x86 assembly (clang, -O0):
<cbPrintData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%esi
mov    %esi,%edi
call   1060 <cbPcodeExec@plt>
mov    $0x0,%al
call   1040 <cbCalcBarCode@plt>
mov    %rax,%rdi
mov    %rdi,-0x8(%rbp)
call   1050 <PrintBarCode@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbPrintData>:
push   %rbx
mov    $0x1,%edi
mov    $0x1,%esi
call   1060 <cbPcodeExec@plt>
xor    %eax,%eax
call   1040 <cbCalcBarCode@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <PrintBarCode@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @cbPrintData() {
%1 = alloca i8*
%2 = call i32 @cbPcodeExec(i32 1, i32 1)
%3 = call i8* (...) @cbCalcBarCode()
store i8* %3, i8** %1
%4 = call i32 @PrintBarCode(i8* %3)
%5 = load i8*, i8** %1
%6 = call i32 @free(i8* %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @cbPrintData() {
%1 = tail call i32 @cbPcodeExec(i32 1, i32 1)
%2 = tail call i8* (...) @cbCalcBarCode()
%3 = tail call i32 @PrintBarCode(i8* %2)
%4 = tail call i32 @free(i8* %2)
ret i32 0
}
int uds_request_seed() {
  int seed = 1;
  return seed;
}


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

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

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

LLVM IR (-O2):
define i32 @uds_request_seed() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
void cpu_nswap64p(uint64_t *outp, uint64_t in) { *outp = in; }


x86 assembly (clang, -O0):
<cpu_nswap64p>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_nswap64p>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @cpu_nswap64p(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
store i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @cpu_nswap64p(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
/* Type definitions */
struct spin_lock {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, struct spin_lock *);
__attribute__((no)) void spin_unlock(struct spin_lock *lock) {
  printf("Unlocking %p.\n", lock);
}


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

x86 assembly (clang, -O2):
<spin_unlock>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.spin_lock = type { i32 }
@.str = [15 x i8] c"Unlocking %p.\0A\00"
define void @spin_unlock(%struct.spin_lock* %0) {
%2 = alloca %struct.spin_lock*
store %struct.spin_lock* %0, %struct.spin_lock** %2
%3 = load %struct.spin_lock*, %struct.spin_lock** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), %struct.spin_lock* %3)
ret void
}

LLVM IR (-O2):
%struct.spin_lock = type { i32 }
@.str = [15 x i8] c"Unlocking %p.\0A\00"
define void @spin_unlock(%struct.spin_lock* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), %struct.spin_lock* %0)
ret void
}
void MyProviderReleaseBytePointer(void *info, const void *pointer) {
#pragma unused(info, pointer)
}


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

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

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

LLVM IR (-O2):
define void @MyProviderReleaseBytePointer(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int foo(long long, long long);
int /*<<< orphan*/ printf(char *, int);
main() {
  int a = foo((long long)2, (long long)3);
  printf("%d\n", a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
mov    $0x3,%esi
call   1040 <foo@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @foo(i64 2, i64 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
double M_PI;
int /*<<< orphan*/ assert(int);
double cos(double);
double wdw_Hanning(int i, int m) {
  assert(i < m);
  return (0.5 - (0.5 * cos((2.0 * M_PI * (double)i) / (double)(m - 1))));
}


x86 assembly (clang, -O0):
<wdw_Hanning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  0xec7(%rip),%xmm0
mov    0x2e98(%rip),%rax
mulsd  (%rax),%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
call   1040 <cos@plt>
movsd  0xe88(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe84(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wdw_Hanning>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    %esi,%ebp
setl   %dil
call   1030 <assert@plt>
mov    0x2ead(%rip),%rax
movsd  (%rax),%xmm1
addsd  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm0
mulsd  %xmm1,%xmm0
add    $0xffffffff,%ebx
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
divsd  %xmm1,%xmm0
call   1040 <cos@plt>
mulsd  0xe9a(%rip),%xmm0
addsd  0xe9a(%rip),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @wdw_Hanning(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 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load double, double* @M_PI
%11 = fmul double 2.000000e+00, %10
%12 = load i32, i32* %3
%13 = sitofp i32 %12 to double
%14 = fmul double %11, %13
%15 = load i32, i32* %4
%16 = sub nsw i32 %15, 1
%17 = sitofp i32 %16 to double
%18 = fdiv double %14, %17
%19 = call double @cos(double %18)
%20 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %19, double 5.000000e-01)
ret double %20
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @wdw_Hanning(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = load double, double* @M_PI
%7 = fmul double %6, 2.000000e+00
%8 = sitofp i32 %0 to double
%9 = fmul double %7, %8
%10 = add nsw i32 %1, -1
%11 = sitofp i32 %10 to double
%12 = fdiv double %9, %11
%13 = tail call double @cos(double %12)
%14 = tail call double @llvm.fmuladd.f64(double %13, double -5.000000e-01, double 5.000000e-01)
ret double %14
}
char *hash_plugin_detailed(void) {
  return ("smf - SMF password hashes plugin\n"
          "-------------------------------\n"
          "Use this module to crack SMF hashes\n"
          "Input should be in form: \'user:hash\'\n"
          "Known software that uses this password hashing method:\n"
          "Simple Machines Forum (SMF) \n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [268 x i8] c"smf - SMF password hashes plugin\0A-------------------------------\0AUse this module to crack SMF hashes\0AInput should be in form: 'user:hash'\0AKnown software that uses this password hashing method:\0ASimple Machines Forum (SMF) \0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([268 x i8], [268 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [268 x i8] c"smf - SMF password hashes plugin\0A-------------------------------\0AUse this module to crack SMF hashes\0AInput should be in form: 'user:hash'\0AKnown software that uses this password hashing method:\0ASimple Machines Forum (SMF) \0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([268 x i8], [268 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: mpgwd [ -a ] [ -m ] [ -h ]\n\n"
                  "    -a  send gratuitous arp after receiving ping response\n"
                  "    -m  skip sending ping when receiving garp from master\n"
                  "    -h  print this message and quit\n\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [189 x i8] c"Usage: mpgwd [ -a ] [ -m ] [ -h ]\0A\0A -a send gratuitous arp after receiving ping response\0A -m skip sending ping when receiving garp from master\0A -h print this message and quit\0A\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [189 x i8] c"Usage: mpgwd [ -a ] [ -m ] [ -h ]\0A\0A -a send gratuitous arp after receiving ping response\0A -m skip sending ping when receiving garp from master\0A -h print this message and quit\0A\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([189 x i8], [189 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void __attribute__((section(".after_vectors"))) HardFault_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<HardFault_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <HardFault_Handler+0x9>
jmp    1109 <HardFault_Handler+0x9>

x86 assembly (clang, -O2):
<HardFault_Handler>:
jmp    1100 <HardFault_Handler>

LLVM IR (-O0):
define void @HardFault_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @HardFault_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
double disroot(double, double, double (*)(double), double);
int /*<<< orphan*/ printf(char *, ...);
void main() {
  double f(double);
  double a, b, eps, root;
  a = 0.0;
  b = 1.0;
  eps = 0.00001;
  printf("    a          (a+b)/2         b\n\n");
  root = disroot(a, b, f, eps);
  printf("\nThe root is  %1.7f\n", root);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xebb(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mov    0x2e72(%rip),%rdi
call   1040 <disroot@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xeaf(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeed(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e9c(%rip),%rdi
movsd  0xeb4(%rip),%xmm1
movsd  0xeb4(%rip),%xmm2
xorps  %xmm0,%xmm0
call   1050 <disroot@plt>
lea    0xead(%rip),%rdi
mov    $0x1,%al
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c" a (a+b)/2 b\0A\0A\00"
@.str.1 = [21 x i8] c"\0AThe root is %1.7f\0A\00"
define void @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double 0.000000e+00, double* %1
store double 1.000000e+00, double* %2
store double 1.000000e-05, double* %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%6 = load double, double* %1
%7 = load double, double* %2
%8 = load double, double* %3
%9 = call double @disroot(double %6, double %7, double (double)* @f, double %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %10)
ret void
}

LLVM IR (-O2):
@.str.1 = [21 x i8] c"\0AThe root is %1.7f\0A\00"
@str = [34 x i8] c" a (a+b)/2 b\0A\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%2 = tail call double @disroot(double 0.000000e+00, double 1.000000e+00, double (double)* @f, double 1.000000e-05)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pgfunt_(float (*)(), float (*)(), int *, float *, float *,
                           int *);
cpgfunt(float pgfun1(), float pgfun2(), int n, float tmin, float tmax,
        int pgflag) {
  pgfunt_(pgfun1, pgfun2, &n, &tmin, &tmax, &pgflag);
}


x86 assembly (clang, -O0):
<cpgfunt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movss  %xmm0,-0x20(%rbp)
movss  %xmm1,-0x24(%rbp)
mov    %ecx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x24(%rbp),%r8
lea    -0x28(%rbp),%r9
call   1030 <pgfunt_@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpgfunt>:
sub    $0x18,%rsp
mov    %edx,0x14(%rsp)
movss  %xmm0,0x10(%rsp)
movss  %xmm1,0xc(%rsp)
mov    %ecx,0x8(%rsp)
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
lea    0x8(%rsp),%r9
call   1030 <pgfunt_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @cpgfunt(float (...)* %0, float (...)* %1, i32 %2, float %3, float %4, i32 %5) {
%7 = alloca i32
%8 = alloca float (...)*
%9 = alloca float (...)*
%10 = alloca i32
%11 = alloca float
%12 = alloca float
%13 = alloca i32
store float (...)* %0, float (...)** %8
store float (...)* %1, float (...)** %9
store i32 %2, i32* %10
store float %3, float* %11
store float %4, float* %12
store i32 %5, i32* %13
%14 = load float (...)*, float (...)** %8
%15 = load float (...)*, float (...)** %9
%16 = call i32 @pgfunt_(float (...)* %14, float (...)* %15, i32* %10, float* %11, float* %12, i32* %13)
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @cpgfunt(float (...)* %0, float (...)* %1, i32 %2, float %3, float %4, i32 %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
store i32 %2, i32* %7
store float %3, float* %8
store float %4, float* %9
store i32 %5, i32* %10
%11 = call i32 @pgfunt_(float (...)* %0, float (...)* %1, i32* %7, float* %8, float* %9, i32* %10)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ mul(int /*<<< orphan*/, int /*<<< orphan*/);
uint32_t *test(unsigned size, uint32_t *a, uint32_t s) {
  unsigned i;
  for (i = 0; i < size; i++) {
    a[i] = mul(a[i], s);
  }
  return a;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1161 <test+0x51>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
mov    (%rax,%rcx,4),%edi
mov    -0x14(%rbp),%esi
call   1030 <mul@plt>
mov    %eax,%edx
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1129 <test+0x19>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
test   %edi,%edi
je     1147 <test+0x37>
mov    %edx,%r14d
mov    %edi,%r15d
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    (%rbx,%rbp,4),%edi
mov    %r14d,%esi
call   1030 <mul@plt>
mov    %eax,(%rbx,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%r15
jne    1130 <test+0x20>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32* @test(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
store i32 0, i32* %7
br label %8
8: ; preds = %24, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %4
%11 = icmp ult i32 %9, %10
br i1 %11, label %12, label %27
12: ; preds = %8
%13 = load i32*, i32** %5
%14 = load i32, i32* %7
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32, i32* %6
%19 = call i32 @mul(i32 %17, i32 %18)
%20 = load i32*, i32** %5
%21 = load i32, i32* %7
%22 = zext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %20, i64 %22
store i32 %19, i32* %23
br label %24
24: ; preds = %12
%25 = load i32, i32* %7
%26 = add i32 %25, 1
store i32 %26, i32* %7
br label %8
27: ; preds = %8
%28 = load i32*, i32** %5
ret i32* %28
}

LLVM IR (-O2):
define i32* @test(i32 %0, i32* returned %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %14, label %5
5: ; preds = %3
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i32, i32* %1, i64 %8
%10 = load i32, i32* %9
%11 = tail call i32 @mul(i32 %10, i32 %2)
store i32 %11, i32* %9
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
ret i32* %1
}
int eq(double a, double b) {
  return (((a) != (a)) || ((b) != (b)) ? (((a) != (a)) && ((b) != (b)) ? 1 : 0)
                                       : !(a < b || b < a));
}


x86 assembly (clang, -O0):
<eq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
jne    113f <eq+0x3f>
jp     113f <eq+0x3f>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    113f <eq+0x3f>
jp     113f <eq+0x3f>
jmp    118c <eq+0x8c>
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x8(%rbp),%xmm0
mov    %al,-0x11(%rbp)
jne    115f <eq+0x5f>
jp     115f <eq+0x5f>
jmp    1174 <eq+0x74>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x18(%rbp)
jmp    11c6 <eq+0xc6>
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
ucomisd %xmm1,%xmm0
mov    %al,-0x19(%rbp)
ja     11b9 <eq+0xb9>
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eq>:
ucomisd %xmm1,%xmm0
jp     110d <eq+0xd>
sete   %al
movzbl %al,%eax
ret
ucomisd %xmm1,%xmm1
setp   %cl
ucomisd %xmm0,%xmm0
setp   %al
and    %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @eq(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 = fcmp une double %5, %6
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load double, double* %4
%10 = load double, double* %4
%11 = fcmp une double %9, %10
br i1 %11, label %12, label %24
12: ; preds = %8, %2
%13 = load double, double* %3
%14 = load double, double* %3
%15 = fcmp une double %13, %14
br i1 %15, label %16, label %20
16: ; preds = %12
%17 = load double, double* %4
%18 = load double, double* %4
%19 = fcmp une double %17, %18
br label %20
20: ; preds = %16, %12
%21 = phi i1 [ false, %12 ], [ %19, %16 ]
%22 = zext i1 %21 to i64
%23 = select i1 %21, i32 1, i32 0
br label %36
24: ; preds = %8
%25 = load double, double* %3
%26 = load double, double* %4
%27 = fcmp olt double %25, %26
br i1 %27, label %32, label %28
28: ; preds = %24
%29 = load double, double* %4
%30 = load double, double* %3
%31 = fcmp olt double %29, %30
br label %32
32: ; preds = %28, %24
%33 = phi i1 [ true, %24 ], [ %31, %28 ]
%34 = xor i1 %33, true
%35 = zext i1 %34 to i32
br label %36
36: ; preds = %32, %20
%37 = phi i32 [ %23, %20 ], [ %35, %32 ]
ret i32 %37
}

LLVM IR (-O2):
define i32 @eq(double %0, double %1) {
%3 = fcmp uno double %0, %1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = fcmp uno double %1, 0.000000e+00
%6 = fcmp uno double %0, 0.000000e+00
%7 = and i1 %6, %5
br label %10
8: ; preds = %2
%9 = fcmp ueq double %0, %1
br label %10
10: ; preds = %8, %4
%11 = phi i1 [ %7, %4 ], [ %9, %8 ]
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ net_select(int);
void main_event_loop(void) { net_select(1); }


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

x86 assembly (clang, -O2):
<main_event_loop>:
mov    $0x1,%edi
jmp    1030 <net_select@plt>

LLVM IR (-O0):
define void @main_event_loop() {
%1 = call i32 @net_select(i32 1)
ret void
}

LLVM IR (-O2):
define void @main_event_loop() {
%1 = tail call i32 @net_select(i32 1)
ret void
}
unsigned long sbdm_hash(unsigned char *str) {
  unsigned long hash = 0;
  int c;
  while ((c = *str++))
    hash = c + (hash << 6) + (hash << 16) - hash;
  return hash;
}


x86 assembly (clang, -O0):
<sbdm_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1155 <sbdm_hash+0x55>
movslq -0x14(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    $0x6,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%rcx
shl    $0x10,%rcx
add    %rcx,%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <sbdm_hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbdm_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1129 <sbdm_hash+0x29>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movzbl %cl,%ecx
imul   $0x1003f,%rax,%rax
add    %rcx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <sbdm_hash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @sbdm_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 0, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = zext i8 %5 to i64
%10 = mul i64 %7, 65599
%11 = add i64 %10, %9
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 0, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ mark(uintptr_t, int /*<<< orphan*/);
void markSection(uintptr_t start, uintptr_t end, uint32_t used) {
  uintptr_t it = start;
  while (it < end) {
    mark(it, used);
    it += 0x1000;
  }
}


x86 assembly (clang, -O0):
<markSection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1158 <markSection+0x48>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <mark@plt>
mov    -0x20(%rbp),%rax
add    $0x1000,%rax
mov    %rax,-0x20(%rbp)
jmp    112b <markSection+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<markSection>:
push   %rbp
push   %r14
push   %rbx
cmp    %rsi,%rdi
jae    1147 <markSection+0x37>
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbp,%rdi
mov    %r14d,%esi
call   1030 <mark@plt>
add    $0x1000,%rbp
cmp    %rbx,%rbp
jb     1130 <markSection+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @markSection(i64 %0, i64 %1, i32 %2) {
%4 = icmp ult i64 %0, %1
br i1 %4, label %5, label %10
5: ; preds = %3, %5
%6 = phi i64 [ %8, %5 ], [ %0, %3 ]
%7 = tail call i32 @mark(i64 %6, i32 %2)
%8 = add i64 %6, 4096
%9 = icmp ult i64 %8, %1
br i1 %9, label %5, label %10
10: ; preds = %5, %3
ret void
}
void INT_Excep_PERIA_INTA240(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIA_INTA240() {
ret void
}
/* Type definitions */
typedef unsigned int __u32;

/* Variables and functions */
__u32 tipc_addr(unsigned int zone, unsigned int cluster, unsigned int node) {
  return (zone << (12 + 12)) | (cluster << 12) | node;
}


x86 assembly (clang, -O0):
<tipc_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%ecx
shl    $0xc,%ecx
or     %ecx,%eax
or     -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tipc_addr>:
mov    %esi,%eax
shl    $0x18,%edi
shl    $0xc,%eax
or     %edi,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @tipc_addr(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 = shl i32 %7, 24
%9 = load i32, i32* %5
%10 = shl i32 %9, 12
%11 = or i32 %8, %10
%12 = load i32, i32* %6
%13 = or i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @tipc_addr(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %0, 24
%5 = shl i32 %1, 12
%6 = or i32 %5, %4
%7 = or i32 %6, %2
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ parallel_clr_dav(int);
int /*<<< orphan*/ parallel_set_dav(int);
void parallel_drv2_set_dav(unsigned char val) {
  if (val) {
    parallel_set_dav(0x10);
  } else {
    parallel_clr_dav(~0x10);
  }
}


x86 assembly (clang, -O0):
<parallel_drv2_set_dav>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     1147 <parallel_drv2_set_dav+0x27>
mov    $0x10,%edi
call   1040 <parallel_set_dav@plt>
jmp    1151 <parallel_drv2_set_dav+0x31>
mov    $0xffffffef,%edi
call   1030 <parallel_clr_dav@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parallel_drv2_set_dav>:
test   %edi,%edi
je     112e <parallel_drv2_set_dav+0xe>
mov    $0x10,%edi
jmp    1040 <parallel_set_dav@plt>
mov    $0xffffffef,%edi
jmp    1030 <parallel_clr_dav@plt>

LLVM IR (-O0):
define void @parallel_drv2_set_dav(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = icmp ne i8 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @parallel_set_dav(i32 16)
br label %9
7: ; preds = %1
%8 = call i32 @parallel_clr_dav(i32 -17)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @parallel_drv2_set_dav(i8 zeroext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @parallel_set_dav(i32 16)
br label %7
5: ; preds = %1
%6 = tail call i32 @parallel_clr_dav(i32 -17)
br label %7
7: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
void _thread_created_hook(pid_t thread_id) {}


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

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

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

LLVM IR (-O2):
define void @_thread_created_hook(i32 %0) {
ret void
}
int between(double a, double p, double b) {
  if (a <= p && p <= b)
    return 1;
  if (b <= p && p <= a)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<between>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1147 <between+0x47>
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1147 <between+0x47>
movl   $0x1,-0x4(%rbp)
jmp    1182 <between+0x82>
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     117b <between+0x7b>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     117b <between+0x7b>
movl   $0x1,-0x4(%rbp)
jmp    1182 <between+0x82>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<between>:
ucomisd %xmm0,%xmm1
setae  %sil
ucomisd %xmm1,%xmm2
setae  %cl
ucomisd %xmm2,%xmm1
setae  %dl
ucomisd %xmm1,%xmm0
setae  %al
and    %dl,%al
and    %sil,%cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @between(double %0, double %1, double %2) {
%4 = fcmp ole double %0, %1
%5 = fcmp ole double %1, %2
%6 = fcmp ole double %2, %1
%7 = fcmp ole double %1, %0
%8 = and i1 %7, %6
%9 = and i1 %4, %5
%10 = or i1 %9, %8
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int do_solve(char **, int /*<<< orphan*/);
void solveSudoku(char **board, int boardRowSize, int boardColSize) {
  int i = do_solve(board, 0);
}


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

x86 assembly (clang, -O2):
<solveSudoku>:
xor    %esi,%esi
jmp    1030 <do_solve@plt>

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

LLVM IR (-O2):
define void @solveSudoku(i8** %0, i32 %1, i32 %2) {
%4 = tail call i32 @do_solve(i8** %0, i32 0)
ret void
}
void f5(void) {
#pragma unused(k)
}


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

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

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

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