xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_kill_client() {
  printf("NOT IMPLEMENTED:"
         "pa_context_kill_client"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [39 x i8] c"NOT IMPLEMENTED:pa_context_kill_client\00"
define i32 @pa_context_kill_client() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
long money_div(long x, long y) { return ((x)*100) / y; }


x86 assembly (clang, -O0):
<money_div>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
imul   $0x64,-0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<money_div>:
imul   $0x64,%rdi,%rax
mov    %rax,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1116 <money_div+0x16>
cqto
idiv   %rsi
ret
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
define i64 @money_div(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = mul nsw i64 %5, 100
%7 = load i64, i64* %4
%8 = sdiv i64 %6, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @money_div(i64 %0, i64 %1) {
%3 = mul nsw i64 %0, 100
%4 = sdiv i64 %3, %1
ret i64 %4
}
/* Variables and functions */
char *jsonCmd(char *, int);
char *jsonCmdReset(int mode) { return (jsonCmd("reset", mode)); }


x86 assembly (clang, -O0):
<jsonCmdReset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <jsonCmd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsonCmdReset>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <jsonCmd@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"reset\00"
define i8* @jsonCmdReset(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i8* @jsonCmd(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* %4
}

LLVM IR (-O2):
@.str = [6 x i8] c"reset\00"
define i8* @jsonCmdReset(i32 %0) {
%2 = tail call i8* @jsonCmd(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %2
}
void *memcpy(void *dest, const void *src, int n) {
  __asm__("cld\n\t"
          "rep\n\t"
          "movsb" ::"c"(n),
          "S"(src), "D"(dest));
  return dest;
}


x86 assembly (clang, -O0):
<memcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdi
cld
rep movsb %ds:(%rsi),%es:(%rdi)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcpy>:
mov    %edx,%ecx
cld
rep movsb %ds:(%rsi),%es:(%rdi)
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @memcpy(i8* returned %0, i8* %1, i32 %2) {
tail call void asm sideeffect "cld\0A\09rep\0A\09movsb", "{cx},{si},{di},~{dirflag},~{fpsr},~{flags}"(i32 %2, i8* %1, i8* %0)
ret i8* %0
}
void swap_min_heap_node(struct min_heap_node **a, struct min_heap_node **b) {
  struct min_heap_node *t = *a;
  *a = *b;
  *b = t;
}


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

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

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

LLVM IR (-O2):
%struct.min_heap_node = type opaque
define void @swap_min_heap_node(%struct.min_heap_node** nocapture %0, %struct.min_heap_node** nocapture %1) {
%3 = load %struct.min_heap_node*, %struct.min_heap_node** %0
%4 = load %struct.min_heap_node*, %struct.min_heap_node** %1
store %struct.min_heap_node* %4, %struct.min_heap_node** %0
store %struct.min_heap_node* %3, %struct.min_heap_node** %1
ret void
}
/* Type definitions */
struct predicate {
  int dummy;
};
struct parser_table {
  int dummy;
};

/* Variables and functions */
struct predicate *insert_primary(struct parser_table const *);
bool parse_false(const struct parser_table *entry, char **argv, int *arg_ptr) {
  struct predicate *pred = insert_primary(entry);
  return true;
}


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

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

LLVM IR (-O0):
%struct.parser_table = type { i32 }
%struct.predicate = type { i32 }
define i32 @parse_false(%struct.parser_table* %0, i8** %1, i32* %2) {
%4 = alloca %struct.parser_table*
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca %struct.predicate*
store %struct.parser_table* %0, %struct.parser_table** %4
store i8** %1, i8*** %5
store i32* %2, i32** %6
%8 = load %struct.parser_table*, %struct.parser_table** %4
%9 = call %struct.predicate* @insert_primary(%struct.parser_table* %8)
store %struct.predicate* %9, %struct.predicate** %7
ret i32 1
}

LLVM IR (-O2):
%struct.parser_table = type { i32 }
%struct.predicate = type { i32 }
define i32 @parse_false(%struct.parser_table* %0, i8** nocapture readnone %1, i32* nocapture readnone %2) {
%4 = tail call %struct.predicate* @insert_primary(%struct.parser_table* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_short_or_to_all(short *target, short *source, int nreduce,
                                  int PE_start, int logPE_stride, int PE_size,
                                  short *pWrk, long *pSync) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_short_or_to_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_short_or_to_all(i16* %0, i16* %1, i32 %2, i32 %3, i32 %4, i32 %5, i16* %6, i64* %7) {
%9 = alloca i16*
%10 = alloca i16*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i16*
%16 = alloca i64*
store i16* %0, i16** %9
store i16* %1, i16** %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i16* %6, i16** %15
store i64* %7, i64** %16
%17 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_short_or_to_all(i16* nocapture readnone %0, i16* nocapture readnone %1, i32 %2, i32 %3, i32 %4, i32 %5, i16* nocapture readnone %6, i64* nocapture readnone %7) {
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
int puts(const char *s) {
  if (s == ((void *)0))
    fail("Escribiendo string nula");
  return write(1, strlen(s), s);
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1155 <puts+0x25>
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1040 <fail@plt>
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rsi
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1147 <puts+0x17>
lea    0xec0(%rip),%rdi
xor    %eax,%eax
call   1040 <fail@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    $0x1,%edi
mov    %rax,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Escribiendo string nula\00"
define i32 @puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @fail to i32 (i8*, ...)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = load i8*, i8** %2
%9 = call i64 @strlen(i8* %8)
%10 = load i8*, i8** %2
%11 = call i32 (i32, i64, i8*, ...) bitcast (i32 (...)* @write to i32 (i32, i64, i8*, ...)*)(i32 1, i64 %9, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
@.str = [24 x i8] c"Escribiendo string nula\00"
define i32 @puts(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @fail to i32 (i8*, ...)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%7 = tail call i32 (i32, i64, i8*, ...) bitcast (i32 (...)* @write to i32 (i32, i64, i8*, ...)*)(i32 1, i64 %6, i8* %0)
ret i32 %7
}
void gtk_icon_view_selected_foreach() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_view_selected_foreach() {
ret void
}
/* Type definitions */
struct session_expires {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free_session_expires(struct session_expires *);
void hf_free_session_expires(void *parsed) {
  struct session_expires *se;
  se = (struct session_expires *)parsed;
  free_session_expires(se);
}


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

x86 assembly (clang, -O2):
<hf_free_session_expires>:
jmp    1030 <free_session_expires@plt>

LLVM IR (-O0):
%struct.session_expires = type { i32 }
define void @hf_free_session_expires(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.session_expires*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.session_expires*
store %struct.session_expires* %5, %struct.session_expires** %3
%6 = load %struct.session_expires*, %struct.session_expires** %3
%7 = call i32 @free_session_expires(%struct.session_expires* %6)
ret void
}

LLVM IR (-O2):
%struct.session_expires = type { i32 }
define void @hf_free_session_expires(i8* %0) {
%2 = bitcast i8* %0 to %struct.session_expires*
%3 = tail call i32 @free_session_expires(%struct.session_expires* %2)
ret void
}
void gtk_widget_set_scroll_adjustments() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_set_scroll_adjustments() {
ret void
}
void *LoadPointer(void **addr) { return __atomic_load_n(addr, 5); }


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

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

LLVM IR (-O0):
define i8* @LoadPointer(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = bitcast i8** %4 to i64*
%6 = bitcast i8** %3 to i64*
%7 = load atomic i64, i64* %5 seq_cst
store i64 %7, i64* %6
%8 = bitcast i64* %6 to i8**
%9 = load i8*, i8** %8
ret i8* %9
}

LLVM IR (-O2):
define i8* @LoadPointer(i8** nocapture %0) {
%2 = bitcast i8** %0 to i64*
%3 = load atomic i64, i64* %2 seq_cst
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_09(uint64_t x) {
  __asm__("rolq $9, %0" : "=r"(x) : "0"(x));
  return x;
}


x86 assembly (clang, -O0):
<ROL64_09>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
rol    $0x9,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ROL64_09>:
mov    %rdi,%rax
rol    $0x9,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_09(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$9, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_09(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$9, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void int_println(int64_t val) { printf("%ld\n", val); }


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

x86 assembly (clang, -O2):
<int_println>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define void @int_println(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void REMR3NotifyInterruptSet(void) {}


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

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

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

LLVM IR (-O2):
define void @REMR3NotifyInterruptSet() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Pop();
void Pop2(void) {
  Pop();
  Pop();
}


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

x86 assembly (clang, -O2):
<Pop2>:
push   %rax
xor    %eax,%eax
call   1030 <Pop@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <Pop@plt>

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

LLVM IR (-O2):
define void @Pop2() {
%1 = tail call i32 (...) @Pop()
%2 = tail call i32 (...) @Pop()
ret void
}
void TimerPrescalerConfigure(unsigned long ulBase, unsigned long ulPrescale,
                             unsigned long ulPSCReloadTime) {

  ;
  ;

  ;
  (*((volatile unsigned long *)(ulBase + 0x00000028))) = ulPrescale;
  (*((volatile unsigned long *)(ulBase + 0x00000014))) = ulPSCReloadTime;
}


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

x86 assembly (clang, -O2):
<TimerPrescalerConfigure>:
mov    %rsi,0x28(%rdi)
mov    %rdx,0x14(%rdi)
ret

LLVM IR (-O0):
define void @TimerPrescalerConfigure(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %5
%8 = load i64, i64* %4
%9 = add i64 %8, 40
%10 = inttoptr i64 %9 to i64*
store volatile i64 %7, i64* %10
%11 = load i64, i64* %6
%12 = load i64, i64* %4
%13 = add i64 %12, 20
%14 = inttoptr i64 %13 to i64*
store volatile i64 %11, i64* %14
ret void
}

LLVM IR (-O2):
define void @TimerPrescalerConfigure(i64 %0, i64 %1, i64 %2) {
%4 = add i64 %0, 40
%5 = inttoptr i64 %4 to i64*
store volatile i64 %1, i64* %5
%6 = add i64 %0, 20
%7 = inttoptr i64 %6 to i64*
store volatile i64 %2, i64* %7
ret void
}
void glmMakeVector2d(double result[2], const double p1[2], const double p2[2]) {
  result[0] = p2[0] - p1[0];
  result[1] = p2[1] - p1[1];
}


x86 assembly (clang, -O0):
<glmMakeVector2d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmMakeVector2d>:
movsd  (%rdx),%xmm0
subsd  (%rsi),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rdx),%xmm0
subsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @glmMakeVector2d(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %6
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %5
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fsub double %9, %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 0
store double %13, double* %15
%16 = load double*, double** %6
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load double, double* %17
%19 = load double*, double** %5
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = fsub double %18, %21
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 1
store double %22, double* %24
ret void
}

LLVM IR (-O2):
define void @glmMakeVector2d(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %2
%5 = load double, double* %1
%6 = fsub double %4, %5
store double %6, double* %0
%7 = getelementptr inbounds double, double* %2, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %1, i64 1
%10 = load double, double* %9
%11 = fsub double %8, %10
%12 = getelementptr inbounds double, double* %0, i64 1
store double %11, double* %12
ret void
}
/* Variables and functions */
float log10f(float);
float convert_levelToDB(float level, float maxLevel) {
  return 20.0f * log10f(level / maxLevel);
}


x86 assembly (clang, -O0):
<convert_levelToDB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
call   1030 <log10f@plt>
movaps %xmm0,%xmm1
movss  0xec4(%rip),%xmm0
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_levelToDB>:
push   %rax
divss  %xmm1,%xmm0
call   1030 <log10f@plt>
mulss  0xede(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @convert_levelToDB(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fdiv float %5, %6
%8 = call float @log10f(float %7)
%9 = fmul float 2.000000e+01, %8
ret float %9
}

LLVM IR (-O2):
define float @convert_levelToDB(float %0, float %1) {
%3 = fdiv float %0, %1
%4 = tail call float @log10f(float %3)
%5 = fmul float %4, 2.000000e+01
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ GLUT_ELAPSED_TIME;
int allocBullet();
int /*<<< orphan*/ glutGet(int /*<<< orphan*/);
int /*<<< orphan*/ initBullet(int, int /*<<< orphan*/);
void shotBullet(void) {
  int entry;
  entry = allocBullet();
  if (entry >= 0) {
    initBullet(entry, glutGet(GLUT_ELAPSED_TIME));
  }
}


x86 assembly (clang, -O0):
<shotBullet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <allocBullet@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     116a <shotBullet+0x3a>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1030 <glutGet@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <initBullet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shotBullet>:
push   %rbx
xor    %eax,%eax
call   1050 <allocBullet@plt>
test   %eax,%eax
js     1156 <shotBullet+0x26>
mov    %eax,%ebx
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1030 <glutGet@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <initBullet@plt>
pop    %rbx
ret

LLVM IR (-O0):
@GLUT_ELAPSED_TIME = global i32 0
define void @shotBullet() {
%1 = alloca i32
%2 = call i32 (...) @allocBullet()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0
%6 = load i32, i32* %1
%7 = load i32, i32* @GLUT_ELAPSED_TIME
%8 = call i32 @glutGet(i32 %7)
%9 = call i32 @initBullet(i32 %6, i32 %8)
br label %10
10: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@GLUT_ELAPSED_TIME = global i32 0
define void @shotBullet() {
%1 = tail call i32 (...) @allocBullet()
%2 = icmp sgt i32 %1, -1
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = load i32, i32* @GLUT_ELAPSED_TIME
%5 = tail call i32 @glutGet(i32 %4)
%6 = tail call i32 @initBullet(i32 %1, i32 %5)
br label %7
7: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void asmheader() {
  printf("#assemble/link with 'gcc file.s -o file");
  printf("	.text\n");
  printf(".globl _main\n");
  printf("_main:\n");
  printf("	pushl	%ebp\n");
}


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

x86 assembly (clang, -O2):
<asmheader>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
lea    0xefc(%rip),%rdi
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xed0(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"#assemble/link with 'gcc file.s -o file\00"
@.str.1 = [8 x i8] c"\09.text\0A\00"
@.str.2 = [14 x i8] c".globl _main\0A\00"
@.str.3 = [8 x i8] c"_main:\0A\00"
@.str.4 = [13 x i8] c"\09pushl\09%ebp\0A\00"
define void @asmheader() {
%1 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"#assemble/link with 'gcc file.s -o file\00"
@.str.4 = [13 x i8] c"\09pushl\09%ebp\0A\00"
@str = [7 x i8] c"\09.text\00"
@str.5 = [13 x i8] c".globl _main\00"
@str.6 = [7 x i8] c"_main:\00"
define void @asmheader() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.6, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int O_NONBLOCK;
int O_RDONLY;
int open(char const *, int, int /*<<< orphan*/);
int open_for_reading(const char *name) {
  return open(name, O_RDONLY | O_NONBLOCK, 0);
}


x86 assembly (clang, -O0):
<open_for_reading>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
mov    0x2eb8(%rip),%rax
or     (%rax),%esi
xor    %edx,%edx
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_for_reading>:
mov    0x2ec9(%rip),%rax
mov    0x2eca(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
xor    %edx,%edx
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_RDONLY = global i32 0
@O_NONBLOCK = global i32 0
define i32 @open_for_reading(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @O_RDONLY
%5 = load i32, i32* @O_NONBLOCK
%6 = or i32 %4, %5
%7 = call i32 @open(i8* %3, i32 %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
@O_NONBLOCK = global i32 0
define i32 @open_for_reading(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = load i32, i32* @O_NONBLOCK
%4 = or i32 %3, %2
%5 = tail call i32 @open(i8* %0, i32 %4, i32 0)
ret i32 %5
}
void local_bh_disable(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_frame_set_label_widget() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PlaySoundExt(int, int, int, int);
void PlaySoundLoop(int nr) { PlaySoundExt(nr, 128, (255 / 2), ((1 << 1))); }


x86 assembly (clang, -O0):
<PlaySoundLoop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x80,%esi
mov    $0x7f,%edx
mov    $0x2,%ecx
call   1030 <PlaySoundExt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PlaySoundLoop>:
mov    $0x80,%esi
mov    $0x7f,%edx
mov    $0x2,%ecx
jmp    1030 <PlaySoundExt@plt>

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

LLVM IR (-O2):
define void @PlaySoundLoop(i32 %0) {
%2 = tail call i32 @PlaySoundExt(i32 %0, i32 128, i32 127, i32 2)
ret void
}
/* Type definitions */
struct flashrom_flashctx {
  int dummy;
};

/* Variables and functions */
int probe_spi_rdid_generic(struct flashrom_flashctx *, int);
int probe_spi_rdid4(struct flashrom_flashctx *flash) {
  return probe_spi_rdid_generic(flash, 4);
}


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

x86 assembly (clang, -O2):
<probe_spi_rdid4>:
mov    $0x4,%esi
jmp    1030 <probe_spi_rdid_generic@plt>

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

LLVM IR (-O2):
%struct.flashrom_flashctx = type { i32 }
define i32 @probe_spi_rdid4(%struct.flashrom_flashctx* %0) {
%2 = tail call i32 @probe_spi_rdid_generic(%struct.flashrom_flashctx* %0, i32 4)
ret i32 %2
}
/* Variables and functions */
size_t strlen(char *);
int /*<<< orphan*/ ungetch(char);
void ungets(char s[]) {
  size_t i = strlen(s);
  for (; i < 0; i--)
    ungetch(s[i]);
}


x86 assembly (clang, -O0):
<ungets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jae    1166 <ungets+0x46>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <ungetch@plt>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1139 <ungets+0x19>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ungets(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
store i64 %5, i64* %3
br label %6
6: ; preds = %15, %1
%7 = load i64, i64* %3
%8 = icmp ult i64 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i8*, i8** %2
%11 = load i64, i64* %3
%12 = getelementptr inbounds i8, i8* %10, i64 %11
%13 = load i8, i8* %12
%14 = call i32 @ungetch(i8 signext %13)
br label %15
15: ; preds = %9
%16 = load i64, i64* %3
%17 = add i64 %16, -1
store i64 %17, i64* %3
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @ungets(i8* nocapture %0) {
ret void
}
void set_dev_node(struct device *dev, int node) {}


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

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

LLVM IR (-O0):
%struct.device = type opaque
define void @set_dev_node(%struct.device* %0, i32 %1) {
%3 = alloca %struct.device*
%4 = alloca i32
store %struct.device* %0, %struct.device** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.device = type opaque
define void @set_dev_node(%struct.device* nocapture %0, i32 %1) {
ret void
}
char ramdisk_read_byte(void *file_address, int index) {
  return *(char *)(file_address + 512 + index);
}


x86 assembly (clang, -O0):
<ramdisk_read_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl 0x200(%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ramdisk_read_byte>:
movslq %esi,%rax
mov    0x200(%rdi,%rax,1),%al
ret

LLVM IR (-O0):
define signext i8 @ramdisk_read_byte(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = getelementptr i8, i8* %5, i64 512
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr i8, i8* %6, i64 %8
%10 = load i8, i8* %9
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @ramdisk_read_byte(i8* nocapture %0, i32 %1) {
%3 = getelementptr i8, i8* %0, i64 512
%4 = sext i32 %1 to i64
%5 = getelementptr i8, i8* %3, i64 %4
%6 = load i8, i8* %5
ret i8 %6
}
void hw_stopmotor() {}


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

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

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

LLVM IR (-O2):
define void @hw_stopmotor() {
ret void
}
int test_imm_47int8_reg(signed char val) {
  return ((val) & (0x47 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_47int8_reg(i8 signext %0) {
%2 = and i8 %0, 71
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ GLdouble;

/* Variables and functions */
double fabs(scalar_t__);
int figureDistCmpZero(GLdouble distance) {
  return (fabs(distance) > 0.0001 ? (distance > 0 ? 1 : -1) : 0);
}


x86 assembly (clang, -O0):
<figureDistCmpZero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fabs@plt>
movsd  0xed3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1154 <figureDistCmpZero+0x44>
mov    -0x8(%rbp),%rdx
mov    $0xffffffff,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovg  %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    115e <figureDistCmpZero+0x4e>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    115e <figureDistCmpZero+0x4e>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<figureDistCmpZero>:
push   %rbx
mov    %rdi,%rbx
call   1030 <fabs@plt>
xor    %eax,%eax
test   %rbx,%rbx
setg   %al
xor    %ecx,%ecx
ucomisd 0xed5(%rip),%xmm0
lea    -0x1(%rax,%rax,1),%eax
cmovbe %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @figureDistCmpZero(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call double @fabs(i64 %3)
%5 = fcmp ogt double %4, 1.000000e-04
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i64, i64* %2
%8 = icmp sgt i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 -1
br label %12
11: ; preds = %1
br label %12
12: ; preds = %11, %6
%13 = phi i32 [ %10, %6 ], [ 0, %11 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @figureDistCmpZero(i64 %0) {
%2 = tail call double @fabs(i64 %0)
%3 = fcmp ogt double %2, 1.000000e-04
%4 = icmp sgt i64 %0, 0
%5 = select i1 %4, i32 1, i32 -1
%6 = select i1 %3, i32 %5, i32 0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_FLAT;
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void init(void) {
  glEnable(GL_DEPTH_TEST);
  glShadeModel(GL_FLAT);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
call   1040 <glShadeModel@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <glShadeModel@plt>

LLVM IR (-O0):
@GL_DEPTH_TEST = global i32 0
@GL_FLAT = global i32 0
define void @init() {
%1 = load i32, i32* @GL_DEPTH_TEST
%2 = call i32 @glEnable(i32 %1)
%3 = load i32, i32* @GL_FLAT
%4 = call i32 @glShadeModel(i32 %3)
ret void
}

LLVM IR (-O2):
@GL_DEPTH_TEST = global i32 0
@GL_FLAT = global i32 0
define void @init() {
%1 = load i32, i32* @GL_DEPTH_TEST
%2 = tail call i32 @glEnable(i32 %1)
%3 = load i32, i32* @GL_FLAT
%4 = tail call i32 @glShadeModel(i32 %3)
ret void
}
void eth_halt(void) {
  *((volatile unsigned long *)(0x92000000 + 0x00)) &=
      ~(0x00000001 | 0x00000002);
}


x86 assembly (clang, -O0):
<eth_halt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x92000000,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffc,%rcx
mov    $0x92000000,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<eth_halt>:
mov    $0x92000000,%eax
andq   $0xfffffffffffffffc,(%rax)
ret

LLVM IR (-O0):
define void @eth_halt() {
%1 = load volatile i64, i64* inttoptr (i64 2449473536 to i64*)
%2 = and i64 %1, -4
store volatile i64 %2, i64* inttoptr (i64 2449473536 to i64*)
ret void
}

LLVM IR (-O2):
define void @eth_halt() {
%1 = load volatile i64, i64* inttoptr (i64 2449473536 to i64*)
%2 = and i64 %1, -4
store volatile i64 %2, i64* inttoptr (i64 2449473536 to i64*)
ret void
}
int wifi_start_supplicant() { return -1; }


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

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

LLVM IR (-O0):
define i32 @wifi_start_supplicant() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @wifi_start_supplicant() {
ret i32 -1
}
int increment(int number) {
  number++;
  return number;
}


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

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

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

LLVM IR (-O2):
define i32 @increment(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ SSL_CTX_ctrl(int, int, int /*<<< orphan*/, void (*)());
void SSL_CTX_set_tmp_rsa_callback(int ctx, void (*tmprsa_callback)()) {
  SSL_CTX_ctrl(ctx, 4, 0, tmprsa_callback);
}


x86 assembly (clang, -O0):
<SSL_CTX_set_tmp_rsa_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rcx
mov    $0x4,%esi
xor    %edx,%edx
call   1030 <SSL_CTX_ctrl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSL_CTX_set_tmp_rsa_callback>:
mov    %rsi,%rcx
mov    $0x4,%esi
xor    %edx,%edx
jmp    1030 <SSL_CTX_ctrl@plt>

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

LLVM IR (-O2):
define void @SSL_CTX_set_tmp_rsa_callback(i32 %0, void (...)* %1) {
%3 = tail call i32 @SSL_CTX_ctrl(i32 %0, i32 4, i32 0, void (...)* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ w5100_writeSn_byte(unsigned int, int, unsigned int);
void w5100_writeSnIR(unsigned sock, unsigned data) {
  w5100_writeSn_byte(sock, 0x0002, data);
}


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

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

LLVM IR (-O0):
define void @w5100_writeSnIR(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 @w5100_writeSn_byte(i32 %5, i32 2, i32 %6)
ret void
}

LLVM IR (-O2):
define void @w5100_writeSnIR(i32 %0, i32 %1) {
%3 = tail call i32 @w5100_writeSn_byte(i32 %0, i32 2, i32 %1)
ret void
}
void _Valbytes(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int FileLength(FILE *fp) {
  int pos;
  int end;
  pos = ftell(fp);
  fseek(fp, 0, SEEK_END);
  end = ftell(fp);
  fseek(fp, pos, SEEK_SET);
  return end;
}


x86 assembly (clang, -O0):
<FileLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2e72(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FileLength>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %eax,%r14d
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %eax,%ebp
mov    0x2e85(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14d,%esi
call   1040 <fseek@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @FileLength(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @ftell(i32* %5)
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i32 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i32 @ftell(i32* %10)
store i32 %11, i32* %4
%12 = load i32*, i32** %2
%13 = load i32, i32* %3
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i32 %13, i32 %14)
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @FileLength(i32* nocapture %0) {
%2 = tail call i32 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i32 0, i32 %3)
%5 = tail call i32 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i32 %2, i32 %6)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sscanf(char *, char *, char *);
int /*<<< orphan*/ stdin;
void input(char *data, int l) {
  printf("> ");
  fgets(data, l + 1, stdin);
  sscanf(data, "%s", data);
}


x86 assembly (clang, -O0):
<input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
add    $0x1,%esi
mov    0x2e8c(%rip),%rax
mov    (%rax),%edx
call   1040 <fgets@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe91(%rip),%rsi
call   1050 <sscanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<input>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
add    $0x1,%ebx
mov    0x2e99(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <fgets@plt>
lea    0xea1(%rip),%rsi
mov    %r14,%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <sscanf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"> \00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @input(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 1
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %6, i32 %8, i32 %9)
%11 = load i8*, i8** %3
%12 = load i8*, i8** %3
%13 = call i32 @sscanf(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"> \00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @input(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = add nsw i32 %1, 1
%5 = load i32, i32* @stdin
%6 = tail call i32 @fgets(i8* %0, i32 %4, i32 %5)
%7 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ integer_solve_quadratic(int, int, int, long *, long *);
int get_m(int a, int b, int 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    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    -0x18(%rbp),%rcx
lea    -0x20(%rbp),%r8
call   1030 <integer_solve_quadratic@plt>
cmp    $0x0,%rax
je     115d <get_m+0x4d>
mov    -0x20(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    1164 <get_m+0x54>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%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(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
%9 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i64 0, i64* %8
store i64 0, i64* %9
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = call i64 @integer_solve_quadratic(i32 %10, i32 %11, i32 %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(i32 %0, i32 %1, i32 %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(i32 %0, i32 %1, i32 %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
}