xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
struct passwd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
struct passwd *getpwuid(uid_t uid __attribute__((unused))) {
  errno = ENOSYS;
  return NULL;
}


x86 assembly (clang, -O0):
<getpwuid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec1(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.passwd = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define %struct.passwd* @getpwuid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret %struct.passwd* null
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define noalias %struct.passwd* @getpwuid(i32 %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret %struct.passwd* null
}
int clampValuemax(int value, int maxValue) {
  if (value < 0) {
    return 0;
  } else {
    if (value >= maxValue) {
      return maxValue - 1;
    } else {
      return value;
    }
  }
}


x86 assembly (clang, -O0):
<clampValuemax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1120 <clampValuemax+0x20>
movl   $0x0,-0x4(%rbp)
jmp    1140 <clampValuemax+0x40>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     113a <clampValuemax+0x3a>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1140 <clampValuemax+0x40>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clampValuemax>:
lea    -0x1(%rsi),%ecx
cmp    %esi,%edi
cmovl  %edi,%ecx
xor    %eax,%eax
test   %edi,%edi
cmovns %ecx,%eax
ret

LLVM IR (-O0):
define i32 @clampValuemax(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 = icmp slt i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %18
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = icmp sge i32 %10, %11
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = load i32, i32* %5
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %3
br label %18
16: ; preds = %9
%17 = load i32, i32* %4
store i32 %17, i32* %3
br label %18
18: ; preds = %16, %13, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @clampValuemax(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 0
%4 = icmp slt i32 %0, %1
%5 = add nsw i32 %1, -1
%6 = select i1 %4, i32 %0, i32 %5
%7 = select i1 %3, i32 0, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, int);
void test_allocate() {
  int *p = (int *)malloc(sizeof(int));
  *p = 100;
  printf("%d\n", *p);
  free(p);
}


x86 assembly (clang, -O0):
<test_allocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x64,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_allocate>:
push   %rbx
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
movl   $0x64,(%rax)
lea    0xeb5(%rip),%rdi
mov    $0x64,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @test_allocate() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
store i32 100, i32* %4
%5 = load i32*, i32** %1
%6 = load i32, i32* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32*, i32** %1
%9 = call i32 @free(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @test_allocate() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
store i32 100, i32* %2
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 100)
%4 = tail call i32 @free(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ genvalue(unsigned char *);
int /*<<< orphan*/ printbytes(unsigned char *);
int /*<<< orphan*/ scalarmult(unsigned char *, unsigned char *,
                              unsigned char *);
int main() {
  unsigned char q[32], n[32], p[32];
  genvalue(n);
  genvalue(p);
  scalarmult(q, n, p);
  printbytes(q);
  printbytes(n);
  printbytes(p);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x40(%rbp),%rdi
call   1030 <genvalue@plt>
lea    -0x60(%rbp),%rdi
call   1030 <genvalue@plt>
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x60(%rbp),%rdx
call   1040 <scalarmult@plt>
lea    -0x20(%rbp),%rdi
call   1050 <printbytes@plt>
lea    -0x40(%rbp),%rdi
call   1050 <printbytes@plt>
lea    -0x60(%rbp),%rdi
call   1050 <printbytes@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x60,%rsp
lea    0x20(%rsp),%r14
mov    %r14,%rdi
call   1030 <genvalue@plt>
mov    %rsp,%r15
mov    %r15,%rdi
call   1030 <genvalue@plt>
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <scalarmult@plt>
mov    %rbx,%rdi
call   1050 <printbytes@plt>
mov    %r14,%rdi
call   1050 <printbytes@plt>
mov    %r15,%rdi
call   1050 <printbytes@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [32 x i8]
%2 = alloca [32 x i8]
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%5 = call i32 @genvalue(i8* %4)
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%7 = call i32 @genvalue(i8* %6)
%8 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%10 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%11 = call i32 @scalarmult(i8* %8, i8* %9, i8* %10)
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%13 = call i32 @printbytes(i8* %12)
%14 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%15 = call i32 @printbytes(i8* %14)
%16 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%17 = call i32 @printbytes(i8* %16)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [32 x i8]
%2 = alloca [32 x i8]
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%7 = call i32 @genvalue(i8* %5)
%8 = call i32 @genvalue(i8* %6)
%9 = call i32 @scalarmult(i8* %4, i8* %5, i8* %6)
%10 = call i32 @printbytes(i8* %4)
%11 = call i32 @printbytes(i8* %5)
%12 = call i32 @printbytes(i8* %6)
ret i32 0
}
/* Type definitions */
struct vnic_intr {
  int dummy;
};

/* Variables and functions */
unsigned int svnic_intr_credits(struct vnic_intr *);
int /*<<< orphan*/ svnic_intr_return_credits(struct vnic_intr *, unsigned int,
                                             int, int);
void svnic_intr_return_all_credits(struct vnic_intr *intr) {
  unsigned int credits = svnic_intr_credits(intr);
  int unmask = 1;
  int reset_timer = 1;
  svnic_intr_return_credits(intr, credits, unmask, reset_timer);
}


x86 assembly (clang, -O0):
<svnic_intr_return_all_credits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <svnic_intr_credits@plt>
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1040 <svnic_intr_return_credits@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svnic_intr_return_all_credits>:
push   %rbx
mov    %rdi,%rbx
call   1030 <svnic_intr_credits@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
pop    %rbx
jmp    1040 <svnic_intr_return_credits@plt>

LLVM IR (-O0):
%struct.vnic_intr = type { i32 }
define void @svnic_intr_return_all_credits(%struct.vnic_intr* %0) {
%2 = alloca %struct.vnic_intr*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store %struct.vnic_intr* %0, %struct.vnic_intr** %2
%6 = load %struct.vnic_intr*, %struct.vnic_intr** %2
%7 = call i32 @svnic_intr_credits(%struct.vnic_intr* %6)
store i32 %7, i32* %3
store i32 1, i32* %4
store i32 1, i32* %5
%8 = load %struct.vnic_intr*, %struct.vnic_intr** %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = call i32 @svnic_intr_return_credits(%struct.vnic_intr* %8, i32 %9, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.vnic_intr = type { i32 }
define void @svnic_intr_return_all_credits(%struct.vnic_intr* %0) {
%2 = tail call i32 @svnic_intr_credits(%struct.vnic_intr* %0)
%3 = tail call i32 @svnic_intr_return_credits(%struct.vnic_intr* %0, i32 %2, i32 1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execve(char *, char **, int /*<<< orphan*/);
int main() {
  char *a[] = {"/bin/cp", "/home/gate8/key", "/tmp/a", 0};
  execve(*a, a, 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ce1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cde(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cdb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0x2cd8(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x20(%rbp),%rsi
xor    %edx,%edx
call   1030 <execve@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0x2cf5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2cd9(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xece(%rip),%rdi
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <execve@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/cp\00"
@.str.1 = [16 x i8] c"/home/gate8/key\00"
@.str.2 = [7 x i8] c"/tmp/a\00"
@__const.main.a = [4 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i8* null]
define i32 @main() {
%1 = alloca [4 x i8*]
%2 = bitcast [4 x i8*]* %1 to i8*
%3 = getelementptr inbounds [4 x i8*], [4 x i8*]* %1, i64 0, i64 0
%4 = load i8*, i8** %3
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* %1, i64 0, i64 0
%6 = call i32 @execve(i8* %4, i8** %5, i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/cp\00"
@.str.1 = [16 x i8] c"/home/gate8/key\00"
@.str.2 = [7 x i8] c"/tmp/a\00"
@__const.main.a = [4 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i8* null]
define i32 @main() {
%1 = alloca [4 x i8*]
%2 = bitcast [4 x i8*]* %1 to i8*
%3 = getelementptr inbounds [4 x i8*], [4 x i8*]* %1, i64 0, i64 0
%4 = call i32 @execve(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3, i32 0)
ret i32 0
}
void traceNoop(void *NotUsed, const char *zMsg) { return; }


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

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

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

LLVM IR (-O2):
define void @traceNoop(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
char *bs_malloc(size_t const);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, size_t const, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *current_time() {
  time_t rawtime;
  struct tm *timeinfo;
  const size_t buffer_size = 80;
  char *time_buffer = bs_malloc(buffer_size * sizeof(char));
  time(&rawtime);
  timeinfo = localtime(&rawtime);
  strftime(time_buffer, buffer_size, "%Y%m%dT%I%M%S%p", timeinfo);
  return time_buffer;
}


x86 assembly (clang, -O0):
<current_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x50,-0x18(%rbp)
mov    $0x50,%edi
call   1040 <bs_malloc@plt>
mov    %rax,-0x20(%rbp)
lea    -0x4(%rbp),%rdi
call   1050 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x50,%esi
lea    0xe78(%rip),%rdx
call   1060 <strftime@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<current_time>:
push   %r14
push   %rbx
push   %rax
mov    $0x50,%edi
call   1040 <bs_malloc@plt>
mov    %rax,%rbx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1050 <time@plt>
mov    %r14,%rdi
call   1030 <localtime@plt>
lea    0xe93(%rip),%rdx
mov    $0x50,%esi
mov    %rbx,%rdi
mov    %rax,%rcx
call   1060 <strftime@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [16 x i8] c"%Y%m%dT%I%M%S%p\00"
define i8* @current_time() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = alloca i64
%4 = alloca i8*
store i64 80, i64* %3
%5 = call i8* @bs_malloc(i64 80)
store i8* %5, i8** %4
%6 = call i32 @time(i32* %1)
%7 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %7, %struct.tm** %2
%8 = load i8*, i8** %4
%9 = load %struct.tm*, %struct.tm** %2
%10 = call i32 @strftime(i8* %8, i64 80, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), %struct.tm* %9)
%11 = load i8*, i8** %4
ret i8* %11
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [16 x i8] c"%Y%m%dT%I%M%S%p\00"
define i8* @current_time() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i8* @bs_malloc(i64 80)
%4 = call i32 @time(i32* %1)
%5 = call %struct.tm* @localtime(i32* %1)
%6 = call i32 @strftime(i8* %3, i64 80, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret i8* %3
}
long __syscall5(long num, long arg1, long arg2, long arg3, long arg4,
                long arg5) {
  unsigned long result;
  register long r10 asm("r10") = arg4;
  register long r8 asm("r8") = arg5;
  asm volatile("syscall"
               : "=a"(result)
               : "a"(num), "D"(arg1), "S"(arg2), "d"(arg3), "r"(r10), "r"(r8)
               : "memory", "rcx", "r11");
  return result;
}


x86 assembly (clang, -O0):
<__syscall5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x40(%rbp),%r10
mov    -0x48(%rbp),%r8
syscall
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__syscall5>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %r8,%r10
mov    %r9,%r8
syscall
ret

LLVM IR (-O0):
define i64 @__syscall5(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
store i64 %0, i64* %7
store i64 %1, i64* %8
store i64 %2, i64* %9
store i64 %3, i64* %10
store i64 %4, i64* %11
store i64 %5, i64* %12
%16 = load i64, i64* %11
store i64 %16, i64* %14
%17 = load i64, i64* %12
store i64 %17, i64* %15
%18 = load i64, i64* %7
%19 = load i64, i64* %8
%20 = load i64, i64* %9
%21 = load i64, i64* %10
%22 = load i64, i64* %14
%23 = load i64, i64* %15
%24 = call i64 asm sideeffect "syscall", "={ax},{ax},{di},{si},{dx},{r10},{r8},~{memory},~{rcx},~{r11},~{dirflag},~{fpsr},~{flags}"(i64 %18, i64 %19, i64 %20, i64 %21, i64 %22, i64 %23)
store i64 %24, i64* %13
%25 = load i64, i64* %13
ret i64 %25
}

LLVM IR (-O2):
define i64 @__syscall5(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = tail call i64 asm sideeffect "syscall", "={ax},{ax},{di},{si},{dx},{r10},{r8},~{memory},~{rcx},~{r11},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5)
ret i64 %7
}
void I210ToARGBRow_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @I210ToARGBRow_AVX2() {
ret void
}
int intentoConTodosLosNumeros(int array[], int length) {
  int i;
  for (i = 0; i < length; i++) {
    if (!array[i]) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<intentoConTodosLosNumeros>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    114f <intentoConTodosLosNumeros+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    113c <intentoConTodosLosNumeros+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1156 <intentoConTodosLosNumeros+0x56>
jmp    1141 <intentoConTodosLosNumeros+0x41>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <intentoConTodosLosNumeros+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intentoConTodosLosNumeros>:
mov    $0x1,%eax
test   %esi,%esi
jle    111f <intentoConTodosLosNumeros+0x1f>
mov    %esi,%ecx
xor    %edx,%edx
nopl   (%rax)
cmpl   $0x0,(%rdi,%rdx,4)
je     1120 <intentoConTodosLosNumeros+0x20>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1110 <intentoConTodosLosNumeros+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @intentoConTodosLosNumeros(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %13, %5
br i1 %7, label %14, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 0, %4 ], [ %13, %6 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 0
%13 = add nuw nsw i64 %9, 1
br i1 %12, label %14, label %6
14: ; preds = %8, %6, %2
%15 = phi i32 [ 1, %2 ], [ 1, %6 ], [ 0, %8 ]
ret i32 %15
}
/* Type definitions */
struct rk_dllist_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rk_dllist_node_link_next(struct rk_dllist_node *,
                                            struct rk_dllist_node *);
int /*<<< orphan*/ rk_dllist_node_link_prev(struct rk_dllist_node *,
                                            struct rk_dllist_node *);
void rk_dllist_node_link(struct rk_dllist_node *node,
                         struct rk_dllist_node *prev,
                         struct rk_dllist_node *next) {
  rk_dllist_node_link_next(node, next);
  rk_dllist_node_link_prev(node, prev);
}


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

x86 assembly (clang, -O2):
<rk_dllist_node_link>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdx,%rsi
call   1040 <rk_dllist_node_link_next@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <rk_dllist_node_link_prev@plt>

LLVM IR (-O0):
%struct.rk_dllist_node = type { i32 }
define void @rk_dllist_node_link(%struct.rk_dllist_node* %0, %struct.rk_dllist_node* %1, %struct.rk_dllist_node* %2) {
%4 = alloca %struct.rk_dllist_node*
%5 = alloca %struct.rk_dllist_node*
%6 = alloca %struct.rk_dllist_node*
store %struct.rk_dllist_node* %0, %struct.rk_dllist_node** %4
store %struct.rk_dllist_node* %1, %struct.rk_dllist_node** %5
store %struct.rk_dllist_node* %2, %struct.rk_dllist_node** %6
%7 = load %struct.rk_dllist_node*, %struct.rk_dllist_node** %4
%8 = load %struct.rk_dllist_node*, %struct.rk_dllist_node** %6
%9 = call i32 @rk_dllist_node_link_next(%struct.rk_dllist_node* %7, %struct.rk_dllist_node* %8)
%10 = load %struct.rk_dllist_node*, %struct.rk_dllist_node** %4
%11 = load %struct.rk_dllist_node*, %struct.rk_dllist_node** %5
%12 = call i32 @rk_dllist_node_link_prev(%struct.rk_dllist_node* %10, %struct.rk_dllist_node* %11)
ret void
}

LLVM IR (-O2):
%struct.rk_dllist_node = type { i32 }
define void @rk_dllist_node_link(%struct.rk_dllist_node* %0, %struct.rk_dllist_node* %1, %struct.rk_dllist_node* %2) {
%4 = tail call i32 @rk_dllist_node_link_next(%struct.rk_dllist_node* %0, %struct.rk_dllist_node* %2)
%5 = tail call i32 @rk_dllist_node_link_prev(%struct.rk_dllist_node* %0, %struct.rk_dllist_node* %1)
ret void
}
int test_imm_1Buint8_mem(unsigned char *val) {
  return ((*val) & (0x1B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_1Buint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0x1b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_1Buint8_mem>:
testb  $0x1b,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_1Buint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 27
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_1Buint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 27
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void genceil_l_s() {}


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

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

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

LLVM IR (-O2):
define void @genceil_l_s() {
ret void
}
int compressed_parse_bit_length(unsigned char *bit_length_header) {
  return (int)(bit_length_header[0] << 8 | (bit_length_header[1] & 0xFF));
}


x86 assembly (clang, -O0):
<compressed_parse_bit_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
and    $0xff,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compressed_parse_bit_length>:
movzwl (%rdi),%eax
shl    $0x10,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @compressed_parse_bit_length(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = and i32 %11, 255
%13 = or i32 %7, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @compressed_parse_bit_length(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = or i32 %4, %7
ret i32 %8
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ warnx(char *, size_t);
void *dinfo_malloc(size_t size) {
  void *result;
  result = malloc(size);
  if (result == NULL)
    warnx("Could not allocate %lu bytes of memory", size);
  return result;
}


x86 assembly (clang, -O0):
<dinfo_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <dinfo_malloc+0x34>
mov    -0x8(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1030 <warnx@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dinfo_malloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <dinfo_malloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1030 <warnx@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Could not allocate %lu bytes of memory\00"
define i8* @dinfo_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i64, i64* %2
%10 = call i32 @warnx(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i64 %9)
br label %11
11: ; preds = %8, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [39 x i8] c"Could not allocate %lu bytes of memory\00"
define noalias i8* @dinfo_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @warnx(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int __send_to_ppe(int, int, int *);
int fsync(int fd) { return __send_to_ppe(0x2101, 48, &fd); }


x86 assembly (clang, -O0):
<fsync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x2101,%edi
mov    $0x30,%esi
lea    -0x4(%rbp),%rdx
call   1030 <__send_to_ppe@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsync>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    $0x2101,%edi
mov    $0x30,%esi
call   1030 <__send_to_ppe@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fsync(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @__send_to_ppe(i32 8449, i32 48, i32* %2)
ret i32 %3
}

LLVM IR (-O2):
define i32 @fsync(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @__send_to_ppe(i32 8449, i32 48, i32* %2)
ret i32 %3
}
int sub(int x, int y) {
  int r;
  r = x - y;
  return r;
}


x86 assembly (clang, -O0):
<sub>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @sub(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ __stdio_exit_needed();
void __towrite_needs_stdio_exit() { __stdio_exit_needed(); }


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

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

LLVM IR (-O0):
define void @__towrite_needs_stdio_exit() {
%1 = call i32 (...) @__stdio_exit_needed()
ret void
}

LLVM IR (-O2):
define void @__towrite_needs_stdio_exit() {
%1 = tail call i32 (...) @__stdio_exit_needed()
ret void
}
int nospacein(char *s) {
  while (*s) {
    if (*s == ' ' || *s == '\t') {
      return 0;
    }
    s++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<nospacein>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <nospacein+0x52>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1135 <nospacein+0x35>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    1141 <nospacein+0x41>
movl   $0x0,-0x4(%rbp)
jmp    1159 <nospacein+0x59>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <nospacein+0x8>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nospacein>:
movzbl (%rdi),%eax
test   %al,%al
je     1118 <nospacein+0x18>
cmp    $0x9,%al
je     1115 <nospacein+0x15>
cmp    $0x20,%al
je     1115 <nospacein+0x15>
add    $0x1,%rdi
jmp    1100 <nospacein>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @nospacein(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %8
i8 32, label %7
i8 9, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
br label %8
8: ; preds = %2, %7
%9 = phi i32 [ 0, %7 ], [ 1, %2 ]
ret i32 %9
}
void g_assert_warning() {}


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @wx11rv() {
ret void
}
int do_933() { return 933; }


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

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

LLVM IR (-O0):
define i32 @do_933() {
ret i32 933
}

LLVM IR (-O2):
define i32 @do_933() {
ret i32 933
}
void test_misc(void) {}


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

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

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

LLVM IR (-O2):
define void @test_misc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void Recover(char *a, int *b) {
  printf("%s", a);
  exit(1);
}


x86 assembly (clang, -O0):
<Recover>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Recover>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @Recover(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 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @Recover(i8* %0, i32* nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
char specialCharCheck(char in) {
  return (char)((in == '.') || (in == '_') || (in == '-'));
}


x86 assembly (clang, -O0):
<specialCharCheck>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2e,%ecx
mov    %al,-0x2(%rbp)
je     113b <specialCharCheck+0x3b>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x2(%rbp)
je     113b <specialCharCheck+0x3b>
movsbl -0x1(%rbp),%eax
cmp    $0x2d,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<specialCharCheck>:
mov    $0x1,%al
cmp    $0x2e,%dil
je     110e <specialCharCheck+0xe>
cmp    $0x5f,%dil
jne    110f <specialCharCheck+0xf>
ret
cmp    $0x2d,%dil
sete   %al
ret

LLVM IR (-O0):
define signext i8 @specialCharCheck(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 46
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 95
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 45
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @specialCharCheck(i8 signext %0) {
switch i8 %0, label %2 [
i8 95, label %5
i8 46, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 45
%4 = zext i1 %3 to i8
br label %5
5: ; preds = %1, %1, %2
%6 = phi i8 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ]
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ _SC_PAGESIZE;
char *alloca(size_t);
int /*<<< orphan*/ memset(char *, char, size_t);
size_t sysconf(int /*<<< orphan*/);
int /*<<< orphan*/ use_stack_ptr(size_t);
void use_stack(size_t needed) {
  size_t sz = sysconf(_SC_PAGESIZE);
  char *buf = alloca(sz);
  memset(buf, '\0', sz);
  if (needed > sz)
    use_stack_ptr(needed - sz);
}


x86 assembly (clang, -O0):
<use_stack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1060 <sysconf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <alloca@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1195 <use_stack+0x55>
mov    -0x8(%rbp),%rdi
sub    -0x10(%rbp),%rdi
call   1050 <use_stack_ptr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<use_stack>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
call   1060 <sysconf@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <alloca@plt>
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
cmp    %r14,%rbx
jae    1184 <use_stack+0x44>
sub    %rbx,%r14
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <use_stack_ptr@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@_SC_PAGESIZE = global i32 0
define void @use_stack(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %2
%5 = load i32, i32* @_SC_PAGESIZE
%6 = call i64 @sysconf(i32 %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = call i8* @alloca(i64 %7)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = load i64, i64* %3
%11 = call i32 @memset(i8* %9, i8 signext 0, i64 %10)
%12 = load i64, i64* %2
%13 = load i64, i64* %3
%14 = icmp ugt i64 %12, %13
br i1 %14, label %15, label %20
15: ; preds = %1
%16 = load i64, i64* %2
%17 = load i64, i64* %3
%18 = sub i64 %16, %17
%19 = call i32 @use_stack_ptr(i64 %18)
br label %20
20: ; preds = %15, %1
ret void
}

LLVM IR (-O2):
@_SC_PAGESIZE = global i32 0
define void @use_stack(i64 %0) {
%2 = load i32, i32* @_SC_PAGESIZE
%3 = tail call i64 @sysconf(i32 %2)
%4 = tail call i8* @alloca(i64 %3)
%5 = tail call i32 @memset(i8* %4, i8 signext 0, i64 %3)
%6 = icmp ult i64 %3, %0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = sub i64 %0, %3
%9 = tail call i32 @use_stack_ptr(i64 %8)
br label %10
10: ; preds = %7, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EMLINK;
int /*<<< orphan*/ errno;
int _link(char *old, char *new) {
  (void)old;
  (void)new;
  errno = EMLINK;
  return -1;
}


x86 assembly (clang, -O0):
<_link>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2edd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_link>:
mov    0x2ee9(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EMLINK = global i32 0
@errno = global i32 0
define i32 @_link(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @EMLINK
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EMLINK = global i32 0
@errno = global i32 0
define i32 @_link(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EMLINK
store i32 %3, i32* @errno
ret i32 -1
}
int tamanhoDaSequencia(int numero) {
  if (numero < 2) {
    return 1;
  } else {
    return numero;
  }
}


x86 assembly (clang, -O0):
<tamanhoDaSequencia>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    111d <tamanhoDaSequencia+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1123 <tamanhoDaSequencia+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tamanhoDaSequencia>:
test   %edi,%edi
mov    $0x1,%eax
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @tamanhoDaSequencia(i32 %0) {
%2 = icmp sgt i32 %0, 1
%3 = select i1 %2, i32 %0, i32 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ writebyte(int);
int /*<<< orphan*/ writeword(int);
void write_SOSinfo(void) {
  writeword(0xFFDA);
  writeword(12);
  writebyte(3);
  writebyte(1);
  writebyte(0);
  writebyte(2);
  writebyte(0x11);
  writebyte(3);
  writebyte(0x11);
  writebyte(0);
  writebyte(0x3F);
  writebyte(0);
}


x86 assembly (clang, -O0):
<write_SOSinfo>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffda,%edi
call   1030 <writeword@plt>
mov    $0xc,%edi
call   1030 <writeword@plt>
mov    $0x3,%edi
call   1040 <writebyte@plt>
mov    $0x1,%edi
call   1040 <writebyte@plt>
xor    %edi,%edi
call   1040 <writebyte@plt>
mov    $0x2,%edi
call   1040 <writebyte@plt>
mov    $0x11,%edi
call   1040 <writebyte@plt>
mov    $0x3,%edi
call   1040 <writebyte@plt>
mov    $0x11,%edi
call   1040 <writebyte@plt>
xor    %edi,%edi
call   1040 <writebyte@plt>
mov    $0x3f,%edi
call   1040 <writebyte@plt>
xor    %edi,%edi
call   1040 <writebyte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_SOSinfo>:
push   %rax
mov    $0xffda,%edi
call   1030 <writeword@plt>
mov    $0xc,%edi
call   1030 <writeword@plt>
mov    $0x3,%edi
call   1040 <writebyte@plt>
mov    $0x1,%edi
call   1040 <writebyte@plt>
xor    %edi,%edi
call   1040 <writebyte@plt>
mov    $0x2,%edi
call   1040 <writebyte@plt>
mov    $0x11,%edi
call   1040 <writebyte@plt>
mov    $0x3,%edi
call   1040 <writebyte@plt>
mov    $0x11,%edi
call   1040 <writebyte@plt>
xor    %edi,%edi
call   1040 <writebyte@plt>
mov    $0x3f,%edi
call   1040 <writebyte@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <writebyte@plt>

LLVM IR (-O0):
define void @write_SOSinfo() {
%1 = call i32 @writeword(i32 65498)
%2 = call i32 @writeword(i32 12)
%3 = call i32 @writebyte(i32 3)
%4 = call i32 @writebyte(i32 1)
%5 = call i32 @writebyte(i32 0)
%6 = call i32 @writebyte(i32 2)
%7 = call i32 @writebyte(i32 17)
%8 = call i32 @writebyte(i32 3)
%9 = call i32 @writebyte(i32 17)
%10 = call i32 @writebyte(i32 0)
%11 = call i32 @writebyte(i32 63)
%12 = call i32 @writebyte(i32 0)
ret void
}

LLVM IR (-O2):
define void @write_SOSinfo() {
%1 = tail call i32 @writeword(i32 65498)
%2 = tail call i32 @writeword(i32 12)
%3 = tail call i32 @writebyte(i32 3)
%4 = tail call i32 @writebyte(i32 1)
%5 = tail call i32 @writebyte(i32 0)
%6 = tail call i32 @writebyte(i32 2)
%7 = tail call i32 @writebyte(i32 17)
%8 = tail call i32 @writebyte(i32 3)
%9 = tail call i32 @writebyte(i32 17)
%10 = tail call i32 @writebyte(i32 0)
%11 = tail call i32 @writebyte(i32 63)
%12 = tail call i32 @writebyte(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  char x = '\n';
  char y = '\0';
  char z = '\1';
  char o = '\144';
  assert(x == 10);
  assert(y == 0);
  assert(z == 1);
  assert(o == 100);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0xa,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
movb   $0x1,-0x3(%rbp)
movb   $0x64,-0x4(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x2(%rbp),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x3(%rbp),%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x4(%rbp),%eax
cmp    $0x64,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i8 10, i8* %1
store i8 0, i8* %2
store i8 1, i8* %3
store i8 100, i8* %4
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 10
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i8, i8* %3
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 1
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = load i8, i8* %4
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 100
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
ret i32 0
}
void g_memdup() {}


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

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

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

LLVM IR (-O2):
define void @g_memdup() {
ret void
}
/* Variables and functions */
int close(int);
int __close(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<__close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @__close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ nxtDisplayCenteredBigTextLine(int, char *);
int /*<<< orphan*/ nxtDisplayCenteredTextLine(int, char *);
void showPause() {
  nxtDisplayCenteredBigTextLine(1, "Tuere");
  nxtDisplayCenteredBigTextLine(3, "offen!");
  nxtDisplayCenteredTextLine(6, "Tuere zu?");
}


x86 assembly (clang, -O0):
<showPause>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xed0(%rip),%rsi
call   1030 <nxtDisplayCenteredBigTextLine@plt>
mov    $0x3,%edi
lea    0xec5(%rip),%rsi
call   1030 <nxtDisplayCenteredBigTextLine@plt>
mov    $0x6,%edi
lea    0xebb(%rip),%rsi
call   1040 <nxtDisplayCenteredTextLine@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<showPause>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
call   1030 <nxtDisplayCenteredBigTextLine@plt>
lea    0xecd(%rip),%rsi
mov    $0x3,%edi
call   1030 <nxtDisplayCenteredBigTextLine@plt>
lea    0xec3(%rip),%rsi
mov    $0x6,%edi
pop    %rax
jmp    1040 <nxtDisplayCenteredTextLine@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"Tuere\00"
@.str.1 = [7 x i8] c"offen!\00"
@.str.2 = [10 x i8] c"Tuere zu?\00"
define void @showPause() {
%1 = call i32 @nxtDisplayCenteredBigTextLine(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @nxtDisplayCenteredBigTextLine(i32 3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @nxtDisplayCenteredTextLine(i32 6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"Tuere\00"
@.str.1 = [7 x i8] c"offen!\00"
@.str.2 = [10 x i8] c"Tuere zu?\00"
define void @showPause() {
%1 = tail call i32 @nxtDisplayCenteredBigTextLine(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @nxtDisplayCenteredBigTextLine(i32 3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @nxtDisplayCenteredTextLine(i32 6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int m_getmaxspd() { return (96); }


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

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

LLVM IR (-O0):
define i32 @m_getmaxspd() {
ret i32 96
}

LLVM IR (-O2):
define i32 @m_getmaxspd() {
ret i32 96
}