xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ isdigit(char const);
bool is_pid(const char *fname) {
  while (*fname) {
    if (!isdigit(*fname))
      return false;
    fname++;
  }
  return true;
}


x86 assembly (clang, -O0):
<is_pid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115b <is_pid+0x4b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    114a <is_pid+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1162 <is_pid+0x52>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <is_pid+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_pid>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <is_pid+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1149 <is_pid+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <is_pid+0x20>
jmp    114b <is_pid+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @is_pid(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i32 @isdigit(i8 signext %8)
%11 = icmp eq i32 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Variables and functions */
int OK;
int /*<<< orphan*/ PDC_set_keyboard_binary();
int PDC_reset_prog_mode(void) {
  PDC_set_keyboard_binary();
  return OK;
}


x86 assembly (clang, -O0):
<PDC_reset_prog_mode>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <PDC_set_keyboard_binary@plt>
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PDC_reset_prog_mode>:
push   %rax
xor    %eax,%eax
call   1030 <PDC_set_keyboard_binary@plt>
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@OK = global i32 0
define i32 @PDC_reset_prog_mode() {
%1 = call i32 (...) @PDC_set_keyboard_binary()
%2 = load i32, i32* @OK
ret i32 %2
}

LLVM IR (-O2):
@OK = global i32 0
define i32 @PDC_reset_prog_mode() {
%1 = tail call i32 (...) @PDC_set_keyboard_binary()
%2 = load i32, i32* @OK
ret i32 %2
}
/* Variables and functions */
int ipmi_getdeviceid(unsigned char *, int, int /*<<< orphan*/);
int lan_keepalive(unsigned char bType) {
  int rv = 0;
  {
    unsigned char devrec[16];
    rv = ipmi_getdeviceid(devrec, 16, 0);
  }
  return (rv);
}


x86 assembly (clang, -O0):
<lan_keepalive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x10,%esi
xor    %edx,%edx
call   1030 <ipmi_getdeviceid@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lan_keepalive>:
sub    $0x18,%rsp
mov    %rsp,%rdi
mov    $0x10,%esi
xor    %edx,%edx
call   1030 <ipmi_getdeviceid@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @lan_keepalive(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i32
%4 = alloca [16 x i8]
store i8 %0, i8* %2
store i32 0, i32* %3
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%6 = call i32 @ipmi_getdeviceid(i8* %5, i32 16, i32 0)
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @lan_keepalive(i8 zeroext %0) {
%2 = alloca [16 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = call i32 @ipmi_getdeviceid(i8* %3, i32 16, i32 0)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ readidel(int);
uint32_t ide_read_qua_l(uint16_t addr, void *priv) { return readidel(3); }


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

x86 assembly (clang, -O2):
<ide_read_qua_l>:
mov    $0x3,%edi
jmp    1030 <readidel@plt>

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

LLVM IR (-O2):
define i32 @ide_read_qua_l(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 @readidel(i32 3)
ret i32 %3
}
void func1(int var1) {
  var1++;
  var1--;
  ++var1;
  --var1;
}


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

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

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

LLVM IR (-O2):
define void @func1(i32 %0) {
ret void
}
void jac_chain_nm4_decref(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @func()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_nibble(unsigned char);
void __console_tx_hex8(int loglevel, unsigned char value) {
  if (8 > loglevel) {
    __console_tx_nibble((value >> 4U) & 0x0fU);
    __console_tx_nibble(value & 0x0fU);
  }
}


x86 assembly (clang, -O0):
<__console_tx_hex8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    $0x8,%eax
cmp    -0x4(%rbp),%eax
jle    1150 <__console_tx_hex8+0x40>
movzbl -0x5(%rbp),%eax
sar    $0x4,%eax
and    $0xf,%eax
movzbl %al,%edi
call   1030 <__console_tx_nibble@plt>
movzbl -0x5(%rbp),%eax
and    $0xf,%eax
movzbl %al,%edi
call   1030 <__console_tx_nibble@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__console_tx_hex8>:
cmp    $0x7,%edi
jg     1131 <__console_tx_hex8+0x21>
push   %rbx
mov    %esi,%ebx
mov    %ebx,%eax
shr    $0x4,%al
movzbl %al,%edi
call   1030 <__console_tx_nibble@plt>
and    $0xf,%bl
movzbl %bl,%edi
pop    %rbx
jmp    1030 <__console_tx_nibble@plt>
ret

LLVM IR (-O0):
define void @__console_tx_hex8(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = icmp sgt i32 8, %5
br i1 %6, label %7, label %19
7: ; preds = %2
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
%10 = ashr i32 %9, 4
%11 = and i32 %10, 15
%12 = trunc i32 %11 to i8
%13 = call i32 @__console_tx_nibble(i8 zeroext %12)
%14 = load i8, i8* %4
%15 = zext i8 %14 to i32
%16 = and i32 %15, 15
%17 = trunc i32 %16 to i8
%18 = call i32 @__console_tx_nibble(i8 zeroext %17)
br label %19
19: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
define void @__console_tx_hex8(i32 %0, i8 zeroext %1) {
%3 = icmp slt i32 %0, 8
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = lshr i8 %1, 4
%6 = tail call i32 @__console_tx_nibble(i8 zeroext %5)
%7 = and i8 %1, 15
%8 = tail call i32 @__console_tx_nibble(i8 zeroext %7)
br label %9
9: ; preds = %4, %2
ret void
}
/* Variables and functions */
int eImpar(int);
int ePar(int numero) {
  if (numero == 0)
    return 1;
  else
    return eImpar(numero - 1);
}


x86 assembly (clang, -O0):
<ePar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <ePar+0x21>
movl   $0x1,-0x4(%rbp)
jmp    113f <ePar+0x2f>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <eImpar@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ePar>:
test   %edi,%edi
je     111c <ePar+0xc>
add    $0xffffffff,%edi
jmp    1030 <eImpar@plt>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @ePar(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @eImpar(i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ 1, %1 ]
ret i32 %7
}
/* Variables and functions */
scalar_t__ atan(float const);
float atanf(const float x) { return (float)atan(x); }


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

x86 assembly (clang, -O2):
<atanf>:
push   %rax
call   1030 <atan@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define float @atanf(float %0) {
%2 = tail call i64 @atan(float %0)
%3 = sitofp i64 %2 to float
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ htsmsg_add_str(void *, char const *, char *);
void add_string(void *opaque, void *parent, const char *name, char *str) {
  htsmsg_add_str(parent, name, str);
  free(str);
}


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

x86 assembly (clang, -O2):
<add_string>:
push   %rbx
mov    %rcx,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
call   1040 <htsmsg_add_str@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @add_string(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = load i8*, i8** %8
%12 = call i32 @htsmsg_add_str(i8* %9, i8* %10, i8* %11)
%13 = load i8*, i8** %8
%14 = call i32 @free(i8* %13)
ret void
}

LLVM IR (-O2):
define void @add_string(i8* nocapture readnone %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @htsmsg_add_str(i8* %1, i8* %2, i8* %3)
%6 = tail call i32 @free(i8* %3)
ret void
}
/* Type definitions */
struct _reent {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _REENT_CHECK_RAND48(struct _reent *);
int /*<<< orphan*/ _REENT_RAND48_SEED(struct _reent *);
double _erand48_r(struct _reent *, int /*<<< orphan*/);
double _drand48_r(struct _reent *r) {
  _REENT_CHECK_RAND48(r);
  return _erand48_r(r, _REENT_RAND48_SEED(r));
}


x86 assembly (clang, -O0):
<_drand48_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <_REENT_CHECK_RAND48@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_REENT_RAND48_SEED@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <_erand48_r@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_drand48_r>:
push   %rbx
mov    %rdi,%rbx
call   1050 <_REENT_CHECK_RAND48@plt>
mov    %rbx,%rdi
call   1040 <_REENT_RAND48_SEED@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <_erand48_r@plt>

LLVM IR (-O0):
%struct._reent = type { i32 }
define double @_drand48_r(%struct._reent* %0) {
%2 = alloca %struct._reent*
store %struct._reent* %0, %struct._reent** %2
%3 = load %struct._reent*, %struct._reent** %2
%4 = call i32 @_REENT_CHECK_RAND48(%struct._reent* %3)
%5 = load %struct._reent*, %struct._reent** %2
%6 = load %struct._reent*, %struct._reent** %2
%7 = call i32 @_REENT_RAND48_SEED(%struct._reent* %6)
%8 = call double @_erand48_r(%struct._reent* %5, i32 %7)
ret double %8
}

LLVM IR (-O2):
%struct._reent = type { i32 }
define double @_drand48_r(%struct._reent* %0) {
%2 = tail call i32 @_REENT_CHECK_RAND48(%struct._reent* %0)
%3 = tail call i32 @_REENT_RAND48_SEED(%struct._reent* %0)
%4 = tail call double @_erand48_r(%struct._reent* %0, i32 %3)
ret double %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint8_t isFile(uint64_t v) { return ((v >> 61) & 1); }


x86 assembly (clang, -O0):
<isFile>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3d,%ecx
sar    %cl,%eax
and    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @isFile(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 61
%5 = and i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @isFile(i32 %0) {
ret i32 poison
}
float interpolate_peak(float h1, float h2, float h3) {
  float offset = (h1 - h3) / (2 * (h1 + h3 - 2 * h2));
  return offset;
}


x86 assembly (clang, -O0):
<interpolate_peak>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
addss  -0xc(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
addss  %xmm1,%xmm1
subss  %xmm1,%xmm2
movss  0xec4(%rip),%xmm1
mulss  %xmm2,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpolate_peak>:
movaps %xmm0,%xmm3
subss  %xmm2,%xmm3
addss  %xmm2,%xmm0
addss  %xmm1,%xmm1
subss  %xmm1,%xmm0
addss  %xmm0,%xmm0
divss  %xmm0,%xmm3
movaps %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @interpolate_peak(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %4
%9 = load float, float* %6
%10 = fsub float %8, %9
%11 = load float, float* %4
%12 = load float, float* %6
%13 = fadd float %11, %12
%14 = load float, float* %5
%15 = call float @llvm.fmuladd.f32(float -2.000000e+00, float %14, float %13)
%16 = fmul float 2.000000e+00, %15
%17 = fdiv float %10, %16
store float %17, float* %7
%18 = load float, float* %7
ret float %18
}

LLVM IR (-O2):
define float @interpolate_peak(float %0, float %1, float %2) {
%4 = fsub float %0, %2
%5 = fadd float %0, %2
%6 = tail call float @llvm.fmuladd.f32(float %1, float -2.000000e+00, float %5)
%7 = fmul float %6, 2.000000e+00
%8 = fdiv float %4, %7
ret float %8
}
int nan_ne_return(double x) {
  volatile double y = x;
  volatile double z = y;
  return y != z;
}


x86 assembly (clang, -O0):
<nan_ne_return>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nan_ne_return>:
movsd  %xmm0,-0x10(%rsp)
movsd  -0x10(%rsp),%xmm0
movsd  %xmm0,-0x8(%rsp)
movsd  -0x10(%rsp),%xmm0
cmpneqsd -0x8(%rsp),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @nan_ne_return(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
store volatile double %5, double* %3
%6 = load volatile double, double* %3
store volatile double %6, double* %4
%7 = load volatile double, double* %3
%8 = load volatile double, double* %4
%9 = fcmp une double %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @nan_ne_return(double %0) {
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %2 to i8*
store volatile double %0, double* %2
%5 = bitcast double* %3 to i8*
%6 = load volatile double, double* %2
store volatile double %6, double* %3
%7 = load volatile double, double* %2
%8 = load volatile double, double* %3
%9 = fcmp une double %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
scalar_t__ wcscmp(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int ht_wstringcmp(void *k1, void *k2) {
  wchar_t *c1, *c2;
  c1 = k1;
  c2 = k2;
  return (wcscmp(c1, c2) == 0);
}


x86 assembly (clang, -O0):
<ht_wstringcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <wcscmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ht_wstringcmp>:
push   %rax
call   1030 <wcscmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ht_wstringcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32*, i32** %6
%13 = call i64 @wcscmp(i32* %11, i32* %12)
%14 = icmp eq i64 %13, 0
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @ht_wstringcmp(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = tail call i64 @wcscmp(i32* %3, i32* %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void nop(void) { put8(0x90); }


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

x86 assembly (clang, -O2):
<nop>:
mov    $0x90,%edi
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @nop() {
%1 = call i32 @put8(i32 144)
ret void
}

LLVM IR (-O2):
define void @nop() {
%1 = tail call i32 @put8(i32 144)
ret void
}
char *ngettext(msgid1, msgid2, n) const char *msgid1;
const char *msgid2;
unsigned long int n;
{ return libintl_ngettext(msgid1, msgid2, n); }


x86 assembly (clang, -O0):
<ngettext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1030 <libintl_ngettext@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @ngettext(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 (i8*, i8*, i64, ...) bitcast (i32 (...)* @libintl_ngettext to i32 (i8*, i8*, i64, ...)*)(i8* %7, i8* %8, i64 %9)
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i8*
ret i8* %12
}

LLVM IR (-O2):
define i8* @ngettext(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 (i8*, i8*, i64, ...) bitcast (i32 (...)* @libintl_ngettext to i32 (i8*, i8*, i64, ...)*)(i8* %0, i8* %1, i64 %2)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
/* Variables and functions */
void *bh_align_malloc(size_t, size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *bh_align_calloc(size_t size, size_t align) {
  void *buf = bh_align_malloc(size, align);
  if (buf != NULL)
    memset(buf, 0, size);
  return buf;
}


x86 assembly (clang, -O0):
<bh_align_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <bh_align_malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     115b <bh_align_calloc+0x3b>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bh_align_calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <bh_align_malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1141 <bh_align_calloc+0x21>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @bh_align_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @bh_align_malloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @memset(i8* %3, i32 0, i64 %0)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ nanotest_putnl();
int /*<<< orphan*/ nanotest_putstr(char const *);
void nanotest_putstrnl(char const *str) {
  nanotest_putstr(str);
  nanotest_putnl();
}


x86 assembly (clang, -O0):
<nanotest_putstrnl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <nanotest_putstr@plt>
mov    $0x0,%al
call   1040 <nanotest_putnl@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @nanotest_putstrnl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @nanotest_putstr(i8* %3)
%5 = call i32 (...) @nanotest_putnl()
ret void
}

LLVM IR (-O2):
define void @nanotest_putstrnl(i8* %0) {
%2 = tail call i32 @nanotest_putstr(i8* %0)
%3 = tail call i32 (...) @nanotest_putnl()
ret void
}
void av_gcd() {}


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

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

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

LLVM IR (-O2):
define void @av_gcd() {
ret void
}
int sumOfDigits(int data) {
  int k, sum = 0;
  while (data != 0) {
    k = data % 10;
    sum = sum + k;
    data /= 10;
  }
  return sum;
}


x86 assembly (clang, -O0):
<sumOfDigits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1142 <sumOfDigits+0x42>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <sumOfDigits+0xe>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumOfDigits>:
xor    %eax,%eax
test   %edi,%edi
je     113b <sumOfDigits+0x3b>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
lea    (%rdi,%rdi,1),%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%esi
sub    %edx,%esi
add    %esi,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <sumOfDigits+0x10>
ret

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

LLVM IR (-O2):
define i32 @sumOfDigits(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = srem i32 %5, 10
%7 = add nsw i32 %4, %6
%8 = sdiv i32 %5, 10
%9 = add i32 %5, 9
%10 = icmp ult i32 %9, 19
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %12
}
void BrzPassivatorPush_ackup(struct comp *comp, int port) {}


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

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

LLVM IR (-O0):
%struct.comp = type opaque
define void @BrzPassivatorPush_ackup(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.comp = type opaque
define void @BrzPassivatorPush_ackup(%struct.comp* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *);
int main() {
  int A, B, C, D;
  scanf(" %d %d %d %d", &A, &B, &C, &D);
  printf("DIFERENCA = %d\n", (A * B) - (C * D));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
imul   -0xc(%rbp),%esi
mov    -0x10(%rbp),%eax
imul   -0x14(%rbp),%eax
sub    %eax,%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
imul   0x14(%rsp),%esi
mov    0x8(%rsp),%eax
imul   0xc(%rsp),%eax
sub    %eax,%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ UP3D_GetParameter(int);
int32_t UP3D_GetCheckDoor() { return UP3D_GetParameter(0x31); }


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

x86 assembly (clang, -O2):
<UP3D_GetCheckDoor>:
mov    $0x31,%edi
jmp    1030 <UP3D_GetParameter@plt>

LLVM IR (-O0):
define i32 @UP3D_GetCheckDoor() {
%1 = call i32 @UP3D_GetParameter(i32 49)
ret i32 %1
}

LLVM IR (-O2):
define i32 @UP3D_GetCheckDoor() {
%1 = tail call i32 @UP3D_GetParameter(i32 49)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, void *, int);
float endconv_ld_le_s(void *src) {
  float r;
  memcpy(&r, src, sizeof(float));
  return r;
}


x86 assembly (clang, -O0):
<endconv_ld_le_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<endconv_ld_le_s>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @endconv_ld_le_s(i8* %0) {
%2 = alloca i8*
%3 = alloca float
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @memcpy(float* %3, i8* %4, i32 4)
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
define float @endconv_ld_le_s(i8* %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
%4 = call i32 @memcpy(float* %2, i8* %0, i32 4)
%5 = load float, float* %2
ret float %5
}
/* Variables and functions */
int foo();
int main(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
  return foo();
}


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 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @foo()
ret i32 %3
}
/* Variables and functions */
void *malloc(size_t);
void *sshd_malloc(size_t size, char *file, int line) {
  void *ptr = malloc(size);
  return ptr;
}


x86 assembly (clang, -O0):
<sshd_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sshd_malloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @sshd_malloc(i64 %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i8* @malloc(i64 %0)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_sll_epi64(int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  __m128i a, b, count;
  b = _mm_sll_epi64(a, count);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @_mm_sll_epi64(i32 undef, i32 undef)
ret i32 0
}
regx0imm1(r0, r1, x0, x1, p0, p1) unsigned short r0, r1;
unsigned short *p0, *p1;
{
  if ((p0[x0]) <= 33)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<regx0imm1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzwl (%rax,%rcx,2),%eax
cmp    $0x21,%eax
jg     1140 <regx0imm1+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1147 <regx0imm1+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0imm1>:
movslq %edx,%rcx
xor    %eax,%eax
cmpw   $0x22,(%r8,%rcx,2)
setb   %al
ret

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

LLVM IR (-O2):
define i32 @regx0imm1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i16, i16* %4, i64 %7
%9 = load i16, i16* %8
%10 = icmp ult i16 %9, 34
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, int);
int sendfile(int, int /*<<< orphan*/, int /*<<< orphan*/ *, int);
int main() {
  off_t o = 0;
  int ret = sendfile(1, 0, &o, 100);
  if (ret < 0)
    perror("sendfile()");
  printf("sendfile returned %d\n", ret);
  return ret < 0 ? 1 : 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1,%edi
xor    %esi,%esi
lea    -0x8(%rbp),%rdx
mov    $0x64,%ecx
call   1040 <sendfile@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1174 <main+0x44>
lea    0xe91(%rip),%rdi
call   1050 <perror@plt>
mov    -0xc(%rbp),%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rdx
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x64,%ecx
call   1040 <sendfile@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1172 <main+0x42>
lea    0xeab(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
shr    $0x1f,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret
lea    0xe87(%rip),%rdi
call   1050 <perror@plt>
jmp    1159 <main+0x29>

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

LLVM IR (-O2):
@.str = [11 x i8] c"sendfile()\00"
@.str.1 = [22 x i8] c"sendfile returned %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @sendfile(i32 1, i32 0, i32* %1, i32 100)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%9 = lshr i32 %3, 31
ret i32 %9
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *);
int tcgetattr(int fd __attribute__((unused)),
              struct termios *termios_p __attribute__((unused))) {
  printf("tcgetattr\n");
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<tcgetattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb6(%rip),%rax
mov    (%rax),%ecx
mov    0x2e9d(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcgetattr>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ec4(%rip),%rax
mov    (%rax),%eax
mov    0x2eab(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
@.str = [11 x i8] c"tcgetattr\0A\00"
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @tcgetattr(i32 %0, %struct.termios* %1) {
%3 = alloca i32
%4 = alloca %struct.termios*
store i32 %0, i32* %3
store %struct.termios* %1, %struct.termios** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @ENOSYS
store i32 %6, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
@str = [10 x i8] c"tcgetattr\00"
define i32 @tcgetattr(i32 %0, %struct.termios* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32 -1
}
int puissance(int a, int b) {
  int i;
  for (i = 0; i < b; i++) {
    a = a * a;
  }
  return a;
}


x86 assembly (clang, -O0):
<puissance>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1135 <puissance+0x35>
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <puissance+0x11>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<puissance>:
mov    %edi,%eax
test   %esi,%esi
jle    1158 <puissance+0x58>
lea    -0x1(%rsi),%edx
mov    %esi,%ecx
and    $0x7,%ecx
cmp    $0x7,%edx
jb     113d <puissance+0x3d>
and    $0xfffffff8,%esi
cs nopw 0x0(%rax,%rax,1)
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
add    $0xfffffff8,%esi
jne    1120 <puissance+0x20>
test   %ecx,%ecx
je     1158 <puissance+0x58>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
imul   %eax,%eax
add    $0xffffffff,%ecx
jne    1150 <puissance+0x50>
ret

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

LLVM IR (-O2):
define i32 @puissance(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %33
4: ; preds = %2
%5 = add i32 %1, -1
%6 = and i32 %1, 7
%7 = icmp ult i32 %5, 7
br i1 %7, label %23, label %8
8: ; preds = %4
%9 = and i32 %1, -8
br label %10
10: ; preds = %10, %8
%11 = phi i32 [ %0, %8 ], [ %20, %10 ]
%12 = phi i32 [ 0, %8 ], [ %21, %10 ]
%13 = mul nsw i32 %11, %11
%14 = mul nsw i32 %13, %13
%15 = mul nsw i32 %14, %14
%16 = mul nsw i32 %15, %15
%17 = mul nsw i32 %16, %16
%18 = mul nsw i32 %17, %17
%19 = mul nsw i32 %18, %18
%20 = mul nsw i32 %19, %19
%21 = add i32 %12, 8
%22 = icmp eq i32 %21, %9
br i1 %22, label %23, label %10
23: ; preds = %10, %4
%24 = phi i32 [ undef, %4 ], [ %20, %10 ]
%25 = phi i32 [ %0, %4 ], [ %20, %10 ]
%26 = icmp eq i32 %6, 0
br i1 %26, label %33, label %27
27: ; preds = %23, %27
%28 = phi i32 [ %30, %27 ], [ %25, %23 ]
%29 = phi i32 [ %31, %27 ], [ 0, %23 ]
%30 = mul nsw i32 %28, %28
%31 = add i32 %29, 1
%32 = icmp eq i32 %31, %6
br i1 %32, label %33, label %27
33: ; preds = %23, %27, %2
%34 = phi i32 [ %0, %2 ], [ %24, %23 ], [ %30, %27 ]
ret i32 %34
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
char *asctime_r(struct tm *, char *);
int /*<<< orphan*/ localtime_r(int /*<<< orphan*/ const *, struct tm *);
char *ctime_r(const time_t *t, char *buf) {
  struct tm tm;
  localtime_r(t, &tm);
  return asctime_r(&tm, buf);
}


x86 assembly (clang, -O0):
<ctime_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <localtime_r@plt>
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdi
call   1040 <asctime_r@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctime_r>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %r14,%rsi
call   1030 <localtime_r@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <asctime_r@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i8* @ctime_r(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca %struct.tm
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i32*, i32** %3
%7 = call i32 @localtime_r(i32* %6, %struct.tm* %5)
%8 = load i8*, i8** %4
%9 = call i8* @asctime_r(%struct.tm* %5, i8* %8)
ret i8* %9
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i8* @ctime_r(i32* %0, i8* %1) {
%3 = alloca %struct.tm
%4 = bitcast %struct.tm* %3 to i8*
%5 = call i32 @localtime_r(i32* %0, %struct.tm* %3)
%6 = call i8* @asctime_r(%struct.tm* %3, i8* %1)
ret i8* %6
}
void housekeeping(int level) { return; }


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

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

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

LLVM IR (-O2):
define void @housekeeping(i32 %0) {
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double _gettimeofday_sec() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec + (double)tv.tv_usec * 1e-6;
}


x86 assembly (clang, -O0):
<_gettimeofday_sec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm1
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  0xec8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_gettimeofday_sec>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm0
mulsd  0xed1(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i64 }
define double @_gettimeofday_sec() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to double
%8 = call double @llvm.fmuladd.f64(double %7, double 0x3EB0C6F7A0B5ED8D, double %4)
ret double %8
}

LLVM IR (-O2):
%struct.timeval = type { double, i64 }
define double @_gettimeofday_sec() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = tail call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %5)
ret double %9
}
int id2(void) { return (int *)1; }


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

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

LLVM IR (-O0):
define i32 @id2() {
ret i32 ptrtoint (i32* inttoptr (i64 1 to i32*) to i32)
}

LLVM IR (-O2):
define i32 @id2() {
ret i32 1
}