xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main() {
  foo(30);
  foo(30);
  foo(30);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1e,%edi
call   1030 <foo@plt>
mov    $0x1e,%edi
call   1030 <foo@plt>
mov    $0x1e,%edi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 30)
%2 = tail call i32 @foo(i32 30)
%3 = tail call i32 @foo(i32 30)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int pixel_satd_wxh(int /*<<< orphan*/ *, int, int /*<<< orphan*/ *, int, int,
                   int);
int pixel_satd_8x4(uint8_t *pix1, int i_stride_pix1, uint8_t *pix2,
                   int i_stride_pix2) {
  return pixel_satd_wxh(pix1, i_stride_pix1, pix2, i_stride_pix2, 8, 4);
}


x86 assembly (clang, -O0):
<pixel_satd_8x4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x8,%r8d
mov    $0x4,%r9d
call   1030 <pixel_satd_wxh@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel_satd_8x4>:
mov    $0x8,%r8d
mov    $0x4,%r9d
jmp    1030 <pixel_satd_wxh@plt>

LLVM IR (-O0):
define i32 @pixel_satd_8x4(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %6
%11 = load i32*, i32** %7
%12 = load i32, i32* %8
%13 = call i32 @pixel_satd_wxh(i32* %9, i32 %10, i32* %11, i32 %12, i32 8, i32 4)
ret i32 %13
}

LLVM IR (-O2):
define i32 @pixel_satd_8x4(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @pixel_satd_wxh(i32* %0, i32 %1, i32* %2, i32 %3, i32 8, i32 4)
ret i32 %5
}
/* Variables and functions */
scalar_t__ isKeyStartChar(int);
int isKeyChar(int c) {
  return isKeyStartChar(c) || ((unsigned)(c - '0') < 10) || (c == '.') ||
         (c == '-');
}


