xunge/DecIR huggingface dataset:
int fig_0_20(int figlen, int pd, int oe, int cn, unsigned char *fig) {
  return 0;
}


x86 assembly (clang, -O0):
<fig_0_20>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fig_0_20(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
ret i32 0
}

LLVM IR (-O2):
define i32 @fig_0_20(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ OPENSSL_die(char const *, char const *, int);
int ossl_assert_int(int expr, const char *exprstr, const char *file, int line) {
  if (!expr)
    OPENSSL_die(exprstr, file, line);
  return expr;
}


x86 assembly (clang, -O0):
<ossl_assert_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1140 <ossl_assert_int+0x30>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <OPENSSL_die@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ossl_assert_int>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jne    1124 <ossl_assert_int+0x14>
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %ecx,%edx
call   1030 <OPENSSL_die@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ossl_assert_int(i32 returned %0, i8* %1, i8* %2, i32 %3) {
%5 = icmp eq i32 %0, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @OPENSSL_die(i8* %1, i8* %2, i32 %3)
br label %8
8: ; preds = %6, %4
ret i32 %0
}
void swr_build_matrix() {}


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

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

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

LLVM IR (-O2):
define void @swr_build_matrix() {
ret void
}
/* Variables and functions */
double fabs(double x) {
  if (x < 0)
    x = -x;
  return (x);
}


x86 assembly (clang, -O0):
<fabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1138 <fabs+0x38>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabs>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fabs(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = fneg double %6
store double %7, double* %2
br label %8
8: ; preds = %5, %1
%9 = load double, double* %2
ret double %9
}

LLVM IR (-O2):
define double @fabs(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
/* Type definitions */
struct resource_cache {
  int dummy;
};

/* Variables and functions */
struct resource_cache *_rc_find_by_data(void const *);
int /*<<< orphan*/ _rc_put(struct resource_cache *);
void resource_put(const void *r) {
  struct resource_cache *rc;
  rc = _rc_find_by_data(r);
  if (!rc)
    return;
  _rc_put(rc);
}


x86 assembly (clang, -O0):
<resource_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_rc_find_by_data@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1149 <resource_put+0x29>
jmp    1152 <resource_put+0x32>
mov    -0x10(%rbp),%rdi
call   1040 <_rc_put@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resource_put>:
push   %rax
call   1030 <_rc_find_by_data@plt>
test   %rax,%rax
je     1134 <resource_put+0x14>
mov    %rax,%rdi
pop    %rax
jmp    1040 <_rc_put@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.resource_cache = type { i32 }
define void @resource_put(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.resource_cache*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call %struct.resource_cache* @_rc_find_by_data(i8* %4)
store %struct.resource_cache* %5, %struct.resource_cache** %3
%6 = load %struct.resource_cache*, %struct.resource_cache** %3
%7 = icmp ne %struct.resource_cache* %6, null
br i1 %7, label %9, label %8
8: ; preds = %1
br label %12
9: ; preds = %1
%10 = load %struct.resource_cache*, %struct.resource_cache** %3
%11 = call i32 @_rc_put(%struct.resource_cache* %10)
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
%struct.resource_cache = type { i32 }
define void @resource_put(i8* %0) {
%2 = tail call %struct.resource_cache* @_rc_find_by_data(i8* %0)
%3 = icmp eq %struct.resource_cache* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @_rc_put(%struct.resource_cache* %2)
br label %6
6: ; preds = %1, %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
double stdlib_strided_dsnansumpw(int /*<<< orphan*/ const, float const *,
                                 int /*<<< orphan*/ const);
double stdlib_strided_dsnansum(const int64_t N, const float *X,
                               const int64_t stride) {
  return stdlib_strided_dsnansumpw(N, X, stride);
}


x86 assembly (clang, -O0):
<stdlib_strided_dsnansum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <stdlib_strided_dsnansumpw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_strided_dsnansum>:
jmp    1030 <stdlib_strided_dsnansumpw@plt>

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

LLVM IR (-O2):
define double @stdlib_strided_dsnansum(i32 %0, float* %1, i32 %2) {
%4 = tail call double @stdlib_strided_dsnansumpw(i32 %0, float* %1, i32 %2)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void fputs(const char *s, int fd) { write(fd, (char *)s, strlen(s)); }


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

x86 assembly (clang, -O2):
<fputs>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @fputs(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @write(i32 %1, i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int ENOSYS;
int gk20a_do_idle(void) { return -ENOSYS; }


x86 assembly (clang, -O0):
<gk20a_do_idle>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    0x2edb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gk20a_do_idle>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @gk20a_do_idle() {
%1 = load i32, i32* @ENOSYS
%2 = sub nsw i32 0, %1
ret i32 %2
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @gk20a_do_idle() {
%1 = load i32, i32* @ENOSYS
%2 = sub nsw i32 0, %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ xisinf(double);
int /*<<< orphan*/ xisnan(double);
__attribute__((always_)) const int xisnumber(double x) {
  return !xisinf(x) && !xisnan(x);
}


x86 assembly (clang, -O0):
<xisnumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <xisinf@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    115c <xisnumber+0x3c>
movsd  -0x8(%rbp),%xmm0
call   1030 <xisnan@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisnumber>:
push   %rax
movsd  %xmm0,(%rsp)
call   1040 <xisinf@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1135 <xisnumber+0x15>
pop    %rcx
ret
movsd  (%rsp),%xmm0
call   1030 <xisnan@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @xisnumber(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @xisinf(double %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load double, double* %2
%8 = call i32 @xisnan(double %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ false, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @xisnumber(double %0) {
%2 = tail call i32 @xisinf(double %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @xisnan(double %0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ FatalError(char *, int);
void *realloc(void *, int);
void *UtilRealloc(void *old, int size) {
  void *ret = realloc(old, size);
  if (!ret)
    FatalError("Out of memory (cannot reallocate %d bytes)", size);
  return ret;
}


x86 assembly (clang, -O0):
<UtilRealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1159 <UtilRealloc+0x39>
mov    -0xc(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <FatalError@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UtilRealloc>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1140 <UtilRealloc+0x20>
lea    0xec7(%rip),%rdi
mov    %ebp,%esi
call   1030 <FatalError@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [43 x i8] c"Out of memory (cannot reallocate %d bytes)\00"
define i8* @UtilRealloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i8* @realloc(i8* %6, i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = load i32, i32* %4
%13 = call i32 @FatalError(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %11, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [43 x i8] c"Out of memory (cannot reallocate %d bytes)\00"
define i8* @UtilRealloc(i8* %0, i32 %1) {
%3 = tail call i8* @realloc(i8* %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @FatalError(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ GL_FALSE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
GLenum key(int k, GLenum mask) {
  switch (k) {
  case 'q':
  case 0xe004:
    exit(0);
  }
  return GL_FALSE;
}


x86 assembly (clang, -O0):
<key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x71,%eax
je     1145 <key+0x35>
jmp    1132 <key+0x22>
mov    -0xc(%rbp),%eax
sub    $0xe004,%eax
jne    114c <key+0x3c>
jmp    1145 <key+0x35>
xor    %edi,%edi
call   1030 <exit@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<key>:
push   %rax
cmp    $0xe004,%edi
je     1129 <key+0x19>
cmp    $0x71,%edi
je     1129 <key+0x19>
mov    0x2ec3(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@GL_FALSE = global i32 0
define i32 @key(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
switch i32 %5, label %8 [
i32 113, label %6
i32 57348, label %6
]
6: ; preds = %2, %2
%7 = call i32 @exit(i32 0)
unreachable
8: ; preds = %2
%9 = load i32, i32* @GL_FALSE
ret i32 %9
}

LLVM IR (-O2):
@GL_FALSE = global i32 0
define i32 @key(i32 %0, i32 %1) {
switch i32 %0, label %5 [
i32 113, label %3
i32 57348, label %3
]
3: ; preds = %2, %2
%4 = tail call i32 @exit(i32 0)
unreachable
5: ; preds = %2
%6 = load i32, i32* @GL_FALSE
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ updatewinp();
int /*<<< orphan*/ updatewout();
void updateall(void) {
  updatewout();
  updatewinp();
}


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

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

LLVM IR (-O0):
define void @updateall() {
%1 = call i32 (...) @updatewout()
%2 = call i32 (...) @updatewinp()
ret void
}

LLVM IR (-O2):
define void @updateall() {
%1 = tail call i32 (...) @updatewout()
%2 = tail call i32 (...) @updatewinp()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ squeeze(char *, char *);
int main(void) {
  char s[] = "hello, world\n";
  squeeze(s, "elf");
  printf("%s", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x12(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xec2(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0x12(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <squeeze@plt>
lea    -0x12(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0xa646c726f7720,%rax
mov    %rax,0x6(%rsp)
movabs $0x77202c6f6c6c6568,%rax
2c 20 77
mov    %rax,(%rsp)
lea    0xec5(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <squeeze@plt>
lea    0xeb7(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.s = [14 x i8] c"hello, world\0A\00"
@.str = [4 x i8] c"elf\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%3 = call i32 @squeeze(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_log1pf();
scalar_t__ log1pf(float);
void test_log1pf(float f) {
  if (log1pf(f) != log1pf(f))
    link_failure_log1pf();
}


x86 assembly (clang, -O0):
<test_log1pf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <log1pf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <log1pf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_log1pf+0x3c>
mov    $0x0,%al
call   1040 <link_failure_log1pf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_log1pf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1030 <log1pf@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1030 <log1pf@plt>
cmp    %rax,%rbx
jne    1149 <test_log1pf+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_log1pf@plt>

LLVM IR (-O0):
define void @test_log1pf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @log1pf(float %3)
%5 = load float, float* %2
%6 = call i64 @log1pf(float %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_log1pf()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_log1pf(float %0) {
%2 = tail call i64 @log1pf(float %0)
%3 = tail call i64 @log1pf(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_log1pf()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PDB0_DriverIRQHandler();
__attribute__((weak)) void PDB0_IRQHandler(void) { PDB0_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @PDB0_IRQHandler() {
%1 = call i32 (...) @PDB0_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @PDB0_IRQHandler() {
%1 = tail call i32 (...) @PDB0_DriverIRQHandler()
ret void
}
short int cast_ushort_short(unsigned short int x) { return (short int)x; }


x86 assembly (clang, -O0):
<cast_ushort_short>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cast_ushort_short>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i16 @cast_ushort_short(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
ret i16 %3
}

LLVM IR (-O2):
define signext i16 @cast_ushort_short(i16 returned zeroext %0) {
ret i16 %0
}
int SwapWithoutTemp(int *a1, int *a2) {
  *a1 = *a1 ^ *a2;
  *a2 = *a1 ^ *a2;
  *a1 = *a1 ^ *a2;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @SwapWithoutTemp(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = xor i32 %4, %3
store i32 %5, i32* %0
%6 = load i32, i32* %1
%7 = xor i32 %6, %5
store i32 %7, i32* %1
%8 = load i32, i32* %0
%9 = xor i32 %8, %7
store i32 %9, i32* %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void test_ok(void) {
  fprintf(stderr, "ok\n");
  fflush(stderr);
}


x86 assembly (clang, -O0):
<test_ok>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ok>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"ok\0A\00"
define void @test_ok() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fflush(i32 %3)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"ok\0A\00"
define void @test_ok() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void escreve_vet(int vet[], int n_elem) {
  int i;
  for (i = 0; i < n_elem; i++)
    printf("vet[%d]: %d\n", i, vet[i]);
}


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

x86 assembly (clang, -O2):
<escreve_vet>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1147 <escreve_vet+0x37>
mov    %rdi,%r14
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <escreve_vet+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"vet[%d]: %d\0A\00"
define void @escreve_vet(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() { printf("Help placeholder here.\n"); }


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

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

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

LLVM IR (-O2):
@str = [23 x i8] c"Help placeholder here.\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
void foo(char *a, char *b) {}


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

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

LLVM IR (-O0):
define void @foo(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @foo(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void got_isd(char *cp, int len) {
  (void)cp;
  printf("ISD len=%o\n", len);
}


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"ISD len=%o\0A\00"
define void @got_isd(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a, b = 3;
  a = b;
  a += 2;
  scanf("%i", &b);
  puts("\a/a");
  printf("hola manny \a");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
lea    0xea4(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xe97(%rip),%rdi
call   1030 <puts@plt>
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x3,0x4(%rsp)
lea    0xec0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
lea    0xeb2(%rip),%rdi
call   1030 <puts@plt>
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
@.str.1 = [4 x i8] c"\07/a\00"
@.str.2 = [13 x i8] c"hola manny \07\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %3
%4 = load i32, i32* %3
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 2
store i32 %6, i32* %2
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [4 x i8] c"\07/a\00"
@.str.2 = [13 x i8] c"hola manny \07\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 3, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
void SteamAPI_ISteamClient_SetWarningMessageHook(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamClient_SetWarningMessageHook>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamClient_SetWarningMessageHook = [44 x i8] c"SteamAPI_ISteamClient_SetWarningMessageHook\00"
define void @SteamAPI_ISteamClient_SetWarningMessageHook(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__func__.SteamAPI_ISteamClient_SetWarningMessageHook, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamClient_SetWarningMessageHook = [44 x i8] c"SteamAPI_ISteamClient_SetWarningMessageHook\00"
define void @SteamAPI_ISteamClient_SetWarningMessageHook(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__func__.SteamAPI_ISteamClient_SetWarningMessageHook, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int show_help(int);
int main(int argc, char **argv) { return show_help(1); }


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    $0x1,%edi
call   1030 <show_help@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%edi
jmp    1030 <show_help@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 = call i32 @show_help(i32 1)
ret i32 %6
}

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

/* Variables and functions */
int _mm_cvtsi128_si32(int /*<<< orphan*/);
int test_mm_cvtsi128_si32(__m128i A) { return _mm_cvtsi128_si32(A); }


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

x86 assembly (clang, -O2):
<test_mm_cvtsi128_si32>:
jmp    1030 <_mm_cvtsi128_si32@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cvtsi128_si32(i32 %0) {
%2 = tail call i32 @_mm_cvtsi128_si32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int drand48();
void fill(double *p, int n) {
  for (int i = 0; i < n; ++i)
    p[i] = 2 * drand48() - 1;
}


x86 assembly (clang, -O0):
<fill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115e <fill+0x4e>
mov    $0x0,%al
call   1030 <drand48@plt>
shl    $0x1,%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <fill+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1152 <fill+0x42>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <drand48@plt>
add    %eax,%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <fill+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @fill(double* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %14, %7 ]
%9 = tail call i32 (...) @drand48()
%10 = shl nsw i32 %9, 1
%11 = add nsw i32 %10, -1
%12 = sitofp i32 %11 to double
%13 = getelementptr inbounds double, double* %0, i64 %8
store double %12, double* %13
%14 = add nuw nsw i64 %8, 1
%15 = icmp eq i64 %14, %5
br i1 %15, label %6, label %7
}
/* Variables and functions */
int /*<<< orphan*/ gint2_nai_S_P(double *, double, double *, double, double *,
                                 double *);
void gint2_nai_P_S(double *a, double a_a, double *b, double b_a, double *c,
                   double *out) {
  gint2_nai_S_P(b, b_a, a, a_a, c, out);
}


x86 assembly (clang, -O0):
<gint2_nai_P_S>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rsi
movsd  -0x10(%rbp),%xmm1
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
call   1030 <gint2_nai_S_P@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gint2_nai_P_S>:
movaps %xmm0,%xmm2
mov    %rdi,%rax
mov    %rsi,%rdi
movaps %xmm1,%xmm0
mov    %rax,%rsi
movaps %xmm2,%xmm1
jmp    1030 <gint2_nai_S_P@plt>

LLVM IR (-O0):
define void @gint2_nai_P_S(double* %0, double %1, double* %2, double %3, double* %4, double* %5) {
%7 = alloca double*
%8 = alloca double
%9 = alloca double*
%10 = alloca double
%11 = alloca double*
%12 = alloca double*
store double* %0, double** %7
store double %1, double* %8
store double* %2, double** %9
store double %3, double* %10
store double* %4, double** %11
store double* %5, double** %12
%13 = load double*, double** %9
%14 = load double, double* %10
%15 = load double*, double** %7
%16 = load double, double* %8
%17 = load double*, double** %11
%18 = load double*, double** %12
%19 = call i32 @gint2_nai_S_P(double* %13, double %14, double* %15, double %16, double* %17, double* %18)
ret void
}

LLVM IR (-O2):
define void @gint2_nai_P_S(double* %0, double %1, double* %2, double %3, double* %4, double* %5) {
%7 = tail call i32 @gint2_nai_S_P(double* %2, double %3, double* %0, double %1, double* %4, double* %5)
ret void
}
void f() {
  void *data;
  char a;
  int b;
  data = &a;
  b = *(int *)(data);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
lea    -0x9(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i8*
%2 = alloca i8
%3 = alloca i32
store i8* %2, i8** %1
%4 = load i8*, i8** %1
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
store i32 %6, i32* %3
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
void adjust_motion_sensor_range(void) { return; }


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

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

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

LLVM IR (-O2):
define void @adjust_motion_sensor_range() {
ret void
}
int urlencode(char url) { return 0; }


x86 assembly (clang, -O0):
<urlencode>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @urlencode(i8 signext %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ logger_start_buffer(void *);
int logger_buffer_opened_signal_cb(void *data, const char *signal,
                                   const char *type_data, void *signal_data) {
  (void)data;
  (void)signal;
  (void)type_data;
  logger_start_buffer(signal_data);
  return 0;
}


x86 assembly (clang, -O0):
<logger_buffer_opened_signal_cb>:
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    -0x20(%rbp),%rdi
call   1030 <logger_start_buffer@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logger_buffer_opened_signal_cb>:
push   %rax
mov    %rcx,%rdi
call   1030 <logger_start_buffer@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @logger_buffer_opened_signal_cb(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** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @logger_start_buffer(i8* %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @logger_buffer_opened_signal_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* %3) {
%5 = tail call i32 @logger_start_buffer(i8* %3)
ret i32 0
}
int DiagRead(int iHandle, char *pcBuf, unsigned long ulLen, int iMode) {
  return (-1);
}


x86 assembly (clang, -O0):
<DiagRead>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @DiagRead(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
ret i32 -1
}

LLVM IR (-O2):
define i32 @DiagRead(i32 %0, i8* nocapture readnone %1, i64 %2, i32 %3) {
ret i32 -1
}
int isascii(int c) { return ((unsigned int)c <= 0x7f); }


x86 assembly (clang, -O0):
<isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x7f,-0x4(%rbp)
setbe  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ule i32 %3, 127
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @isascii(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int foo(int);
int main(void) {
  if (foo(8) != 8)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
call   1040 <foo@plt>
cmp    $0x8,%eax
je     1159 <main+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
call   1040 <foo@plt>
cmp    $0x8,%eax
jne    1147 <main+0x17>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 8)
%3 = icmp ne i32 %2, 8
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 8)
%2 = icmp eq i32 %1, 8
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ tempexit();
int usermgrhelp() {
  tempexit();
  system("/usr/bin/less "
         "/usr/local/share/smit/"
         "usrmgrhelp.txt");
  return 0;
}


x86 assembly (clang, -O0):
<usermgrhelp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <tempexit@plt>
lea    0xece(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<usermgrhelp>:
push   %rax
xor    %eax,%eax
call   1030 <tempexit@plt>
lea    0xed1(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [51 x i8] c"/usr/bin/less /usr/local/share/smit/usrmgrhelp.txt\00"
define i32 @usermgrhelp() {
%1 = call i32 (...) @tempexit()
%2 = call i32 @system(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [51 x i8] c"/usr/bin/less /usr/local/share/smit/usrmgrhelp.txt\00"
define i32 @usermgrhelp() {
%1 = tail call i32 (...) @tempexit()
%2 = tail call i32 @system(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help() {
  printf("parses and analyzes CLF Apache Log File\n");
  printf("Written by Matthew Sarver, Michael Shields, and John Stanley\n");
  printf("For CS4900 & CS4910\n");
  printf("See README for more.\n");
}


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

x86 assembly (clang, -O2):
<print_help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
lea    0xf35(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3d(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"parses and analyzes CLF Apache Log File\0A\00"
@.str.1 = [62 x i8] c"Written by Matthew Sarver, Michael Shields, and John Stanley\0A\00"
@.str.2 = [21 x i8] c"For CS4900 & CS4910\0A\00"
@.str.3 = [22 x i8] c"See README for more.\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [40 x i8] c"parses and analyzes CLF Apache Log File\00"
@str.4 = [61 x i8] c"Written by Matthew Sarver, Michael Shields, and John Stanley\00"
@str.5 = [20 x i8] c"For CS4900 & CS4910\00"
@str.6 = [21 x i8] c"See README for more.\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.6, i64 0, i64 0))
ret void
}
void info(char *s, ...) {}


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

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

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

LLVM IR (-O2):
define void @info(i8* nocapture %0, ...) {
ret void
}
void init_fdct(void) {
  { return; }
}


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

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

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

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

/* Variables and functions */
uint8_t OH_handleChecksumRequest(uint8_t *parameterBuffer,
                                 uint8_t *resultBuffer, uint32_t *p_stackUse) {
  return 0;
}


x86 assembly (clang, -O0):
<OH_handleChecksumRequest>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OH_handleChecksumRequest(i32* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ *getenv(char *);
int profiling_getenv(void) { return getenv("CANOPEN_PROFILE") != NULL; }


x86 assembly (clang, -O0):
<profiling_getenv>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <getenv@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<profiling_getenv>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <getenv@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"CANOPEN_PROFILE\00"
define i32 @profiling_getenv() {
%1 = call i32* @getenv(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i32* %1, null
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
@.str = [16 x i8] c"CANOPEN_PROFILE\00"
define i32 @profiling_getenv() {
%1 = tail call i32* @getenv(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i32* %1, null
%3 = zext i1 %2 to i32
ret i32 %3
}