xunge/DecIR huggingface dataset:
/* Variables and functions */
int rand();
void diceRoll(int *rolledDice, int toRoll) {
  int i;
  for (i = 0; i < toRoll; i++) {
    rolledDice[i] = rand() % 6 + 1;
  }
  return;
}


x86 assembly (clang, -O0):
<diceRoll>:
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    115d <diceRoll+0x4d>
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <diceRoll+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diceRoll>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1166 <diceRoll+0x56>
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 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %ecx,%eax
add    $0x1,%eax
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <diceRoll+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @diceRoll(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 = call i32 (...) @rand()
%12 = srem i32 %11, 6
%13 = add nsw i32 %12, 1
%14 = load i32*, i32** %3
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
store i32 %13, i32* %17
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):
define void @diceRoll(i32* nocapture writeonly %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 = tail call i32 (...) @rand()
%9 = srem i32 %8, 6
%10 = add nsw i32 %9, 1
%11 = getelementptr inbounds i32, i32* %0, i64 %7
store i32 %10, i32* %11
%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
}
void RTMemPageAllocTag(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemPageAllocTag() {
ret void
}
/* Variables and functions */
scalar_t__ sqrt(long);
long int getmaxcheck(long int number) { return (long int)sqrt(number); }


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

x86 assembly (clang, -O2):
<getmaxcheck>:
jmp    1030 <sqrt@plt>

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

LLVM IR (-O2):
define i64 @getmaxcheck(i64 %0) {
%2 = tail call i64 @sqrt(i64 %0)
ret i64 %2
}
/* Type definitions */
struct v4l_fd {
  int dummy;
};

/* Variables and functions */
int munmap(void *, size_t);
int v4l_wrap_munmap(struct v4l_fd *f, void *start, size_t length) {
  return munmap(start, length);
}


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

x86 assembly (clang, -O2):
<v4l_wrap_munmap>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <munmap@plt>

LLVM IR (-O0):
%struct.v4l_fd = type { i32 }
define i32 @v4l_wrap_munmap(%struct.v4l_fd* %0, i8* %1, i64 %2) {
%4 = alloca %struct.v4l_fd*
%5 = alloca i8*
%6 = alloca i64
store %struct.v4l_fd* %0, %struct.v4l_fd** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %5
%8 = load i64, i64* %6
%9 = call i32 @munmap(i8* %7, i64 %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.v4l_fd = type { i32 }
define i32 @v4l_wrap_munmap(%struct.v4l_fd* nocapture readnone %0, i8* %1, i64 %2) {
%4 = tail call i32 @munmap(i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char **);
void strsplit_free(char **strv) { free(strv); }


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

x86 assembly (clang, -O2):
<strsplit_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @strsplit_free(i8** nocapture %0) {
%2 = tail call i32 @free(i8** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ convert_base_4_to_base_4_strange_internal(int, char *);
int /*<<< orphan*/ strcat(char *, char *);
void convert_base_4_to_base_4_strange(int num, char *result) {
  convert_base_4_to_base_4_strange_internal(num, result);
  strcat(result, "\0");
}


x86 assembly (clang, -O0):
<convert_base_4_to_base_4_strange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <convert_base_4_to_base_4_strange_internal@plt>
mov    -0x10(%rbp),%rdi
lea    0xeba(%rip),%rsi
call   1030 <strcat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_base_4_to_base_4_strange>:
push   %rbx
mov    %rsi,%rbx
call   1040 <convert_base_4_to_base_4_strange_internal@plt>
lea    0xed0(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strcat@plt>

LLVM IR (-O0):
@.str = [2 x i8] zeroinitializer
define void @convert_base_4_to_base_4_strange(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @convert_base_4_to_base_4_strange_internal(i32 %5, i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] zeroinitializer
define void @convert_base_4_to_base_4_strange(i32 %0, i8* %1) {
%3 = tail call i32 @convert_base_4_to_base_4_strange_internal(i32 %0, i8* %1)
%4 = tail call i32 @strcat(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ X509;

/* Variables and functions */
int /*<<< orphan*/ NID_commonName;
int /*<<< orphan*/ NID_pkcs9_emailAddress;
int set_cn(int /*<<< orphan*/ *, int /*<<< orphan*/, char const *,
           int /*<<< orphan*/, char *, int /*<<< orphan*/);
int set_cn_and_email(X509 *crt, const char *name) {
  return set_cn(crt, NID_commonName, name, NID_pkcs9_emailAddress,
                "dummy@example.com", 0);
}


x86 assembly (clang, -O0):
<set_cn_and_email>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
mov    0x2eb0(%rip),%rax
mov    (%rax),%ecx
lea    0xebf(%rip),%r8
xor    %r9d,%r9d
call   1030 <set_cn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cn_and_email>:
mov    %rsi,%rdx
mov    0x2ebe(%rip),%rax
mov    (%rax),%esi
mov    0x2ec5(%rip),%rax
mov    (%rax),%ecx
lea    0xed4(%rip),%r8
xor    %r9d,%r9d
jmp    1030 <set_cn@plt>

LLVM IR (-O0):
@NID_commonName = global i32 0
@NID_pkcs9_emailAddress = global i32 0
@.str = [18 x i8] c"dummy@example.com\00"
define i32 @set_cn_and_email(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* @NID_commonName
%7 = load i8*, i8** %4
%8 = load i32, i32* @NID_pkcs9_emailAddress
%9 = call i32 @set_cn(i32* %5, i32 %6, i8* %7, i32 %8, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 %9
}

LLVM IR (-O2):
@NID_commonName = global i32 0
@NID_pkcs9_emailAddress = global i32 0
@.str = [18 x i8] c"dummy@example.com\00"
define i32 @set_cn_and_email(i32* %0, i8* %1) {
%3 = load i32, i32* @NID_commonName
%4 = load i32, i32* @NID_pkcs9_emailAddress
%5 = tail call i32 @set_cn(i32* %0, i32 %3, i8* %1, i32 %4, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 %5
}
void __attribute__((__warning__(
    "curl_easy_setopt expects a 'FILE *' argument for this option")))
__attribute__((__unused__)) __attribute__((__no__))
_curl_easy_setopt_err_FILE(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_FILE() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ writestr(int, char *);
void usage(void) { writestr(2, "usage: touch [-c] FILE ...\n"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
lea    0xee0(%rip),%rsi
call   1030 <writestr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rsi
mov    $0x2,%edi
jmp    1030 <writestr@plt>

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

LLVM IR (-O2):
@.str = [28 x i8] c"usage: touch [-c] FILE ...\0A\00"
define void @usage() {
%1 = tail call i32 @writestr(i32 2, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}
void g_blow_chunks() {}


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

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

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

LLVM IR (-O2):
define void @g_blow_chunks() {
ret void
}
int gl_DOS_dummy_function(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @gl_DOS_dummy_function() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int terminal_read_str8(int, int, int /*<<< orphan*/ *, int);
int terminal_read_str(int x, int y, char *buffer, int max) {
  return terminal_read_str8(x, y, (int8_t *)buffer, max);
}


x86 assembly (clang, -O0):
<terminal_read_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1030 <terminal_read_str8@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminal_read_str>:
jmp    1030 <terminal_read_str8@plt>

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

LLVM IR (-O2):
define i32 @terminal_read_str(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = bitcast i8* %2 to i32*
%6 = tail call i32 @terminal_read_str8(i32 %0, i32 %1, i32* %5, i32 %3)
ret i32 %6
}
__attribute__((always_)) unsigned long ffz(unsigned long word) {
  asm("bsf %1,%0" : "=r"(word) : "r"(~word));
  return word;
}


x86 assembly (clang, -O0):
<ffz>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
bsf    %rax,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffz>:
not    %rdi
bsf    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @ffz(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = xor i64 %3, -1
%5 = call i64 asm "bsf $1,$0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i64 %4)
store i64 %5, i64* %2
%6 = load i64, i64* %2
ret i64 %6
}

LLVM IR (-O2):
define i64 @ffz(i64 %0) {
%2 = xor i64 %0, -1
%3 = tail call i64 asm "bsf $1,$0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i64 %2)
ret i64 %3
}
double reference_cdf(double x) { return x; }


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

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

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

LLVM IR (-O2):
define double @reference_cdf(double returned %0) {
ret double %0
}
/* Type definitions */
typedef double *__m128d;

/* Variables and functions */
void __attribute__((__always___, __nodebug__))
_mm_storel_pd(double *dp, __m128d a) {
  dp[0] = a[0];
}


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

x86 assembly (clang, -O2):
<_mm_storel_pd>:
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @_mm_storel_pd(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %3
%9 = getelementptr inbounds double, double* %8, i64 0
store double %7, double* %9
ret void
}

LLVM IR (-O2):
define void @_mm_storel_pd(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
store double %3, double* %0
ret void
}
void freeSixDigits(int *value) {}


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

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

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

LLVM IR (-O2):
define void @freeSixDigits(i32* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ exists(char *);
const char *scan_resume_reason2() {
  if (exists("/sys/class/i2c-adapter/i2c-0/0-0073/resume_reason"))
    return "/sys/class/i2c-adapter/i2c-0/0-0073/resume_reason";
  return NULL;
}


x86 assembly (clang, -O0):
<scan_resume_reason2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <exists@plt>
cmp    $0x0,%rax
je     113e <scan_resume_reason2+0x2e>
lea    0xecb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <scan_resume_reason2+0x36>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_resume_reason2>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <exists@plt>
test   %rax,%rax
cmovne %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"/sys/class/i2c-adapter/i2c-0/0-0073/resume_reason\00"
define i8* @scan_resume_reason2() {
%1 = alloca i8*
%2 = call i64 @exists(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8** %1
br label %6
5: ; preds = %0
store i8* null, i8** %1
br label %6
6: ; preds = %5, %4
%7 = load i8*, i8** %1
ret i8* %7
}

LLVM IR (-O2):
@.str = [50 x i8] c"/sys/class/i2c-adapter/i2c-0/0-0073/resume_reason\00"
define i8* @scan_resume_reason2() {
%1 = tail call i64 @exists(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ fd_nrf8001_wakeup_error(int);
int /*<<< orphan*/ fd_nrf8001_wakeup_success();
void fd_nrf8001_dispatch_wakeup_response(uint8_t status,
                                         uint8_t *response_data
                                         __attribute__((unused)),
                                         uint32_t response_data_length
                                         __attribute__((unused))) {
  if (status != 0x00) {
    fd_nrf8001_wakeup_error(status);
    return;
  }
  fd_nrf8001_wakeup_success();
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1149 <fd_nrf8001_dispatch_wakeup_response+0x29>
mov    -0x4(%rbp),%edi
call   1040 <fd_nrf8001_wakeup_error@plt>
jmp    1150 <fd_nrf8001_dispatch_wakeup_response+0x30>
mov    $0x0,%al
call   1030 <fd_nrf8001_wakeup_success@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
test   %edi,%edi
je     1129 <fd_nrf8001_dispatch_wakeup_response+0x9>
jmp    1040 <fd_nrf8001_wakeup_error@plt>
xor    %eax,%eax
jmp    1030 <fd_nrf8001_wakeup_success@plt>

LLVM IR (-O0):
define void @fd_nrf8001_dispatch_wakeup_response(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
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load i32, i32* %4
%11 = call i32 @fd_nrf8001_wakeup_error(i32 %10)
br label %14
12: ; preds = %3
%13 = call i32 (...) @fd_nrf8001_wakeup_success()
br label %14
14: ; preds = %12, %9
ret void
}

LLVM IR (-O2):
define void @fd_nrf8001_dispatch_wakeup_response(i32 %0, i32* nocapture readnone %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @fd_nrf8001_wakeup_error(i32 %0)
br label %9
7: ; preds = %3
%8 = tail call i32 (...) @fd_nrf8001_wakeup_success()
br label %9
9: ; preds = %7, %5
ret void
}
int recbitcount(unsigned int n) {
  int r = 0;
  while (n) {
    n = n & (n - 1);
    r++;
  }
  return r;
}


x86 assembly (clang, -O0):
<recbitcount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1134 <recbitcount+0x34>
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <recbitcount+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<recbitcount>:
xor    %eax,%eax
test   %edi,%edi
je     111c <recbitcount+0x1c>
cs nopw 0x0(%rax,%rax,1)
lea    -0x1(%rdi),%ecx
add    $0x1,%eax
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <recbitcount+0x10>
ret

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

LLVM IR (-O2):
define i32 @recbitcount(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add i32 %5, -1
%7 = and i32 %6, %5
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void memory_error(void) {
  fprintf(stderr, "Error:Out of memory\n");
  exit(8);
}


x86 assembly (clang, -O0):
<memory_error>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x8,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<memory_error>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x8,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"Error:Out of memory\0A\00"
define void @memory_error() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"Error:Out of memory\0A\00"
define void @memory_error() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 8)
unreachable
}
main() { return (char *)0 == (int *)5; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
ret i32 zext (i1 icmp eq (i8* inttoptr (i64 5 to i8*), i8* null) to i32)
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int isExactSquare(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("Enter a number : ");
  scanf("%d", &n);
  printf("%d", isExactSquare(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <isExactSquare@plt>
mov    %eax,%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
call   1040 <isExactSquare@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Enter a number : \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @isExactSquare(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Enter a number : \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @isExactSquare(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
char __attribute__((no)) test(int a) {
  char buf[16];
  char *output = buf;
  strcpy(&buf[0], "0123456789");
  output += a;
  output -= 1;
  return output[0];
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
lea    0xed2(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x4(%rbp),%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xee2(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
movslq %ebx,%rax
mov    -0x1(%rsp,%rax,1),%al
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"0123456789\00"
define signext i8 @test(i32 %0) {
%2 = alloca i32
%3 = alloca [16 x i8]
%4 = alloca i8*
store i32 %0, i32* %2
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
store i8* %5, i8** %4
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = load i8*, i8** %4
%10 = sext i32 %8 to i64
%11 = getelementptr inbounds i8, i8* %9, i64 %10
store i8* %11, i8** %4
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i64 -1
store i8* %13, i8** %4
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
ret i8 %16
}

LLVM IR (-O2):
@.str = [11 x i8] c"0123456789\00"
define signext i8 @test(i32 %0) {
%2 = alloca [16 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = sext i32 %0 to i64
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 %5
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = load i8, i8* %7
ret i8 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ text;

/* Variables and functions */
int /*<<< orphan*/ roadmap_message_format(char *, int, char *);
const char *get_current_street(void) {
  static char text[256];
  roadmap_message_format(text, sizeof(text), "%Y");
  return &text[0];
}


x86 assembly (clang, -O0):
<get_current_street>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rdi
mov    $0x100,%esi
lea    0xed9(%rip),%rdx
call   1030 <roadmap_message_format@plt>
lea    0x2f0d(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_current_street>:
push   %rbx
lea    0x2f28(%rip),%rbx
lea    0xee1(%rip),%rdx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1030 <roadmap_message_format@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@get_current_street.text = internal global [256 x i8] zeroinitializer
@.str = [3 x i8] c"%Y\00"
define i8* @get_current_street() {
%1 = call i32 @roadmap_message_format(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @get_current_street.text, i64 0, i64 0), i32 256, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @get_current_street.text, i64 0, i64 0)
}

LLVM IR (-O2):
@get_current_street.text = internal global [256 x i8] zeroinitializer
@.str = [3 x i8] c"%Y\00"
define i8* @get_current_street() {
%1 = tail call i32 @roadmap_message_format(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @get_current_street.text, i64 0, i64 0), i32 256, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @get_current_street.text, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int __infer_nondet_int();
int wctob(wint_t c) { return __infer_nondet_int(); }


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

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

LLVM IR (-O0):
define i32 @wctob(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @__infer_nondet_int()
ret i32 %3
}

LLVM IR (-O2):
define i32 @wctob(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
int print_bool(int n, char *buf) {
  if (n) {
    memcpy(buf, "true\0", 5);
    return 4;
  } else {
    memcpy(buf, "false\0", 6);
    return 5;
  }
}


x86 assembly (clang, -O0):
<print_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114a <print_bool+0x3a>
mov    -0x10(%rbp),%rdi
lea    0xecc(%rip),%rsi
mov    $0x5,%edx
call   1030 <memcpy@plt>
movl   $0x4,-0x4(%rbp)
jmp    1166 <print_bool+0x56>
mov    -0x10(%rbp),%rdi
lea    0xeb1(%rip),%rsi
mov    $0x6,%edx
call   1030 <memcpy@plt>
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_bool>:
push   %rax
mov    %rsi,%rax
test   %edi,%edi
je     1133 <print_bool+0x23>
lea    0xee1(%rip),%rsi
mov    %rax,%rdi
mov    $0x5,%edx
call   1030 <memcpy@plt>
mov    $0x4,%eax
pop    %rcx
ret
lea    0xecc(%rip),%rsi
mov    %rax,%rdi
mov    $0x6,%edx
call   1030 <memcpy@plt>
mov    $0x5,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"true\00\00"
@.str.1 = [7 x i8] c"false\00\00"
define i32 @print_bool(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @memcpy(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
br label %8
6: ; preds = %2
%7 = tail call i32 @memcpy(i8* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 6)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ 4, %4 ], [ 5, %6 ]
ret i32 %9
}
/* Type definitions */
struct sockaddr_un {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int socklen_t;
typedef int /*<<< orphan*/ sa;

/* Variables and functions */
int accept(int, struct sockaddr *, int *);
int UnixServerAccept(int ServerSock) {
  struct sockaddr_un sa;
  socklen_t salen;
  int sock;
  salen = sizeof(sa);
  sock = accept(ServerSock, (struct sockaddr *)&sa, &salen);
  return (sock);
}


x86 assembly (clang, -O0):
<UnixServerAccept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <accept@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UnixServerAccept>:
sub    $0x18,%rsp
movl   $0x4,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <accept@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sockaddr_un = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @UnixServerAccept(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr_un
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 4, i32* %4
%6 = load i32, i32* %2
%7 = bitcast %struct.sockaddr_un* %3 to %struct.sockaddr*
%8 = call i32 @accept(i32 %6, %struct.sockaddr* %7, i32* %4)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
%struct.sockaddr_un = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @UnixServerAccept(i32 %0) {
%2 = alloca %struct.sockaddr_un
%3 = alloca i32
%4 = bitcast %struct.sockaddr_un* %2 to i8*
%5 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%6 = bitcast %struct.sockaddr_un* %2 to %struct.sockaddr*
%7 = call i32 @accept(i32 %0, %struct.sockaddr* %6, i32* %3)
ret i32 %7
}
/* Variables and functions */
double log1p(double);
double casimir_lnepsilon(double xi, double omegap, double gamma_) {
  return log1p(omegap * omegap / (xi * (xi + gamma_)));
}


x86 assembly (clang, -O0):
<casimir_lnepsilon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
addsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1030 <log1p@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<casimir_lnepsilon>:
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
divsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
jmp    1030 <log1p@plt>

LLVM IR (-O0):
define double @casimir_lnepsilon(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = load double, double* %5
%9 = fmul double %7, %8
%10 = load double, double* %4
%11 = load double, double* %4
%12 = load double, double* %6
%13 = fadd double %11, %12
%14 = fmul double %10, %13
%15 = fdiv double %9, %14
%16 = call double @log1p(double %15)
ret double %16
}

LLVM IR (-O2):
define double @casimir_lnepsilon(double %0, double %1, double %2) {
%4 = fmul double %1, %1
%5 = fadd double %0, %2
%6 = fmul double %5, %0
%7 = fdiv double %4, %6
%8 = tail call double @log1p(double %7)
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xd7() {
  Assert_real((isalnum(215) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              1080, ("isalnum should be 0 for 0xd7"));
}


x86 assembly (clang, -O0):
<t_isalnum_0xd7>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd7,%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x438,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0xd7>:
push   %rax
mov    $0xd7,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x438,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xd7\00"
define void @t_isalnum_0xd7() {
%1 = call i64 @isalnum(i32 215)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1080, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xd7\00"
define void @t_isalnum_0xd7() {
%1 = tail call i64 @isalnum(i32 215)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1080, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ timer_tick(char *);
void timertick() {
  char flag;
  timer_tick(&flag);
}


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

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

LLVM IR (-O0):
define void @timertick() {
%1 = alloca i8
%2 = call i32 @timer_tick(i8* %1)
ret void
}

LLVM IR (-O2):
define void @timertick() {
%1 = alloca i8
%2 = call i32 @timer_tick(i8* %1)
ret void
}
/* Variables and functions */
int VIDDummyIsFullscreen(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @VIDDummyIsFullscreen() {
ret i32 0
}
/* Type definitions */
struct exfat_inode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct exfat_inode *);
void free_exfat_inode(struct exfat_inode *node) { free(node); }


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

x86 assembly (clang, -O2):
<free_exfat_inode>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.exfat_inode = type { i32 }
define void @free_exfat_inode(%struct.exfat_inode* nocapture %0) {
%2 = tail call i32 @free(%struct.exfat_inode* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SimulatorTerminate();
int /*<<< orphan*/ SimulatorWriteString(char *);
void main() {
  SimulatorWriteString("Hello, world!\n\n");
  SimulatorTerminate();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <SimulatorWriteString@plt>
mov    $0x0,%al
call   1030 <SimulatorTerminate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <SimulatorWriteString@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <SimulatorTerminate@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Hello, world!\0A\0A\00"
define void @main() {
%1 = call i32 @SimulatorWriteString(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @SimulatorTerminate()
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Hello, world!\0A\0A\00"
define void @main() {
%1 = tail call i32 @SimulatorWriteString(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @SimulatorTerminate()
ret void
}
void nhash_count(struct hlist_head *head) {}


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

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

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

LLVM IR (-O2):
%struct.hlist_head = type opaque
define void @nhash_count(%struct.hlist_head* nocapture %0) {
ret void
}
/* Variables and functions */
int med3(int, int, int);
int choose_pivot(int *low, int *high) {
  return med3(*low, *high, low[(high - low) / 2UL]);
}


x86 assembly (clang, -O0):
<choose_pivot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rdx
sub    %rdx,%rcx
sar    $0x2,%rcx
shr    $0x1,%rcx
mov    (%rax,%rcx,4),%edx
call   1030 <med3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<choose_pivot>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
sub    %rdi,%rsi
sar    %rsi
and    $0xfffffffffffffffc,%rsi
mov    (%rdi,%rsi,1),%edx
mov    %eax,%edi
mov    %ecx,%esi
jmp    1030 <med3@plt>

LLVM IR (-O0):
define i32 @choose_pivot(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 = load i32*, i32** %3
%10 = load i32*, i32** %4
%11 = load i32*, i32** %3
%12 = ptrtoint i32* %10 to i64
%13 = ptrtoint i32* %11 to i64
%14 = sub i64 %12, %13
%15 = sdiv exact i64 %14, 4
%16 = udiv i64 %15, 2
%17 = getelementptr inbounds i32, i32* %9, i64 %16
%18 = load i32, i32* %17
%19 = call i32 @med3(i32 %6, i32 %8, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @choose_pivot(i32* %0, i32* %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = ptrtoint i32* %1 to i64
%6 = ptrtoint i32* %0 to i64
%7 = sub i64 %5, %6
%8 = ashr exact i64 %7, 2
%9 = lshr i64 %8, 1
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 @med3(i32 %3, i32 %4, i32 %11)
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ X_OK;
int /*<<< orphan*/ access(char *, int /*<<< orphan*/);
int unary_x(char *s) { return !access(s, X_OK); }


x86 assembly (clang, -O0):
<unary_x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unary_x>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@X_OK = global i32 0
define i32 @unary_x(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @X_OK
%5 = call i32 @access(i8* %3, i32 %4)
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@X_OK = global i32 0
define i32 @unary_x(i8* nocapture %0) {
%2 = load i32, i32* @X_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
float no_conversion(float value) { return value; }


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

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

LLVM IR (-O0):
define float @no_conversion(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
ret float %3
}

LLVM IR (-O2):
define float @no_conversion(float returned %0) {
ret float %0
}
int file_exists(const struct stat *stat) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @file_exists(%struct.stat* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int OPENSSL_INIT_ENGINE_ALL_BUILTIN;
int OPENSSL_INIT_LOAD_CONFIG;
int /*<<< orphan*/ OPENSSL_init_ssl(int, int /*<<< orphan*/ *);
int global_init(void) {
  if (!OPENSSL_init_ssl(
          OPENSSL_INIT_ENGINE_ALL_BUILTIN | OPENSSL_INIT_LOAD_CONFIG, NULL))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<global_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    0x2eb8(%rip),%rax
or     (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <OPENSSL_init_ssl@plt>
cmp    $0x0,%eax
jne    1148 <global_init+0x38>
movl   $0x0,-0x4(%rbp)
jmp    114f <global_init+0x3f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<global_init>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    0x2ec1(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
xor    %esi,%esi
call   1030 <OPENSSL_init_ssl@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@OPENSSL_INIT_ENGINE_ALL_BUILTIN = global i32 0
@OPENSSL_INIT_LOAD_CONFIG = global i32 0
define i32 @global_init() {
%1 = alloca i32
%2 = load i32, i32* @OPENSSL_INIT_ENGINE_ALL_BUILTIN
%3 = load i32, i32* @OPENSSL_INIT_LOAD_CONFIG
%4 = or i32 %2, %3
%5 = call i32 @OPENSSL_init_ssl(i32 %4, i32* null)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %0
store i32 0, i32* %1
br label %9
8: ; preds = %0
store i32 1, i32* %1
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@OPENSSL_INIT_ENGINE_ALL_BUILTIN = global i32 0
@OPENSSL_INIT_LOAD_CONFIG = global i32 0
define i32 @global_init() {
%1 = load i32, i32* @OPENSSL_INIT_ENGINE_ALL_BUILTIN
%2 = load i32, i32* @OPENSSL_INIT_LOAD_CONFIG
%3 = or i32 %2, %1
%4 = tail call i32 @OPENSSL_init_ssl(i32 %3, i32* null)
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
long double powl(long double, long double);
long double libm_powl(long double x, long double y) { return powl(x, y); }


x86 assembly (clang, -O0):
<libm_powl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <powl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libm_powl>:
jmp    1030 <powl@plt>

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

LLVM IR (-O2):
define x86_fp80 @libm_powl(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call x86_fp80 @powl(x86_fp80 %0, x86_fp80 %1)
ret x86_fp80 %3
}
int getSpecialActionElement(int element, int number, int base_element) {
  return (element != 0   ? element
          : number != -1 ? base_element + number - 1
                         : 0);
}


x86 assembly (clang, -O0):
<getSpecialActionElement>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1122 <getSpecialActionElement+0x22>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114d <getSpecialActionElement+0x4d>
cmpl   $0xffffffff,-0x8(%rbp)
je     113d <getSpecialActionElement+0x3d>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1147 <getSpecialActionElement+0x47>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    1147 <getSpecialActionElement+0x47>
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSpecialActionElement>:
xor    %ecx,%ecx
cmp    $0xffffffff,%esi
lea    -0x1(%rsi,%rdx,1),%eax
cmove  %ecx,%eax
test   %edi,%edi
cmovne %edi,%eax
ret

LLVM IR (-O0):
define i32 @getSpecialActionElement(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
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = load i32, i32* %4
br label %22
11: ; preds = %3
%12 = load i32, i32* %5
%13 = icmp ne i32 %12, -1
br i1 %13, label %14, label %19
14: ; preds = %11
%15 = load i32, i32* %6
%16 = load i32, i32* %5
%17 = add nsw i32 %15, %16
%18 = sub nsw i32 %17, 1
br label %20
19: ; preds = %11
br label %20
20: ; preds = %19, %14
%21 = phi i32 [ %18, %14 ], [ 0, %19 ]
br label %22
22: ; preds = %20, %9
%23 = phi i32 [ %10, %9 ], [ %21, %20 ]
ret i32 %23
}

LLVM IR (-O2):
define i32 @getSpecialActionElement(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
%5 = icmp eq i32 %1, -1
%6 = add i32 %1, -1
%7 = add i32 %6, %2
%8 = select i1 %5, i32 0, i32 %7
%9 = select i1 %4, i32 %8, i32 %0
ret i32 %9
}