xunge/DecIR huggingface dataset:
int cift_sayi(int gelen_sayi) {
  if ((gelen_sayi % 2) == 0) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<cift_sayi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1127 <cift_sayi+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <cift_sayi+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cift_sayi>:
mov    %edi,%eax
not    %eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @cift_sayi(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
ret i32 %3
}
void foo644(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo644(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ poly1305_amd64(unsigned char *, unsigned char *,
                                  unsigned char *, unsigned char *, int);
void poly1305_offs(unsigned char *dest, unsigned char *key,
                   unsigned char *nonce, unsigned char *text, int text_offset,
                   int text_length) {
  poly1305_amd64(dest, key, nonce, text + text_offset, text_length);
}


x86 assembly (clang, -O0):
<poly1305_offs>:
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    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
movslq -0x24(%rbp),%rax
add    %rax,%rcx
mov    -0x28(%rbp),%r8d
call   1030 <poly1305_amd64@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poly1305_offs>:
movslq %r8d,%rax
add    %rax,%rcx
mov    %r9d,%r8d
jmp    1030 <poly1305_amd64@plt>

LLVM IR (-O0):
define void @poly1305_offs(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = load i8*, i8** %9
%16 = load i8*, i8** %10
%17 = load i32, i32* %11
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i32, i32* %12
%21 = call i32 @poly1305_amd64(i8* %13, i8* %14, i8* %15, i8* %19, i32 %20)
ret void
}

LLVM IR (-O2):
define void @poly1305_offs(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4, i32 %5) {
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds i8, i8* %3, i64 %7
%9 = tail call i32 @poly1305_amd64(i8* %0, i8* %1, i8* %2, i8* %8, i32 %5)
ret void
}
void __tree_node_destructor(void *ptr) { (void)ptr; }


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

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

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

LLVM IR (-O2):
define void @__tree_node_destructor(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ iic_start();
int /*<<< orphan*/ iic_stop();
int /*<<< orphan*/ iic_write(int);
void iic_write_byte(uint8_t addr, uint8_t byte) {
  iic_start();
  iic_write(addr << 1);
  iic_write(byte);
  iic_stop();
}


x86 assembly (clang, -O0):
<iic_write_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <iic_start@plt>
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
call   1040 <iic_write@plt>
mov    -0x8(%rbp),%edi
call   1040 <iic_write@plt>
mov    $0x0,%al
call   1030 <iic_stop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iic_write_byte>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1050 <iic_start@plt>
add    %ebp,%ebp
mov    %ebp,%edi
call   1040 <iic_write@plt>
mov    %ebx,%edi
call   1040 <iic_write@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <iic_stop@plt>

LLVM IR (-O0):
define void @iic_write_byte(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @iic_start()
%6 = load i32, i32* %3
%7 = shl i32 %6, 1
%8 = call i32 @iic_write(i32 %7)
%9 = load i32, i32* %4
%10 = call i32 @iic_write(i32 %9)
%11 = call i32 (...) @iic_stop()
ret void
}

LLVM IR (-O2):
define void @iic_write_byte(i32 %0, i32 %1) {
%3 = tail call i32 (...) @iic_start()
%4 = shl i32 %0, 1
%5 = tail call i32 @iic_write(i32 %4)
%6 = tail call i32 @iic_write(i32 %1)
%7 = tail call i32 (...) @iic_stop()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ leftShift(int, int);
int rightShift(int /*<<< orphan*/, int);
int getRT(int instruction) {
  return rightShift(leftShift(instruction, 11), 27);
}


x86 assembly (clang, -O0):
<getRT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xb,%esi
call   1040 <leftShift@plt>
mov    %eax,%edi
mov    $0x1b,%esi
call   1030 <rightShift@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRT>:
push   %rax
mov    $0xb,%esi
call   1040 <leftShift@plt>
mov    %eax,%edi
mov    $0x1b,%esi
pop    %rax
jmp    1030 <rightShift@plt>

LLVM IR (-O0):
define i32 @getRT(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @leftShift(i32 %3, i32 11)
%5 = call i32 @rightShift(i32 %4, i32 27)
ret i32 %5
}

LLVM IR (-O2):
define i32 @getRT(i32 %0) {
%2 = tail call i32 @leftShift(i32 %0, i32 11)
%3 = tail call i32 @rightShift(i32 %2, i32 27)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ notify_pvcall(char *);
int pvUseLibraryEx(char byBoardNum, char *szLibName, char bUpload) {
  notify_pvcall("f");
  return (0);
}


x86 assembly (clang, -O0):
<pvUseLibraryEx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <notify_pvcall@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"f\00"
define i32 @pvUseLibraryEx(i8 signext %0, i8* %1, i8 signext %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i8
store i8 %0, i8* %4
store i8* %1, i8** %5
store i8 %2, i8* %6
%7 = call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"f\00"
define i32 @pvUseLibraryEx(i8 signext %0, i8* nocapture readnone %1, i8 signext %2) {
%4 = tail call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_ps(int /*<<< orphan*/, int /*<<< orphan*/);
__m128 test_mm_add_ps(__m128 A, __m128 B) { return _mm_add_ps(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_add_ps>:
jmp    1030 <_mm_add_ps@plt>

LLVM IR (-O0):
define i32 @test_mm_add_ps(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 @_mm_add_ps(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_add_ps(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_add_ps(i32 %0, i32 %1)
ret i32 %3
}
unsigned short from32to16(unsigned int x) {
  x = (x & 0xffff) + (x >> 16);
  x = (x & 0xffff) + (x >> 16);
  return x;
}


x86 assembly (clang, -O0):
<from32to16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<from32to16>:
movzwl %di,%ecx
shr    $0x10,%edi
add    %edi,%ecx
mov    %ecx,%eax
shr    $0x10,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @from32to16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65535
%5 = load i32, i32* %2
%6 = lshr i32 %5, 16
%7 = add i32 %4, %6
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = and i32 %8, 65535
%10 = load i32, i32* %2
%11 = lshr i32 %10, 16
%12 = add i32 %9, %11
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = trunc i32 %13 to i16
ret i16 %14
}

LLVM IR (-O2):
define zeroext i16 @from32to16(i32 %0) {
%2 = and i32 %0, 65535
%3 = lshr i32 %0, 16
%4 = add nuw nsw i32 %2, %3
%5 = lshr i32 %4, 16
%6 = add nuw nsw i32 %5, %4
%7 = trunc i32 %6 to i16
ret i16 %7
}
void BOARD_InitPeripherals(void) {}


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

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

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

LLVM IR (-O2):
define void @BOARD_InitPeripherals() {
ret void
}
/* Variables and functions */
float strtod(char const *, char **);
float strtof(const char *nptr, char **endptr) { return (strtod(nptr, endptr)); }


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

x86 assembly (clang, -O2):
<strtof>:
jmp    1030 <strtod@plt>

LLVM IR (-O0):
define float @strtof(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 = call float @strtod(i8* %5, i8** %6)
ret float %7
}

LLVM IR (-O2):
define float @strtof(i8* %0, i8** nocapture %1) {
%3 = tail call float @strtod(i8* %0, i8** %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ test_add_before_first();
int /*<<< orphan*/ test_add_before_second();
void test_add_before() {
  test_add_before_first();
  test_add_before_second();
}


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

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

LLVM IR (-O0):
define void @test_add_before() {
%1 = call i32 (...) @test_add_before_first()
%2 = call i32 (...) @test_add_before_second()
ret void
}

LLVM IR (-O2):
define void @test_add_before() {
%1 = tail call i32 (...) @test_add_before_first()
%2 = tail call i32 (...) @test_add_before_second()
ret void
}
/* Variables and functions */
int PRIO_PGRP;
int PRIO_PROCESS;
int PRIO_USER;
int /*<<< orphan*/ getpriority(int, int);
int main() {
  getpriority(PRIO_PROCESS, 0);
  getpriority(PRIO_PGRP, -1);
  getpriority(-1, 0);
  getpriority(PRIO_USER, 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <getpriority@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    $0xffffffff,%esi
call   1030 <getpriority@plt>
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <getpriority@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <getpriority@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <getpriority@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
mov    $0xffffffff,%esi
call   1030 <getpriority@plt>
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <getpriority@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <getpriority@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@PRIO_PROCESS = global i32 0
@PRIO_PGRP = global i32 0
@PRIO_USER = global i32 0
define i32 @main() {
%1 = load i32, i32* @PRIO_PROCESS
%2 = call i32 @getpriority(i32 %1, i32 0)
%3 = load i32, i32* @PRIO_PGRP
%4 = call i32 @getpriority(i32 %3, i32 -1)
%5 = call i32 @getpriority(i32 -1, i32 0)
%6 = load i32, i32* @PRIO_USER
%7 = call i32 @getpriority(i32 %6, i32 0)
ret i32 0
}

LLVM IR (-O2):
@PRIO_PROCESS = global i32 0
@PRIO_PGRP = global i32 0
@PRIO_USER = global i32 0
define i32 @main() {
%1 = load i32, i32* @PRIO_PROCESS
%2 = tail call i32 @getpriority(i32 %1, i32 0)
%3 = load i32, i32* @PRIO_PGRP
%4 = tail call i32 @getpriority(i32 %3, i32 -1)
%5 = tail call i32 @getpriority(i32 -1, i32 0)
%6 = load i32, i32* @PRIO_USER
%7 = tail call i32 @getpriority(i32 %6, i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ out_char(char const);
void out_string(const char *value) {
  for (; *value; value++)
    out_char(*value);
}


x86 assembly (clang, -O0):
<out_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <out_string+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <out_char@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <out_string+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out_string>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <out_string+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <out_char@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <out_string+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @out_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @out_char(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ cleanup();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ merror(char *);
void cleanupsig(int nSignal) {
  (void)merror("Recived external termination request");
  (void)cleanup();
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<cleanupsig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1050 <merror@plt>
mov    $0x0,%al
call   1030 <cleanup@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<cleanupsig>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <merror@plt>
xor    %eax,%eax
call   1030 <cleanup@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"Recived external termination request\00"
@EXIT_FAILURE = global i32 0
define void @cleanupsig(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @merror(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @cleanup()
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [37 x i8] c"Recived external termination request\00"
@EXIT_FAILURE = global i32 0
define void @cleanupsig(i32 %0) {
%2 = tail call i32 @merror(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @cleanup()
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
unsigned long djb2hash(const char *str) {
  unsigned long hash = 5381;
  int c;
  while ((c = *str++)) {
    hash = ((hash << 5) + hash) + c;
  }
  return hash;
}


x86 assembly (clang, -O0):
<djb2hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114a <djb2hash+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <djb2hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<djb2hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <djb2hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <djb2hash+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @djb2hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ cls();
int /*<<< orphan*/ setcursor(int, int);
void init_screen(void) {
  setcursor(1, 1);
  cls();
}


x86 assembly (clang, -O0):
<init_screen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%esi
mov    %esi,%edi
call   1040 <setcursor@plt>
mov    $0x0,%al
call   1030 <cls@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_screen>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
call   1040 <setcursor@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <cls@plt>

LLVM IR (-O0):
define void @init_screen() {
%1 = call i32 @setcursor(i32 1, i32 1)
%2 = call i32 (...) @cls()
ret void
}

LLVM IR (-O2):
define void @init_screen() {
%1 = tail call i32 @setcursor(i32 1, i32 1)
%2 = tail call i32 (...) @cls()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int /*<<< orphan*/);
int main() {
  printf("di un numero: ");
  scanf("%d", 0);
  printf("este mensaje ya no sale\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xecb(%rip),%rdi
xor    %esi,%esi
call   1050 <scanf@plt>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"di un numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [25 x i8] c"este mensaje ya no sale\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 0)
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"di un numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@str = [24 x i8] c"este mensaje ya no sale\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int atoi(char *);
char *getenv(char *);
int linedit_terminal_columns(int def) {
  char *col;
  if ((col = getenv("COLUMNS")))
    return atoi(col);
  else
    return def;
}


x86 assembly (clang, -O0):
<linedit_terminal_columns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xece(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1156 <linedit_terminal_columns+0x36>
mov    -0x10(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x4(%rbp)
jmp    115c <linedit_terminal_columns+0x3c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linedit_terminal_columns>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     113d <linedit_terminal_columns+0x1d>
mov    %rax,%rdi
pop    %rbx
jmp    1040 <atoi@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"COLUMNS\00"
define i32 @linedit_terminal_columns(i32 %0) {
%2 = tail call i8* @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @atoi(i8* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ %0, %1 ]
ret i32 %7
}
int is(char a[]) {
  if (a[0] == 'i')
    return 1;
  else if (a[0] == 'd')
    return -1;
  else if (a[0] == 's')
    return 0;
}


x86 assembly (clang, -O0):
<is>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x69,%eax
jne    1124 <is+0x24>
movl   $0x1,-0x4(%rbp)
jmp    1166 <is+0x66>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x64,%eax
jne    1140 <is+0x40>
movl   $0xffffffff,-0x4(%rbp)
jmp    1166 <is+0x66>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x73,%eax
jne    115c <is+0x5c>
movl   $0x0,-0x4(%rbp)
jmp    1166 <is+0x66>
jmp    1161 <is+0x61>
jmp    1166 <is+0x66>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is>:
mov    (%rdi),%cl
xor    %eax,%eax
cmp    $0x64,%cl
setne  %al
lea    (%rax,%rax,1),%edx
add    $0xffffffff,%edx
xor    %eax,%eax
cmp    $0x73,%cl
cmovne %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @is(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 100
%4 = select i1 %3, i32 -1, i32 1
%5 = icmp eq i8 %2, 115
%6 = select i1 %5, i32 0, i32 %4
ret i32 %6
}
double fbound(double val, double lower, double upper) {
  if (val < lower) {
    return lower;
  } else if (upper < val) {
    return upper;
  } else {
    return val;
  }
}


x86 assembly (clang, -O0):
<fbound>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1136 <fbound+0x36>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1163 <fbound+0x63>
movsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1159 <fbound+0x59>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1163 <fbound+0x63>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fbound>:
minsd  %xmm0,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm3
andnpd %xmm2,%xmm3
andpd  %xmm1,%xmm0
orpd   %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @fbound(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%8 = load double, double* %5
%9 = load double, double* %6
%10 = fcmp olt double %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load double, double* %6
store double %12, double* %4
br label %21
13: ; preds = %3
%14 = load double, double* %7
%15 = load double, double* %5
%16 = fcmp olt double %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load double, double* %7
store double %18, double* %4
br label %21
19: ; preds = %13
%20 = load double, double* %5
store double %20, double* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load double, double* %4
ret double %22
}

LLVM IR (-O2):
define double @fbound(double %0, double %1, double %2) {
%4 = fcmp olt double %0, %1
%5 = fcmp olt double %2, %0
%6 = select i1 %5, double %2, double %0
%7 = select i1 %4, double %1, double %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ ENET2_1588_Timer_DriverIRQHandler();
__attribute__((weak)) void ENET2_1588_Timer_IRQHandler(void) {
  ENET2_1588_Timer_DriverIRQHandler();
}


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

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

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

LLVM IR (-O2):
define weak void @ENET2_1588_Timer_IRQHandler() {
%1 = tail call i32 (...) @ENET2_1588_Timer_DriverIRQHandler()
ret void
}
/* Variables and functions */
int isblank(unsigned char);
int portable_isblank(int c) { return isblank((unsigned char)c); }


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

x86 assembly (clang, -O2):
<portable_isblank>:
movzbl %dil,%edi
jmp    1030 <isblank@plt>

LLVM IR (-O0):
define i32 @portable_isblank(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
%5 = call i32 @isblank(i8 zeroext %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @portable_isblank(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i32 @isblank(i8 zeroext %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ RETURN_IF_FALSE(int /*<<< orphan*/);
int /*<<< orphan*/ assert_exit(char *);
int /*<<< orphan*/ config_token_verbose_p();
int /*<<< orphan*/ log_print(char *, char *);
void tk_lang_c_pctt_print(char *buf) {
  assert_exit(buf);
  RETURN_IF_FALSE(config_token_verbose_p());
  log_print("[TK] try punctuation on '%s'\n", buf);
}


x86 assembly (clang, -O0):
<tk_lang_c_pctt_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <assert_exit@plt>
mov    $0x0,%al
call   1060 <config_token_verbose_p@plt>
mov    %eax,%edi
call   1040 <RETURN_IF_FALSE@plt>
mov    -0x8(%rbp),%rsi
lea    0xe92(%rip),%rdi
call   1030 <log_print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tk_lang_c_pctt_print>:
push   %rbx
mov    %rdi,%rbx
call   1050 <assert_exit@plt>
xor    %eax,%eax
call   1060 <config_token_verbose_p@plt>
mov    %eax,%edi
call   1040 <RETURN_IF_FALSE@plt>
lea    0xea2(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <log_print@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"[TK] try punctuation on '%s'\0A\00"
define void @tk_lang_c_pctt_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @assert_exit(i8* %3)
%5 = call i32 (...) @config_token_verbose_p()
%6 = call i32 @RETURN_IF_FALSE(i32 %5)
%7 = load i8*, i8** %2
%8 = call i32 @log_print(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"[TK] try punctuation on '%s'\0A\00"
define void @tk_lang_c_pctt_print(i8* %0) {
%2 = tail call i32 @assert_exit(i8* %0)
%3 = tail call i32 (...) @config_token_verbose_p()
%4 = tail call i32 @RETURN_IF_FALSE(i32 %3)
%5 = tail call i32 @log_print(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void clearScreen(void) { system("clear||cls"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"clear||cls\00"
define void @clearScreen() {
%1 = call i32 @system(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"clear||cls\00"
define void @clearScreen() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ thr0(int /*<<< orphan*/);
int /*<<< orphan*/ thr1(int /*<<< orphan*/);
int /*<<< orphan*/ thr2(int /*<<< orphan*/);
int /*<<< orphan*/ thr3(int /*<<< orphan*/);
int /*<<< orphan*/ thr4(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_0:
  thr0(0);
__CPROVER_ASYNC_1:
  thr1(0);
__CPROVER_ASYNC_2:
  thr2(0);
__CPROVER_ASYNC_3:
  thr3(0);
__CPROVER_ASYNC_4:
  thr4(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1060 <thr0@plt>
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1050 <thr2@plt>
xor    %edi,%edi
call   1070 <thr3@plt>
xor    %edi,%edi
call   1040 <thr4@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1060 <thr0@plt>
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1050 <thr2@plt>
xor    %edi,%edi
call   1070 <thr3@plt>
xor    %edi,%edi
call   1040 <thr4@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @thr0(i32 0)
br label %4
4: ; preds = %2
%5 = call i32 @thr1(i32 0)
br label %6
6: ; preds = %4
%7 = call i32 @thr2(i32 0)
br label %8
8: ; preds = %6
%9 = call i32 @thr3(i32 0)
br label %10
10: ; preds = %8
%11 = call i32 @thr4(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @thr0(i32 0)
%2 = tail call i32 @thr1(i32 0)
%3 = tail call i32 @thr2(i32 0)
%4 = tail call i32 @thr3(i32 0)
%5 = tail call i32 @thr4(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_doublyReversedListIsSameAsOriginal();
int /*<<< orphan*/ test_reverseOnEmptyList();
int /*<<< orphan*/ test_reverseOnMultiElementList();
int /*<<< orphan*/ test_reverseOnSingleElementList();
int main(int argc, char **argv) {
  test_reverseOnEmptyList();
  test_reverseOnSingleElementList();
  test_reverseOnMultiElementList();
  test_doublyReversedListIsSameAsOriginal();
  printf("All tests passed.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <test_reverseOnEmptyList@plt>
mov    $0x0,%al
call   1050 <test_reverseOnSingleElementList@plt>
mov    $0x0,%al
call   1060 <test_reverseOnMultiElementList@plt>
mov    $0x0,%al
call   1070 <test_doublyReversedListIsSameAsOriginal@plt>
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_reverseOnEmptyList@plt>
xor    %eax,%eax
call   1050 <test_reverseOnSingleElementList@plt>
xor    %eax,%eax
call   1060 <test_reverseOnMultiElementList@plt>
xor    %eax,%eax
call   1070 <test_doublyReversedListIsSameAsOriginal@plt>
lea    0xe8c(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"All tests passed.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test_reverseOnEmptyList()
%7 = call i32 (...) @test_reverseOnSingleElementList()
%8 = call i32 (...) @test_reverseOnMultiElementList()
%9 = call i32 (...) @test_doublyReversedListIsSameAsOriginal()
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"All tests passed.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_reverseOnEmptyList()
%4 = tail call i32 (...) @test_reverseOnSingleElementList()
%5 = tail call i32 (...) @test_reverseOnMultiElementList()
%6 = tail call i32 (...) @test_doublyReversedListIsSameAsOriginal()
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void ctHelper(unsigned int *ct, char mark, char player) {
  *ct = (mark == player) ? *ct + 1 : 0;
}


x86 assembly (clang, -O0):
<ctHelper>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movsbl -0x9(%rbp),%eax
movsbl -0xa(%rbp),%ecx
cmp    %ecx,%eax
jne    1134 <ctHelper+0x34>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113e <ctHelper+0x3e>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    113e <ctHelper+0x3e>
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctHelper>:
xor    %eax,%eax
cmp    %dl,%sil
jne    110c <ctHelper+0xc>
mov    (%rdi),%eax
add    $0x1,%eax
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @ctHelper(i32* nocapture %0, i8 signext %1, i8 signext %2) {
%4 = icmp eq i8 %1, %2
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = load i32, i32* %0
%7 = add i32 %6, 1
br label %8
8: ; preds = %3, %5
%9 = phi i32 [ %7, %5 ], [ 0, %3 ]
store i32 %9, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xlFmtError(char *);
void fasleof(void) { xlFmtError("unexpected eof in fasl file"); }


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"unexpected eof in fasl file\00"
define void @fasleof() {
%1 = call i32 @xlFmtError(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"unexpected eof in fasl file\00"
define void @fasleof() {
%1 = tail call i32 @xlFmtError(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned int Get_Bits(N)
int N;
{
  unsigned int Val;
  Val = Show_Bits(N);
  Flush_Buffer(N);
  return Val;
}


x86 assembly (clang, -O0):
<Get_Bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <Show_Bits@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <Flush_Buffer@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Get_Bits>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <Show_Bits@plt>
mov    %eax,%ebp
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <Flush_Buffer@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Get_Bits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 (i32, ...) bitcast (i32 (...)* @Show_Bits to i32 (i32, ...)*)(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = call i32 (i32, ...) bitcast (i32 (...)* @Flush_Buffer to i32 (i32, ...)*)(i32 %6)
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @Get_Bits(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @Show_Bits to i32 (i32, ...)*)(i32 %0)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @Flush_Buffer to i32 (i32, ...)*)(i32 %0)
ret i32 %2
}
int test_imm_E5int8_reg(signed char val) {
  return ((val) & (0xE5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E5int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xe5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E5int8_reg>:
test   $0xe5,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_E5int8_reg(i8 signext %0) {
%2 = and i8 %0, -27
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void PrintVersion(void) { printf("PrintVersion \"1.8.0-SNAPSHOT\"\n"); }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"PrintVersion \221.8.0-SNAPSHOT\22\0A\00"
define void @PrintVersion() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [30 x i8] c"PrintVersion \221.8.0-SNAPSHOT\22\00"
define void @PrintVersion() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ isalnum(char);
int jep_is_ident(char c) {
  if (isalnum(c) || c == '_' || c == '$') {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<jep_is_ident>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
jne    114b <jep_is_ident+0x3b>
movsbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
je     114b <jep_is_ident+0x3b>
movsbl -0x5(%rbp),%eax
cmp    $0x24,%eax
jne    1157 <jep_is_ident+0x47>
movl   $0x1,-0x4(%rbp)
jmp    115e <jep_is_ident+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jep_is_ident>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%bl
sete   %cl
cmp    $0x24,%bl
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @jep_is_ident(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isalnum(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %15, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 95
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 36
br i1 %14, label %15, label %16
15: ; preds = %11, %7, %1
store i32 1, i32* %2
br label %17
16: ; preds = %11
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @jep_is_ident(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = freeze i64 %2
%4 = icmp ne i64 %3, 0
%5 = icmp eq i8 %0, 95
%6 = icmp eq i8 %0, 36
%7 = or i1 %5, %6
%8 = or i1 %7, %4
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int PAPI_cleanup_eventset(int);
void PAPIF_CLEANUP_EVENTSET(int *EventSet, int *check) {
  *check = PAPI_cleanup_eventset(*EventSet);
}


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

x86 assembly (clang, -O2):
<PAPIF_CLEANUP_EVENTSET>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%edi
call   1030 <PAPI_cleanup_eventset@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @PAPIF_CLEANUP_EVENTSET(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @PAPI_cleanup_eventset(i32 %3)
store i32 %4, i32* %1
ret void
}
short int cast_ulong_short(unsigned long int x) { return (short int)x; }


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

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

LLVM IR (-O0):
define signext i16 @cast_ulong_short(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}

LLVM IR (-O2):
define signext i16 @cast_ulong_short(i64 %0) {
%2 = trunc i64 %0 to i16
ret i16 %2
}
void MB87078_stop(void) {}


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

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

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

LLVM IR (-O2):
define void @MB87078_stop() {
ret void
}
unsigned kol_system_date_get() { asm volatile("int $0x40" ::"a"(29)); }


x86 assembly (clang, -O0):
<kol_system_date_get>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1d,%eax
int    $0x40
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_system_date_get>:
mov    $0x1d,%eax
int    $0x40
ret

LLVM IR (-O0):
define i32 @kol_system_date_get() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @kol_system_date_get() {
tail call void asm sideeffect "int $$0x40", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 29)
ret i32 undef
}
int tst_si_test1(int a, int b, int c) {
  int d = a & b;
  if (d <= 0)
    return 12;
  else
    return 18;
}


x86 assembly (clang, -O0):
<tst_si_test1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     112c <tst_si_test1+0x2c>
movl   $0xc,-0x4(%rbp)
jmp    1133 <tst_si_test1+0x33>
movl   $0x12,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tst_si_test1>:
test   %edi,%esi
mov    $0xc,%ecx
mov    $0x12,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @tst_si_test1(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, %0
%5 = icmp slt i32 %4, 1
%6 = select i1 %5, i32 12, i32 18
ret i32 %6
}
int adis16251_configure_ring(struct iio_dev *indio_dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define i32 @adis16251_configure_ring(%struct.iio_dev* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int clz(unsigned int const);
int ulog2(const unsigned v) { return 31 - clz(v); }


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

x86 assembly (clang, -O2):
<ulog2>:
push   %rax
call   1030 <clz@plt>
mov    $0x1f,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ulog2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @clz(i32 %3)
%5 = sub nsw i32 31, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @ulog2(i32 %0) {
%2 = tail call i32 @clz(i32 %0)
%3 = sub nsw i32 31, %2
ret i32 %3
}