xunge/DecIR huggingface dataset:
/* Type definitions */
struct flashrom_programmer {
  int dummy;
};

/* Variables and functions */
int programmer_shutdown();
int flashrom_programmer_shutdown(struct flashrom_programmer *const flashprog) {
  return programmer_shutdown();
}


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

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

LLVM IR (-O0):
%struct.flashrom_programmer = type { i32 }
define i32 @flashrom_programmer_shutdown(%struct.flashrom_programmer* %0) {
%2 = alloca %struct.flashrom_programmer*
store %struct.flashrom_programmer* %0, %struct.flashrom_programmer** %2
%3 = call i32 (...) @programmer_shutdown()
ret i32 %3
}

LLVM IR (-O2):
%struct.flashrom_programmer = type { i32 }
define i32 @flashrom_programmer_shutdown(%struct.flashrom_programmer* nocapture readnone %0) {
%2 = tail call i32 (...) @programmer_shutdown()
ret i32 %2
}
fltu(unsigned int x, unsigned int y) {
  if (x < y)
    return 13;
  else
    return 140;
}


x86 assembly (clang, -O0):
<fltu>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1122 <fltu+0x22>
movl   $0xd,-0x4(%rbp)
jmp    1129 <fltu+0x29>
movl   $0x8c,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fltu>:
cmp    %esi,%edi
mov    $0xd,%ecx
mov    $0x8c,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fltu(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 = load i32, i32* %5
%8 = icmp ult i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 13, i32* %3
br label %11
10: ; preds = %2
store i32 140, i32* %3
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @fltu(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
%4 = select i1 %3, i32 13, i32 140
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  system("");
  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)
lea    0xed3(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
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 @system(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @system(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void binop_with_side_effects(int z) {
  int x1;
  x1 = (1 ? z : z) + 77;
  int x2;
  x2 = 77 + (1 ? z : z);
  int x3;
  x3 = (1 ? z : z) + (1 ? z : z);
  int y1 = (1 ? z : z) + 77;
  int y2 = 77 + (1 ? z : z);
  int y3 = (1 ? z : z) + (1 ? z : z);
}


x86 assembly (clang, -O0):
<binop_with_side_effects>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4d,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4d,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4d,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4d,%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @binop_with_side_effects(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %2
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 77
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = add nsw i32 77, %11
store i32 %12, i32* %4
%13 = load i32, i32* %2
%14 = load i32, i32* %2
%15 = add nsw i32 %13, %14
store i32 %15, i32* %5
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 77
store i32 %17, i32* %6
%18 = load i32, i32* %2
%19 = add nsw i32 77, %18
store i32 %19, i32* %7
%20 = load i32, i32* %2
%21 = load i32, i32* %2
%22 = add nsw i32 %20, %21
store i32 %22, i32* %8
ret void
}

LLVM IR (-O2):
define void @binop_with_side_effects(i32 %0) {
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(int argc, char *argv[]) {
  int c = 0;
  while ((c = getchar()) != EOF) {
    putchar(c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    0x2e9a(%rip),%rcx
cmp    (%rcx),%eax
je     1163 <main+0x43>
mov    -0x14(%rbp),%edi
call   1030 <putchar@plt>
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <main+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %11, %2
%8 = call i32 (...) @getchar()
store i32 %8, i32* %6
%9 = load i32, i32* @EOF
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %6
%13 = call i32 @putchar(i32 %12)
br label %7
14: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %12, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %3, %2 ]
%8 = tail call i32 @putchar(i32 %7)
%9 = tail call i32 (...) @getchar()
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ unix_error(char *);
void *Malloc(size_t size) {
  void *p;
  if ((p = malloc(size)) == NULL) {
    unix_error("malloc failed");
  }
  return (p);
}


x86 assembly (clang, -O0):
<Malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    114f <Malloc+0x2f>
lea    0xeb6(%rip),%rdi
call   1040 <unix_error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Malloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <Malloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <unix_error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"malloc failed\00"
define i8* @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 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @unix_error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [14 x i8] c"malloc failed\00"
define noalias i8* @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 @unix_error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void CmdBottom(int code) {}


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

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

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

LLVM IR (-O2):
define void @CmdBottom(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MIPS_CLEAR_BIT(int, int);
void xburst_cgm_ungate_p1() { MIPS_CLEAR_BIT((0xB0000000 + 0x28), 15); }


x86 assembly (clang, -O0):
<xburst_cgm_ungate_p1>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0000028,%edi
mov    $0xf,%esi
call   1030 <MIPS_CLEAR_BIT@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xburst_cgm_ungate_p1>:
mov    $0xb0000028,%edi
mov    $0xf,%esi
jmp    1030 <MIPS_CLEAR_BIT@plt>

LLVM IR (-O0):
define void @xburst_cgm_ungate_p1() {
%1 = call i32 @MIPS_CLEAR_BIT(i32 -1342177240, i32 15)
ret void
}

LLVM IR (-O2):
define void @xburst_cgm_ungate_p1() {
%1 = tail call i32 @MIPS_CLEAR_BIT(i32 -1342177240, i32 15)
ret void
}
__attribute__((__no__)) void
do_nothing_small_hole_dynamic_partial(struct test_small_hole *ptr) {
  if ((unsigned long)ptr > 0x2)
    return;
  else
    return;
}


x86 assembly (clang, -O0):
<do_nothing_small_hole_dynamic_partial>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x2,%rax
jbe    111b <do_nothing_small_hole_dynamic_partial+0x1b>
jmp    1120 <do_nothing_small_hole_dynamic_partial+0x20>
jmp    1120 <do_nothing_small_hole_dynamic_partial+0x20>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.test_small_hole = type opaque
define void @do_nothing_small_hole_dynamic_partial(%struct.test_small_hole* %0) {
%2 = alloca %struct.test_small_hole*
store %struct.test_small_hole* %0, %struct.test_small_hole** %2
%3 = load %struct.test_small_hole*, %struct.test_small_hole** %2
%4 = ptrtoint %struct.test_small_hole* %3 to i64
%5 = icmp ugt i64 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
%struct.test_small_hole = type opaque
define void @do_nothing_small_hole_dynamic_partial(%struct.test_small_hole* nocapture %0) {
ret void
}
void report_malloc(char *arrayname, int size) {}


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

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

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

LLVM IR (-O2):
define void @report_malloc(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
scalar_t__ Mem_Alloc(int);
scalar_t__ Mem_Init(int);
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main() {
  assert(Mem_Init(4096) == 0);
  int *ptr = (int *)Mem_Alloc(sizeof(int));
  assert(ptr != NULL);
  assert((int)ptr % 4 == 0);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1000,%edi
call   1030 <Mem_Init@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x4,%edi
call   1050 <Mem_Alloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1000,%edi
call   1030 <Mem_Init@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@plt>
mov    $0x4,%edi
call   1050 <Mem_Alloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
test   $0x3,%bl
sete   %dil
call   1040 <assert@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i64 @Mem_Init(i32 4096)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = call i64 @Mem_Alloc(i32 4)
%8 = inttoptr i64 %7 to i32*
store i32* %8, i32** %2
%9 = load i32*, i32** %2
%10 = icmp ne i32* %9, null
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32*, i32** %2
%14 = ptrtoint i32* %13 to i32
%15 = srem i32 %14, 4
%16 = icmp eq i32 %15, 0
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @Mem_Init(i32 4096)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i64 @Mem_Alloc(i32 4)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = and i64 %5, 3
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ set_port(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/, int, int);
void set_interrupt_type(uint8_t address, uint8_t port, uint8_t value) {
  set_port(address, port, value, 0x08, 0x09);
}


x86 assembly (clang, -O0):
<set_interrupt_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    $0x8,%ecx
mov    $0x9,%r8d
call   1030 <set_port@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_interrupt_type>:
mov    $0x8,%ecx
mov    $0x9,%r8d
jmp    1030 <set_port@plt>

LLVM IR (-O0):
define void @set_interrupt_type(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @set_port(i32 %7, i32 %8, i32 %9, i32 8, i32 9)
ret void
}

LLVM IR (-O2):
define void @set_interrupt_type(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @set_port(i32 %0, i32 %1, i32 %2, i32 8, i32 9)
ret void
}
/* Variables and functions */
long date_base(int, int, int);
long days_before(int year) { return date_base(year, 1, 1); }


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

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

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

LLVM IR (-O2):
define i64 @days_before(i32 %0) {
%2 = tail call i64 @date_base(i32 %0, i32 1, i32 1)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
size_t evl_memcpy(void *dest, const void *src, size_t n) {
  size_t nb = n;
  memcpy(dest, src, nb);
  return nb;
}


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

x86 assembly (clang, -O2):
<evl_memcpy>:
push   %rbx
mov    %rdx,%rbx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @evl_memcpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i64, i64* %6
store i64 %8, i64* %7
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = load i64, i64* %7
%12 = call i32 @memcpy(i8* %9, i8* %10, i64 %11)
%13 = load i64, i64* %7
ret i64 %13
}

LLVM IR (-O2):
define i64 @evl_memcpy(i8* %0, i8* %1, i64 returned %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
ret i64 %2
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
float parcels_random() { return (float)rand() / (float)(RAND_MAX); }


x86 assembly (clang, -O0):
<parcels_random>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec1(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<parcels_random>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec4(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @parcels_random() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to float
%5 = fdiv float %2, %4
ret float %5
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @parcels_random() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to float
%5 = fdiv float %2, %4
ret float %5
}
void test3(void) {
  struct test4 {
    int i;
  };
}


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

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

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

LLVM IR (-O2):
define void @test3() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int iv_size(int /*<<< orphan*/ *);
int32_t index_vector_last(int32_t *v) {
  assert(v != NULL && iv_size(v) > 0);
  return v[iv_size(v) - 1];
}


x86 assembly (clang, -O0):
<index_vector_last>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     114e <index_vector_last+0x2e>
mov    -0x8(%rbp),%rdi
call   1040 <iv_size@plt>
cmp    $0x0,%eax
setg   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <iv_size@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<index_vector_last>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
je     113b <index_vector_last+0x1b>
mov    %rbx,%rdi
call   1040 <iv_size@plt>
xor    %edi,%edi
test   %eax,%eax
setg   %dil
jmp    113d <index_vector_last+0x1d>
xor    %edi,%edi
call   1030 <assert@plt>
mov    %rbx,%rdi
call   1040 <iv_size@plt>
cltq
mov    -0x4(%rbx,%rax,4),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @index_vector_last(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32*, i32** %2
%7 = call i32 @iv_size(i32* %6)
%8 = icmp sgt i32 %7, 0
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ false, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32*, i32** %2
%14 = load i32*, i32** %2
%15 = call i32 @iv_size(i32* %14)
%16 = sub nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %13, i64 %17
%19 = load i32, i32* %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @index_vector_last(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @iv_size(i32* %0)
%5 = icmp sgt i32 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
%9 = tail call i32 @assert(i32 %8)
%10 = tail call i32 @iv_size(i32* %0)
%11 = add nsw i32 %10, -1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %0, i64 %12
%14 = load i32, i32* %13
ret i32 %14
}
void yy_2_TemplateArgumentChoice(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_2_TemplateArgumentChoice(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
char *strchr(char const *, char);
char *mpc_strchrnul(const char *s, int c) {
  char *ret = strchr(s, c);
  if (!ret)
    ret = strchr(s, '\0');
  return ret;
}


x86 assembly (clang, -O0):
<mpc_strchrnul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
movsbl %al,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    114c <mpc_strchrnul+0x3c>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpc_strchrnul>:
push   %rbx
mov    %rdi,%rbx
movsbl %sil,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     1134 <mpc_strchrnul+0x14>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @mpc_strchrnul(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = trunc i32 %7 to i8
%9 = call i8* @strchr(i8* %6, i8 signext %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %15, label %12
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = call i8* @strchr(i8* %13, i8 signext 0)
store i8* %14, i8** %5
br label %15
15: ; preds = %12, %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @mpc_strchrnul(i8* %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%8 = getelementptr i8, i8* %0, i64 %7
br label %9
9: ; preds = %6, %2
%10 = phi i8* [ %4, %2 ], [ %8, %6 ]
ret i8* %10
}
int BitCount(unsigned x) { return __builtin_popcount(x); }


x86 assembly (clang, -O0):
<BitCount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    %ecx,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%ecx
mov    %ecx,%eax
and    $0x33333333,%eax
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BitCount>:
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%edi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
ret

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

LLVM IR (-O2):
define i32 @BitCount(i32 %0) {
%2 = tail call i32 @llvm.ctpop.i32(i32 %0)
ret i32 %2
}
_Complex float test_csinhf(_Complex float x) { return __builtin_csinhf(x); }


x86 assembly (clang, -O0):
<test_csinhf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movlpd %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movss  %xmm1,-0x18(%rbp)
movss  %xmm0,-0x14(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <csinhf@plt>
movlpd %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0x4(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_csinhf>:
jmp    1030 <csinhf@plt>

LLVM IR (-O0):
define <2 x float> @test_csinhf(<2 x float> %0) {
%2 = alloca { float, float }
%3 = alloca { float, float }
%4 = alloca { float, float }
%5 = alloca { float, float }
%6 = bitcast { float, float }* %3 to <2 x float>*
store <2 x float> %0, <2 x float>* %6
%7 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%8 = load float, float* %7
%9 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
%10 = load float, float* %9
%11 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%12 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
store float %8, float* %11
store float %10, float* %12
%13 = bitcast { float, float }* %4 to <2 x float>*
%14 = load <2 x float>, <2 x float>* %13
%15 = call <2 x float> @csinhf(<2 x float> %14)
%16 = bitcast { float, float }* %5 to <2 x float>*
store <2 x float> %15, <2 x float>* %16
%17 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 0
%18 = load float, float* %17
%19 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 1
%20 = load float, float* %19
%21 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%22 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
store float %18, float* %21
store float %20, float* %22
%23 = bitcast { float, float }* %2 to <2 x float>*
%24 = load <2 x float>, <2 x float>* %23
ret <2 x float> %24
}

LLVM IR (-O2):
define <2 x float> @test_csinhf(<2 x float> %0) {
%2 = tail call <2 x float> @csinhf(<2 x float> %0)
ret <2 x float> %2
}
/* Variables and functions */
int /*<<< orphan*/ function_which_gives_up(int *);
scalar_t__ malloc(int);
void coverage1(int *x) {
  function_which_gives_up(x);
  char *m = (char *)malloc(12);
}


x86 assembly (clang, -O0):
<coverage1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <function_which_gives_up@plt>
mov    $0xc,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coverage1>:
push   %rax
call   1030 <function_which_gives_up@plt>
mov    $0xc,%edi
pop    %rax
jmp    1040 <malloc@plt>

LLVM IR (-O0):
define void @coverage1(i32* %0) {
%2 = alloca i32*
%3 = alloca i8*
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @function_which_gives_up(i32* %4)
%6 = call i64 @malloc(i32 12)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
ret void
}

LLVM IR (-O2):
define void @coverage1(i32* %0) {
%2 = tail call i32 @function_which_gives_up(i32* %0)
%3 = tail call i64 @malloc(i32 12)
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
uint64_t clearBit_fun_uint64_t(uint64_t x, uint32_t i) { return x & ~(1 << i); }


x86 assembly (clang, -O0):
<clearBit_fun_uint64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @clearBit_fun_uint64_t(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 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = and i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @clearBit_fun_uint64_t(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, -1
%5 = and i32 %4, %0
ret i32 %5
}
/* Variables and functions */
char *strchr(char const *, char);
char *__strchrnul(const char *s, int c) {
  char *result = strchr(s, c);
  if (result == NULL)
    result = strchr(s, '\0');
  return result;
}


x86 assembly (clang, -O0):
<__strchrnul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
movsbl %al,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    114c <__strchrnul+0x3c>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__strchrnul>:
push   %rbx
mov    %rdi,%rbx
movsbl %sil,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     1134 <__strchrnul+0x14>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @__strchrnul(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = trunc i32 %7 to i8
%9 = call i8* @strchr(i8* %6, i8 signext %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = call i8* @strchr(i8* %13, i8 signext 0)
store i8* %14, i8** %5
br label %15
15: ; preds = %12, %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @__strchrnul(i8* %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%8 = getelementptr i8, i8* %0, i64 %7
br label %9
9: ; preds = %6, %2
%10 = phi i8* [ %8, %6 ], [ %4, %2 ]
ret i8* %10
}
unsigned int hash_sip(unsigned int sip) {
  unsigned int ht = sip ^ 0;
  unsigned short ht_h16 = (ht & 0xFFFF0000) >> 16;
  unsigned short ht_l16 = (ht & 0x0000FFFF);
  unsigned short ht16 = ht_l16 ^ ht_h16;
  unsigned short ht16_h4 = (ht16 & 0xF000);
  unsigned short ht16_m4 = (ht16 & 0x0F00) << 4;
  unsigned short ht4 = ht16_h4 ^ ht16_m4;
  unsigned short ht_l8 = ht16 & 0xFF;
  unsigned short ht12 = ht_l8 | ht4;
  return (ht12 >> 2) & 0x03FF;
}


x86 assembly (clang, -O0):
<hash_sip>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0x0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffff0000,%eax
shr    $0x10,%eax
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffff,%eax
mov    %ax,-0xc(%rbp)
movzwl -0xc(%rbp),%eax
movzwl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %ax,-0xe(%rbp)
movzwl -0xe(%rbp),%eax
and    $0xf000,%eax
mov    %ax,-0x10(%rbp)
movzwl -0xe(%rbp),%eax
and    $0xf00,%eax
shl    $0x4,%eax
mov    %ax,-0x12(%rbp)
movzwl -0x10(%rbp),%eax
movzwl -0x12(%rbp),%ecx
xor    %ecx,%eax
mov    %ax,-0x14(%rbp)
movzwl -0xe(%rbp),%eax
and    $0xff,%eax
mov    %ax,-0x16(%rbp)
movzwl -0x16(%rbp),%eax
movzwl -0x14(%rbp),%ecx
or     %ecx,%eax
mov    %ax,-0x18(%rbp)
movzwl -0x18(%rbp),%eax
sar    $0x2,%eax
and    $0x3ff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_sip>:
mov    %edi,%eax
shr    $0x12,%eax
shr    $0x2,%edi
xor    %edi,%eax
and    $0x3f,%eax
ret

LLVM IR (-O0):
define i32 @hash_sip(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16
%7 = alloca i16
%8 = alloca i16
%9 = alloca i16
%10 = alloca i16
%11 = alloca i16
store i32 %0, i32* %2
%12 = load i32, i32* %2
%13 = xor i32 %12, 0
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = and i32 %14, -65536
%16 = lshr i32 %15, 16
%17 = trunc i32 %16 to i16
store i16 %17, i16* %4
%18 = load i32, i32* %3
%19 = and i32 %18, 65535
%20 = trunc i32 %19 to i16
store i16 %20, i16* %5
%21 = load i16, i16* %5
%22 = zext i16 %21 to i32
%23 = load i16, i16* %4
%24 = zext i16 %23 to i32
%25 = xor i32 %22, %24
%26 = trunc i32 %25 to i16
store i16 %26, i16* %6
%27 = load i16, i16* %6
%28 = zext i16 %27 to i32
%29 = and i32 %28, 61440
%30 = trunc i32 %29 to i16
store i16 %30, i16* %7
%31 = load i16, i16* %6
%32 = zext i16 %31 to i32
%33 = and i32 %32, 3840
%34 = shl i32 %33, 4
%35 = trunc i32 %34 to i16
store i16 %35, i16* %8
%36 = load i16, i16* %7
%37 = zext i16 %36 to i32
%38 = load i16, i16* %8
%39 = zext i16 %38 to i32
%40 = xor i32 %37, %39
%41 = trunc i32 %40 to i16
store i16 %41, i16* %9
%42 = load i16, i16* %6
%43 = zext i16 %42 to i32
%44 = and i32 %43, 255
%45 = trunc i32 %44 to i16
store i16 %45, i16* %10
%46 = load i16, i16* %10
%47 = zext i16 %46 to i32
%48 = load i16, i16* %9
%49 = zext i16 %48 to i32
%50 = or i32 %47, %49
%51 = trunc i32 %50 to i16
store i16 %51, i16* %11
%52 = load i16, i16* %11
%53 = zext i16 %52 to i32
%54 = ashr i32 %53, 2
%55 = and i32 %54, 1023
ret i32 %55
}

LLVM IR (-O2):
define i32 @hash_sip(i32 %0) {
%2 = lshr i32 %0, 18
%3 = lshr i32 %0, 2
%4 = xor i32 %2, %3
%5 = and i32 %4, 63
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ sgen(char *, char *, char *);
void cgdecgw(char *s) { sgen("%s\t%s", "decq", s); }


x86 assembly (clang, -O0):
<cgdecgw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xed8(%rip),%rsi
call   1030 <sgen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgdecgw>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee5(%rip),%rsi
jmp    1030 <sgen@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s\09%s\00"
@.str.1 = [5 x i8] c"decq\00"
define void @cgdecgw(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sgen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s\09%s\00"
@.str.1 = [5 x i8] c"decq\00"
define void @cgdecgw(i8* %0) {
%2 = tail call i32 @sgen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ INC16(int /*<<< orphan*/, int);
int /*<<< orphan*/ SA1Absolute(int);
void OpEEM0(void) { INC16(SA1Absolute(3), 0xFFFFFF); }


x86 assembly (clang, -O0):
<OpEEM0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <SA1Absolute@plt>
mov    %eax,%edi
mov    $0xffffff,%esi
call   1040 <INC16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpEEM0>:
push   %rax
mov    $0x3,%edi
call   1030 <SA1Absolute@plt>
mov    %eax,%edi
mov    $0xffffff,%esi
pop    %rax
jmp    1040 <INC16@plt>

LLVM IR (-O0):
define void @OpEEM0() {
%1 = call i32 @SA1Absolute(i32 3)
%2 = call i32 @INC16(i32 %1, i32 16777215)
ret void
}

LLVM IR (-O2):
define void @OpEEM0() {
%1 = tail call i32 @SA1Absolute(i32 3)
%2 = tail call i32 @INC16(i32 %1, i32 16777215)
ret void
}
int ArePixelsContrasting(int FirstPixel, int SecondPixel) {
  int PixelDifference = FirstPixel - SecondPixel;
  if ((PixelDifference > 128) || (PixelDifference < -128)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<ArePixelsContrasting>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x80,-0x10(%rbp)
jg     112a <ArePixelsContrasting+0x2a>
cmpl   $0xffffff80,-0x10(%rbp)
jge    1136 <ArePixelsContrasting+0x36>
movl   $0x1,-0x4(%rbp)
jmp    113d <ArePixelsContrasting+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ArePixelsContrasting>:
sub    %esi,%edi
add    $0xffffff7f,%edi
xor    %eax,%eax
cmp    $0xfffffeff,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ArePixelsContrasting(i32 %0, i32 %1) {
%3 = add i32 %0, -129
%4 = sub i32 %3, %1
%5 = icmp ult i32 %4, -257
%6 = zext i1 %5 to i32
ret i32 %6
}
const char *db_drop_jelines_table_sql(void) {
  static const char *query = "DROP TABLE jelines";
  return query;
}


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

x86 assembly (clang, -O2):
<db_drop_jelines_table_sql>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@db_drop_jelines_table_sql.query = internal global i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i32 0, i32 0)
@.str = [19 x i8] c"DROP TABLE jelines\00"
define i8* @db_drop_jelines_table_sql() {
%1 = load i8*, i8** @db_drop_jelines_table_sql.query
ret i8* %1
}

LLVM IR (-O2):
@.str = [19 x i8] c"DROP TABLE jelines\00"
define i8* @db_drop_jelines_table_sql() {
ret i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void info() {
  puts("Tripel Intermediate Language Compiler\n"
       "Copyright 2017 Andrea Fioraldi <andreafioraldi@gmail.com>\n"
       "    + version: "
       "1.0");
  puts("    + built on: GNU/Linux");
  puts("    + license: GNU Lesser General Public License v3\n");
}


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

x86 assembly (clang, -O2):
<info>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5d(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [115 x i8] c"Tripel Intermediate Language Compiler\0ACopyright 2017 Andrea Fioraldi <andreafioraldi@gmail.com>\0A + version: 1.0\00"
@.str.1 = [26 x i8] c" + built on: GNU/Linux\00"
@.str.2 = [53 x i8] c" + license: GNU Lesser General Public License v3\0A\00"
define void @info() {
%1 = call i32 @puts(i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [115 x i8] c"Tripel Intermediate Language Compiler\0ACopyright 2017 Andrea Fioraldi <andreafioraldi@gmail.com>\0A + version: 1.0\00"
@.str.1 = [26 x i8] c" + built on: GNU/Linux\00"
@.str.2 = [53 x i8] c" + license: GNU Lesser General Public License v3\0A\00"
define void @info() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([115 x i8], [115 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
ret void
}
long next_collatz_num(long x) {
  if (x % 2 == 0)
    return x / 2;
  else
    return x * 3 + 1;
}


x86 assembly (clang, -O0):
<next_collatz_num>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    1137 <next_collatz_num+0x37>
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x8(%rbp)
jmp    1144 <next_collatz_num+0x44>
imul   $0x3,-0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_collatz_num>:
test   $0x1,%dil
jne    1114 <next_collatz_num+0x14>
mov    %rdi,%rax
shr    $0x3f,%rax
add    %rdi,%rax
sar    %rax
ret
lea    (%rdi,%rdi,2),%rax
add    $0x1,%rax
ret

LLVM IR (-O0):
define i64 @next_collatz_num(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = srem i64 %4, 2
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i64, i64* %3
%9 = sdiv i64 %8, 2
store i64 %9, i64* %2
br label %14
10: ; preds = %1
%11 = load i64, i64* %3
%12 = mul nsw i64 %11, 3
%13 = add nsw i64 %12, 1
store i64 %13, i64* %2
br label %14
14: ; preds = %10, %7
%15 = load i64, i64* %2
ret i64 %15
}

LLVM IR (-O2):
define i64 @next_collatz_num(i64 %0) {
%2 = and i64 %0, 1
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = sdiv i64 %0, 2
br label %9
6: ; preds = %1
%7 = mul nsw i64 %0, 3
%8 = add nsw i64 %7, 1
br label %9
9: ; preds = %6, %4
%10 = phi i64 [ %5, %4 ], [ %8, %6 ]
ret i64 %10
}
int d_bgt_rm1(double a1, double *a2) { return (__builtin_isgreater(a1, *a2)); }


x86 assembly (clang, -O0):
<d_bgt_rm1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
ucomisd (%rax),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_bgt_rm1>:
xor    %eax,%eax
ucomisd (%rdi),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @d_bgt_rm1(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = load double, double* %3
%6 = load double*, double** %4
%7 = load double, double* %6
%8 = fcmp ogt double %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @d_bgt_rm1(double %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fcmp olt double %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int getOrigin(int);
int /*<<< orphan*/ initPersonOnFloor(int, int);
void angelinaCall(void) {
  int tmp;
  {
    {
      tmp = getOrigin(2);
      initPersonOnFloor(2, tmp);
    }
    return;
  }
}


x86 assembly (clang, -O0):
<angelinaCall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
call   1030 <getOrigin@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x2,%edi
call   1040 <initPersonOnFloor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<angelinaCall>:
push   %rax
mov    $0x2,%edi
call   1030 <getOrigin@plt>
mov    $0x2,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <initPersonOnFloor@plt>

LLVM IR (-O0):
define void @angelinaCall() {
%1 = alloca i32
%2 = call i32 @getOrigin(i32 2)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @initPersonOnFloor(i32 2, i32 %3)
ret void
}

LLVM IR (-O2):
define void @angelinaCall() {
%1 = tail call i32 @getOrigin(i32 2)
%2 = tail call i32 @initPersonOnFloor(i32 2, i32 %1)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  if (2 * y >= 1) {
    while (x >= 0) {
      x = x - 2 * y + 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
cmp    $0x1,%eax
jl     116c <main+0x5c>
jmp    1147 <main+0x37>
cmpl   $0x0,-0x8(%rbp)
jl     1167 <main+0x57>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
sub    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1147 <main+0x37>
jmp    116c <main+0x5c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jle    1147 <main+0x37>
test   %ebx,%ebx
js     1147 <main+0x37>
add    $0xffffffff,%ebx
add    %eax,%eax
mov    $0x1,%ecx
sub    %eax,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
add    %ecx,%ebx
cmp    $0xfffffffe,%ebx
jg     1140 <main+0x30>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = mul nsw i32 2, %6
%8 = icmp sge i32 %7, 1
br i1 %8, label %9, label %20
9: ; preds = %0
br label %10
10: ; preds = %13, %9
%11 = load i32, i32* %2
%12 = icmp sge i32 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %10
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = mul nsw i32 2, %15
%17 = sub nsw i32 %14, %16
%18 = add nsw i32 %17, 1
store i32 %18, i32* %2
br label %10
19: ; preds = %10
br label %20
20: ; preds = %19, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = mul i32 %2, -2
%4 = icmp sgt i32 %2, 0
%5 = icmp sgt i32 %1, -1
%6 = select i1 %4, i1 %5, i1 false
br i1 %6, label %7, label %12
7: ; preds = %0, %7
%8 = phi i32 [ %10, %7 ], [ %1, %0 ]
%9 = add i32 %8, %3
%10 = add nsw i32 %9, 1
%11 = icmp sgt i32 %9, -2
br i1 %11, label %7, label %12
12: ; preds = %7, %0
ret i32 0
}
const char *__malidrv_build_info(void) {
  return "malidrv:  API_VERSION=26 REPO_URL= REVISION=r3p2-01rel4 "
         "CHANGED_REVISION=r3p2-01rel4 CHANGE_DATE=r3p2-01rel4 BUILD_DATE=Tue "
         "Oct 15 00:54:09 EEST 2013 BUILD=release TARGET_PLATFORM=mali400-pmu "
         "MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 "
         "USING_UMP=y USING_PROFILING= USING_INTERNAL_PROFILING= "
         "USING_GPU_UTILIZATION=1 MALI_UPPER_HALF_SCHEDULING=1";
}


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

x86 assembly (clang, -O2):
<__malidrv_build_info>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [359 x i8] c"malidrv: API_VERSION=26 REPO_URL= REVISION=r3p2-01rel4 CHANGED_REVISION=r3p2-01rel4 CHANGE_DATE=r3p2-01rel4 BUILD_DATE=Tue Oct 15 00:54:09 EEST 2013 BUILD=release TARGET_PLATFORM=mali400-pmu MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING= USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([359 x i8], [359 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [359 x i8] c"malidrv: API_VERSION=26 REPO_URL= REVISION=r3p2-01rel4 CHANGED_REVISION=r3p2-01rel4 CHANGE_DATE=r3p2-01rel4 BUILD_DATE=Tue Oct 15 00:54:09 EEST 2013 BUILD=release TARGET_PLATFORM=mali400-pmu MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING= USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([359 x i8], [359 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void turnDX() {
  printf("DX\n\r");
  system("echo  1400000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle");
  system("echo  1400000 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle");
}


x86 assembly (clang, -O0):
<turnDX>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
call   1030 <system@plt>
lea    0xefa(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<turnDX>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed1(%rip),%rdi
call   1030 <system@plt>
lea    0xefd(%rip),%rdi
pop    %rax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"DX\0A\0D\00"
@.str.1 = [56 x i8] c"echo 1400000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle\00"
@.str.2 = [56 x i8] c"echo 1400000 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle\00"
define void @turnDX() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"DX\0A\0D\00"
@.str.1 = [56 x i8] c"echo 1400000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle\00"
@.str.2 = [56 x i8] c"echo 1400000 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle\00"
define void @turnDX() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.2, i64 0, i64 0))
ret void
}