xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *, char const *);
int /*<<< orphan*/ match(char *, char const *);
void checkarg(const char *arg) {
  if (!match("^[A-Za-z0-9_-]+$", arg))
    errx(1, "%s: argument contains invalid characters", arg);
}


x86 assembly (clang, -O0):
<checkarg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <match@plt>
cmp    $0x0,%eax
jne    115a <checkarg+0x3a>
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
lea    0xebc(%rip),%rsi
call   1030 <errx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkarg>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <match@plt>
test   %eax,%eax
je     1139 <checkarg+0x19>
pop    %rbx
ret
lea    0xed1(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <errx@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"^[A-Za-z0-9_-]+$\00"
@.str.1 = [41 x i8] c"%s: argument contains invalid characters\00"
define void @checkarg(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @match(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @errx(i32 1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"^[A-Za-z0-9_-]+$\00"
@.str.1 = [41 x i8] c"%s: argument contains invalid characters\00"
define void @checkarg(i8* %0) {
%2 = tail call i32 @match(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
ret void
}
_Bool QuietUnordered(float f1, float f2) {
  return __builtin_isunordered(f1, f2);
}


x86 assembly (clang, -O0):
<QuietUnordered>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
setp   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuietUnordered>:
ucomiss %xmm1,%xmm0
setp   %al
ret

LLVM IR (-O0):
define zeroext i1 @QuietUnordered(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp uno float %5, %6
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @QuietUnordered(float %0, float %1) {
%3 = fcmp uno float %0, %1
ret i1 %3
}
/* Variables and functions */
int getMin(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int A[] = {4, 5, 6, 1, 3, 4, 5, 10};
  int min = getMin(A, 8);
  printf("min = %d\n", min);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x8,%esi
call   1040 <getMin@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x8,%esi
call   1040 <getMin@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.A = [8 x i32] [i32 4, i32 5, i32 6, i32 1, i32 3, i32 4, i32 5, i32 10]
@.str = [10 x i8] c"min = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [8 x i32]* %2 to i8*
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%6 = call i32 @getMin(i32* %5, i32 8)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.A = [8 x i32] [i32 4, i32 5, i32 6, i32 1, i32 3, i32 4, i32 5, i32 10]
@.str = [10 x i8] c"min = %d\0A\00"
define i32 @main() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
%3 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%4 = call i32 @getMin(i32* %3, i32 8)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
char const *vl_get_version_string() {
  return "0.1"
         " ("
         "little endian"
         ")";
}


x86 assembly (clang, -O0):
<vl_get_version_string>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vl_get_version_string>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [20 x i8] c"0.1 (little endian)\00"
define i8* @vl_get_version_string() {
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [20 x i8] c"0.1 (little endian)\00"
define i8* @vl_get_version_string() {
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0)
}
long CDRopen(void) { return 0; }


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

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

LLVM IR (-O0):
define i64 @CDRopen() {
ret i64 0
}

LLVM IR (-O2):
define i64 @CDRopen() {
ret i64 0
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t Keypad_GetRaw(void) {
  return ~(*(volatile unsigned long *)(0x3FFFC000 + 0x14)) &
         ((1 << 23) | (1 << 15) | (1 << 16) | (1 << 4) | (1 << 20));
}


x86 assembly (clang, -O0):
<Keypad_GetRaw>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3fffc014,%eax
mov    (%rax),%rax
xor    $0xffffffffffffffff,%rax
and    $0x918010,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Keypad_GetRaw>:
mov    0x3fffc014,%rax
3f
not    %eax
and    $0x918010,%eax
ret

LLVM IR (-O0):
define i64 @Keypad_GetRaw() {
%1 = load volatile i64, i64* inttoptr (i64 1073725460 to i64*)
%2 = xor i64 %1, -1
%3 = and i64 %2, 9535504
ret i64 %3
}

LLVM IR (-O2):
define i64 @Keypad_GetRaw() {
%1 = load volatile i64, i64* inttoptr (i64 1073725460 to i64*)
%2 = and i64 %1, 9535504
%3 = xor i64 %2, 9535504
ret i64 %3
}
/* Variables and functions */
scalar_t__ cparse_str_empty(char const *);
int strcmp(char const *, char const *);
int cparse_str_cmp(const char *a, const char *b) {
  if (cparse_str_empty(a) || cparse_str_empty(b)) {
    return 0;
  }
  return strcmp(a, b);
}


x86 assembly (clang, -O0):
<cparse_str_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <cparse_str_empty@plt>
cmp    $0x0,%rax
jne    1156 <cparse_str_cmp+0x36>
mov    -0x18(%rbp),%rdi
call   1040 <cparse_str_empty@plt>
cmp    $0x0,%rax
je     1162 <cparse_str_cmp+0x42>
movl   $0x0,-0x4(%rbp)
jmp    1172 <cparse_str_cmp+0x52>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cparse_str_cmp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <cparse_str_empty@plt>
test   %rax,%rax
jne    1141 <cparse_str_cmp+0x21>
mov    %r14,%rdi
call   1040 <cparse_str_empty@plt>
test   %rax,%rax
je     114b <cparse_str_cmp+0x2b>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @cparse_str_cmp(i8* %0, i8* %1) {
%3 = tail call i64 @cparse_str_empty(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = tail call i64 @cparse_str_empty(i8* %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
br label %10
10: ; preds = %2, %5, %8
%11 = phi i32 [ %9, %8 ], [ 0, %5 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ file(char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ help(int, char const **);
int /*<<< orphan*/ stderr;
int main(int argc, const char **argv) {
  help(argc, argv);
  if (argc != 2) {
    fprintf(stderr, "ply2off: wrong number of arguments: %d\n", argc);
    exit(2);
  }
  file(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <help@plt>
cmpl   $0x2,-0x8(%rbp)
je     118e <main+0x4e>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xe81(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <file@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1040 <help@plt>
cmp    $0x2,%ebp
jne    1164 <main+0x24>
mov    0x8(%rbx),%rdi
call   1060 <file@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
lea    0xe8c(%rip),%rsi
mov    %ebp,%edx
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"ply2off: wrong number of arguments: %d\0A\00"
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 @help(i32 %6, i8** %7)
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 2
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i32, i32* %4
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = call i32 @exit(i32 2)
unreachable
16: ; preds = %2
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @file(i8* %19)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"ply2off: wrong number of arguments: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @help(i32 %0, i8** %1)
%4 = icmp eq i32 %0, 2
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %0)
%8 = tail call i32 @exit(i32 2)
unreachable
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @file(i8* %11)
ret i32 0
}
/* Variables and functions */
void strcpy(char *s, char *t) {
  int i;
  i = 0;
  while ((*s = *t) != '\0') {
    s++;
    t++;
  }
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1148 <strcpy+0x48>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1113 <strcpy+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    (%rsi),%al
mov    %al,(%rdi)
test   %al,%al
je     111f <strcpy+0x1f>
mov    $0x1,%eax
nopl   (%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define void @strcpy(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
store i8 %3, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %8, %5 ], [ %0, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
store i8 %10, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
void X509_STORE_CTX_get_ex_new_index(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_STORE_CTX_get_ex_new_index() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ itob(int, char *, int);
int main(void) {
  int n;
  char s[1000];
  n = 3545;
  itob(n, s, 10);
  itob(n, s, 16);
  itob(n, s, 8);
  itob(n, s, 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xdd9,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x3f0(%rbp),%rsi
mov    $0xa,%edx
call   1030 <itob@plt>
mov    -0x8(%rbp),%edi
lea    -0x3f0(%rbp),%rsi
mov    $0x10,%edx
call   1030 <itob@plt>
mov    -0x8(%rbp),%edi
lea    -0x3f0(%rbp),%rsi
mov    $0x8,%edx
call   1030 <itob@plt>
mov    -0x8(%rbp),%edi
lea    -0x3f0(%rbp),%rsi
mov    $0x2,%edx
call   1030 <itob@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rsp,%rbx
mov    $0xdd9,%edi
mov    %rbx,%rsi
mov    $0xa,%edx
call   1030 <itob@plt>
mov    $0xdd9,%edi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <itob@plt>
mov    $0xdd9,%edi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1030 <itob@plt>
mov    $0xdd9,%edi
mov    %rbx,%rsi
mov    $0x2,%edx
call   1030 <itob@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @itob(i32 3545, i8* %2, i32 10)
%4 = call i32 @itob(i32 3545, i8* %2, i32 16)
%5 = call i32 @itob(i32 3545, i8* %2, i32 8)
%6 = call i32 @itob(i32 3545, i8* %2, i32 2)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t get32bit(uint8_t buf[]) {
  return (buf[0]) | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
}


x86 assembly (clang, -O0):
<get32bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0xc(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get32bit>:
mov    0x4(%rdi),%ecx
mov    0x8(%rdi),%edx
shl    $0x8,%ecx
or     (%rdi),%ecx
shl    $0x10,%edx
mov    0xc(%rdi),%eax
shl    $0x18,%eax
or     %edx,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @get32bit(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = shl i32 %8, 8
%10 = or i32 %5, %9
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 2
%13 = load i32, i32* %12
%14 = shl i32 %13, 16
%15 = or i32 %10, %14
%16 = load i32*, i32** %2
%17 = getelementptr inbounds i32, i32* %16, i64 3
%18 = load i32, i32* %17
%19 = shl i32 %18, 24
%20 = or i32 %15, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @get32bit(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = shl i32 %4, 8
%6 = or i32 %5, %2
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = shl i32 %8, 16
%10 = or i32 %6, %9
%11 = getelementptr inbounds i32, i32* %0, i64 3
%12 = load i32, i32* %11
%13 = shl i32 %12, 24
%14 = or i32 %10, %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(int argc, char *argv[]) {
  if (argc < 5) {
    fprintf(stderr, "%s OPTION(-g|-s) SNAPSHOT PAGE_TO_PRINT /proc/modules \n",
            argv[0]);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    115f <usage+0x3f>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
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):
<usage>:
cmp    $0x4,%edi
jle    1126 <usage+0x6>
ret
push   %rax
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c"%s OPTION(-g|-s) SNAPSHOT PAGE_TO_PRINT /proc/modules \0A\00"
define void @usage(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 slt i32 %5, 5
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [56 x i8] c"%s OPTION(-g|-s) SNAPSHOT PAGE_TO_PRINT /proc/modules \0A\00"
define void @usage(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 5
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret void
}
void ptr_cmp(char *end, int size) {
  char buf[2] = "hi";
  for (int i = 0; i < size; i += 2) {
    if (buf < end) {
      return;
    }
  }
}


x86 assembly (clang, -O0):
<ptr_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0xeee(%rip),%ax
mov    %ax,-0xe(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    114f <ptr_cmp+0x4f>
lea    -0xe(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    113c <ptr_cmp+0x3c>
jmp    114f <ptr_cmp+0x4f>
jmp    1141 <ptr_cmp+0x41>
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
jmp    111d <ptr_cmp+0x1d>
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.ptr_cmp.buf = [2 x i8] c"hi"
define void @ptr_cmp(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [2 x i8]
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = bitcast [2 x i8]* %5 to i8*
store i32 0, i32* %6
br label %8
8: ; preds = %18, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%14 = load i8*, i8** %3
%15 = icmp ult i8* %13, %14
br i1 %15, label %16, label %17
16: ; preds = %12
br label %21
17: ; preds = %12
br label %18
18: ; preds = %17
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 2
store i32 %20, i32* %6
br label %8
21: ; preds = %16, %8
ret void
}

LLVM IR (-O2):
define void @ptr_cmp(i8* nocapture %0, i32 %1) {
ret void
}
void mdea_null_node_destroy(void *p) {}


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

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

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

LLVM IR (-O2):
define void @mdea_null_node_destroy(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int interrogate(uint8_t *pack) {
  uint8_t ptr = 0;
  pack[ptr++] = '!';
  pack[ptr++] = 'Z';
  pack[ptr++] = 0;
  pack[ptr++] = 0xA6;
  return ptr;
}


x86 assembly (clang, -O0):
<interrogate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movl   $0x21,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movl   $0x5a,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movl   $0xa6,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<interrogate>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
mov    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @interrogate(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
%4 = load i32*, i32** %2
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
store i32 %6, i32* %3
%7 = sext i32 %5 to i64
%8 = getelementptr inbounds i32, i32* %4, i64 %7
store i32 33, i32* %8
%9 = load i32*, i32** %2
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
%12 = sext i32 %10 to i64
%13 = getelementptr inbounds i32, i32* %9, i64 %12
store i32 90, i32* %13
%14 = load i32*, i32** %2
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
%17 = sext i32 %15 to i64
%18 = getelementptr inbounds i32, i32* %14, i64 %17
store i32 0, i32* %18
%19 = load i32*, i32** %2
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
%22 = sext i32 %20 to i64
%23 = getelementptr inbounds i32, i32* %19, i64 %22
store i32 166, i32* %23
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @interrogate(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 33, i32 90, i32 0, i32 166>, <4 x i32>* %2
ret i32 4
}
/* Type definitions */
struct Walker {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct Walker *);
void walker_free(struct Walker *wkr) { free(wkr); }


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

x86 assembly (clang, -O2):
<walker_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.Walker = type { i32 }
define void @walker_free(%struct.Walker* nocapture %0) {
%2 = tail call i32 @free(%struct.Walker* %0)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
float wy2gau(uint64_t r) {
  const float _wynorm1 = 1.0f / (1ull << 15);
  return (((r >> 16) & 0xffff) + ((r >> 32) & 0xffff) + (r >> 48)) * _wynorm1 -
         3.0f;
}


x86 assembly (clang, -O0):
<wy2gau>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  0xef1(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
and    $0xffff,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    $0xffff,%ecx
add    %ecx,%eax
mov    -0x4(%rbp),%edx
mov    $0x30,%ecx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
cvtsi2ss %eax,%xmm0
movss  0xeb3(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xeab(%rip),%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @wy2gau(i32 %0) {
%2 = alloca i32
%3 = alloca float
store i32 %0, i32* %2
store float 0x3F00000000000000, float* %3
%4 = load i32, i32* %2
%5 = ashr i32 %4, 16
%6 = and i32 %5, 65535
%7 = load i32, i32* %2
%8 = ashr i32 %7, 32
%9 = and i32 %8, 65535
%10 = add nsw i32 %6, %9
%11 = load i32, i32* %2
%12 = ashr i32 %11, 48
%13 = add nsw i32 %10, %12
%14 = sitofp i32 %13 to float
%15 = call float @llvm.fmuladd.f32(float %14, float 0x3F00000000000000, float -3.000000e+00)
ret float %15
}

LLVM IR (-O2):
define float @wy2gau(i32 %0) {
ret float poison
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t make_mask16(uint16_t x) {
  x |= (x >> 1);
  x |= (x >> 2);
  x |= (x >> 4);
  x |= (x >> 8);
  return x;
}


x86 assembly (clang, -O0):
<make_mask16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_mask16>:
mov    %edi,%eax
sar    %eax
or     %edi,%eax
mov    %eax,%ecx
sar    $0x2,%ecx
or     %eax,%ecx
mov    %ecx,%edx
sar    $0x4,%edx
or     %ecx,%edx
mov    %edx,%eax
sar    $0x8,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @make_mask16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 1
%5 = load i32, i32* %2
%6 = or i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = ashr i32 %7, 2
%9 = load i32, i32* %2
%10 = or i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = ashr i32 %11, 4
%13 = load i32, i32* %2
%14 = or i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = ashr i32 %15, 8
%17 = load i32, i32* %2
%18 = or i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @make_mask16(i32 %0) {
%2 = ashr i32 %0, 1
%3 = or i32 %2, %0
%4 = ashr i32 %3, 2
%5 = or i32 %4, %3
%6 = ashr i32 %5, 4
%7 = or i32 %6, %5
%8 = ashr i32 %7, 8
%9 = or i32 %8, %7
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgadd(void) { gen("add\tax,cx"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"add\09ax,cx\00"
define void @cgadd() {
%1 = call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"add\09ax,cx\00"
define void @cgadd() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void sesc_finish() {
  fprintf(stderr, "sesc_finish called (end of simulation in native)");
  exit(0);
}


x86 assembly (clang, -O0):
<sesc_finish>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sesc_finish>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [49 x i8] c"sesc_finish called (end of simulation in native)\00"
define void @sesc_finish() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [49 x i8] c"sesc_finish called (end of simulation in native)\00"
define void @sesc_finish() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
double log(double);
double freq_mel(double freq) { return 1127.01048 * log(freq / 700.0 + 1.0); }


x86 assembly (clang, -O0):
<freq_mel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xee6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xed2(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  0xeb6(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freq_mel>:
push   %rax
divsd  0xee7(%rip),%xmm0
addsd  0xee7(%rip),%xmm0
call   1030 <log@plt>
mulsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @freq_mel(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 7.000000e+02
%5 = fadd double %4, 1.000000e+00
%6 = call double @log(double %5)
%7 = fmul double 0x40919C0ABB44E50C, %6
ret double %7
}

LLVM IR (-O2):
define double @freq_mel(double %0) {
%2 = fdiv double %0, 7.000000e+02
%3 = fadd double %2, 1.000000e+00
%4 = tail call double @log(double %3)
%5 = fmul double %4, 0x40919C0ABB44E50C
ret double %5
}
double parse_time_multiplier_string(char *str) {
  switch (str[0]) {
  case 'm':
    return 60;
  case 'h':
    return 3600;
  case 'd':
    return 86400;
  case 'w':
    return 604800;
  }
  return 1;
}


x86 assembly (clang, -O0):
<parse_time_multiplier_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
add    $0xffffff9c,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x13,%eax
ja     117d <parse_time_multiplier_string+0x7d>
mov    -0x18(%rbp),%rax
lea    0xefc(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  0xedb(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    118a <parse_time_multiplier_string+0x8a>
movsd  0xec1(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    118a <parse_time_multiplier_string+0x8a>
movsd  0xea7(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    118a <parse_time_multiplier_string+0x8a>
movsd  0xe8d(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    118a <parse_time_multiplier_string+0x8a>
movsd  0xe9b(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_time_multiplier_string>:
movsbl (%rdi),%eax
add    $0xffffff9c,%eax
cmp    $0x13,%eax
ja     112c <parse_time_multiplier_string+0x2c>
movsd  0xeed(%rip),%xmm0
lea    0xf0e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  0xee5(%rip),%xmm0
ret
movsd  0xeec(%rip),%xmm0
ret
movsd  0xedb(%rip),%xmm0
ret
movsd  0xec2(%rip),%xmm0
ret

LLVM IR (-O0):
define double @parse_time_multiplier_string(i8* %0) {
%2 = alloca double
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
switch i32 %7, label %12 [
i32 109, label %8
i32 104, label %9
i32 100, label %10
i32 119, label %11
]
8: ; preds = %1
store double 6.000000e+01, double* %2
br label %13
9: ; preds = %1
store double 3.600000e+03, double* %2
br label %13
10: ; preds = %1
store double 8.640000e+04, double* %2
br label %13
11: ; preds = %1
store double 6.048000e+05, double* %2
br label %13
12: ; preds = %1
store double 1.000000e+00, double* %2
br label %13
13: ; preds = %12, %11, %10, %9, %8
%14 = load double, double* %2
ret double %14
}

LLVM IR (-O2):
define double @parse_time_multiplier_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
switch i32 %3, label %7 [
i32 109, label %8
i32 104, label %4
i32 100, label %5
i32 119, label %6
]
4: ; preds = %1
br label %8
5: ; preds = %1
br label %8
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %7, %6, %5, %4
%9 = phi double [ 1.000000e+00, %7 ], [ 6.048000e+05, %6 ], [ 8.640000e+04, %5 ], [ 3.600000e+03, %4 ], [ 6.000000e+01, %1 ]
ret double %9
}
/* Type definitions */
struct intel_batchbuffer {
  int dummy;
};

/* Variables and functions */
int reloc_exists(struct intel_batchbuffer *, unsigned int);
int intel_batch_is_reloc(struct intel_batchbuffer *batch, unsigned i) {
  return reloc_exists(batch, i * 4);
}


x86 assembly (clang, -O0):
<intel_batch_is_reloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x2,%esi
call   1030 <reloc_exists@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intel_batch_is_reloc>:
shl    $0x2,%esi
jmp    1030 <reloc_exists@plt>

LLVM IR (-O0):
%struct.intel_batchbuffer = type { i32 }
define i32 @intel_batch_is_reloc(%struct.intel_batchbuffer* %0, i32 %1) {
%3 = alloca %struct.intel_batchbuffer*
%4 = alloca i32
store %struct.intel_batchbuffer* %0, %struct.intel_batchbuffer** %3
store i32 %1, i32* %4
%5 = load %struct.intel_batchbuffer*, %struct.intel_batchbuffer** %3
%6 = load i32, i32* %4
%7 = mul i32 %6, 4
%8 = call i32 @reloc_exists(%struct.intel_batchbuffer* %5, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.intel_batchbuffer = type { i32 }
define i32 @intel_batch_is_reloc(%struct.intel_batchbuffer* %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i32 @reloc_exists(%struct.intel_batchbuffer* %0, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ special_input_activate();
void cmd_insert_special(const char *pf, char **args) {
  special_input_activate();
}


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

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

LLVM IR (-O0):
define void @cmd_insert_special(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = call i32 (...) @special_input_activate()
ret void
}

LLVM IR (-O2):
define void @cmd_insert_special(i8* nocapture readnone %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @special_input_activate()
ret void
}
int test_imm_C0uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0xC0 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C0uint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0xc0,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C0uint64_midword_reg>:
test   $0xc00000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C0uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 12582912
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void _Unwind_VRS_Get() {}


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

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

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

LLVM IR (-O2):
define void @_Unwind_VRS_Get() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int connect_socket(char *, int);
int /*<<< orphan*/ create_block_on_fs(int, int);
int create_block(char *host, int port, int block_id) {
  int sock_id = connect_socket(host, port);
  create_block_on_fs(sock_id, block_id);
  close(sock_id);
  return 1;
}


x86 assembly (clang, -O0):
<create_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <connect_socket@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <create_block_on_fs@plt>
mov    -0x14(%rbp),%edi
call   1050 <close@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_block>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
call   1040 <connect_socket@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %ebx,%esi
call   1030 <create_block_on_fs@plt>
mov    %ebp,%edi
call   1050 <close@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @create_block(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = call i32 @connect_socket(i8* %8, i32 %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = load i32, i32* %6
%13 = call i32 @create_block_on_fs(i32 %11, i32 %12)
%14 = load i32, i32* %7
%15 = call i32 @close(i32 %14)
ret i32 1
}

LLVM IR (-O2):
define i32 @create_block(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @connect_socket(i8* %0, i32 %1)
%5 = tail call i32 @create_block_on_fs(i32 %4, i32 %2)
%6 = tail call i32 @close(i32 %4)
ret i32 1
}
/* Variables and functions */
scalar_t__ chdir(char *);
int /*<<< orphan*/ err_sys(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(void) {
  if (chdir("/tmp") < 0) {
    err_sys("chdir failed.");
  }
  printf("chdir to /tmp succeeded\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <chdir@plt>
cmp    $0x0,%rax
jge    1171 <main+0x31>
lea    0xe99(%rip),%rdi
call   1030 <err_sys@plt>
lea    0xe9b(%rip),%rdi
call   1050 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1050 <chdir@plt>
test   %rax,%rax
jns    115e <main+0x1e>
lea    0xeac(%rip),%rdi
call   1040 <err_sys@plt>
lea    0xeae(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"/tmp\00"
@.str.1 = [14 x i8] c"chdir failed.\00"
@.str.2 = [25 x i8] c"chdir to /tmp succeeded\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @chdir(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @err_sys(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c"/tmp\00"
@.str.1 = [14 x i8] c"chdir failed.\00"
@str = [24 x i8] c"chdir to /tmp succeeded\00"
define i32 @main() {
%1 = tail call i64 @chdir(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @err_sys(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a, aa, aaa;
  scanf("%d", &a);
  aa = a * a;
  aaa = aa * a;
  printf("\n%d", aa);
  printf("\n%d", aaa);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebx
mov    %ebx,%esi
imul   %ebx,%esi
imul   %esi,%ebx
lea    0xeb8(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = mul nsw i32 %9, %10
store i32 %11, i32* %4
%12 = load i32, i32* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %4
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int toupper(char);
bool isXDNA(char c) {
  switch (toupper(c)) {
  case 'A':
  case 'C':
  case 'G':
  case 'T':
  case 'N':
  case 'X':
  case 'R':
  case 'W':
  case '.':
    return true;
  default:
    return false;
  }
}


x86 assembly (clang, -O0):
<isXDNA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <toupper@plt>
mov    %eax,%ecx
mov    %ecx,-0xc(%rbp)
sub    $0x2e,%eax
je     11b4 <isXDNA+0xa4>
jmp    113a <isXDNA+0x2a>
mov    -0xc(%rbp),%eax
sub    $0x41,%eax
je     11b4 <isXDNA+0xa4>
jmp    114b <isXDNA+0x3b>
mov    -0xc(%rbp),%eax
sub    $0x43,%eax
je     11b4 <isXDNA+0xa4>
jmp    115c <isXDNA+0x4c>
mov    -0xc(%rbp),%eax
sub    $0x47,%eax
je     11b4 <isXDNA+0xa4>
jmp    116d <isXDNA+0x5d>
mov    -0xc(%rbp),%eax
sub    $0x4e,%eax
je     11b4 <isXDNA+0xa4>
jmp    117e <isXDNA+0x6e>
mov    -0xc(%rbp),%eax
sub    $0x52,%eax
je     11b4 <isXDNA+0xa4>
jmp    118f <isXDNA+0x7f>
mov    -0xc(%rbp),%eax
sub    $0x54,%eax
je     11b4 <isXDNA+0xa4>
jmp    11a0 <isXDNA+0x90>
mov    -0xc(%rbp),%eax
add    $0xffffffa9,%eax
sub    $0x1,%eax
ja     11c0 <isXDNA+0xb0>
jmp    11b4 <isXDNA+0xa4>
movl   $0x1,-0x4(%rbp)
jmp    11c7 <isXDNA+0xb7>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isXDNA>:
push   %rax
call   1030 <toupper@plt>
mov    %eax,%ecx
add    $0xffffffd2,%ecx
cmp    $0x2a,%ecx
ja     1137 <isXDNA+0x27>
mov    $0x1,%eax
movabs $0x65102280001,%rdx
bt     %rcx,%rdx
jae    1137 <isXDNA+0x27>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isXDNA(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i32 @toupper(i8 signext %4)
switch i32 %5, label %7 [
i32 65, label %6
i32 67, label %6
i32 71, label %6
i32 84, label %6
i32 78, label %6
i32 88, label %6
i32 82, label %6
i32 87, label %6
i32 46, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @isXDNA(i8 signext %0) {
%2 = tail call i32 @toupper(i8 signext %0)
switch i32 %2, label %3 [
i32 65, label %4
i32 67, label %4
i32 71, label %4
i32 84, label %4
i32 78, label %4
i32 88, label %4
i32 82, label %4
i32 87, label %4
i32 46, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ cause_bt();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void fail(const char *msg) {
  fprintf(stderr, "%s\n", msg);
  cause_bt();
  assert(0);
}


x86 assembly (clang, -O0):
<fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeb0(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x0,%al
call   1030 <cause_bt@plt>
xor    %edi,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fail>:
push   %rax
mov    %rdi,%rdx
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
call   1030 <cause_bt@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @fail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @cause_bt()
%7 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @fail(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @cause_bt()
%5 = tail call i32 @assert(i32 0)
ret void
}