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


x86 assembly (clang, -O0):
<pa_strbuf_printf>:
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_strbuf_printf>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_strbuf_printf\00"
define i32 @pa_strbuf_printf() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ print(int);
main() {
  int i = 0;
  while (i < 5) {
    print(i);
    i++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1146 <main+0x36>
mov    -0x8(%rbp),%edi
call   1030 <print@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @print(i32 0)
%2 = tail call i32 @print(i32 1)
%3 = tail call i32 @print(i32 2)
%4 = tail call i32 @print(i32 3)
%5 = tail call i32 @print(i32 4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ __chk_fail();
int /*<<< orphan*/ __recv(int, void *, size_t, int);
ssize_t __recv_chk(int fd, void *buf, size_t n, size_t buflen, int flags) {
  if (n > buflen)
    __chk_fail();
  return __recv(fd, buf, n, flags);
}


x86 assembly (clang, -O0):
<__recv_chk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jbe    1150 <__recv_chk+0x30>
mov    $0x0,%al
call   1040 <__chk_fail@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x24(%rbp),%ecx
call   1030 <__recv@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__recv_chk>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r8d,%r14d
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %edi,%ebp
cmp    %rcx,%rdx
jbe    113e <__recv_chk+0x1e>
xor    %eax,%eax
call   1040 <__chk_fail@plt>
mov    %ebp,%edi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <__recv@plt>

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

LLVM IR (-O2):
define i32 @__recv_chk(i32 %0, i8* %1, i64 %2, i64 %3, i32 %4) {
%6 = icmp ugt i64 %2, %3
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = tail call i32 (...) @__chk_fail()
br label %9
9: ; preds = %7, %5
%10 = tail call i32 @__recv(i32 %0, i8* %1, i64 %2, i32 %4)
ret i32 %10
}
void *ZObject_init(void *self) { return self; }


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

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

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

LLVM IR (-O2):
define i8* @ZObject_init(i8* readnone returned %0) {
ret i8* %0
}
long double test_erfl(long double x) { return __builtin_erfl(x); }


x86 assembly (clang, -O0):
<test_erfl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <erfl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_erfl>:
jmp    1030 <erfl@plt>

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

LLVM IR (-O2):
define x86_fp80 @test_erfl(x86_fp80 %0) {
%2 = tail call x86_fp80 @erfl(x86_fp80 %0)
ret x86_fp80 %2
}
void ab2cdefghijklmnopqrstuvwxzy() {}


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

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

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

LLVM IR (-O2):
define void @ab2cdefghijklmnopqrstuvwxzy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cpu_arm920_tlb_invalidate_all();
void tlb_invalidate(void) { cpu_arm920_tlb_invalidate_all(); }


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

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

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

LLVM IR (-O2):
define void @tlb_invalidate() {
%1 = tail call i32 (...) @cpu_arm920_tlb_invalidate_all()
ret void
}
/* Variables and functions */
void list_new_data_cb(const char *data, size_t len, void *userdata) {
  data = data;
  len = len;
  userdata = userdata;
}


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

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

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

LLVM IR (-O2):
define void @list_new_data_cb(i8* nocapture %0, i64 %1, i8* nocapture %2) {
ret void
}
int group_cmp(int group1, int group2, int eq) {
  if (group1 == group2)
    return eq;
  else if ((group1 < 0 && group2 < 0) || (group1 >= 0 && group2 >= 0))
    return group1 - group2;
  else
    return group2 - group1;
}


x86 assembly (clang, -O0):
<group_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1124 <group_cmp+0x24>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <group_cmp+0x63>
cmpl   $0x0,-0x8(%rbp)
jge    1138 <group_cmp+0x38>
cmpl   $0x0,-0xc(%rbp)
jl     114c <group_cmp+0x4c>
cmpl   $0x0,-0x8(%rbp)
jl     115a <group_cmp+0x5a>
cmpl   $0x0,-0xc(%rbp)
jl     115a <group_cmp+0x5a>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <group_cmp+0x63>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<group_cmp>:
mov    %edx,%eax
mov    %edi,%ecx
sub    %esi,%ecx
je     1116 <group_cmp+0x16>
test   %edi,%esi
js     1117 <group_cmp+0x17>
mov    %esi,%eax
or     %edi,%eax
jns    1117 <group_cmp+0x17>
sub    %edi,%esi
mov    %esi,%eax
ret
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @group_cmp(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load i32, i32* %7
store i32 %12, i32* %4
br label %33
13: ; preds = %3
%14 = load i32, i32* %5
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = load i32, i32* %6
%18 = icmp slt i32 %17, 0
br i1 %18, label %25, label %19
19: ; preds = %16, %13
%20 = load i32, i32* %5
%21 = icmp sge i32 %20, 0
br i1 %21, label %22, label %29
22: ; preds = %19
%23 = load i32, i32* %6
%24 = icmp sge i32 %23, 0
br i1 %24, label %25, label %29
25: ; preds = %22, %16
%26 = load i32, i32* %5
%27 = load i32, i32* %6
%28 = sub nsw i32 %26, %27
store i32 %28, i32* %4
br label %33
29: ; preds = %22, %19
%30 = load i32, i32* %6
%31 = load i32, i32* %5
%32 = sub nsw i32 %30, %31
store i32 %32, i32* %4
br label %33
33: ; preds = %29, %25, %11
%34 = load i32, i32* %4
ret i32 %34
}

LLVM IR (-O2):
define i32 @group_cmp(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, %1
br i1 %4, label %15, label %5
5: ; preds = %3
%6 = and i32 %1, %0
%7 = icmp slt i32 %6, 0
%8 = or i32 %1, %0
%9 = icmp sgt i32 %8, -1
%10 = or i1 %7, %9
br i1 %10, label %11, label %13
11: ; preds = %5
%12 = sub nsw i32 %0, %1
br label %15
13: ; preds = %5
%14 = sub nsw i32 %1, %0
br label %15
15: ; preds = %3, %13, %11
%16 = phi i32 [ %12, %11 ], [ %14, %13 ], [ %2, %3 ]
ret i32 %16
}
/* Type definitions */
typedef int uint32_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void EMACVLANTxConfigSet(uint32_t ui32Base, uint16_t ui16Tag,
                         uint32_t ui32Config) {
  ASSERT(ui32Base == 0x400EC000);
  (*((volatile uint32_t *)(ui32Base + 0x00000584))) =
      ui32Config | ((uint32_t)ui16Tag << 0);
}


x86 assembly (clang, -O0):
<EMACVLANTxConfigSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x400ec000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
shl    $0x0,%eax
or     %eax,%ecx
mov    -0x4(%rbp),%eax
add    $0x584,%eax
cltq
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACVLANTxConfigSet>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x400ec000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
or     %r14d,%ebx
movslq %ebp,%rax
mov    %ebx,0x584(%rax)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @EMACVLANTxConfigSet(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 1074708480
%9 = zext i1 %8 to i32
%10 = call i32 @ASSERT(i32 %9)
%11 = load i32, i32* %6
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
%14 = shl i32 %13, 0
%15 = or i32 %11, %14
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1412
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i32*
store volatile i32 %15, i32* %19
ret void
}

LLVM IR (-O2):
define void @EMACVLANTxConfigSet(i32 %0, i64 %1, i32 %2) {
%4 = icmp eq i32 %0, 1074708480
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = trunc i64 %1 to i32
%8 = or i32 %7, %2
%9 = add nsw i32 %0, 1412
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
store volatile i32 %8, i32* %11
ret void
}
void prexit(cp) char *cp;
{
  write(2, cp, strlen(cp));
  sig_catcher(0);
}


x86 assembly (clang, -O0):
<prexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %rax,%rdx
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <write@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1050 <sig_catcher@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prexit>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1030 <write@plt>
xor    %edi,%edi
xor    %eax,%eax
pop    %rbx
jmp    1050 <sig_catcher@plt>

LLVM IR (-O0):
define void @prexit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 2, i8* %3, i64 %5)
%7 = call i32 (i32, ...) bitcast (i32 (...)* @sig_catcher to i32 (i32, ...)*)(i32 0)
ret void
}

LLVM IR (-O2):
define void @prexit(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = tail call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 2, i8* %0, i64 %2)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @sig_catcher to i32 (i32, ...)*)(i32 0)
ret void
}
/* Type definitions */
struct event_base {
  int dummy;
};
struct ev_loop {
  int dummy;
};

