xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("hello, github!\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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [16 x i8] c"hello, github!\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 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"hello, github!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_slli_epi64(int /*<<< orphan*/, int);
__m128i test_mm_slli_epi64(__m128i A) { return _mm_slli_epi64(A, 1); }


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

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

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

LLVM IR (-O2):
define i32 @test_mm_slli_epi64(i32 %0) {
%2 = tail call i32 @_mm_slli_epi64(i32 %0, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Going to create a fault\n");
  unsigned int *addr = (unsigned int *)0xABADC0DE, read;
  read = *addr;
  printf("We read the var, should not happen!\n");
  read = 0x0BADC0DE;
  *addr = read;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
mov    $0xabadc0de,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
movl   $0xbadc0de,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef4(%rip),%rdi
call   1030 <puts@plt>
mov    $0xabadc0de,%eax
movl   $0xbadc0de,(%rax)
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Going to create a fault\0A\00"
@.str.1 = [37 x i8] c"We read the var, should not happen!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
store i32* inttoptr (i64 2880291038 to i32*), i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
store i32 195936478, i32* %3
%8 = load i32, i32* %3
%9 = load i32*, i32** %2
store i32 %8, i32* %9
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"Going to create a fault\00"
@str.2 = [36 x i8] c"We read the var, should not happen!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.2, i64 0, i64 0))
store i32 195936478, i32* inttoptr (i64 2880291038 to i32*)
ret i32 0
}
void gtk_widget_set_state() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_set_state() {
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
scalar_t__ littleEndian();
uint16_t byteswap16(uint16_t num16) {
  if (littleEndian()) {
    return ((num16 & 0xff00) >> 8) | ((num16 & 0x00ff) << 8);
  } else {
    return num16;
  }
}


x86 assembly (clang, -O0):
<byteswap16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <littleEndian@plt>
cmp    $0x0,%rax
je     114d <byteswap16+0x3d>
mov    -0x8(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
mov    -0x8(%rbp),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <byteswap16+0x43>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<byteswap16>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <littleEndian@plt>
mov    %ebx,%ecx
rol    $0x8,%cx
test   %rax,%rax
movzwl %cx,%eax
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @byteswap16(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i64 (...) @littleEndian()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i32, i32* %3
%8 = and i32 %7, 65280
%9 = ashr i32 %8, 8
%10 = load i32, i32* %3
%11 = and i32 %10, 255
%12 = shl i32 %11, 8
%13 = or i32 %9, %12
store i32 %13, i32* %2
br label %16
14: ; preds = %1
%15 = load i32, i32* %3
store i32 %15, i32* %2
br label %16
16: ; preds = %14, %6
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @byteswap16(i32 %0) {
%2 = tail call i64 (...) @littleEndian()
%3 = icmp eq i64 %2, 0
%4 = trunc i32 %0 to i16
%5 = tail call i16 @llvm.bswap.i16(i16 %4)
%6 = zext i16 %5 to i32
%7 = select i1 %3, i32 %0, i32 %6
ret i32 %7
}
__float128 f128_add(__float128 a, __float128 b) { return a + b; }


x86 assembly (clang, -O0):
<f128_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movaps %xmm0,-0x10(%rbp)
movaps %xmm1,-0x20(%rbp)
movaps -0x10(%rbp),%xmm0
movaps -0x20(%rbp),%xmm1
call   1130 <__addtf3>
add    $0x20,%rsp
pop    %rbp
ret
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)

x86 assembly (clang, -O2):
<f128_add>:
jmp    1110 <__addtf3>
cs nopw 0x0(%rax,%rax,1)
nop

LLVM IR (-O0):
define fp128 @f128_add(fp128 %0, fp128 %1) {
%3 = alloca fp128
%4 = alloca fp128
store fp128 %0, fp128* %3
store fp128 %1, fp128* %4
%5 = load fp128, fp128* %3
%6 = load fp128, fp128* %4
%7 = fadd fp128 %5, %6
ret fp128 %7
}

LLVM IR (-O2):
define fp128 @f128_add(fp128 %0, fp128 %1) {
%3 = fadd fp128 %0, %1
ret fp128 %3
}
void android_linker_init() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ atomic_store(int /*<<< orphan*/ *, int);
void fi2c(atomic_int *i) { atomic_store(i, 1); }


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

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

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

LLVM IR (-O2):
define void @fi2c(i32* %0) {
%2 = tail call i32 @atomic_store(i32* %0, i32 1)
ret void
}
/* Type definitions */
struct stack {
  int dummy;
};

/* Variables and functions */
void *stack_pop(struct stack **);
void *stack_pop_fname(struct stack **path) { return stack_pop(path); }


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

x86 assembly (clang, -O2):
<stack_pop_fname>:
jmp    1030 <stack_pop@plt>

LLVM IR (-O0):
%struct.stack = type { i32 }
define i8* @stack_pop_fname(%struct.stack** %0) {
%2 = alloca %struct.stack**
store %struct.stack** %0, %struct.stack*** %2
%3 = load %struct.stack**, %struct.stack*** %2
%4 = call i8* @stack_pop(%struct.stack** %3)
ret i8* %4
}

LLVM IR (-O2):
%struct.stack = type { i32 }
define i8* @stack_pop_fname(%struct.stack** %0) {
%2 = tail call i8* @stack_pop(%struct.stack** %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ DATA_hines();
int /*<<< orphan*/ LibraryHeader(char *, char *);
int /*<<< orphan*/ STARTUP_hines();
LIBRARY_hines() {
  LibraryHeader("hines", "Sat Feb  1 10:41:16 2014 ");
  DATA_hines();
  STARTUP_hines();
}


x86 assembly (clang, -O0):
<LIBRARY_hines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xec0(%rip),%rsi
call   1040 <LibraryHeader@plt>
mov    $0x0,%al
call   1050 <DATA_hines@plt>
mov    $0x0,%al
call   1030 <STARTUP_hines@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LIBRARY_hines>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec7(%rip),%rsi
call   1040 <LibraryHeader@plt>
xor    %eax,%eax
call   1050 <DATA_hines@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <STARTUP_hines@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"hines\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:16 2014 \00"
define i32 @LIBRARY_hines() {
%1 = alloca i32
%2 = call i32 @LibraryHeader(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @DATA_hines()
%4 = call i32 (...) @STARTUP_hines()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [6 x i8] c"hines\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:16 2014 \00"
define i32 @LIBRARY_hines() {
%1 = tail call i32 @LibraryHeader(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @DATA_hines()
%3 = tail call i32 (...) @STARTUP_hines()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char const *);
int /*<<< orphan*/ c_plssub(int, int /*<<< orphan*/);
int opt_py(const char *opt, const char *myoptarg, void *client_data) {
  (void)opt;
  (void)client_data;
  c_plssub(-1, atoi(myoptarg));
  return 0;
}


x86 assembly (clang, -O0):
<opt_py>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1030 <c_plssub@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_py>:
push   %rax
mov    %rsi,%rdi
call   1040 <atoi@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1030 <c_plssub@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @opt_py(i8* %0, i8* %1, i8* %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 = load i8*, i8** %4
%8 = load i8*, i8** %6
%9 = load i8*, i8** %5
%10 = call i32 @atoi(i8* %9)
%11 = call i32 @c_plssub(i32 -1, i32 %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @opt_py(i8* nocapture readnone %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = tail call i32 @atoi(i8* %1)
%5 = tail call i32 @c_plssub(i32 -1, i32 %4)
ret i32 0
}
/* Variables and functions */
int inotify_rm_watch(int, int);
int __inotify_rm_watch(int fd, int wd) { return inotify_rm_watch(fd, wd); }


x86 assembly (clang, -O0):
<__inotify_rm_watch>:
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 <inotify_rm_watch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__inotify_rm_watch>:
jmp    1030 <inotify_rm_watch@plt>

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

LLVM IR (-O2):
define i32 @__inotify_rm_watch(i32 %0, i32 %1) {
%3 = tail call i32 @inotify_rm_watch(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Course: EG1302A - Spring 2014\n");
  printf("Name: Ahmed Al Okran\n");
  printf("Date Created: %d/%d/%d\n", 1, 28, 2014);
  printf("Assignment: 5");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x1,%esi
mov    $0x1c,%edx
mov    $0x7de,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
lea    0xf10(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
mov    $0x1,%esi
mov    $0x1c,%edx
mov    $0x7de,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Course: EG1302A - Spring 2014\0A\00"
@.str.1 = [22 x i8] c"Name: Ahmed Al Okran\0A\00"
@.str.2 = [24 x i8] c"Date Created: %d/%d/%d\0A\00"
@.str.3 = [14 x i8] c"Assignment: 5\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 28, i32 2014)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [24 x i8] c"Date Created: %d/%d/%d\0A\00"
@.str.3 = [14 x i8] c"Assignment: 5\00"
@str = [30 x i8] c"Course: EG1302A - Spring 2014\00"
@str.4 = [21 x i8] c"Name: Ahmed Al Okran\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 28, i32 2014)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ is_nx1();
int read_int_from_file(char *);
int get_battery_percent(void) {
  if (is_nx1()) {
    return read_int_from_file("/sys/devices/platform/micom-ctrl/body_bat_soc");
  }
  return -1;
}


x86 assembly (clang, -O0):
<get_battery_percent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <is_nx1@plt>
cmp    $0x0,%rax
je     114d <get_battery_percent+0x2d>
lea    0xec0(%rip),%rdi
call   1040 <read_int_from_file@plt>
mov    %eax,-0x4(%rbp)
jmp    1154 <get_battery_percent+0x34>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_battery_percent>:
push   %rax
xor    %eax,%eax
call   1030 <is_nx1@plt>
test   %rax,%rax
je     113a <get_battery_percent+0x1a>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <read_int_from_file@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"/sys/devices/platform/micom-ctrl/body_bat_soc\00"
define i32 @get_battery_percent() {
%1 = alloca i32
%2 = call i64 (...) @is_nx1()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @read_int_from_file(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
store i32 %5, i32* %1
br label %7
6: ; preds = %0
store i32 -1, i32* %1
br label %7
7: ; preds = %6, %4
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [46 x i8] c"/sys/devices/platform/micom-ctrl/body_bat_soc\00"
define i32 @get_battery_percent() {
%1 = tail call i64 (...) @is_nx1()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @read_int_from_file(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ -1, %0 ]
ret i32 %6
}
int test_imm_D5int8_mem(signed char *val) {
  return ((*val) & (0xD5 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_D5int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -43
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ rmWorkProc(int);
void IERmWorkProc(int workprocid) { rmWorkProc(workprocid); }


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

x86 assembly (clang, -O2):
<IERmWorkProc>:
jmp    1030 <rmWorkProc@plt>

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

LLVM IR (-O2):
define void @IERmWorkProc(i32 %0) {
%2 = tail call i32 @rmWorkProc(i32 %0)
ret void
}
int cfg_none_handler(const char *optarg, void *value_addr,
                     const struct argconfig_options *opt) {
  *((int *)value_addr) = 1;
  return 0;
}


x86 assembly (clang, -O0):
<cfg_none_handler>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_none_handler>:
movl   $0x1,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.argconfig_options = type opaque
define i32 @cfg_none_handler(i8* %0, i8* %1, %struct.argconfig_options* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.argconfig_options*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.argconfig_options* %2, %struct.argconfig_options** %6
%7 = load i8*, i8** %5
%8 = bitcast i8* %7 to i32*
store i32 1, i32* %8
ret i32 0
}

LLVM IR (-O2):
%struct.argconfig_options = type opaque
define i32 @cfg_none_handler(i8* nocapture readnone %0, i8* nocapture writeonly %1, %struct.argconfig_options* nocapture readnone %2) {
%4 = bitcast i8* %1 to i32*
store i32 1, i32* %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SIGHUP;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ kill(int, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (kill(12109, SIGHUP) != 0) {
    fprintf(stderr, "error\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    0x2eb3(%rip),%rax
mov    (%rax),%esi
mov    $0x2f4d,%edi
call   1040 <kill@plt>
cmp    $0x0,%rax
je     1168 <main+0x48>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    0xe9d(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
mov    $0x2f4d,%edi
call   1040 <kill@plt>
test   %rax,%rax
je     114e <main+0x2e>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
lea    0xeb7(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGHUP = global i32 0
@stderr = global i32 0
@.str = [7 x i8] c"error\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 = load i32, i32* @SIGHUP
%7 = call i64 @kill(i32 12109, i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %2
ret i32 0
}

LLVM IR (-O2):
@SIGHUP = global i32 0
@stderr = global i32 0
@.str = [7 x i8] c"error\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @SIGHUP
%4 = tail call i64 @kill(i32 12109, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %6, %2
ret i32 0
}
void ff_hevc_put_hevc_bi_qpel_h32_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_h32_10_avx2() {
ret void
}
long __ocl_rhadd_long(long src1, long src2) {
  long carry = (src1 & 1) | (src2 & 1);
  return (src1 >> 1) + (src2 >> 1) + carry;
}


x86 assembly (clang, -O0):
<__ocl_rhadd_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1,%rax
mov    -0x10(%rbp),%rcx
and    $0x1,%rcx
or     %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x1,%rax
mov    -0x10(%rbp),%rcx
sar    $0x1,%rcx
add    %rcx,%rax
add    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_rhadd_long>:
mov    %esi,%eax
or     %edi,%eax
and    $0x1,%eax
sar    %rdi
sar    %rsi
add    %rsi,%rax
add    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @__ocl_rhadd_long(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = and i64 %6, 1
%8 = load i64, i64* %4
%9 = and i64 %8, 1
%10 = or i64 %7, %9
store i64 %10, i64* %5
%11 = load i64, i64* %3
%12 = ashr i64 %11, 1
%13 = load i64, i64* %4
%14 = ashr i64 %13, 1
%15 = add nsw i64 %12, %14
%16 = load i64, i64* %5
%17 = add nsw i64 %15, %16
ret i64 %17
}

LLVM IR (-O2):
define i64 @__ocl_rhadd_long(i64 %0, i64 %1) {
%3 = or i64 %1, %0
%4 = and i64 %3, 1
%5 = ashr i64 %0, 1
%6 = ashr i64 %1, 1
%7 = add nsw i64 %6, %5
%8 = add nsw i64 %7, %4
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ box_boolean(int);
int /*<<< orphan*/ dpop();
double untag_float_fast(int /*<<< orphan*/);
void primitive_float_greatereq_impl(void) {
  double y = untag_float_fast(dpop());
  double x = untag_float_fast(dpop());
  ;
  box_boolean(x >= y);
}


x86 assembly (clang, -O0):
<primitive_float_greatereq_impl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <box_boolean@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_float_greatereq_impl>:
push   %rax
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
xor    %edi,%edi
ucomisd (%rsp),%xmm0
setae  %dil
pop    %rax
jmp    1040 <box_boolean@plt>

LLVM IR (-O0):
define void @primitive_float_greatereq_impl() {
%1 = alloca double
%2 = alloca double
%3 = call i32 (...) @dpop()
%4 = call double @untag_float_fast(i32 %3)
store double %4, double* %1
%5 = call i32 (...) @dpop()
%6 = call double @untag_float_fast(i32 %5)
store double %6, double* %2
%7 = load double, double* %2
%8 = load double, double* %1
%9 = fcmp oge double %7, %8
%10 = zext i1 %9 to i32
%11 = call i32 @box_boolean(i32 %10)
ret void
}

LLVM IR (-O2):
define void @primitive_float_greatereq_impl() {
%1 = tail call i32 (...) @dpop()
%2 = tail call double @untag_float_fast(i32 %1)
%3 = tail call i32 (...) @dpop()
%4 = tail call double @untag_float_fast(i32 %3)
%5 = fcmp oge double %4, %2
%6 = zext i1 %5 to i32
%7 = tail call i32 @box_boolean(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ InitDrives();
int /*<<< orphan*/ ZapWinStateVars();
void ZapOSGLUVars(void) {
  InitDrives();
  ZapWinStateVars();
}


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

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

LLVM IR (-O0):
define void @ZapOSGLUVars() {
%1 = call i32 (...) @InitDrives()
%2 = call i32 (...) @ZapWinStateVars()
ret void
}

LLVM IR (-O2):
define void @ZapOSGLUVars() {
%1 = tail call i32 (...) @InitDrives()
%2 = tail call i32 (...) @ZapWinStateVars()
ret void
}
int GetDistExtraBits(int dist) {
  if (dist < 5)
    return 0;
  return (31 ^ __builtin_clz(dist - 1)) - 1;
}


x86 assembly (clang, -O0):
<GetDistExtraBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    111d <GetDistExtraBits+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1132 <GetDistExtraBits+0x32>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
bsr    %eax,%eax
xor    $0x1f,%eax
xor    $0x1f,%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetDistExtraBits>:
xor    %eax,%eax
cmp    $0x5,%edi
jl     1113 <GetDistExtraBits+0x13>
add    $0xffffffff,%edi
bsr    %edi,%eax
xor    $0xffffffe0,%eax
add    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @GetDistExtraBits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 5
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %13
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = call i32 @llvm.ctlz.i32(i32 %9, i1 true)
%11 = xor i32 31, %10
%12 = sub nsw i32 %11, 1
store i32 %12, i32* %2
br label %13
13: ; preds = %7, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @GetDistExtraBits(i32 %0) {
%2 = icmp slt i32 %0, 5
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @llvm.ctlz.i32(i32 %4, i1 true)
%6 = sub nsw i32 30, %5
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 0, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int sum = 0;
  for (int i = 0; i < 10; i++) {
    if (i % 2)
      break;
    sum += i;
  }
  printf("%d\n", sum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1167 <main+0x57>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1150 <main+0x40>
jmp    1167 <main+0x57>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
mov    -0x8(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %16, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = load i32, i32* %3
%9 = srem i32 %8, 2
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
br label %19
12: ; preds = %7
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = add nsw i32 %14, %13
store i32 %15, i32* %2
br label %16
16: ; preds = %12
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %4
19: ; preds = %11, %4
%20 = load i32, i32* %2
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
int fib(int);
int /*<<< orphan*/ printChar(char);
int /*<<< orphan*/ printInt(int);
int read();
void main() {
  int x = read();
  printInt(fib(x));
  if (x < 10)
    printInt(x);
  printChar('\n');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <read@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <fib@plt>
mov    %eax,%edi
call   1030 <printInt@plt>
cmpl   $0xa,-0x4(%rbp)
jge    1173 <main+0x33>
mov    -0x4(%rbp),%edi
call   1030 <printInt@plt>
mov    $0xa,%edi
call   1050 <printChar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <read@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1060 <fib@plt>
mov    %eax,%edi
call   1030 <printInt@plt>
cmp    $0x9,%ebx
jg     1164 <main+0x24>
mov    %ebx,%edi
call   1030 <printInt@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1050 <printChar@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = call i32 (...) @read()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @fib(i32 %3)
%5 = call i32 @printInt(i32 %4)
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = load i32, i32* %1
%10 = call i32 @printInt(i32 %9)
br label %11
11: ; preds = %8, %0
%12 = call i32 @printChar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @read()
%2 = tail call i32 @fib(i32 %1)
%3 = tail call i32 @printInt(i32 %2)
%4 = icmp slt i32 %1, 10
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 @printInt(i32 %1)
br label %7
7: ; preds = %5, %0
%8 = tail call i32 @printChar(i8 signext 10)
ret void
}
/* Variables and functions */
double phaseDifference();
double determineAngleToSignal(void) { return phaseDifference(); }


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

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

LLVM IR (-O0):
define double @determineAngleToSignal() {
%1 = call double (...) @phaseDifference()
ret double %1
}

LLVM IR (-O2):
define double @determineAngleToSignal() {
%1 = tail call double (...) @phaseDifference()
ret double %1
}
/* Variables and functions */
int scsi_pt_open_flags(char const *, int, int);
int sg_cmds_open_flags(const char *device_name, int flags, int verbose) {
  return scsi_pt_open_flags(device_name, flags, verbose);
}


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

x86 assembly (clang, -O2):
<sg_cmds_open_flags>:
jmp    1030 <scsi_pt_open_flags@plt>

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

LLVM IR (-O2):
define i32 @sg_cmds_open_flags(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @scsi_pt_open_flags(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
scalar_t__ integer_solve_quadratic(long, long, long, long *, long *);
int get_m(long a, long b, long c) {
  long x1 = 0;
  long x2 = 0;
  if (integer_solve_quadratic(a, b, c, &x1, &x2))
    return x2;
  else
    return -1;
}


x86 assembly (clang, -O0):
<get_m>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    -0x28(%rbp),%rcx
lea    -0x30(%rbp),%r8
call   1030 <integer_solve_quadratic@plt>
cmp    $0x0,%rax
je     1163 <get_m+0x53>
mov    -0x30(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    116a <get_m+0x5a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_m>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1030 <integer_solve_quadratic@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
or     0x8(%rsp),%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @get_m(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = bitcast i64* %4 to i8*
store i64 0, i64* %4
%7 = bitcast i64* %5 to i8*
store i64 0, i64* %5
%8 = call i64 @integer_solve_quadratic(i64 %0, i64 %1, i64 %2, i64* %4, i64* %5)
%9 = icmp eq i64 %8, 0
%10 = load i64, i64* %5
%11 = trunc i64 %10 to i32
%12 = select i1 %9, i32 -1, i32 %11
ret i32 %12
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void spi_devsel(int n) {
  *(volatile uint32_t *)0x1400000 = 0x80 | ((n & 0x7) << 4);
}


x86 assembly (clang, -O0):
<spi_devsel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x7,%ecx
shl    $0x4,%ecx
or     $0x80,%ecx
mov    $0x1400000,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_devsel>:
or     $0x8,%edi
shl    $0x4,%edi
movzbl %dil,%eax
mov    %eax,0x1400000
ret

LLVM IR (-O0):
define void @spi_devsel(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 7
%5 = shl i32 %4, 4
%6 = or i32 128, %5
store volatile i32 %6, i32* inttoptr (i64 20971520 to i32*)
ret void
}

LLVM IR (-O2):
define void @spi_devsel(i32 %0) {
%2 = shl i32 %0, 4
%3 = and i32 %2, 112
%4 = or i32 %3, 128
store volatile i32 %4, i32* inttoptr (i64 20971520 to i32*)
ret void
}
/* Variables and functions */
int IntActiveIrqNumGet();
int intr_cur() { return IntActiveIrqNumGet(); }


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

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

LLVM IR (-O0):
define i32 @intr_cur() {
%1 = call i32 (...) @IntActiveIrqNumGet()
ret i32 %1
}

LLVM IR (-O2):
define i32 @intr_cur() {
%1 = tail call i32 (...) @IntActiveIrqNumGet()
ret i32 %1
}
void log_to_null(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @log_to_null(i8* nocapture %0, ...) {
ret void
}
void myfree(void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @myfree(i8* nocapture %0) {
ret void
}
unsigned xrop3_151_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  unsigned stk4;
  stk4 = T | S;
  stk4 = ~stk4;
  stk3 = D | stk4;
  stk2 = S ^ stk3;
  stk1 = T ^ stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_151_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_151_0_0>:
mov    %esi,%eax
shl    $0x8,%eax
lea    (%rsi,%rax,1),%ecx
or     %edi,%eax
shl    $0x8,%edi
not    %eax
or     %edi,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_151_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
store i32 %17, i32* %6
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = or i32 %20, %22
store i32 %23, i32* %7
%24 = load i32, i32* %7
%25 = load i32, i32* %6
%26 = or i32 %24, %25
store i32 %26, i32* %11
%27 = load i32, i32* %11
%28 = xor i32 %27, -1
store i32 %28, i32* %11
%29 = load i32, i32* %5
%30 = load i32, i32* %11
%31 = or i32 %29, %30
store i32 %31, i32* %10
%32 = load i32, i32* %6
%33 = load i32, i32* %10
%34 = xor i32 %32, %33
store i32 %34, i32* %9
%35 = load i32, i32* %7
%36 = load i32, i32* %9
%37 = xor i32 %35, %36
store i32 %37, i32* %8
%38 = load i32, i32* %8
ret i32 %38
}

LLVM IR (-O2):
define i32 @xrop3_151_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = zext i8 %1 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = or i32 %6, %5
%8 = or i32 %6, %3
%9 = xor i32 %8, -1
%10 = or i32 %4, %9
%11 = xor i32 %10, %7
ret i32 %11
}
int __b_internal(int e) { return e + 42; }


x86 assembly (clang, -O0):
<__b_internal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2a,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__b_internal>:
lea    0x2a(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @__b_internal(i32 %0) {
%2 = add nsw i32 %0, 42
ret i32 %2
}
void cf_status(char *c) {}


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

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

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

LLVM IR (-O2):
define void @cf_status(i8* nocapture %0) {
ret void
}
void fa6(void) {
p0A:
  goto p0A;
  goto a;
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
a:
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa6>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa6+0x4>

x86 assembly (clang, -O2):
<fa6>:
jmp    1100 <fa6>

LLVM IR (-O0):
define void @fa6() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; preds = %8
br label %8
9: ; No predecessors!
br label %10
10: ; preds = %10, %9
br label %10
11: ; No predecessors!
br label %12
12: ; preds = %12, %11
br label %12
13: ; preds = %13
br label %13
14: ; No predecessors!
br label %15
15: ; preds = %15, %14
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa6() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int cos(int);
int sin(int);
int internal_cot_i(int value) { return cos(value) / sin(value); }


x86 assembly (clang, -O0):
<internal_cot_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <cos@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <sin@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<internal_cot_i>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <cos@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <sin@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @internal_cot_i(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cos(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @sin(i32 %5)
%7 = sdiv i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @internal_cot_i(i32 %0) {
%2 = tail call i32 @cos(i32 %0)
%3 = tail call i32 @sin(i32 %0)
%4 = sdiv i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_arr(int A[], int n) {
  int i;
  for (i = 0; i < n; i++)
    printf("%d\n", A[i]);
}


x86 assembly (clang, -O0):
<print_arr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <print_arr+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_arr+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_arr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <print_arr+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_arr+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @print_arr(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @print_arr(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int epoll_create1(int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int createEpollFD(void) {
  int epollfd;
  if ((epollfd = epoll_create1(0)) == -1) {
    perror("Epoll create");
    exit(EXIT_FAILURE);
  }
  return epollfd;
}


x86 assembly (clang, -O0):
<createEpollFD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1050 <epoll_create1@plt>
mov    %eax,-0x4(%rbp)
cmp    $0xffffffff,%eax
jne    1165 <createEpollFD+0x35>
lea    0xeae(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createEpollFD>:
push   %rax
xor    %edi,%edi
call   1050 <epoll_create1@plt>
cmp    $0xffffffff,%eax
je     113f <createEpollFD+0xf>
pop    %rcx
ret
lea    0xeba(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Epoll create\00"
@EXIT_FAILURE = global i32 0
define i32 @createEpollFD() {
%1 = alloca i32
%2 = call i32 @epoll_create1(i32 0)
store i32 %2, i32* %1
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
8: ; preds = %0
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [13 x i8] c"Epoll create\00"
@EXIT_FAILURE = global i32 0
define i32 @createEpollFD() {
%1 = tail call i32 @epoll_create1(i32 0)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
7: ; preds = %0
ret i32 %1
}