xunge/DecIR huggingface dataset:
/* Variables and functions */
char **extract_values_delim(char *, char *);
char *get_value(char const *);
char **get_values(const char *key) {
  char *value = get_value(key);
  return extract_values_delim(value, ",");
}


x86 assembly (clang, -O0):
<get_values>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get_value@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   1030 <extract_values_delim@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_values>:
push   %rax
call   1040 <get_value@plt>
lea    0xed3(%rip),%rsi
mov    %rax,%rdi
pop    %rax
jmp    1030 <extract_values_delim@plt>

LLVM IR (-O0):
@.str = [2 x i8] c",\00"
define i8** @get_values(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @get_value(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i8** @extract_values_delim(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i8** %7
}

LLVM IR (-O2):
@.str = [2 x i8] c",\00"
define i8** @get_values(i8* %0) {
%2 = tail call i8* @get_value(i8* %0)
%3 = tail call i8** @extract_values_delim(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i8** %3
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int set_target_hyperplane_sections(int i) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(62, &i, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<set_target_hyperplane_sections>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x3e,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_target_hyperplane_sections>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x3e,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @set_target_hyperplane_sections(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 62, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @set_target_hyperplane_sections(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 62, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ enableRepeatAndCursor();
int /*<<< orphan*/ resetInputMode();
void resetEnvironment() {
  resetInputMode();
  enableRepeatAndCursor();
}


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

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

LLVM IR (-O0):
define void @resetEnvironment() {
%1 = call i32 (...) @resetInputMode()
%2 = call i32 (...) @enableRepeatAndCursor()
ret void
}

LLVM IR (-O2):
define void @resetEnvironment() {
%1 = tail call i32 (...) @resetInputMode()
%2 = tail call i32 (...) @enableRepeatAndCursor()
ret void
}
/* Variables and functions */
int snd_use_case_get_list(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          char const ***);
int snd_use_case_card_list(const char **list[]) {
  return snd_use_case_get_list(NULL, NULL, list);
}


x86 assembly (clang, -O0):
<snd_use_case_card_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1030 <snd_use_case_get_list@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<snd_use_case_card_list>:
mov    %rdi,%rdx
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <snd_use_case_get_list@plt>

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

LLVM IR (-O2):
define i32 @snd_use_case_card_list(i8*** %0) {
%2 = tail call i32 @snd_use_case_get_list(i32* null, i32* null, i8*** %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ malloc(unsigned int);
int /*<<< orphan*/ stderr;
char *xmalloc(unsigned size) {
  char *p;
  if ((p = (char *)malloc(size)) != NULL)
    return p;
  fprintf(stderr, "Not enough memory, exit.\n");
  exit(2);
  return NULL;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     115b <xmalloc+0x2b>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    0xe95(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Not enough memory, exit.\0A\00"
define i8* @xmalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %3
ret i8* %9
10: ; preds = %1
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Not enough memory, exit.\0A\00"
define i8* @xmalloc(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = inttoptr i64 %2 to i8*
ret i8* %5
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int atoi_len(char const *, int);
int packet_unpack_exit_resp(const char *packet) {
  int result;
  int len = (4 + 2);
  result = atoi_len(packet + len, 2);
  len += 2;
  return result;
}


x86 assembly (clang, -O0):
<packet_unpack_exit_resp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x6,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
add    %rax,%rdi
mov    $0x2,%esi
call   1030 <atoi_len@plt>
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<packet_unpack_exit_resp>:
add    $0x6,%rdi
mov    $0x2,%esi
jmp    1030 <atoi_len@plt>

LLVM IR (-O0):
define i32 @packet_unpack_exit_resp(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 6, i32* %4
%5 = load i8*, i8** %2
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = call i32 @atoi_len(i8* %8, i32 2)
store i32 %9, i32* %3
%10 = load i32, i32* %4
%11 = add nsw i32 %10, 2
store i32 %11, i32* %4
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @packet_unpack_exit_resp(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 6
%3 = tail call i32 @atoi_len(i8* %2, i32 2)
ret i32 %3
}
unsigned char f95(unsigned char x, int y) {
  return (x << (8 * sizeof(unsigned char) - y)) + (x >> y);
}


x86 assembly (clang, -O0):
<f95>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
movslq -0x8(%rbp),%rdx
mov    $0x8,%ecx
sub    %rdx,%rcx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f95>:
mov    $0x8,%cl
sub    %sil,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f95(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = sub i64 8, %8
%10 = trunc i64 %9 to i32
%11 = shl i32 %6, %10
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = load i32, i32* %4
%15 = ashr i32 %13, %14
%16 = add nsw i32 %11, %15
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @f95(i8 zeroext %0, i32 %1) {
%3 = zext i8 %0 to i32
%4 = sub i32 8, %1
%5 = shl i32 %3, %4
%6 = lshr i32 %3, %1
%7 = add nsw i32 %5, %6
%8 = trunc i32 %7 to i8
ret i8 %8
}
/* Variables and functions */
scalar_t__ fabs(double);
float fabsf(float x) { return (float)fabs((double)x); }


x86 assembly (clang, -O0):
<fabsf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <fabs@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabsf>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fabsf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @fabs(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @fabsf(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @fabs(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Variables and functions */
double __ieee754_scalb(double, double);
scalar_t__ __ilogb(double);
double __significand(double x) {
  return __ieee754_scalb(x, (double)-__ilogb(x));
}


x86 assembly (clang, -O0):
<__significand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <__ilogb@plt>
movsd  -0x10(%rbp),%xmm0
mov    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
cvtsi2sd %rax,%xmm1
call   1040 <__ieee754_scalb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__significand>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <__ilogb@plt>
neg    %rax
cvtsi2sd %rax,%xmm1
movsd  (%rsp),%xmm0
pop    %rax
jmp    1040 <__ieee754_scalb@plt>

LLVM IR (-O0):
define double @__significand(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call i64 @__ilogb(double %4)
%6 = sub nsw i64 0, %5
%7 = sitofp i64 %6 to double
%8 = call double @__ieee754_scalb(double %3, double %7)
ret double %8
}

LLVM IR (-O2):
define double @__significand(double %0) {
%2 = tail call i64 @__ilogb(double %0)
%3 = sub nsw i64 0, %2
%4 = sitofp i64 %3 to double
%5 = tail call double @__ieee754_scalb(double %0, double %4)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ assert2();
int main(void) { assert2(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @assert2()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @assert2()
ret i32 0
}
void freeMat2D(int **mat, unsigned int nLin) {
  unsigned int i;
  for (i = 0; i < nLin; i++)
    free(mat[i]);
  free(mat);
}


x86 assembly (clang, -O0):
<freeMat2D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1150 <freeMat2D+0x40>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <freeMat2D+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeMat2D>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
je     1142 <freeMat2D+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <freeMat2D+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freeMat2D(i32** nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32*, i32** %0, i64 %7
%9 = bitcast i32** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast i32** %0 to i8*
tail call void @free(i8* %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *name) {
  fprintf(stderr,
          "Usage: %s REPS SIZE\n\n"
          "Gather and print REPS blocks of SIZE bytes from getrandom()\n",
          name);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [82 x i8] c"Usage: %s REPS SIZE\0A\0AGather and print REPS blocks of SIZE bytes from getrandom()\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [82 x i8] c"Usage: %s REPS SIZE\0A\0AGather and print REPS blocks of SIZE bytes from getrandom()\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int main() {
  int a = 10;
  int b = 20;
  int result;
  asm("cmp %1, %2\n\t"
      "jge greater\n\t"
      "movl %1, %0\n\t"
      "jmp end\n"
      "greater:\n\t"
      "movl %2, %0\n"
      "end:"
      : "=r"(result)
      : "r"(a), "r"(b));
  printf("The larger value is %d\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
cmp    %eax,%ecx
jge    1142 <greater>
mov    %eax,%eax
jmp    1144 <end>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%eax
mov    $0x14,%ecx
cmp    %eax,%ecx
jge    1123 <greater>
mov    %eax,%esi
jmp    1125 <end>

LLVM IR (-O0):
@.str = [24 x i8] c"The larger value is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 20, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 asm "cmp $1, $2\0A\09jge greater\0A\09movl $1, $0\0A\09jmp end\0Agreater:\0A\09movl $2, $0\0Aend:", "=r,r,r,~{dirflag},~{fpsr},~{flags}"(i32 %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"The larger value is %d\0A\00"
define i32 @main() {
%1 = tail call i32 asm "cmp $1, $2\0A\09jge greater\0A\09movl $1, $0\0A\09jmp end\0Agreater:\0A\09movl $2, $0\0Aend:", "=r,r,r,~{dirflag},~{fpsr},~{flags}"(i32 10, i32 20)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ report(char *);
void fatal(char *mess) {
  report(mess);
  exit(1);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <report@plt>
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rax
call   1040 <report@plt>
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @report(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @fatal(i8* %0) {
%2 = tail call i32 @report(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ open(char *, int /*<<< orphan*/);
int main() { open("/etc/passwd", O_RDONLY); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <open@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"/etc/passwd\00"
@O_RDONLY = global i32 0
define i32 @main() {
%1 = load i32, i32* @O_RDONLY
%2 = call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"/etc/passwd\00"
@O_RDONLY = global i32 0
define i32 @main() {
%1 = load i32, i32* @O_RDONLY
%2 = tail call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int NoSoundDrv_MIDI_StartPlayback(void (*service)(void)) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @NoSoundDrv_MIDI_StartPlayback(void ()* nocapture readnone %0) {
ret i32 0
}
void check_memory_main_unix_c(void) {}


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

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

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

LLVM IR (-O2):
define void @check_memory_main_unix_c() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _umount_usage(void) {
  fputs("Usage: "
        "umount"
        " -a [-f]\n"
        "       "
        "umount"
        " [-f] special | node ...\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_umount_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_umount_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [61 x i8] c"Usage: umount -a [-f]\0A umount [-f] special | node ...\0A\00"
@stderr = global i32 0
define i32 @_umount_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [61 x i8] c"Usage: umount -a [-f]\0A umount [-f] special | node ...\0A\00"
@stderr = global i32 0
define i32 @_umount_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strncpy(char *, char const *, int);
char *CLemma_BuyBuf(char const *buffer, int length) {
  char *purchase = NULL;
  if (buffer == NULL) {
    return NULL;
  }
  purchase = (char *)malloc(length + 1);
  strncpy(purchase, buffer, length);
  purchase[length] = 0;
  return purchase;
}


x86 assembly (clang, -O0):
<CLemma_BuyBuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114f <CLemma_BuyBuf+0x2f>
movq   $0x0,-0x8(%rbp)
jmp    1182 <CLemma_BuyBuf+0x62>
mov    -0x14(%rbp),%edi
add    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CLemma_BuyBuf>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1153 <CLemma_BuyBuf+0x33>
mov    %esi,%r14d
mov    %rdi,%r15
lea    0x1(%r14),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
mov    %r14d,%edx
call   1030 <strncpy@plt>
movslq %r14d,%rax
movb   $0x0,(%rbx,%rax,1)
jmp    1155 <CLemma_BuyBuf+0x35>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @CLemma_BuyBuf(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = add nsw i32 %1, 1
%6 = tail call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @strncpy(i8* %7, i8* %0, i32 %1)
%9 = sext i32 %1 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
store i8 0, i8* %10
br label %11
11: ; preds = %2, %4
%12 = phi i8* [ %7, %4 ], [ null, %2 ]
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, m = 0, p = 0;
  scanf("%d", &n);
  m = n * n;
  p = n * n * n;
  printf("\n%d", m);
  printf("\n%d", p);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec4(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebx
mov    %ebx,%esi
imul   %ebx,%esi
imul   %esi,%ebx
lea    0xeb8(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
int fdreopen(fd, file, flags)
int fd;
char const *file;
int flags;
{
  int newfd;
  (void)close(fd);
  newfd = flags & 01000 ? creat(file, 0400 | (0400 / 2))
                        : open(file, flags, 0400 | (0400 / 2));
  return movefd(newfd, fd);
}


x86 assembly (clang, -O0):
<fdreopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <close@plt>
mov    -0x14(%rbp),%eax
and    $0x200,%eax
cmp    $0x0,%eax
je     1185 <fdreopen+0x45>
mov    -0x10(%rbp),%rdi
mov    $0x180,%esi
mov    $0x0,%al
call   1060 <creat@plt>
mov    %eax,-0x1c(%rbp)
jmp    119b <fdreopen+0x5b>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    $0x180,%edx
mov    $0x0,%al
call   1050 <open@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1030 <movefd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdreopen>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <close@plt>
mov    %r14,%rdi
test   $0x200,%ebp
jne    116d <fdreopen+0x2d>
mov    %ebp,%esi
mov    $0x180,%edx
xor    %eax,%eax
call   1050 <open@plt>
jmp    1179 <fdreopen+0x39>
mov    $0x180,%esi
xor    %eax,%eax
call   1060 <creat@plt>
mov    %eax,%edi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <movefd@plt>

LLVM IR (-O0):
define i32 @fdreopen(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %8)
%10 = load i32, i32* %6
%11 = and i32 %10, 512
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %3
%14 = load i8*, i8** %5
%15 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @creat to i32 (i8*, i32, ...)*)(i8* %14, i32 384)
br label %20
16: ; preds = %3
%17 = load i8*, i8** %5
%18 = load i32, i32* %6
%19 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @open to i32 (i8*, i32, i32, ...)*)(i8* %17, i32 %18, i32 384)
br label %20
20: ; preds = %16, %13
%21 = phi i32 [ %15, %13 ], [ %19, %16 ]
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %4
%24 = call i32 (i32, i32, ...) bitcast (i32 (...)* @movefd to i32 (i32, i32, ...)*)(i32 %22, i32 %23)
ret i32 %24
}

LLVM IR (-O2):
define i32 @fdreopen(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %0)
%5 = and i32 %2, 512
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @creat to i32 (i8*, i32, ...)*)(i8* %1, i32 384)
br label %11
9: ; preds = %3
%10 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @open to i32 (i8*, i32, i32, ...)*)(i8* %1, i32 %2, i32 384)
br label %11
11: ; preds = %9, %7
%12 = phi i32 [ %8, %7 ], [ %10, %9 ]
%13 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @movefd to i32 (i32, i32, ...)*)(i32 %12, i32 %0)
ret i32 %13
}
int jac_chain_nm3_init(int *n_in, int *n_out, int *n_int, int *n_real) {
  if (n_in)
    *n_in = 2;
  if (n_out)
    *n_out = 2;
  if (n_int)
    *n_int = 0;
  if (n_real)
    *n_real = 0;
  return 0;
}


x86 assembly (clang, -O0):
<jac_chain_nm3_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1129 <jac_chain_nm3_init+0x29>
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113e <jac_chain_nm3_init+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1153 <jac_chain_nm3_init+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1168 <jac_chain_nm3_init+0x68>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_chain_nm3_init>:
test   %rdi,%rdi
je     110b <jac_chain_nm3_init+0xb>
movl   $0x2,(%rdi)
test   %rsi,%rsi
je     1116 <jac_chain_nm3_init+0x16>
movl   $0x2,(%rsi)
test   %rdx,%rdx
je     1121 <jac_chain_nm3_init+0x21>
movl   $0x0,(%rdx)
test   %rcx,%rcx
je     112c <jac_chain_nm3_init+0x2c>
movl   $0x0,(%rcx)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @jac_chain_nm3_init(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = icmp eq i32* %0, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i32 2, i32* %0
br label %7
7: ; preds = %6, %4
%8 = icmp eq i32* %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i32 2, i32* %1
br label %10
10: ; preds = %9, %7
%11 = icmp eq i32* %2, null
br i1 %11, label %13, label %12
12: ; preds = %10
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = icmp eq i32* %3, null
br i1 %14, label %16, label %15
15: ; preds = %13
store i32 0, i32* %3
br label %16
16: ; preds = %15, %13
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
uint8_t do_calculation(uint8_t a, uint8_t b) { return a + b; }


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

x86 assembly (clang, -O2):
<do_calculation>:
lea    (%rdi,%rsi,1),%rax
ret

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

LLVM IR (-O2):
define i64 @do_calculation(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
ret i64 %3
}
void flush(void) {
  unsigned long base;
  if ((*(volatile unsigned long *)(0x100a00 + 0x14)) & (1 << 0)) {
    base = 0x100a00;
  } else if ((*(volatile unsigned long *)(0x100a80 + 0x14)) & (1 << 0)) {
    base = 0x100a80;
  } else {
    return;
  }
  while ((*(volatile unsigned long *)(base + 0x18)) & (1 << 3))
    ;
}


x86 assembly (clang, -O0):
<flush>:
push   %rbp
mov    %rsp,%rbp
mov    $0x100a14,%eax
mov    (%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1127 <flush+0x27>
movq   $0x100a00,-0x8(%rbp)
jmp    1154 <flush+0x54>
mov    $0x100a94,%eax
mov    (%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     114a <flush+0x4a>
movq   $0x100a80,-0x8(%rbp)
jmp    114f <flush+0x4f>
jmp    1174 <flush+0x74>
jmp    1154 <flush+0x54>
jmp    1159 <flush+0x59>
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
and    $0x8,%rax
cmp    $0x0,%rax
je     1174 <flush+0x74>
jmp    1159 <flush+0x59>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flush>:
mov    0x100a14,%rcx
mov    $0x100a18,%eax
test   $0x1,%cl
jne    1130 <flush+0x30>
mov    $0x100a98,%eax
testq  $0x1,0x100a94
je     1139 <flush+0x39>
cs nopw 0x0(%rax,%rax,1)
nop
testq  $0x8,(%rax)
jne    1130 <flush+0x30>
ret

LLVM IR (-O0):
define void @flush() {
%1 = alloca i64
%2 = load volatile i64, i64* inttoptr (i64 1051156 to i64*)
%3 = and i64 %2, 1
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i64 1051136, i64* %1
br label %13
6: ; preds = %0
%7 = load volatile i64, i64* inttoptr (i64 1051284 to i64*)
%8 = and i64 %7, 1
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i64 1051264, i64* %1
br label %12
11: ; preds = %6
br label %22
12: ; preds = %10
br label %13
13: ; preds = %12, %5
br label %14
14: ; preds = %21, %13
%15 = load i64, i64* %1
%16 = add i64 %15, 24
%17 = inttoptr i64 %16 to i64*
%18 = load volatile i64, i64* %17
%19 = and i64 %18, 8
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %14
br label %14
22: ; preds = %11, %14
ret void
}

LLVM IR (-O2):
define void @flush() {
%1 = load volatile i64, i64* inttoptr (i64 1051156 to i64*)
%2 = and i64 %1, 1
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load volatile i64, i64* inttoptr (i64 1051284 to i64*)
%6 = and i64 %5, 1
%7 = icmp eq i64 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %4, %0
%9 = phi i64* [ inttoptr (i64 1051160 to i64*), %0 ], [ inttoptr (i64 1051288 to i64*), %4 ]
br label %10
10: ; preds = %10, %8
%11 = load volatile i64, i64* %9
%12 = and i64 %11, 8
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %10
14: ; preds = %10, %4
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double get_seconds() {
  struct timeval tv[1];
  gettimeofday(tv, NULL);
  return tv->tv_sec + tv->tv_usec / 1e6;
}


x86 assembly (clang, -O0):
<get_seconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xec9(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_seconds>:
sub    $0x18,%rsp
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdl 0x8(%rsp),%xmm0
divsd  0xed4(%rip),%xmm0
addsd  (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i32 }
define double @get_seconds() {
%1 = alloca [1 x %struct.timeval]
%2 = getelementptr inbounds [1 x %struct.timeval], [1 x %struct.timeval]* %1, i64 0, i64 0
%3 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = getelementptr inbounds [1 x %struct.timeval], [1 x %struct.timeval]* %1, i64 0, i64 0
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds [1 x %struct.timeval], [1 x %struct.timeval]* %1, i64 0, i64 0
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 1
%9 = load i32, i32* %8
%10 = sitofp i32 %9 to double
%11 = fdiv double %10, 1.000000e+06
%12 = fadd double %6, %11
ret double %12
}

LLVM IR (-O2):
%struct.timeval = type { double, i32 }
define double @get_seconds() {
%1 = alloca [1 x %struct.timeval]
%2 = bitcast [1 x %struct.timeval]* %1 to i8*
%3 = getelementptr inbounds [1 x %struct.timeval], [1 x %struct.timeval]* %1, i64 0, i64 0
%4 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
%5 = getelementptr inbounds [1 x %struct.timeval], [1 x %struct.timeval]* %1, i64 0, i64 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds [1 x %struct.timeval], [1 x %struct.timeval]* %1, i64 0, i64 0, i32 1
%8 = load i32, i32* %7
%9 = sitofp i32 %8 to double
%10 = fdiv double %9, 1.000000e+06
%11 = fadd double %6, %10
ret double %11
}
/* Variables and functions */
int const log(int const);
double BIC(const double lk, const int k, const int n) {
  return -2 * lk + k * log(n);
}


x86 assembly (clang, -O0):
<BIC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <log@plt>
movsd  -0x20(%rbp),%xmm1
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BIC>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movsd  %xmm0,0x8(%rsp)
mov    %esi,%edi
call   1030 <log@plt>
imul   %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @BIC(double %0, i32 %1, i32 %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
store double %0, double* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load double, double* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @log(i32 %9)
%11 = mul nsw i32 %8, %10
%12 = sitofp i32 %11 to double
%13 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %7, double %12)
ret double %13
}

LLVM IR (-O2):
define double @BIC(double %0, i32 %1, i32 %2) {
%4 = tail call i32 @log(i32 %2)
%5 = mul nsw i32 %4, %1
%6 = sitofp i32 %5 to double
%7 = tail call double @llvm.fmuladd.f64(double %0, double -2.000000e+00, double %6)
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ fn000013AC();
void fn000013C4() {
  fn000013AC();
  fn000013AC();
  fn000013AC();
  fn000013AC();
  fn000013AC();
  fn000013AC();
  fn000013AC();
  fn000013AC();
  fn000013AC();
  return;
}


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

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

LLVM IR (-O0):
define void @fn000013C4() {
%1 = call i32 (...) @fn000013AC()
%2 = call i32 (...) @fn000013AC()
%3 = call i32 (...) @fn000013AC()
%4 = call i32 (...) @fn000013AC()
%5 = call i32 (...) @fn000013AC()
%6 = call i32 (...) @fn000013AC()
%7 = call i32 (...) @fn000013AC()
%8 = call i32 (...) @fn000013AC()
%9 = call i32 (...) @fn000013AC()
ret void
}

LLVM IR (-O2):
define void @fn000013C4() {
%1 = tail call i32 (...) @fn000013AC()
%2 = tail call i32 (...) @fn000013AC()
%3 = tail call i32 (...) @fn000013AC()
%4 = tail call i32 (...) @fn000013AC()
%5 = tail call i32 (...) @fn000013AC()
%6 = tail call i32 (...) @fn000013AC()
%7 = tail call i32 (...) @fn000013AC()
%8 = tail call i32 (...) @fn000013AC()
%9 = tail call i32 (...) @fn000013AC()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
void pipe_handler(int signum) {
  printf("numero de signal %d\n", signum);
  exit(0);
}


x86 assembly (clang, -O0):
<pipe_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<pipe_handler>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"numero de signal %d\0A\00"
define void @pipe_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [21 x i8] c"numero de signal %d\0A\00"
define void @pipe_handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
unsigned int prcmu_get_ddr_freq(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @prcmu_get_ddr_freq() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_not_equal_(char *, int, int, int);
void test_int_not_equal_pass() {
  assert_int_not_equal_("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/"
                        "assertive/refs/heads/master/test/pass_test.c",
                        34, (1), (-1));
}


x86 assembly (clang, -O0):
<test_int_not_equal_pass>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x22,%esi
mov    $0x1,%edx
mov    $0xffffffff,%ecx
call   1030 <assert_int_not_equal_@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_int_not_equal_pass>:
lea    0xee9(%rip),%rdi
mov    $0x22,%esi
mov    $0x1,%edx
mov    $0xffffffff,%ecx
jmp    1030 <assert_int_not_equal_@plt>

LLVM IR (-O0):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/heads/master/test/pass_test.c\00"
define void @test_int_not_equal_pass() {
%1 = call i32 @assert_int_not_equal_(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 34, i32 1, i32 -1)
ret void
}

LLVM IR (-O2):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/heads/master/test/pass_test.c\00"
define void @test_int_not_equal_pass() {
%1 = tail call i32 @assert_int_not_equal_(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 34, i32 1, i32 -1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_free();
int /*<<< orphan*/ get_malloc();
int /*<<< orphan*/ get_memalign();
int /*<<< orphan*/ get_posix_memalign();
int /*<<< orphan*/ get_realloc();
int /*<<< orphan*/ get_valloc();
int /*<<< orphan*/ set_core_unlimited();
void __attribute__((constructor)) mdbg_init_mem_alloc(void) {
  get_malloc();
  get_realloc();
  get_free();
  get_posix_memalign();
  get_memalign();
  get_valloc();
  set_core_unlimited();
}


x86 assembly (clang, -O0):
<mdbg_init_mem_alloc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <get_malloc@plt>
mov    $0x0,%al
call   1030 <get_realloc@plt>
mov    $0x0,%al
call   1090 <get_free@plt>
mov    $0x0,%al
call   1080 <get_posix_memalign@plt>
mov    $0x0,%al
call   1040 <get_memalign@plt>
mov    $0x0,%al
call   1050 <get_valloc@plt>
mov    $0x0,%al
call   1070 <set_core_unlimited@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdbg_init_mem_alloc>:
push   %rax
xor    %eax,%eax
call   1060 <get_malloc@plt>
xor    %eax,%eax
call   1030 <get_realloc@plt>
xor    %eax,%eax
call   1090 <get_free@plt>
xor    %eax,%eax
call   1080 <get_posix_memalign@plt>
xor    %eax,%eax
call   1040 <get_memalign@plt>
xor    %eax,%eax
call   1050 <get_valloc@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <set_core_unlimited@plt>

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @mdbg_init_mem_alloc, i8* null }]
define void @mdbg_init_mem_alloc() {
%1 = call i32 (...) @get_malloc()
%2 = call i32 (...) @get_realloc()
%3 = call i32 (...) @get_free()
%4 = call i32 (...) @get_posix_memalign()
%5 = call i32 (...) @get_memalign()
%6 = call i32 (...) @get_valloc()
%7 = call i32 (...) @set_core_unlimited()
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @mdbg_init_mem_alloc, i8* null }]
define void @mdbg_init_mem_alloc() {
%1 = tail call i32 (...) @get_malloc()
%2 = tail call i32 (...) @get_realloc()
%3 = tail call i32 (...) @get_free()
%4 = tail call i32 (...) @get_posix_memalign()
%5 = tail call i32 (...) @get_memalign()
%6 = tail call i32 (...) @get_valloc()
%7 = tail call i32 (...) @set_core_unlimited()
ret void
}
int test_imm_33int16_mem(short *val) {
  return ((*val) & (0x33 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_33int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0x33,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_33int16_mem>:
testb  $0x33,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_33int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, 51
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_33int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 51
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}