/* Variables and functions */
struct ev_loop *ev_default_loop(int);
int /*<<< orphan*/ ev_loop_destroy(struct ev_loop *);
void event_base_free(struct event_base *base) {
  struct ev_loop *loop = (struct ev_loop *)base;
  if (ev_default_loop(0x00000000UL) != loop)
    ev_loop_destroy(loop);
}


x86 assembly (clang, -O0):
<event_base_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %edi,%edi
call   1040 <ev_default_loop@plt>
cmp    -0x10(%rbp),%rax
je     114e <event_base_free+0x2e>
mov    -0x10(%rbp),%rdi
call   1030 <ev_loop_destroy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<event_base_free>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <ev_default_loop@plt>
cmp    %rbx,%rax
je     1139 <event_base_free+0x19>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <ev_loop_destroy@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.event_base = type { i32 }
%struct.ev_loop = type { i32 }
define void @event_base_free(%struct.event_base* %0) {
%2 = alloca %struct.event_base*
%3 = alloca %struct.ev_loop*
store %struct.event_base* %0, %struct.event_base** %2
%4 = load %struct.event_base*, %struct.event_base** %2
%5 = bitcast %struct.event_base* %4 to %struct.ev_loop*
store %struct.ev_loop* %5, %struct.ev_loop** %3
%6 = call %struct.ev_loop* @ev_default_loop(i32 0)
%7 = load %struct.ev_loop*, %struct.ev_loop** %3
%8 = icmp ne %struct.ev_loop* %6, %7
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load %struct.ev_loop*, %struct.ev_loop** %3
%11 = call i32 @ev_loop_destroy(%struct.ev_loop* %10)
br label %12
12: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
%struct.event_base = type { i32 }
%struct.ev_loop = type { i32 }
define void @event_base_free(%struct.event_base* %0) {
%2 = bitcast %struct.event_base* %0 to %struct.ev_loop*
%3 = tail call %struct.ev_loop* @ev_default_loop(i32 0)
%4 = icmp eq %struct.ev_loop* %3, %2
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @ev_loop_destroy(%struct.ev_loop* %2)
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int expf(int);
float warp_ease_sigmoid(float t) { return 1.0f / (1 + expf(-16 * (t - 0.5f))); }


x86 assembly (clang, -O0):
<warp_ease_sigmoid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm1
movss  0xede(%rip),%xmm0
subss  %xmm0,%xmm1
movss  0xece(%rip),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
call   1030 <expf@plt>
add    $0x1,%eax
cvtsi2ss %eax,%xmm1
movss  0xeae(%rip),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warp_ease_sigmoid>:
push   %rax
addss  0xee7(%rip),%xmm0
mulss  0xee3(%rip),%xmm0
cvttss2si %xmm0,%edi
call   1030 <expf@plt>
add    $0x1,%eax
cvtsi2ss %eax,%xmm1
movss  0xecf(%rip),%xmm0
divss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @warp_ease_sigmoid(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fsub float %3, 5.000000e-01
%5 = fmul float -1.600000e+01, %4
%6 = fptosi float %5 to i32
%7 = call i32 @expf(i32 %6)
%8 = add nsw i32 1, %7
%9 = sitofp i32 %8 to float
%10 = fdiv float 1.000000e+00, %9
ret float %10
}

LLVM IR (-O2):
define float @warp_ease_sigmoid(float %0) {
%2 = fadd float %0, -5.000000e-01
%3 = fmul float %2, -1.600000e+01
%4 = fptosi float %3 to i32
%5 = tail call i32 @expf(i32 %4)
%6 = add nsw i32 %5, 1
%7 = sitofp i32 %6 to float
%8 = fdiv float 1.000000e+00, %7
ret float %8
}
main() { unsigned x = -1UL; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void RTStrToUInt8Full(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrToUInt8Full() {
ret void
}
void INT_Excep_RSCAN_TXINT(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ v3_mul(struct v3_str *, double);
void v3_rev(struct v3_str *u) { v3_mul(u, -1.0); }


x86 assembly (clang, -O0):
<v3_rev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
movsd  0xed8(%rip),%xmm0
call   1030 <v3_mul@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v3_rev>:
movsd  0xee8(%rip),%xmm0
jmp    1030 <v3_mul@plt>

LLVM IR (-O0):
%struct.v3_str = type { i32 }
define void @v3_rev(%struct.v3_str* %0) {
%2 = alloca %struct.v3_str*
store %struct.v3_str* %0, %struct.v3_str** %2
%3 = load %struct.v3_str*, %struct.v3_str** %2
%4 = call i32 @v3_mul(%struct.v3_str* %3, double -1.000000e+00)
ret void
}

LLVM IR (-O2):
%struct.v3_str = type { i32 }
define void @v3_rev(%struct.v3_str* %0) {
%2 = tail call i32 @v3_mul(%struct.v3_str* %0, double -1.000000e+00)
ret void
}
/* Variables and functions */
int default_partition(int, void *, int);
int linear_regression_partition(int reduce_tasks, void *key, int key_size) {
  return default_partition(reduce_tasks, (void *)&key, key_size);
}


x86 assembly (clang, -O0):
<linear_regression_partition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <default_partition@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linear_regression_partition>:
push   %rax
mov    %rsi,(%rsp)
mov    %rsp,%rsi
call   1030 <default_partition@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @linear_regression_partition(i32 %0, i8* %1, i32 %2) {
%4 = alloca i8*
store i8* %1, i8** %4
%5 = bitcast i8** %4 to i8*
%6 = call i32 @default_partition(i32 %0, i8* %5, i32 %2)
ret i32 %6
}
__attribute__((section("socket"), used)) int filter() { return 0; }


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

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

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 ()* @filter to i8*)], section "llvm.metadata"
define i32 @filter() section "socket" {
ret i32 0
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 ()* @filter to i8*)], section "llvm.metadata"
define i32 @filter() section "socket" {
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int retrieve_solutions_on_grid(int i) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(49, &i, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<retrieve_solutions_on_grid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x31,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<retrieve_solutions_on_grid>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x31,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @retrieve_solutions_on_grid(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 49, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @retrieve_solutions_on_grid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 49, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Variables and functions */
scalar_t__ malloc(int);
int *func2(void) { return (int *)malloc(sizeof(int)); }


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
call   1030 <malloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<func2>:
mov    $0x4,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @func2() {
%1 = call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
define i32* @func2() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ milli_delay(int);
void TestA() {
  int i = 0;
  while (1) {
    milli_delay(10);
  }
}


x86 assembly (clang, -O0):
<TestA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
call   1030 <milli_delay@plt>
jmp    111f <TestA+0xf>

x86 assembly (clang, -O2):
<TestA>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <milli_delay@plt>
jmp    1120 <TestA+0x10>

LLVM IR (-O0):
define void @TestA() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @milli_delay(i32 10)
br label %2
}

LLVM IR (-O2):
define void @TestA() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @milli_delay(i32 10)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xc2() {
  Assert_real((isbdigit(194) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              975, ("isbdigit should be 0 for 0xc2"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0xc2>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc2,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3cf,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0xc2>:
push   %rax
mov    $0xc2,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3cf,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xc2\00"
define void @t_isbdigit_0xc2() {
%1 = call i64 @isbdigit(i32 194)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 975, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xc2\00"
define void @t_isbdigit_0xc2() {
%1 = tail call i64 @isbdigit(i32 194)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 975, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ shim_enosys(int /*<<< orphan*/);
int shim_vhangup(void) { return (int)shim_enosys(0); }


x86 assembly (clang, -O0):
<shim_vhangup>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <shim_enosys@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<shim_vhangup>:
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

LLVM IR (-O0):
define i32 @shim_vhangup() {
%1 = call i64 @shim_enosys(i32 0)
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @shim_vhangup() {
%1 = tail call i64 @shim_enosys(i32 0)
%2 = trunc i64 %1 to i32
ret i32 %2
}
void prefetcht0(void *p) { asm volatile("prefetcht0 (%0)\n\t" : : "r"(p)); }


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

x86 assembly (clang, -O2):
<prefetcht0>:
prefetcht0 (%rdi)
ret

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

LLVM IR (-O2):
define void @prefetcht0(i8* %0) {
tail call void asm sideeffect "prefetcht0 ($0)\0A\09", "r,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
void kmem_cache_init_late(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
struct timeval my_gettimeofday(void) {
  struct timeval ret;
  if (gettimeofday(&ret, NULL) == -1) {
    perror("gettimeofday");
    exit(EXIT_FAILURE);
  }
  return ret;
}


x86 assembly (clang, -O0):
<my_gettimeofday>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0xffffffff,%eax
jne    1168 <my_gettimeofday+0x38>
lea    0xeab(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_gettimeofday>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cmp    $0xffffffff,%eax
je     1145 <my_gettimeofday+0x15>
mov    (%rsp),%eax
pop    %rcx
ret
lea    0xeb4(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
@.str = [13 x i8] c"gettimeofday\00"
@EXIT_FAILURE = global i32 0
define i32 @my_gettimeofday() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%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 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%10 = load i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
@.str = [13 x i8] c"gettimeofday\00"
@EXIT_FAILURE = global i32 0
define i32 @my_gettimeofday() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %0
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%10 = load i32, i32* %9
ret i32 %10
}
int anno_non_valido(int anno) {
  int esito;
  esito = anno;
  if (anno < 0) {
    esito = -3;
  }
  return (esito);
}


x86 assembly (clang, -O0):
<anno_non_valido>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <anno_non_valido+0x1e>
movl   $0xfffffffd,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<anno_non_valido>:
test   %edi,%edi
mov    $0xfffffffd,%eax
cmovns %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @anno_non_valido(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = select i1 %2, i32 -3, i32 %0
ret i32 %3
}
void fz_accelerate(void) {}


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

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

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

LLVM IR (-O2):
define void @fz_accelerate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Array_Access();
int /*<<< orphan*/ Load_Address_Of_Static_Variable();
int /*<<< orphan*/ Simplest_Example_Mov_Constant_To_Variable();
int main(int argc, char *argv[]) {
  Simplest_Example_Mov_Constant_To_Variable();
  Load_Address_Of_Static_Variable();
  Array_Access();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <Simplest_Example_Mov_Constant_To_Variable@plt>
mov    $0x0,%al
call   1050 <Load_Address_Of_Static_Variable@plt>
mov    $0x0,%al
call   1040 <Array_Access@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <Simplest_Example_Mov_Constant_To_Variable@plt>
xor    %eax,%eax
call   1050 <Load_Address_Of_Static_Variable@plt>
xor    %eax,%eax
call   1040 <Array_Access@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 (...) @Simplest_Example_Mov_Constant_To_Variable()
%7 = call i32 (...) @Load_Address_Of_Static_Variable()
%8 = call i32 (...) @Array_Access()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @Simplest_Example_Mov_Constant_To_Variable()
%4 = tail call i32 (...) @Load_Address_Of_Static_Variable()
%5 = tail call i32 (...) @Array_Access()
ret i32 0
}
int do_272() { return 272; }


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

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

LLVM IR (-O0):
define i32 @do_272() {
ret i32 272
}

LLVM IR (-O2):
define i32 @do_272() {
ret i32 272
}
/* Type definitions */
struct b_tonegen {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ setMIDIDrawBar(struct b_tonegen *, int, unsigned char);
void setDrawbar7(void *d, unsigned char v) {
  setMIDIDrawBar((struct b_tonegen *)d, 7, v);
}


x86 assembly (clang, -O0):
<setDrawbar7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x7,%esi
movzbl -0x9(%rbp),%edx
call   1030 <setMIDIDrawBar@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.b_tonegen = type { i32 }
define void @setDrawbar7(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to %struct.b_tonegen*
%7 = load i8, i8* %4
%8 = call i32 @setMIDIDrawBar(%struct.b_tonegen* %6, i32 7, i8 zeroext %7)
ret void
}

LLVM IR (-O2):
%struct.b_tonegen = type { i32 }
define void @setDrawbar7(i8* %0, i8 zeroext %1) {
%3 = bitcast i8* %0 to %struct.b_tonegen*
%4 = tail call i32 @setMIDIDrawBar(%struct.b_tonegen* %3, i32 7, i8 zeroext %1)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int c;
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  c = 0;
  while (x > y) {
    x = x - 1;
    y = y + 1;
    c = c + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1166 <main+0x56>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <main+0x2a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
int somefunc(int i, int j) { return i + j; }


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

x86 assembly (clang, -O2):
<somefunc>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @somefunc(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @somefunc(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
int rrandom(range) { return (hmul(rand13(), 8 * range)); }


x86 assembly (clang, -O0):
<rrandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand13@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
shl    $0x3,%esi
mov    $0x0,%al
call   1040 <hmul@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rrandom>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand13@plt>
shl    $0x3,%ebx
mov    %eax,%edi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <hmul@plt>

LLVM IR (-O0):
define i32 @rrandom(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand13()
%4 = load i32, i32* %2
%5 = mul nsw i32 8, %4
%6 = call i32 (i32, i32, ...) bitcast (i32 (...)* @hmul to i32 (i32, i32, ...)*)(i32 %3, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @rrandom(i32 %0) {
%2 = tail call i32 (...) @rand13()
%3 = shl nsw i32 %0, 3
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @hmul to i32 (i32, i32, ...)*)(i32 %2, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_greetings_patched(void) {
  printf("Hello. This a PATCHED version!\n");
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"Hello. This a PATCHED version!\0A\00"
define void @print_greetings_patched() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [31 x i8] c"Hello. This a PATCHED version!\00"
define void @print_greetings_patched() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct ir_remote {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
struct ir_remote *read_config_recursive(int /*<<< orphan*/ *, char const *,
                                        int /*<<< orphan*/);
struct ir_remote *sort_by_bit_count(struct ir_remote *);
struct ir_remote *read_config(FILE *f, const char *name) {
  struct ir_remote *head;
  head = read_config_recursive(f, name, 0);
  head = sort_by_bit_count(head);
  return head;
}


x86 assembly (clang, -O0):
<read_config>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <read_config_recursive@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <sort_by_bit_count@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_config>:
push   %rax
xor    %edx,%edx
call   1030 <read_config_recursive@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <sort_by_bit_count@plt>

LLVM IR (-O0):
%struct.ir_remote = type { i32 }
define %struct.ir_remote* @read_config(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca %struct.ir_remote*
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i32*, i32** %3
%7 = load i8*, i8** %4
%8 = call %struct.ir_remote* @read_config_recursive(i32* %6, i8* %7, i32 0)
store %struct.ir_remote* %8, %struct.ir_remote** %5
%9 = load %struct.ir_remote*, %struct.ir_remote** %5
%10 = call %struct.ir_remote* @sort_by_bit_count(%struct.ir_remote* %9)
store %struct.ir_remote* %10, %struct.ir_remote** %5
%11 = load %struct.ir_remote*, %struct.ir_remote** %5
ret %struct.ir_remote* %11
}

LLVM IR (-O2):
%struct.ir_remote = type { i32 }
define %struct.ir_remote* @read_config(i32* %0, i8* %1) {
%3 = tail call %struct.ir_remote* @read_config_recursive(i32* %0, i8* %1, i32 0)
%4 = tail call %struct.ir_remote* @sort_by_bit_count(%struct.ir_remote* %3)
ret %struct.ir_remote* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ReadWord(char *, int /*<<< orphan*/ *);
int SearchVocab(char *);
scalar_t__ feof(int /*<<< orphan*/ *);
int ReadWordIndex(FILE *fin) {
  char word[40];
  ReadWord(word, fin);
  if (feof(fin))
    return -1;
  return SearchVocab(word);
}


x86 assembly (clang, -O0):
<ReadWordIndex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <ReadWord@plt>
mov    -0x10(%rbp),%rdi
call   1030 <feof@plt>
cmp    $0x0,%rax
je     1168 <ReadWordIndex+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <ReadWordIndex+0x44>
lea    -0x40(%rbp),%rdi
call   1050 <SearchVocab@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadWordIndex>:
push   %rbx
sub    $0x30,%rsp
mov    %rdi,%rbx
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1040 <ReadWord@plt>
mov    %rbx,%rdi
call   1030 <feof@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
jne    1160 <ReadWordIndex+0x30>
mov    %rsp,%rdi
call   1050 <SearchVocab@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ReadWordIndex(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca [40 x i8]
store i32* %0, i32** %3
%5 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 0
%6 = load i32*, i32** %3
%7 = call i32 @ReadWord(i8* %5, i32* %6)
%8 = load i32*, i32** %3
%9 = call i64 @feof(i32* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %15
12: ; preds = %1
%13 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 0
%14 = call i32 @SearchVocab(i8* %13)
store i32 %14, i32* %2
br label %15
15: ; preds = %12, %11
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @ReadWordIndex(i32* %0) {
%2 = alloca [40 x i8]
%3 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%4 = call i32 @ReadWord(i8* %3, i32* %0)
%5 = call i64 @feof(i32* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @SearchVocab(i8* %3)
br label %9
9: ; preds = %1, %7
%10 = phi i32 [ %8, %7 ], [ -1, %1 ]
ret i32 %10
}
int tegra21_pasr_init(struct device *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define i32 @tegra21_pasr_init(%struct.device* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void my_fatal_handler(void *udata, const char *msg) {
  (void)udata;
  printf("fatal error: %s\n", msg);
  exit(0);
}


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

x86 assembly (clang, -O2):
<my_fatal_handler>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"fatal error: %s\0A\00"
define void @my_fatal_handler(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [17 x i8] c"fatal error: %s\0A\00"
define void @my_fatal_handler(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ GC_free(unsigned char *);
int *get_refcnt(unsigned char *);
void drop_refptr_base(unsigned char *ptr) {
  int *cnt = get_refcnt(ptr);
  if (cnt != NULL) {
    *cnt = *cnt - 1;
    if (*cnt == 0) {
      GC_free(ptr - sizeof(int));
    }
  }
}


x86 assembly (clang, -O0):
<drop_refptr_base>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_refcnt@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1172 <drop_refptr_base+0x52>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
sub    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jne    116d <drop_refptr_base+0x4d>
mov    -0x8(%rbp),%rdi
add    $0xfffffffffffffffc,%rdi
call   1040 <GC_free@plt>
jmp    1172 <drop_refptr_base+0x52>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drop_refptr_base>:
push   %rbx
mov    %rdi,%rbx
call   1030 <get_refcnt@plt>
test   %rax,%rax
je     1133 <drop_refptr_base+0x13>
addl   $0xffffffff,(%rax)
je     1135 <drop_refptr_base+0x15>
pop    %rbx
ret
add    $0xfffffffffffffffc,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <GC_free@plt>

LLVM IR (-O0):
define void @drop_refptr_base(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @get_refcnt(i8* %4)
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp ne i32* %6, null
br i1 %7, label %8, label %21
8: ; preds = %1
%9 = load i32*, i32** %3
%10 = load i32, i32* %9
%11 = sub nsw i32 %10, 1
%12 = load i32*, i32** %3
store i32 %11, i32* %12
%13 = load i32*, i32** %3
%14 = load i32, i32* %13
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %8
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i64 -4
%19 = call i32 @GC_free(i8* %18)
br label %20
20: ; preds = %16, %8
br label %21
21: ; preds = %20, %1
ret void
}

LLVM IR (-O2):
define void @drop_refptr_base(i8* %0) {
%2 = tail call i32* @get_refcnt(i8* %0)
%3 = icmp eq i32* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = load i32, i32* %2
%6 = add nsw i32 %5, -1
store i32 %6, i32* %2
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %0, i64 -4
%10 = tail call i32 @GC_free(i8* %9)
br label %11
11: ; preds = %4, %8, %1
ret void
}