x86 assembly (clang, -O0):
<isKeyChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isKeyStartChar@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1162 <isKeyChar+0x52>
mov    -0x4(%rbp),%ecx
sub    $0x30,%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x5(%rbp)
jb     1162 <isKeyChar+0x52>
mov    $0x1,%al
cmpl   $0x2e,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1162 <isKeyChar+0x52>
cmpl   $0x2d,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isKeyChar>:
push   %rbx
mov    %edi,%ebx
call   1030 <isKeyStartChar@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1127 <isKeyChar+0x17>
pop    %rbx
ret
cmp    $0x2e,%ebx
je     1125 <isKeyChar+0x15>
lea    -0x30(%rbx),%ecx
cmp    $0xa,%ecx
jb     1125 <isKeyChar+0x15>
xor    %eax,%eax
cmp    $0x2d,%ebx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isKeyChar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isKeyStartChar(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %16, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 48
%9 = icmp ult i32 %8, 10
br i1 %9, label %16, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 46
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, 45
br label %16
16: ; preds = %13, %10, %6, %1
%17 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %15, %13 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @isKeyChar(i32 %0) {
%2 = tail call i64 @isKeyStartChar(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %12
4: ; preds = %1
%5 = add nsw i32 %0, -48
%6 = icmp ult i32 %5, 10
%7 = icmp eq i32 %0, 46
%8 = or i1 %7, %6
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = icmp eq i32 %0, 45
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %9, %4, %1
%13 = phi i32 [ 1, %4 ], [ 1, %1 ], [ %11, %9 ]
ret i32 %13
}
long normalize_heading_int(long n) {
  while (n <= -180)
    n += 360;
  while (n > 180)
    n -= 360;
  return n;
}


x86 assembly (clang, -O0):
<normalize_heading_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0xffffffffffffff4c,-0x8(%rbp)
ff
jg     1129 <normalize_heading_int+0x29>
mov    -0x8(%rbp),%rax
add    $0x168,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <normalize_heading_int+0x8>
jmp    112e <normalize_heading_int+0x2e>
cmpq   $0xb4,-0x8(%rbp)
jle    114f <normalize_heading_int+0x4f>
mov    -0x8(%rbp),%rax
sub    $0x168,%rax
mov    %rax,-0x8(%rbp)
jmp    112e <normalize_heading_int+0x2e>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<normalize_heading_int>:
cmp    $0xffffffffffffff4e,%rdi
mov    $0xffffffffffffff4d,%rax
cmovge %rdi,%rax
xor    %ecx,%ecx
sub    %rdi,%rax
setne  %cl
sub    %rcx,%rax
movabs $0x2d82d82d82d82d83,%r8
d8 82 2d
mul    %r8
shr    $0x6,%rdx
add    %rcx,%rdx
imul   $0x168,%rdx,%rsi
add    %rdi,%rsi
cmp    $0xb4,%rsi
mov    $0xb4,%eax
cmovl  %rsi,%rax
mov    %rsi,%rcx
sub    %rax,%rcx
add    $0x167,%rcx
mov    %rcx,%rax
mul    %r8
shr    $0x6,%rdx
imul   $0x168,%rdx,%rdx
mov    %rcx,%rax
sub    %rdx,%rax
sub    %rcx,%rax
add    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @normalize_heading_int(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
br label %3
3: ; preds = %6, %1
%4 = load i64, i64* %2
%5 = icmp sle i64 %4, -180
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i64, i64* %2
%8 = add nsw i64 %7, 360
store i64 %8, i64* %2
br label %3
9: ; preds = %3
br label %10
10: ; preds = %13, %9
%11 = load i64, i64* %2
%12 = icmp sgt i64 %11, 180
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i64, i64* %2
%15 = sub nsw i64 %14, 360
store i64 %15, i64* %2
br label %10
16: ; preds = %10
%17 = load i64, i64* %2
ret i64 %17
}

LLVM IR (-O2):
define i64 @normalize_heading_int(i64 %0) {
%2 = call i64 @llvm.smax.i64(i64 %0, i64 -179)
%3 = sub i64 %2, %0
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i64
%6 = sub i64 %3, %5
%7 = udiv i64 %6, 360
%8 = add nuw nsw i64 %7, %5
%9 = mul i64 %8, 360
%10 = add i64 %9, %0
%11 = add i64 %10, 359
%12 = call i64 @llvm.smin.i64(i64 %10, i64 180)
%13 = sub i64 %11, %12
%14 = urem i64 %13, 360
%15 = sub i64 %14, %13
%16 = add i64 %15, %10
ret i64 %16
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int type;
};
struct TYPE_4__ {
  TYPE_1__ xexpose;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xexpose_type(void *_p, int _v) {
  ((XEvent *)_p)->xexpose.type = (int)_v;
}


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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xexpose_type(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_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xexpose_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void SPIDataGet(unsigned long ulBase, unsigned long *pulData) {

  ;
  while (!((*((volatile unsigned long *)(ulBase + 0x00000008))) & 0x00000001)) {
  }
  *pulData = (*((volatile unsigned long *)(ulBase + 0x0000000C)));
}


x86 assembly (clang, -O0):
<SPIDataGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    112e <SPIDataGet+0x2e>
jmp    1133 <SPIDataGet+0x33>
jmp    110c <SPIDataGet+0xc>
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SPIDataGet>:
testq  $0x1,0x8(%rdi)
je     1100 <SPIDataGet>
mov    0xc(%rdi),%rax
mov    %rax,(%rsi)
ret

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

LLVM IR (-O2):
define void @SPIDataGet(i64 %0, i64* nocapture writeonly %1) {
%3 = add i64 %0, 8
%4 = inttoptr i64 %3 to i64*
br label %5
5: ; preds = %5, %2
%6 = load volatile i64, i64* %4
%7 = and i64 %6, 1
%8 = icmp eq i64 %7, 0
br i1 %8, label %5, label %9
9: ; preds = %5
%10 = add i64 %0, 12
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
store i64 %12, i64* %1
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_creds_get_well_known_names(void *c, char ***well_known_names) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_creds_get_well_known_names>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_creds_get_well_known_names>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_creds_get_well_known_names(i8* %0, i8*** %1) {
%3 = alloca i8*
%4 = alloca i8***
store i8* %0, i8** %3
store i8*** %1, i8**** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_creds_get_well_known_names(i8* nocapture readnone %0, i8*** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
void __attribute__((hot, used)) used_hot_fn(void) {}


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

x86 assembly (clang, -O2):
<used_hot_fn>:
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void ()* @used_hot_fn to i8*)], section "llvm.metadata"
define void @used_hot_fn() {
ret void
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void ()* @used_hot_fn to i8*)], section "llvm.metadata"
define void @used_hot_fn() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void printUsage() {
  fprintf(stderr, "Usage: test_fanotify [-p] [-r] [-l] [-m] file_name\n");
  exit(1);
}


x86 assembly (clang, -O0):
<printUsage>:
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):
<printUsage>:
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 = [52 x i8] c"Usage: test_fanotify [-p] [-r] [-l] [-m] file_name\0A\00"
define void @printUsage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [52 x i8] c"Usage: test_fanotify [-p] [-r] [-l] [-m] file_name\0A\00"
define void @printUsage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef scalar_t__ __m128;

/* Variables and functions */
__m128 __attribute__((__always___, __nodebug__))
_mm_sub_ps(__m128 a, __m128 b) {
  return a - b;
}


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

x86 assembly (clang, -O2):
<_mm_sub_ps>:
mov    %rdi,%rax
sub    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @_mm_sub_ps(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned long, char *);
scalar_t__ malloc(size_t);
int /*<<< orphan*/ stderr;
char *remalloc(size_t len, char *purpose) {
  char *x = (char *)malloc(len);
  if (!x) {
    fprintf(stderr, "malloc %lu failed for %s\n", (unsigned long)len, purpose);
    exit(0);
  }
  return x;
}


x86 assembly (clang, -O0):
<remalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117c <remalloc+0x4c>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe90(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     114c <remalloc+0x1c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"malloc %lu failed for %s\0A\00"
define i8* @remalloc(i64 %0, i8* %1) {
%3 = tail call i64 @malloc(i64 %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %0, i8* %1)
%8 = tail call i32 @exit(i32 0)
unreachable
9: ; preds = %2
%10 = inttoptr i64 %3 to i8*
ret i8* %10
}
void main() {
  struct somestr {
    int a;
    int b;
  } * pointstr;
  struct somestr str = {1, 2};
  pointstr = &str;
  print("1 2");
  print(*pointstr);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <print@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1030 <print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <print@plt>
movabs $0x200000001,%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <print@plt>

LLVM IR (-O0):
%struct.somestr = type { i32, i32 }
@__const.main.str = %struct.somestr { i32 1, i32 2 }
@.str = [4 x i8] c"1 2\00"
define void @main() {
%1 = alloca %struct.somestr*
%2 = alloca %struct.somestr
%3 = bitcast %struct.somestr* %2 to i8*
store %struct.somestr* %2, %struct.somestr** %1
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = load %struct.somestr*, %struct.somestr** %1
%6 = bitcast %struct.somestr* %5 to i64*
%7 = load i64, i64* %6
%8 = call i32 (i64, ...) bitcast (i32 (...)* @print to i32 (i64, ...)*)(i64 %7)
ret void
}

LLVM IR (-O2):
%struct.somestr = type { i32, i32 }
@.str = [4 x i8] c"1 2\00"
define void @main() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i64, ...) bitcast (i32 (...)* @print to i32 (i64, ...)*)(i64 8589934593)
ret void
}
void g_value_set_uint() {}


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

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

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

LLVM IR (-O2):
define void @g_value_set_uint() {
ret void
}
int test_imm_F0int32_mem(int *val) {
  return ((*val) & (0xF0 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F0int32_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, 240
%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_F0int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 240
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Este es un archivo para el branch dev de Pruebas\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [50 x i8] c"Este es un archivo para el branch dev de Pruebas\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [49 x i8] c"Este es un archivo para el branch dev de Pruebas\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret i32 0
}
__attribute__((always_)) void kmemtrace_init(void) {}


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

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

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

LLVM IR (-O2):
define void @kmemtrace_init() {
ret void
}
/* Type definitions */
struct tgl_state {
  int dummy;
};
struct connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int fetch_int();
int /*<<< orphan*/ fetch_long();
void work_detailed_info(struct tgl_state *TLS,
                        struct connection *c __attribute__((unused)),
                        long long msg_id __attribute__((unused))) {
  assert(fetch_int() == 0x276d3ec6);
  fetch_long();
  fetch_long();
  fetch_int();
  fetch_int();
}


x86 assembly (clang, -O0):
<work_detailed_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1040 <fetch_int@plt>
cmp    $0x276d3ec6,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x0,%al
call   1030 <fetch_long@plt>
mov    $0x0,%al
call   1030 <fetch_long@plt>
mov    $0x0,%al
call   1040 <fetch_int@plt>
mov    $0x0,%al
call   1040 <fetch_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<work_detailed_info>:
push   %rax
xor    %eax,%eax
call   1040 <fetch_int@plt>
xor    %edi,%edi
cmp    $0x276d3ec6,%eax
sete   %dil
call   1050 <assert@plt>
xor    %eax,%eax
call   1030 <fetch_long@plt>
xor    %eax,%eax
call   1030 <fetch_long@plt>
xor    %eax,%eax
call   1040 <fetch_int@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <fetch_int@plt>

LLVM IR (-O0):
%struct.tgl_state = type { i32 }
%struct.connection = type { i32 }
define void @work_detailed_info(%struct.tgl_state* %0, %struct.connection* %1, i64 %2) {
%4 = alloca %struct.tgl_state*
%5 = alloca %struct.connection*
%6 = alloca i64
store %struct.tgl_state* %0, %struct.tgl_state** %4
store %struct.connection* %1, %struct.connection** %5
store i64 %2, i64* %6
%7 = call i32 (...) @fetch_int()
%8 = icmp eq i32 %7, 661470918
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = call i32 (...) @fetch_long()
%12 = call i32 (...) @fetch_long()
%13 = call i32 (...) @fetch_int()
%14 = call i32 (...) @fetch_int()
ret void
}

LLVM IR (-O2):
%struct.tgl_state = type { i32 }
%struct.connection = type { i32 }
define void @work_detailed_info(%struct.tgl_state* nocapture readnone %0, %struct.connection* nocapture readnone %1, i64 %2) {
%4 = tail call i32 (...) @fetch_int()
%5 = icmp eq i32 %4, 661470918
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = tail call i32 (...) @fetch_long()
%9 = tail call i32 (...) @fetch_long()
%10 = tail call i32 (...) @fetch_int()
%11 = tail call i32 (...) @fetch_int()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ perror_exit(char *);
int pthread_join(int /*<<< orphan*/, int /*<<< orphan*/ *);
void join_thread(pthread_t thread) {
  int ret = pthread_join(thread, NULL);
  if (ret == -1)
    perror_exit("pthread_join failed");
}


x86 assembly (clang, -O0):
<join_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <pthread_join@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1150 <join_thread+0x30>
lea    0xeb5(%rip),%rdi
call   1030 <perror_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<join_thread>:
push   %rax
xor    %esi,%esi
call   1040 <pthread_join@plt>
cmp    $0xffffffff,%eax
je     112f <join_thread+0xf>
pop    %rax
ret
lea    0xeca(%rip),%rdi
pop    %rax
jmp    1030 <perror_exit@plt>

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

LLVM IR (-O2):
@.str = [20 x i8] c"pthread_join failed\00"
define void @join_thread(i32 %0) {
%2 = tail call i32 @pthread_join(i32 %0, i32* null)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @perror_exit(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
void send_to_logger(int sfd, int mfd, struct job *job, const char *header,
                    char *msg) {
  ;
}


x86 assembly (clang, -O0):
<send_to_logger>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.job = type opaque
define void @send_to_logger(i32 %0, i32 %1, %struct.job* %2, i8* %3, i8* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.job*
%9 = alloca i8*
%10 = alloca i8*
store i32 %0, i32* %6
store i32 %1, i32* %7
store %struct.job* %2, %struct.job** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
%struct.job = type opaque
define void @send_to_logger(i32 %0, i32 %1, %struct.job* nocapture %2, i8* nocapture %3, i8* nocapture %4) {
ret void
}
void os_freakout() {}


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

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

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

LLVM IR (-O2):
define void @os_freakout() {
ret void
}
int test_imm_13int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x13 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_13int64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0x13,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_13int64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 19
%7 = icmp ne i64 %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_13int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 1245184
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int addOne(int input) { return input + 1; }


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

x86 assembly (clang, -O2):
<addOne>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @addOne(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
float randf(float f) { return ((float)rand() / (float)RAND_MAX) * f; }


x86 assembly (clang, -O0):
<randf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2eb8(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
mulss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randf>:
push   %rax
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm2
mov    0x2ebe(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm2
movss  0x4(%rsp),%xmm0
mulss  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @randf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call i64 (...) @rand()
%4 = sitofp i64 %3 to float
%5 = load i64, i64* @RAND_MAX
%6 = sitofp i64 %5 to float
%7 = fdiv float %4, %6
%8 = load float, float* %2
%9 = fmul float %7, %8
ret float %9
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @randf(float %0) {
%2 = tail call i64 (...) @rand()
%3 = sitofp i64 %2 to float
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to float
%6 = fdiv float %3, %5
%7 = fmul float %6, %0
ret float %7
}
/* Type definitions */
typedef int ulong;

/* Variables and functions */
int murmurhash2(void *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(void *);
ulong strhash(void *_s) {
  char *s;
  s = _s;
  if (!s)
    return 2928213749;
  return murmurhash2(_s, strlen(_s));
}


x86 assembly (clang, -O0):
<strhash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    114b <strhash+0x2b>
movl   $0xae88fef5,-0x4(%rbp)
jmp    116a <strhash+0x4a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1030 <murmurhash2@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strhash>:
test   %rdi,%rdi
je     1139 <strhash+0x19>
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <murmurhash2@plt>
mov    $0xae88fef5,%eax
ret

LLVM IR (-O0):
define i32 @strhash(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %9, label %8
8: ; preds = %1
store i32 -1366753547, i32* %2
br label %14
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = load i8*, i8** %3
%12 = call i32 @strlen(i8* %11)
%13 = call i32 @murmurhash2(i8* %10, i32 %12)
store i32 %13, i32* %2
br label %14
14: ; preds = %9, %8
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @strhash(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i32 @murmurhash2(i8* %0, i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ -1366753547, %1 ]
ret i32 %7
}
/* Variables and functions */
int O_RDONLY;
int /*<<< orphan*/ exit(int);
int open(char *, int);
int /*<<< orphan*/ perror(char *);
int openFile(char *file) {
  int r = open(file, O_RDONLY | 0);
  if (r <= 0) {
    perror(file);
    exit(1);
  }
  return r;
}


x86 assembly (clang, -O0):
<openFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
or     $0x0,%esi
call   1030 <open@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     1171 <openFile+0x41>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openFile>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
call   1030 <open@plt>
test   %eax,%eax
jle    1148 <openFile+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@O_RDONLY = global i32 0
define i32 @openFile(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @O_RDONLY
%6 = or i32 %5, 0
%7 = call i32 @open(i8* %4, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i8*, i8** %2
%12 = call i32 @perror(i8* %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %1
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define i32 @openFile(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = icmp slt i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @perror(i8* %0)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ group1();
int /*<<< orphan*/ group2();
int /*<<< orphan*/ group3();
int /*<<< orphan*/ group4();
int main() {
  group1();
  group2();
  group3();
  group4();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <group1@plt>
mov    $0x0,%al
call   1060 <group2@plt>
mov    $0x0,%al
call   1040 <group3@plt>
mov    $0x0,%al
call   1050 <group4@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <group1@plt>
xor    %eax,%eax
call   1060 <group2@plt>
xor    %eax,%eax
call   1040 <group3@plt>
xor    %eax,%eax
call   1050 <group4@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @group1()
%3 = call i32 (...) @group2()
%4 = call i32 (...) @group3()
%5 = call i32 (...) @group4()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @group1()
%2 = tail call i32 (...) @group2()
%3 = tail call i32 (...) @group3()
%4 = tail call i32 (...) @group4()
ret i32 0
}
/* Variables and functions */
int loop();
int /*<<< orphan*/ shdeinit();
int /*<<< orphan*/ shinit();
int main(int argc, char **argv) {
  shinit();
  int rc = loop();
  shdeinit();
  return rc;
}


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)
mov    $0x0,%al
call   1050 <shinit@plt>
mov    $0x0,%al
call   1030 <loop@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <shdeinit@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <shinit@plt>
xor    %eax,%eax
call   1030 <loop@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <shdeinit@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @shinit()
%8 = call i32 (...) @loop()
store i32 %8, i32* %6
%9 = call i32 (...) @shdeinit()
%10 = load i32, i32* %6
ret i32 %10
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @shinit()
%4 = tail call i32 (...) @loop()
%5 = tail call i32 (...) @shdeinit()
ret i32 %4
}
int set_kernel_memory(char *startp, char *endp,
                      int (*set_memory)(unsigned long start, int num_pages)) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @set_kernel_memory(i8* %0, i8* %1, i32 (i64, i32)* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32 (i64, i32)*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 (i64, i32)* %2, i32 (i64, i32)** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @set_kernel_memory(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 (i64, i32)* nocapture readnone %2) {
ret i32 0
}
int zrmdir(path)
char *path;
{
  if (!path)
    path = "";
  if (!*path)
    return (-1);
  return (rmdir(path));
}


x86 assembly (clang, -O0):
<zrmdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1132 <zrmdir+0x22>
lea    0xed2(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    114b <zrmdir+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1159 <zrmdir+0x49>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <rmdir@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zrmdir>:
mov    %rdi,%rax
test   %rdi,%rdi
lea    0xee3(%rip),%rdi
cmovne %rax,%rdi
cmpb   $0x0,(%rdi)
je     112d <zrmdir+0x1d>
xor    %eax,%eax
jmp    1030 <rmdir@plt>
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @zrmdir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %3
br label %7
7: ; preds = %6, %1
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %7
store i32 -1, i32* %2
br label %15
12: ; preds = %7
%13 = load i8*, i8** %3
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @rmdir to i32 (i8*, ...)*)(i8* %13)
store i32 %14, i32* %2
br label %15
15: ; preds = %12, %11
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @zrmdir(i8* %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %0
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @rmdir to i32 (i8*, ...)*)(i8* %3)
br label %8
8: ; preds = %1, %6
%9 = phi i32 [ %7, %6 ], [ -1, %1 ]
ret i32 %9
}
/* Variables and functions */
int CRYPTO_memcmp(char *, char *, int);
int test_sanity_memcmp(void) { return CRYPTO_memcmp("ab", "cd", 2); }


x86 assembly (clang, -O0):
<test_sanity_memcmp>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x2,%edx
call   1030 <CRYPTO_memcmp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sanity_memcmp>:
lea    0xee9(%rip),%rdi
lea    0xee5(%rip),%rsi
mov    $0x2,%edx
jmp    1030 <CRYPTO_memcmp@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"ab\00"
@.str.1 = [3 x i8] c"cd\00"
define i32 @test_sanity_memcmp() {
%1 = tail call i32 @CRYPTO_memcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
ret i32 %1
}
void stress_dirdeep_sync(const char *path) { (void)path; }


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

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

LLVM IR (-O0):
define void @stress_dirdeep_sync(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret void
}

LLVM IR (-O2):
define void @stress_dirdeep_sync(i8* nocapture %0) {
ret void
}
void set_proc_schedule(struct res_schedule *sched) {}


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

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

LLVM IR (-O0):
%struct.res_schedule = type opaque
define void @set_proc_schedule(%struct.res_schedule* %0) {
%2 = alloca %struct.res_schedule*
store %struct.res_schedule* %0, %struct.res_schedule** %2
ret void
}

LLVM IR (-O2):
%struct.res_schedule = type opaque
define void @set_proc_schedule(%struct.res_schedule* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x23() {
  Assert_real((islower(35) == 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_islower.c",
              180, ("islower should be 0 for #"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x23>:
push   %rax
mov    $0x23,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xb4,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for #\00"
define void @t_islower_0x23() {
%1 = call i64 @islower(i32 35)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 180, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for #\00"
define void @t_islower_0x23() {
%1 = tail call i64 @islower(i32 35)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 180, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m512i;

/* Variables and functions */
int /*<<< orphan*/ _mm512_setzero_si512();
__m512i __attribute__((__target__("avx512f"))) mm512_setzero_si512_wrap(void) {
  return _mm512_setzero_si512();
}


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

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

LLVM IR (-O0):
define i32 @mm512_setzero_si512_wrap() {
%1 = call i32 (...) @_mm512_setzero_si512()
ret i32 %1
}

LLVM IR (-O2):
define i32 @mm512_setzero_si512_wrap() {
%1 = tail call i32 (...) @_mm512_setzero_si512()
ret i32 %1
}
/* Type definitions */
struct Node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ freeListImpl(struct Node *);
void freeList(struct Node **lst) {
  freeListImpl(*lst);
  return;
}


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

x86 assembly (clang, -O2):
<freeList>:
mov    (%rdi),%rdi
jmp    1030 <freeListImpl@plt>

LLVM IR (-O0):
%struct.Node = type { i32 }
define void @freeList(%struct.Node** %0) {
%2 = alloca %struct.Node**
store %struct.Node** %0, %struct.Node*** %2
%3 = load %struct.Node**, %struct.Node*** %2
%4 = load %struct.Node*, %struct.Node** %3
%5 = call i32 @freeListImpl(%struct.Node* %4)
ret void
}

LLVM IR (-O2):
%struct.Node = type { i32 }
define void @freeList(%struct.Node** nocapture %0) {
%2 = load %struct.Node*, %struct.Node** %0
%3 = tail call i32 @freeListImpl(%struct.Node* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
unsigned int new_intu(unsigned int, unsigned int);
int main() {
  unsigned int i1 = new_intu(1u, 31u);
  assert(1 <= i1 && i1 <= 31);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x1f,%esi
call   1030 <new_intu@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
mov    $0x1,%ecx
cmp    -0x8(%rbp),%ecx
mov    %al,-0x9(%rbp)
ja     115e <main+0x3e>
cmpl   $0x1f,-0x8(%rbp)
setbe  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x1f,%esi
call   1030 <new_intu@plt>
add    $0xffffffff,%eax
xor    %edi,%edi
cmp    $0x1f,%eax
setb   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @new_intu(i32 1, i32 31)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ule i32 1, %4
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp ule i32 %7, 31
br label %9
9: ; preds = %6, %0
%10 = phi i1 [ false, %0 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @new_intu(i32 1, i32 31)
%2 = add i32 %1, -1
%3 = icmp ult i32 %2, 31
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ rpi_aux_mu_putc(int);
void rpi_aux_mu_string(char *str) {
  while (*str != 0) {
    rpi_aux_mu_putc((uint32_t)*str);
    str++;
  }
  rpi_aux_mu_putc(0x0A);
}


x86 assembly (clang, -O0):
<rpi_aux_mu_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <rpi_aux_mu_string+0x39>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <rpi_aux_mu_putc@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <rpi_aux_mu_string+0xc>
mov    $0xa,%edi
call   1030 <rpi_aux_mu_putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpi_aux_mu_string>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <rpi_aux_mu_string+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <rpi_aux_mu_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <rpi_aux_mu_string+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <rpi_aux_mu_putc@plt>

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

LLVM IR (-O2):
define void @rpi_aux_mu_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i32 @rpi_aux_mu_putc(i32 %7)
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = tail call i32 @rpi_aux_mu_putc(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M106_f(char *s) {
  debug("M106_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M106_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M106_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M106_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M106_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M106_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M106_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}