xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ warning(char *, char *);
void warn_no_longer_supported(char *name) {
  warning("%s is no longer supported", name);
}


x86 assembly (clang, -O0):
<warn_no_longer_supported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <warning@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warn_no_longer_supported>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <warning@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"%s is no longer supported\00"
define void @warn_no_longer_supported(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @warning(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"%s is no longer supported\00"
define void @warn_no_longer_supported(i8* %0) {
%2 = tail call i32 @warning(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
double SIM_array_amp_energy(void) {
  return ((5 * 0.36) / 8 * ((double)1 / (double)4e9) * (5.000000e-04));
}


x86 assembly (clang, -O0):
<SIM_array_amp_energy>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<SIM_array_amp_energy>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @SIM_array_amp_energy() {
ret double 2.812500e-14
}

LLVM IR (-O2):
define double @SIM_array_amp_energy() {
ret double 2.812500e-14
}
/* Variables and functions */
int yas_bma222_read_reg_byte(int);
int /*<<< orphan*/ yas_bma222_write_reg_byte(int, int);
int yas_bma222_power_up(void) {
  yas_bma222_write_reg_byte(
      0x17, ((yas_bma222_read_reg_byte(0x17) & ~0x10) | ((1) << 4)));
  yas_bma222_write_reg_byte(
      0x11, ((yas_bma222_read_reg_byte(0x11) & ~0xc0) | ((0) << 6)));
  return (0);
}


x86 assembly (clang, -O0):
<yas_bma222_power_up>:
push   %rbp
mov    %rsp,%rbp
mov    $0x17,%edi
call   1040 <yas_bma222_read_reg_byte@plt>
mov    %eax,%esi
and    $0xffffffef,%esi
or     $0x10,%esi
mov    $0x17,%edi
call   1030 <yas_bma222_write_reg_byte@plt>
mov    $0x11,%edi
call   1040 <yas_bma222_read_reg_byte@plt>
mov    %eax,%esi
and    $0xffffff3f,%esi
or     $0x0,%esi
mov    $0x11,%edi
call   1030 <yas_bma222_write_reg_byte@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<yas_bma222_power_up>:
push   %rax
mov    $0x17,%edi
call   1040 <yas_bma222_read_reg_byte@plt>
or     $0x10,%eax
mov    $0x17,%edi
mov    %eax,%esi
call   1030 <yas_bma222_write_reg_byte@plt>
mov    $0x11,%edi
call   1040 <yas_bma222_read_reg_byte@plt>
and    $0xffffff3f,%eax
mov    $0x11,%edi
mov    %eax,%esi
call   1030 <yas_bma222_write_reg_byte@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @yas_bma222_power_up() {
%1 = call i32 @yas_bma222_read_reg_byte(i32 23)
%2 = and i32 %1, -17
%3 = or i32 %2, 16
%4 = call i32 @yas_bma222_write_reg_byte(i32 23, i32 %3)
%5 = call i32 @yas_bma222_read_reg_byte(i32 17)
%6 = and i32 %5, -193
%7 = or i32 %6, 0
%8 = call i32 @yas_bma222_write_reg_byte(i32 17, i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @yas_bma222_power_up() {
%1 = tail call i32 @yas_bma222_read_reg_byte(i32 23)
%2 = or i32 %1, 16
%3 = tail call i32 @yas_bma222_write_reg_byte(i32 23, i32 %2)
%4 = tail call i32 @yas_bma222_read_reg_byte(i32 17)
%5 = and i32 %4, -193
%6 = tail call i32 @yas_bma222_write_reg_byte(i32 17, i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t size) {
  void *m = malloc(size);
  if (!m) {
    fprintf(stderr, "Fatal error! Memory allocation failed.\n");
    exit(1);
  }
  return m;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <xmalloc+0x43>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"Fatal error! Memory allocation failed.\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"Fatal error! Memory allocation failed.\0A\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
void func3(void) { extern char v10; }


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

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

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

LLVM IR (-O2):
define void @func3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ client_delete_group();
int delete_group(int argc, char **argv) {
  client_delete_group();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @delete_group(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @client_delete_group()
ret i32 0
}

LLVM IR (-O2):
define i32 @delete_group(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @client_delete_group()
ret i32 0
}
void fc182(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    goto a;
    {
      typedef int(*h)[n];
      0;
    };
  a:;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


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

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

LLVM IR (-O0):
define void @fc182(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
br label %18
15: ; No predecessors!
%16 = load i32, i32* %2
%17 = zext i32 %16 to i64
br label %18
18: ; preds = %15, %1
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc182(i32 %0) {
ret void
}
void cpuid(unsigned int n, unsigned int *a, unsigned int *b, unsigned int *c,
           unsigned int *d) {
  __asm__ __volatile__("cpuid"
                       : "=a"(*a), "=b"(*b), "=c"(*c), "=d"(*d)
                       : "0"(n));
}


x86 assembly (clang, -O0):
<cpuid>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0xc(%rbp),%eax
cpuid
mov    %eax,%r9d
mov    -0x40(%rbp),%rax
mov    %ecx,%esi
mov    -0x38(%rbp),%rcx
mov    %r9d,(%r8)
mov    %ebx,(%rdi)
mov    %esi,(%rcx)
mov    %edx,(%rax)
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid>:
push   %rbx
mov    %rcx,%r9
mov    %rdx,%r10
mov    %edi,%eax
cpuid
mov    %eax,(%rsi)
mov    %ebx,(%r10)
mov    %ecx,(%r9)
mov    %edx,(%r8)
pop    %rbx
ret

LLVM IR (-O0):
define void @cpuid(i32 %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store i32 %0, i32* %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = load i32*, i32** %7
%12 = load i32*, i32** %8
%13 = load i32*, i32** %9
%14 = load i32*, i32** %10
%15 = load i32, i32* %6
%16 = call { i32, i32, i32, i32 } asm sideeffect "cpuid", "={ax},={bx},={cx},={dx},0,~{dirflag},~{fpsr},~{flags}"(i32 %15)
%17 = extractvalue { i32, i32, i32, i32 } %16, 0
%18 = extractvalue { i32, i32, i32, i32 } %16, 1
%19 = extractvalue { i32, i32, i32, i32 } %16, 2
%20 = extractvalue { i32, i32, i32, i32 } %16, 3
store i32 %17, i32* %11
store i32 %18, i32* %12
store i32 %19, i32* %13
store i32 %20, i32* %14
ret void
}

LLVM IR (-O2):
define void @cpuid(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i32* nocapture writeonly %4) {
%6 = tail call { i32, i32, i32, i32 } asm sideeffect "cpuid", "={ax},={bx},={cx},={dx},0,~{dirflag},~{fpsr},~{flags}"(i32 %0)
%7 = extractvalue { i32, i32, i32, i32 } %6, 0
%8 = extractvalue { i32, i32, i32, i32 } %6, 1
%9 = extractvalue { i32, i32, i32, i32 } %6, 2
%10 = extractvalue { i32, i32, i32, i32 } %6, 3
store i32 %7, i32* %1
store i32 %8, i32* %2
store i32 %9, i32* %3
store i32 %10, i32* %4
ret void
}
int countdigits(int i) {
  if (i <= 9) {
    return 1;
  } else {
    return 1 + countdigits(i / 10);
  }
}


x86 assembly (clang, -O0):
<countdigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jg     1131 <countdigits+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1149 <countdigits+0x39>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <countdigits@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countdigits>:
mov    $0x1,%eax
cmp    $0xa,%edi
jl     1134 <countdigits+0x34>
mov    $0x1,%eax
mov    $0xcccccccd,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%eax
cmp    $0x63,%edi
mov    %edx,%edi
ja     1120 <countdigits+0x20>
ret

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

LLVM IR (-O2):
define i32 @countdigits(i32 %0) {
%2 = icmp slt i32 %0, 10
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = phi i32 [ %7, %3 ], [ 0, %1 ]
%6 = udiv i32 %4, 10
%7 = add nuw nsw i32 %5, 1
%8 = icmp ult i32 %4, 100
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = add nuw i32 %5, 2
br label %11
11: ; preds = %9, %1
%12 = phi i32 [ 1, %1 ], [ %10, %9 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ pem_password_cb;
typedef int /*<<< orphan*/ RSA;
typedef int /*<<< orphan*/ EVP_PKEY;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ *PEM_read_bio_PrivateKey(int /*<<< orphan*/ *,
                                            int /*<<< orphan*/ *,
                                            int /*<<< orphan*/ *, void *);
int /*<<< orphan*/ *pkey_get_rsa(int /*<<< orphan*/ *, int /*<<< orphan*/ **);
RSA *PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **rsa, pem_password_cb *cb,
                                void *u) {
  EVP_PKEY *pktmp;
  pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u);
  return pkey_get_rsa(pktmp, rsa);
}


x86 assembly (clang, -O0):
<PEM_read_bio_RSAPrivateKey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <PEM_read_bio_PrivateKey@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <pkey_get_rsa@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_read_bio_RSAPrivateKey>:
push   %rbx
mov    %rsi,%rbx
xor    %esi,%esi
call   1040 <PEM_read_bio_PrivateKey@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <pkey_get_rsa@plt>

LLVM IR (-O0):
define i32* @PEM_read_bio_RSAPrivateKey(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i32*
store i32* %0, i32** %5
store i32** %1, i32*** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%10 = load i32*, i32** %5
%11 = load i32*, i32** %7
%12 = load i8*, i8** %8
%13 = call i32* @PEM_read_bio_PrivateKey(i32* %10, i32* null, i32* %11, i8* %12)
store i32* %13, i32** %9
%14 = load i32*, i32** %9
%15 = load i32**, i32*** %6
%16 = call i32* @pkey_get_rsa(i32* %14, i32** %15)
ret i32* %16
}

LLVM IR (-O2):
define i32* @PEM_read_bio_RSAPrivateKey(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = tail call i32* @PEM_read_bio_PrivateKey(i32* %0, i32* null, i32* %2, i8* %3)
%6 = tail call i32* @pkey_get_rsa(i32* %5, i32** %1)
ret i32* %6
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void aw_bdb_abort_transaction(void *v_txn) {
  fatal("BerkeleyDB support not compiled");
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"BerkeleyDB support not compiled\00"
define void @aw_bdb_abort_transaction(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @fatal(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"BerkeleyDB support not compiled\00"
define void @aw_bdb_abort_transaction(i8* nocapture readnone %0) {
%2 = tail call i32 @fatal(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}
void rop3_236_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & T;
  stk1 = S | stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_236_0_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
or     %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_236_0_0>:
and    (%rdi),%dl
or     %sil,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_236_0_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 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = load i8*, i8** %4
store i8 %22, i8* %23
ret void
}

LLVM IR (-O2):
define void @rop3_236_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %2
%6 = or i8 %5, %1
store i8 %6, i8* %0
ret void
}
int giorno_non_valido(int giorno) {
  int esito;
  esito = giorno;
  if ((giorno < 1) || (giorno > 31)) {
    esito = -1;
  }
  return (esito);
}


x86 assembly (clang, -O0):
<giorno_non_valido>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jl     1121 <giorno_non_valido+0x21>
cmpl   $0x1f,-0x4(%rbp)
jle    1128 <giorno_non_valido+0x28>
movl   $0xffffffff,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<giorno_non_valido>:
lea    -0x20(%rdi),%eax
cmp    $0xffffffe1,%eax
mov    $0xffffffff,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @giorno_non_valido(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 1
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load i32, i32* %2
%9 = icmp sgt i32 %8, 31
br i1 %9, label %10, label %11
10: ; preds = %7, %1
store i32 -1, i32* %3
br label %11
11: ; preds = %10, %7
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @giorno_non_valido(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, -31
%4 = select i1 %3, i32 -1, i32 %0
ret i32 %4
}
int clean_array(int buffer[50]) {
  int i = 0;
  for (; i < 50; i++)
    buffer[i] = 0;
  return 0;
}


x86 assembly (clang, -O0):
<clean_array>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x32,-0xc(%rbp)
jge    1136 <clean_array+0x36>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <clean_array+0xf>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean_array>:
xorps  %xmm0,%xmm0
movups %xmm0,0xb0(%rdi)
movups %xmm0,0xa0(%rdi)
movups %xmm0,0x90(%rdi)
movups %xmm0,0x80(%rdi)
movups %xmm0,0x70(%rdi)
movups %xmm0,0x60(%rdi)
movups %xmm0,0x50(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
movq   $0x0,0xc0(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @clean_array(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to i8*
ret i32 0
}
/* Variables and functions */
char _getch();
int /*<<< orphan*/ printf(char *, char, char);
int main() {
  char ch;
  do {
    ch = _getch();
    printf("%c=%d\n ", ch, ch);
  } while (ch != 27);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <_getch@plt>
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
lea    0xebd(%rip),%rdi
movsbl %al,%esi
movsbl -0x5(%rbp),%edx
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x1b,%eax
jne    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xed6(%rip),%rbx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <_getch@plt>
movsbl %al,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
cmp    $0x1b,%bpl
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%c=%d\0A \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = call signext i8 (...) @_getch()
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = load i8, i8* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext %5, i8 signext %6)
br label %8
8: ; preds = %3
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 27
br i1 %11, label %3, label %12
12: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%c=%d\0A \00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @_getch()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext %2, i8 signext %2)
%4 = icmp eq i8 %2, 27
br i1 %4, label %5, label %1
5: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ caption(char **);
int /*<<< orphan*/ pushString(char *);
void basCaption() {
  char *title;
  caption(&title);
  pushString(title);
}


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

x86 assembly (clang, -O2):
<basCaption>:
push   %rax
mov    %rsp,%rdi
call   1030 <caption@plt>
mov    (%rsp),%rdi
call   1040 <pushString@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @basCaption() {
%1 = alloca i8*
%2 = call i32 @caption(i8** %1)
%3 = load i8*, i8** %1
%4 = call i32 @pushString(i8* %3)
ret void
}

LLVM IR (-O2):
define void @basCaption() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = call i32 @caption(i8** %1)
%4 = load i8*, i8** %1
%5 = call i32 @pushString(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void line() {
  for (int i = 0; i < 80; i++) {
    printf("-");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x50,-0x4(%rbp)
jge    1143 <line+0x33>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <line+0xf>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line>:
push   %rbx
mov    $0x50,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <line+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"-\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @line() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 80
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @line() {
br label %3
1: ; preds = %3
%2 = tail call i32 @putchar(i32 10)
ret void
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %6, %3 ]
%5 = tail call i32 @putchar(i32 45)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 80
br i1 %7, label %1, label %3
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_hex8(unsigned char);
void print_spew_hex8(unsigned char value) { __console_tx_hex8(value); }


x86 assembly (clang, -O0):
<print_spew_hex8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <__console_tx_hex8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_spew_hex8>:
jmp    1030 <__console_tx_hex8@plt>

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

LLVM IR (-O2):
define void @print_spew_hex8(i8 zeroext %0) {
%2 = tail call i32 @__console_tx_hex8(i8 zeroext %0)
ret void
}
int init_wasm(int n) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @init_wasm(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ warning(char *, char *, char *);
void warn_no_longer_supported2(char *name, char *newname) {
  warning("%s is no longer supported, use %s instead", name, newname);
}


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

x86 assembly (clang, -O2):
<warn_no_longer_supported2>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <warning@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"%s is no longer supported, use %s instead\00"
define void @warn_no_longer_supported2(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @warning(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"%s is no longer supported, use %s instead\00"
define void @warn_no_longer_supported2(i8* %0, i8* %1) {
%3 = tail call i32 @warning(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void function2() { printf("Function 2\n"); }


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"Function 2\00"
define void @function2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
float icsi_log(float val, register const float *lookup_table,
               register const int n) {
  register int *const exp_ptr = ((int *)&val);
  register int x = *exp_ptr;
  register const int log_2 = ((x >> 23) & 255) - 127;
  x &= 0x7FFFFF;
  x = x >> (23 - n);
  val = lookup_table[x];
  return ((val + log_2) * 0.69314718f);
}


x86 assembly (clang, -O0):
<icsi_log>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
sar    $0x17,%eax
and    $0xff,%eax
sub    $0x7f,%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%eax
and    $0x7fffff,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    $0x17,%ecx
sub    -0x14(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtsi2ssl -0x28(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  0xe8b(%rip),%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<icsi_log>:
movd   %xmm0,%eax
mov    %eax,%ecx
shr    $0x17,%ecx
movzbl %cl,%edx
and    $0x7fffff,%eax
mov    $0x17,%cl
sub    %sil,%cl
shr    %cl,%eax
add    $0xffffff81,%edx
xorps  %xmm0,%xmm0
cvtsi2ss %edx,%xmm0
addss  (%rdi,%rax,4),%xmm0
mulss  0xed1(%rip),%xmm0
ret

LLVM IR (-O0):
define float @icsi_log(float %0, float* %1, i32 %2) {
%4 = alloca float
%5 = alloca float*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
store float %0, float* %4
store float* %1, float** %5
store i32 %2, i32* %6
%10 = bitcast float* %4 to i32*
store i32* %10, i32** %7
%11 = load i32*, i32** %7
%12 = load i32, i32* %11
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = ashr i32 %13, 23
%15 = and i32 %14, 255
%16 = sub nsw i32 %15, 127
store i32 %16, i32* %9
%17 = load i32, i32* %8
%18 = and i32 %17, 8388607
store i32 %18, i32* %8
%19 = load i32, i32* %8
%20 = load i32, i32* %6
%21 = sub nsw i32 23, %20
%22 = ashr i32 %19, %21
store i32 %22, i32* %8
%23 = load float*, float** %5
%24 = load i32, i32* %8
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds float, float* %23, i64 %25
%27 = load float, float* %26
store float %27, float* %4
%28 = load float, float* %4
%29 = load i32, i32* %9
%30 = sitofp i32 %29 to float
%31 = fadd float %28, %30
%32 = fmul float %31, 0x3FE62E4300000000
ret float %32
}

LLVM IR (-O2):
define float @icsi_log(float %0, float* nocapture %1, i32 %2) {
%4 = bitcast float %0 to i32
%5 = lshr i32 %4, 23
%6 = and i32 %5, 255
%7 = add nsw i32 %6, -127
%8 = and i32 %4, 8388607
%9 = sub nsw i32 23, %2
%10 = lshr i32 %8, %9
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds float, float* %1, i64 %11
%13 = load float, float* %12
%14 = sitofp i32 %7 to float
%15 = fadd float %13, %14
%16 = fmul float %15, 0x3FE62E4300000000
ret float %16
}
int isprint(int c) {
  return ((((unsigned)c) >= ' ') && (((unsigned)c) <= '~'));
}


x86 assembly (clang, -O0):
<isprint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jb     1120 <isprint+0x20>
cmpl   $0x7e,-0x4(%rbp)
setbe  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp uge i32 %3, 32
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ule i32 %6, 126
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
void VXD_CF_SUCCESS(void) { __asm__ __volatile__("clc"); }


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

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

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

LLVM IR (-O2):
define void @VXD_CF_SUCCESS() {
tail call void asm sideeffect "clc", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
unsigned int power2le(unsigned int x) {
  x |= x >> 1;
  x |= x >> 2;
  x |= x >> 4;
  x |= x >> 8;
  x |= x >> 16;
  return (x >> 1) + 1;
}


x86 assembly (clang, -O0):
<power2le>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power2le>:
mov    %edi,%eax
shr    %eax
or     %edi,%eax
mov    %eax,%ecx
shr    $0x2,%ecx
or     %eax,%ecx
mov    %ecx,%edx
shr    $0x4,%edx
or     %ecx,%edx
mov    %edx,%eax
shr    $0x8,%eax
or     %edx,%eax
mov    %eax,%ecx
shr    $0x11,%ecx
shr    %eax
or     %ecx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @power2le(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 1
%5 = load i32, i32* %2
%6 = or i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = lshr i32 %7, 2
%9 = load i32, i32* %2
%10 = or i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = lshr i32 %11, 4
%13 = load i32, i32* %2
%14 = or i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = lshr i32 %15, 8
%17 = load i32, i32* %2
%18 = or i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = lshr i32 %19, 16
%21 = load i32, i32* %2
%22 = or i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = lshr i32 %23, 1
%25 = add i32 %24, 1
ret i32 %25
}

LLVM IR (-O2):
define i32 @power2le(i32 %0) {
%2 = lshr i32 %0, 1
%3 = or i32 %2, %0
%4 = lshr i32 %3, 2
%5 = or i32 %4, %3
%6 = lshr i32 %5, 4
%7 = or i32 %6, %5
%8 = lshr i32 %7, 8
%9 = or i32 %8, %7
%10 = lshr i32 %9, 17
%11 = lshr i32 %9, 1
%12 = or i32 %10, %11
%13 = add nuw i32 %12, 1
ret i32 %13
}
/* Variables and functions */
char *hugetlbfs_find_path();
int /*<<< orphan*/ printf(char *, char const *);
int main(int argc, char *argv[]) {
  const char *dir;
  dir = hugetlbfs_find_path();
  if (!dir)
    return -1;
  printf("%s\n", dir);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <hugetlbfs_find_path@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1158 <main+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    116f <main+0x4f>
mov    -0x18(%rbp),%rsi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <hugetlbfs_find_path@plt>
test   %rax,%rax
je     1140 <main+0x20>
lea    0xeca(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
jmp    1145 <main+0x25>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* (...) @hugetlbfs_find_path()
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 0, %5 ], [ -1, %2 ]
ret i32 %8
}
int x8n(int d) {
  switch (d) {
  case (0):
    return (0);
  case (1):
    return (1);
  case (2):
    return (1);
  case (3):
    return (1);
  case (4):
    return (0);
  case (5):
    return (-1);
  case (6):
    return (-1);
  case (7):
    return (-1);
  default:
    return (0);
  }
}


x86 assembly (clang, -O0):
<x8n>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x7,%rax
ja     118c <x8n+0x8c>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    1193 <x8n+0x93>
movl   $0x1,-0x4(%rbp)
jmp    1193 <x8n+0x93>
movl   $0x1,-0x4(%rbp)
jmp    1193 <x8n+0x93>
movl   $0x1,-0x4(%rbp)
jmp    1193 <x8n+0x93>
movl   $0x0,-0x4(%rbp)
jmp    1193 <x8n+0x93>
movl   $0xffffffff,-0x4(%rbp)
jmp    1193 <x8n+0x93>
movl   $0xffffffff,-0x4(%rbp)
jmp    1193 <x8n+0x93>
movl   $0xffffffff,-0x4(%rbp)
jmp    1193 <x8n+0x93>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<x8n>:
add    $0xffffffff,%edi
xor    %eax,%eax
cmp    $0x6,%edi
ja     1117 <x8n+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @x8n(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %13 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
i32 5, label %10
i32 6, label %11
i32 7, label %12
]
5: ; preds = %1
store i32 0, i32* %2
br label %14
6: ; preds = %1
store i32 1, i32* %2
br label %14
7: ; preds = %1
store i32 1, i32* %2
br label %14
8: ; preds = %1
store i32 1, i32* %2
br label %14
9: ; preds = %1
store i32 0, i32* %2
br label %14
10: ; preds = %1
store i32 -1, i32* %2
br label %14
11: ; preds = %1
store i32 -1, i32* %2
br label %14
12: ; preds = %1
store i32 -1, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %11, %10, %9, %8, %7, %6, %5
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@switch.table.x8n = [7 x i32] [i32 1, i32 1, i32 1, i32 0, i32 -1, i32 -1, i32 -1]
define i32 @x8n(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 7
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [7 x i32], [7 x i32]* @switch.table.x8n, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
bool has_vec256_not_avx2() { return false; }


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

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

LLVM IR (-O0):
define i32 @has_vec256_not_avx2() {
ret i32 0
}

LLVM IR (-O2):
define i32 @has_vec256_not_avx2() {
ret i32 0
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROR64(uint64_t x, unsigned int r) {
  __asm__("rorq %%cl, %0" : "=r"(x) : "0"(x), "c"(r));
  return x;
}


x86 assembly (clang, -O0):
<ROR64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
ror    %cl,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ROR64>:
mov    %esi,%ecx
mov    %rdi,%rax
ror    %cl,%rax
ret

LLVM IR (-O0):
define i8* @ROR64(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 i8* asm "rorq %cl, $0", "=r,0,{cx},~{dirflag},~{fpsr},~{flags}"(i8* %5, i32 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @ROR64(i8* readnone %0, i32 %1) {
%3 = tail call i8* asm "rorq %cl, $0", "=r,0,{cx},~{dirflag},~{fpsr},~{flags}"(i8* %0, i32 %1)
ret i8* %3
}
void lj_value(const double r, const double *p, double *f) {
  double x = (p[1] * p[1]) / (r * r);
  x = x * x * x;
  *f = 4.0 * p[0] * x * (x - 1.0);
}


x86 assembly (clang, -O0):
<lj_value>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xeb2(%rip),%xmm0
mulsd  (%rax),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xe94(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<lj_value>:
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm2
mulsd  %xmm2,%xmm2
mulsd  %xmm0,%xmm0
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
mulsd  0xed7(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xed3(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @lj_value(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%8 = load double*, double** %5
%9 = getelementptr inbounds double, double* %8, i64 1
%10 = load double, double* %9
%11 = load double*, double** %5
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = fmul double %10, %13
%15 = load double, double* %4
%16 = load double, double* %4
%17 = fmul double %15, %16
%18 = fdiv double %14, %17
store double %18, double* %7
%19 = load double, double* %7
%20 = load double, double* %7
%21 = fmul double %19, %20
%22 = load double, double* %7
%23 = fmul double %21, %22
store double %23, double* %7
%24 = load double*, double** %5
%25 = getelementptr inbounds double, double* %24, i64 0
%26 = load double, double* %25
%27 = fmul double 4.000000e+00, %26
%28 = load double, double* %7
%29 = fmul double %27, %28
%30 = load double, double* %7
%31 = fsub double %30, 1.000000e+00
%32 = fmul double %29, %31
%33 = load double*, double** %6
store double %32, double* %33
ret void
}

LLVM IR (-O2):
define void @lj_value(double %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = getelementptr inbounds double, double* %1, i64 1
%5 = load double, double* %4
%6 = fmul double %5, %5
%7 = fmul double %0, %0
%8 = fdiv double %6, %7
%9 = fmul double %8, %8
%10 = fmul double %8, %9
%11 = load double, double* %1
%12 = fmul double %11, 4.000000e+00
%13 = fmul double %12, %10
%14 = fadd double %10, -1.000000e+00
%15 = fmul double %13, %14
store double %15, double* %2
ret void
}
/* Variables and functions */
double __ocml_add_rtz_f64(double, double);
double __dadd_rz(double x, double y) { return __ocml_add_rtz_f64(x, y); }


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

x86 assembly (clang, -O2):
<__dadd_rz>:
jmp    1030 <__ocml_add_rtz_f64@plt>

LLVM IR (-O0):
define double @__dadd_rz(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @__ocml_add_rtz_f64(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @__dadd_rz(double %0, double %1) {
%3 = tail call double @__ocml_add_rtz_f64(double %0, double %1)
ret double %3
}
void psmouse_smbus_module_exit(void) {}


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

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

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

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

/* Variables and functions */
void PWMGenDisable(uint32_t ui32Base, uint32_t ui32Gen) {
  ;
  ;
  (*((volatile unsigned long *)(((ui32Base) + (ui32Gen)) + 0x00000000))) &=
      ~(0x00000001);
}


x86 assembly (clang, -O0):
<PWMGenDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    (%rax),%rcx
and    $0xfffffffffffffffe,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMGenDisable>:
andq   $0xfffffffffffffffe,(%rsi,%rdi,1)
ret

LLVM IR (-O0):
define void @PWMGenDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add nsw i64 %5, %6
%8 = add nsw i64 %7, 0
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, -2
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @PWMGenDisable(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, -2
store volatile i64 %6, i64* %4
ret void
}
int foofloat(float x) { return __builtin_lroundf(x); }


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

x86 assembly (clang, -O2):
<foofloat>:
jmp    1030 <lroundf@plt>

LLVM IR (-O0):
define i32 @foofloat(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @lroundf(float %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @foofloat(float %0) {
%2 = tail call i64 @lroundf(float %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
int msm_dts_eagle_set_volume(struct audio_client *ac, int lgain, int rgain) {
  pr_debug("%s\n", __func__);
  return 0;
}


x86 assembly (clang, -O0):
<msm_dts_eagle_set_volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xed7(%rip),%rdi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <pr_debug@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.audio_client = type opaque
@.str = [4 x i8] c"%s\0A\00"
@__func__.msm_dts_eagle_set_volume = [25 x i8] c"msm_dts_eagle_set_volume\00"
define i32 @msm_dts_eagle_set_volume(%struct.audio_client* %0, i32 %1, i32 %2) {
%4 = alloca %struct.audio_client*
%5 = alloca i32
%6 = alloca i32
store %struct.audio_client* %0, %struct.audio_client** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_debug to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @__func__.msm_dts_eagle_set_volume, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.audio_client = type opaque
@.str = [4 x i8] c"%s\0A\00"
@__func__.msm_dts_eagle_set_volume = [25 x i8] c"msm_dts_eagle_set_volume\00"
define i32 @msm_dts_eagle_set_volume(%struct.audio_client* nocapture readnone %0, i32 %1, i32 %2) {
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_debug to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @__func__.msm_dts_eagle_set_volume, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
double sqrt(int /*<<< orphan*/);
int /*<<< orphan*/ stdlib_strided_dnanvariancetk(int /*<<< orphan*/ const,
                                                 double const, double const *,
                                                 int /*<<< orphan*/ const);
double stdlib_strided_dnanstdevtk(const int64_t N, const double correction,
                                  const double *X, const int64_t stride) {
  return sqrt(stdlib_strided_dnanvariancetk(N, correction, X, stride));
}


x86 assembly (clang, -O0):
<stdlib_strided_dnanstdevtk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <stdlib_strided_dnanvariancetk@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @stdlib_strided_dnanstdevtk(i32 %0, double %1, double* %2, i32 %3) {
%5 = tail call i32 @stdlib_strided_dnanvariancetk(i32 %0, double %1, double* %2, i32 %3)
%6 = tail call double @sqrt(i32 %5)
ret double %6
}