xunge/DecIR huggingface dataset:
double vde_chain_nm8_sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : x; }


x86 assembly (clang, -O0):
<vde_chain_nm8_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <vde_chain_nm8_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <vde_chain_nm8_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <vde_chain_nm8_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <vde_chain_nm8_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm8_sign>:
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
andpd  %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @vde_chain_nm8_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
int is_bit_set(int i, unsigned int mask) { return ((1 << i) & mask); }


x86 assembly (clang, -O0):
<is_bit_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @is_bit_set(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 = shl i32 1, %5
%7 = load i32, i32* %4
%8 = and i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_bit_set(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %0
%4 = and i32 %3, %1
ret i32 %4
}
int ft_sqrt(int nb) {
  int i;
  i = 1;
  while (i * i <= nb && i < 46340)
    i++;
  if ((i - 1) * (i - 1) == nb)
    return (i - 1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_sqrt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0xd(%rbp)
jg     1130 <ft_sqrt+0x30>
cmpl   $0xb504,-0xc(%rbp)
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1140 <ft_sqrt+0x40>
jmp    114e <ft_sqrt+0x4e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <ft_sqrt+0xe>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
cmp    -0x8(%rbp),%eax
jne    1174 <ft_sqrt+0x74>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    117b <ft_sqrt+0x7b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_sqrt>:
mov    $0xffffffff,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x2(%rcx),%eax
add    $0x1,%ecx
cmp    $0xb503,%eax
ja     1124 <ft_sqrt+0x24>
imul   %eax,%eax
cmp    %edi,%eax
jle    1110 <ft_sqrt+0x10>
mov    %ecx,%edx
imul   %ecx,%edx
xor    %eax,%eax
cmp    %edi,%edx
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ft_sqrt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 1, i32* %4
br label %5
5: ; preds = %16, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %5
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 46340
br label %14
14: ; preds = %11, %5
%15 = phi i1 [ false, %5 ], [ %13, %11 ]
br i1 %15, label %16, label %19
16: ; preds = %14
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
store i32 %18, i32* %4
br label %5
19: ; preds = %14
%20 = load i32, i32* %4
%21 = sub nsw i32 %20, 1
%22 = load i32, i32* %4
%23 = sub nsw i32 %22, 1
%24 = mul nsw i32 %21, %23
%25 = load i32, i32* %3
%26 = icmp eq i32 %24, %25
br i1 %26, label %27, label %30
27: ; preds = %19
%28 = load i32, i32* %4
%29 = sub nsw i32 %28, 1
store i32 %29, i32* %2
br label %31
30: ; preds = %19
store i32 0, i32* %2
br label %31
31: ; preds = %30, %27
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @ft_sqrt(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %8, %2 ]
%4 = mul nuw nsw i32 %3, %3
%5 = icmp sle i32 %4, %0
%6 = icmp ult i32 %3, 46340
%7 = and i1 %6, %5
%8 = add nuw nsw i32 %3, 1
br i1 %7, label %2, label %9
9: ; preds = %2
%10 = add nsw i32 %3, -1
%11 = mul nuw nsw i32 %10, %10
%12 = icmp eq i32 %11, %0
%13 = select i1 %12, i32 %10, i32 0
ret i32 %13
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int win_gravity;
};
typedef TYPE_1__ XSizeHints;

/* Variables and functions */
void set_XSizeHints_win_gravity(void *_p, int _v) {
  ((XSizeHints *)_p)->win_gravity = (int)_v;
}


x86 assembly (clang, -O0):
<set_XSizeHints_win_gravity>:
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):
<set_XSizeHints_win_gravity>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XSizeHints_win_gravity(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XSizeHints_win_gravity(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *get_ext(const char *path) {
  const char *dot;
  if (path == NULL) {
    return NULL;
  }
  if ((dot = strrchr(path, '.')) == NULL) {
    return NULL;
  }
  return dot + 1;
}


x86 assembly (clang, -O0):
<get_ext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <get_ext+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1169 <get_ext+0x59>
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    115d <get_ext+0x4d>
movq   $0x0,-0x8(%rbp)
jmp    1169 <get_ext+0x59>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ext>:
test   %rdi,%rdi
je     1133 <get_ext+0x23>
push   %rax
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,%rcx
add    $0x1,%rax
test   %rcx,%rcx
cmove  %rcx,%rax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @get_ext(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %16
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i8* @strrchr(i8* %9, i8 signext 46)
store i8* %10, i8** %4
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %13
12: ; preds = %8
store i8* null, i8** %2
br label %16
13: ; preds = %8
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8* %15, i8** %2
br label %16
16: ; preds = %13, %12, %7
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
define i8* @get_ext(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @strrchr(i8* %0, i8 signext 46)
%5 = icmp eq i8* %4, null
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = select i1 %5, i8* null, i8* %6
br label %8
8: ; preds = %3, %1
%9 = phi i8* [ null, %1 ], [ %7, %3 ]
ret i8* %9
}
void foo721() {}


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

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

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

LLVM IR (-O2):
define void @foo721() {
ret void
}
/* Variables and functions */
double floor(double);
double round(double x) { return floor(x + 0.5); }


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

x86 assembly (clang, -O2):
<round>:
addsd  0xee8(%rip),%xmm0
jmp    1030 <floor@plt>

LLVM IR (-O0):
define double @round(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 5.000000e-01
%5 = call double @llvm.floor.f64(double %4)
ret double %5
}

LLVM IR (-O2):
define double @round(double %0) {
%2 = fadd double %0, 5.000000e-01
%3 = tail call double @llvm.floor.f64(double %2)
ret double %3
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int restore_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(48, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<restore_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x30,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<restore_solutions>:
mov    $0x30,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @restore_solutions() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 48, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @restore_solutions() {
%1 = tail call i32 @_ada_use_c2phc(i32 48, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Type definitions */
struct statfs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ die(char *);
scalar_t__ statfs(char *, struct statfs *);
struct statfs get_stats(char *disk) {
  struct statfs stats;
  if (statfs(disk, &stats) != 0) {
    die("Cannot read disk statistics.");
  }
  return stats;
}


x86 assembly (clang, -O0):
<get_stats>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <statfs@plt>
cmp    $0x0,%rax
je     114f <get_stats+0x2f>
lea    0xeb6(%rip),%rdi
call   1040 <die@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_stats>:
push   %rax
mov    %rsp,%rsi
call   1030 <statfs@plt>
test   %rax,%rax
je     113a <get_stats+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <die@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.statfs = type { i32 }
@.str = [29 x i8] c"Cannot read disk statistics.\00"
define i32 @get_stats(i8* %0) {
%2 = alloca %struct.statfs
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @statfs(i8* %4, %struct.statfs* %2)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = getelementptr inbounds %struct.statfs, %struct.statfs* %2, i32 0, i32 0
%11 = load i32, i32* %10
ret i32 %11
}

LLVM IR (-O2):
%struct.statfs = type { i32 }
@.str = [29 x i8] c"Cannot read disk statistics.\00"
define i32 @get_stats(i8* %0) {
%2 = alloca %struct.statfs
%3 = call i64 @statfs(i8* %0, %struct.statfs* %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = getelementptr inbounds %struct.statfs, %struct.statfs* %2, i64 0, i32 0
%9 = load i32, i32* %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stdout;
void testm(void *e, char *message, char *variable) {
  if (e == NULL) {
    fprintf(stdout, "%s- ERROR mallocing %s\n", message, variable);
    exit(0);
  }
}


x86 assembly (clang, -O0):
<testm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1163 <testm+0x43>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xea9(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testm>:
test   %rdi,%rdi
je     1126 <testm+0x6>
ret
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [24 x i8] c"%s- ERROR mallocing %s\0A\00"
define void @testm(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %15
9: ; preds = %3
%10 = load i32, i32* @stdout
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
%14 = call i32 @exit(i32 0)
unreachable
15: ; preds = %3
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [24 x i8] c"%s- ERROR mallocing %s\0A\00"
define void @testm(i8* readnone %0, i8* %1, i8* %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %5, label %9
5: ; preds = %3
%6 = load i32, i32* @stdout
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2)
%8 = tail call i32 @exit(i32 0)
unreachable
9: ; preds = %3
ret void
}
/* Variables and functions */
double log10(double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int main(void) {
  double x;
  double result;
  printf("x: ");
  scanf("%lf", &x);
  result = log10(x);
  printf("log10(%lf) = %lf\n", x, result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
call   1050 <log10@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe8b(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
call   1050 <log10@plt>
movaps %xmm0,%xmm1
movsd  (%rsp),%xmm0
lea    0xea1(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"x: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [18 x i8] c"log10(%lf) = %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = call double @log10(double %6)
store double %7, double* %3
%8 = load double, double* %2
%9 = load double, double* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double %8, double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"x: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [18 x i8] c"log10(%lf) = %lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = call double @log10(double %5)
%7 = load double, double* %1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double %7, double %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, char *, size_t);
void memcpy_walk(void *dst, char **src, size_t n) {
  memcpy(dst, *src, n);
  *src = *src + n;
}


x86 assembly (clang, -O0):
<memcpy_walk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcpy_walk>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    (%rsi),%rsi
call   1030 <memcpy@plt>
add    %r14,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @memcpy_walk(i8* %0, i8** %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i64
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8**, i8*** %5
%9 = load i8*, i8** %8
%10 = load i64, i64* %6
%11 = call i32 @memcpy(i8* %7, i8* %9, i64 %10)
%12 = load i8**, i8*** %5
%13 = load i8*, i8** %12
%14 = load i64, i64* %6
%15 = getelementptr inbounds i8, i8* %13, i64 %14
%16 = load i8**, i8*** %5
store i8* %15, i8** %16
ret void
}

LLVM IR (-O2):
define void @memcpy_walk(i8* %0, i8** nocapture %1, i64 %2) {
%4 = load i8*, i8** %1
%5 = tail call i32 @memcpy(i8* %0, i8* %4, i64 %2)
%6 = load i8*, i8** %1
%7 = getelementptr inbounds i8, i8* %6, i64 %2
store i8* %7, i8** %1
ret void
}
unsigned int f9(unsigned int x, unsigned int y) {
  return (x << y) | (x >> ((-y) & (8 * sizeof(unsigned int) - 1)));
}


x86 assembly (clang, -O0):
<f9>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
mov    %ecx,%ecx
and    $0x1f,%rcx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f9>:
mov    %esi,%ecx
mov    %edi,%eax
rol    %cl,%eax
ret

LLVM IR (-O0):
define i32 @f9(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub i32 0, %9
%11 = zext i32 %10 to i64
%12 = and i64 %11, 31
%13 = trunc i64 %12 to i32
%14 = lshr i32 %8, %13
%15 = or i32 %7, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @f9(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub i32 0, %1
%5 = and i32 %4, 31
%6 = lshr i32 %0, %5
%7 = or i32 %6, %3
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ mystrcpy(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int size2 = 4096;
  char string1[] = "ma vedi mpo'";
  char string2[size2];
  mystrcpy(string2, string1);
  printf("str 2 is %s\n", string2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x1000,-0x4(%rbp)
movabs $0x276f706d206964,%rax
mov    %rax,-0x13(%rbp)
movabs $0x206964657620616d,%rax
64 69 20
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x30(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x28(%rbp)
lea    -0x18(%rbp),%rsi
call   1040 <mystrcpy@plt>
mov    -0x30(%rbp),%rsi
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x1018,%rsp
mov    %rsp,%rbx
movabs $0x276f706d206964,%rax
mov    %rax,0x5(%rsp)
movabs $0x206964657620616d,%rax
64 69 20
mov    %rax,(%rsp)
lea    0x10(%rsp),%r14
mov    %rsp,%rsi
mov    %r14,%rdi
call   1040 <mystrcpy@plt>
lea    0xeac(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
mov    %rbx,%rsp
xor    %eax,%eax
add    $0x1018,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.string1 = [13 x i8] c"ma vedi mpo'\00"
@.str = [13 x i8] c"str 2 is %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [13 x i8]
%3 = alloca i8*
%4 = alloca i64
store i32 4096, i32* %1
%5 = bitcast [13 x i8]* %2 to i8*
%6 = load i32, i32* %1
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %3
%9 = alloca i8, i64 %7
store i64 %7, i64* %4
%10 = getelementptr inbounds [13 x i8], [13 x i8]* %2, i64 0, i64 0
%11 = call i32 @mystrcpy(i8* %9, i8* %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %9)
%13 = load i8*, i8** %3
ret i32 0
}

LLVM IR (-O2):
@__const.main.string1 = [13 x i8] c"ma vedi mpo'\00"
@.str = [13 x i8] c"str 2 is %s\0A\00"
define i32 @main() {
%1 = alloca [13 x i8]
%2 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%3 = tail call i8* @llvm.stacksave()
%4 = alloca [4096 x i8]
%5 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%6 = call i32 @mystrcpy(i8* %5, i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ spi_transfer(int);
void ad7799_reset(void) {
  int i;
  for (i = 0; i < 4; i++)
    spi_transfer(0xff);
}


x86 assembly (clang, -O0):
<ad7799_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
jge    1141 <ad7799_reset+0x31>
mov    $0xff,%edi
call   1030 <spi_transfer@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <ad7799_reset+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ad7799_reset>:
push   %rax
mov    $0xff,%edi
call   1030 <spi_transfer@plt>
mov    $0xff,%edi
call   1030 <spi_transfer@plt>
mov    $0xff,%edi
call   1030 <spi_transfer@plt>
mov    $0xff,%edi
pop    %rax
jmp    1030 <spi_transfer@plt>

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

LLVM IR (-O2):
define void @ad7799_reset() {
%1 = tail call i32 @spi_transfer(i32 255)
%2 = tail call i32 @spi_transfer(i32 255)
%3 = tail call i32 @spi_transfer(i32 255)
%4 = tail call i32 @spi_transfer(i32 255)
ret void
}
/* Variables and functions */
scalar_t__ islower(int);
int toupper(int c) {
  if (islower(c))
    return c & 0x5f;
  return c;
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     113b <toupper+0x2b>
mov    -0x8(%rbp),%eax
and    $0x5f,%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <toupper+0x31>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
mov    %ebx,%ecx
and    $0x5f,%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @islower(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = and i32 %8, 95
store i32 %9, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %3
store i32 %11, i32* %2
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i64 @islower(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = and i32 %0, 95
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int scan(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc > 1) {
    return scan(argv[1]);
  } else {
    fprintf(stderr, "%s <expr>\n", argv[0]);
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1155 <main+0x35>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <scan@plt>
mov    %eax,-0x4(%rbp)
jmp    1178 <main+0x58>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     1130 <main+0x10>
mov    0x8(%rsi),%rdi
pop    %rax
jmp    1040 <scan@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"%s <expr>\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @scan(i8* %11)
store i32 %12, i32* %3
br label %19
13: ; preds = %2
%14 = load i32, i32* @stderr
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 0
%17 = load i8*, i8** %16
%18 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %17)
store i32 0, i32* %3
br label %19
19: ; preds = %13, %8
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"%s <expr>\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @scan(i8* %6)
br label %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %1
%11 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %8, %4
%13 = phi i32 [ %7, %4 ], [ 0, %8 ]
ret i32 %13
}
/* Type definitions */
struct _glist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ glist_getfont(struct _glist *);
int /*<<< orphan*/ glist_getzoom(struct _glist *);
int sys_zoomfontwidth(int /*<<< orphan*/, int /*<<< orphan*/,
                      int /*<<< orphan*/);
int glist_fontwidth(struct _glist *x) {
  return (sys_zoomfontwidth(glist_getfont(x), glist_getzoom(x), 0));
}


x86 assembly (clang, -O0):
<glist_fontwidth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <glist_getfont@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <glist_getzoom@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
xor    %edx,%edx
call   1040 <sys_zoomfontwidth@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glist_fontwidth>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1050 <glist_getfont@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <glist_getzoom@plt>
mov    %ebp,%edi
mov    %eax,%esi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <sys_zoomfontwidth@plt>

LLVM IR (-O0):
%struct._glist = type { i32 }
define i32 @glist_fontwidth(%struct._glist* %0) {
%2 = alloca %struct._glist*
store %struct._glist* %0, %struct._glist** %2
%3 = load %struct._glist*, %struct._glist** %2
%4 = call i32 @glist_getfont(%struct._glist* %3)
%5 = load %struct._glist*, %struct._glist** %2
%6 = call i32 @glist_getzoom(%struct._glist* %5)
%7 = call i32 @sys_zoomfontwidth(i32 %4, i32 %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
%struct._glist = type { i32 }
define i32 @glist_fontwidth(%struct._glist* %0) {
%2 = tail call i32 @glist_getfont(%struct._glist* %0)
%3 = tail call i32 @glist_getzoom(%struct._glist* %0)
%4 = tail call i32 @sys_zoomfontwidth(i32 %2, i32 %3, i32 0)
ret i32 %4
}
int check_filter(unsigned char *filter) {
  unsigned char *c;
  int ret = 1;
  if (filter != ((void *)0)) {
    c = my_strchr(filter, '*');
    if (c != ((void *)0)) {
      *c = '\0';
      ret = 0;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<check_filter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1162 <check_filter+0x52>
mov    -0x8(%rbp),%rdi
mov    $0x2a,%esi
mov    $0x0,%al
call   1030 <my_strchr@plt>
cltq
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115d <check_filter+0x4d>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x0,-0x14(%rbp)
jmp    1162 <check_filter+0x52>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_filter>:
push   %rbx
mov    $0x1,%ebx
test   %rdi,%rdi
je     1132 <check_filter+0x22>
mov    $0x2a,%esi
xor    %eax,%eax
call   1030 <my_strchr@plt>
test   %eax,%eax
je     1132 <check_filter+0x22>
cltq
movb   $0x0,(%rax)
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @check_filter(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
store i32 1, i32* %4
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @my_strchr to i32 (i8*, i32, ...)*)(i8* %8, i32 42)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %16
14: ; preds = %7
%15 = load i8*, i8** %3
store i8 0, i8* %15
store i32 0, i32* %4
br label %16
16: ; preds = %14, %7
br label %17
17: ; preds = %16, %1
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
define i32 @check_filter(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @my_strchr to i32 (i8*, i32, ...)*)(i8* %0, i32 42)
%5 = icmp eq i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = sext i32 %4 to i64
%8 = inttoptr i64 %7 to i8*
store i8 0, i8* %8
br label %9
9: ; preds = %3, %6, %1
%10 = phi i32 [ 0, %6 ], [ 1, %3 ], [ 1, %1 ]
ret i32 %10
}
int vector_equals(double *v_1, double *v_2) {
  int i;
  for (i = 0; i < 2; i++) {
    if (v_1[i] != v_2[i]) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<vector_equals>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x2,-0x1c(%rbp)
jge    1167 <vector_equals+0x67>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jne    1148 <vector_equals+0x48>
jp     1148 <vector_equals+0x48>
jmp    1154 <vector_equals+0x54>
movl   $0x0,-0x4(%rbp)
jmp    116e <vector_equals+0x6e>
jmp    1159 <vector_equals+0x59>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1113 <vector_equals+0x13>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_equals>:
movsd  (%rdi),%xmm0
xor    %eax,%eax
ucomisd (%rsi),%xmm0
jne    110e <vector_equals+0xe>
jnp    110f <vector_equals+0xf>
ret
movsd  0x8(%rdi),%xmm0
ucomisd 0x8(%rsi),%xmm0
jne    110e <vector_equals+0xe>
jp     110e <vector_equals+0xe>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @vector_equals(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fcmp une double %3, %4
br i1 %5, label %13, label %6
6: ; preds = %2
%7 = getelementptr inbounds double, double* %0, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %1, i64 1
%10 = load double, double* %9
%11 = fcmp une double %8, %10
br i1 %11, label %13, label %12
12: ; preds = %6
br label %13
13: ; preds = %12, %6, %2
%14 = phi i32 [ 0, %2 ], [ 0, %6 ], [ 1, %12 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void cleanup(void *arg) { fputs("in cleanup\n", stdout); }


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

x86 assembly (clang, -O2):
<cleanup>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"in cleanup\0A\00"
@stdout = global i32 0
define void @cleanup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = call i32 @fputs(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"in cleanup\0A\00"
@stdout = global i32 0
define void @cleanup(i8* nocapture readnone %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
void flush_tlb_kernel_vm(void) {}


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

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

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

LLVM IR (-O2):
define void @flush_tlb_kernel_vm() {
ret void
}
/* Variables and functions */
long double atan(long double);
long double fun_atan(long double a) { return atan(a); }


x86 assembly (clang, -O0):
<fun_atan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <atan@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_atan>:
jmp    1030 <atan@plt>

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

LLVM IR (-O2):
define x86_fp80 @fun_atan(x86_fp80 %0) {
%2 = tail call x86_fp80 @atan(x86_fp80 %0)
ret x86_fp80 %2
}
void activateProxyChains(void) { init_lib_wrapper(__FUNCTION__); }


x86 assembly (clang, -O0):
<activateProxyChains>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <init_lib_wrapper@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<activateProxyChains>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <init_lib_wrapper@plt>

LLVM IR (-O0):
@__FUNCTION__.activateProxyChains = [20 x i8] c"activateProxyChains\00"
define void @activateProxyChains() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @init_lib_wrapper to i32 (i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__FUNCTION__.activateProxyChains, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.activateProxyChains = [20 x i8] c"activateProxyChains\00"
define void @activateProxyChains() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @init_lib_wrapper to i32 (i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__FUNCTION__.activateProxyChains, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mock_assert(int, char *, char *, int);
void increment_value(int *const value) {
  mock_assert((int)(value), "value",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/fsaintjacques/cmockery/refs/heads/"
              "master/examples/assert_module.c",
              26);
  ;
  (*value)++;
}


x86 assembly (clang, -O0):
<increment_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
lea    0xed7(%rip),%rsi
lea    0xed6(%rip),%rdx
mov    $0x1a,%ecx
call   1030 <mock_assert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<increment_value>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
lea    0xee4(%rip),%rdx
mov    $0x1a,%ecx
call   1030 <mock_assert@plt>
addl   $0x1,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"value\00"
@.str.1 = [156 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fsaintjacques/cmockery/refs/heads/master/examples/assert_module.c\00"
define void @increment_value(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = ptrtoint i32* %3 to i32
%5 = call i32 @mock_assert(i32 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str.1, i64 0, i64 0), i32 26)
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 1
store i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"value\00"
@.str.1 = [156 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fsaintjacques/cmockery/refs/heads/master/examples/assert_module.c\00"
define void @increment_value(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @mock_assert(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str.1, i64 0, i64 0), i32 26)
%5 = load i32, i32* %0
%6 = add nsw i32 %5, 1
store i32 %6, i32* %0
ret void
}
/* Type definitions */
struct pt_regs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dec_machine_halt();
void dec_intr_halt(int irq, void *dev_id, struct pt_regs *regs) {
  dec_machine_halt();
}


x86 assembly (clang, -O0):
<dec_intr_halt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <dec_machine_halt@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.pt_regs = type { i32 }
define void @dec_intr_halt(i32 %0, i8* %1, %struct.pt_regs* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca %struct.pt_regs*
store i32 %0, i32* %4
store i8* %1, i8** %5
store %struct.pt_regs* %2, %struct.pt_regs** %6
%7 = call i32 (...) @dec_machine_halt()
ret void
}

LLVM IR (-O2):
%struct.pt_regs = type { i32 }
define void @dec_intr_halt(i32 %0, i8* nocapture readnone %1, %struct.pt_regs* nocapture readnone %2) {
%4 = tail call i32 (...) @dec_machine_halt()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ move_bol();
void cmd_bol(const char *pf, char **args) { move_bol(); }


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

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

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

LLVM IR (-O2):
define void @cmd_bol(i8* nocapture readnone %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @move_bol()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cReadByte(int, unsigned char *);
unsigned char CheckId_ET8EC3(void) {
  unsigned char temp1;
  unsigned char temp2;
  unsigned char temp3;
  VIM_SIF_I2cReadByte(0x01, &temp1);
  VIM_SIF_I2cReadByte(0x7f, &temp2);
  VIM_SIF_I2cReadByte(0x00, &temp3);
  if ((temp1 = 0x1f) && (temp2 = 0x18) && (temp3 = 0x00))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<CheckId_ET8EC3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
lea    -0x2(%rbp),%rsi
call   1030 <VIM_SIF_I2cReadByte@plt>
mov    $0x7f,%edi
lea    -0x3(%rbp),%rsi
call   1030 <VIM_SIF_I2cReadByte@plt>
xor    %edi,%edi
lea    -0x4(%rbp),%rsi
call   1030 <VIM_SIF_I2cReadByte@plt>
movb   $0x1f,-0x2(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1152 <CheckId_ET8EC3+0x42>
jmp    1181 <CheckId_ET8EC3+0x71>
movb   $0x18,-0x3(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1165 <CheckId_ET8EC3+0x55>
jmp    1181 <CheckId_ET8EC3+0x71>
movb   $0x0,-0x4(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    1178 <CheckId_ET8EC3+0x68>
jmp    1181 <CheckId_ET8EC3+0x71>
movb   $0x1,-0x1(%rbp)
jmp    1185 <CheckId_ET8EC3+0x75>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckId_ET8EC3>:
push   %rax
lea    0x7(%rsp),%rsi
mov    $0x1,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
lea    0x6(%rsp),%rsi
mov    $0x7f,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
lea    0x5(%rsp),%rsi
xor    %edi,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @CheckId_ET8EC3() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = call i32 @VIM_SIF_I2cReadByte(i32 1, i8* %2)
%6 = call i32 @VIM_SIF_I2cReadByte(i32 127, i8* %3)
%7 = call i32 @VIM_SIF_I2cReadByte(i32 0, i8* %4)
store i8 31, i8* %2
br i1 true, label %8, label %11
8: ; preds = %0
store i8 24, i8* %3
br i1 true, label %9, label %11
9: ; preds = %8
store i8 0, i8* %4
br i1 false, label %10, label %11
10: ; preds = %9
store i8 1, i8* %1
br label %12
11: ; preds = %9, %8, %0
store i8 0, i8* %1
br label %12
12: ; preds = %11, %10
%13 = load i8, i8* %1
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @CheckId_ET8EC3() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = call i32 @VIM_SIF_I2cReadByte(i32 1, i8* %1)
%5 = call i32 @VIM_SIF_I2cReadByte(i32 127, i8* %2)
%6 = call i32 @VIM_SIF_I2cReadByte(i32 0, i8* %3)
ret i8 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ InitApp();
int /*<<< orphan*/ Scan_LEDs();
int32_t main(void) {
  InitApp();
  Scan_LEDs();
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @InitApp()
%2 = tail call i32 (...) @Scan_LEDs()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ cmd;

/* Variables and functions */
int shellout(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
int run_converter(int vifm_like_mode) {
  char cmd[4096];
  snprintf(cmd, sizeof(cmd), "vifmrc-converter %d", vifm_like_mode);
  return shellout(cmd, -1, 0);
}


x86 assembly (clang, -O0):
<run_converter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x1010(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0x1000,%esi
lea    0xebc(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x1010(%rbp),%rdi
mov    $0xffffffff,%esi
xor    %edx,%edx
call   1040 <shellout@plt>
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_converter>:
push   %rbx
sub    $0x1000,%rsp
mov    %edi,%ecx
lea    0xecf(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1000,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
xor    %edx,%edx
call   1040 <shellout@plt>
add    $0x1000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"vifmrc-converter %d\00"
define i32 @run_converter(i32 %0) {
%2 = alloca i32
%3 = alloca [4096 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @snprintf(i8* %4, i32 4096, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%8 = call i32 @shellout(i8* %7, i32 -1, i32 0)
ret i32 %8
}

LLVM IR (-O2):
@.str = [20 x i8] c"vifmrc-converter %d\00"
define i32 @run_converter(i32 %0) {
%2 = alloca [4096 x i8]
%3 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 4096, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @shellout(i8* %3, i32 -1, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit_();
int /*<<< orphan*/ game_();
scalar_t__ init_();
int main(int argc, char *argv[]) {
  argv[argc] = ((void *)0);
  if (init_()) {
    game_();
  }
  exit_();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    $0x0,%al
call   1030 <init_@plt>
cmp    $0x0,%rax
je     116e <main+0x3e>
mov    $0x0,%al
call   1040 <game_@plt>
mov    $0x0,%al
call   1050 <exit_@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movslq %edi,%rax
movq   $0x0,(%rsi,%rax,8)
xor    %eax,%eax
call   1030 <init_@plt>
test   %rax,%rax
je     114f <main+0x1f>
xor    %eax,%eax
call   1040 <game_@plt>
xor    %eax,%eax
call   1050 <exit_@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8*, i8** %6, i64 %8
store i8* null, i8** %9
%10 = call i64 (...) @init_()
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (...) @game_()
br label %14
14: ; preds = %12, %2
%15 = call i32 (...) @exit_()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture writeonly %1) {
%3 = sext i32 %0 to i64
%4 = getelementptr inbounds i8*, i8** %1, i64 %3
store i8* null, i8** %4
%5 = tail call i64 (...) @init_()
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call i32 (...) @game_()
br label %9
9: ; preds = %7, %2
%10 = tail call i32 (...) @exit_()
ret i32 0
}