xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ isdigit(int /*<<< orphan*/);
int all_digits(char *p) {
  if (p == NULL) {
    return 0;
  }
  while (*p != '\0') {
    if (!isdigit(*p++))
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<all_digits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <all_digits+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1180 <all_digits+0x70>
jmp    1138 <all_digits+0x28>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1179 <all_digits+0x69>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    1174 <all_digits+0x64>
movl   $0x0,-0x4(%rbp)
jmp    1180 <all_digits+0x70>
jmp    1138 <all_digits+0x28>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<all_digits>:
xor    %eax,%eax
test   %rdi,%rdi
je     1123 <all_digits+0x23>
nopw   0x0(%rax,%rax,1)
movsbl (%rdi),%ecx
test   %ecx,%ecx
je     1124 <all_digits+0x24>
add    $0x1,%rdi
add    $0xffffffd0,%ecx
cmp    $0xa,%ecx
jb     1110 <all_digits+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @all_digits(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %12, label %3
3: ; preds = %1, %7
%4 = phi i8* [ %9, %7 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = add nsw i32 %8, -48
%11 = icmp ult i32 %10, 10
br i1 %11, label %3, label %12
12: ; preds = %3, %7, %1
%13 = phi i32 [ 0, %1 ], [ 1, %3 ], [ 0, %7 ]
ret i32 %13
}
/* Variables and functions */
int juniper_fpga_partition_read_bytes(int, int, char *, char *, int);
int juniper_fpga_partition_read_flag(int devNo, int partNo, char *flagName) {
  char flag = 0;
  int rv;
  ;
  rv = juniper_fpga_partition_read_bytes(devNo, partNo, flagName, &flag, 1);
  if (rv != 0)
    return rv;
  return flag == '1';
}


x86 assembly (clang, -O0):
<juniper_fpga_partition_read_flag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movb   $0x0,-0x19(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    -0x19(%rbp),%rcx
mov    $0x1,%r8d
call   1030 <juniper_fpga_partition_read_bytes@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     1157 <juniper_fpga_partition_read_flag+0x47>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1169 <juniper_fpga_partition_read_flag+0x59>
movsbl -0x19(%rbp),%eax
cmp    $0x31,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<juniper_fpga_partition_read_flag>:
push   %rax
movb   $0x0,0x7(%rsp)
lea    0x7(%rsp),%rcx
mov    $0x1,%r8d
call   1030 <juniper_fpga_partition_read_bytes@plt>
xor    %ecx,%ecx
cmpb   $0x31,0x7(%rsp)
sete   %cl
test   %eax,%eax
cmove  %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @juniper_fpga_partition_read_flag(i32 %0, i32 %1, i8* %2) {
%4 = alloca i8
store i8 0, i8* %4
%5 = call i32 @juniper_fpga_partition_read_bytes(i32 %0, i32 %1, i8* %2, i8* %4, i32 1)
%6 = icmp eq i32 %5, 0
%7 = load i8, i8* %4
%8 = icmp eq i8 %7, 49
%9 = zext i1 %8 to i32
%10 = select i1 %6, i32 %9, i32 %5
ret i32 %10
}
/* Type definitions */
struct rlimit {
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int main(int argc, char *argv[]) {
  int ret = 0;
  struct rlimit lmt = {0};
  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)
movl   $0x0,-0x14(%rbp)
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, int);
int main(void) { foo(5, 7); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
mov    $0x7,%esi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @foo(i32 5, i32 7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 5, i32 7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ChangeCommonPassword();
void SendCommonPassword() { ChangeCommonPassword(); }


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

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

LLVM IR (-O0):
define void @SendCommonPassword() {
%1 = call i32 (...) @ChangeCommonPassword()
ret void
}

LLVM IR (-O2):
define void @SendCommonPassword() {
%1 = tail call i32 (...) @ChangeCommonPassword()
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int get_next_input_from_fuzzer();
int map2check_non_det_int() {
  uint64_t result = 0;
  int i = 0;
  for (; i < 8; i++)
    result |= get_next_input_from_fuzzer() << (8 * i);
  return (int)result;
}


x86 assembly (clang, -O0):
<map2check_non_det_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1153 <map2check_non_det_int+0x43>
mov    $0x0,%al
call   1030 <get_next_input_from_fuzzer@plt>
mov    -0x8(%rbp),%ecx
shl    $0x3,%ecx
shl    %cl,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <map2check_non_det_int+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map2check_non_det_int>:
push   %rax
xor    %eax,%eax
call   1030 <get_next_input_from_fuzzer@plt>
xor    %eax,%eax
call   1030 <get_next_input_from_fuzzer@plt>
xor    %eax,%eax
call   1030 <get_next_input_from_fuzzer@plt>
xor    %eax,%eax
call   1030 <get_next_input_from_fuzzer@plt>
xor    %eax,%eax
call   1030 <get_next_input_from_fuzzer@plt>
xor    %eax,%eax
call   1030 <get_next_input_from_fuzzer@plt>
xor    %eax,%eax
call   1030 <get_next_input_from_fuzzer@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <get_next_input_from_fuzzer@plt>

LLVM IR (-O0):
define i32 @map2check_non_det_int() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %13, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 8
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = call i32 (...) @get_next_input_from_fuzzer()
%8 = load i32, i32* %2
%9 = mul nsw i32 8, %8
%10 = shl i32 %7, %9
%11 = load i32, i32* %1
%12 = or i32 %11, %10
store i32 %12, i32* %1
br label %13
13: ; preds = %6
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %3
16: ; preds = %3
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @map2check_non_det_int() {
%1 = tail call i32 (...) @get_next_input_from_fuzzer()
%2 = tail call i32 (...) @get_next_input_from_fuzzer()
%3 = tail call i32 (...) @get_next_input_from_fuzzer()
%4 = tail call i32 (...) @get_next_input_from_fuzzer()
%5 = tail call i32 (...) @get_next_input_from_fuzzer()
%6 = tail call i32 (...) @get_next_input_from_fuzzer()
%7 = tail call i32 (...) @get_next_input_from_fuzzer()
%8 = tail call i32 (...) @get_next_input_from_fuzzer()
ret i32 poison
}
/* Variables and functions */
int rand();
int Rand(int max) {
  if (max == 0)
    max = 1;
  return rand() % max;
}


x86 assembly (clang, -O0):
<Rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112c <Rand+0x1c>
movl   $0x1,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Rand>:
push   %rbx
test   %edi,%edi
mov    $0x1,%ebx
cmovne %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @Rand(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 1, i32 %0
%4 = tail call i32 (...) @rand()
%5 = srem i32 %4, %3
ret i32 %5
}
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local1;
  {
    state[0UL] = input[0UL] + 0xffffffffff660b45UL;
    local1 = 0UL;
    while (local1 < 0UL) {
      state[local1] *= state[local1];
      local1 += 2UL;
    }
    output[0UL] = state[0UL] - 114204063568655258UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0xffffffffff660b45,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jae    1159 <RandomFunc+0x59>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp,%rax,8),%rcx
mov    -0x20(%rbp),%rax
imul   -0x18(%rbp,%rax,8),%rcx
mov    %rcx,-0x18(%rbp,%rax,8)
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
jmp    1125 <RandomFunc+0x25>
mov    -0x18(%rbp),%rcx
movabs $0x195bbfda0ea739a,%rax
bb 95 01
sub    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movabs $0xfe6a44025e7b97ab,%rax
44 6a fe
add    (%rdi),%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = add i64 %9, -10089659
%11 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %10, i64* %11
store i64 0, i64* %6
br label %12
12: ; preds = %15, %2
%13 = load i64, i64* %6
%14 = icmp ult i64 %13, 0
br i1 %14, label %15, label %25
15: ; preds = %12
%16 = load i64, i64* %6
%17 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 %16
%18 = load i64, i64* %17
%19 = load i64, i64* %6
%20 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 %19
%21 = load i64, i64* %20
%22 = mul i64 %21, %18
store i64 %22, i64* %20
%23 = load i64, i64* %6
%24 = add i64 %23, 2
store i64 %24, i64* %6
br label %12
25: ; preds = %12
%26 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%27 = load i64, i64* %26
%28 = sub i64 %27, 114204063568655258
%29 = load i64*, i64** %4
%30 = getelementptr inbounds i64, i64* %29, i64 0
store i64 %28, i64* %30
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = add i64 %3, -114204063578744917
store i64 %4, i64* %1
ret void
}
void a(void) {
  double _Complex z = 0;
  if (b(__real__ z) && b(__imag__ z))
    return;
}


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1030 <b@plt>
cmp    $0x0,%eax
je     1157 <a+0x47>
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1030 <b@plt>
cmp    $0x0,%eax
je     1157 <a+0x47>
jmp    1157 <a+0x47>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
push   %rax
xorps  %xmm0,%xmm0
mov    $0x1,%al
call   1030 <b@plt>
test   %eax,%eax
je     112a <a+0x1a>
xorps  %xmm0,%xmm0
mov    $0x1,%al
pop    %rcx
jmp    1030 <b@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @a() {
%1 = alloca { double, double }
%2 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 0
%3 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 1
store double 0.000000e+00, double* %2
store double 0.000000e+00, double* %3
%4 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 0
%5 = load double, double* %4
%6 = call i32 (double, ...) bitcast (i32 (...)* @b to i32 (double, ...)*)(double %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %0
%9 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 1
%10 = load double, double* %9
%11 = call i32 (double, ...) bitcast (i32 (...)* @b to i32 (double, ...)*)(double %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8
br label %14
14: ; preds = %13, %8, %0
ret void
}

LLVM IR (-O2):
define void @a() {
%1 = tail call i32 (double, ...) bitcast (i32 (...)* @b to i32 (double, ...)*)(double 0.000000e+00)
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (double, ...) bitcast (i32 (...)* @b to i32 (double, ...)*)(double 0.000000e+00)
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char const *argv[]) {
  printf("%s\n", "hello world");
  printf("new Hello");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [12 x i8] c"hello world\00"
@.str.2 = [10 x i8] c"new Hello\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [12 x i8] c"hello world\00"
@.str.2 = [10 x i8] c"new Hello\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
void fill_cisco_oui_type(unsigned char *oui_type) {
  oui_type[0] = 0x00;
  oui_type[1] = 0x00;
  oui_type[2] = 0x0c;
}


x86 assembly (clang, -O0):
<fill_cisco_oui_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x8(%rbp),%rax
movb   $0xc,0x2(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_cisco_oui_type>:
movw   $0x0,(%rdi)
movb   $0xc,0x2(%rdi)
ret

LLVM IR (-O0):
define void @fill_cisco_oui_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %4
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 1
store i8 0, i8* %6
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 2
store i8 12, i8* %8
ret void
}

LLVM IR (-O2):
define void @fill_cisco_oui_type(i8* nocapture writeonly %0) {
store i8 0, i8* %0
%2 = getelementptr inbounds i8, i8* %0, i64 1
store i8 0, i8* %2
%3 = getelementptr inbounds i8, i8* %0, i64 2
store i8 12, i8* %3
ret void
}
int hash_string(key)
char *key;
{
  register char *cp;
  register int k;
  cp = key;
  k = 0;
  while (*cp)
    k = (((k << 1) + (k >> 14)) ^ (*cp++)) & 0x3fff;
  return k;
}


x86 assembly (clang, -O0):
<hash_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1153 <hash_string+0x53>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    -0x14(%rbp),%ecx
sar    $0xe,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
xor    %ecx,%eax
and    $0x3fff,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <hash_string+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_string>:
mov    (%rdi),%cl
test   %cl,%cl
je     112a <hash_string+0x2a>
add    $0x1,%rdi
xor    %edx,%edx
nopl   0x0(%rax)
add    %edx,%edx
movsbl %cl,%eax
xor    %edx,%eax
and    $0x3fff,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1110 <hash_string+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %12, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = shl nuw nsw i32 %6, 1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i32
%11 = xor i32 %8, %10
%12 = and i32 %11, 16383
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %12, %4 ]
ret i32 %16
}
/* Variables and functions */
int i2c_smbus_write_word_data(int, int, int);
int bananapiI2CWriteReg16(int fd, int reg, int data) {
  return i2c_smbus_write_word_data(fd, reg, data);
}


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

x86 assembly (clang, -O2):
<bananapiI2CWriteReg16>:
jmp    1030 <i2c_smbus_write_word_data@plt>

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

LLVM IR (-O2):
define i32 @bananapiI2CWriteReg16(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @i2c_smbus_write_word_data(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
void g_io_channel_set_line_term() {}


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

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

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

LLVM IR (-O2):
define void @g_io_channel_set_line_term() {
ret void
}
void fdi_spi_initialize(void) {}


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

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

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

LLVM IR (-O2):
define void @fdi_spi_initialize() {
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
char *Cmd_SkipSpace(char *ptr) {
  while (isspace(*ptr))
    ++ptr;
  return ptr;
}


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

x86 assembly (clang, -O2):
<Cmd_SkipSpace>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <Cmd_SkipSpace+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @Cmd_SkipSpace(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 = call i64 @isspace(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
br label %3
11: ; preds = %3
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
define i8* @Cmd_SkipSpace(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ recurse_malloc(int /*<<< orphan*/);
int main() {
  recurse_malloc(0);
  return 0;
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ ll_free(struct ll *, int /*<<< orphan*/ *);
void free_inner_list(void *data) {
  struct ll *list = data;
  ll_free(list, NULL);
}


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

x86 assembly (clang, -O2):
<free_inner_list>:
xor    %esi,%esi
jmp    1030 <ll_free@plt>

LLVM IR (-O0):
%struct.ll = type { i32 }
define void @free_inner_list(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.ll*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.ll*
store %struct.ll* %5, %struct.ll** %3
%6 = load %struct.ll*, %struct.ll** %3
%7 = call i32 @ll_free(%struct.ll* %6, i32* null)
ret void
}

LLVM IR (-O2):
%struct.ll = type { i32 }
define void @free_inner_list(i8* %0) {
%2 = bitcast i8* %0 to %struct.ll*
%3 = tail call i32 @ll_free(%struct.ll* %2, i32* null)
ret void
}
int fun698() { return 698; }


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

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

LLVM IR (-O0):
define i32 @fun698() {
ret i32 698
}

LLVM IR (-O2):
define i32 @fun698() {
ret i32 698
}
int test_imm_F4int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xF4 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F4int64_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, 244
%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_F4int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 15990784
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int test_imm_6Dint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x6D << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_6Dint64_highword_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, 32
%6 = and i64 %5, 109
%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_6Dint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 468151435264
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, int);
int main() {
  const char src[] = "XE";
  char dst[sizeof src];
  strncpy(dst, src, sizeof dst);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    0xed9(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0x6(%rbp),%rdi
lea    -0x3(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x0,0x4(%rsp)
movw   $0x4558,0x2(%rsp)
lea    0x5(%rsp),%rdi
lea    0x2(%rsp),%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.src = [3 x i8] c"XE\00"
define i32 @main() {
%1 = alloca [3 x i8]
%2 = alloca [3 x i8]
%3 = bitcast [3 x i8]* %1 to i8*
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%6 = call i32 @strncpy(i8* %4, i8* %5, i32 3)
ret i32 0
}

LLVM IR (-O2):
@__const.main.src = [3 x i8] c"XE\00"
define i32 @main() {
%1 = alloca [3 x i8]
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%5 = call i32 @strncpy(i8* %4, i8* %3, i32 3)
ret i32 0
}
int test_imm_F8uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0xF8 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F8uint64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 248
%6 = icmp ne i64 %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_F8uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 248
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
unsigned _ZopfliMaxCachedSublen(unsigned char *cache) {
  if (cache[1] == 0 && cache[2] == 0)
    return 0;
  return cache[(8 - 1) * 3] + 3;
}


x86 assembly (clang, -O0):
<_ZopfliMaxCachedSublen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    1136 <_ZopfliMaxCachedSublen+0x36>
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%eax
cmp    $0x0,%eax
jne    1136 <_ZopfliMaxCachedSublen+0x36>
movl   $0x0,-0x4(%rbp)
jmp    1144 <_ZopfliMaxCachedSublen+0x44>
mov    -0x10(%rbp),%rax
movzbl 0x15(%rax),%eax
add    $0x3,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ZopfliMaxCachedSublen>:
cmpb   $0x0,0x1(%rdi)
jne    110c <_ZopfliMaxCachedSublen+0xc>
cmpb   $0x0,0x2(%rdi)
je     1114 <_ZopfliMaxCachedSublen+0x14>
movzbl 0x15(%rdi),%eax
add    $0x3,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @_ZopfliMaxCachedSublen(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 2
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %5, %1
%10 = getelementptr inbounds i8, i8* %0, i64 21
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = add nuw nsw i32 %12, 3
br label %14
14: ; preds = %5, %9
%15 = phi i32 [ %13, %9 ], [ 0, %5 ]
ret i32 %15
}
int comparator(const void *key, const void *member) {
  unsigned int keyU = (*((unsigned int *)key));
  unsigned int memberU = (*((unsigned int *)member));
  if (keyU < memberU) {
    return -1;
  } else if (keyU > memberU) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<comparator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jae    1136 <comparator+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <comparator+0x5a>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jbe    114e <comparator+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    115a <comparator+0x5a>
jmp    1153 <comparator+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparator>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
seta   %cl
mov    $0xffffffff,%eax
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @comparator(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp ult i32 %4, %6
%8 = icmp ugt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t mqtt_get_connect_ret_code(uint8_t *buffer) { return (buffer[3]); }


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

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

LLVM IR (-O0):
define i32 @mqtt_get_connect_ret_code(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @mqtt_get_connect_ret_code(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ send_code_param(int, int, int /*<<< orphan*/ *);
void send_code(int fd, int code) { send_code_param(fd, code, NULL); }


x86 assembly (clang, -O0):
<send_code>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <send_code_param@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_code>:
xor    %edx,%edx
jmp    1030 <send_code_param@plt>

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

LLVM IR (-O2):
define void @send_code(i32 %0, i32 %1) {
%3 = tail call i32 @send_code_param(i32 %0, i32 %1, i32* null)
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};
struct event {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ event_add(struct event *, struct timeval *);
int /*<<< orphan*/ printf(char *);
void onTime(int sock, short event, void *arg) {
  printf("Game over\n");
  struct timeval tv;
  tv.tv_sec = 1;
  tv.tv_usec = 0;
  event_add((struct event *)arg, &tv);
}


x86 assembly (clang, -O0):
<onTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %rdx,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <event_add@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<onTime>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
movl   $0x1,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <event_add@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
%struct.event = type { i32 }
@.str = [11 x i8] c"Game over\0A\00"
define void @onTime(i32 %0, i16 signext %1, i8* %2) {
%4 = alloca i32
%5 = alloca i16
%6 = alloca i8*
%7 = alloca %struct.timeval
store i32 %0, i32* %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 0
store i32 1, i32* %9
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 1
store i64 0, i64* %10
%11 = load i8*, i8** %6
%12 = bitcast i8* %11 to %struct.event*
%13 = call i32 @event_add(%struct.event* %12, %struct.timeval* %7)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
%struct.event = type { i32 }
@str = [10 x i8] c"Game over\00"
define void @onTime(i32 %0, i16 signext %1, i8* %2) {
%4 = alloca %struct.timeval
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%6 = bitcast %struct.timeval* %4 to i8*
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 0
store i32 1, i32* %7
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 1
store i64 0, i64* %8
%9 = bitcast i8* %2 to %struct.event*
%10 = call i32 @event_add(%struct.event* %9, %struct.timeval* %4)
ret void
}
/* Type definitions */
struct lldp_port {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mibConstrInfoLLDPDU(struct lldp_port *);
int /*<<< orphan*/ txFrame(struct lldp_port *);
void tx_do_tx_info_frame(struct lldp_port *lldp_port) {
  mibConstrInfoLLDPDU(lldp_port);
  txFrame(lldp_port);
}


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

x86 assembly (clang, -O2):
<tx_do_tx_info_frame>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mibConstrInfoLLDPDU@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <txFrame@plt>

LLVM IR (-O0):
%struct.lldp_port = type { i32 }
define void @tx_do_tx_info_frame(%struct.lldp_port* %0) {
%2 = alloca %struct.lldp_port*
store %struct.lldp_port* %0, %struct.lldp_port** %2
%3 = load %struct.lldp_port*, %struct.lldp_port** %2
%4 = call i32 @mibConstrInfoLLDPDU(%struct.lldp_port* %3)
%5 = load %struct.lldp_port*, %struct.lldp_port** %2
%6 = call i32 @txFrame(%struct.lldp_port* %5)
ret void
}

LLVM IR (-O2):
%struct.lldp_port = type { i32 }
define void @tx_do_tx_info_frame(%struct.lldp_port* %0) {
%2 = tail call i32 @mibConstrInfoLLDPDU(%struct.lldp_port* %0)
%3 = tail call i32 @txFrame(%struct.lldp_port* %0)
ret void
}
/* Variables and functions */
char *cat_lstr(char *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *cat_str(char *src, const char *app) {
  return cat_lstr(src, app, strlen(app));
}


x86 assembly (clang, -O0):
<cat_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <cat_lstr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cat_str>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <cat_lstr@plt>

LLVM IR (-O0):
define i8* @cat_str(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i8* @cat_lstr(i8* %5, i8* %6, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @cat_str(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i8* @cat_lstr(i8* %0, i8* %1, i32 %3)
ret i8* %4
}
/* Variables and functions */
char const *str_ltrim(int /*<<< orphan*/, char const *);
int /*<<< orphan*/ str_rtrim(char *, char const *);
const char *str_trim(char *str, const char *trimchr) {
  return str_ltrim(str_rtrim(str, trimchr), trimchr);
}


x86 assembly (clang, -O0):
<str_trim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <str_rtrim@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1040 <str_ltrim@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_trim>:
push   %rbx
mov    %rsi,%rbx
call   1030 <str_rtrim@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <str_ltrim@plt>

LLVM IR (-O0):
define i8* @str_trim(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @str_rtrim(i8* %5, i8* %6)
%8 = load i8*, i8** %4
%9 = call i8* @str_ltrim(i32 %7, i8* %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @str_trim(i8* %0, i8* %1) {
%3 = tail call i32 @str_rtrim(i8* %0, i8* %1)
%4 = tail call i8* @str_ltrim(i32 %3, i8* %1)
ret i8* %4
}
/* Variables and functions */
scalar_t__ CheckEnd();
int ReadString(char *ptr, int ofs, char **val, size_t *size) {
  if (CheckEnd()) {
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<ReadString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    $0x0,%al
call   1030 <CheckEnd@plt>
cmp    $0x0,%rax
je     113d <ReadString+0x2d>
jmp    1144 <ReadString+0x34>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ReadString(i8* nocapture readnone %0, i32 %1, i8** nocapture readnone %2, i64* nocapture readnone %3) {
%5 = tail call i64 (...) @CheckEnd()
ret i32 0
}
char cf2i(char c) {
  switch (c) {
  case '-':
    return 0;
  case '.':
    return 0;
  case '0':
    return 1;
  case '1':
    return 2;
  case '2':
    return 3;
  case '3':
    return 4;
  case '4':
    return 5;
  case '5':
    return 6;
  case '6':
    return 7;
  case '7':
    return 8;
  case '8':
    return 9;
  case '9':
    return 10;
  }
  return 0;
}


x86 assembly (clang, -O0):
<cf2i>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
add    $0xffffffd3,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0xc,%eax
ja     11a0 <cf2i+0xa0>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x0,-0x1(%rbp)
jmp    11a4 <cf2i+0xa4>
movb   $0x0,-0x1(%rbp)
jmp    11a4 <cf2i+0xa4>
movb   $0x1,-0x1(%rbp)
jmp    11a4 <cf2i+0xa4>
movb   $0x2,-0x1(%rbp)
jmp    11a4 <cf2i+0xa4>
movb   $0x3,-0x1(%rbp)
jmp    11a4 <cf2i+0xa4>
movb   $0x4,-0x1(%rbp)
jmp    11a4 <cf2i+0xa4>
movb   $0x5,-0x1(%rbp)
jmp    11a4 <cf2i+0xa4>
movb   $0x6,-0x1(%rbp)
jmp    11a4 <cf2i+0xa4>
movb   $0x7,-0x1(%rbp)
jmp    11a4 <cf2i+0xa4>
movb   $0x8,-0x1(%rbp)
jmp    11a4 <cf2i+0xa4>
movb   $0x9,-0x1(%rbp)
jmp    11a4 <cf2i+0xa4>
movb   $0xa,-0x1(%rbp)
jmp    11a4 <cf2i+0xa4>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cf2i>:
add    $0xffffffd0,%edi
lea    0x1(%rdi),%eax
xor    %ecx,%ecx
cmp    $0xa,%edi
movzbl %al,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @cf2i(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %18 [
i32 45, label %6
i32 46, label %7
i32 48, label %8
i32 49, label %9
i32 50, label %10
i32 51, label %11
i32 52, label %12
i32 53, label %13
i32 54, label %14
i32 55, label %15
i32 56, label %16
i32 57, label %17
]
6: ; preds = %1
store i8 0, i8* %2
br label %19
7: ; preds = %1
store i8 0, i8* %2
br label %19
8: ; preds = %1
store i8 1, i8* %2
br label %19
9: ; preds = %1
store i8 2, i8* %2
br label %19
10: ; preds = %1
store i8 3, i8* %2
br label %19
11: ; preds = %1
store i8 4, i8* %2
br label %19
12: ; preds = %1
store i8 5, i8* %2
br label %19
13: ; preds = %1
store i8 6, i8* %2
br label %19
14: ; preds = %1
store i8 7, i8* %2
br label %19
15: ; preds = %1
store i8 8, i8* %2
br label %19
16: ; preds = %1
store i8 9, i8* %2
br label %19
17: ; preds = %1
store i8 10, i8* %2
br label %19
18: ; preds = %1
store i8 0, i8* %2
br label %19
19: ; preds = %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6
%20 = load i8, i8* %2
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @cf2i(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -48
%4 = icmp ult i32 %3, 10
%5 = trunc i32 %3 to i8
%6 = add i8 %5, 1
%7 = select i1 %4, i8 %6, i8 0
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ key_tasklist_scroll(unsigned char);
void key_tasklist_scroll_up(void) { key_tasklist_scroll('u'); }


x86 assembly (clang, -O0):
<key_tasklist_scroll_up>:
push   %rbp
mov    %rsp,%rbp
mov    $0x75,%edi
call   1030 <key_tasklist_scroll@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<key_tasklist_scroll_up>:
mov    $0x75,%edi
jmp    1030 <key_tasklist_scroll@plt>

LLVM IR (-O0):
define void @key_tasklist_scroll_up() {
%1 = call i32 @key_tasklist_scroll(i8 zeroext 117)
ret void
}

LLVM IR (-O2):
define void @key_tasklist_scroll_up() {
%1 = tail call i32 @key_tasklist_scroll(i8 zeroext 117)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cgsynth(char *);
void cgsynor(void) { cgsynth("orl"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"orl\00"
define void @cgsynor() {
%1 = call i32 @cgsynth(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"orl\00"
define void @cgsynor() {
%1 = tail call i32 @cgsynth(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}