xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void pic_init() {
  outb(0x20, 0x11);
  outb(0x21, 0x20);
  outb(0x21, 0x04);
  outb(0x21, 0x01);
  outb(0xA0, 0x11);
  outb(0xA1, 0x28);
  outb(0xA1, 0x02);
  outb(0xA1, 0x01);
  outb(0x21, 0xFC);
  outb(0xA1, 0xFF);
}


x86 assembly (clang, -O0):
<pic_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0xfc,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0xff,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic_init>:
push   %rax
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0xfc,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0xff,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @pic_init() {
%1 = call i32 @outb(i32 32, i32 17)
%2 = call i32 @outb(i32 33, i32 32)
%3 = call i32 @outb(i32 33, i32 4)
%4 = call i32 @outb(i32 33, i32 1)
%5 = call i32 @outb(i32 160, i32 17)
%6 = call i32 @outb(i32 161, i32 40)
%7 = call i32 @outb(i32 161, i32 2)
%8 = call i32 @outb(i32 161, i32 1)
%9 = call i32 @outb(i32 33, i32 252)
%10 = call i32 @outb(i32 161, i32 255)
ret void
}

LLVM IR (-O2):
define void @pic_init() {
%1 = tail call i32 @outb(i32 32, i32 17)
%2 = tail call i32 @outb(i32 33, i32 32)
%3 = tail call i32 @outb(i32 33, i32 4)
%4 = tail call i32 @outb(i32 33, i32 1)
%5 = tail call i32 @outb(i32 160, i32 17)
%6 = tail call i32 @outb(i32 161, i32 40)
%7 = tail call i32 @outb(i32 161, i32 2)
%8 = tail call i32 @outb(i32 161, i32 1)
%9 = tail call i32 @outb(i32 33, i32 252)
%10 = tail call i32 @outb(i32 161, i32 255)
ret void
}
/* Variables and functions */
int unknown(int);
void unknown_from_parameters_latent(int x) {
  int *p = NULL;
  if (unknown(x) == 999) {
    *p = 42;
  }
}


x86 assembly (clang, -O0):
<unknown_from_parameters_latent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <unknown@plt>
cmp    $0x3e7,%eax
jne    1140 <unknown_from_parameters_latent+0x30>
mov    -0x10(%rbp),%rax
movl   $0x2a,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unknown_from_parameters_latent>:
jmp    1030 <unknown@plt>

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

LLVM IR (-O2):
define void @unknown_from_parameters_latent(i32 %0) {
%2 = tail call i32 @unknown(i32 %0)
%3 = icmp ne i32 %2, 999
tail call void @llvm.assume(i1 %3)
ret void
}
int FixedYToW(int v) { return v; }


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

x86 assembly (clang, -O2):
<FixedYToW>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @FixedYToW(i32 returned %0) {
ret i32 %0
}
void foo_1_1_2_1_1_1_1_1_1() {}


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

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

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

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

/* Variables and functions */
scalar_t__ drunkard_rng_chance(struct drunkard *, double);
int /*<<< orphan*/ drunkard_target_random_northsouth_edge(struct drunkard *);
int /*<<< orphan*/ drunkard_target_random_westeast_edge(struct drunkard *);
void drunkard_target_random_edge(struct drunkard *drunk) {
  if (drunkard_rng_chance(drunk, 0.5))
    drunkard_target_random_westeast_edge(drunk);
  else
    drunkard_target_random_northsouth_edge(drunk);
}


