xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sched_yield();
int /*<<< orphan*/ usleep(int);
void jimi_wsleep(unsigned int millisec) {
  if (millisec == 0)
    sched_yield();
  else
    usleep(1);
}


x86 assembly (clang, -O0):
<jimi_wsleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1141 <jimi_wsleep+0x21>
mov    $0x0,%al
call   1030 <sched_yield@plt>
jmp    114b <jimi_wsleep+0x2b>
mov    $0x1,%edi
call   1040 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jimi_wsleep>:
test   %edi,%edi
je     112e <jimi_wsleep+0xe>
mov    $0x1,%edi
jmp    1040 <usleep@plt>
xor    %eax,%eax
jmp    1030 <sched_yield@plt>

LLVM IR (-O0):
define void @jimi_wsleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @sched_yield()
br label %9
7: ; preds = %1
%8 = call i32 @usleep(i32 1)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @jimi_wsleep(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @sched_yield()
br label %7
5: ; preds = %1
%6 = tail call i32 @usleep(i32 1)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
double getDouble(char *, double);
double TIME(double def) { return getDouble("time", def); }


x86 assembly (clang, -O0):
<TIME>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <getDouble@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TIME>:
lea    0xee9(%rip),%rdi
jmp    1030 <getDouble@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"time\00"
define double @TIME(double %0) {
%2 = tail call double @getDouble(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %0)
ret double %2
}
/* Variables and functions */
int path1(int);
int foo(int x) { return path1(x) - 16; }


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

x86 assembly (clang, -O2):
<foo>:
push   %rax
call   1030 <path1@plt>
add    $0xfffffff0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @path1(i32 %3)
%5 = sub nsw i32 %4, 16
ret i32 %5
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = tail call i32 @path1(i32 %0)
%3 = add nsw i32 %2, -16
ret i32 %3
}
void XShmQueryExtension() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @processMethodLookupCache() {
ret void
}
/* Variables and functions */
double pow(int, int);
int /*<<< orphan*/ printf(char *, double);
int main() {
  double x = pow(2, 10000);
  printf("%f\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
mov    $0x2710,%esi
call   1040 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call double @pow(i32 2, i32 10000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ progerr(char *, size_t);
void *realloc(void *, size_t);
void *erealloc(void *ptr, size_t size) {
  void *p;
  if ((p = realloc(ptr, size)) == NULL)
    progerr("Ran out of memory (could not reallocate %lu more bytes)!", size);
  return p;
}


x86 assembly (clang, -O0):
<erealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    115b <erealloc+0x3b>
mov    -0x10(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <progerr@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <erealloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1030 <progerr@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [57 x i8] c"Ran out of memory (could not reallocate %lu more bytes)!\00"
define i8* @erealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i64, i64* %4
%12 = call i32 @progerr(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i64 %11)
br label %13
13: ; preds = %10, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [57 x i8] c"Ran out of memory (could not reallocate %lu more bytes)!\00"
define noalias i8* @erealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @progerr(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ usage(char *);
void option_error(char *s, const char *e) {
  fprintf(stderr, "Error in command line option: %s\n\n", e);
  usage(s);
}


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

x86 assembly (clang, -O2):
<option_error>:
push   %rbx
mov    %rsi,%rdx
mov    %rdi,%rbx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <usage@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Error in command line option: %s\0A\0A\00"
define void @option_error(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %4
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
%9 = call i32 @usage(i8* %8)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Error in command line option: %s\0A\0A\00"
define void @option_error(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = tail call i32 @usage(i8* %0)
ret void
}
void foo(void) {
#pragma omp parallel reduction(& : j)
  ;
#pragma omp parallel reduction(| : j)
  ;
#pragma omp parallel reduction(^ : j)
  ;
#pragma omp parallel reduction(min : j)
  ;
#pragma omp parallel reduction(max : j)
  ;
#pragma omp parallel reduction(& : d)
  ;
#pragma omp parallel reduction(| : d)
  ;
#pragma omp parallel reduction(^ : d)
  ;
#pragma omp parallel reduction(min : d)
  ;
#pragma omp parallel reduction(max : d)
  ;
}


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

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

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

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isprint(int);
int is_printable(const char *buf, size_t size) {
  size_t i;
  for (i = 0; i < size; i++)
    if (!isprint((int)buf[i]))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_printable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1172 <is_printable+0x62>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isprint@plt>
cmp    $0x0,%eax
jne    115c <is_printable+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1179 <is_printable+0x69>
jmp    1161 <is_printable+0x51>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1128 <is_printable+0x18>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_printable>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x1,%r14d
test   %rsi,%rsi
je     114c <is_printable+0x3c>
mov    %rsi,%rbx
mov    %rdi,%r15
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
movsbl (%r15,%rbp,1),%edi
call   1030 <isprint@plt>
test   %eax,%eax
je     1149 <is_printable+0x39>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1130 <is_printable+0x20>
jmp    114c <is_printable+0x3c>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @is_printable(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %14, label %6
4: ; preds = %6
%5 = icmp eq i64 %13, %1
br i1 %5, label %14, label %6
6: ; preds = %2, %4
%7 = phi i64 [ %13, %4 ], [ 0, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = tail call i32 @isprint(i32 %10)
%12 = icmp eq i32 %11, 0
%13 = add nuw i64 %7, 1
br i1 %12, label %14, label %4
14: ; preds = %6, %4, %2
%15 = phi i32 [ 1, %2 ], [ 1, %4 ], [ 0, %6 ]
ret i32 %15
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int mixed_volume_by_demics(int *mv) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(843, mv, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<mixed_volume_by_demics>:
mov    %rdi,%rsi
mov    $0x34b,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @mixed_volume_by_demics(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc(i32 843, i32* %0, i32* undef, double* undef, i32 0)
ret i32 %2
}
void batadv_bla_update_orig_address(struct batadv_priv *bat_priv,
                                    struct batadv_hard_iface *primary_if,
                                    struct batadv_hard_iface *oldif) {}


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

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

LLVM IR (-O0):
%struct.batadv_priv = type opaque
%struct.batadv_hard_iface = type opaque
define void @batadv_bla_update_orig_address(%struct.batadv_priv* %0, %struct.batadv_hard_iface* %1, %struct.batadv_hard_iface* %2) {
%4 = alloca %struct.batadv_priv*
%5 = alloca %struct.batadv_hard_iface*
%6 = alloca %struct.batadv_hard_iface*
store %struct.batadv_priv* %0, %struct.batadv_priv** %4
store %struct.batadv_hard_iface* %1, %struct.batadv_hard_iface** %5
store %struct.batadv_hard_iface* %2, %struct.batadv_hard_iface** %6
ret void
}

LLVM IR (-O2):
%struct.batadv_priv = type opaque
%struct.batadv_hard_iface = type opaque
define void @batadv_bla_update_orig_address(%struct.batadv_priv* nocapture %0, %struct.batadv_hard_iface* nocapture %1, %struct.batadv_hard_iface* nocapture %2) {
ret void
}
char Change(char data) { return data ^ 0xdd; }


x86 assembly (clang, -O0):
<Change>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
xor    $0xdd,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Change>:
mov    %edi,%eax
xor    $0xdd,%al
ret

LLVM IR (-O0):
define signext i8 @Change(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = xor i32 %4, 221
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @Change(i8 signext %0) {
%2 = xor i8 %0, -35
ret i8 %2
}
/* Type definitions */
struct wl_proxy {
  int dummy;
};
struct wl_callback_listener {
  int dummy;
};
struct wl_callback {
  int dummy;
};

/* Variables and functions */
int wl_proxy_add_listener(struct wl_proxy *, void (*)(), void *);
int wl_callback_add_listener(struct wl_callback *wl_callback,
                             const struct wl_callback_listener *listener,
                             void *data) {
  return wl_proxy_add_listener((struct wl_proxy *)wl_callback,
                               (void (**)(void))listener, data);
}


x86 assembly (clang, -O0):
<wl_callback_add_listener>:
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),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <wl_proxy_add_listener@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_callback_add_listener>:
jmp    1030 <wl_proxy_add_listener@plt>

LLVM IR (-O0):
%struct.wl_callback = type { i32 }
%struct.wl_callback_listener = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_callback_add_listener(%struct.wl_callback* %0, %struct.wl_callback_listener* %1, i8* %2) {
%4 = alloca %struct.wl_callback*
%5 = alloca %struct.wl_callback_listener*
%6 = alloca i8*
store %struct.wl_callback* %0, %struct.wl_callback** %4
store %struct.wl_callback_listener* %1, %struct.wl_callback_listener** %5
store i8* %2, i8** %6
%7 = load %struct.wl_callback*, %struct.wl_callback** %4
%8 = bitcast %struct.wl_callback* %7 to %struct.wl_proxy*
%9 = load %struct.wl_callback_listener*, %struct.wl_callback_listener** %5
%10 = bitcast %struct.wl_callback_listener* %9 to void ()**
%11 = bitcast void ()** %10 to void (...)*
%12 = load i8*, i8** %6
%13 = call i32 @wl_proxy_add_listener(%struct.wl_proxy* %8, void (...)* %11, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.wl_callback = type { i32 }
%struct.wl_callback_listener = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_callback_add_listener(%struct.wl_callback* %0, %struct.wl_callback_listener* %1, i8* %2) {
%4 = bitcast %struct.wl_callback* %0 to %struct.wl_proxy*
%5 = bitcast %struct.wl_callback_listener* %1 to void (...)*
%6 = tail call i32 @wl_proxy_add_listener(%struct.wl_proxy* %4, void (...)* %5, i8* %2)
ret i32 %6
}
int cgraph_weight(const double w) { return (int)(w * 1000.0); }


x86 assembly (clang, -O0):
<cgraph_weight>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgraph_weight>:
mulsd  0xef8(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @cgraph_weight(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.000000e+03
%5 = fptosi double %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @cgraph_weight(double %0) {
%2 = fmul double %0, 1.000000e+03
%3 = fptosi double %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char const *);
int /*<<< orphan*/ printf(char *, char const *);
unsigned short openFile(FILE **pFileObj, const char *path, const char *flags) {
  if ((*pFileObj = fopen(path, flags)) == NULL) {
    printf("Unable to open file %s\n", path);
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<openFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <fopen@plt>
mov    -0x10(%rbp),%rcx
mov    %rax,(%rcx)
cmp    $0x0,%rax
jne    116d <openFile+0x4d>
mov    -0x18(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
movw   $0x0,-0x2(%rbp)
jmp    1173 <openFile+0x53>
movw   $0x1,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openFile>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1040 <fopen@plt>
mov    %rax,%rcx
mov    %rax,(%rbx)
mov    $0x1,%ax
test   %rcx,%rcx
jne    1155 <openFile+0x35>
lea    0xeb5(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Unable to open file %s\0A\00"
define zeroext i16 @openFile(i32** %0, i8* %1, i8* %2) {
%4 = alloca i16
%5 = alloca i32**
%6 = alloca i8*
%7 = alloca i8*
store i32** %0, i32*** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = load i8*, i8** %6
%9 = load i8*, i8** %7
%10 = call i32* @fopen(i8* %8, i8* %9)
%11 = load i32**, i32*** %5
store i32* %10, i32** %11
%12 = icmp eq i32* %10, null
br i1 %12, label %13, label %16
13: ; preds = %3
%14 = load i8*, i8** %6
%15 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %14)
store i16 0, i16* %4
br label %17
16: ; preds = %3
store i16 1, i16* %4
br label %17
17: ; preds = %16, %13
%18 = load i16, i16* %4
ret i16 %18
}

LLVM IR (-O2):
@.str = [24 x i8] c"Unable to open file %s\0A\00"
define zeroext i16 @openFile(i32** nocapture writeonly %0, i8* %1, i8* nocapture %2) {
%4 = tail call i32* @fopen(i8* %1, i8* %2)
store i32* %4, i32** %0
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %8
8: ; preds = %3, %6
%9 = phi i16 [ 0, %6 ], [ 1, %3 ]
ret i16 %9
}
/* Variables and functions */
int /*<<< orphan*/ signal_init();
int /*<<< orphan*/ umask(int);
void common_init(void) {
  umask(0077);
  signal_init();
}


x86 assembly (clang, -O0):
<common_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3f,%edi
call   1030 <umask@plt>
mov    $0x0,%al
call   1040 <signal_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<common_init>:
push   %rax
mov    $0x3f,%edi
call   1030 <umask@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <signal_init@plt>

LLVM IR (-O0):
define void @common_init() {
%1 = call i32 @umask(i32 63)
%2 = call i32 (...) @signal_init()
ret void
}

LLVM IR (-O2):
define void @common_init() {
%1 = tail call i32 @umask(i32 63)
%2 = tail call i32 (...) @signal_init()
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR74_get(void) { return U_WMRCORENONE_get("U_WMR74"); }


x86 assembly (clang, -O0):
<U_WMR74_get>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <U_WMRCORENONE_get@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_WMR74_get>:
lea    0xee9(%rip),%rdi
jmp    1030 <U_WMRCORENONE_get@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR74\00"
define i32 @U_WMR74_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR74\00"
define i32 @U_WMR74_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
unsigned umin(unsigned a, unsigned b) {
  if (a <= b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<umin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
ja     1121 <umin+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <umin+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<umin>:
mov    %edi,%eax
cmp    %esi,%edi
cmova  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @umin(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ cndc(char *, unsigned int);
void set_users(unsigned int netid) {
  cndc("network users add %u 0-99999", netid);
}


x86 assembly (clang, -O0):
<set_users>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <cndc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_users>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <cndc@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"network users add %u 0-99999\00"
define void @set_users(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cndc(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"network users add %u 0-99999\00"
define void @set_users(i32 %0) {
%2 = tail call i32 @cndc(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int weak_fn_knrarg(arg)
int arg __attribute__((weak));
{ return 0; }


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

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

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

LLVM IR (-O2):
define i32 @weak_fn_knrarg(i32 %0) {
ret i32 0
}
void freeMatrix(char **matrix, int m) {
  int i;
  for (i = 0; i < m; i++) {
    free(matrix[i]);
  }
  free(matrix);
}


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

x86 assembly (clang, -O2):
<freeMatrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <freeMatrix+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 <freeMatrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freeMatrix(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chSysUnlock();
int /*<<< orphan*/ port_get_irq_status();
int /*<<< orphan*/ port_irq_enabled(int /*<<< orphan*/);
void chSysUnconditionalUnlock(void) {
  if (!port_irq_enabled(port_get_irq_status())) {
    chSysUnlock();
  }
}


x86 assembly (clang, -O0):
<chSysUnconditionalUnlock>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <port_get_irq_status@plt>
mov    %eax,%edi
call   1050 <port_irq_enabled@plt>
cmp    $0x0,%eax
jne    1152 <chSysUnconditionalUnlock+0x22>
mov    $0x0,%al
call   1040 <chSysUnlock@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<chSysUnconditionalUnlock>:
push   %rax
xor    %eax,%eax
call   1030 <port_get_irq_status@plt>
mov    %eax,%edi
call   1050 <port_irq_enabled@plt>
test   %eax,%eax
je     1145 <chSysUnconditionalUnlock+0x15>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <chSysUnlock@plt>

LLVM IR (-O0):
define void @chSysUnconditionalUnlock() {
%1 = call i32 (...) @port_get_irq_status()
%2 = call i32 @port_irq_enabled(i32 %1)
%3 = icmp ne i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = call i32 (...) @chSysUnlock()
br label %6
6: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
define void @chSysUnconditionalUnlock() {
%1 = tail call i32 (...) @port_get_irq_status()
%2 = tail call i32 @port_irq_enabled(i32 %1)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @chSysUnlock()
br label %6
6: ; preds = %4, %0
ret void
}
/* Variables and functions */
int myGetline(char *, int);
int /*<<< orphan*/ printf(char *, int, char *);
char main() {
  int len;
  int max;
  char line[1000];
  char longest[1000];
  max = 0;
  while ((len = myGetline(line, 1000)) > 0)
    printf("%d: %s", len, line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7e0,%rsp
movl   $0x0,-0x8(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <myGetline@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jle    116a <main+0x4a>
mov    -0x4(%rbp),%esi
lea    -0x3f0(%rbp),%rdx
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
movsbl %al,%eax
add    $0x7e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <myGetline@plt>
test   %eax,%eax
jle    116e <main+0x4e>
lea    0xebe(%rip),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %eax,%esi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <myGetline@plt>
test   %eax,%eax
jg     1150 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d: %s\00"
define signext i8 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i8]
%4 = alloca [1000 x i8]
store i32 0, i32* %2
br label %5
5: ; preds = %9, %0
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%7 = call i32 @myGetline(i8* %6, i32 1000)
store i32 %7, i32* %1
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load i32, i32* %1
%11 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %11)
br label %5
13: ; preds = %5
ret i8 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d: %s\00"
define signext i8 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @myGetline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = phi i32 [ %8, %5 ], [ %3, %0 ]
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %2)
%8 = call i32 @myGetline(i8* %2, i32 1000)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret i8 0
}
void XtGetApplicationNameAndClass() {}


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

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

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

LLVM IR (-O2):
define void @XtGetApplicationNameAndClass() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int main() {
  while (1) {
    int x = 0;
    if (x)
      __VERIFIER_error();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1137 <main+0x27>
mov    $0x0,%al
call   1030 <__VERIFIER_error@plt>
jmp    111f <main+0xf>

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %0, %8
store i32 0, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = call i32 (...) @__VERIFIER_error()
br label %8
8: ; preds = %6, %3
br label %3
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
br label %1
}
int number_lines(int line_result, int current_number_lines) {
  if (line_result == 1) {
    current_number_lines++;
  }
  return current_number_lines;
}


x86 assembly (clang, -O0):
<number_lines>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    111d <number_lines+0x1d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_lines>:
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @number_lines(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 = icmp eq i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
store i32 %9, i32* %4
br label %10
10: ; preds = %7, %2
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
define i32 @number_lines(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1
%4 = zext i1 %3 to i32
%5 = add nsw i32 %4, %1
ret i32 %5
}
int ml_nextPrime(int n1) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ml_nextPrime(i32 %0) {
ret i32 0
}
unsigned long blz_max_packed_size(unsigned long src_size) {
  return src_size + src_size / 8 + 64;
}


x86 assembly (clang, -O0):
<blz_max_packed_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
shr    $0x3,%rcx
add    %rcx,%rax
add    $0x40,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blz_max_packed_size>:
mov    %rdi,%rax
shr    $0x3,%rax
add    %rdi,%rax
add    $0x40,%rax
ret

LLVM IR (-O0):
define i64 @blz_max_packed_size(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = udiv i64 %4, 8
%6 = add i64 %3, %5
%7 = add i64 %6, 64
ret i64 %7
}

LLVM IR (-O2):
define i64 @blz_max_packed_size(i64 %0) {
%2 = lshr i64 %0, 3
%3 = add i64 %0, 64
%4 = add i64 %3, %2
ret i64 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void DESDataRead(uint32_t ui32Base, uint32_t *pui32Dest) {
  ;
  while (((*((volatile uint32_t *)(ui32Base + 0x00000020))) & 0x00000001) ==
         0) {
  }
  pui32Dest[0] = (*((volatile uint32_t *)(0x44038000 + 0x00000028)));
  pui32Dest[1] = (*((volatile uint32_t *)(0x44038000 + 0x0000002C)));
}


x86 assembly (clang, -O0):
<DESDataRead>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%eax
cltq
mov    (%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1126 <DESDataRead+0x26>
jmp    110b <DESDataRead+0xb>
mov    $0x44038028,%eax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x4403802c,%eax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<DESDataRead>:
movslq %edi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
testl  $0x1,0x20(%rax)
je     1110 <DESDataRead+0x10>
mov    0x44038028,%eax
mov    %eax,(%rsi)
mov    0x4403802c,%eax
mov    %eax,0x4(%rsi)
ret

LLVM IR (-O0):
define void @DESDataRead(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
br label %5
5: ; preds = %13, %2
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 32
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = and i32 %10, 1
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %5
br label %5
14: ; preds = %5
%15 = load volatile i32, i32* inttoptr (i64 1141080104 to i32*)
%16 = load i32*, i32** %4
%17 = getelementptr inbounds i32, i32* %16, i64 0
store i32 %15, i32* %17
%18 = load volatile i32, i32* inttoptr (i64 1141080108 to i32*)
%19 = load i32*, i32** %4
%20 = getelementptr inbounds i32, i32* %19, i64 1
store i32 %18, i32* %20
ret void
}

LLVM IR (-O2):
define void @DESDataRead(i32 %0, i32* nocapture writeonly %1) {
%3 = add nsw i32 %0, 32
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
br label %6
6: ; preds = %6, %2
%7 = load volatile i32, i32* %5
%8 = and i32 %7, 1
%9 = icmp eq i32 %8, 0
br i1 %9, label %6, label %10
10: ; preds = %6
%11 = load volatile i32, i32* inttoptr (i64 1141080104 to i32*)
store i32 %11, i32* %1
%12 = load volatile i32, i32* inttoptr (i64 1141080108 to i32*)
%13 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %12, i32* %13
ret void
}
int ft_recursive_factorial(int nb) {
  if (nb == 0 || nb == 1)
    return (1);
  else if (nb > 1 && nb < 13)
    return (nb * ft_recursive_factorial(nb - 1));
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_recursive_factorial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <ft_recursive_factorial+0x1f>
cmpl   $0x1,-0x8(%rbp)
jne    113b <ft_recursive_factorial+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1177 <ft_recursive_factorial+0x67>
cmpl   $0x1,-0x8(%rbp)
jle    1170 <ft_recursive_factorial+0x60>
cmpl   $0xd,-0x8(%rbp)
jge    1170 <ft_recursive_factorial+0x60>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <ft_recursive_factorial@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1177 <ft_recursive_factorial+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_recursive_factorial>:
mov    $0x1,%eax
cmp    $0x2,%edi
jb     113e <ft_recursive_factorial+0x3e>
lea    -0x2(%rdi),%ecx
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    $0xa,%ecx
ja     1139 <ft_recursive_factorial+0x39>
imul   %edi,%eax
lea    -0x1(%rdi),%edx
mov    %edx,%edi
cmp    $0x1,%edx
ja     1120 <ft_recursive_factorial+0x20>
mov    $0x1,%ecx
jmp    113b <ft_recursive_factorial+0x3b>
xor    %ecx,%ecx
imul   %ecx,%eax
ret

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

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

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ mode;
};
typedef TYPE_1__ XLeaveWindowEvent;

/* Variables and functions */
int get_XLeaveWindowEvent_mode(void *_p) {
  return (int)((XLeaveWindowEvent *)_p)->mode;
}


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

x86 assembly (clang, -O2):
<get_XLeaveWindowEvent_mode>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get_XLeaveWindowEvent_mode(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int CalculatePerformExpression(char *, int, int /*<<< orphan*/, char *);
int main() {
  char buffer[1024];
  return CalculatePerformExpression("42", 1, 0, buffer);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rcx
lea    0xed0(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <CalculatePerformExpression@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x408,%rsp
lea    0xee2(%rip),%rdi
mov    %rsp,%rcx
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <CalculatePerformExpression@plt>
add    $0x408,%rsp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"42\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32 @CalculatePerformExpression(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i8* %2)
ret i32 %3
}
/* Variables and functions */
char *gets(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
main() {
  char *c = NULL;
  char texto[80];
  printf("Introducir una línea de texto:\n");
  c = gets(texto);
  printf("\nEl texto introducido es:\n");
  puts(texto);
  puts("\nSe escribe por segunda vez:");
  puts(c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movq   $0x0,-0x8(%rbp)
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
call   1050 <gets@plt>
mov    %rax,-0x8(%rbp)
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
call   1030 <puts@plt>
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x58,%rsp
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <gets@plt>
mov    %rax,%rbx
lea    0xef5(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xea4(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Introducir una l\C3\ADnea de texto:\0A\00"
@.str.1 = [27 x i8] c"\0AEl texto introducido es:\0A\00"
@.str.2 = [29 x i8] c"\0ASe escribe por segunda vez:\00"
define i32 @main() {
%1 = alloca i8*
%2 = alloca [80 x i8]
store i8* null, i8** %1
%3 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = call i8* @gets(i8* %4)
store i8* %5, i8** %1
%6 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%8 = call i32 @puts(i8* %7)
%9 = call i32 @puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%10 = load i8*, i8** %1
%11 = call i32 @puts(i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [29 x i8] c"\0ASe escribe por segunda vez:\00"
@str = [32 x i8] c"Introducir una l\C3\ADnea de texto:\00"
@str.3 = [26 x i8] c"\0AEl texto introducido es:\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%4 = call i8* @gets(i8* %2)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.3, i64 0, i64 0))
%6 = call i32 @puts(i8* %2)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @puts(i8* dereferenceable(1) %4)
ret i32 0
}
/* Variables and functions */
scalar_t__ DeleteFile(char const *);
int WMGetLastError();
int XOPDeleteFile(const char *fullFilePath) {
  int err;
  err = 0;
  if (DeleteFile(fullFilePath) == 0)
    err = WMGetLastError();
  return err;
}


x86 assembly (clang, -O0):
<XOPDeleteFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <DeleteFile@plt>
cmp    $0x0,%rax
jne    1150 <XOPDeleteFile+0x30>
mov    $0x0,%al
call   1030 <WMGetLastError@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XOPDeleteFile>:
push   %rax
call   1040 <DeleteFile@plt>
test   %rax,%rax
je     112f <XOPDeleteFile+0xf>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <WMGetLastError@plt>

LLVM IR (-O0):
define i32 @XOPDeleteFile(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = call i64 @DeleteFile(i8* %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (...) @WMGetLastError()
store i32 %8, i32* %3
br label %9
9: ; preds = %7, %1
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @XOPDeleteFile(i8* %0) {
%2 = tail call i64 @DeleteFile(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @WMGetLastError()
br label %6
6: ; preds = %4, %1
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %7
}
adrx0adrreg1_set(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ (((int *)10000000)[x0]) = (p1[1111111 / 4]); }


x86 assembly (clang, -O0):
<adrx0adrreg1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    0x10f444(%rax),%edx
movslq -0x10(%rbp),%rcx
mov    $0x989680,%eax
mov    %edx,(%rax,%rcx,4)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrx0adrreg1_set>:
mov    0x10f444(%r9),%eax
movslq %edx,%rcx
mov    %eax,0x989680(,%rcx,4)
ret

LLVM IR (-O0):
define i32 @adrx0adrreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32*, i32** %13
%15 = getelementptr inbounds i32, i32* %14, i64 277777
%16 = load i32, i32* %15
%17 = load i32, i32* %10
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* inttoptr (i64 10000000 to i32*), i64 %18
store i32 %16, i32* %19
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @adrx0adrreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture %5) {
%7 = getelementptr inbounds i32, i32* %5, i64 277777
%8 = load i32, i32* %7
%9 = sext i32 %2 to i64
%10 = getelementptr inbounds i32, i32* inttoptr (i64 10000000 to i32*), i64 %9
store i32 %8, i32* %10
ret i32 undef
}