xunge/DecIR huggingface dataset:
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = input[0UL] + (unsigned short)2885;
    local1 = 0UL;
    while (local1 < 1UL) {
      state[local1] += state[local1];
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + 809088178UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0xb45,%eax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x1,%rax
jae    115a <RandomFunc+0x5a>
movzwl -0x14(%rbp),%eax
movzwl -0x12(%rbp,%rax,2),%edx
movzwl -0x14(%rbp),%eax
movzwl -0x12(%rbp,%rax,2),%ecx
add    %edx,%ecx
mov    %cx,-0x12(%rbp,%rax,2)
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1122 <RandomFunc+0x22>
movzwl -0x12(%rbp),%eax
add    $0x3039b4b2,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    %eax,%eax
add    $0xffffcb3c,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i32
%11 = add nsw i32 %10, 2885
%12 = trunc i32 %11 to i16
%13 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %12, i16* %13
store i16 0, i16* %6
br label %14
14: ; preds = %18, %2
%15 = load i16, i16* %6
%16 = zext i16 %15 to i64
%17 = icmp ult i64 %16, 1
br i1 %17, label %18, label %35
18: ; preds = %14
%19 = load i16, i16* %6
%20 = zext i16 %19 to i64
%21 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 %20
%22 = load i16, i16* %21
%23 = zext i16 %22 to i32
%24 = load i16, i16* %6
%25 = zext i16 %24 to i64
%26 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 %25
%27 = load i16, i16* %26
%28 = zext i16 %27 to i32
%29 = add nsw i32 %28, %23
%30 = trunc i32 %29 to i16
store i16 %30, i16* %26
%31 = load i16, i16* %6
%32 = zext i16 %31 to i64
%33 = add i64 %32, 2
%34 = trunc i64 %33 to i16
store i16 %34, i16* %6
br label %14
35: ; preds = %14
%36 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%37 = load i16, i16* %36
%38 = zext i16 %37 to i64
%39 = add i64 %38, 809088178
%40 = trunc i64 %39 to i16
%41 = load i16*, i16** %4
%42 = getelementptr inbounds i16, i16* %41, i64 0
store i16 %40, i16* %42
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = shl i16 %3, 1
%5 = add i16 %4, -13508
store i16 %5, i16* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void memory_bailout(void) {
  (void)fprintf(stderr, "Out of memory\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"Out of memory\0A\00"
define void @memory_bailout() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"Out of memory\0A\00"
define void @memory_bailout() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ shim_enosys(int /*<<< orphan*/);
int shim_gettid(void) { return (int)shim_enosys(0); }


x86 assembly (clang, -O0):
<shim_gettid>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <shim_enosys@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<shim_gettid>:
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

LLVM IR (-O0):
define i32 @shim_gettid() {
%1 = call i64 @shim_enosys(i32 0)
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @shim_gettid() {
%1 = tail call i64 @shim_enosys(i32 0)
%2 = trunc i64 %1 to i32
ret i32 %2
}
void MergeRGBPlane() {}


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

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

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

LLVM IR (-O2):
define void @MergeRGBPlane() {
ret void
}
int mulTwoPower(int n, int m) { return n << m; }


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

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

LLVM IR (-O0):
define i32 @mulTwoPower(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
ret i32 %7
}

LLVM IR (-O2):
define i32 @mulTwoPower(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int ultra_violet_led_control(int state) {
  switch (state) {
  case 0:
    printf("LED OFF");
    break;
  case 1:
    printf("LED ON");
    break;
  default:
    break;
  }
  return state;
}


x86 assembly (clang, -O0):
<ultra_violet_led_control>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     113f <ultra_violet_led_control+0x2f>
jmp    112e <ultra_violet_led_control+0x1e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     1150 <ultra_violet_led_control+0x40>
jmp    1161 <ultra_violet_led_control+0x51>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    1166 <ultra_violet_led_control+0x56>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
jmp    1166 <ultra_violet_led_control+0x56>
jmp    1166 <ultra_violet_led_control+0x56>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ultra_violet_led_control>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
je     1125 <ultra_violet_led_control+0x15>
cmp    $0x1,%ebx
jne    1131 <ultra_violet_led_control+0x21>
lea    0xee5(%rip),%rdi
jmp    112c <ultra_violet_led_control+0x1c>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"LED OFF\00"
@.str.1 = [7 x i8] c"LED ON\00"
define i32 @ultra_violet_led_control(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 0, label %4
i32 1, label %6
]
4: ; preds = %1
%5 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %9
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %6, %4
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [8 x i8] c"LED OFF\00"
@.str.1 = [7 x i8] c"LED ON\00"
define i32 @ultra_violet_led_control(i32 returned %0) {
switch i32 %0, label %6 [
i32 0, label %3
i32 1, label %2
]
2: ; preds = %1
br label %3
3: ; preds = %1, %2
%4 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %1 ]
%5 = tail call i32 @printf(i8* dereferenceable(1) %4)
br label %6
6: ; preds = %3, %1
ret i32 %0
}
void openVerticalBox(void *ui_interface, const char *label) {}


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

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

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

LLVM IR (-O2):
define void @openVerticalBox(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ drv_generic_serial_close();
int drv_LW_ABP_close(void) {
  drv_generic_serial_close();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @drv_LW_ABP_close() {
%1 = tail call i32 (...) @drv_generic_serial_close()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ getdelim(char **, size_t *, char, int /*<<< orphan*/ *);
ssize_t getline(char **buf, size_t *bufsiz, FILE *fp) {
  return getdelim(buf, bufsiz, '\n', fp);
}


x86 assembly (clang, -O0):
<getline>:
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),%rcx
mov    $0xa,%edx
call   1030 <getdelim@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getline>:
mov    %rdx,%rcx
mov    $0xa,%edx
jmp    1030 <getdelim@plt>

LLVM IR (-O0):
define i32 @getline(i8** %0, i64* %1, i32* %2) {
%4 = alloca i8**
%5 = alloca i64*
%6 = alloca i32*
store i8** %0, i8*** %4
store i64* %1, i64** %5
store i32* %2, i32** %6
%7 = load i8**, i8*** %4
%8 = load i64*, i64** %5
%9 = load i32*, i32** %6
%10 = call i32 @getdelim(i8** %7, i64* %8, i8 signext 10, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @getline(i8** %0, i64* %1, i32* %2) {
%4 = tail call i32 @getdelim(i8** %0, i64* %1, i8 signext 10, i32* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int bar(void) { foo(); }


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

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

LLVM IR (-O0):
define i32 @bar() {
%1 = alloca i32
%2 = call i32 (...) @foo()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @bar() {
%1 = tail call i32 (...) @foo()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
print_ar(int *p, int n) {
  for (int i = 0; i < n; i++)
    printf("[%d] = %d\n", i, p[i]);
}


x86 assembly (clang, -O0):
<print_ar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115a <print_ar+0x4a>
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1126 <print_ar+0x16>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_ar>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1147 <print_ar+0x37>
mov    %rdi,%r14
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_ar+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [11 x i8] c"[%d] = %d\0A\00"
define i32 @print_ar(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 0, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %6
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
@.str = [11 x i8] c"[%d] = %d\0A\00"
define i32 @print_ar(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret i32 undef
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %13, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = trunc i64 %8 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %10)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %7
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int count;
};
typedef TYPE_1__ XGraphicsExposeEvent;

/* Variables and functions */
void set_XGraphicsExposeEvent_count(void *_p, int _v) {
  ((XGraphicsExposeEvent *)_p)->count = (int)_v;
}


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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XGraphicsExposeEvent_count(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_XGraphicsExposeEvent_count(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *malloc(int);
void f2() {
  int *p = malloc(10);
  free(p);
  free(p);
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %rbx
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @f2() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 10)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @free(i32* %3)
%5 = load i32*, i32** %1
%6 = call i32 @free(i32* %5)
ret void
}

LLVM IR (-O2):
define void @f2() {
%1 = tail call i32* @malloc(i32 10)
%2 = tail call i32 @free(i32* %1)
%3 = tail call i32 @free(i32* %1)
ret void
}
int mylib1_fct1() { printf("enter %s\n", __func__); }


x86 assembly (clang, -O0):
<mylib1_fct1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    0xee4(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mylib1_fct1>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"enter %s\0A\00"
@__func__.mylib1_fct1 = [12 x i8] c"mylib1_fct1\00"
define i32 @mylib1_fct1() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.mylib1_fct1, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [10 x i8] c"enter %s\0A\00"
@__func__.mylib1_fct1 = [12 x i8] c"mylib1_fct1\00"
define i32 @mylib1_fct1() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.mylib1_fct1, i64 0, i64 0))
ret i32 undef
}
int fun506() { return 506; }


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

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

LLVM IR (-O0):
define i32 @fun506() {
ret i32 506
}

LLVM IR (-O2):
define i32 @fun506() {
ret i32 506
}
/* Type definitions */
typedef int GLubyte;
typedef int /*<<< orphan*/ GLint;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void KeyboardKey(GLubyte Key, GLint x, GLint y) {
  switch (Key) {
  case 0x1B:
    exit(0);
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<KeyboardKey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1b,%eax
jne    1139 <KeyboardKey+0x29>
jmp    1132 <KeyboardKey+0x22>
xor    %edi,%edi
call   1030 <exit@plt>
jmp    113e <KeyboardKey+0x2e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KeyboardKey>:
cmp    $0x1b,%edi
je     1116 <KeyboardKey+0x6>
ret
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @KeyboardKey(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
switch i32 %7, label %10 [
i32 27, label %8
]
8: ; preds = %3
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %3
br label %11
11: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @KeyboardKey(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 27
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main() {
  float x = 3.0 / 2 + (5 - 46 * 5.0 / 12);
  printf("x = %.2f\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeec(%rip),%rdi
movss  0xee0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"x = %.2f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float 0xC029555560000000)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f();
int /*<<< orphan*/ printf(char *, char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char **argv) {
  int j = 0;
  char c[10];
  strcpy(c, argv[1]);
  printf("address of c if %p, j = %d\n", &c[0], j);
  f();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    -0x1e(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
lea    -0x1e(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xe9b(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <f@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x8(%rsi),%rsi
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xeb3(%rip),%rdi
mov    %rbx,%rsi
xor    %edx,%edx
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [28 x i8] c"address of c if %p, j = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @strcpy(i8* %4, i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %4, i32 0)
%9 = call i32 (...) @f()
ret i32 0
}
int mcsp_snode_reg_reducers(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mcsp_snode_reg_reducers() {
ret i32 0
}
/* Variables and functions */
size_t countchar(const char *s, const char c) {
  int i;
  size_t count;
  count = 0;
  for (i = 0; s[i]; i++) {
    if (s[i] == c)
      count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<countchar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1166 <countchar+0x66>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    1153 <countchar+0x53>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1158 <countchar+0x58>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111d <countchar+0x1d>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<countchar>:
mov    (%rdi),%cl
test   %cl,%cl
je     1127 <countchar+0x27>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
xor    %edx,%edx
cmp    %sil,%cl
sete   %dl
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <countchar+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @countchar(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %12, %5 ], [ 0, %2 ]
%7 = phi i8 [ %14, %5 ], [ %3, %2 ]
%8 = phi i64 [ %11, %5 ], [ 0, %2 ]
%9 = icmp eq i8 %7, %1
%10 = zext i1 %9 to i64
%11 = add i64 %8, %10
%12 = add nuw nsw i64 %6, 1
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %2
%17 = phi i64 [ 0, %2 ], [ %11, %5 ]
ret i64 %17
}
/* Variables and functions */
int /*<<< orphan*/ glutStrokeCharacter(void *, char const);
void DrawStrokeString(void *font, const char *string) {
  int i;
  for (i = 0; string[i]; i++)
    glutStrokeCharacter(font, string[i]);
}


x86 assembly (clang, -O0):
<DrawStrokeString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     115c <DrawStrokeString+0x4c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
call   1030 <glutStrokeCharacter@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <DrawStrokeString+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DrawStrokeString>:
push   %r14
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     1146 <DrawStrokeString+0x36>
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <glutStrokeCharacter@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <DrawStrokeString+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @DrawStrokeString(i8* %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = tail call i32 @glutStrokeCharacter(i8* %0, i8 signext %7)
%9 = add nuw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x97() {
  Assert_real((isbdigit(151) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              760, ("isbdigit should be 0 for 0x97"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x97>:
push   %rbp
mov    %rsp,%rbp
mov    $0x97,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x2f8,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x97>:
push   %rax
mov    $0x97,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x2f8,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x97\00"
define void @t_isbdigit_0x97() {
%1 = call i64 @isbdigit(i32 151)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 760, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x97\00"
define void @t_isbdigit_0x97() {
%1 = tail call i64 @isbdigit(i32 151)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 760, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *receive_message(int /*<<< orphan*/);
int /*<<< orphan*/ send_message(int, void *);
void stress_b() {
  void *msg_rx;
  while (1) {
    msg_rx = receive_message(0);
    send_message(9, msg_rx);
  }
}


x86 assembly (clang, -O0):
<stress_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <receive_message@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x9,%edi
call   1030 <send_message@plt>
jmp    1128 <stress_b+0x8>

x86 assembly (clang, -O2):
<stress_b>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1040 <receive_message@plt>
mov    $0x9,%edi
mov    %rax,%rsi
call   1030 <send_message@plt>
jmp    1130 <stress_b+0x10>

LLVM IR (-O0):
define void @stress_b() {
%1 = alloca i8*
br label %2
2: ; preds = %0, %2
%3 = call i8* @receive_message(i32 0)
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = call i32 @send_message(i32 9, i8* %4)
br label %2
}

LLVM IR (-O2):
define void @stress_b() {
br label %1
1: ; preds = %1, %0
%2 = tail call i8* @receive_message(i32 0)
%3 = tail call i32 @send_message(i32 9, i8* %2)
br label %1
}
void gtk_about_dialog_set_website() {}


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

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

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

LLVM IR (-O2):
define void @gtk_about_dialog_set_website() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char **argv) {
  fprintf(stderr,
          "usage: %s <cpu_model> <coreclock> <hse_freq> <lse> [pll_i2s_src] "
          "[pll_i2s_q_out] [pll_sai_q_out]\n",
          argv[0]);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [98 x i8] c"usage: %s <cpu_model> <coreclock> <hse_freq> <lse> [pll_i2s_src] [pll_i2s_q_out] [pll_sai_q_out]\0A\00"
define void @usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @stderr
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [98 x i8] c"usage: %s <cpu_model> <coreclock> <hse_freq> <lse> [pll_i2s_src] [pll_i2s_q_out] [pll_sai_q_out]\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %0
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Variables and functions */
int test_if8(void) {
  if (0)
    return 0;
  else
    return 'h';
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @test_if8() {
ret i32 104
}

LLVM IR (-O2):
define i32 @test_if8() {
ret i32 104
}
/* Variables and functions */
scalar_t__ ogg_read_stat(float *);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ usleep(double);
int main(int argc, char **argv) {
  float perc = 0;
  while (1) {
    if (ogg_read_stat(&perc) == 0)
      printf("[P %f]\n", perc / 100);
    usleep(0.5 * 1000000);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1050 <ogg_read_stat@plt>
cmp    $0x0,%rax
jne    117e <main+0x4e>
movss  -0x14(%rbp),%xmm0
movss  0xe92(%rip),%xmm1
divss  %xmm1,%xmm0
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
movsd  0xe82(%rip),%xmm0
call   1040 <usleep@plt>
jmp    114e <main+0x1e>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rbx
lea    0xec8(%rip),%r14
jmp    115d <main+0x2d>
nopw   0x0(%rax,%rax,1)
movsd  0xeb0(%rip),%xmm0
call   1040 <usleep@plt>
mov    %rbx,%rdi
call   1050 <ogg_read_stat@plt>
test   %rax,%rax
jne    1150 <main+0x20>
movss  0x4(%rsp),%xmm0
divss  0xe88(%rip),%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
jmp    1150 <main+0x20>

LLVM IR (-O0):
@.str = [8 x i8] c"[P %f]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 0.000000e+00, float* %6
br label %7
7: ; preds = %2, %14
%8 = call i64 @ogg_read_stat(float* %6)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load float, float* %6
%12 = fdiv float %11, 1.000000e+02
%13 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %12)
br label %14
14: ; preds = %10, %7
%15 = call i32 @usleep(double 5.000000e+05)
br label %7
}

LLVM IR (-O2):
@.str = [8 x i8] c"[P %f]\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
br label %5
5: ; preds = %12, %2
%6 = call i64 @ogg_read_stat(float* %3)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load float, float* %3
%10 = fdiv float %9, 1.000000e+02
%11 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %10)
br label %12
12: ; preds = %8, %5
%13 = call i32 @usleep(double 5.000000e+05)
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ __NR_memfd_create;
int syscall(int /*<<< orphan*/, char const *, unsigned int);
int memfd_create(const char *name, unsigned int flags) {
  return syscall(__NR_memfd_create, name, flags);
}


x86 assembly (clang, -O0):
<memfd_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memfd_create>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_memfd_create = global i32 0
define i32 @memfd_create(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @__NR_memfd_create
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @syscall(i32 %5, i8* %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@__NR_memfd_create = global i32 0
define i32 @memfd_create(i8* %0, i32 %1) {
%3 = load i32, i32* @__NR_memfd_create
%4 = tail call i32 @syscall(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
void clearSteps(char campo[25][50], int lin, int col) {
  campo[lin][col] = ' ';
  campo[lin][col + 1] = ' ';
  campo[lin + 1][col + 1] = ' ';
}


x86 assembly (clang, -O0):
<clearSteps>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movb   $0x20,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x20,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x20,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearSteps>:
movslq %esi,%rax
movslq %edx,%rcx
imul   $0x32,%rax,%rdx
add    %rdi,%rdx
movw   $0x2020,(%rcx,%rdx,1)
add    $0x1,%eax
cltq
imul   $0x32,%rax,%rax
add    %rdi,%rax
movb   $0x20,0x1(%rcx,%rax,1)
ret

LLVM IR (-O0):
define void @clearSteps([50 x i8]* %0, i32 %1, i32 %2) {
%4 = alloca [50 x i8]*
%5 = alloca i32
%6 = alloca i32
store [50 x i8]* %0, [50 x i8]** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load [50 x i8]*, [50 x i8]** %4
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 %9
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [50 x i8], [50 x i8]* %10, i64 0, i64 %12
store i8 32, i8* %13
%14 = load [50 x i8]*, [50 x i8]** %4
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [50 x i8], [50 x i8]* %14, i64 %16
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [50 x i8], [50 x i8]* %17, i64 0, i64 %20
store i8 32, i8* %21
%22 = load [50 x i8]*, [50 x i8]** %4
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [50 x i8], [50 x i8]* %22, i64 %25
%27 = load i32, i32* %6
%28 = add nsw i32 %27, 1
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [50 x i8], [50 x i8]* %26, i64 0, i64 %29
store i8 32, i8* %30
ret void
}

LLVM IR (-O2):
define void @clearSteps([50 x i8]* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 %4, i64 %5
store i8 32, i8* %6
%7 = add nsw i32 %2, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 %4, i64 %8
store i8 32, i8* %9
%10 = add nsw i32 %1, 1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 %11, i64 %8
store i8 32, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dodir(char *, int /*<<< orphan*/);
int DOlnlst(void) { dodir(".", 0); }


x86 assembly (clang, -O0):
<DOlnlst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
xor    %esi,%esi
call   1030 <dodir@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DOlnlst>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <dodir@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i32 @DOlnlst() {
%1 = tail call i32 @dodir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 undef
}
void event_lineend(ch, n) char ch;
int n;
{}


x86 assembly (clang, -O0):
<event_lineend>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @event_lineend(i32 %0, i32 %1) {
ret void
}
const char *__attribute__((weak)) __attribute__((short_call))
__attribute__((section(".test.a"))) __attribute__((no)) weak_s2(void) {
  return "weak_s2";
}


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"weak_s2\00"
define weak i8* @weak_s2() section ".test.a" {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"weak_s2\00"
define weak i8* @weak_s2() section ".test.a" {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ sys_futex0(int *, int, int);
void futex_wake(int *addr, int count) { sys_futex0(addr, 1, count); }


x86 assembly (clang, -O0):
<futex_wake>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x1,%esi
call   1030 <sys_futex0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<futex_wake>:
mov    %esi,%edx
mov    $0x1,%esi
jmp    1030 <sys_futex0@plt>

LLVM IR (-O0):
define void @futex_wake(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 = call i32 @sys_futex0(i32* %5, i32 1, i32 %6)
ret void
}

LLVM IR (-O2):
define void @futex_wake(i32* %0, i32 %1) {
%3 = tail call i32 @sys_futex0(i32* %0, i32 1, i32 %1)
ret void
}
/* Variables and functions */
int fib(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("fib (10) = %d\n", fib(10));
  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    $0xa,%edi
call   1040 <fib@plt>
mov    %eax,%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"fib (10) = %d\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 = call i32 @fib(i32 10)
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"fib (10) = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @fib(i32 10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int _gdbio_lseek_r(int /*<<< orphan*/ *, int, int /*<<< orphan*/, int);
int /*<<< orphan*/ errno;
int gdbio_lseek(int fd, off_t offset, int whence) {
  return _gdbio_lseek_r(&errno, fd, offset, whence);
}


x86 assembly (clang, -O0):
<gdbio_lseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    0x2eaf(%rip),%rdi
call   1030 <_gdbio_lseek_r@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdbio_lseek>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    0x2ec3(%rip),%rdi
jmp    1030 <_gdbio_lseek_r@plt>

LLVM IR (-O0):
@errno = global i32 0
define i32 @gdbio_lseek(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @_gdbio_lseek_r(i32* @errno, i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @gdbio_lseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @_gdbio_lseek_r(i32* @errno, i32 %0, i32 %1, i32 %2)
ret i32 %4
}
int test_imm_FEuint16_mem(unsigned short *val) {
  return ((*val) & (0xFE << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_FEuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 254
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int cmock_expectcalls_infinite(int expectCalls, int called) { return (0x02); }


x86 assembly (clang, -O0):
<cmock_expectcalls_infinite>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x2,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @cmock_expectcalls_infinite(i32 %0, i32 %1) {
ret i32 2
}
/* Variables and functions */
scalar_t__ digit();
bool raw(void) {
  if (digit()) {
    raw();
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <digit@plt>
cmp    $0x0,%rax
je     114a <raw+0x2a>
call   1030 <raw@plt>
movl   $0x1,-0x4(%rbp)
jmp    1151 <raw+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<raw>:
push   %rbx
xor    %eax,%eax
call   1030 <digit@plt>
mov    %rax,%rbx
test   %rax,%rax
je     112c <raw+0x1c>
xor    %eax,%eax
call   1030 <digit@plt>
test   %rax,%rax
jne    1120 <raw+0x10>
xor    %eax,%eax
test   %rbx,%rbx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @raw() {
%1 = tail call i64 (...) @digit()
%2 = icmp eq i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0, %3
%4 = tail call i64 (...) @digit()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3, %0
%7 = xor i1 %2, true
%8 = zext i1 %7 to i32
ret i32 %8
}
int test_imm_EBint32_mem(int *val) {
  return ((*val) & (0xEB << 0)) ? -20 : -40;
}


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

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

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

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