xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void show_version(void) {
  printf(
      "polld version "
      "unknown"
      "\n"
      "Copyright (C) 2004-2006 Michal Cihar <michal@cihar.com>\n"
      "This is free software.  You may redistribute copies of it under the "
      "terms of\n"
      "the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.\n"
      "There is NO WARRANTY, to the extent permitted by law.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<show_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<show_version>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [281 x i8] c"polld version unknown\0ACopyright (C) 2004-2006 Michal Cihar <michal@cihar.com>\0AThis is free software. You may redistribute copies of it under the terms of\0Athe GNU General Public License <http://www.gnu.org/licenses/gpl.html>.\0AThere is NO WARRANTY, to the extent permitted by law.\0A\00"
define void @show_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([281 x i8], [281 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [280 x i8] c"polld version unknown\0ACopyright (C) 2004-2006 Michal Cihar <michal@cihar.com>\0AThis is free software. You may redistribute copies of it under the terms of\0Athe GNU General Public License <http://www.gnu.org/licenses/gpl.html>.\0AThere is NO WARRANTY, to the extent permitted by law.\00"
define void @show_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([280 x i8], [280 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct Allocator {
  int dummy;
};

/* Variables and functions */
void *malloc(size_t);
void *stdlib_alloc(struct Allocator *const allocator, size_t size) {
  return malloc(size);
}


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

x86 assembly (clang, -O2):
<stdlib_alloc>:
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
%struct.Allocator = type { i32 }
define i8* @stdlib_alloc(%struct.Allocator* %0, i64 %1) {
%3 = alloca %struct.Allocator*
%4 = alloca i64
store %struct.Allocator* %0, %struct.Allocator** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i8* @malloc(i64 %5)
ret i8* %6
}

LLVM IR (-O2):
%struct.Allocator = type { i32 }
define noalias i8* @stdlib_alloc(%struct.Allocator* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
ret i8* %3
}
int blunt(int *s) {
  int temp = *s;
  if (temp)
    --*s;
  return temp;
}


x86 assembly (clang, -O0):
<blunt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1126 <blunt+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blunt>:
mov    (%rdi),%eax
test   %eax,%eax
je     110b <blunt+0xb>
lea    -0x1(%rax),%ecx
mov    %ecx,(%rdi)
ret

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

LLVM IR (-O2):
define i32 @blunt(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = add nsw i32 %2, -1
store i32 %5, i32* %0
br label %6
6: ; preds = %4, %1
ret i32 %2
}
/* Type definitions */
struct dlistfd_head {
  int dummy;
};
struct dlist_entry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dlist_remove(struct dlist_entry *);
int /*<<< orphan*/ dlistfd_reset(struct dlistfd_head *);
void dlistfd_remove(struct dlist_entry *item, struct dlistfd_head *head) {
  dlist_remove(item);
  dlistfd_reset(head);
}


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

x86 assembly (clang, -O2):
<dlistfd_remove>:
push   %rbx
mov    %rsi,%rbx
call   1030 <dlist_remove@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <dlistfd_reset@plt>

LLVM IR (-O0):
%struct.dlist_entry = type { i32 }
%struct.dlistfd_head = type { i32 }
define void @dlistfd_remove(%struct.dlist_entry* %0, %struct.dlistfd_head* %1) {
%3 = alloca %struct.dlist_entry*
%4 = alloca %struct.dlistfd_head*
store %struct.dlist_entry* %0, %struct.dlist_entry** %3
store %struct.dlistfd_head* %1, %struct.dlistfd_head** %4
%5 = load %struct.dlist_entry*, %struct.dlist_entry** %3
%6 = call i32 @dlist_remove(%struct.dlist_entry* %5)
%7 = load %struct.dlistfd_head*, %struct.dlistfd_head** %4
%8 = call i32 @dlistfd_reset(%struct.dlistfd_head* %7)
ret void
}

LLVM IR (-O2):
%struct.dlist_entry = type { i32 }
%struct.dlistfd_head = type { i32 }
define void @dlistfd_remove(%struct.dlist_entry* %0, %struct.dlistfd_head* %1) {
%3 = tail call i32 @dlist_remove(%struct.dlist_entry* %0)
%4 = tail call i32 @dlistfd_reset(%struct.dlistfd_head* %1)
ret void
}
int second_overflow(unsigned long secs) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @second_overflow(i64 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void version() {
  printf("%s ", "FunOS Education");
  printf("%s\n", "0.0.1");
}


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

x86 assembly (clang, -O2):
<version>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee5(%rip),%rsi
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
lea    0xee6(%rip),%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
@.str.1 = [16 x i8] c"FunOS Education\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [6 x i8] c"0.0.1\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
@.str.1 = [16 x i8] c"FunOS Education\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [6 x i8] c"0.0.1\00"
define void @version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void sandbox_free_error(char *errorbuf) { free(errorbuf); }


x86 assembly (clang, -O0):
<sandbox_free_error>:
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):
<sandbox_free_error>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @sandbox_free_error(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 @sandbox_free_error(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XUngrabKeyboard() {
  printf("XUngrabKeyboard called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [23 x i8] c"XUngrabKeyboard called\00"
define i32 @XUngrabKeyboard() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void jmp_m32(unsigned int *m32) {
  put8(0xFF);
  put8(0x25);
  put32((unsigned int)(m32));
}


x86 assembly (clang, -O0):
<jmp_m32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xff,%edi
call   1030 <put8@plt>
mov    $0x25,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jmp_m32>:
push   %rbx
mov    %rdi,%rbx
mov    $0xff,%edi
call   1030 <put8@plt>
mov    $0x25,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @jmp_m32(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @put8(i32 255)
%4 = call i32 @put8(i32 37)
%5 = load i32*, i32** %2
%6 = ptrtoint i32* %5 to i32
%7 = call i32 @put32(i32 %6)
ret void
}

LLVM IR (-O2):
define void @jmp_m32(i32* %0) {
%2 = tail call i32 @put8(i32 255)
%3 = tail call i32 @put8(i32 37)
%4 = ptrtoint i32* %0 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i32 @put32(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 15;
  printf("The value: %.2f\n", i);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"The value: %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 15, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"The value: %.2f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 15)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ XGCValues;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XGCValues(void *_p) {
  if (_p == NULL)
    abort();
  free((XGCValues *)_p);
}


x86 assembly (clang, -O0):
<free_XGCValues>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XGCValues+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XGCValues>:
test   %rdi,%rdi
je     112a <free_XGCValues+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XGCValues(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XGCValues(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_thread_flag(int);
__attribute__((always_)) void set_need_resched(void) { set_thread_flag(3); }


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

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

LLVM IR (-O0):
define void @set_need_resched() {
%1 = call i32 @set_thread_flag(i32 3)
ret void
}

LLVM IR (-O2):
define void @set_need_resched() {
%1 = tail call i32 @set_thread_flag(i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
void foo(int x) { __VERIFIER_assert(x - 1 < x); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cmp    -0x4(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    $0x1,%edi
jmp    1030 <__VERIFIER_assert@plt>

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
%5 = load i32, i32* %2
%6 = icmp slt i32 %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @__VERIFIER_assert(i32 %7)
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = tail call i32 @__VERIFIER_assert(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_DUPFD;
int fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int dup(int fd) { return fcntl(fd, F_DUPFD, 0); }


x86 assembly (clang, -O0):
<dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dup>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_DUPFD = global i32 0
define i32 @dup(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @F_DUPFD
%5 = call i32 @fcntl(i32 %3, i32 %4, i32 0)
ret i32 %5
}

LLVM IR (-O2):
@F_DUPFD = global i32 0
define i32 @dup(i32 %0) {
%2 = load i32, i32* @F_DUPFD
%3 = tail call i32 @fcntl(i32 %0, i32 %2, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ foo();
int main() {
  if (foo() <= 0)
    abort();
  abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <foo@plt>
cmp    $0x0,%rax
jg     1147 <main+0x27>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <foo@plt>
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @foo()
%2 = tail call i32 (...) @abort()
unreachable
}
void logprintf(int prio, char *format_str, ...) {}


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

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

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

LLVM IR (-O2):
define void @logprintf(i32 %0, i8* nocapture %1, ...) {
ret void
}
void foo54() {}


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

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

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

LLVM IR (-O2):
define void @foo54() {
ret void
}
/* Type definitions */
struct Cyc_Set_Set {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_Set_setcmp(struct Cyc_Set_Set *, struct Cyc_Set_Set *);
int Cyc_Set_equals(struct Cyc_Set_Set *s1, struct Cyc_Set_Set *s2) {
  return ({ Cyc_Set_setcmp(s1, s2); }) == 0;
}


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

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

LLVM IR (-O0):
%struct.Cyc_Set_Set = type { i32 }
define i32 @Cyc_Set_equals(%struct.Cyc_Set_Set* %0, %struct.Cyc_Set_Set* %1) {
%3 = alloca %struct.Cyc_Set_Set*
%4 = alloca %struct.Cyc_Set_Set*
%5 = alloca i32
store %struct.Cyc_Set_Set* %0, %struct.Cyc_Set_Set** %3
store %struct.Cyc_Set_Set* %1, %struct.Cyc_Set_Set** %4
%6 = load %struct.Cyc_Set_Set*, %struct.Cyc_Set_Set** %3
%7 = load %struct.Cyc_Set_Set*, %struct.Cyc_Set_Set** %4
%8 = call i32 @Cyc_Set_setcmp(%struct.Cyc_Set_Set* %6, %struct.Cyc_Set_Set* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
%struct.Cyc_Set_Set = type { i32 }
define i32 @Cyc_Set_equals(%struct.Cyc_Set_Set* %0, %struct.Cyc_Set_Set* %1) {
%3 = tail call i32 @Cyc_Set_setcmp(%struct.Cyc_Set_Set* %0, %struct.Cyc_Set_Set* %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void sub_ptr_func(int *b) { (*b)--; }


x86 assembly (clang, -O0):
<sub_ptr_func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_ptr_func>:
addl   $0xffffffff,(%rdi)
ret

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

LLVM IR (-O2):
define void @sub_ptr_func(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, -1
store i32 %3, i32* %0
ret void
}
/* Variables and functions */
#define EAI_AGAIN 135
#define EAI_BADFLAGS 134
#define EAI_FAIL 133
#define EAI_FAMILY 132
#define EAI_MEMORY 131
#define EAI_NONAME 130
#define EAI_OVERFLOW 129
#define EAI_SYSTEM 128
char const *gai_strerror(int);
char const *getdns_module_strerror(int);
const char *module_gai_strerror(int errcode) {
  switch (errcode) {
  case EAI_AGAIN:
  case EAI_BADFLAGS:
  case EAI_FAIL:
  case EAI_FAMILY:
  case EAI_MEMORY:
  case EAI_NONAME:
  case EAI_OVERFLOW:
  case EAI_SYSTEM:
    return gai_strerror(errcode);
  default:
    return getdns_module_strerror(errcode);
  }
}


x86 assembly (clang, -O0):
<module_gai_strerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffff80,%eax
sub    $0x7,%eax
ja     1150 <module_gai_strerror+0x30>
jmp    113f <module_gai_strerror+0x1f>
mov    -0xc(%rbp),%edi
call   1040 <gai_strerror@plt>
mov    %rax,-0x8(%rbp)
jmp    115c <module_gai_strerror+0x3c>
mov    -0xc(%rbp),%edi
call   1030 <getdns_module_strerror@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_gai_strerror>:
mov    %edi,%eax
and    $0xfffffff8,%eax
cmp    $0x80,%eax
jne    1131 <module_gai_strerror+0x11>
jmp    1040 <gai_strerror@plt>
jmp    1030 <getdns_module_strerror@plt>

LLVM IR (-O0):
define i8* @module_gai_strerror(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 135, label %5
i32 134, label %5
i32 133, label %5
i32 132, label %5
i32 131, label %5
i32 130, label %5
i32 129, label %5
i32 128, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
%6 = load i32, i32* %3
%7 = call i8* @gai_strerror(i32 %6)
store i8* %7, i8** %2
br label %11
8: ; preds = %1
%9 = load i32, i32* %3
%10 = call i8* @getdns_module_strerror(i32 %9)
store i8* %10, i8** %2
br label %11
11: ; preds = %8, %5
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
define i8* @module_gai_strerror(i32 %0) {
%2 = and i32 %0, -8
%3 = icmp eq i32 %2, 128
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @gai_strerror(i32 %0)
br label %8
6: ; preds = %1
%7 = tail call i8* @getdns_module_strerror(i32 %0)
br label %8
8: ; preds = %6, %4
%9 = phi i8* [ %7, %6 ], [ %5, %4 ]
ret i8* %9
}
/* Variables and functions */
scalar_t__ strrchr(char const *, int);
char *c_strrchr(const char *s, int c) { return (char *)strrchr(s, c); }


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

x86 assembly (clang, -O2):
<c_strrchr>:
jmp    1030 <strrchr@plt>

LLVM IR (-O0):
define i8* @c_strrchr(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 i64 @strrchr(i8* %5, i32 %6)
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @c_strrchr(i8* %0, i32 %1) {
%3 = tail call i64 @strrchr(i8* %0, i32 %1)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
int ukvm_gdb_supported(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ukvm_gdb_supported() {
ret i32 0
}
/* Variables and functions */
bool isInisdeCircle(double x, double y, double c) {
  bool isInside = ((1 - x) * (1 - x)) + ((1 - y) * (1 - y)) <= c * c;
  return (isInside ? true : false);
}


x86 assembly (clang, -O0):
<isInisdeCircle>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xee5(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
movsd  0xed8(%rip),%xmm2
subsd  -0x8(%rbp),%xmm2
movsd  0xecb(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  0xebe(%rip),%xmm3
subsd  -0x10(%rbp),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isInisdeCircle>:
movsd  0xef8(%rip),%xmm3
movapd %xmm3,%xmm4
subsd  %xmm0,%xmm4
subsd  %xmm1,%xmm3
mulsd  %xmm3,%xmm3
mulsd  %xmm4,%xmm4
addsd  %xmm3,%xmm4
mulsd  %xmm2,%xmm2
xor    %eax,%eax
ucomisd %xmm4,%xmm2
setae  %al
ret

LLVM IR (-O0):
define i32 @isInisdeCircle(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i32
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %4
%9 = fsub double 1.000000e+00, %8
%10 = load double, double* %4
%11 = fsub double 1.000000e+00, %10
%12 = load double, double* %5
%13 = fsub double 1.000000e+00, %12
%14 = load double, double* %5
%15 = fsub double 1.000000e+00, %14
%16 = fmul double %13, %15
%17 = call double @llvm.fmuladd.f64(double %9, double %11, double %16)
%18 = load double, double* %6
%19 = load double, double* %6
%20 = fmul double %18, %19
%21 = fcmp ole double %17, %20
%22 = zext i1 %21 to i32
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = icmp ne i32 %23, 0
%25 = zext i1 %24 to i64
%26 = select i1 %24, i32 1, i32 0
ret i32 %26
}

LLVM IR (-O2):
define i32 @isInisdeCircle(double %0, double %1, double %2) {
%4 = fsub double 1.000000e+00, %0
%5 = fsub double 1.000000e+00, %1
%6 = fmul double %5, %5
%7 = tail call double @llvm.fmuladd.f64(double %4, double %4, double %6)
%8 = fmul double %2, %2
%9 = fcmp ole double %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
void *render_byte(int, void *);
void *render_integer(int x, void *dest) {
  dest = render_byte((x >> 24) & 0xFF, dest);
  dest = render_byte((x >> 16) & 0xFF, dest);
  dest = render_byte((x >> 8) & 0xFF, dest);
  dest = render_byte(x & 0xFF, dest);
  return dest;
}


x86 assembly (clang, -O0):
<render_integer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x18,%edi
and    $0xff,%edi
mov    -0x10(%rbp),%rsi
call   1030 <render_byte@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x10,%edi
and    $0xff,%edi
mov    -0x10(%rbp),%rsi
call   1030 <render_byte@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
mov    -0x10(%rbp),%rsi
call   1030 <render_byte@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
and    $0xff,%edi
mov    -0x10(%rbp),%rsi
call   1030 <render_byte@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<render_integer>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
shr    $0x18,%eax
mov    %eax,%edi
call   1030 <render_byte@plt>
mov    %ebx,%ecx
shr    $0x10,%ecx
movzbl %cl,%edi
mov    %rax,%rsi
call   1030 <render_byte@plt>
movzbl %bh,%edi
mov    %rax,%rsi
call   1030 <render_byte@plt>
movzbl %bl,%edi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <render_byte@plt>

LLVM IR (-O0):
define i8* @render_integer(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 = ashr i32 %5, 24
%7 = and i32 %6, 255
%8 = load i8*, i8** %4
%9 = call i8* @render_byte(i32 %7, i8* %8)
store i8* %9, i8** %4
%10 = load i32, i32* %3
%11 = ashr i32 %10, 16
%12 = and i32 %11, 255
%13 = load i8*, i8** %4
%14 = call i8* @render_byte(i32 %12, i8* %13)
store i8* %14, i8** %4
%15 = load i32, i32* %3
%16 = ashr i32 %15, 8
%17 = and i32 %16, 255
%18 = load i8*, i8** %4
%19 = call i8* @render_byte(i32 %17, i8* %18)
store i8* %19, i8** %4
%20 = load i32, i32* %3
%21 = and i32 %20, 255
%22 = load i8*, i8** %4
%23 = call i8* @render_byte(i32 %21, i8* %22)
store i8* %23, i8** %4
%24 = load i8*, i8** %4
ret i8* %24
}

LLVM IR (-O2):
define i8* @render_integer(i32 %0, i8* %1) {
%3 = lshr i32 %0, 24
%4 = tail call i8* @render_byte(i32 %3, i8* %1)
%5 = lshr i32 %0, 16
%6 = and i32 %5, 255
%7 = tail call i8* @render_byte(i32 %6, i8* %4)
%8 = lshr i32 %0, 8
%9 = and i32 %8, 255
%10 = tail call i8* @render_byte(i32 %9, i8* %7)
%11 = and i32 %0, 255
%12 = tail call i8* @render_byte(i32 %11, i8* %10)
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ net_send(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *, char *);
void irc_voice(char *channel, char *nick) {
  char msg[(512 - 3)];
  snprintf(msg, (512 - 3), "%s %s +v %s", "MODE", channel, nick);
  net_send(msg);
}


x86 assembly (clang, -O0):
<irc_voice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%r8
mov    -0x10(%rbp),%r9
mov    $0x1fd,%esi
lea    0xeb2(%rip),%rdx
lea    0xeb7(%rip),%rcx
call   1030 <snprintf@plt>
lea    -0x210(%rbp),%rdi
call   1040 <net_send@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_voice>:
push   %rbx
sub    $0x200,%rsp
mov    %rsi,%r9
mov    %rdi,%r8
lea    0xecb(%rip),%rdx
lea    0xed0(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1fd,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <net_send@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%s %s +v %s\00"
@.str.1 = [5 x i8] c"MODE\00"
define void @irc_voice(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [509 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [509 x i8], [509 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @snprintf(i8* %6, i32 509, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [509 x i8], [509 x i8]* %5, i64 0, i64 0
%11 = call i32 @net_send(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s %s +v %s\00"
@.str.1 = [5 x i8] c"MODE\00"
define void @irc_voice(i8* %0, i8* %1) {
%3 = alloca [509 x i8]
%4 = getelementptr inbounds [509 x i8], [509 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 509, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1)
%6 = call i32 @net_send(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ plcvm_get_u32(int /*<<< orphan*/);
int /*<<< orphan*/ plcvm_lpm_u16();
int /*<<< orphan*/ plcvm_push(int /*<<< orphan*/);
void cb_ldm_s4_c16(void) { plcvm_push(plcvm_get_u32(plcvm_lpm_u16())); }


x86 assembly (clang, -O0):
<cb_ldm_s4_c16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <plcvm_lpm_u16@plt>
mov    %eax,%edi
call   1040 <plcvm_get_u32@plt>
mov    %eax,%edi
call   1050 <plcvm_push@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cb_ldm_s4_c16>:
push   %rax
xor    %eax,%eax
call   1030 <plcvm_lpm_u16@plt>
mov    %eax,%edi
call   1040 <plcvm_get_u32@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <plcvm_push@plt>

LLVM IR (-O0):
define void @cb_ldm_s4_c16() {
%1 = call i32 (...) @plcvm_lpm_u16()
%2 = call i32 @plcvm_get_u32(i32 %1)
%3 = call i32 @plcvm_push(i32 %2)
ret void
}

LLVM IR (-O2):
define void @cb_ldm_s4_c16() {
%1 = tail call i32 (...) @plcvm_lpm_u16()
%2 = tail call i32 @plcvm_get_u32(i32 %1)
%3 = tail call i32 @plcvm_push(i32 %2)
ret void
}
void XSetWMClientMachine() {}


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

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

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

LLVM IR (-O2):
define void @XSetWMClientMachine() {
ret void
}
/* Variables and functions */
unsigned long long R(unsigned long long, int);
unsigned long long Sigma1(unsigned long long x) {
  return R(x, 14) ^ R(x, 18) ^ R(x, 41);
}


x86 assembly (clang, -O0):
<Sigma1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xe,%esi
call   1030 <R@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x12,%esi
call   1030 <R@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
xor    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x29,%esi
call   1030 <R@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
xor    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sigma1>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
mov    $0xe,%esi
call   1030 <R@plt>
mov    %rax,%r14
mov    %r15,%rdi
mov    $0x12,%esi
call   1030 <R@plt>
mov    %rax,%rbx
xor    %r14,%rbx
mov    %r15,%rdi
mov    $0x29,%esi
call   1030 <R@plt>
xor    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @Sigma1(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @R(i64 %3, i32 14)
%5 = load i64, i64* %2
%6 = call i64 @R(i64 %5, i32 18)
%7 = xor i64 %4, %6
%8 = load i64, i64* %2
%9 = call i64 @R(i64 %8, i32 41)
%10 = xor i64 %7, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @Sigma1(i64 %0) {
%2 = tail call i64 @R(i64 %0, i32 14)
%3 = tail call i64 @R(i64 %0, i32 18)
%4 = xor i64 %3, %2
%5 = tail call i64 @R(i64 %0, i32 41)
%6 = xor i64 %4, %5
ret i64 %6
}
/* Type definitions */
struct cec_msg {
  int *msg;
};
typedef int __u16;

/* Variables and functions */
void cec_ops_routing_information(const struct cec_msg *msg, __u16 *phys_addr) {
  *phys_addr = (msg->msg[2] << 8) | msg->msg[3];
}


x86 assembly (clang, -O0):
<cec_ops_routing_information>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x8(%rax),%ecx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
or     0xc(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cec_ops_routing_information>:
mov    (%rdi),%rax
mov    0x8(%rax),%ecx
shl    $0x8,%ecx
or     0xc(%rax),%ecx
mov    %ecx,(%rsi)
ret

LLVM IR (-O0):
%struct.cec_msg = type { i32* }
define void @cec_ops_routing_information(%struct.cec_msg* %0, i32* %1) {
%3 = alloca %struct.cec_msg*
%4 = alloca i32*
store %struct.cec_msg* %0, %struct.cec_msg** %3
store i32* %1, i32** %4
%5 = load %struct.cec_msg*, %struct.cec_msg** %3
%6 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %5, i32 0, i32 0
%7 = load i32*, i32** %6
%8 = getelementptr inbounds i32, i32* %7, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = load %struct.cec_msg*, %struct.cec_msg** %3
%12 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %11, i32 0, i32 0
%13 = load i32*, i32** %12
%14 = getelementptr inbounds i32, i32* %13, i64 3
%15 = load i32, i32* %14
%16 = or i32 %10, %15
%17 = load i32*, i32** %4
store i32 %16, i32* %17
ret void
}

LLVM IR (-O2):
%struct.cec_msg = type { i32* }
define void @cec_ops_routing_information(%struct.cec_msg* nocapture %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 0
%4 = load i32*, i32** %3
%5 = getelementptr inbounds i32, i32* %4, i64 2
%6 = load i32, i32* %5
%7 = shl i32 %6, 8
%8 = getelementptr inbounds i32, i32* %4, i64 3
%9 = load i32, i32* %8
%10 = or i32 %7, %9
store i32 %10, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ im_a_benign_func();
int /*<<< orphan*/ im_a_mlaign_func();
void testFuncCompOpti2(void) {
  int a = 1U;
  int b = 1U;
  if (0U == (((a * b) + (a / b) - a) - b)) {
    im_a_benign_func();
  }
  if (0U == (((a * b) + (a / b) - a) - b)) {
    im_a_mlaign_func();
  }
}


x86 assembly (clang, -O0):
<testFuncCompOpti2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
imul   -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
add    %eax,%ecx
sub    -0x4(%rbp),%ecx
sub    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    115d <testFuncCompOpti2+0x3d>
mov    $0x0,%al
call   1040 <im_a_benign_func@plt>
mov    -0x4(%rbp),%ecx
imul   -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
add    %eax,%ecx
sub    -0x4(%rbp),%ecx
sub    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1184 <testFuncCompOpti2+0x64>
mov    $0x0,%al
call   1030 <im_a_mlaign_func@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testFuncCompOpti2() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
store i32 1, i32* %2
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = mul nsw i32 %3, %4
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = sdiv i32 %6, %7
%9 = add nsw i32 %5, %8
%10 = load i32, i32* %1
%11 = sub nsw i32 %9, %10
%12 = load i32, i32* %2
%13 = sub nsw i32 %11, %12
%14 = icmp eq i32 0, %13
br i1 %14, label %15, label %17
15: ; preds = %0
%16 = call i32 (...) @im_a_benign_func()
br label %17
17: ; preds = %15, %0
%18 = load i32, i32* %1
%19 = load i32, i32* %2
%20 = mul nsw i32 %18, %19
%21 = load i32, i32* %1
%22 = load i32, i32* %2
%23 = sdiv i32 %21, %22
%24 = add nsw i32 %20, %23
%25 = load i32, i32* %1
%26 = sub nsw i32 %24, %25
%27 = load i32, i32* %2
%28 = sub nsw i32 %26, %27
%29 = icmp eq i32 0, %28
br i1 %29, label %30, label %32
30: ; preds = %17
%31 = call i32 (...) @im_a_mlaign_func()
br label %32
32: ; preds = %30, %17
ret void
}

LLVM IR (-O2):
define void @testFuncCompOpti2() {
%1 = tail call i32 (...) @im_a_benign_func()
%2 = tail call i32 (...) @im_a_mlaign_func()
ret void
}
/* Variables and functions */
int eingabe(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int outputFunc = eingabe(999);
  printf("The output is %i", outputFunc);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3e7,%edi
call   1040 <eingabe@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"The output is %i\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @eingabe(i32 999)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"The output is %i\00"
define i32 @main() {
%1 = tail call i32 @eingabe(i32 999)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void mus_bint_to_char(unsigned char *j, int x) {
  unsigned char *ox = (unsigned char *)&x;
  j[0] = ox[3];
  j[1] = ox[2];
  j[2] = ox[1];
  j[3] = ox[0];
}


x86 assembly (clang, -O0):
<mus_bint_to_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_bint_to_char>:
bswap  %esi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @mus_bint_to_char(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = bitcast i32* %4 to i8*
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = getelementptr inbounds i8, i8* %7, i64 3
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i64 2
%14 = load i8, i8* %13
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
%17 = load i8*, i8** %5
%18 = getelementptr inbounds i8, i8* %17, i64 1
%19 = load i8, i8* %18
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 2
store i8 %19, i8* %21
%22 = load i8*, i8** %5
%23 = getelementptr inbounds i8, i8* %22, i64 0
%24 = load i8, i8* %23
%25 = load i8*, i8** %3
%26 = getelementptr inbounds i8, i8* %25, i64 3
store i8 %24, i8* %26
ret void
}

LLVM IR (-O2):
define void @mus_bint_to_char(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = lshr i32 %1, 16
%7 = trunc i32 %6 to i8
%8 = lshr i32 %1, 24
%9 = trunc i32 %8 to i8
store i8 %9, i8* %0
%10 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %7, i8* %10
%11 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %5, i8* %11
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %3, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void Tui_Gotoxy(int x, int y) { printf("\x1b[%d;%dH", y, x); }


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

x86 assembly (clang, -O2):
<Tui_Gotoxy>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @Tui_Gotoxy(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
ret void
}
void Sys_FreeFileList(char **list) {
  int i;
  if (!list) {
    return;
  }
  for (i = 0; list[i]; i++) {
    Z_Free(list[i]);
  }
  Z_Free(list);
}


x86 assembly (clang, -O0):
<Sys_FreeFileList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <Sys_FreeFileList+0x1c>
jmp    1172 <Sys_FreeFileList+0x62>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1167 <Sys_FreeFileList+0x57>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1030 <Z_Free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <Sys_FreeFileList+0x23>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <Z_Free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sys_FreeFileList>:
test   %rdi,%rdi
je     1154 <Sys_FreeFileList+0x44>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1143 <Sys_FreeFileList+0x33>
lea    0x8(%r14),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <Z_Free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <Sys_FreeFileList+0x20>
mov    %r14,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <Z_Free@plt>
ret

LLVM IR (-O0):
define void @Sys_FreeFileList(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = icmp ne i8** %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
br label %28
7: ; preds = %1
store i32 0, i32* %3
br label %8
8: ; preds = %22, %7
%9 = load i8**, i8*** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8*, i8** %9, i64 %11
%13 = load i8*, i8** %12
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %25
15: ; preds = %8
%16 = load i8**, i8*** %2
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8*, i8** %16, i64 %18
%20 = load i8*, i8** %19
%21 = call i32 (i8*, ...) bitcast (i32 (...)* @Z_Free to i32 (i8*, ...)*)(i8* %20)
br label %22
22: ; preds = %15
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %8
25: ; preds = %8
%26 = load i8**, i8*** %2
%27 = call i32 (i8**, ...) bitcast (i32 (...)* @Z_Free to i32 (i8**, ...)*)(i8** %26)
br label %28
28: ; preds = %25, %6
ret void
}

LLVM IR (-O2):
define void @Sys_FreeFileList(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %14, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %10, %6 ], [ 0, %3 ]
%8 = phi i8* [ %12, %6 ], [ %4, %3 ]
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @Z_Free to i32 (i8*, ...)*)(i8* %8)
%10 = add nuw i64 %7, 1
%11 = getelementptr inbounds i8*, i8** %0, i64 %10
%12 = load i8*, i8** %11
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %6
14: ; preds = %6, %3
%15 = tail call i32 (i8**, ...) bitcast (i32 (...)* @Z_Free to i32 (i8**, ...)*)(i8** %0)
br label %16
16: ; preds = %1, %14
ret void
}
/* Type definitions */
struct nlattr {
  int dummy;
};
typedef int /*<<< orphan*/ __u16;

/* Variables and functions */
scalar_t__ nla_data(struct nlattr *);
__u16 nla_get_u16(struct nlattr *nla) { return *(__u16 *)nla_data(nla); }


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

x86 assembly (clang, -O2):
<nla_get_u16>:
push   %rax
call   1030 <nla_data@plt>
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.nlattr = type { i32 }
define i32 @nla_get_u16(%struct.nlattr* %0) {
%2 = alloca %struct.nlattr*
store %struct.nlattr* %0, %struct.nlattr** %2
%3 = load %struct.nlattr*, %struct.nlattr** %2
%4 = call i64 @nla_data(%struct.nlattr* %3)
%5 = inttoptr i64 %4 to i32*
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.nlattr = type { i32 }
define i32 @nla_get_u16(%struct.nlattr* %0) {
%2 = tail call i64 @nla_data(%struct.nlattr* %0)
%3 = inttoptr i64 %2 to i32*
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xc5() {
  Assert_real((isupper(197) == 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_isupper.c",
              990, ("isupper should be 0 for 0xc5"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0xc5>:
push   %rax
mov    $0xc5,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3de,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xc5\00"
define void @t_isupper_0xc5() {
%1 = call i64 @isupper(i32 197)
%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 990, 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xc5\00"
define void @t_isupper_0xc5() {
%1 = tail call i64 @isupper(i32 197)
%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 990, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void init_udp(void) { return; }


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

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

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

LLVM IR (-O2):
define void @init_udp() {
ret void
}