xunge/DecIR huggingface dataset:
void int_swap(int *a, int *b) {
  int temp;
  temp = *a;
  *a = *b;
  *b = temp;
}


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

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

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

LLVM IR (-O2):
define void @int_swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int *, int);
scalar_t__ malloc(int);
int main() {
  int *p = (int *)malloc(5 * sizeof(int));
  int i = 0;
  f(p, 5);
  for (i = 0; i < 5; i++)
    p[i] = i;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x5,%esi
call   1030 <f@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    117f <main+0x5f>
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1159 <main+0x39>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x5,%esi
call   1030 <f@plt>
movaps 0xebe(%rip),%xmm0
movups %xmm0,(%rbx)
movl   $0x4,0x10(%rbx)
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 20)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @f(i32* %2, i32 5)
%4 = inttoptr i64 %1 to <4 x i32>*
store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, <4 x i32>* %4
%5 = getelementptr inbounds i32, i32* %2, i64 4
store i32 4, i32* %5
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void myFunction(int a) { printf("%d\n", a); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @myFunction(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int Endian_isBigEndian() {
  union {
    uint32_t i;
    char c[4];
  } bint = {0x01020304};
  return bint.c[0] == 1;
}


x86 assembly (clang, -O0):
<Endian_isBigEndian>:
push   %rbp
mov    %rsp,%rbp
mov    0xef6(%rip),%eax
mov    %eax,-0x8(%rbp)
movsbl -0x8(%rbp),%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { i32 }
@__const.Endian_isBigEndian.bint = %union.anon { i32 16909060 }
define i32 @Endian_isBigEndian() {
%1 = alloca %union.anon
%2 = bitcast %union.anon* %1 to i8*
%3 = bitcast %union.anon* %1 to [4 x i8]*
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @Endian_isBigEndian() {
ret i32 0
}
double dabs2(double x) { return (x) * (x); }


x86 assembly (clang, -O0):
<dabs2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dabs2>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @dabs2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @dabs2(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int size_uint64(int /*<<< orphan*/);
int /*<<< orphan*/ zigzag64(int /*<<< orphan*/);
unsigned size_sint64(int64_t v) { return size_uint64(zigzag64(v)); }


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

x86 assembly (clang, -O2):
<size_sint64>:
push   %rax
call   1040 <zigzag64@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <size_uint64@plt>

LLVM IR (-O0):
define i32 @size_sint64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @zigzag64(i32 %3)
%5 = call i32 @size_uint64(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @size_sint64(i32 %0) {
%2 = tail call i32 @zigzag64(i32 %0)
%3 = tail call i32 @size_uint64(i32 %2)
ret i32 %3
}
/* Variables and functions */
int tst_tg_entry(int, char **);
int main(int argc, char **argv) { return tst_tg_entry(argc, argv); }


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <tst_tg_entry@plt>

LLVM IR (-O0):
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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @tst_tg_entry(i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @tst_tg_entry(i32 %0, i8** %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ __u64;

/* Variables and functions */
int hea_test_u64_bit(int /*<<< orphan*/ const, int);
int hea_cq_aer_reserv_facility_access_err_check(const __u64 *aer) {
  return hea_test_u64_bit(*aer, 36);
}


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

x86 assembly (clang, -O2):
<hea_cq_aer_reserv_facility_access_err_check>:
mov    (%rdi),%edi
mov    $0x24,%esi
jmp    1030 <hea_test_u64_bit@plt>

LLVM IR (-O0):
define i32 @hea_cq_aer_reserv_facility_access_err_check(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 @hea_test_u64_bit(i32 %4, i32 36)
ret i32 %5
}

LLVM IR (-O2):
define i32 @hea_cq_aer_reserv_facility_access_err_check(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @hea_test_u64_bit(i32 %2, i32 36)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *, char const *);
int /*<<< orphan*/ exit(int);
scalar_t__ unlink(char const *);
void cleanup(const char *filename) {
  if (unlink(filename))
    err(2, "could not delete: %s", filename);
  exit(2);
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <unlink@plt>
cmp    $0x0,%rax
je     1164 <cleanup+0x34>
mov    -0x8(%rbp),%rdx
mov    $0x2,%edi
lea    0xea1(%rip),%rsi
call   1040 <err@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<cleanup>:
push   %rbx
mov    %rdi,%rbx
call   1030 <unlink@plt>
test   %rax,%rax
je     1152 <cleanup+0x22>
lea    0xebb(%rip),%rsi
mov    $0x2,%edi
mov    %rbx,%rdx
call   1040 <err@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"could not delete: %s\00"
define void @cleanup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @unlink(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @err(i32 2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %6, %1
%10 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@.str = [21 x i8] c"could not delete: %s\00"
define void @cleanup(i8* %0) {
%2 = tail call i64 @unlink(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @err(i32 2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *, char *, int /*<<< orphan*/);
void int_19(void) { panic("SIMD Floating-Point", "#XF", 0); }


x86 assembly (clang, -O0):
<int_19>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef2(%rip),%rsi
xor    %edx,%edx
call   1030 <panic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_19>:
lea    0xee9(%rip),%rdi
lea    0xef6(%rip),%rsi
xor    %edx,%edx
jmp    1030 <panic@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"SIMD Floating-Point\00"
@.str.1 = [4 x i8] c"#XF\00"
define void @int_19() {
%1 = call i32 @panic(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"SIMD Floating-Point\00"
@.str.1 = [4 x i8] c"#XF\00"
define void @int_19() {
%1 = tail call i32 @panic(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float test_binary_search();
float test_linear_search();
int main() {
  float linear_success;
  float binary_success;
  linear_success = test_linear_search();
  binary_success = test_binary_search();
  printf("Linear search success rate: %.2f\n", linear_success);
  printf("Binary search success rate: %.2f\n", binary_success);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_linear_search@plt>
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1040 <test_binary_search@plt>
movss  %xmm0,0x4(%rsp)
lea    0xeaf(%rip),%rdi
movss  (%rsp),%xmm0
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
movss  0x4(%rsp),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Linear search success rate: %.2f\0A\00"
@.str.1 = [34 x i8] c"Binary search success rate: %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call float (...) @test_linear_search()
store float %4, float* %2
%5 = call float (...) @test_binary_search()
store float %5, float* %3
%6 = load float, float* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), float %6)
%8 = load float, float* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), float %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"Linear search success rate: %.2f\0A\00"
@.str.1 = [34 x i8] c"Binary search success rate: %.2f\0A\00"
define i32 @main() {
%1 = tail call float (...) @test_linear_search()
%2 = tail call float (...) @test_binary_search()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), float %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), float %2)
ret i32 0
}
int test_imm_15int16_mem(short *val) {
  return ((*val) & (0x15 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_15int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 21
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct ioctl_entry {
  int dummy;
};
struct ioctl_args {
  int dummy;
};

/* Variables and functions */
int do_set_ioctl_int(struct ioctl_args *, struct ioctl_entry *);
int set_trigger(struct ioctl_args *args, struct ioctl_entry *entry) {
  return do_set_ioctl_int(args, entry);
}


x86 assembly (clang, -O0):
<set_trigger>:
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 <do_set_ioctl_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_trigger>:
jmp    1030 <do_set_ioctl_int@plt>

LLVM IR (-O0):
%struct.ioctl_args = type { i32 }
%struct.ioctl_entry = type { i32 }
define i32 @set_trigger(%struct.ioctl_args* %0, %struct.ioctl_entry* %1) {
%3 = alloca %struct.ioctl_args*
%4 = alloca %struct.ioctl_entry*
store %struct.ioctl_args* %0, %struct.ioctl_args** %3
store %struct.ioctl_entry* %1, %struct.ioctl_entry** %4
%5 = load %struct.ioctl_args*, %struct.ioctl_args** %3
%6 = load %struct.ioctl_entry*, %struct.ioctl_entry** %4
%7 = call i32 @do_set_ioctl_int(%struct.ioctl_args* %5, %struct.ioctl_entry* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.ioctl_args = type { i32 }
%struct.ioctl_entry = type { i32 }
define i32 @set_trigger(%struct.ioctl_args* %0, %struct.ioctl_entry* %1) {
%3 = tail call i32 @do_set_ioctl_int(%struct.ioctl_args* %0, %struct.ioctl_entry* %1)
ret i32 %3
}
/* Variables and functions */
size_t levenshtein_n(char const *, size_t const, char const *, size_t const);
size_t strlen(char const *);
size_t levenshtein(const char *a, const char *b) {
  const size_t length = strlen(a);
  const size_t bLength = strlen(b);
  return levenshtein_n(a, length, b, bLength);
}


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

x86 assembly (clang, -O2):
<levenshtein>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %rax,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <levenshtein_n@plt>

LLVM IR (-O0):
define i64 @levenshtein(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
store i64 %8, i64* %5
%9 = load i8*, i8** %4
%10 = call i64 @strlen(i8* %9)
store i64 %10, i64* %6
%11 = load i8*, i8** %3
%12 = load i64, i64* %5
%13 = load i8*, i8** %4
%14 = load i64, i64* %6
%15 = call i64 @levenshtein_n(i8* %11, i64 %12, i8* %13, i64 %14)
ret i64 %15
}

LLVM IR (-O2):
define i64 @levenshtein(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = tail call i64 @levenshtein_n(i8* %0, i64 %3, i8* %1, i64 %4)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ lower(char *);
int /*<<< orphan*/ printf(char *, char *);
main() {
  char str[] = "Hey there Man!";
  lower(str);
  printf("%s\n", str);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xf(%rbp)
mov    0xecf(%rip),%eax
mov    %eax,-0x7(%rbp)
mov    0xec9(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    0xec1(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0xf(%rbp),%rdi
call   1040 <lower@plt>
lea    -0xf(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x216e614d206572,%rax
mov    %rax,0x7(%rsp)
movabs $0x7265687420796548,%rax
68 65 72
mov    %rax,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <lower@plt>
lea    0xebb(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [15 x i8] c"Hey there Man!\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [15 x i8]
%2 = bitcast [15 x i8]* %1 to i8*
%3 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%4 = call i32 @lower(i8* %3)
%5 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [15 x i8] c"Hey there Man!\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [15 x i8]
%2 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%3 = call i32 @lower(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int);
void ironlake_debug_fdi_rx_misc(char *result, int len, int reg, uint32_t val,
                                uint32_t devid) {
  snprintf(result, len, "FDI Delay %d", val & ((1 << 13) - 1));
}


x86 assembly (clang, -O0):
<ironlake_debug_fdi_rx_misc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%ecx
and    $0x1fff,%ecx
lea    0xec0(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ironlake_debug_fdi_rx_misc>:
and    $0x1fff,%ecx
lea    0xee3(%rip),%rdx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"FDI Delay %d\00"
define void @ironlake_debug_fdi_rx_misc(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %9
%14 = and i32 %13, 8191
%15 = call i32 @snprintf(i8* %11, i32 %12, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"FDI Delay %d\00"
define void @ironlake_debug_fdi_rx_misc(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = and i32 %3, 8191
%7 = tail call i32 @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}
/* Type definitions */
struct mbuf {
  int dummy;
};

/* Variables and functions */
struct mbuf *mb_pool_chain_alloc(unsigned int);
struct mbuf *mb_alloc_chain(unsigned int num_mbuffs) {
  return mb_pool_chain_alloc(num_mbuffs);
}


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

x86 assembly (clang, -O2):
<mb_alloc_chain>:
jmp    1030 <mb_pool_chain_alloc@plt>

LLVM IR (-O0):
%struct.mbuf = type { i32 }
define %struct.mbuf* @mb_alloc_chain(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call %struct.mbuf* @mb_pool_chain_alloc(i32 %3)
ret %struct.mbuf* %4
}

LLVM IR (-O2):
%struct.mbuf = type { i32 }
define %struct.mbuf* @mb_alloc_chain(i32 %0) {
%2 = tail call %struct.mbuf* @mb_pool_chain_alloc(i32 %0)
ret %struct.mbuf* %2
}
int s3d_strchrcount(const char *s, int c) {
  int i = 0;
  const char *ptr = s;
  do {
    if (*ptr == c) {
      ++i;
    }
  } while (*(++ptr) != 0);
  return i;
}


x86 assembly (clang, -O0):
<s3d_strchrcount>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    1133 <s3d_strchrcount+0x33>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1138 <s3d_strchrcount+0x38>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    111a <s3d_strchrcount+0x1a>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<s3d_strchrcount>:
mov    (%rdi),%cl
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movsbl %cl,%ecx
xor    %edx,%edx
cmp    %esi,%ecx
sete   %dl
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <s3d_strchrcount+0x10>
ret

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

LLVM IR (-O2):
define i32 @s3d_strchrcount(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
br label %4
4: ; preds = %4, %2
%5 = phi i8 [ %3, %2 ], [ %13, %4 ]
%6 = phi i32 [ 0, %2 ], [ %11, %4 ]
%7 = phi i8* [ %0, %2 ], [ %12, %4 ]
%8 = sext i8 %5 to i32
%9 = icmp eq i32 %8, %1
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %6, %10
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4
ret i32 %11
}
/* Type definitions */
typedef char uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void ewf_sectors_chunk_fprint(FILE *stream, uint8_t *sectors_chunk) {
  if ((stream != NULL) && (sectors_chunk != NULL)) {
    fprintf(stream, "%s", sectors_chunk);
  }
}


x86 assembly (clang, -O0):
<ewf_sectors_chunk_fprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114a <ewf_sectors_chunk_fprint+0x3a>
cmpq   $0x0,-0x10(%rbp)
je     114a <ewf_sectors_chunk_fprint+0x3a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xebb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ewf_sectors_chunk_fprint>:
test   %rdi,%rdi
je     1128 <ewf_sectors_chunk_fprint+0x18>
test   %rsi,%rsi
je     1128 <ewf_sectors_chunk_fprint+0x18>
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <fputs@plt>
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @ewf_sectors_chunk_fprint(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 = icmp ne i32* %5, null
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32*, i32** %3
%12 = load i8*, i8** %4
%13 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %10, %7, %2
ret void
}

LLVM IR (-O2):
define void @ewf_sectors_chunk_fprint(i32* %0, i8* %1) {
%3 = icmp ne i32* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @fputs(i8* %1, i32* %0)
br label %8
8: ; preds = %6, %2
ret void
}
/* Type definitions */
struct suffix_mult {
  int dummy;
};

/* Variables and functions */
long xstrtoll_range_sfx(char const *, int, long, long,
                        struct suffix_mult const *);
__attribute__((always_)) long xstrtol_range_sfx(const char *str, int b, long l,
                                                long u,
                                                const struct suffix_mult *sfx) {
  return xstrtoll_range_sfx(str, b, l, u, sfx);
}


x86 assembly (clang, -O0):
<xstrtol_range_sfx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <xstrtoll_range_sfx@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrtol_range_sfx>:
jmp    1030 <xstrtoll_range_sfx@plt>

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

LLVM IR (-O2):
%struct.suffix_mult = type { i32 }
define i64 @xstrtol_range_sfx(i8* %0, i32 %1, i64 %2, i64 %3, %struct.suffix_mult* %4) {
%6 = tail call i64 @xstrtoll_range_sfx(i8* %0, i32 %1, i64 %2, i64 %3, %struct.suffix_mult* %4)
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *showParameters_il() {
  static char text[200];
  sprintf(text, "pfdThreshold = %u", 100);
  return text;
}


x86 assembly (clang, -O0):
<showParameters_il>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rdi
lea    0xede(%rip),%rsi
mov    $0x64,%edx
call   1030 <sprintf@plt>
lea    0x2f0d(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<showParameters_il>:
push   %rbx
lea    0x2f28(%rip),%rbx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
mov    $0x64,%edx
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@showParameters_il.text = internal global [200 x i8] zeroinitializer
@.str = [18 x i8] c"pfdThreshold = %u\00"
define i8* @showParameters_il() {
%1 = call i32 @sprintf(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @showParameters_il.text, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 100)
ret i8* getelementptr inbounds ([200 x i8], [200 x i8]* @showParameters_il.text, i64 0, i64 0)
}

LLVM IR (-O2):
@showParameters_il.text = internal global [200 x i8] zeroinitializer
@.str = [18 x i8] c"pfdThreshold = %u\00"
define i8* @showParameters_il() {
%1 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([200 x i8], [200 x i8]* @showParameters_il.text, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 100)
ret i8* getelementptr inbounds ([200 x i8], [200 x i8]* @showParameters_il.text, i64 0, i64 0)
}
void RTMemCacheAlloc(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemCacheAlloc() {
ret void
}
char _f_toupper(char ch) {
  if ((ch >= 'a') && (ch <= 'z')) {
    return (char)(ch - 'a' + 'A');
  }
  return ch;
}


x86 assembly (clang, -O0):
<_f_toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x61,%eax
jl     1136 <_f_toupper+0x36>
movsbl -0x2(%rbp),%eax
cmp    $0x7a,%eax
jg     1136 <_f_toupper+0x36>
movsbl -0x2(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %al,-0x1(%rbp)
jmp    113c <_f_toupper+0x3c>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_f_toupper>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @_f_toupper(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
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 97
%15 = add nsw i32 %14, 65
%16 = trunc i32 %15 to i8
store i8 %16, i8* %2
br label %19
17: ; preds = %7, %1
%18 = load i8, i8* %3
store i8 %18, i8* %2
br label %19
19: ; preds = %17, %11
%20 = load i8, i8* %2
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @_f_toupper(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void SysTickDisable(void) {
  (*((volatile uint32_t *)(0xE000E010))) &= ~(0x00000001);
}


x86 assembly (clang, -O0):
<SysTickDisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000e010,%eax
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    $0xe000e010,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysTickDisable>:
mov    $0xe000e010,%eax
andl   $0xfffffffe,(%rax)
ret

LLVM IR (-O0):
define void @SysTickDisable() {
%1 = load volatile i32, i32* inttoptr (i64 3758153744 to i32*)
%2 = and i32 %1, -2
store volatile i32 %2, i32* inttoptr (i64 3758153744 to i32*)
ret void
}

LLVM IR (-O2):
define void @SysTickDisable() {
%1 = load volatile i32, i32* inttoptr (i64 3758153744 to i32*)
%2 = and i32 %1, -2
store volatile i32 %2, i32* inttoptr (i64 3758153744 to i32*)
ret void
}
/* Variables and functions */
scalar_t__ strncasecmp(char *, char *, int);
void strncasecmp_diff_length_4() {
  char *x = "abcde";
  char *y = "aBc";
  if (strncasecmp(x, y, 3) != 0)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strncasecmp_diff_length_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xedc(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
cmp    $0x0,%rax
je     114a <strncasecmp_diff_length_4+0x3a>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @strncasecmp_diff_length_4() {
ret void
}
/* Variables and functions */
int __name(char *);
int rt_name(char *name) { return __name(name); }


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

x86 assembly (clang, -O2):
<rt_name>:
jmp    1030 <__name@plt>

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

LLVM IR (-O2):
define i32 @rt_name(i8* %0) {
%2 = tail call i32 @__name(i8* %0)
ret i32 %2
}
int test_imm_3Auint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x3A << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_3Auint64_midword_reg>:
test   $0x3a0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_3Auint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 58
%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_3Auint64_midword_reg(i64 %0) {
%2 = and i64 %0, 3801088
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
char ordinaryd(double x) { return 1 / x != 0 && x == x; }


x86 assembly (clang, -O0):
<ordinaryd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jne    1133 <ordinaryd+0x33>
jp     1133 <ordinaryd+0x33>
jmp    1148 <ordinaryd+0x48>
movsd  -0x8(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ordinaryd>:
movsd  0xef8(%rip),%xmm1
divsd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
setp   %al
setne  %cl
or     %al,%cl
ucomisd %xmm0,%xmm0
setnp  %al
and    %cl,%al
ret

LLVM IR (-O0):
define signext i8 @ordinaryd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double 1.000000e+00, %3
%5 = fcmp une double %4, 0.000000e+00
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load double, double* %2
%8 = load double, double* %2
%9 = fcmp oeq double %7, %8
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
%13 = trunc i32 %12 to i8
ret i8 %13
}

LLVM IR (-O2):
define signext i8 @ordinaryd(double %0) {
%2 = fdiv double 1.000000e+00, %0
%3 = fcmp une double %2, 0.000000e+00
%4 = fcmp ord double %0, 0.000000e+00
%5 = and i1 %4, %3
%6 = zext i1 %5 to i8
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  unsigned int a = 0x1234;
  if ((unsigned int)(((unsigned char *)&a)[0]) == 0x34) {
    printf("little-endian\n");
    return 0;
  } else {
    printf("big-endian\n");
    return 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1234,-0x8(%rbp)
movzbl -0x8(%rbp),%eax
cmp    $0x34,%eax
jne    114b <main+0x3b>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    115e <main+0x4e>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"little-endian\0A\00"
@.str.1 = [12 x i8] c"big-endian\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 4660, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp eq i32 %6, 52
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %1
br label %12
12: ; preds = %10, %8
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@str = [14 x i8] c"little-endian\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int sv_get_song_length_lines(int);
int vox_get_song_length_lines(int slot) {
  return sv_get_song_length_lines(slot);
}


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

x86 assembly (clang, -O2):
<vox_get_song_length_lines>:
jmp    1030 <sv_get_song_length_lines@plt>

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

LLVM IR (-O2):
define i32 @vox_get_song_length_lines(i32 %0) {
%2 = tail call i32 @sv_get_song_length_lines(i32 %0)
ret i32 %2
}
void rop3_108_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & T;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_108_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_108_1_0>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_108_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = and i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %5
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = xor i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = xor i32 %25, -1
%27 = and i32 %23, %26
%28 = load i8*, i8** %4
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = and i32 %30, %32
%34 = or i32 %27, %33
%35 = trunc i32 %34 to i8
%36 = load i8*, i8** %4
store i8 %35, i8* %36
ret void
}

LLVM IR (-O2):
define void @rop3_108_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %5, %4
store i8 %6, i8* %0
ret void
}
void test5_BlinkMilli_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test5_BlinkMilli_targetInit__I() {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_hex(uint8_t bytes[], int bytes_len) {
  for (int i = 0; i < bytes_len; i++) {
    printf("%02x", bytes[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <print_hex+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_hex+0x16>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hex>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_hex+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_hex+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%02x\00"
define void @print_hex(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
void foo155(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo155(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_Error(int, char *);
int check_value(float value, float min, float max) {
  if (value < min || value > max) {
    set_Error(3, "Value out of range");
    return 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<check_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
ja     1149 <check_value+0x39>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1166 <check_value+0x56>
mov    $0x3,%edi
lea    0xeab(%rip),%rsi
call   1030 <set_Error@plt>
movl   $0x1,-0x4(%rbp)
jmp    116d <check_value+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_value>:
ucomiss %xmm0,%xmm1
ja     111d <check_value+0xd>
xor    %eax,%eax
ucomiss %xmm2,%xmm0
ja     111d <check_value+0xd>
ret
push   %rax
lea    0xedb(%rip),%rsi
mov    $0x3,%edi
call   1030 <set_Error@plt>
mov    $0x1,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Value out of range\00"
define i32 @check_value(float %0, float %1, float %2) {
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fcmp olt float %8, %9
br i1 %10, label %15, label %11
11: ; preds = %3
%12 = load float, float* %5
%13 = load float, float* %7
%14 = fcmp ogt float %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11, %3
%16 = call i32 @set_Error(i32 3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %4
br label %18
17: ; preds = %11
store i32 0, i32* %4
br label %18
18: ; preds = %17, %15
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
@.str = [19 x i8] c"Value out of range\00"
define i32 @check_value(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = or i1 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @set_Error(i32 3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %3, %7
%10 = phi i32 [ 1, %7 ], [ 0, %3 ]
ret i32 %10
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRCF_get(void) { return U_WMRCORENONE_get("U_WMRCF"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRCF\00"
define i32 @U_WMRCF_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void ff_hevc_put_hevc_pel_pixels32_8_avx2() {}


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

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

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

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