xunge/DecIR huggingface dataset:
int primitiveSmallInteger_NotEqual_(int receiver, int *arguments) {
  if ((receiver & 1) && (arguments[0] & 1)) {
    return receiver != arguments[0] ? (10 << 2) : (20 << 2);
  }
  return (1 << 2);
}


x86 assembly (clang, -O0):
<primitiveSmallInteger_NotEqual_>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     114c <primitiveSmallInteger_NotEqual_+0x4c>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     114c <primitiveSmallInteger_NotEqual_+0x4c>
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    $0x50,%eax
mov    $0x28,%ecx
cmp    %esi,%edx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <primitiveSmallInteger_NotEqual_+0x53>
movl   $0x4,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitiveSmallInteger_NotEqual_>:
mov    $0x4,%eax
test   $0x1,%dil
je     1121 <primitiveSmallInteger_NotEqual_+0x21>
mov    (%rsi),%ecx
test   $0x1,%cl
je     1121 <primitiveSmallInteger_NotEqual_+0x21>
cmp    %edi,%ecx
mov    $0x50,%ecx
mov    $0x28,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @primitiveSmallInteger_NotEqual_(i32 %0, i32* nocapture %1) {
%3 = and i32 %0, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = load i32, i32* %1
%7 = and i32 %6, 1
%8 = icmp eq i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %5
%10 = icmp eq i32 %6, %0
%11 = select i1 %10, i32 80, i32 40
br label %12
12: ; preds = %2, %5, %9
%13 = phi i32 [ %11, %9 ], [ 4, %5 ], [ 4, %2 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_strip_nl() {
  printf("NOT IMPLEMENTED:"
         "pa_strip_nl"
         "\n");
}


x86 assembly (clang, -O0):
<pa_strip_nl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [29 x i8] c"NOT IMPLEMENTED:pa_strip_nl\0A\00"
define i32 @pa_strip_nl() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [28 x i8] c"NOT IMPLEMENTED:pa_strip_nl\00"
define i32 @pa_strip_nl() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
bool nrf52_errata_199(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_199() {
ret i32 0
}
int LZ4_sizeofState() { return (((1 << (14 - 3)) + 4) * sizeof(long long)); }


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

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

LLVM IR (-O0):
define i32 @LZ4_sizeofState() {
ret i32 16416
}

LLVM IR (-O2):
define i32 @LZ4_sizeofState() {
ret i32 16416
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ send_errno(int /*<<< orphan*/);
int /*<<< orphan*/ send_success();
scalar_t__ symlink(char *, char *);
void do_symlink(int argc, char **argv) {
  assert(argc == 2);
  if (symlink(argv[0], argv[1]) == 0) {
    send_success();
  } else {
    send_errno(errno);
  }
}


x86 assembly (clang, -O0):
<do_symlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <symlink@plt>
cmp    $0x0,%rax
jne    118a <do_symlink+0x4a>
mov    $0x0,%al
call   1050 <send_success@plt>
jmp    1198 <do_symlink+0x58>
mov    0x2e4f(%rip),%rax
mov    (%rax),%edi
call   1060 <send_errno@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_symlink>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
cmp    $0x2,%edi
sete   %al
mov    %eax,%edi
call   1040 <assert@plt>
mov    (%rbx),%rdi
mov    0x8(%rbx),%rsi
call   1030 <symlink@plt>
test   %rax,%rax
je     1173 <do_symlink+0x33>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
pop    %rbx
jmp    1060 <send_errno@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <send_success@plt>

LLVM IR (-O0):
@errno = global i32 0
define void @do_symlink(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 = icmp eq i32 %5, 2
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = load i8**, i8*** %4
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i64 @symlink(i8* %11, i8* %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = call i32 (...) @send_success()
br label %22
19: ; preds = %2
%20 = load i32, i32* @errno
%21 = call i32 @send_errno(i32 %20)
br label %22
22: ; preds = %19, %17
ret void
}

LLVM IR (-O2):
@errno = global i32 0
define void @do_symlink(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = load i8*, i8** %1
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i64 @symlink(i8* %6, i8* %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = tail call i32 (...) @send_success()
br label %16
13: ; preds = %2
%14 = load i32, i32* @errno
%15 = tail call i32 @send_errno(i32 %14)
br label %16
16: ; preds = %13, %11
ret void
}
__attribute__((no, noclone)) int bar(int flag, const char *__restrict format,
                                     ...) {
  asm volatile("" : : "r"(flag), "r"(format) : "memory");
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @bar(i32 %0, i8* noalias %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
ret i32 0
}

LLVM IR (-O2):
define i32 @bar(i32 %0, i8* noalias %1, ...) {
tail call void asm sideeffect "", "r,r,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 %0, i8* %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *stderr;
FILE *PosixRedirect_stderr() { return stderr; }


x86 assembly (clang, -O0):
<PosixRedirect_stderr>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PosixRedirect_stderr>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
@stderr = global i32* null
define i32* @PosixRedirect_stderr() {
%1 = load i32*, i32** @stderr
ret i32* %1
}

LLVM IR (-O2):
@stderr = global i32* null
define i32* @PosixRedirect_stderr() {
%1 = load i32*, i32** @stderr
ret i32* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *const, char const *const,
                          char const *const, char const *const);
void describe_dict_fn(const char *const lang, const char *const name,
                      const char *const desc, const char *const file,
                      void *ud) {
  printf("%s: %s '%s' (%s)\n", lang, name, desc, file);
}


x86 assembly (clang, -O0):
<describe_dict_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<describe_dict_fn>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xedd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"%s: %s '%s' (%s)\0A\00"
define void @describe_dict_fn(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i8*, i8** %9
%15 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12, i8* %13, i8* %14)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"%s: %s '%s' (%s)\0A\00"
define void @describe_dict_fn(i8* %0, i8* %1, i8* %2, i8* %3, i8* nocapture readnone %4) {
%6 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
main() {
  system("perl -le 'print $_%15?$_%5?$_%3?$_:Fizz:Buzz:FizzBuzz for(1..100)'");
}


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

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

LLVM IR (-O0):
@.str = [67 x i8] c"perl -le 'print $_%15?$_%5?$_%3?$_:Fizz:Buzz:FizzBuzz for(1..100)'\00"
define i32 @main() {
%1 = call i32 @system(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [67 x i8] c"perl -le 'print $_%15?$_%5?$_%3?$_:Fizz:Buzz:FizzBuzz for(1..100)'\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int ql_readbyte(unsigned long);
short GetMemW(unsigned long address) {
  return ((ql_readbyte(address) << 8) | ql_readbyte(address + 1));
}


x86 assembly (clang, -O0):
<GetMemW>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ql_readbyte@plt>
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1030 <ql_readbyte@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
or     %ecx,%eax
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetMemW>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <ql_readbyte@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
add    $0x1,%rbx
mov    %rbx,%rdi
call   1030 <ql_readbyte@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define signext i16 @GetMemW(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @ql_readbyte(i64 %3)
%5 = shl i32 %4, 8
%6 = load i64, i64* %2
%7 = add i64 %6, 1
%8 = call i32 @ql_readbyte(i64 %7)
%9 = or i32 %5, %8
%10 = trunc i32 %9 to i16
ret i16 %10
}

LLVM IR (-O2):
define signext i16 @GetMemW(i64 %0) {
%2 = tail call i32 @ql_readbyte(i64 %0)
%3 = shl i32 %2, 8
%4 = add i64 %0, 1
%5 = tail call i32 @ql_readbyte(i64 %4)
%6 = or i32 %3, %5
%7 = trunc i32 %6 to i16
ret i16 %7
}
double mu_timer_real() { return -1.0; }


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

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

LLVM IR (-O0):
define double @mu_timer_real() {
ret double -1.000000e+00
}

LLVM IR (-O2):
define double @mu_timer_real() {
ret double -1.000000e+00
}
__attribute__((always_)) void module_param_sysfs_remove(struct module *mod) {}


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

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

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

LLVM IR (-O2):
%struct.module = type opaque
define void @module_param_sysfs_remove(%struct.module* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ sigpending(int /*<<< orphan*/ *);
void xpending(sigset_t *set) {
  if (sigpending(set) != 0)
    abort();
}


x86 assembly (clang, -O0):
<xpending>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <sigpending@plt>
cmp    $0x0,%rax
je     1146 <xpending+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xpending>:
push   %rax
call   1040 <sigpending@plt>
test   %rax,%rax
jne    112d <xpending+0xd>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @xpending(i32* %0) {
%2 = tail call i64 @sigpending(i32* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret void
}
int ZeroIntegerSparseVector(iq_p, nzq_p, irq_p, nzrq_p)
int *iq_p, *irq_p, *nzq_p, *nzrq_p;
{
  int *irq_ps, *iq_q;
  iq_q = iq_p - 1;
  irq_ps = irq_p + *nzrq_p;
  for (; irq_p < irq_ps; irq_p++)
    *(iq_q + *irq_p) = 0;
  return 0;
}


x86 assembly (clang, -O0):
<ZeroIntegerSparseVector>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    1167 <ZeroIntegerSparseVector+0x67>
mov    -0x30(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
jmp    1136 <ZeroIntegerSparseVector+0x36>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZeroIntegerSparseVector>:
movslq (%rcx),%rax
test   %rax,%rax
jle    1124 <ZeroIntegerSparseVector+0x24>
lea    (%rdx,%rax,4),%rax
nopl   0x0(%rax)
movslq (%rdx),%rcx
movl   $0x0,-0x4(%rdi,%rcx,4)
add    $0x4,%rdx
cmp    %rax,%rdx
jb     1110 <ZeroIntegerSparseVector+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ZeroIntegerSparseVector(i32* nocapture writeonly %0, i32* nocapture readnone %1, i32* %2, i32* nocapture %3) {
%5 = getelementptr inbounds i32, i32* %0, i64 -1
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %2, i64 %7
%9 = icmp sgt i32 %6, 0
br i1 %9, label %10, label %17
10: ; preds = %4, %10
%11 = phi i32* [ %15, %10 ], [ %2, %4 ]
%12 = load i32, i32* %11
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %5, i64 %13
store i32 0, i32* %14
%15 = getelementptr inbounds i32, i32* %11, i64 1
%16 = icmp ult i32* %15, %8
br i1 %16, label %10, label %17
17: ; preds = %10, %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ expression();
int /*<<< orphan*/ match(char);
int /*<<< orphan*/ popCompare();
int /*<<< orphan*/ setEqual();
void equals() {
  match('=');
  expression();
  popCompare();
  setEqual();
}


x86 assembly (clang, -O0):
<equals>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3d,%edi
call   1060 <match@plt>
mov    $0x0,%al
call   1040 <expression@plt>
mov    $0x0,%al
call   1030 <popCompare@plt>
mov    $0x0,%al
call   1050 <setEqual@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<equals>:
push   %rax
mov    $0x3d,%edi
call   1060 <match@plt>
xor    %eax,%eax
call   1040 <expression@plt>
xor    %eax,%eax
call   1030 <popCompare@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <setEqual@plt>

LLVM IR (-O0):
define void @equals() {
%1 = call i32 @match(i8 signext 61)
%2 = call i32 (...) @expression()
%3 = call i32 (...) @popCompare()
%4 = call i32 (...) @setEqual()
ret void
}

LLVM IR (-O2):
define void @equals() {
%1 = tail call i32 @match(i8 signext 61)
%2 = tail call i32 (...) @expression()
%3 = tail call i32 (...) @popCompare()
%4 = tail call i32 (...) @setEqual()
ret void
}
/* Type definitions */
struct v7_call_frame_bcode {
  int dummy;
};
struct v7 {
  int dummy;
};

/* Variables and functions */
scalar_t__ find_call_frame(struct v7 *, int);
struct v7_call_frame_bcode *find_call_frame_bcode(struct v7 *v7) {
  return (struct v7_call_frame_bcode *)find_call_frame(v7, (1 << 0));
}


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

x86 assembly (clang, -O2):
<find_call_frame_bcode>:
mov    $0x1,%esi
jmp    1030 <find_call_frame@plt>

LLVM IR (-O0):
%struct.v7_call_frame_bcode = type { i32 }
%struct.v7 = type { i32 }
define %struct.v7_call_frame_bcode* @find_call_frame_bcode(%struct.v7* %0) {
%2 = alloca %struct.v7*
store %struct.v7* %0, %struct.v7** %2
%3 = load %struct.v7*, %struct.v7** %2
%4 = call i64 @find_call_frame(%struct.v7* %3, i32 1)
%5 = inttoptr i64 %4 to %struct.v7_call_frame_bcode*
ret %struct.v7_call_frame_bcode* %5
}

LLVM IR (-O2):
%struct.v7_call_frame_bcode = type { i32 }
%struct.v7 = type { i32 }
define %struct.v7_call_frame_bcode* @find_call_frame_bcode(%struct.v7* %0) {
%2 = tail call i64 @find_call_frame(%struct.v7* %0, i32 1)
%3 = inttoptr i64 %2 to %struct.v7_call_frame_bcode*
ret %struct.v7_call_frame_bcode* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("HELLO WORLD\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"HELLO WORLD\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"HELLO WORLD\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ p();
int /*<<< orphan*/ q();
int /*<<< orphan*/ r();
int main() {
  p();
  q();
  r();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <p@plt>
mov    $0x0,%al
call   1050 <q@plt>
mov    $0x0,%al
call   1030 <r@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @p()
%3 = call i32 (...) @q()
%4 = call i32 (...) @r()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @p()
%2 = tail call i32 (...) @q()
%3 = tail call i32 (...) @r()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ aarch64_mem_size(size_t *);
void hvt_mem_size(size_t *mem_size) { aarch64_mem_size(mem_size); }


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

x86 assembly (clang, -O2):
<hvt_mem_size>:
jmp    1030 <aarch64_mem_size@plt>

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

LLVM IR (-O2):
define void @hvt_mem_size(i64* %0) {
%2 = tail call i32 @aarch64_mem_size(i64* %0)
ret void
}
/* Variables and functions */
int __stub_false() { return false; }


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

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

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

LLVM IR (-O2):
define i32 @__stub_false() {
ret i32 0
}
int gcd(int a, int b) {
  int divider;
  for (int i = 2; i < a && i < b; i++) {
    if (a % i == 0 && b % i == 0) {
      divider = i;
    }
    return divider;
  }
  return 1;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0x15(%rbp)
jge    112e <gcd+0x2e>
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
setl   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    113e <gcd+0x3e>
jmp    116f <gcd+0x6f>
mov    -0x8(%rbp),%eax
cltd
idivl  -0x14(%rbp)
cmp    $0x0,%edx
jne    1164 <gcd+0x64>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x14(%rbp)
cmp    $0x0,%edx
jne    1164 <gcd+0x64>
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1176 <gcd+0x76>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
cmp    $0x3,%edi
setge  %al
cmp    $0x3,%esi
setge  %cl
and    %al,%cl
movzbl %cl,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @gcd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 2, i32* %7
br label %8
8: ; preds = %32, %2
%9 = load i32, i32* %7
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i32, i32* %7
%14 = load i32, i32* %5
%15 = icmp slt i32 %13, %14
br label %16
16: ; preds = %12, %8
%17 = phi i1 [ false, %8 ], [ %15, %12 ]
br i1 %17, label %18, label %35
18: ; preds = %16
%19 = load i32, i32* %4
%20 = load i32, i32* %7
%21 = srem i32 %19, %20
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %30
23: ; preds = %18
%24 = load i32, i32* %5
%25 = load i32, i32* %7
%26 = srem i32 %24, %25
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %23
%29 = load i32, i32* %7
store i32 %29, i32* %6
br label %30
30: ; preds = %28, %23, %18
%31 = load i32, i32* %6
store i32 %31, i32* %3
br label %36
32: ; No predecessors!
%33 = load i32, i32* %7
%34 = add nsw i32 %33, 1
store i32 %34, i32* %7
br label %8
35: ; preds = %16
store i32 1, i32* %3
br label %36
36: ; preds = %35, %30
%37 = load i32, i32* %3
ret i32 %37
}

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 2
%4 = icmp sgt i32 %1, 2
%5 = and i1 %3, %4
%6 = select i1 %5, i32 2, i32 1
ret i32 %6
}
int main(int argc, char *argv[]) {}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ visit(char *);
int main(int argc, char **argv) {
  int i;
  for (i = 1; i < argc; i++) {
    visit(argv[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1158 <main+0x48>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <visit@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1142 <main+0x32>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1030 <visit@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @visit(i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcmp(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ memcpy(char *, char *, int /*<<< orphan*/);
int main() {
  char *str1 = "Hello World";
  char *str2 = "Hello Dave";
  char *str3 = "Hello World";
  return !memcmp(memcpy(str1, str2, 0), str3, 12);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xecb(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xeb4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
xor    %edx,%edx
call   1040 <memcpy@plt>
mov    %eax,%edi
mov    -0x20(%rbp),%rsi
mov    $0xc,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xedd(%rip),%rsi
mov    %rbx,%rdi
xor    %edx,%edx
call   1040 <memcpy@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    $0xc,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Hello World\00"
@.str.1 = [11 x i8] c"Hello Dave\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %3
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = load i8*, i8** %2
%6 = load i8*, i8** %3
%7 = call i32 @memcpy(i8* %5, i8* %6, i32 0)
%8 = load i8*, i8** %4
%9 = call i32 @memcmp(i32 %7, i8* %8, i32 12)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello World\00"
@.str.1 = [11 x i8] c"Hello Dave\00"
define i32 @main() {
%1 = tail call i32 @memcpy(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 0)
%2 = tail call i32 @memcmp(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 12)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
scalar_t__ lseek(int, long, int /*<<< orphan*/);
scalar_t__ read(int, char *, int);
int probe(int f, long offset) {
  char c;
  return (lseek(f, offset, SEEK_SET) >= 0) && read(f, &c, 1);
}


x86 assembly (clang, -O0):
<probe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    0x2ea3(%rip),%rax
mov    (%rax),%edx
call   1030 <lseek@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x12(%rbp)
jl     1171 <probe+0x51>
mov    -0x4(%rbp),%edi
lea    -0x11(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<probe>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
call   1030 <lseek@plt>
test   %rax,%rax
js     1158 <probe+0x38>
lea    0xf(%rsp),%rsi
mov    %ebx,%edi
mov    $0x1,%edx
call   1040 <read@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    115a <probe+0x3a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
define i32 @probe(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i8
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = load i32, i32* %3
%7 = load i64, i64* %4
%8 = load i32, i32* @SEEK_SET
%9 = call i64 @lseek(i32 %6, i64 %7, i32 %8)
%10 = icmp sge i64 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* %3
%13 = call i64 @read(i32 %12, i8* %5, i32 1)
%14 = icmp ne i64 %13, 0
br label %15
15: ; preds = %11, %2
%16 = phi i1 [ false, %2 ], [ %14, %11 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define i32 @probe(i32 %0, i64 %1) {
%3 = alloca i8
%4 = load i32, i32* @SEEK_SET
%5 = tail call i64 @lseek(i32 %0, i64 %1, i32 %4)
%6 = icmp sgt i64 %5, -1
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = call i64 @read(i32 %0, i8* %3, i32 1)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %2
%12 = phi i32 [ 0, %2 ], [ %10, %7 ]
ret i32 %12
}
void dumpTempQueue() {}


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

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

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

LLVM IR (-O2):
define void @dumpTempQueue() {
ret void
}
char alternativa(int a) {
  if (a == 0)
    return 'A';
  else if (a == 1)
    return 'B';
  else if (a == 2)
    return 'C';
  else if (a == 3)
    return 'D';
  else
    return 'E';
}


x86 assembly (clang, -O0):
<alternativa>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111a <alternativa+0x1a>
movb   $0x41,-0x1(%rbp)
jmp    1157 <alternativa+0x57>
cmpl   $0x1,-0x8(%rbp)
jne    112d <alternativa+0x2d>
movb   $0x42,-0x1(%rbp)
jmp    1157 <alternativa+0x57>
cmpl   $0x2,-0x8(%rbp)
jne    1140 <alternativa+0x40>
movb   $0x43,-0x1(%rbp)
jmp    1157 <alternativa+0x57>
cmpl   $0x3,-0x8(%rbp)
jne    1153 <alternativa+0x53>
movb   $0x44,-0x1(%rbp)
jmp    1157 <alternativa+0x57>
movb   $0x45,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alternativa>:
lea    0x41(%rdi),%eax
cmp    $0x4,%edi
movzbl %al,%ecx
mov    $0x45,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @alternativa(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8 65, i8* %2
br label %20
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %7
store i8 66, i8* %2
br label %20
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 2
br i1 %13, label %14, label %15
14: ; preds = %11
store i8 67, i8* %2
br label %20
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 3
br i1 %17, label %18, label %19
18: ; preds = %15
store i8 68, i8* %2
br label %20
19: ; preds = %15
store i8 69, i8* %2
br label %20
20: ; preds = %19, %18, %14, %10, %6
%21 = load i8, i8* %2
ret i8 %21
}

LLVM IR (-O2):
define signext i8 @alternativa(i32 %0) {
%2 = icmp ult i32 %0, 4
%3 = trunc i32 %0 to i8
%4 = add i8 %3, 65
%5 = select i1 %2, i8 %4, i8 69
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ stb__sort_int_ins_sort(int *, int);
int /*<<< orphan*/ stb__sort_int_quicksort(int *, int);
void sort_int(int *p, int n) {
  stb__sort_int_quicksort(p, n);
  stb__sort_int_ins_sort(p, n);
}


x86 assembly (clang, -O0):
<sort_int>:
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   1040 <stb__sort_int_quicksort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <stb__sort_int_ins_sort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort_int>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <stb__sort_int_quicksort@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <stb__sort_int_ins_sort@plt>

LLVM IR (-O0):
define void @sort_int(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* %4
%7 = call i32 @stb__sort_int_quicksort(i32* %5, i32 %6)
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = call i32 @stb__sort_int_ins_sort(i32* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @sort_int(i32* %0, i32 %1) {
%3 = tail call i32 @stb__sort_int_quicksort(i32* %0, i32 %1)
%4 = tail call i32 @stb__sort_int_ins_sort(i32* %0, i32 %1)
ret void
}
void swap(struct list_elem **a, struct list_elem **b) {
  struct list_elem *t = *a;
  *a = *b;
  *b = t;
}


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

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
mov    %rcx,(%rdi)
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
%struct.list_elem = type opaque
define void @swap(%struct.list_elem** %0, %struct.list_elem** %1) {
%3 = alloca %struct.list_elem**
%4 = alloca %struct.list_elem**
%5 = alloca %struct.list_elem*
store %struct.list_elem** %0, %struct.list_elem*** %3
store %struct.list_elem** %1, %struct.list_elem*** %4
%6 = load %struct.list_elem**, %struct.list_elem*** %3
%7 = load %struct.list_elem*, %struct.list_elem** %6
store %struct.list_elem* %7, %struct.list_elem** %5
%8 = load %struct.list_elem**, %struct.list_elem*** %4
%9 = load %struct.list_elem*, %struct.list_elem** %8
%10 = load %struct.list_elem**, %struct.list_elem*** %3
store %struct.list_elem* %9, %struct.list_elem** %10
%11 = load %struct.list_elem*, %struct.list_elem** %5
%12 = load %struct.list_elem**, %struct.list_elem*** %4
store %struct.list_elem* %11, %struct.list_elem** %12
ret void
}

LLVM IR (-O2):
%struct.list_elem = type opaque
define void @swap(%struct.list_elem** nocapture %0, %struct.list_elem** nocapture %1) {
%3 = load %struct.list_elem*, %struct.list_elem** %0
%4 = load %struct.list_elem*, %struct.list_elem** %1
store %struct.list_elem* %4, %struct.list_elem** %0
store %struct.list_elem* %3, %struct.list_elem** %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
size_t wcslen(const wchar_t *str) {
  size_t len = 0;
  while (*(str++))
    len++;
  return len;
}


x86 assembly (clang, -O0):
<wcslen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
cmpl   $0x0,(%rax)
je     1139 <wcslen+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <wcslen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcslen>:
cmpl   $0x0,(%rdi)
je     111f <wcslen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpl   $0x0,0x4(%rdi,%rcx,4)
mov    %rax,%rcx
jne    1110 <wcslen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @wcslen(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i32* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = add i64 %5, 1
%9 = load i32, i32* %7
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
/* Variables and functions */
int sum(char *);
int main() { return sum("asdf") % 256; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <sum@plt>
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <sum@plt>
lea    0xff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffff00,%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sum(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = srem i32 %2, 256
ret i32 %3
}

LLVM IR (-O2):
@.str = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = tail call i32 @sum(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = srem i32 %1, 256
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strcpy(char *, char *);
void getInput(char *input) {
  char buffer[256];
  if (fgets(buffer, sizeof(buffer), stdin)) {
    strcpy(input, buffer);
  }
}


x86 assembly (clang, -O0):
<getInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
mov    $0x100,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     1163 <getInput+0x43>
mov    -0x8(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getInput>:
push   %rbx
sub    $0x100,%rsp
mov    %rdi,%rbx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rdi
mov    $0x100,%esi
call   1040 <fgets@plt>
test   %rax,%rax
je     1151 <getInput+0x31>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define void @getInput(i8* %0) {
%2 = alloca i8*
%3 = alloca [256 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i64 @fgets(i8* %4, i32 256, i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%11 = call i32 @strcpy(i8* %9, i8* %10)
br label %12
12: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
define void @getInput(i8* %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i64 @fgets(i8* %3, i32 256, i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @strcpy(i8* %0, i8* %3)
br label %9
9: ; preds = %7, %1
ret void
}
/* Type definitions */
typedef int int16_t;

/* Variables and functions */
__attribute__((const)) int16_t av_clip_int16(int a) {
  if ((a + 0x8000) & ~0xFFFF)
    return (a >> 31) ^ 0x7FFF;
  else
    return a;
}


x86 assembly (clang, -O0):
<av_clip_int16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x8000,%eax
and    $0xffff0000,%eax
cmp    $0x0,%eax
je     1130 <av_clip_int16+0x30>
mov    -0x8(%rbp),%eax
sar    $0x1f,%eax
xor    $0x7fff,%eax
mov    %eax,-0x4(%rbp)
jmp    1136 <av_clip_int16+0x36>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_clip_int16>:
cmp    $0xffff8001,%edi
mov    $0xffff8000,%ecx
cmovge %edi,%ecx
cmp    $0x7fff,%ecx
mov    $0x7fff,%eax
cmovl  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @av_clip_int16(i32 %0) {
%2 = icmp sgt i32 %0, -32768
%3 = select i1 %2, i32 %0, i32 -32768
%4 = icmp slt i32 %3, 32767
%5 = select i1 %4, i32 %3, i32 32767
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ polyglot_array_typeid(int /*<<< orphan*/,
                                         int /*<<< orphan*/);
int /*<<< orphan*/ polyglot_boolean_typeid();
void *polyglot_from_typed(int *, int /*<<< orphan*/);
__attribute__((always_)) void *polyglot_from_boolean_array(bool *arr,
                                                           uint64_t len) {
  return polyglot_from_typed(
      arr, polyglot_array_typeid(polyglot_boolean_typeid(), len));
}


x86 assembly (clang, -O0):
<polyglot_from_boolean_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <polyglot_boolean_typeid@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1050 <polyglot_array_typeid@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <polyglot_from_typed@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<polyglot_from_boolean_array>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <polyglot_boolean_typeid@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1050 <polyglot_array_typeid@plt>
mov    %r14,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <polyglot_from_typed@plt>

LLVM IR (-O0):
define i8* @polyglot_from_boolean_array(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 = call i32 (...) @polyglot_boolean_typeid()
%7 = load i32, i32* %4
%8 = call i32 @polyglot_array_typeid(i32 %6, i32 %7)
%9 = call i8* @polyglot_from_typed(i32* %5, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @polyglot_from_boolean_array(i32* %0, i32 %1) {
%3 = tail call i32 (...) @polyglot_boolean_typeid()
%4 = tail call i32 @polyglot_array_typeid(i32 %3, i32 %1)
%5 = tail call i8* @polyglot_from_typed(i32* %0, i32 %4)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ printf(char *, void *);
void Free2(void *ptr) {
  printf("BMGR Freeing %p \n", ptr);
  free(ptr);
}


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

x86 assembly (clang, -O2):
<Free2>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"BMGR Freeing %p \0A\00"
define void @Free2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"BMGR Freeing %p \0A\00"
define void @Free2(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @free(i8* %0)
ret void
}
void g(int **(*fp)(const char *, const char **)) { fp(0, 0); }


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
mov    %rdi,%rax
xor    %edi,%edi
xor    %esi,%esi
jmp    *%rax

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

LLVM IR (-O2):
define void @g(i32** (i8*, i8**)* nocapture %0) {
%2 = tail call i32** %0(i8* null, i8** null)
ret void
}
void gtk_tool_item_get_toolbar_style() {}


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

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

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

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