xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isalpha(int /*<<< orphan*/);
char *strchr(int /*<<< orphan*/, char);
int /*<<< orphan*/ strstr(char *, char *);
char *get_sequence_start(char *stdin_mem) {
  char *p = strchr(strstr(stdin_mem, ">THREE"), '\n');
  while (isalpha(*p++)) {
    ;
  }
  return p;
}


x86 assembly (clang, -O0):
<get_sequence_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1050 <strstr@plt>
mov    %eax,%edi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
je     1182 <get_sequence_start+0x52>
jmp    115c <get_sequence_start+0x2c>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_sequence_start>:
push   %rbx
lea    0xec8(%rip),%rsi
call   1050 <strstr@plt>
mov    %eax,%edi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,%rbx
nopl   0x0(%rax)
movsbl (%rbx),%edi
add    $0x1,%rbx
call   1040 <isalpha@plt>
test   %rax,%rax
jne    1150 <get_sequence_start+0x20>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c">THREE\00"
define i8* @get_sequence_start(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strstr(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = call i8* @strchr(i32 %5, i8 signext 10)
store i8* %6, i8** %3
br label %7
7: ; preds = %14, %1
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
%12 = call i64 @isalpha(i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %7
br label %7
15: ; preds = %7
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@.str = [7 x i8] c">THREE\00"
define i8* @get_sequence_start(i8* %0) {
%2 = tail call i32 @strstr(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i8* @strchr(i32 %2, i8 signext 10)
br label %4
4: ; preds = %4, %1
%5 = phi i8* [ %3, %1 ], [ %6, %4 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = sext i8 %7 to i32
%9 = tail call i64 @isalpha(i32 %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4
ret i8* %6
}
void init_uart(void) {
  (*(volatile unsigned long *)0x56000070) |= 0xa0;
  (*(volatile unsigned long *)0x56000078) = 0x0c;
  (*(volatile unsigned long *)0x50000000) = 0x03;
  (*(volatile unsigned long *)0x50000004) = 0x05;
  (*(volatile unsigned long *)0x50000008) = 0x00;
  (*(volatile unsigned long *)0x5000000c) = 0x00;
  (*(volatile unsigned long *)0x50000028) = 12;
}


x86 assembly (clang, -O0):
<init_uart>:
push   %rbp
mov    %rsp,%rbp
mov    $0x56000070,%eax
mov    (%rax),%rcx
or     $0xa0,%rcx
mov    $0x56000070,%eax
mov    %rcx,(%rax)
mov    $0x56000078,%eax
movq   $0xc,(%rax)
mov    $0x50000000,%eax
movq   $0x3,(%rax)
mov    $0x50000004,%eax
movq   $0x5,(%rax)
mov    $0x50000008,%eax
movq   $0x0,(%rax)
mov    $0x5000000c,%eax
movq   $0x0,(%rax)
mov    $0x50000028,%eax
movq   $0xc,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_uart>:
orq    $0xa0,0x56000070
movq   $0xc,0x56000078
movq   $0x3,0x50000000
movq   $0x5,0x50000004
movq   $0x0,0x50000008
movq   $0x0,0x5000000c
movq   $0xc,0x50000028
ret

LLVM IR (-O0):
define void @init_uart() {
%1 = load volatile i64, i64* inttoptr (i64 1442840688 to i64*)
%2 = or i64 %1, 160
store volatile i64 %2, i64* inttoptr (i64 1442840688 to i64*)
store volatile i64 12, i64* inttoptr (i64 1442840696 to i64*)
store volatile i64 3, i64* inttoptr (i64 1342177280 to i64*)
store volatile i64 5, i64* inttoptr (i64 1342177284 to i64*)
store volatile i64 0, i64* inttoptr (i64 1342177288 to i64*)
store volatile i64 0, i64* inttoptr (i64 1342177292 to i64*)
store volatile i64 12, i64* inttoptr (i64 1342177320 to i64*)
ret void
}

LLVM IR (-O2):
define void @init_uart() {
%1 = load volatile i64, i64* inttoptr (i64 1442840688 to i64*)
%2 = or i64 %1, 160
store volatile i64 %2, i64* inttoptr (i64 1442840688 to i64*)
store volatile i64 12, i64* inttoptr (i64 1442840696 to i64*)
store volatile i64 3, i64* inttoptr (i64 1342177280 to i64*)
store volatile i64 5, i64* inttoptr (i64 1342177284 to i64*)
store volatile i64 0, i64* inttoptr (i64 1342177288 to i64*)
store volatile i64 0, i64* inttoptr (i64 1342177292 to i64*)
store volatile i64 12, i64* inttoptr (i64 1342177320 to i64*)
ret void
}
/* Variables and functions */
char *getChunk(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
int strlen(char const *);
char *chunkstrdup(const char *str) {
  int len;
  char *newStr;
  len = strlen(str) + 1;
  newStr = getChunk(len);
  if (newStr)
    memcpy(newStr, str, len);
  return newStr;
}


x86 assembly (clang, -O0):
<chunkstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <getChunk@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1172 <chunkstrdup+0x42>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1050 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chunkstrdup>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %eax,%ebp
add    $0x1,%ebp
mov    %ebp,%edi
call   1040 <getChunk@plt>
mov    %rax,%rbx
test   %rax,%rax
je     115d <chunkstrdup+0x2d>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1050 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @chunkstrdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @getChunk(i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @memcpy(i8* %4, i8* %0, i32 %3)
br label %8
8: ; preds = %6, %1
ret i8* %4
}
void fat_setClusterRecord12part2(unsigned char *buf, unsigned int cluster,
                                 int type) {
  if (type) {
    buf[0] = (cluster & 0xFF0) >> 4;
  } else {
    buf[0] = (buf[0] & 0xF0) + ((cluster & 0xF00) >> 8);
  }
}


x86 assembly (clang, -O0):
<fat_setClusterRecord12part2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1130 <fat_setClusterRecord12part2+0x30>
mov    -0xc(%rbp),%eax
and    $0xff0,%eax
shr    $0x4,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
jmp    1152 <fat_setClusterRecord12part2+0x52>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
and    $0xf0,%eax
mov    -0xc(%rbp),%ecx
and    $0xf00,%ecx
shr    $0x8,%ecx
add    %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fat_setClusterRecord12part2>:
test   %edx,%edx
je     110b <fat_setClusterRecord12part2+0xb>
shr    $0x4,%esi
mov    %sil,(%rdi)
ret
mov    (%rdi),%al
and    $0xf0,%al
shr    $0x8,%esi
and    $0xf,%sil
or     %al,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @fat_setClusterRecord12part2(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %3
%10 = load i32, i32* %5
%11 = and i32 %10, 4080
%12 = lshr i32 %11, 4
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 0
store i8 %13, i8* %15
br label %29
16: ; preds = %3
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = and i32 %20, 240
%22 = load i32, i32* %5
%23 = and i32 %22, 3840
%24 = lshr i32 %23, 8
%25 = add i32 %21, %24
%26 = trunc i32 %25 to i8
%27 = load i8*, i8** %4
%28 = getelementptr inbounds i8, i8* %27, i64 0
store i8 %26, i8* %28
br label %29
29: ; preds = %16, %9
ret void
}

LLVM IR (-O2):
define void @fat_setClusterRecord12part2(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = lshr i32 %1, 4
%7 = trunc i32 %6 to i8
br label %15
8: ; preds = %3
%9 = load i8, i8* %0
%10 = and i8 %9, -16
%11 = lshr i32 %1, 8
%12 = trunc i32 %11 to i8
%13 = and i8 %12, 15
%14 = or i8 %10, %13
br label %15
15: ; preds = %8, %5
%16 = phi i8 [ %14, %8 ], [ %7, %5 ]
store i8 %16, i8* %0
ret void
}
/* Type definitions */
struct dentry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dbstart(struct dentry const *);
struct dentry *unionfs_lower_dentry_idx(struct dentry const *,
                                        int /*<<< orphan*/);
struct dentry *unionfs_lower_dentry(const struct dentry *dent) {
  return unionfs_lower_dentry_idx(dent, dbstart(dent));
}


x86 assembly (clang, -O0):
<unionfs_lower_dentry>:
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 <dbstart@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <unionfs_lower_dentry_idx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unionfs_lower_dentry>:
push   %rbx
mov    %rdi,%rbx
call   1040 <dbstart@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <unionfs_lower_dentry_idx@plt>

LLVM IR (-O0):
%struct.dentry = type { i32 }
define %struct.dentry* @unionfs_lower_dentry(%struct.dentry* %0) {
%2 = alloca %struct.dentry*
store %struct.dentry* %0, %struct.dentry** %2
%3 = load %struct.dentry*, %struct.dentry** %2
%4 = load %struct.dentry*, %struct.dentry** %2
%5 = call i32 @dbstart(%struct.dentry* %4)
%6 = call %struct.dentry* @unionfs_lower_dentry_idx(%struct.dentry* %3, i32 %5)
ret %struct.dentry* %6
}

LLVM IR (-O2):
%struct.dentry = type { i32 }
define %struct.dentry* @unionfs_lower_dentry(%struct.dentry* %0) {
%2 = tail call i32 @dbstart(%struct.dentry* %0)
%3 = tail call %struct.dentry* @unionfs_lower_dentry_idx(%struct.dentry* %0, i32 %2)
ret %struct.dentry* %3
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, size_t, char *, int);
void formatInt32(char *buffer, size_t size, char *format, int v) {
  snprintf(buffer, size, format, v);
}


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

x86 assembly (clang, -O2):
<formatInt32>:
jmp    1030 <snprintf@plt>

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

LLVM IR (-O2):
define void @formatInt32(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = tail call i32 @snprintf(i8* %0, i64 %1, i8* %2, i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ RB_XMLDB_Generate_String(int /*<<< orphan*/ *, char *);
void RB_XMLDB_Generate_Item_Line_Number(FILE *dest_doc,
                                        char *line_number_string) {
  RB_XMLDB_Generate_String(dest_doc, line_number_string);
}


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

x86 assembly (clang, -O2):
<RB_XMLDB_Generate_Item_Line_Number>:
jmp    1030 <RB_XMLDB_Generate_String@plt>

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

LLVM IR (-O2):
define void @RB_XMLDB_Generate_Item_Line_Number(i32* %0, i8* %1) {
%3 = tail call i32 @RB_XMLDB_Generate_String(i32* %0, i8* %1)
ret void
}
int fun1390() { return 1390; }


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

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

LLVM IR (-O0):
define i32 @fun1390() {
ret i32 1390
}

LLVM IR (-O2):
define i32 @fun1390() {
ret i32 1390
}
void gtk_check_menu_item_set_inconsistent() {}


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

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

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

LLVM IR (-O2):
define void @gtk_check_menu_item_set_inconsistent() {
ret void
}
int do_864() { return 864; }


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

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

LLVM IR (-O0):
define i32 @do_864() {
ret i32 864
}

LLVM IR (-O2):
define i32 @do_864() {
ret i32 864
}
/* Variables and functions */
int mx_log_level_set(scalar_t__);
int mx_log_level_get(void) { return mx_log_level_set((0 - 1)); }


x86 assembly (clang, -O0):
<mx_log_level_get>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffffffffffff,%rdi
call   1030 <mx_log_level_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mx_log_level_get>:
mov    $0xffffffffffffffff,%rdi
jmp    1030 <mx_log_level_set@plt>

LLVM IR (-O0):
define i32 @mx_log_level_get() {
%1 = call i32 @mx_log_level_set(i64 -1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @mx_log_level_get() {
%1 = tail call i32 @mx_log_level_set(i64 -1)
ret i32 %1
}
unsigned int djb_hash(const char *key) {
  unsigned int h = 5381;
  while (*key) {
    h = ((h << 5) + h) + (unsigned char)*key;
    ++key;
  }
  return h;
}


x86 assembly (clang, -O0):
<djb_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1142 <djb_hash+0x42>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
add    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <djb_hash+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<djb_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <djb_hash+0x28>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %eax,%edx
shl    $0x5,%edx
add    %eax,%edx
movzbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <djb_hash+0x10>
ret
mov    $0x1505,%eax
ret

LLVM IR (-O0):
define i32 @djb_hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 5381, 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 %19
8: ; preds = %4
%9 = load i32, i32* %3
%10 = shl i32 %9, 5
%11 = load i32, i32* %3
%12 = add i32 %10, %11
%13 = load i8*, i8** %2
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = add i32 %12, %15
store i32 %16, i32* %3
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %4
19: ; preds = %4
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @djb_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = mul i32 %6, 33
%9 = zext i8 %5 to i32
%10 = add i32 %8, %9
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 5381, %1 ], [ %10, %4 ]
ret i32 %15
}
/* Variables and functions */
int rand_uniform();
int rand_int(int n) { return (int)(n * rand_uniform()); }


x86 assembly (clang, -O0):
<rand_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand_uniform@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
imul   %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_int>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand_uniform@plt>
imul   %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rand_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (...) @rand_uniform()
%5 = mul nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @rand_int(i32 %0) {
%2 = tail call i32 (...) @rand_uniform()
%3 = mul nsw i32 %2, %0
ret i32 %3
}
START_TEST(test_get_key_value) {
  char *line = "Workers=4";
  char *key;
  char *value;
  get_key_value(line, &key, &value);
  ck_assert_str_eq(key, "Workers");
  ck_assert_str_eq(value, "4");
  free(key);
  free(value);
}


x86 assembly (clang, -O0):
<START_TEST>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
lea    0xebe(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1040 <get_key_value@plt>
mov    -0x18(%rbp),%rdi
lea    0xea6(%rip),%rsi
mov    $0x0,%al
call   1050 <ck_assert_str_eq@plt>
mov    -0x20(%rbp),%rdi
lea    0xe92(%rip),%rsi
mov    $0x0,%al
call   1050 <ck_assert_str_eq@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<START_TEST>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1040 <get_key_value@plt>
mov    0x10(%rsp),%rdi
lea    0xeb2(%rip),%rsi
xor    %eax,%eax
call   1050 <ck_assert_str_eq@plt>
mov    0x8(%rsp),%rdi
lea    0xe9d(%rip),%rsi
xor    %eax,%eax
call   1050 <ck_assert_str_eq@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Workers=4\00"
@.str.1 = [8 x i8] c"Workers\00"
@.str.2 = [2 x i8] c"4\00"
define i32 @START_TEST(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %3
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %4
%7 = load i8*, i8** %4
%8 = call i32 (i8*, i8**, i8**, ...) bitcast (i32 (...)* @get_key_value to i32 (i8*, i8**, i8**, ...)*)(i8* %7, i8** %5, i8** %6)
%9 = load i8*, i8** %5
%10 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @ck_assert_str_eq to i32 (i8*, i8*, ...)*)(i8* %9, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%11 = load i8*, i8** %6
%12 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @ck_assert_str_eq to i32 (i8*, i8*, ...)*)(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%13 = load i8*, i8** %5
%14 = load i8*, i8** %6
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@.str = [10 x i8] c"Workers=4\00"
@.str.1 = [8 x i8] c"Workers\00"
@.str.2 = [2 x i8] c"4\00"
define i32 @START_TEST(i32 %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = bitcast i8** %2 to i8*
%5 = bitcast i8** %3 to i8*
%6 = call i32 (i8*, i8**, i8**, ...) bitcast (i32 (...)* @get_key_value to i32 (i8*, i8**, i8**, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2, i8** %3)
%7 = load i8*, i8** %2
%8 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @ck_assert_str_eq to i32 (i8*, i8*, ...)*)(i8* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%9 = load i8*, i8** %3
%10 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @ck_assert_str_eq to i32 (i8*, i8*, ...)*)(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%11 = load i8*, i8** %2
%12 = load i8*, i8** %3
ret i32 undef
}
short int kernel__Float___62d_61d(double self, double p0) {
  short int var;
  short int var1;
  var1 = self >= p0;
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<kernel__Float___62d_61d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
mov    %ax,-0x14(%rbp)
mov    -0x14(%rbp),%ax
mov    %ax,-0x12(%rbp)
movswl -0x12(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel__Float___62d_61d>:
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setae  %al
ret

LLVM IR (-O0):
define signext i16 @kernel__Float___62d_61d(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i16
%6 = alloca i16
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fcmp oge double %7, %8
%10 = zext i1 %9 to i32
%11 = trunc i32 %10 to i16
store i16 %11, i16* %6
%12 = load i16, i16* %6
store i16 %12, i16* %5
br label %13
13: ; preds = %2
%14 = load i16, i16* %5
ret i16 %14
}

LLVM IR (-O2):
define signext i16 @kernel__Float___62d_61d(double %0, double %1) {
%3 = fcmp oge double %0, %1
%4 = zext i1 %3 to i16
ret i16 %4
}
const char *diminuto_ipcl_path2string(const char *path) {
  return (path == (const char *)0) ? "*" : path;
}


x86 assembly (clang, -O0):
<diminuto_ipcl_path2string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1123 <diminuto_ipcl_path2string+0x23>
lea    0xee6(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    112b <diminuto_ipcl_path2string+0x2b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<diminuto_ipcl_path2string>:
test   %rdi,%rdi
lea    0xef6(%rip),%rax
cmovne %rdi,%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"*\00"
define i8* @diminuto_ipcl_path2string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %8
6: ; preds = %1
%7 = load i8*, i8** %2
br label %8
8: ; preds = %6, %5
%9 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %5 ], [ %7, %6 ]
ret i8* %9
}

LLVM IR (-O2):
@.str = [2 x i8] c"*\00"
define i8* @diminuto_ipcl_path2string(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %0
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ ivec_cpy(int *, int *, int);
int *ivec_new_random_perm(int);
void random_init(long d, int n, int k, const float *v, int *sel) {
  int *perm = ivec_new_random_perm(n);
  ivec_cpy(sel, perm, k);
  free(perm);
}


x86 assembly (clang, -O0):
<random_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <ivec_new_random_perm@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x10(%rbp),%edx
call   1040 <ivec_cpy@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_init>:
push   %rbp
push   %r14
push   %rbx
mov    %r8,%rbx
mov    %edx,%r14d
mov    %esi,%edi
call   1050 <ivec_new_random_perm@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %r14d,%edx
call   1040 <ivec_cpy@plt>
mov    %rbp,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @random_init(i64 %0, i32 %1, i32 %2, float* %3, i32* %4) {
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
%9 = alloca float*
%10 = alloca i32*
%11 = alloca i32*
store i64 %0, i64* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store float* %3, float** %9
store i32* %4, i32** %10
%12 = load i32, i32* %7
%13 = call i32* @ivec_new_random_perm(i32 %12)
store i32* %13, i32** %11
%14 = load i32*, i32** %10
%15 = load i32*, i32** %11
%16 = load i32, i32* %8
%17 = call i32 @ivec_cpy(i32* %14, i32* %15, i32 %16)
%18 = load i32*, i32** %11
%19 = call i32 @free(i32* %18)
ret void
}

LLVM IR (-O2):
define void @random_init(i64 %0, i32 %1, i32 %2, float* nocapture readnone %3, i32* %4) {
%6 = tail call i32* @ivec_new_random_perm(i32 %1)
%7 = tail call i32 @ivec_cpy(i32* %4, i32* %6, i32 %2)
%8 = tail call i32 @free(i32* %6)
ret void
}
int main() {
  printf("in %s (2 = %c)\n", __func__, __func__[2]);
  printf("IN %s (2 = %c)\n", __FUNCTION__, __FUNCTION__[2]);
  q();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movsbl 0xee7(%rip),%edx
lea    0xece(%rip),%rdi
lea    0xed7(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl 0xecb(%rip),%edx
lea    0xec7(%rip),%rdi
lea    0xebb(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <q@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xee1(%rip),%rbx
mov    %rbx,%rsi
mov    $0x69,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    %rbx,%rsi
mov    $0x69,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <q@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"in %s (2 = %c)\0A\00"
@__func__.main = [5 x i8] c"main\00"
@.str.1 = [16 x i8] c"IN %s (2 = %c)\0A\00"
define i32 @main() {
%1 = load i8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 2)
%2 = sext i8 %1 to i32
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i32 %2)
%4 = load i8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 2)
%5 = sext i8 %4 to i32
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @q()
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"in %s (2 = %c)\0A\00"
@__func__.main = [5 x i8] c"main\00"
@.str.1 = [16 x i8] c"IN %s (2 = %c)\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i32 105)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i32 105)
%3 = tail call i32 (...) @q()
ret i32 0
}
/* Variables and functions */
scalar_t__ random();
void *random_pointer(void) { return (void *)((uintptr_t)random()); }


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

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

LLVM IR (-O0):
define i8* @random_pointer() {
%1 = call i64 (...) @random()
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}

LLVM IR (-O2):
define i8* @random_pointer() {
%1 = tail call i64 (...) @random()
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *stderr;
int text(char *buf, int sze, void *data) {
  FILE *fp = NULL;
  if (data != NULL)
    fp = (FILE *)data;
  else
    fp = stderr;
  fprintf(fp, "Body:");
  fwrite(buf, sze, 1, fp);
  return 0;
}


x86 assembly (clang, -O0):
<text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1153 <text+0x33>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1161 <text+0x41>
mov    0x2e86(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rcx
mov    $0x1,%edx
call   1040 <fwrite@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<text>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%rbp
test   %rdx,%rdx
jne    112c <text+0x1c>
mov    0x2eb7(%rip),%rax
mov    (%rax),%rbx
lea    0xecd(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
mov    %rbp,%rdi
mov    %r14d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32* null
@.str = [6 x i8] c"Body:\00"
define i32 @text(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
store i32* null, i32** %7
%8 = load i8*, i8** %6
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i8*, i8** %6
%12 = bitcast i8* %11 to i32*
store i32* %12, i32** %7
br label %15
13: ; preds = %3
%14 = load i32*, i32** @stderr
store i32* %14, i32** %7
br label %15
15: ; preds = %13, %10
%16 = load i32*, i32** %7
%17 = call i32 @fprintf(i32* %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%18 = load i8*, i8** %4
%19 = load i32, i32* %5
%20 = load i32*, i32** %7
%21 = call i32 @fwrite(i8* %18, i32 %19, i32 1, i32* %20)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32* null
@.str = [6 x i8] c"Body:\00"
define i32 @text(i8* nocapture %0, i32 %1, i8* %2) {
%4 = icmp eq i8* %2, null
%5 = bitcast i8* %2 to i32*
%6 = load i32*, i32** @stderr
%7 = select i1 %4, i32* %6, i32* %5
%8 = tail call i64 bitcast (i32 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 5, i64 1, i32* %7)
%9 = tail call i32 @fwrite(i8* %0, i32 %1, i32 1, i32* %7)
ret i32 0
}
/* Variables and functions */
scalar_t__ islower(int);
int toupper(int c) {
  if (islower(c)) {
    return c - 0x20;
  } else {
    return c;
  }
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     113b <toupper+0x2b>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <toupper+0x31>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @islower(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 32
store i32 %9, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %3
store i32 %11, i32* %2
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i64 @islower(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ LSR8(int /*<<< orphan*/);
int /*<<< orphan*/ SA1Direct(int);
void Op46M1(void) { LSR8(SA1Direct(3)); }


x86 assembly (clang, -O0):
<Op46M1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <SA1Direct@plt>
mov    %eax,%edi
call   1040 <LSR8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op46M1>:
push   %rax
mov    $0x3,%edi
call   1030 <SA1Direct@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <LSR8@plt>

LLVM IR (-O0):
define void @Op46M1() {
%1 = call i32 @SA1Direct(i32 3)
%2 = call i32 @LSR8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op46M1() {
%1 = tail call i32 @SA1Direct(i32 3)
%2 = tail call i32 @LSR8(i32 %1)
ret void
}
double wf2(double lambda, double D_AD, double D_BC, double D_AC, double D_BD,
           double D_AB, double D_CD) {
  double weight;
  weight = 0.5 * (lambda * (D_AC + D_BD) + (1 - lambda) * (D_AD + D_BC) +
                  (D_AB + D_CD));
  return (weight);
}


x86 assembly (clang, -O0):
<wf2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
addsd  -0x28(%rbp),%xmm2
movsd  0xeca(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm3
addsd  -0x18(%rbp),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe91(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<wf2>:
addsd  %xmm4,%xmm3
movsd  0xef4(%rip),%xmm4
subsd  %xmm0,%xmm4
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm4
mulsd  %xmm3,%xmm0
addsd  %xmm4,%xmm0
addsd  %xmm6,%xmm5
addsd  %xmm5,%xmm0
mulsd  0xed8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @wf2(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store double %6, double* %14
%16 = load double, double* %8
%17 = load double, double* %11
%18 = load double, double* %12
%19 = fadd double %17, %18
%20 = load double, double* %8
%21 = fsub double 1.000000e+00, %20
%22 = load double, double* %9
%23 = load double, double* %10
%24 = fadd double %22, %23
%25 = fmul double %21, %24
%26 = call double @llvm.fmuladd.f64(double %16, double %19, double %25)
%27 = load double, double* %13
%28 = load double, double* %14
%29 = fadd double %27, %28
%30 = fadd double %26, %29
%31 = fmul double 5.000000e-01, %30
store double %31, double* %15
%32 = load double, double* %15
ret double %32
}

LLVM IR (-O2):
define double @wf2(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = fadd double %3, %4
%9 = fsub double 1.000000e+00, %0
%10 = fadd double %1, %2
%11 = fmul double %9, %10
%12 = tail call double @llvm.fmuladd.f64(double %0, double %8, double %11)
%13 = fadd double %5, %6
%14 = fadd double %12, %13
%15 = fmul double %14, 5.000000e-01
ret double %15
}
/* Variables and functions */
int strappend(char **, size_t *, char const *);
int strappendch(char **str, size_t *len, char c) {
  const char suffix[] = {c, '\0'};
  return strappend(str, len, suffix);
}


x86 assembly (clang, -O0):
<strappendch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
mov    %al,-0x13(%rbp)
movb   $0x0,-0x12(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x13(%rbp),%rdx
call   1030 <strappend@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strappendch>:
push   %rax
mov    %dl,0x6(%rsp)
movb   $0x0,0x7(%rsp)
lea    0x6(%rsp),%rdx
call   1030 <strappend@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @strappendch(i8** %0, i64* %1, i8 signext %2) {
%4 = alloca i8**
%5 = alloca i64*
%6 = alloca i8
%7 = alloca [2 x i8]
store i8** %0, i8*** %4
store i64* %1, i64** %5
store i8 %2, i8* %6
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%9 = load i8, i8* %6
store i8 %9, i8* %8
%10 = getelementptr inbounds i8, i8* %8, i64 1
store i8 0, i8* %10
%11 = load i8**, i8*** %4
%12 = load i64*, i64** %5
%13 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%14 = call i32 @strappend(i8** %11, i64* %12, i8* %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @strappendch(i8** %0, i64* %1, i8 signext %2) {
%4 = alloca [2 x i8]
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
store i8 %2, i8* %5
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 1
store i8 0, i8* %6
%7 = call i32 @strappend(i8** %0, i64* %1, i8* %5)
ret i32 %7
}
int test_imm_12int32_reg(int val) { return ((val) & (0x12 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_12int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x12,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_12int32_reg(i32 %0) {
%2 = and i32 %0, 18
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
void *opendir(char const *);
void *octave_opendir_wrapper(const char *dname) { return opendir(dname); }


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

x86 assembly (clang, -O2):
<octave_opendir_wrapper>:
jmp    1030 <opendir@plt>

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

LLVM IR (-O2):
define noalias i8* @octave_opendir_wrapper(i8* nocapture %0) {
%2 = tail call i8* @opendir(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int);
int /*<<< orphan*/ stderr;
void test(int err, const char *msg) {
  if (err) {
    fprintf(stderr, "%s: error %d\n", msg, err);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     115f <test+0x3f>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x4(%rbp),%ecx
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
test   %edi,%edi
jne    1125 <test+0x5>
ret
push   %rax
mov    %rsi,%rdx
mov    %edi,%ecx
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"%s: error %d\0A\00"
define void @test(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %4
%10 = load i32, i32* %3
%11 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %9, i32 %10)
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"%s: error %d\0A\00"
define void @test(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %0)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret void
}
char value_char(char c) {
  if (c == 'u')
    return '0';
  if (c == 'm')
    return '1';
  return '2';
}


x86 assembly (clang, -O0):
<value_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x75,%eax
jne    1120 <value_char+0x20>
movb   $0x30,-0x1(%rbp)
jmp    113a <value_char+0x3a>
movsbl -0x2(%rbp),%eax
cmp    $0x6d,%eax
jne    1136 <value_char+0x36>
movb   $0x31,-0x1(%rbp)
jmp    113a <value_char+0x3a>
movb   $0x32,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<value_char>:
cmp    $0x6d,%dil
sete   %al
mov    $0x32,%cl
sub    %al,%cl
cmp    $0x75,%dil
movzbl %cl,%ecx
mov    $0x30,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @value_char(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 117
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 48, i8* %2
br label %14
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 109
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 49, i8* %2
br label %14
13: ; preds = %8
store i8 50, i8* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @value_char(i8 signext %0) {
%2 = icmp eq i8 %0, 109
%3 = select i1 %2, i8 49, i8 50
%4 = icmp eq i8 %0, 117
%5 = select i1 %4, i8 48, i8 %3
ret i8 %5
}
int LongNoSwap(int i) { return i; }


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

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

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

LLVM IR (-O2):
define i32 @LongNoSwap(i32 returned %0) {
ret i32 %0
}
void __attribute__((weak)) vApplicationMallocFailedHook() {}


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

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

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

LLVM IR (-O2):
define weak void @vApplicationMallocFailedHook() {
ret void
}
void DebugMon_Handler() {}


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

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

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

LLVM IR (-O2):
define void @DebugMon_Handler() {
ret void
}
min(a, b) int a, b;
{ return ((a < b) ? a : b); }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
size_t process_string(char *str) {
  size_t i = 0;
  while (*str++)
    i++;
  return i;
}


x86 assembly (clang, -O0):
<process_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1139 <process_string+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <process_string+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_string>:
cmpb   $0x0,(%rdi)
je     111f <process_string+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <process_string+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @process_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
store i64 0, i64* %3
br label %4
4: ; preds = %9, %1
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %2
%7 = load i8, i8* %5
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = load i64, i64* %3
%11 = add i64 %10, 1
store i64 %11, i64* %3
br label %4
12: ; preds = %4
%13 = load i64, i64* %3
ret i64 %13
}

LLVM IR (-O2):
define i64 @process_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i64 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
/* Variables and functions */
int shm_unlink(char const *);
int fshm_force_destroy(const char *name) { return shm_unlink(name); }


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

x86 assembly (clang, -O2):
<fshm_force_destroy>:
jmp    1030 <shm_unlink@plt>

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

LLVM IR (-O2):
define i32 @fshm_force_destroy(i8* %0) {
%2 = tail call i32 @shm_unlink(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ getZero();
int /*<<< orphan*/ usePointer(int /*<<< orphan*/);
void testUseOfNullPointer() { usePointer(getZero()); }


x86 assembly (clang, -O0):
<testUseOfNullPointer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getZero@plt>
mov    %eax,%edi
call   1040 <usePointer@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testUseOfNullPointer>:
push   %rax
xor    %eax,%eax
call   1030 <getZero@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <usePointer@plt>

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

LLVM IR (-O2):
define void @testUseOfNullPointer() {
%1 = tail call i32 (...) @getZero()
%2 = tail call i32 @usePointer(i32 %1)
ret void
}
int fun631() { return 631; }


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

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

LLVM IR (-O0):
define i32 @fun631() {
ret i32 631
}

LLVM IR (-O2):
define i32 @fun631() {
ret i32 631
}
int f(int x, int y) {
  int ret = 10;
  if (x == y)
    ret = x - y;
  return ret;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1126 <f+0x26>
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %ecx,%ecx
cmp    %esi,%edi
mov    $0xa,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = select i1 %3, i32 0, i32 10
ret i32 %4
}