xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ standend();
void onsig(int sig) {
  standend();
  refresh();
  endwin();
  exit(sig);
}


x86 assembly (clang, -O0):
<onsig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <standend@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
mov    $0x0,%al
call   1050 <endwin@plt>
mov    -0x4(%rbp),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<onsig>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <standend@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
xor    %eax,%eax
call   1050 <endwin@plt>
mov    %ebx,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define void @onsig(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @standend()
%4 = call i32 (...) @refresh()
%5 = call i32 (...) @endwin()
%6 = load i32, i32* %2
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
define void @onsig(i32 %0) {
%2 = tail call i32 (...) @standend()
%3 = tail call i32 (...) @refresh()
%4 = tail call i32 (...) @endwin()
%5 = tail call i32 @exit(i32 %0)
unreachable
}
void ieee80211_proc_init(void) {}


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

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

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

LLVM IR (-O2):
define void @ieee80211_proc_init() {
ret void
}
int sysfs_create_file(struct kobject *kobj, const struct attribute *attr) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.kobject = type opaque
%struct.attribute = type opaque
define i32 @sysfs_create_file(%struct.kobject* nocapture readnone %0, %struct.attribute* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_muted_to_unmuted();
int /*<<< orphan*/ test_unmuted_to_muted();
void execute_tests() {
  test_muted_to_unmuted();
  test_unmuted_to_muted();
}


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

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

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

LLVM IR (-O2):
define void @execute_tests() {
%1 = tail call i32 (...) @test_muted_to_unmuted()
%2 = tail call i32 (...) @test_unmuted_to_muted()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int *, int *);
void test_f() {
  int a[2];
  f(a + 1, a);
}


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

x86 assembly (clang, -O2):
<test_f>:
push   %rax
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <f@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @test_f() {
%1 = alloca [2 x i32]
%2 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%3 = getelementptr inbounds i32, i32* %2, i64 1
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%5 = call i32 @f(i32* %3, i32* %4)
ret void
}

LLVM IR (-O2):
define void @test_f() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 1
%5 = call i32 @f(i32* %4, i32* %3)
ret void
}
int sign_direct(int v) { return -(v < 0); }


x86 assembly (clang, -O0):
<sign_direct>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%ecx
xor    %eax,%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign_direct>:
mov    %edi,%eax
sar    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @sign_direct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
%5 = zext i1 %4 to i32
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @sign_direct(i32 %0) {
%2 = ashr i32 %0, 31
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void TimerControlEvent(uint32_t ui32Base, uint32_t ui32Timer,
                       uint32_t ui32Event) {
  ;

  ;
  ui32Timer &= 0x0000000C | 0x00000C00;
  (*((volatile uint32_t *)(ui32Base + 0x0000000C))) =
      (((*((volatile uint32_t *)(ui32Base + 0x0000000C))) & ~ui32Timer) |
       (ui32Event & ui32Timer));
}


x86 assembly (clang, -O0):
<TimerControlEvent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0xc0c,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc,%eax
cltq
mov    (%rax),%ecx
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
and    %eax,%ecx
mov    -0xc(%rbp),%eax
and    -0x8(%rbp),%eax
or     %eax,%ecx
mov    -0x4(%rbp),%eax
add    $0xc,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerControlEvent>:
movslq %edi,%rax
mov    0xc(%rax),%ecx
xor    %ecx,%edx
and    %esi,%edx
and    $0xc0c,%edx
xor    %ecx,%edx
mov    %edx,0xc(%rax)
ret

LLVM IR (-O0):
define void @TimerControlEvent(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = and i32 %7, 3084
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = add nsw i32 %9, 12
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
%13 = load volatile i32, i32* %12
%14 = load i32, i32* %5
%15 = xor i32 %14, -1
%16 = and i32 %13, %15
%17 = load i32, i32* %6
%18 = load i32, i32* %5
%19 = and i32 %17, %18
%20 = or i32 %16, %19
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 12
%23 = sext i32 %22 to i64
%24 = inttoptr i64 %23 to i32*
store volatile i32 %20, i32* %24
ret void
}

LLVM IR (-O2):
define void @TimerControlEvent(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, 3084
%5 = add nsw i32 %0, 12
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = xor i32 %4, -1
%10 = and i32 %8, %9
%11 = and i32 %4, %2
%12 = or i32 %10, %11
store volatile i32 %12, i32* %7
ret void
}
/* Type definitions */
union bpf_attr {
  int map_fd;
  int /*<<< orphan*/ key;
};
typedef int /*<<< orphan*/ attr;

/* Variables and functions */
int /*<<< orphan*/ BPF_MAP_DELETE_ELEM;
int bpf(int /*<<< orphan*/, union bpf_attr *, int);
int /*<<< orphan*/ bpf_ptr_to_u64(void const *);
int bpf_map_delete(int fd, const void *key) {
  union bpf_attr attr = {};
  attr.map_fd = fd;
  attr.key = bpf_ptr_to_u64(key);
  return bpf(BPF_MAP_DELETE_ELEM, &attr, sizeof(attr));
}


x86 assembly (clang, -O0):
<bpf_map_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <bpf_ptr_to_u64@plt>
mov    %eax,-0x18(%rbp)
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
lea    -0x18(%rbp),%rsi
mov    $0x4,%edx
call   1040 <bpf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_map_delete>:
push   %rax
mov    %rsi,%rdi
call   1040 <bpf_ptr_to_u64@plt>
mov    %eax,(%rsp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
mov    $0x4,%edx
call   1030 <bpf@plt>
pop    %rcx
ret

LLVM IR (-O0):
%union.bpf_attr = type { i32 }
@BPF_MAP_DELETE_ELEM = global i32 0
define i32 @bpf_map_delete(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %union.bpf_attr
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = bitcast %union.bpf_attr* %5 to i8*
%7 = load i32, i32* %3
%8 = bitcast %union.bpf_attr* %5 to i32*
store i32 %7, i32* %8
%9 = load i8*, i8** %4
%10 = call i32 @bpf_ptr_to_u64(i8* %9)
%11 = bitcast %union.bpf_attr* %5 to i32*
store i32 %10, i32* %11
%12 = load i32, i32* @BPF_MAP_DELETE_ELEM
%13 = call i32 @bpf(i32 %12, %union.bpf_attr* %5, i32 4)
ret i32 %13
}

LLVM IR (-O2):
%union.bpf_attr = type { i32 }
@BPF_MAP_DELETE_ELEM = global i32 0
define i32 @bpf_map_delete(i32 %0, i8* %1) {
%3 = alloca %union.bpf_attr
%4 = bitcast %union.bpf_attr* %3 to i8*
%5 = getelementptr inbounds %union.bpf_attr, %union.bpf_attr* %3, i64 0, i32 0
%6 = tail call i32 @bpf_ptr_to_u64(i8* %1)
store i32 %6, i32* %5
%7 = load i32, i32* @BPF_MAP_DELETE_ELEM
%8 = call i32 @bpf(i32 %7, %union.bpf_attr* %3, i32 4)
ret i32 %8
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char *, struct stat *);
int isadir(char *name) {
  struct stat statbuf;
  if (stat(name, &statbuf) < 0)
    return 0;
  return S_ISDIR(statbuf.st_mode);
}


x86 assembly (clang, -O0):
<isadir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jge    114f <isadir+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    115a <isadir+0x3a>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isadir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
test   %rax,%rax
js     1138 <isadir+0x18>
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @isadir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %13
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @S_ISDIR(i32 %11)
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @isadir(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @S_ISDIR(i32 %8)
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 0, %1 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t *ld_mema(uint8_t *dst, uint16_t address) {
  *(dst++) = 0x3A;
  *(dst++) = address & 0xFF;
  *(dst++) = address >> 8;
  return dst;
}


x86 assembly (clang, -O0):
<ld_mema>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
movl   $0x3a,(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_mema>:
movl   $0x3a,(%rdi)
movzbl %sil,%eax
mov    %eax,0x4(%rdi)
sar    $0x8,%esi
mov    %esi,0x8(%rdi)
lea    0xc(%rdi),%rax
ret

LLVM IR (-O0):
define i32* @ld_mema(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 = getelementptr inbounds i32, i32* %5, i32 1
store i32* %6, i32** %3
store i32 58, i32* %5
%7 = load i32, i32* %4
%8 = and i32 %7, 255
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i32 1
store i32* %10, i32** %3
store i32 %8, i32* %9
%11 = load i32, i32* %4
%12 = ashr i32 %11, 8
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i32 1
store i32* %14, i32** %3
store i32 %12, i32* %13
%15 = load i32*, i32** %3
ret i32* %15
}

LLVM IR (-O2):
define i32* @ld_mema(i32* writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 1
store i32 58, i32* %0
%4 = and i32 %1, 255
%5 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %4, i32* %3
%6 = ashr i32 %1, 8
%7 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %6, i32* %5
ret i32* %7
}
void fsys2(int f) { return; }


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

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

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

LLVM IR (-O2):
define void @fsys2(i32 %0) {
ret void
}
int isspace(int c) {
  if (c == ' ' || c == '\v' || c == '\t' || c == '\r' || c == '\n' || c == '\f')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
je     1143 <isspace+0x43>
cmpl   $0xb,-0x8(%rbp)
je     1143 <isspace+0x43>
cmpl   $0x9,-0x8(%rbp)
je     1143 <isspace+0x43>
cmpl   $0xd,-0x8(%rbp)
je     1143 <isspace+0x43>
cmpl   $0xa,-0x8(%rbp)
je     1143 <isspace+0x43>
cmpl   $0xc,-0x8(%rbp)
jne    114f <isspace+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <isspace+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
mov    $0x1,%eax
lea    -0x9(%rdi),%ecx
cmp    $0x5,%ecx
jae    110e <isspace+0xe>
ret
cmp    $0x20,%edi
je     110d <isspace+0xd>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %3
i32 13, label %3
i32 12, label %3
i32 11, label %3
i32 10, label %3
i32 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ DirectIndexedXE0(int);
int /*<<< orphan*/ STA16(int /*<<< orphan*/, int);
void Op95E0M0(void) { STA16(DirectIndexedXE0(2), 0xFFFF); }


x86 assembly (clang, -O0):
<Op95E0M0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <DirectIndexedXE0@plt>
mov    %eax,%edi
mov    $0xffff,%esi
call   1040 <STA16@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Op95E0M0() {
%1 = call i32 @DirectIndexedXE0(i32 2)
%2 = call i32 @STA16(i32 %1, i32 65535)
ret void
}

LLVM IR (-O2):
define void @Op95E0M0() {
%1 = tail call i32 @DirectIndexedXE0(i32 2)
%2 = tail call i32 @STA16(i32 %1, i32 65535)
ret void
}
/* Type definitions */
struct rlimit {
  int /*<<< orphan*/ rlim_max;
  int /*<<< orphan*/ rlim_cur;
};
typedef int /*<<< orphan*/ rlim_t;

/* Variables and functions */
int /*<<< orphan*/ die(int);
scalar_t__ setrlimit(int, struct rlimit const *);
void xsetrlimit(int resource, rlim_t limit, int exitcode) {
  const struct rlimit buf = {
      .rlim_cur = limit,
      .rlim_max = limit,
  };
  if (setrlimit(resource, &buf) != 0)
    die(exitcode);
}


x86 assembly (clang, -O0):
<xsetrlimit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
call   1030 <setrlimit@plt>
cmp    $0x0,%rax
je     115b <xsetrlimit+0x3b>
mov    -0xc(%rbp),%edi
call   1040 <die@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xsetrlimit>:
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebx
mov    %esi,0x8(%rsp)
mov    %esi,0xc(%rsp)
lea    0x8(%rsp),%rsi
call   1030 <setrlimit@plt>
test   %rax,%rax
je     1145 <xsetrlimit+0x25>
mov    %ebx,%edi
call   1040 <die@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.rlimit = type { i32, i32 }
define void @xsetrlimit(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.rlimit
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %7, i32 0, i32 0
%9 = load i32, i32* %5
store i32 %9, i32* %8
%10 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %7, i32 0, i32 1
%11 = load i32, i32* %5
store i32 %11, i32* %10
%12 = load i32, i32* %4
%13 = call i64 @setrlimit(i32 %12, %struct.rlimit* %7)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %3
%16 = load i32, i32* %6
%17 = call i32 @die(i32 %16)
br label %18
18: ; preds = %15, %3
ret void
}

LLVM IR (-O2):
%struct.rlimit = type { i32, i32 }
define void @xsetrlimit(i32 %0, i32 %1, i32 %2) {
%4 = alloca %struct.rlimit
%5 = bitcast %struct.rlimit* %4 to i8*
%6 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %4, i64 0, i32 0
store i32 %1, i32* %6
%7 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %4, i64 0, i32 1
store i32 %1, i32* %7
%8 = call i64 @setrlimit(i32 %0, %struct.rlimit* %4)
%9 = icmp eq i64 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %3
%11 = call i32 @die(i32 %2)
br label %12
12: ; preds = %10, %3
ret void
}
foo() {
  3.14;
  .45;
  2.;
  2e14;
  2e-24;
  2e+12;
  .2e2;
}


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

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

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

LLVM IR (-O2):
define i32 @foo() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
void print_array_long(long *array, char *fmt_str, int size) {
  int i = 0;
  for (i = 0; i < size; i++) {
    printf(fmt_str, array[i]);
  }
}


x86 assembly (clang, -O0):
<print_array_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1160 <print_array_long+0x50>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1131 <print_array_long+0x21>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array_long>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    1145 <print_array_long+0x35>
mov    %rsi,%r14
mov    %rdi,%r15
mov    %edx,%r12d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_array_long+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @print_array_long(i64* nocapture %0, i8* %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i64, i64* %0, i64 %8
%10 = load i64, i64* %9
%11 = tail call i32 @printf(i8* %1, i64 %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
ret void
}
main() {
  if (3 != 3)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-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 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double strtod(char *, int /*<<< orphan*/ *);
int main(int argc, const char *argv[]) {
  double numero = strtod("1234", NULL);
  printf("El valor es %f\n", numero);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <strtod@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"1234\00"
@.str.1 = [16 x i8] c"El valor es %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call double @strtod(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* null)
store double %7, double* %6
%8 = load double, double* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"1234\00"
@.str.1 = [16 x i8] c"El valor es %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double @strtod(i8* nocapture getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* null)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %3)
ret i32 0
}
/* Variables and functions */
scalar_t__ isdigit(int /*<<< orphan*/);
int isNumber(const char *s) {
  while (*s)
    if (isdigit(*s++) == 0)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115b <isNumber+0x4b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
jne    1156 <isNumber+0x46>
movl   $0x0,-0x4(%rbp)
jmp    1162 <isNumber+0x52>
jmp    111c <isNumber+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNumber>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%edi
test   %edi,%edi
je     1139 <isNumber+0x29>
add    $0x1,%rbx
call   1030 <isdigit@plt>
test   %rax,%rax
jne    1120 <isNumber+0x10>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isNumber(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = sext i8 %4 to i32
%9 = tail call i64 @isdigit(i32 %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %2
11: ; preds = %2, %6
%12 = phi i32 [ 0, %6 ], [ 1, %2 ]
ret i32 %12
}
void BN_BLINDING_get_thread_id(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_BLINDING_get_thread_id() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void const *ralloc_parent(void *);
void *ralloc_size(void const *, size_t);
void *resize(void *, size_t);
void *reralloc_size(const void *ctx, void *ptr, size_t size) {
  if ((ptr == NULL))
    return ralloc_size(ctx, size);
  assert(ralloc_parent(ptr) == ctx);
  return resize(ptr, size);
}


x86 assembly (clang, -O0):
<reralloc_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1175 <reralloc_size+0x35>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <ralloc_size@plt>
mov    %rax,-0x8(%rbp)
jmp    11a0 <reralloc_size+0x60>
mov    -0x18(%rbp),%rdi
call   1060 <ralloc_parent@plt>
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <resize@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reralloc_size>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rdi,%r15
test   %rsi,%rsi
je     1179 <reralloc_size+0x39>
mov    %rsi,%rbx
mov    %rsi,%rdi
call   1060 <ralloc_parent@plt>
xor    %edi,%edi
cmp    %r15,%rax
sete   %dil
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <resize@plt>
mov    %r15,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <ralloc_size@plt>

LLVM IR (-O0):
define i8* @reralloc_size(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
store i8* %0, i8** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
%8 = load i8*, i8** %6
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i8*, i8** %5
%12 = load i64, i64* %7
%13 = call i8* @ralloc_size(i8* %11, i64 %12)
store i8* %13, i8** %4
br label %24
14: ; preds = %3
%15 = load i8*, i8** %6
%16 = call i8* @ralloc_parent(i8* %15)
%17 = load i8*, i8** %5
%18 = icmp eq i8* %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
%21 = load i8*, i8** %6
%22 = load i64, i64* %7
%23 = call i8* @resize(i8* %21, i64 %22)
store i8* %23, i8** %4
br label %24
24: ; preds = %14, %10
%25 = load i8*, i8** %4
ret i8* %25
}

LLVM IR (-O2):
define i8* @reralloc_size(i8* %0, i8* %1, i64 %2) {
%4 = icmp eq i8* %1, null
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i8* @ralloc_size(i8* %0, i64 %2)
br label %13
7: ; preds = %3
%8 = tail call i8* @ralloc_parent(i8* %1)
%9 = icmp eq i8* %8, %0
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = tail call i8* @resize(i8* %1, i64 %2)
br label %13
13: ; preds = %7, %5
%14 = phi i8* [ %6, %5 ], [ %12, %7 ]
ret i8* %14
}
/* Variables and functions */
scalar_t__ strlen(char *);
char uc(char);
void uc_str(char *s) {
  for (int i = 0; i < (int)strlen(s); i++)
    s[i] = uc(s[i]);
}


x86 assembly (clang, -O0):
<uc_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    117c <uc_str+0x5c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <uc@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <uc_str+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uc_str>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    1161 <uc_str+0x41>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1040 <uc@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1140 <uc_str+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @uc_str(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %21, %1
%5 = load i32, i32* %3
%6 = load i8*, i8** %2
%7 = call i64 @strlen(i8* %6)
%8 = trunc i64 %7 to i32
%9 = icmp slt i32 %5, %8
br i1 %9, label %10, label %24
10: ; preds = %4
%11 = load i8*, i8** %2
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = call signext i8 @uc(i8 signext %15)
%17 = load i8*, i8** %2
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
store i8 %16, i8* %20
br label %21
21: ; preds = %10
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
br label %4
24: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @uc_str(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = icmp sgt i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %6, %1
ret void
6: ; preds = %1, %6
%7 = phi i64 [ %11, %6 ], [ 0, %1 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call signext i8 @uc(i8 signext %9)
store i8 %10, i8* %8
%11 = add nuw nsw i64 %7, 1
%12 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%13 = shl i64 %12, 32
%14 = ashr exact i64 %13, 32
%15 = icmp slt i64 %11, %14
br i1 %15, label %6, label %5
}
int r2(int i) { return (i + 1) % 3; }


x86 assembly (clang, -O0):
<r2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<r2>:
add    $0x1,%edi
movslq %edi,%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @r2(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = srem i32 %2, 3
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void peer_close(int sockfd) { close(sockfd); }


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

x86 assembly (clang, -O2):
<peer_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @peer_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
int fa_hamming_cof_num(float ftrans) { return (int)(6.2 / ftrans); }


x86 assembly (clang, -O0):
<fa_hamming_cof_num>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee6(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fa_hamming_cof_num>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
ret

LLVM IR (-O0):
define i32 @fa_hamming_cof_num(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fdiv double 6.200000e+00, %4
%6 = fptosi double %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @fa_hamming_cof_num(float %0) {
%2 = fpext float %0 to double
%3 = fdiv double 6.200000e+00, %2
%4 = fptosi double %3 to i32
ret i32 %4
}
/* Variables and functions */
double **new_double2DFss(int);
double **fss_NewDouble2D(int n) { return new_double2DFss(n); }


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

x86 assembly (clang, -O2):
<fss_NewDouble2D>:
jmp    1030 <new_double2DFss@plt>

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

LLVM IR (-O2):
define double** @fss_NewDouble2D(i32 %0) {
%2 = tail call double** @new_double2DFss(i32 %0)
ret double** %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void testDecay() {
  char c[4];
  c[0] = 'H';
  c[1] = 'i';
  c[2] = '!';
  c[3] = 0;
  printf("testDecay: %s\n", c);
}


x86 assembly (clang, -O0):
<testDecay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x48,-0x4(%rbp)
movb   $0x69,-0x3(%rbp)
movb   $0x21,-0x2(%rbp)
movb   $0x0,-0x1(%rbp)
lea    -0x4(%rbp),%rsi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testDecay>:
push   %rax
movl   $0x216948,0x4(%rsp)
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"testDecay: %s\0A\00"
define void @testDecay() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
store i8 72, i8* %2
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 1
store i8 105, i8* %3
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 2
store i8 33, i8* %4
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 3
store i8 0, i8* %5
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"testDecay: %s\0A\00"
define void @testDecay() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
store i8 72, i8* %2
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 1
store i8 105, i8* %3
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 2
store i8 33, i8* %4
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 3
store i8 0, i8* %5
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
int hashfunction(const char *name) {
  int hashvalue = 0;
  while (*name) {
    hashvalue += *name;
    ++name;
  }
  return hashvalue % 2000;
}


x86 assembly (clang, -O0):
<hashfunction>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113a <hashfunction+0x3a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hashfunction+0xf>
mov    -0xc(%rbp),%eax
mov    $0x7d0,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashfunction>:
mov    (%rdi),%al
test   %al,%al
je     1140 <hashfunction+0x40>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movsbl %al,%eax
add    %eax,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <hashfunction+0x10>
movslq %ecx,%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x27,%rcx
add    %edx,%ecx
imul   $0x7d0,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hashfunction(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i32 [ %9, %4 ], [ 0, %1 ]
%7 = phi i8* [ %10, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = add nsw i32 %6, %8
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = srem i32 %9, 2000
br label %15
15: ; preds = %13, %1
%16 = phi i32 [ 0, %1 ], [ %14, %13 ]
ret i32 %16
}
/* Variables and functions */
void *__thinthin_dlsym(long, char const *);
void *dlsym(void *handle, const char *symbol) {
  return __thinthin_dlsym((long)handle, symbol);
}


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

x86 assembly (clang, -O2):
<dlsym>:
jmp    1030 <__thinthin_dlsym@plt>

LLVM IR (-O0):
define i8* @dlsym(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 = ptrtoint i8* %5 to i64
%7 = load i8*, i8** %4
%8 = call i8* @__thinthin_dlsym(i64 %6, i8* %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @dlsym(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = tail call i8* @__thinthin_dlsym(i64 %3, i8* %1)
ret i8* %4
}
unsigned char digit_to_val(char *digit) {
  if (*digit <= 0x39)
    return *digit - 0x30;
  else if (*digit <= 70)
    return *digit - 55;
  return *digit - 87;
}


x86 assembly (clang, -O0):
<digit_to_val>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jg     112a <digit_to_val+0x2a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    115e <digit_to_val+0x5e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x46,%eax
jg     114c <digit_to_val+0x4c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
sub    $0x37,%eax
mov    %al,-0x1(%rbp)
jmp    115e <digit_to_val+0x5e>
jmp    1151 <digit_to_val+0x51>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
sub    $0x57,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit_to_val>:
mov    (%rdi),%cl
cmp    $0x47,%cl
setb   %al
shl    $0x5,%al
add    $0xa9,%al
cmp    $0x3a,%cl
movzbl %al,%edx
mov    $0xd0,%eax
cmovge %edx,%eax
add    %cl,%al
ret

LLVM IR (-O0):
define zeroext i8 @digit_to_val(i8* %0) {
%2 = alloca i8
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp sle i32 %6, 57
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = sub nsw i32 %11, 48
%13 = trunc i32 %12 to i8
store i8 %13, i8* %2
br label %32
14: ; preds = %1
%15 = load i8*, i8** %3
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 70
br i1 %18, label %19, label %25
19: ; preds = %14
%20 = load i8*, i8** %3
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = sub nsw i32 %22, 55
%24 = trunc i32 %23 to i8
store i8 %24, i8* %2
br label %32
25: ; preds = %14
br label %26
26: ; preds = %25
%27 = load i8*, i8** %3
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = sub nsw i32 %29, 87
%31 = trunc i32 %30 to i8
store i8 %31, i8* %2
br label %32
32: ; preds = %26, %19, %8
%33 = load i8, i8* %2
ret i8 %33
}

LLVM IR (-O2):
define zeroext i8 @digit_to_val(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp slt i8 %2, 58
%4 = icmp ult i8 %2, 71
%5 = select i1 %4, i8 -55, i8 -87
%6 = select i1 %3, i8 -48, i8 %5
%7 = add i8 %2, %6
ret i8 %7
}
int seven() { return 7; }


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

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

LLVM IR (-O0):
define i32 @seven() {
ret i32 7
}

LLVM IR (-O2):
define i32 @seven() {
ret i32 7
}
void I400ToARGBRow_C() {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @I400ToARGBRow_C() {
ret void
}
/* Variables and functions */
int fsync(int);
int posix_fsync(int fd) { return fsync(fd); }


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

x86 assembly (clang, -O2):
<posix_fsync>:
jmp    1030 <fsync@plt>

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

LLVM IR (-O2):
define i32 @posix_fsync(i32 %0) {
%2 = tail call i32 @fsync(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ mbox_write(int, int, int);
int /*<<< orphan*/ samba_run(int, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void nand_scrub() {
  fprintf(stderr, "Scrubing NAND...");
  mbox_write(0x300000, 0x4, 0x01);
  mbox_write(0x300000, 0xc, 0x0000EA11);
  samba_run(0x300000, 0);
  fprintf(stderr, "Done\n\n");
}


x86 assembly (clang, -O0):
<nand_scrub>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x300000,%edi
mov    $0x4,%esi
mov    $0x1,%edx
call   1050 <mbox_write@plt>
mov    $0x300000,%edi
mov    $0xc,%esi
mov    $0xea11,%edx
call   1050 <mbox_write@plt>
mov    $0x300000,%edi
xor    %esi,%esi
call   1030 <samba_run@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
lea    0xe84(%rip),%rsi
call   1040 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nand_scrub>:
push   %rbx
mov    0x2ea8(%rip),%rbx
mov    (%rbx),%edi
lea    0xebf(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x300000,%edi
mov    $0x4,%esi
mov    $0x1,%edx
call   1050 <mbox_write@plt>
mov    $0x300000,%edi
mov    $0xc,%esi
mov    $0xea11,%edx
call   1050 <mbox_write@plt>
mov    $0x300000,%edi
xor    %esi,%esi
call   1030 <samba_run@plt>
mov    (%rbx),%edi
lea    0xe8e(%rip),%rsi
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"Scrubing NAND...\00"
@.str.1 = [7 x i8] c"Done\0A\0A\00"
define void @nand_scrub() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @mbox_write(i32 3145728, i32 4, i32 1)
%4 = call i32 @mbox_write(i32 3145728, i32 12, i32 59921)
%5 = call i32 @samba_run(i32 3145728, i32 0)
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"Scrubing NAND...\00"
@.str.1 = [7 x i8] c"Done\0A\0A\00"
define void @nand_scrub() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @mbox_write(i32 3145728, i32 4, i32 1)
%4 = tail call i32 @mbox_write(i32 3145728, i32 12, i32 59921)
%5 = tail call i32 @samba_run(i32 3145728, i32 0)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void ipu2_iomux_config() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_sra_pi32(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_sra_pi32(__m64 a, __m64 b) { return _mm_sra_pi32(a, b); }


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

x86 assembly (clang, -O2):
<test_mm_sra_pi32>:
jmp    1030 <_mm_sra_pi32@plt>

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

LLVM IR (-O2):
define i32 @test_mm_sra_pi32(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_sra_pi32(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int strtoul(char const *, char **, int);
int parse_decimal(const char *str, void *data) {
  char *ep;
  *(int *)data = strtoul(str, &ep, 10);
  if (ep == str)
    return -1;
  return ep - str;
}


x86 assembly (clang, -O0):
<parse_decimal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1154 <parse_decimal+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    1162 <parse_decimal+0x52>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_decimal>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%rsi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %eax,(%r14)
mov    (%rsp),%rax
mov    %eax,%ecx
sub    %ebx,%ecx
cmp    %rbx,%rax
mov    $0xffffffff,%eax
cmovne %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @parse_decimal(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = call i32 @strtoul(i8* %7, i8** %6, i32 10)
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to i32*
store i32 %8, i32* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %4
%13 = icmp eq i8* %11, %12
br i1 %13, label %14, label %15
14: ; preds = %2
store i32 -1, i32* %3
br label %22
15: ; preds = %2
%16 = load i8*, i8** %6
%17 = load i8*, i8** %4
%18 = ptrtoint i8* %16 to i64
%19 = ptrtoint i8* %17 to i64
%20 = sub i64 %18, %19
%21 = trunc i64 %20 to i32
store i32 %21, i32* %3
br label %22
22: ; preds = %15, %14
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @parse_decimal(i8* %0, i8* nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @strtoul(i8* %0, i8** %3, i32 10)
%6 = bitcast i8* %1 to i32*
store i32 %5, i32* %6
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, %0
%9 = ptrtoint i8* %7 to i64
%10 = ptrtoint i8* %0 to i64
%11 = sub i64 %9, %10
%12 = trunc i64 %11 to i32
%13 = select i1 %8, i32 -1, i32 %12
ret i32 %13
}