xunge/DecIR huggingface dataset:
/* Variables and functions */
double sin(double);
double d_sin(double *x) { return (sin(*x)); }


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

x86 assembly (clang, -O2):
<d_sin>:
movsd  (%rdi),%xmm0
jmp    1030 <sin@plt>

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

LLVM IR (-O2):
define double @d_sin(double* nocapture %0) {
%2 = load double, double* %0
%3 = tail call double @sin(double %2)
ret double %3
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
struct SN_env *SN_create_env(int, int, int /*<<< orphan*/);
extern struct SN_env *danish_ISO_8859_1_create_env(void) {
  return SN_create_env(1, 2, 0);
}


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

x86 assembly (clang, -O2):
<danish_ISO_8859_1_create_env>:
mov    $0x1,%edi
mov    $0x2,%esi
xor    %edx,%edx
jmp    1030 <SN_create_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define %struct.SN_env* @danish_ISO_8859_1_create_env() {
%1 = call %struct.SN_env* @SN_create_env(i32 1, i32 2, i32 0)
ret %struct.SN_env* %1
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define %struct.SN_env* @danish_ISO_8859_1_create_env() {
%1 = tail call %struct.SN_env* @SN_create_env(i32 1, i32 2, i32 0)
ret %struct.SN_env* %1
}
/* Variables and functions */
int test();
int main(void) {
  int ret;
  ret = test();
  return ret;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
void *MAP_FAILED;
void *mmap(void *, size_t, int, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ t_error(char *);
void *xmmap(void *addr, size_t len, int prot, int flags, int fd, off_t off) {
  void *ptr;
  ptr = mmap(addr, len, prot, flags, fd, off);
  if (ptr == MAP_FAILED) {
    t_error("failed to map file into memory");
  }
  return ptr;
}


x86 assembly (clang, -O0):
<xmmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
call   1030 <mmap@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    0x2e78(%rip),%rcx
cmp    (%rcx),%rax
jne    117d <xmmap+0x5d>
lea    0xe88(%rip),%rdi
call   1040 <t_error@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmmap>:
push   %rbx
call   1030 <mmap@plt>
mov    %rax,%rbx
mov    0x2eb0(%rip),%rax
cmp    (%rax),%rbx
jne    1141 <xmmap+0x21>
lea    0xec4(%rip),%rdi
call   1040 <t_error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@MAP_FAILED = global i8* null
@.str = [31 x i8] c"failed to map file into memory\00"
define i8* @xmmap(i8* %0, i64 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
store i8* %0, i8** %7
store i64 %1, i64* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%14 = load i8*, i8** %7
%15 = load i64, i64* %8
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = call i8* @mmap(i8* %14, i64 %15, i32 %16, i32 %17, i32 %18, i32 %19)
store i8* %20, i8** %13
%21 = load i8*, i8** %13
%22 = load i8*, i8** @MAP_FAILED
%23 = icmp eq i8* %21, %22
br i1 %23, label %24, label %26
24: ; preds = %6
%25 = call i32 @t_error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %26
26: ; preds = %24, %6
%27 = load i8*, i8** %13
ret i8* %27
}

LLVM IR (-O2):
@MAP_FAILED = global i8* null
@.str = [31 x i8] c"failed to map file into memory\00"
define i8* @xmmap(i8* %0, i64 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i8* @mmap(i8* %0, i64 %1, i32 %2, i32 %3, i32 %4, i32 %5)
%8 = load i8*, i8** @MAP_FAILED
%9 = icmp eq i8* %7, %8
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = tail call i32 @t_error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %6
ret i8* %7
}
void d2i_DISPLAYTEXT(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_DISPLAYTEXT() {
ret void
}
/* Variables and functions */
size_t strlen(char const *);
size_t default_str_buflen(const char *str) { return strlen(str) + 1; }


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

x86 assembly (clang, -O2):
<default_str_buflen>:
push   %rax
call   1030 <strlen@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @default_str_buflen(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = add i64 %4, 1
ret i64 %5
}

LLVM IR (-O2):
define i64 @default_str_buflen(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
ret i64 %3
}
void nfsd4_return_all_client_layouts(struct nfs4_client *clp) {}


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

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

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

LLVM IR (-O2):
%struct.nfs4_client = type opaque
define void @nfsd4_return_all_client_layouts(%struct.nfs4_client* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int FileExists(const char *filename) {
  FILE *fp = fopen(filename, "rb");
  if (fp) {
    fclose(fp);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<FileExists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1160 <FileExists+0x40>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1167 <FileExists+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FileExists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <FileExists+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
define i32 @FileExists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32*, i32** %4
%11 = call i32 @fclose(i32* %10)
store i32 1, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define i32 @FileExists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("Test");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"Test\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"Test\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct Array {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ DtorArray(struct Array *);
int /*<<< orphan*/ free(struct Array *);
void DestroyArray(struct Array *Array) {
  if (Array == NULL)
    return;
  DtorArray(Array);
  free(Array);
}


x86 assembly (clang, -O0):
<DestroyArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <DestroyArray+0x1c>
jmp    114e <DestroyArray+0x2e>
mov    -0x8(%rbp),%rdi
call   1040 <DtorArray@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DestroyArray>:
test   %rdi,%rdi
je     1137 <DestroyArray+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <DtorArray@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.Array = type { i32 }
define void @DestroyArray(%struct.Array* %0) {
%2 = alloca %struct.Array*
store %struct.Array* %0, %struct.Array** %2
%3 = load %struct.Array*, %struct.Array** %2
%4 = icmp eq %struct.Array* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load %struct.Array*, %struct.Array** %2
%8 = call i32 @DtorArray(%struct.Array* %7)
%9 = load %struct.Array*, %struct.Array** %2
%10 = call i32 @free(%struct.Array* %9)
br label %11
11: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.Array = type { i32 }
define void @DestroyArray(%struct.Array* %0) {
%2 = icmp eq %struct.Array* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @DtorArray(%struct.Array* %0)
%5 = tail call i32 @free(%struct.Array* %0)
br label %6
6: ; preds = %1, %3
ret void
}
void rdtsc(unsigned int *low, unsigned int *high) {
  __asm__ __volatile__("rdtsc" : "=a"(*low), "=d"(*high));
}


x86 assembly (clang, -O0):
<rdtsc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
rdtsc
mov    %eax,%esi
mov    -0x18(%rbp),%rax
mov    %esi,(%rcx)
mov    %edx,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @rdtsc(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, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%8 = extractvalue { i32, i32 } %7, 0
%9 = extractvalue { i32, i32 } %7, 1
store i32 %8, i32* %5
store i32 %9, i32* %6
ret void
}

LLVM IR (-O2):
define void @rdtsc(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
%3 = tail call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%4 = extractvalue { i32, i32 } %3, 0
%5 = extractvalue { i32, i32 } %3, 1
store i32 %4, i32* %0
store i32 %5, i32* %1
ret void
}
int Calc_IsAllWhiteSpace(char *pInput) {
  for (; *pInput == ' '; pInput++) {
  }
  return *pInput == 0 ? 1 : 0;
}


x86 assembly (clang, -O0):
<Calc_IsAllWhiteSpace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    112e <Calc_IsAllWhiteSpace+0x2e>
jmp    111d <Calc_IsAllWhiteSpace+0x1d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <Calc_IsAllWhiteSpace+0x8>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Calc_IsAllWhiteSpace>:
movzbl (%rdi),%ecx
add    $0x1,%rdi
cmp    $0x20,%cl
je     1100 <Calc_IsAllWhiteSpace>
xor    %eax,%eax
test   %cl,%cl
sete   %al
ret

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

LLVM IR (-O2):
define i32 @Calc_IsAllWhiteSpace(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 32
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2
%8 = icmp eq i8 %4, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int gcd(int, int);
int lcm(int a, int b) { return (a == 0 || b == 0) ? 0 : (a * b) / gcd(a, b); }


x86 assembly (clang, -O0):
<lcm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1132 <lcm+0x22>
cmpl   $0x0,-0x8(%rbp)
jne    113c <lcm+0x2c>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    115c <lcm+0x4c>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <gcd@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm>:
xor    %eax,%eax
test   %edi,%edi
je     112d <lcm+0x1d>
test   %esi,%esi
je     112d <lcm+0x1d>
push   %rbx
mov    %esi,%ebx
imul   %edi,%ebx
call   1030 <gcd@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
pop    %rbx
ret

LLVM IR (-O0):
define i32 @lcm(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7, %2
br label %19
11: ; preds = %7
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = mul nsw i32 %12, %13
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = call i32 @gcd(i32 %15, i32 %16)
%18 = sdiv i32 %14, %17
br label %19
19: ; preds = %11, %10
%20 = phi i32 [ 0, %10 ], [ %18, %11 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @lcm(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = icmp eq i32 %1, 0
%5 = or i1 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = mul nsw i32 %1, %0
%8 = tail call i32 @gcd(i32 %0, i32 %1)
%9 = sdiv i32 %7, %8
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %9, %6 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int *set42(int *);
void nodpd() {
  int w, *z;
  z = set42(&w);
}


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

x86 assembly (clang, -O2):
<nodpd>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <set42@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @nodpd() {
%1 = alloca i32
%2 = alloca i32*
%3 = call i32* @set42(i32* %1)
store i32* %3, i32** %2
ret void
}

LLVM IR (-O2):
define void @nodpd() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32* @set42(i32* %1)
ret void
}
int test_imm_98int16_reg(short val) {
  return ((val) & (0x98 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_98int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x98,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_98int16_reg>:
test   $0x98,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_98int16_reg(i16 signext %0) {
%2 = and i16 %0, 152
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void logMessage(const char *name, unsigned int value, const char *unit) {
  ;
  char buf[33];
  sprintf(buf, "%u", value);
  logMessage(name, buf, unit);
  ;
  ;
}


x86 assembly (clang, -O0):
<logMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xebf(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rax
mov    %eax,%esi
mov    -0x18(%rbp),%rdx
call   1030 <logMessage@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logMessage>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %rdx,%r14
mov    %esi,%edx
mov    %rdi,%rbx
lea    0xec8(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %r15d,%esi
mov    %r14,%rdx
call   1030 <logMessage@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
define void @logMessage(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca [33 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [33 x i8], [33 x i8]* %7, i64 0, i64 0
%9 = load i32, i32* %5
%10 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i8*, i8** %4
%12 = getelementptr inbounds [33 x i8], [33 x i8]* %7, i64 0, i64 0
%13 = ptrtoint i8* %12 to i32
%14 = load i8*, i8** %6
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
define void @logMessage(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
%4 = alloca [33 x i8]
%5 = getelementptr inbounds [33 x i8], [33 x i8]* %4, i64 0, i64 0
%6 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%7 = ptrtoint [33 x i8]* %4 to i64
%8 = trunc i64 %7 to i32
ret void
}
/* Variables and functions */
int ccache_init_defconfig(int);
scalar_t__ ccache_read_config(char const *);
int ccache_init_config(const char *configfile) {
  ccache_init_defconfig(1);
  if (configfile) {
    if (0 > ccache_read_config(configfile)) {
      return -1;
    }
  }
  return ccache_init_defconfig(0);
}


x86 assembly (clang, -O0):
<ccache_init_config>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x1,%edi
call   1030 <ccache_init_defconfig@plt>
cmpq   $0x0,-0x10(%rbp)
je     1169 <ccache_init_config+0x49>
mov    -0x10(%rbp),%rdi
call   1040 <ccache_read_config@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jle    1164 <ccache_init_config+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <ccache_init_config+0x53>
jmp    1169 <ccache_init_config+0x49>
xor    %edi,%edi
call   1030 <ccache_init_defconfig@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccache_init_config>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%edi
call   1030 <ccache_init_defconfig@plt>
test   %rbx,%rbx
je     1140 <ccache_init_config+0x20>
mov    %rbx,%rdi
call   1040 <ccache_read_config@plt>
test   %rax,%rax
js     1148 <ccache_init_config+0x28>
xor    %edi,%edi
pop    %rbx
jmp    1030 <ccache_init_defconfig@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ccache_init_config(i8* %0) {
%2 = tail call i32 @ccache_init_defconfig(i32 1)
%3 = icmp eq i8* %0, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i64 @ccache_read_config(i8* %0)
%6 = icmp slt i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4, %1
%8 = tail call i32 @ccache_init_defconfig(i32 0)
br label %9
9: ; preds = %4, %7
%10 = phi i32 [ %8, %7 ], [ -1, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ utest_sf_list();
int main(void) {
  utest_sf_list();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @utest_sf_list()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdout;
void pause(unsigned int duration) {
  unsigned int i = 0;
  for (i = 0; i < duration; i++) {
    fprintf(stdout, "%c", 0x80);
  }
}


x86 assembly (clang, -O0):
<pause>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    115d <pause+0x4d>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
lea    0xebb(%rip),%rsi
mov    $0x80,%edx
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <pause+0x19>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
je     1145 <pause+0x35>
mov    %edi,%ebx
mov    0x2ebe(%rip),%r15
lea    0xed7(%rip),%r14
nopl   0x0(%rax)
mov    (%r15),%edi
mov    %r14,%rsi
mov    $0x80,%edx
call   1030 <fprintf@plt>
add    $0xffffffff,%ebx
jne    1130 <pause+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [3 x i8] c"%c\00"
define void @pause(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %3
br label %4
4: ; preds = %11, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp ult i32 %5, %6
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = load i32, i32* @stdout
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 128)
br label %11
11: ; preds = %8
%12 = load i32, i32* %3
%13 = add i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [3 x i8] c"%c\00"
define void @pause(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 128)
%7 = add nuw i32 %4, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %9, label %3
9: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char const *);
void icon(const char *path, char *ic) {
  sprintf(ic, "^i(%s/.dzen2/xbm/%s.xbm)", "/home/nick", path);
}


x86 assembly (clang, -O0):
<icon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
lea    0xed1(%rip),%rsi
lea    0xee3(%rip),%rdx
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<icon>:
mov    %rsi,%rax
mov    %rdi,%rcx
lea    0xee3(%rip),%rsi
lea    0xef5(%rip),%rdx
mov    %rax,%rdi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"^i(%s/.dzen2/xbm/%s.xbm)\00"
@.str.1 = [11 x i8] c"/home/nick\00"
define void @icon(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"^i(%s/.dzen2/xbm/%s.xbm)\00"
@.str.1 = [11 x i8] c"/home/nick\00"
define void @icon(i8* %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
void avformat_query_codec() {}


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

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

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

LLVM IR (-O2):
define void @avformat_query_codec() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void pexit(const char *fCall) {
  perror(fCall);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<pexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<pexit>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @pexit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @pexit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int setconf(char const *, char const *, char *);
int setconf_boolean(const char *configfile, const char *key, int bvalue) {
  int result;
  if (bvalue)
    result = setconf(configfile, key, "TRUE");
  else
    result = setconf(configfile, key, "FALSE");
  return result;
}


x86 assembly (clang, -O0):
<setconf_boolean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1149 <setconf_boolean+0x39>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xec4(%rip),%rdx
call   1030 <setconf@plt>
mov    %eax,-0x18(%rbp)
jmp    1160 <setconf_boolean+0x50>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xead(%rip),%rdx
call   1030 <setconf@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setconf_boolean>:
test   %edx,%edx
lea    0xeec(%rip),%rax
lea    0xee0(%rip),%rdx
cmove  %rax,%rdx
jmp    1030 <setconf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"TRUE\00"
@.str.1 = [6 x i8] c"FALSE\00"
define i32 @setconf_boolean(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = call i32 @setconf(i8* %11, i8* %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 %13, i32* %7
br label %18
14: ; preds = %3
%15 = load i8*, i8** %4
%16 = load i8*, i8** %5
%17 = call i32 @setconf(i8* %15, i8* %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
store i32 %17, i32* %7
br label %18
18: ; preds = %14, %10
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
@.str = [5 x i8] c"TRUE\00"
@.str.1 = [6 x i8] c"FALSE\00"
define i32 @setconf_boolean(i8* %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = select i1 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
%6 = tail call i32 @setconf(i8* %0, i8* %1, i8* %5)
ret i32 %6
}
/* Variables and functions */
int BIT(int);
int wpa_key_mgmt_sha256(int akm) {
  return !!(akm & (BIT(8) | BIT(7) | BIT(15) | BIT(10) | BIT(16)));
}


x86 assembly (clang, -O0):
<wpa_key_mgmt_sha256>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x8,%edi
call   1030 <BIT@plt>
mov    %eax,-0x18(%rbp)
mov    $0x7,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    $0xf,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    $0xa,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0x10,%edi
call   1030 <BIT@plt>
mov    -0xc(%rbp),%ecx
mov    %eax,%edx
mov    -0x8(%rbp),%eax
or     %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_key_mgmt_sha256>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
mov    $0x8,%edi
call   1030 <BIT@plt>
mov    %eax,%ebp
mov    $0x7,%edi
call   1030 <BIT@plt>
mov    %eax,%ebx
or     %ebp,%ebx
mov    $0xf,%edi
call   1030 <BIT@plt>
mov    %eax,%r15d
mov    $0xa,%edi
call   1030 <BIT@plt>
mov    %eax,%ebp
or     %r15d,%ebp
or     %ebx,%ebp
mov    $0x10,%edi
call   1030 <BIT@plt>
or     %ebp,%eax
xor    %ecx,%ecx
test   %r14d,%eax
setne  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @wpa_key_mgmt_sha256(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @BIT(i32 8)
%5 = call i32 @BIT(i32 7)
%6 = or i32 %4, %5
%7 = call i32 @BIT(i32 15)
%8 = or i32 %6, %7
%9 = call i32 @BIT(i32 10)
%10 = or i32 %8, %9
%11 = call i32 @BIT(i32 16)
%12 = or i32 %10, %11
%13 = and i32 %3, %12
%14 = icmp ne i32 %13, 0
%15 = xor i1 %14, true
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @wpa_key_mgmt_sha256(i32 %0) {
%2 = tail call i32 @BIT(i32 8)
%3 = tail call i32 @BIT(i32 7)
%4 = or i32 %3, %2
%5 = tail call i32 @BIT(i32 15)
%6 = or i32 %4, %5
%7 = tail call i32 @BIT(i32 10)
%8 = or i32 %6, %7
%9 = tail call i32 @BIT(i32 16)
%10 = or i32 %8, %9
%11 = and i32 %10, %0
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
float dloglaplace_loc(float, float, float, float);
float laplace(float, float, float, float);
float dlaplace_loc(float x, float loc, float sc, float logsc) {
  return laplace(x, loc, sc, logsc) * dloglaplace_loc(x, loc, sc, logsc);
}


x86 assembly (clang, -O0):
<dlaplace_loc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
call   1040 <laplace@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
call   1030 <dloglaplace_loc@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
mulss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlaplace_loc>:
sub    $0x18,%rsp
movss  %xmm3,0x10(%rsp)
movss  %xmm2,0xc(%rsp)
movss  %xmm1,0x8(%rsp)
movss  %xmm0,0x4(%rsp)
call   1040 <laplace@plt>
movss  %xmm0,0x14(%rsp)
movss  0x4(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movss  0xc(%rsp),%xmm2
movss  0x10(%rsp),%xmm3
call   1030 <dloglaplace_loc@plt>
mulss  0x14(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @dlaplace_loc(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %6
%11 = load float, float* %7
%12 = load float, float* %8
%13 = call float @laplace(float %9, float %10, float %11, float %12)
%14 = load float, float* %5
%15 = load float, float* %6
%16 = load float, float* %7
%17 = load float, float* %8
%18 = call float @dloglaplace_loc(float %14, float %15, float %16, float %17)
%19 = fmul float %13, %18
ret float %19
}

LLVM IR (-O2):
define float @dlaplace_loc(float %0, float %1, float %2, float %3) {
%5 = tail call float @laplace(float %0, float %1, float %2, float %3)
%6 = tail call float @dloglaplace_loc(float %0, float %1, float %2, float %3)
%7 = fmul float %5, %6
ret float %7
}
void ff_hevc_put_hevc_uni_w_epel_hv6_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_hv6_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printXmlSixDigits(int *data, unsigned int offset, const char *name) {
  if (offset > 0) {
    printf("%*c", offset, ' ');
  }
  printf("<%s>%i</%s>\n", name, *data, name);
}


x86 assembly (clang, -O0):
<printXmlSixDigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jbe    1143 <printXmlSixDigits+0x33>
mov    -0xc(%rbp),%esi
lea    0xec9(%rip),%rdi
mov    $0x20,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
mov    -0x18(%rbp),%rcx
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printXmlSixDigits>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
test   %esi,%esi
je     1131 <printXmlSixDigits+0x21>
lea    0xedb(%rip),%rdi
mov    $0x20,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%r14),%edx
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
mov    %rbx,%rcx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%*c\00"
@.str.1 = [13 x i8] c"<%s>%i</%s>\0A\00"
define void @printXmlSixDigits(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = icmp ugt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load i32, i32* %5
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10, i32 32)
br label %12
12: ; preds = %9, %3
%13 = load i8*, i8** %6
%14 = load i32*, i32** %4
%15 = load i32, i32* %14
%16 = load i8*, i8** %6
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %13, i32 %15, i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%*c\00"
@.str.1 = [13 x i8] c"<%s>%i</%s>\0A\00"
define void @printXmlSixDigits(i32* nocapture %0, i32 %1, i8* %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1, i32 32)
br label %7
7: ; preds = %5, %3
%8 = load i32, i32* %0
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %2, i32 %8, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ real_send_message();
void *thread_write(void *arg) {
  while (1) {
    real_send_message();
  }
  return 0;
}


x86 assembly (clang, -O0):
<thread_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <real_send_message@plt>
jmp    111c <thread_write+0xc>

x86 assembly (clang, -O2):
<thread_write>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <real_send_message@plt>
jmp    1120 <thread_write+0x10>

LLVM IR (-O0):
define i8* @thread_write(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = call i32 (...) @real_send_message()
br label %3
}

LLVM IR (-O2):
define noalias i8* @thread_write(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 (...) @real_send_message()
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ lnp_hexdump(char *, unsigned char *, unsigned int);
void lnp_lego_hexdump(unsigned char *data, unsigned length) {
  lnp_hexdump("[LEGO]", data, length);
}


x86 assembly (clang, -O0):
<lnp_lego_hexdump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rdi
call   1030 <lnp_hexdump@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lnp_lego_hexdump>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <lnp_hexdump@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"[LEGO]\00"
define void @lnp_lego_hexdump(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @lnp_hexdump(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"[LEGO]\00"
define void @lnp_lego_hexdump(i8* %0, i32 %1) {
%3 = tail call i32 @lnp_hexdump(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
__attribute__((always_)) void __WFI(void) {}


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

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

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

LLVM IR (-O2):
define void @__WFI() {
ret void
}
/* Variables and functions */
scalar_t__ getInput();
int /*<<< orphan*/ search();
int main(int argc, char *argv[]) {
  if (getInput())
    search();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getInput@plt>
cmp    $0x0,%rax
je     114e <main+0x2e>
mov    $0x0,%al
call   1040 <search@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getInput@plt>
test   %rax,%rax
je     1134 <main+0x14>
xor    %eax,%eax
call   1040 <search@plt>
xor    %eax,%eax
pop    %rcx
ret

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 = call i64 (...) @getInput()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @search()
br label %10
10: ; preds = %8, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @getInput()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @search()
br label %7
7: ; preds = %5, %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char *);
FILE *data_prepare(const char *path) {
  FILE *fp = fopen(path, "r");
  if (!fp)
    return NULL;
  return fp;
}


x86 assembly (clang, -O0):
<data_prepare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1148 <data_prepare+0x38>
movq   $0x0,-0x8(%rbp)
jmp    1150 <data_prepare+0x40>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<data_prepare>:
lea    0xee9(%rip),%rsi
jmp    1030 <fopen@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define noalias i32* @data_prepare(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  printf("%d\n", n * (n - 1) * (n - 2) * (n - 3) / 24);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
mov    -0x4(%rbp),%ecx
sub    $0x2,%ecx
imul   %ecx,%eax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
imul   %ecx,%eax
mov    $0x18,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
lea    -0x1(%rax),%ecx
imul   %eax,%ecx
lea    -0x2(%rax),%edx
add    $0xfffffffd,%eax
imul   %edx,%eax
imul   %ecx,%eax
cltq
imul   $0x2aaaaaab,%rax,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x22,%rsi
add    %eax,%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = load i32, i32* %1
%4 = load i32, i32* %1
%5 = sub nsw i32 %4, 1
%6 = mul nsw i32 %3, %5
%7 = load i32, i32* %1
%8 = sub nsw i32 %7, 2
%9 = mul nsw i32 %6, %8
%10 = load i32, i32* %1
%11 = sub nsw i32 %10, 3
%12 = mul nsw i32 %9, %11
%13 = sdiv i32 %12, 24
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = add nsw i32 %4, -1
%6 = mul nsw i32 %5, %4
%7 = add nsw i32 %4, -2
%8 = mul nsw i32 %6, %7
%9 = add nsw i32 %4, -3
%10 = mul nsw i32 %8, %9
%11 = sdiv i32 %10, 24
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_sll_pi32(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test60(__m64 a, __m64 b) { return _mm_sll_pi32(a, b); }


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

x86 assembly (clang, -O2):
<test60>:
jmp    1030 <_mm_sll_pi32@plt>

LLVM IR (-O0):
define i32 @test60(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 @_mm_sll_pi32(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test60(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_sll_pi32(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int fls(unsigned int);
unsigned int find_maskwidth(unsigned int item) {
  unsigned int MaskWidth = 0;
  MaskWidth = fls(item) - 1;
  return MaskWidth;
}


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

x86 assembly (clang, -O2):
<find_maskwidth>:
push   %rax
call   1030 <fls@plt>
add    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @find_maskwidth(i32 %0) {
%2 = tail call i32 @fls(i32 %0)
%3 = add nsw i32 %2, -1
ret i32 %3
}
/* Variables and functions */
char const *remote_s2();
const char *__attribute__((section(".test.b"))) call_remote_s2(void) {
  return remote_s2() + 1;
}


x86 assembly (clang, -O0):
<call_remote_s2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <remote_s2@plt>
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_remote_s2>:
push   %rax
xor    %eax,%eax
call   1030 <remote_s2@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @call_remote_s2() section ".test.b" {
%1 = call i8* (...) @remote_s2()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}

LLVM IR (-O2):
define i8* @call_remote_s2() section ".test.b" {
%1 = tail call i8* (...) @remote_s2()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void tester() {
  int a = 50, b = 80;
  printf("\nvalues : a = %d and b = %d\n", a, b);
}


x86 assembly (clang, -O0):
<tester>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x32,-0x4(%rbp)
movl   $0x50,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tester>:
lea    0xee9(%rip),%rdi
mov    $0x32,%esi
mov    $0x50,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"\0Avalues : a = %d and b = %d\0A\00"
define void @tester() {
%1 = alloca i32
%2 = alloca i32
store i32 50, i32* %1
store i32 80, i32* %2
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"\0Avalues : a = %d and b = %d\0A\00"
define void @tester() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 50, i32 80)
ret void
}