xunge/DecIR huggingface dataset:
/* Type definitions */
struct VariableShare {
  int dummy;
};

/* Variables and functions */
int AddVariable_Database(struct VariableShare *, char *, unsigned char,
                         unsigned char, void volatile *, unsigned int);
int RVS_AddVariable(struct VariableShare *vsh, char *variable_name,
                    unsigned char permissions, unsigned char AUTO_UPDATE,
                    volatile void *ptr, unsigned int ptr_size) {
  return AddVariable_Database(vsh, variable_name, permissions, AUTO_UPDATE, ptr,
                              ptr_size);
}


x86 assembly (clang, -O0):
<RVS_AddVariable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x11(%rbp),%cl
mov    -0x12(%rbp),%al
mov    -0x20(%rbp),%r8
mov    -0x24(%rbp),%r9d
movzbl %cl,%edx
movzbl %al,%ecx
call   1030 <AddVariable_Database@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RVS_AddVariable>:
jmp    1030 <AddVariable_Database@plt>

LLVM IR (-O0):
%struct.VariableShare = type { i32 }
define i32 @RVS_AddVariable(%struct.VariableShare* %0, i8* %1, i8 zeroext %2, i8 zeroext %3, i8* %4, i32 %5) {
%7 = alloca %struct.VariableShare*
%8 = alloca i8*
%9 = alloca i8
%10 = alloca i8
%11 = alloca i8*
%12 = alloca i32
store %struct.VariableShare* %0, %struct.VariableShare** %7
store i8* %1, i8** %8
store i8 %2, i8* %9
store i8 %3, i8* %10
store i8* %4, i8** %11
store i32 %5, i32* %12
%13 = load %struct.VariableShare*, %struct.VariableShare** %7
%14 = load i8*, i8** %8
%15 = load i8, i8* %9
%16 = load i8, i8* %10
%17 = load i8*, i8** %11
%18 = load i32, i32* %12
%19 = call i32 @AddVariable_Database(%struct.VariableShare* %13, i8* %14, i8 zeroext %15, i8 zeroext %16, i8* %17, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
%struct.VariableShare = type { i32 }
define i32 @RVS_AddVariable(%struct.VariableShare* %0, i8* %1, i8 zeroext %2, i8 zeroext %3, i8* %4, i32 %5) {
%7 = tail call i32 @AddVariable_Database(%struct.VariableShare* %0, i8* %1, i8 zeroext %2, i8 zeroext %3, i8* %4, i32 %5)
ret i32 %7
}
/* Variables and functions */
int srun(int, char **);
int main(int argc, char **argv) { return srun(argc, argv); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <srun@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <srun@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @srun(i32 %0, i8** %1)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ time_t;
typedef scalar_t__ suseconds_t;

/* Variables and functions */
size_t snprintf(char *, size_t, char *, unsigned int, unsigned int);
size_t fmt_tstamp_decimal(char *buf, size_t buf_len, time_t sec,
                          suseconds_t usec) {
  return snprintf(buf, buf_len, "%u.%06u", (unsigned)sec, (unsigned)usec);
}


x86 assembly (clang, -O0):
<fmt_tstamp_decimal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %eax,%r8d
lea    0xebc(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmt_tstamp_decimal>:
mov    %rcx,%r8
mov    %rdx,%rcx
lea    0xee3(%rip),%rdx
jmp    1030 <snprintf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%u.%06u\00"
define i64 @fmt_tstamp_decimal(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = trunc i64 %2 to i32
%6 = trunc i64 %3 to i32
%7 = tail call i64 @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  int a = 0x99000011;
  unsigned char *c = (unsigned char *)(&a);
  if (*c == 0x11)
    printf("little endian\n");
  else
    printf("big endian\n");
}


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)
movl   $0x99000011,-0x14(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x11,%eax
jne    1156 <main+0x46>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
jmp    1162 <main+0x52>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"little endian\0A\00"
@.str.1 = [12 x i8] c"big endian\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 -1728053231, i32* %6
%8 = bitcast i32* %6 to i8*
store i8* %8, i8** %7
%9 = load i8*, i8** %7
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = icmp eq i32 %11, 17
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %17
15: ; preds = %2
%16 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %15, %13
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@str = [14 x i8] c"little endian\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct s_map {
  int dummy;
};

/* Variables and functions */
int mapComparePrefixExt(struct s_map *, int const, void const *,
                        int /*<<< orphan*/);
int /*<<< orphan*/ mapGetKeySize(struct s_map *);
int mapCompareKeysExt(struct s_map *map, const int id, const void *key) {
  return mapComparePrefixExt(map, id, key, mapGetKeySize(map));
}


x86 assembly (clang, -O0):
<mapCompareKeysExt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <mapGetKeySize@plt>
mov    -0x30(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
call   1030 <mapComparePrefixExt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapCompareKeysExt>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <mapGetKeySize@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <mapComparePrefixExt@plt>

LLVM IR (-O0):
%struct.s_map = type { i32 }
define i32 @mapCompareKeysExt(%struct.s_map* %0, i32 %1, i8* %2) {
%4 = alloca %struct.s_map*
%5 = alloca i32
%6 = alloca i8*
store %struct.s_map* %0, %struct.s_map** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load %struct.s_map*, %struct.s_map** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = load %struct.s_map*, %struct.s_map** %4
%11 = call i32 @mapGetKeySize(%struct.s_map* %10)
%12 = call i32 @mapComparePrefixExt(%struct.s_map* %7, i32 %8, i8* %9, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.s_map = type { i32 }
define i32 @mapCompareKeysExt(%struct.s_map* %0, i32 %1, i8* %2) {
%4 = tail call i32 @mapGetKeySize(%struct.s_map* %0)
%5 = tail call i32 @mapComparePrefixExt(%struct.s_map* %0, i32 %1, i8* %2, i32 %4)
ret i32 %5
}
void ExttAccessAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttAccessAuxTable() {
ret void
}
int gcd(int a, int b) {
  int c;
  c = a % b;
  while (c != 0) {
    a = b;
    b = c;
    c = a % b;
  }
  return (b);
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1139 <gcd+0x39>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
jmp    1114 <gcd+0x14>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1120 <gcd+0x20>
nopl   0x0(%rax)
mov    %edx,%ecx
mov    %esi,%eax
cltd
idiv   %ecx
mov    %ecx,%esi
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ %3, %2 ]
%7 = phi i32 [ %6, %5 ], [ %1, %2 ]
%8 = srem i32 %7, %6
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
%11 = phi i32 [ %1, %2 ], [ %6, %5 ]
ret i32 %11
}
char foo(int *a, char *b, char *c) {
  __builtin_memmove(c, b, a[b[0]]);
  __builtin_memmove(b, c, a[c[0]]);
  return c[0] + b[0];
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbq (%rcx),%rcx
movslq (%rax,%rcx,4),%rdx
call   1030 <memmove@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbq (%rcx),%rcx
movslq (%rax,%rcx,4),%rdx
call   1030 <memmove@plt>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
movsbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
movsbq (%rsi),%rax
movslq (%rdi,%rax,4),%rdx
mov    %r14,%rdi
call   1030 <memmove@plt>
movsbq (%r14),%rax
movslq (%r15,%rax,4),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <memmove@plt>
mov    (%rbx),%al
add    (%r14),%al
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define signext i8 @foo(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i8*, i8** %5
%9 = load i32*, i32** %4
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i64
%14 = getelementptr inbounds i32, i32* %9, i64 %13
%15 = load i32, i32* %14
%16 = sext i32 %15 to i64
%17 = load i8*, i8** %5
%18 = load i8*, i8** %6
%19 = load i32*, i32** %4
%20 = load i8*, i8** %6
%21 = getelementptr inbounds i8, i8* %20, i64 0
%22 = load i8, i8* %21
%23 = sext i8 %22 to i64
%24 = getelementptr inbounds i32, i32* %19, i64 %23
%25 = load i32, i32* %24
%26 = sext i32 %25 to i64
%27 = load i8*, i8** %6
%28 = getelementptr inbounds i8, i8* %27, i64 0
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = load i8*, i8** %5
%32 = getelementptr inbounds i8, i8* %31, i64 0
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = add nsw i32 %30, %34
%36 = trunc i32 %35 to i8
ret i8 %36
}

LLVM IR (-O2):
define signext i8 @foo(i32* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
%4 = load i8, i8* %1
%5 = sext i8 %4 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = sext i32 %7 to i64
tail call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 %1, i64 %8, i1 false)
%9 = load i8, i8* %2
%10 = sext i8 %9 to i64
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = sext i32 %12 to i64
tail call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %1, i8* align 1 %2, i64 %13, i1 false)
%14 = load i8, i8* %2
%15 = load i8, i8* %1
%16 = add i8 %15, %14
ret i8 %16
}
int test_overflow(struct libavl_allocator *alloc, int order[], int n,
                  int verbosity) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.libavl_allocator = type opaque
define i32 @test_overflow(%struct.libavl_allocator* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca %struct.libavl_allocator*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store %struct.libavl_allocator* %0, %struct.libavl_allocator** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
%struct.libavl_allocator = type opaque
define i32 @test_overflow(%struct.libavl_allocator* nocapture readnone %0, i32* nocapture readnone %1, i32 %2, i32 %3) {
ret i32 0
}
void mm_finalize(struct CalculationInfo *info) {}


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

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

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

LLVM IR (-O2):
%struct.CalculationInfo = type opaque
define void @mm_finalize(%struct.CalculationInfo* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ a(char *);
int main(int ac, char **av) {
  static char string[] = "Hello,  world!\n";
  a(string);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0x2f0a(%rip),%rdi
call   1030 <a@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@main.string = internal global [16 x i8] c"Hello, world!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @a(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @main.string, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@main.string = internal global [16 x i8] c"Hello, world!\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @a(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @main.string, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ze_white() { printf("[37m"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[37m\00"
define void @ze_white() {
%1 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[37m\00"
define void @ze_white() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
int F(int x) {
  if (x == 1)
    return 1;
  if (x % 2 == 0)
    return F(x / 2);
  return F(x - 1) + F(x + 1);
}


x86 assembly (clang, -O0):
<F>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1131 <F+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1182 <F+0x72>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115f <F+0x4f>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <F@plt>
mov    %eax,-0x4(%rbp)
jmp    1182 <F+0x72>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <F@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
add    $0x1,%edi
call   1030 <F@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<F>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
cmp    $0x1,%edi
jne    1126 <F+0x16>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %edi,%ebx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
test   $0x1,%bl
jne    114a <F+0x3a>
mov    %ebx,%eax
shr    $0x1f,%eax
add    %ebx,%eax
sar    %eax
and    $0xfffffffe,%ebx
cmp    $0x2,%ebx
mov    %eax,%ebx
jne    1130 <F+0x20>
jmp    111a <F+0xa>
lea    -0x1(%rbx),%edi
call   1030 <F@plt>
add    $0x1,%ebx
add    %eax,%ebp
jmp    1130 <F+0x20>

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

LLVM IR (-O2):
define i32 @F(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %19, label %3
3: ; preds = %1, %14
%4 = phi i32 [ %17, %14 ], [ %0, %1 ]
%5 = phi i32 [ %18, %14 ], [ 0, %1 ]
br label %6
6: ; preds = %3, %10
%7 = phi i32 [ %4, %3 ], [ %11, %10 ]
%8 = and i32 %7, 1
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = sdiv i32 %7, 2
%12 = and i32 %7, -2
%13 = icmp eq i32 %12, 2
br i1 %13, label %19, label %6
14: ; preds = %6
%15 = add nsw i32 %7, -1
%16 = tail call i32 @F(i32 %15)
%17 = add nsw i32 %7, 1
%18 = add nsw i32 %16, %5
br label %3
19: ; preds = %10, %1
%20 = phi i32 [ 0, %1 ], [ %5, %10 ]
%21 = add nsw i32 %20, 1
ret i32 %21
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t Checksum_complete(uint32_t state) {
  while (state > 0xFFFF) {
    state = (state >> 16) + (state & 0xFFFF);
  }
  return ~state;
}


x86 assembly (clang, -O0):
<Checksum_complete>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xffff,-0x4(%rbp)
jle    112d <Checksum_complete+0x2d>
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
mov    -0x4(%rbp),%ecx
and    $0xffff,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <Checksum_complete+0x7>
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Checksum_complete>:
mov    %edi,%eax
cmp    $0x10000,%edi
jl     1121 <Checksum_complete+0x21>
nopw   0x0(%rax,%rax,1)
mov    %eax,%ecx
shr    $0x10,%ecx
movzwl %ax,%eax
add    %ecx,%eax
cmp    $0xffff,%eax
ja     1110 <Checksum_complete+0x10>
not    %eax
ret

LLVM IR (-O0):
define i32 @Checksum_complete(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %6, %1
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 65535
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = ashr i32 %7, 16
%9 = load i32, i32* %2
%10 = and i32 %9, 65535
%11 = add nsw i32 %8, %10
store i32 %11, i32* %2
br label %3
12: ; preds = %3
%13 = load i32, i32* %2
%14 = xor i32 %13, -1
ret i32 %14
}

LLVM IR (-O2):
define i32 @Checksum_complete(i32 %0) {
%2 = icmp sgt i32 %0, 65535
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = lshr i32 %4, 16
%6 = and i32 %4, 65535
%7 = add nuw nsw i32 %5, %6
%8 = icmp ugt i32 %7, 65535
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ %0, %1 ], [ %7, %3 ]
%11 = xor i32 %10, -1
ret i32 %11
}
void ptrace_sandbox_kill_processes(struct pt_sandbox *p_sandbox) {
  (void)p_sandbox;
}


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

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

LLVM IR (-O0):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_kill_processes(%struct.pt_sandbox* %0) {
%2 = alloca %struct.pt_sandbox*
store %struct.pt_sandbox* %0, %struct.pt_sandbox** %2
%3 = load %struct.pt_sandbox*, %struct.pt_sandbox** %2
ret void
}

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_kill_processes(%struct.pt_sandbox* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ caddr_t;

/* Variables and functions */
int /*<<< orphan*/ syscall_sbrk(int);
caddr_t sbrk(int incr) { return (caddr_t)syscall_sbrk(incr); }


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

x86 assembly (clang, -O2):
<sbrk>:
jmp    1030 <syscall_sbrk@plt>

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

LLVM IR (-O2):
define i32 @sbrk(i32 %0) {
%2 = tail call i32 @syscall_sbrk(i32 %0)
ret i32 %2
}
__attribute__((no, noclone)) int f3(int x, int y) {
  int z = -y;
  return x % z;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
mov    %edi,%eax
neg    %esi
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @f3(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sub nsw i32 0, %6
store i32 %7, i32* %5
%8 = load i32, i32* %3
%9 = load i32, i32* %5
%10 = srem i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @f3(i32 %0, i32 %1) {
%3 = sub nsw i32 0, %1
%4 = srem i32 %0, %3
ret i32 %4
}
const char *ensure_string(const char *str) { return str ? str : ""; }


x86 assembly (clang, -O0):
<ensure_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1120 <ensure_string+0x20>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1130 <ensure_string+0x30>
lea    0xed9(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1130 <ensure_string+0x30>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @ensure_string(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %0
ret i8* %3
}
double ceil(double x) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  (void)(x);
  return 0;
}


x86 assembly (clang, -O0):
<ceil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.ceil = [5 x i8] c"ceil\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @ceil(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.ceil, i64 0, i64 0))
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
%7 = load double, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.ceil = [5 x i8] c"ceil\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @ceil(double %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.ceil, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_commands() {
  printf("Commands:\n"
         "\tchat <chatid>          print out a conversation\n"
         "\tfind <chatid> <str>    find a message\n"
         "\tedit <newtext>         edit the most recently found message\n"
         "\tadd  <uid> <text>      add a message after the most recently found "
         "message\n"
         "\tquit                   exit\n");
}


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

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

LLVM IR (-O0):
@.str = [265 x i8] c"Commands:\0A\09chat <chatid> print out a conversation\0A\09find <chatid> <str> find a message\0A\09edit <newtext> edit the most recently found message\0A\09add <uid> <text> add a message after the most recently found message\0A\09quit exit\0A\00"
define void @print_commands() {
%1 = call i32 @printf(i8* getelementptr inbounds ([265 x i8], [265 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [264 x i8] c"Commands:\0A\09chat <chatid> print out a conversation\0A\09find <chatid> <str> find a message\0A\09edit <newtext> edit the most recently found message\0A\09add <uid> <text> add a message after the most recently found message\0A\09quit exit\00"
define void @print_commands() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([264 x i8], [264 x i8]* @str, i64 0, i64 0))
ret void
}
void PRCMSOCReset() {
  (*((volatile unsigned long *)(0x4402D000 + 0x00000108))) |= 0x1;
}


x86 assembly (clang, -O0):
<PRCMSOCReset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4402d108,%eax
mov    (%rax),%rcx
or     $0x1,%rcx
mov    $0x4402d108,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PRCMSOCReset>:
orq    $0x1,0x4402d108
44 01
ret

LLVM IR (-O0):
define void @PRCMSOCReset() {
%1 = load volatile i64, i64* inttoptr (i64 1141035272 to i64*)
%2 = or i64 %1, 1
store volatile i64 %2, i64* inttoptr (i64 1141035272 to i64*)
ret void
}

LLVM IR (-O2):
define void @PRCMSOCReset() {
%1 = load volatile i64, i64* inttoptr (i64 1141035272 to i64*)
%2 = or i64 %1, 1
store volatile i64 %2, i64* inttoptr (i64 1141035272 to i64*)
ret void
}
void not_prune_multiple1_Bad() {
  int a[5];
  int m[2] = {0, 10};
  if (m[0] < 5) {
    a[m[1]] = 0;
  }
}


x86 assembly (clang, -O0):
<not_prune_multiple1_Bad>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0x28(%rbp)
cmpl   $0x5,-0x28(%rbp)
jge    1125 <not_prune_multiple1_Bad+0x25>
movslq -0x24(%rbp),%rax
movl   $0x0,-0x20(%rbp,%rax,4)
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.not_prune_multiple1_Bad.m = [2 x i32] [i32 0, i32 10]
define void @not_prune_multiple1_Bad() {
%1 = alloca [5 x i32]
%2 = alloca [2 x i32]
%3 = bitcast [2 x i32]* %2 to i8*
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%5 = load i32, i32* %4
%6 = icmp slt i32 %5, 5
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
%9 = load i32, i32* %8
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 %10
store i32 0, i32* %11
br label %12
12: ; preds = %7, %0
ret void
}

LLVM IR (-O2):
define void @not_prune_multiple1_Bad() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void cleanup_temps(void **const temps) { free(*temps); }


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

x86 assembly (clang, -O2):
<cleanup_temps>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @cleanup_temps(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void fun() {
  int i;
  int j;
  for (i = 0; i < 2000; i++)
    for (j = 0; j < 5000; j++)
      ;
  system("busybox clear");
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x7d0,-0x4(%rbp)
jge    1166 <fun+0x56>
movl   $0x0,-0x8(%rbp)
cmpl   $0x1388,-0x8(%rbp)
jge    1153 <fun+0x43>
jmp    1145 <fun+0x35>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <fun+0x23>
jmp    1158 <fun+0x48>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <fun+0xf>
lea    0xe93(%rip),%rdi
call   1030 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"busybox clear\00"
define void @fun() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn59() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn59");
  return result;
}


x86 assembly (clang, -O0):
<fn59>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn59>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn59\00"
define i8* @fn59() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn59\00"
define i8* @fn59() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, unsigned char const *, int);
void GLUE_MOVE_PX_STACKPTR_GEN(void *b, int wv) {
  static const unsigned char tab[3][3] = {
      {0x48, 0x89, 0xe0},
      {0x48, 0x89, 0xe7},
      {0x48, 0x89, 0xe1},
  };
  memcpy(b, tab[wv], 3);
}


x86 assembly (clang, -O0):
<GLUE_MOVE_PX_STACKPTR_GEN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
lea    0xed2(%rip),%rsi
imul   $0x3,%rax,%rax
add    %rax,%rsi
mov    $0x3,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLUE_MOVE_PX_STACKPTR_GEN>:
movslq %esi,%rax
lea    (%rax,%rax,2),%rax
lea    0xee2(%rip),%rsi
add    %rax,%rsi
mov    $0x3,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
@GLUE_MOVE_PX_STACKPTR_GEN.tab = internal constant [3 x [3 x i8]] [[3 x i8] c"H\89\E0", [3 x i8] c"H\89\E7", [3 x i8] c"H\89\E1"]
define void @GLUE_MOVE_PX_STACKPTR_GEN(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* @GLUE_MOVE_PX_STACKPTR_GEN.tab, i64 0, i64 %7
%9 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 0
%10 = call i32 @memcpy(i8* %5, i8* %9, i32 3)
ret void
}

LLVM IR (-O2):
@GLUE_MOVE_PX_STACKPTR_GEN.tab = internal constant [3 x [3 x i8]] [[3 x i8] c"H\89\E0", [3 x i8] c"H\89\E7", [3 x i8] c"H\89\E1"]
define void @GLUE_MOVE_PX_STACKPTR_GEN(i8* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* @GLUE_MOVE_PX_STACKPTR_GEN.tab, i64 0, i64 %3, i64 0
%5 = tail call i32 @memcpy(i8* %0, i8* %4, i32 3)
ret void
}
float cToF(float tempC) { return tempC * (9.0 / 5.0) + 32; }


x86 assembly (clang, -O0):
<cToF>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee2(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cToF>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @cToF(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call double @llvm.fmuladd.f64(double %4, double 1.800000e+00, double 3.200000e+01)
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @cToF(float %0) {
%2 = fpext float %0 to double
%3 = tail call double @llvm.fmuladd.f64(double %2, double 1.800000e+00, double 3.200000e+01)
%4 = fptrunc double %3 to float
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ pit8254_speaker_delay(unsigned long);
__attribute__((always_)) void pit8254_udelay(unsigned long usecs) {
  pit8254_speaker_delay((usecs * 1193182UL) / 1000000);
}


x86 assembly (clang, -O0):
<pit8254_udelay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
imul   $0x1234de,-0x8(%rbp),%rax
mov    $0xf4240,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rdi
call   1030 <pit8254_speaker_delay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pit8254_udelay>:
imul   $0x1234de,%rdi,%rax
movabs $0x431bde82d7b634db,%rcx
de 1b 43
mul    %rcx
mov    %rdx,%rdi
shr    $0x12,%rdi
jmp    1030 <pit8254_speaker_delay@plt>

LLVM IR (-O0):
define void @pit8254_udelay(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 %3, 1193182
%5 = udiv i64 %4, 1000000
%6 = call i32 @pit8254_speaker_delay(i64 %5)
ret void
}

LLVM IR (-O2):
define void @pit8254_udelay(i64 %0) {
%2 = mul i64 %0, 1193182
%3 = udiv i64 %2, 1000000
%4 = tail call i32 @pit8254_speaker_delay(i64 %3)
ret void
}
void s_abort() {}


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

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

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

LLVM IR (-O2):
define void @s_abort() {
ret void
}
void foo463(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo463(i32 %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  struct TYPE_4__ *uc_link;
};
typedef TYPE_1__ ucontext_t;
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ getcontext(TYPE_1__ *);
void sighandler(int sig, siginfo_t *sip, ucontext_t *ucp) {
  ucontext_t uc2;
  getcontext(&uc2);
  assert(uc2.uc_link == ucp);
}


x86 assembly (clang, -O0):
<sighandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
call   1040 <getcontext@plt>
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sighandler>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
lea    0x8(%rsp),%rdi
call   1040 <getcontext@plt>
xor    %edi,%edi
cmp    %rbx,0x8(%rsp)
sete   %al
mov    %al,%dil
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_4__* }
define void @sighandler(i32 %0, i32* %1, %struct.TYPE_4__* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca %struct.TYPE_4__*
%7 = alloca %struct.TYPE_4__
store i32 %0, i32* %4
store i32* %1, i32** %5
store %struct.TYPE_4__* %2, %struct.TYPE_4__** %6
%8 = call i32 @getcontext(%struct.TYPE_4__* %7)
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%10 = load %struct.TYPE_4__*, %struct.TYPE_4__** %9
%11 = load %struct.TYPE_4__*, %struct.TYPE_4__** %6
%12 = icmp eq %struct.TYPE_4__* %10, %11
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
ret void
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { %struct.TYPE_4__* }
define void @sighandler(i32 %0, i32* nocapture readnone %1, %struct.TYPE_4__* readnone %2) {
%4 = alloca %struct.TYPE_4__
%5 = bitcast %struct.TYPE_4__* %4 to i8*
%6 = call i32 @getcontext(%struct.TYPE_4__* %4)
%7 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i64 0, i32 0
%8 = load %struct.TYPE_4__*, %struct.TYPE_4__** %7
%9 = icmp eq %struct.TYPE_4__* %8, %2
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned long);
scalar_t__ pthread_self();
int /*<<< orphan*/ sampled_thread_monitor_deinit(void *);
int /*<<< orphan*/ stderr;
void deinit_thread(void *d) {
  sampled_thread_monitor_deinit(d);
  fprintf(stderr, "Done with all that sampling in thread %lu!\n",
          (unsigned long)pthread_self());
}


x86 assembly (clang, -O0):
<deinit_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <sampled_thread_monitor_deinit@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%rdx
lea    0xe9b(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deinit_thread>:
push   %rbx
call   1050 <sampled_thread_monitor_deinit@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1040 <pthread_self@plt>
lea    0xeb3(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"Done with all that sampling in thread %lu!\0A\00"
define void @deinit_thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sampled_thread_monitor_deinit(i8* %3)
%5 = load i32, i32* @stderr
%6 = call i64 (...) @pthread_self()
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i64 %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"Done with all that sampling in thread %lu!\0A\00"
define void @deinit_thread(i8* %0) {
%2 = tail call i32 @sampled_thread_monitor_deinit(i8* %0)
%3 = load i32, i32* @stderr
%4 = tail call i64 (...) @pthread_self()
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i64 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ rgph_u64_t1ha64s_data32(int /*<<< orphan*/ const *, size_t,
                                           uintptr_t);
uint64_t rgph_u64_t1ha64s_u32a(const uint32_t *key, size_t len,
                               uintptr_t seed) {
  return rgph_u64_t1ha64s_data32(key, len, seed);
}


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

x86 assembly (clang, -O2):
<rgph_u64_t1ha64s_u32a>:
jmp    1030 <rgph_u64_t1ha64s_data32@plt>

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

LLVM IR (-O2):
define i32 @rgph_u64_t1ha64s_u32a(i32* %0, i64 %1, i64 %2) {
%4 = tail call i32 @rgph_u64_t1ha64s_data32(i32* %0, i64 %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int strlen(char a[]) {
  int n = 0;
  while (a[n] != '\0')
    n++;
  return n;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <strlen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
void swift_getEnumTagSinglePayloadGeneric(void) {}


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

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

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

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