x86 assembly (clang, -O0):
<drunkard_target_random_edge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
movsd  0xeb8(%rip),%xmm0
call   1050 <drunkard_rng_chance@plt>
cmp    $0x0,%rax
je     1165 <drunkard_target_random_edge+0x35>
mov    -0x8(%rbp),%rdi
call   1040 <drunkard_target_random_westeast_edge@plt>
jmp    116e <drunkard_target_random_edge+0x3e>
mov    -0x8(%rbp),%rdi
call   1030 <drunkard_target_random_northsouth_edge@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drunkard_target_random_edge>:
push   %rbx
mov    %rdi,%rbx
movsd  0xec4(%rip),%xmm0
call   1050 <drunkard_rng_chance@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     114f <drunkard_target_random_edge+0x1f>
pop    %rbx
jmp    1040 <drunkard_target_random_westeast_edge@plt>
pop    %rbx
jmp    1030 <drunkard_target_random_northsouth_edge@plt>

LLVM IR (-O0):
%struct.drunkard = type { i32 }
define void @drunkard_target_random_edge(%struct.drunkard* %0) {
%2 = alloca %struct.drunkard*
store %struct.drunkard* %0, %struct.drunkard** %2
%3 = load %struct.drunkard*, %struct.drunkard** %2
%4 = call i64 @drunkard_rng_chance(%struct.drunkard* %3, double 5.000000e-01)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load %struct.drunkard*, %struct.drunkard** %2
%8 = call i32 @drunkard_target_random_westeast_edge(%struct.drunkard* %7)
br label %12
9: ; preds = %1
%10 = load %struct.drunkard*, %struct.drunkard** %2
%11 = call i32 @drunkard_target_random_northsouth_edge(%struct.drunkard* %10)
br label %12
12: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
%struct.drunkard = type { i32 }
define void @drunkard_target_random_edge(%struct.drunkard* %0) {
%2 = tail call i64 @drunkard_rng_chance(%struct.drunkard* %0, double 5.000000e-01)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @drunkard_target_random_westeast_edge(%struct.drunkard* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @drunkard_target_random_northsouth_edge(%struct.drunkard* %0)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
int asprintf(char **, char const *, int const);
int /*<<< orphan*/ free(char **);
void memleak_asprintf(char **ptr, const char *fmt, const int arg) {
  if (-1 != asprintf(ptr, fmt, arg)) {
    free(ptr);
  }
  if (-1 != asprintf(ptr, fmt, arg)) {
  }
}


x86 assembly (clang, -O0):
<memleak_asprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <asprintf@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
je     115b <memleak_asprintf+0x3b>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <asprintf@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
je     117f <memleak_asprintf+0x5f>
jmp    117f <memleak_asprintf+0x5f>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memleak_asprintf>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1040 <asprintf@plt>
cmp    $0xffffffff,%eax
je     113f <memleak_asprintf+0x1f>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <asprintf@plt>

LLVM IR (-O0):
define void @memleak_asprintf(i8** %0, i8* %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i32
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8**, i8*** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @asprintf(i8** %7, i8* %8, i32 %9)
%11 = icmp ne i32 -1, %10
br i1 %11, label %12, label %15
12: ; preds = %3
%13 = load i8**, i8*** %4
%14 = call i32 @free(i8** %13)
br label %15
15: ; preds = %12, %3
%16 = load i8**, i8*** %4
%17 = load i8*, i8** %5
%18 = load i32, i32* %6
%19 = call i32 @asprintf(i8** %16, i8* %17, i32 %18)
%20 = icmp ne i32 -1, %19
br i1 %20, label %21, label %22
21: ; preds = %15
br label %22
22: ; preds = %21, %15
ret void
}

LLVM IR (-O2):
define void @memleak_asprintf(i8** %0, i8* %1, i32 %2) {
%4 = tail call i32 @asprintf(i8** %0, i8* %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @free(i8** %0)
br label %8
8: ; preds = %6, %3
%9 = tail call i32 @asprintf(i8** %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int ustime();
long long mstime(void) { return ustime() / 1000; }


x86 assembly (clang, -O0):
<mstime>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ustime@plt>
mov    $0x3e8,%ecx
cltd
idiv   %ecx
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<mstime>:
push   %rax
xor    %eax,%eax
call   1030 <ustime@plt>
cltq
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @mstime() {
%1 = call i32 (...) @ustime()
%2 = sdiv i32 %1, 1000
%3 = sext i32 %2 to i64
ret i64 %3
}

LLVM IR (-O2):
define i64 @mstime() {
%1 = tail call i32 (...) @ustime()
%2 = sdiv i32 %1, 1000
%3 = sext i32 %2 to i64
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ Buf;

/* Variables and functions */
int /*<<< orphan*/ xsnprintf(char *, int, char *, unsigned int, unsigned int);
const char *GetVersionAsString(void) {
  static char Buf[60];
  xsnprintf(Buf, sizeof(Buf), "%u.%u", 2U, 18U);
  return Buf;
}


x86 assembly (clang, -O0):
<GetVersionAsString>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rdi
mov    $0x3c,%esi
lea    0xed9(%rip),%rdx
mov    $0x2,%ecx
mov    $0x12,%r8d
call   1030 <xsnprintf@plt>
lea    0x2f02(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetVersionAsString>:
push   %rbx
lea    0x2f28(%rip),%rbx
lea    0xee1(%rip),%rdx
mov    %rbx,%rdi
mov    $0x3c,%esi
mov    $0x2,%ecx
mov    $0x12,%r8d
call   1030 <xsnprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@GetVersionAsString.Buf = internal global [60 x i8] zeroinitializer
@.str = [6 x i8] c"%u.%u\00"
define i8* @GetVersionAsString() {
%1 = call i32 @xsnprintf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @GetVersionAsString.Buf, i64 0, i64 0), i32 60, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 2, i32 18)
ret i8* getelementptr inbounds ([60 x i8], [60 x i8]* @GetVersionAsString.Buf, i64 0, i64 0)
}

LLVM IR (-O2):
@GetVersionAsString.Buf = internal global [60 x i8] zeroinitializer
@.str = [6 x i8] c"%u.%u\00"
define i8* @GetVersionAsString() {
%1 = tail call i32 @xsnprintf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @GetVersionAsString.Buf, i64 0, i64 0), i32 60, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 2, i32 18)
ret i8* getelementptr inbounds ([60 x i8], [60 x i8]* @GetVersionAsString.Buf, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR74_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR74_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

LLVM IR (-O0):
define void @U_WMR74_swap(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_WMR74_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
int high_ones(int c) {
  int n;
  for (n = 0; (c & 0x80) == 0x80; c <<= 1) {
    ++n;
  }
  return n;
}


x86 assembly (clang, -O0):
<high_ones>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x80,%eax
cmp    $0x80,%eax
jne    1138 <high_ones+0x38>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <high_ones+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<high_ones>:
xor    %eax,%eax
test   $0x80,%dil
je     111e <high_ones+0x1e>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
lea    (%rdi,%rdi,1),%ecx
test   $0x40,%dil
mov    %ecx,%edi
jne    1110 <high_ones+0x10>
ret

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

LLVM IR (-O2):
define i32 @high_ones(i32 %0) {
%2 = and i32 %0, 128
%3 = icmp eq i32 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = phi i32 [ %8, %4 ], [ %0, %1 ]
%7 = add nuw nsw i32 %5, 1
%8 = shl i32 %6, 1
%9 = and i32 %6, 64
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %12
}
/* Variables and functions */
char *strncpy(char *, char const *, size_t);
char *strNcpy(char *dst, const char *src, size_t len) {
  char *r = strncpy(dst, src, len);
  dst[len - 1] = '\0';
  return r;
}


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

x86 assembly (clang, -O2):
<strNcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <strncpy@plt>
movb   $0x0,-0x1(%r14,%rbx,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strNcpy(i8* returned %0, i8* nocapture %1, i64 %2) {
%4 = tail call i8* @strncpy(i8* dereferenceable(1) %0, i8* %1, i64 %2)
%5 = add i64 %2, -1
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %6
ret i8* %0
}
int ft_is_option(char c) {
  return (c == 'l' || c == 'R' || c == 'a' || c == 'r' || c == 't');
}


x86 assembly (clang, -O0):
<ft_is_option>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x6c,%ecx
mov    %al,-0x2(%rbp)
je     115f <ft_is_option+0x5f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x52,%ecx
mov    %al,-0x2(%rbp)
je     115f <ft_is_option+0x5f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x61,%ecx
mov    %al,-0x2(%rbp)
je     115f <ft_is_option+0x5f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x72,%ecx
mov    %al,-0x2(%rbp)
je     115f <ft_is_option+0x5f>
movsbl -0x1(%rbp),%eax
cmp    $0x74,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_is_option>:
lea    -0x52(%rdi),%ecx
cmp    $0x20,%cl
ja     1121 <ft_is_option+0x21>
mov    $0x1,%eax
movzbl %cl,%ecx
movabs $0x104008001,%rdx
bt     %rcx,%rdx
jae    1121 <ft_is_option+0x21>
ret
xor    %eax,%eax
cmp    $0x74,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @ft_is_option(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 108
br i1 %5, label %22, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 82
br i1 %9, label %22, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 97
br i1 %13, label %22, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 114
br i1 %17, label %22, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 116
br label %22
22: ; preds = %18, %14, %10, %6, %1
%23 = phi i1 [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %21, %18 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @ft_is_option(i8 signext %0) {
switch i8 %0, label %2 [
i8 114, label %5
i8 108, label %5
i8 97, label %5
i8 82, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 116
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int __fxstatat(int, int, char const *, struct stat *, int);
__attribute__((__weak__, __always___)) int
softboundmpx___fxstatat(int ver, int file_des, const char *filename,
                        struct stat *stat_struct, int flag) {
  return __fxstatat(ver, file_des, filename, stat_struct, flag);
}


x86 assembly (clang, -O0):
<softboundmpx___fxstatat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
call   1030 <__fxstatat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx___fxstatat>:
jmp    1030 <__fxstatat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define weak i32 @softboundmpx___fxstatat(i32 %0, i32 %1, i8* %2, %struct.stat* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca %struct.stat*
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store %struct.stat* %3, %struct.stat** %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = load %struct.stat*, %struct.stat** %9
%15 = load i32, i32* %10
%16 = call i32 @__fxstatat(i32 %11, i32 %12, i8* %13, %struct.stat* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define weak i32 @softboundmpx___fxstatat(i32 %0, i32 %1, i8* %2, %struct.stat* %3, i32 %4) {
%6 = tail call i32 @__fxstatat(i32 %0, i32 %1, i8* %2, %struct.stat* %3, i32 %4)
ret i32 %6
}
const char *Get_Description(void) {
  return "The `Get` class provides a method to _get_ or _set_ certain "
         "properties "
         "of an object using keys and value. Typically it is implemented by "
         "data lookup structures such as `Table` or `Map` but it is also used "
         "more generally such as using indices to look up items in `Array`, or "
         "as thread local storage for the `Thread` object.";
}


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

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

LLVM IR (-O0):
@.str = [323 x i8] c"The `Get` class provides a method to _get_ or _set_ certain properties of an object using keys and value. Typically it is implemented by data lookup structures such as `Table` or `Map` but it is also used more generally such as using indices to look up items in `Array`, or as thread local storage for the `Thread` object.\00"
define i8* @Get_Description() {
ret i8* getelementptr inbounds ([323 x i8], [323 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [323 x i8] c"The `Get` class provides a method to _get_ or _set_ certain properties of an object using keys and value. Typically it is implemented by data lookup structures such as `Table` or `Map` but it is also used more generally such as using indices to look up items in `Array`, or as thread local storage for the `Thread` object.\00"
define i8* @Get_Description() {
ret i8* getelementptr inbounds ([323 x i8], [323 x i8]* @.str, i64 0, i64 0)
}
void main(void) {
  volatile unsigned long ul;
  for (;;) {
    ul++;
    ul++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    %rax,-0x8(%rbp)
jmp    1104 <main+0x4>

x86 assembly (clang, -O2):
<main>:
addq   $0x1,-0x8(%rsp)
addq   $0x1,-0x8(%rsp)
jmp    1100 <main>

LLVM IR (-O0):
define void @main() {
%1 = alloca i64
br label %2
2: ; preds = %2, %0
%3 = load volatile i64, i64* %1
%4 = add i64 %3, 1
store volatile i64 %4, i64* %1
%5 = load volatile i64, i64* %1
%6 = add i64 %5, 1
store volatile i64 %6, i64* %1
br label %2
}

LLVM IR (-O2):
define void @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = load volatile i64, i64* %1
%5 = add i64 %4, 1
store volatile i64 %5, i64* %1
%6 = load volatile i64, i64* %1
%7 = add i64 %6, 1
store volatile i64 %7, i64* %1
br label %3
}
void ff_hevc_put_hevc_uni_epel_h64_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_h64_8_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f2();
int main() { f2(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f2()
ret i32 0
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
scalar_t__ time_to_sync(struct timespec *);
int timesync_now_timespec(struct timespec *);
int timesync_timespec(struct timespec *now) {
  int res;
  if (time_to_sync(now)) {
    res = timesync_now_timespec(now);
  } else {
    res = 0;
  }
  return res;
}


x86 assembly (clang, -O0):
<timesync_timespec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <time_to_sync@plt>
cmp    $0x0,%rax
je     1150 <timesync_timespec+0x30>
mov    -0x8(%rbp),%rdi
call   1040 <timesync_now_timespec@plt>
mov    %eax,-0xc(%rbp)
jmp    1157 <timesync_timespec+0x37>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timesync_timespec>:
push   %rbx
mov    %rdi,%rbx
call   1030 <time_to_sync@plt>
test   %rax,%rax
je     1137 <timesync_timespec+0x17>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <timesync_now_timespec@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
define i32 @timesync_timespec(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
%3 = alloca i32
store %struct.timespec* %0, %struct.timespec** %2
%4 = load %struct.timespec*, %struct.timespec** %2
%5 = call i64 @time_to_sync(%struct.timespec* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load %struct.timespec*, %struct.timespec** %2
%9 = call i32 @timesync_now_timespec(%struct.timespec* %8)
store i32 %9, i32* %3
br label %11
10: ; preds = %1
store i32 0, i32* %3
br label %11
11: ; preds = %10, %7
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define i32 @timesync_timespec(%struct.timespec* %0) {
%2 = tail call i64 @time_to_sync(%struct.timespec* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @timesync_now_timespec(%struct.timespec* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_CERTSTATUS;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_CERTSTATUS_it;
int i2d_OCSP_CERTSTATUS(OCSP_CERTSTATUS *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_CERTSTATUS_it);
}


x86 assembly (clang, -O0):
<i2d_OCSP_CERTSTATUS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2eb1(%rip),%rdx
call   1030 <ASN1_item_i2d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2d_OCSP_CERTSTATUS>:
mov    0x2ec9(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

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

LLVM IR (-O2):
@OCSP_CERTSTATUS_it = global i32 0
define i32 @i2d_OCSP_CERTSTATUS(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @OCSP_CERTSTATUS_it)
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ serial;
};
typedef TYPE_1__ XKeyPressedEvent;

/* Variables and functions */
unsigned long get_XKeyPressedEvent_serial(void *_p) {
  return (unsigned long)((XKeyPressedEvent *)_p)->serial;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XKeyPressedEvent_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
int create_bridge(const char *brname) {
  int status = 0;
  return status;
}


x86 assembly (clang, -O0):
<create_bridge>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @create_bridge(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
void libretro_dummy_retro_unload_game(void) {}


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

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

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

LLVM IR (-O2):
define void @libretro_dummy_retro_unload_game() {
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SIGKILL;
scalar_t__ fork();
int /*<<< orphan*/ kill(scalar_t__, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int main(int argc, const char *argv[]) {
  pid_t p = fork();
  if (p) {
    sleep(5);
    kill(p, SIGKILL);
  } else {
    for (;;)
      ;
  }
  return 0;
}


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 <fork@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     117d <main+0x4d>
mov    $0x5,%edi
call   1040 <sleep@plt>
mov    -0x18(%rbp),%rdi
mov    0x2e6f(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
jmp    1187 <main+0x57>
jmp    1182 <main+0x52>
jmp    1182 <main+0x52>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <fork@plt>
test   %rax,%rax
je     1160 <main+0x30>
mov    %rax,%rbx
mov    $0x5,%edi
call   1040 <sleep@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1030 <kill@plt>
xor    %eax,%eax
pop    %rbx
ret
nop
jmp    1160 <main+0x30>

LLVM IR (-O0):
@SIGKILL = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i64 (...) @fork()
store i64 %7, i64* %6
%8 = load i64, i64* %6
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = call i32 @sleep(i32 5)
%12 = load i64, i64* %6
%13 = load i32, i32* @SIGKILL
%14 = call i32 @kill(i64 %12, i32 %13)
br label %17
15: ; preds = %2
br label %16
16: ; preds = %16, %15
br label %16
17: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@SIGKILL = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @fork()
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @sleep(i32 5)
%7 = load i32, i32* @SIGKILL
%8 = tail call i32 @kill(i64 %3, i32 %7)
ret i32 0
9: ; preds = %2, %9
br label %9
}
__attribute__((always_)) int pci_ats_enabled(struct pci_dev *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define i32 @pci_ats_enabled(%struct.pci_dev* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ isalnum(int);
int isalnum_(int c) { return (isalnum(c) || c == '_' || c == '.'); }


x86 assembly (clang, -O0):
<isalnum_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    114e <isalnum_+0x3e>
mov    $0x1,%al
cmpl   $0x5f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114e <isalnum_+0x3e>
cmpl   $0x2e,-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):
<isalnum_>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%ebx
sete   %cl
cmp    $0x2e,%ebx
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isalnum_(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isalnum(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 95
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 46
br label %12
12: ; preds = %9, %6, %1
%13 = phi i1 [ true, %6 ], [ true, %1 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @isalnum_(i32 %0) {
%2 = tail call i64 @isalnum(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i32 %0, 95
%5 = or i1 %4, %3
%6 = icmp eq i32 %0, 46
%7 = or i1 %6, %5
%8 = zext i1 %7 to i32
ret i32 %8
}
char *langRomTypeZenima126() { return "Zenima 126 in 1"; }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Zenima 126 in 1\00"
define i8* @langRomTypeZenima126() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"Zenima 126 in 1\00"
define i8* @langRomTypeZenima126() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ lc4_blt_vmem();
int /*<<< orphan*/ lc4_reset_vmem();
void reset() {
  lc4_reset_vmem();
  lc4_blt_vmem();
}


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

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

LLVM IR (-O0):
define void @reset() {
%1 = call i32 (...) @lc4_reset_vmem()
%2 = call i32 (...) @lc4_blt_vmem()
ret void
}

LLVM IR (-O2):
define void @reset() {
%1 = tail call i32 (...) @lc4_reset_vmem()
%2 = tail call i32 (...) @lc4_blt_vmem()
ret void
}
int qclear(x)
register unsigned short *x;
{
  register int i;
  for (i = 0; i < 14; i++)
    *x++ = 0;
  return 0;
}


x86 assembly (clang, -O0):
<qclear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xe,-0xc(%rbp)
jge    113b <qclear+0x3b>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x8(%rbp)
movw   $0x0,(%rax)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <qclear+0xf>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qclear>:
xorps  %xmm0,%xmm0
movups %xmm0,0xc(%rdi)
movups %xmm0,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @qclear(i16* nocapture writeonly %0) {
%2 = bitcast i16* %0 to i8*
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
struct stat {
  int /*<<< orphan*/ st_uid;
};

/* Variables and functions */
uid_t posix_stat_st_uid(const struct stat *st) { return st->st_uid; }


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

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

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @posix_stat_st_uid(%struct.stat* %0) {
%2 = alloca %struct.stat*
store %struct.stat* %0, %struct.stat** %2
%3 = load %struct.stat*, %struct.stat** %2
%4 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @posix_stat_st_uid(%struct.stat* nocapture %0) {
%2 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
int byte_col_euc(int byte) {
  if (byte >= 0xa1 && byte < 0xff)
    return byte - 0xa1;
  else
    return -1;
}


x86 assembly (clang, -O0):
<byte_col_euc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xa1,-0x8(%rbp)
jl     1131 <byte_col_euc+0x31>
cmpl   $0xff,-0x8(%rbp)
jge    1131 <byte_col_euc+0x31>
mov    -0x8(%rbp),%eax
sub    $0xa1,%eax
mov    %eax,-0x4(%rbp)
jmp    1138 <byte_col_euc+0x38>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<byte_col_euc>:
lea    -0xa1(%rdi),%ecx
cmp    $0x5e,%ecx
mov    $0xffffffff,%eax
cmovb  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @byte_col_euc(i32 %0) {
%2 = add i32 %0, -161
%3 = icmp ult i32 %2, 94
%4 = select i1 %3, i32 %2, i32 -1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ arm_arith_add(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ t16_data_rdn4_op(int /*<<< orphan*/);
void t16_add_rdn4() { arm_arith_add(t16_data_rdn4_op(0), 0); }


x86 assembly (clang, -O0):
<t16_add_rdn4>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <t16_data_rdn4_op@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <arm_arith_add@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t16_add_rdn4>:
push   %rax
xor    %edi,%edi
call   1030 <t16_data_rdn4_op@plt>
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <arm_arith_add@plt>

LLVM IR (-O0):
define void @t16_add_rdn4() {
%1 = call i32 @t16_data_rdn4_op(i32 0)
%2 = call i32 @arm_arith_add(i32 %1, i32 0)
ret void
}

LLVM IR (-O2):
define void @t16_add_rdn4() {
%1 = tail call i32 @t16_data_rdn4_op(i32 0)
%2 = tail call i32 @arm_arith_add(i32 %1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int a = 3;
  a &= 0xFFFFFFFF;
  assert(a == 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <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
store i32 3, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 3
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putc(int const);
void puti(const int i) {
  if (i > 10)
    puti(i / 10);
  putc(i % 10 + '0');
}


x86 assembly (clang, -O0):
<puti>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jle    1147 <puti+0x27>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <puti@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x30,%edi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puti>:
push   %rbx
mov    %edi,%ebx
cmp    $0xb,%edi
jl     113c <puti+0x1c>
mov    %ebx,%eax
mov    $0xcccccccd,%edi
imul   %rax,%rdi
shr    $0x23,%rdi
call   1040 <puti@plt>
movslq %ebx,%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
neg    %eax
lea    (%rbx,%rax,1),%edi
add    $0x30,%edi
pop    %rbx
jmp    1030 <putc@plt>

LLVM IR (-O0):
define void @puti(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 10
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 10
br label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = srem i32 %9, 10
%11 = add nsw i32 %10, 48
%12 = call i32 @putc(i32 %11)
ret void
}

LLVM IR (-O2):
define void @puti(i32 %0) {
%2 = icmp sgt i32 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = udiv i32 %0, 10
tail call void @puti(i32 %4)
br label %5
5: ; preds = %3, %1
%6 = srem i32 %0, 10
%7 = add nsw i32 %6, 48
%8 = tail call i32 @putc(i32 %7)
ret void
}
int InitSockets() { return 1; }


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

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

LLVM IR (-O0):
define i32 @InitSockets() {
ret i32 1
}

LLVM IR (-O2):
define i32 @InitSockets() {
ret i32 1
}
/* Variables and functions */
int cbPcodeExec(int, int /*<<< orphan*/);
int cbPrintFrame() { return cbPcodeExec(1, 0); }


x86 assembly (clang, -O0):
<cbPrintFrame>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <cbPcodeExec@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbPrintFrame>:
mov    $0x1,%edi
xor    %esi,%esi
jmp    1030 <cbPcodeExec@plt>

LLVM IR (-O0):
define i32 @cbPrintFrame() {
%1 = call i32 @cbPcodeExec(i32 1, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @cbPrintFrame() {
%1 = tail call i32 @cbPcodeExec(i32 1, i32 0)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int int32_t;

/* Variables and functions */
scalar_t__ memcmp(int /*<<< orphan*/ const *, char *, size_t);
bool IsBlockEnd(int32_t length, const uint8_t *data) {
  return length == 5 && memcmp(data, "---->", (size_t)length) == 0;
}


x86 assembly (clang, -O0):
<IsBlockEnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x5,-0x4(%rbp)
mov    %al,-0x11(%rbp)
jne    114c <IsBlockEnd+0x3c>
mov    -0x10(%rbp),%rdi
movslq -0x4(%rbp),%rdx
lea    0xec3(%rip),%rsi
call   1030 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsBlockEnd>:
xor    %eax,%eax
cmp    $0x5,%edi
jne    113e <IsBlockEnd+0x2e>
push   %rax
lea    0xee1(%rip),%rax
mov    $0x5,%edx
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <memcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"---->\00"
define i32 @IsBlockEnd(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 5
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32*, i32** %4
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = call i64 @memcmp(i32* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %10)
%12 = icmp eq i64 %11, 0
br label %13
13: ; preds = %7, %2
%14 = phi i1 [ false, %2 ], [ %12, %7 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
@.str = [6 x i8] c"---->\00"
define i32 @IsBlockEnd(i32 %0, i32* %1) {
%3 = icmp eq i32 %0, 5
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = tail call i64 @memcmp(i32* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 5)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %2
%9 = phi i32 [ 0, %2 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void foo() { printf("strong foo\n"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"strong foo\0A\00"
define void @foo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"strong foo\00"
define void @foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_UTF8STRING;

/* Variables and functions */
int /*<<< orphan*/ ASN1_UTF8STRING_it;
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
ASN1_UTF8STRING *d2i_ASN1_UTF8STRING(ASN1_UTF8STRING **a,
                                     const unsigned char **in, long len) {
  return (ASN1_UTF8STRING *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                          &ASN1_UTF8STRING_it);
}


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

x86 assembly (clang, -O2):
<d2i_ASN1_UTF8STRING>:
mov    0x2ec9(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@ASN1_UTF8STRING_it = global i32 0
define i32* @d2i_ASN1_UTF8STRING(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @ASN1_UTF8STRING_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@ASN1_UTF8STRING_it = global i32 0
define i32* @d2i_ASN1_UTF8STRING(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @ASN1_UTF8STRING_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
unsigned long strlen(const char *str) {
  long cnt = 0;
  if (!str)
    return 0;
  for (; *str != '\0'; ++str) {
    ++cnt;
  }
  return cnt;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1128 <strlen+0x28>
movq   $0x0,-0x8(%rbp)
jmp    1162 <strlen+0x62>
jmp    112d <strlen+0x2d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115a <strlen+0x5a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    112d <strlen+0x2d>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
test   %rdi,%rdi
je     111f <strlen+0x1f>
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %9, %6 ], [ 0, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
%9 = add nuw nsw i64 %7, 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
%14 = phi i64 [ 0, %1 ], [ 0, %3 ], [ %9, %6 ]
ret i64 %14
}