xunge/DecIR huggingface dataset:
int isalnumdash(char c) {
  return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') ||
         ('0' <= c && c <= '9') || c == '-' || c == '*';
}


x86 assembly (clang, -O0):
<isalnumdash>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x61,%eax
cmp    %ecx,%eax
jg     112d <isalnumdash+0x2d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    1192 <isalnumdash+0x92>
movsbl -0x1(%rbp),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jg     1150 <isalnumdash+0x50>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    1192 <isalnumdash+0x92>
movsbl -0x1(%rbp),%ecx
mov    $0x30,%eax
cmp    %ecx,%eax
jg     1173 <isalnumdash+0x73>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    1192 <isalnumdash+0x92>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     1192 <isalnumdash+0x92>
movsbl -0x1(%rbp),%eax
cmp    $0x2a,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalnumdash>:
mov    %edi,%ecx
and    $0xdf,%cl
add    $0xbf,%cl
mov    $0x1,%eax
cmp    $0x1a,%cl
jb     1129 <isalnumdash+0x29>
cmp    $0x2d,%dil
je     1129 <isalnumdash+0x29>
lea    -0x30(%rdi),%ecx
cmp    $0xa,%cl
jb     1129 <isalnumdash+0x29>
xor    %eax,%eax
cmp    $0x2a,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @isalnumdash(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 97, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %34, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sle i32 65, %12
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 90
br i1 %17, label %34, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sle i32 48, %20
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 57
br i1 %25, label %34, label %26
26: ; preds = %22, %18
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 45
br i1 %29, label %34, label %30
30: ; preds = %26
%31 = load i8, i8* %2
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 42
br label %34
34: ; preds = %30, %26, %22, %14, %6
%35 = phi i1 [ true, %26 ], [ true, %22 ], [ true, %14 ], [ true, %6 ], [ %33, %30 ]
%36 = zext i1 %35 to i32
ret i32 %36
}

LLVM IR (-O2):
define i32 @isalnumdash(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
br i1 %4, label %13, label %5
5: ; preds = %1
%6 = add i8 %0, -48
%7 = icmp ult i8 %6, 10
%8 = icmp eq i8 %0, 45
%9 = or i1 %8, %7
br i1 %9, label %13, label %10
10: ; preds = %5
%11 = icmp eq i8 %0, 42
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %5, %1, %10
%14 = phi i32 [ %12, %10 ], [ 1, %1 ], [ 1, %5 ]
ret i32 %14
}
/* Variables and functions */
double exp(double);
double AUX2bp2a(double x) { return exp(-x); }


x86 assembly (clang, -O0):
<AUX2bp2a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AUX2bp2a>:
xorps  0xee9(%rip),%xmm0
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @AUX2bp2a(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
%5 = call double @exp(double %4)
ret double %5
}

LLVM IR (-O2):
define double @AUX2bp2a(double %0) {
%2 = fneg double %0
%3 = tail call double @exp(double %2)
ret double %3
}
void border_sw_ext_diagonal_special_sand_long_vert(unsigned char *pic,
                                                   unsigned char *mirr) {
  *pic = 0x2F;
  *mirr = 0x01;
}


x86 assembly (clang, -O0):
<border_sw_ext_diagonal_special_sand_long_vert>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x2f,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<border_sw_ext_diagonal_special_sand_long_vert>:
movb   $0x2f,(%rdi)
movb   $0x1,(%rsi)
ret

LLVM IR (-O0):
define void @border_sw_ext_diagonal_special_sand_long_vert(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
store i8 47, i8* %5
%6 = load i8*, i8** %4
store i8 1, i8* %6
ret void
}

LLVM IR (-O2):
define void @border_sw_ext_diagonal_special_sand_long_vert(i8* nocapture writeonly %0, i8* nocapture writeonly %1) {
store i8 47, i8* %0
store i8 1, i8* %1
ret void
}
/* Variables and functions */
int libc_write(int, char *, size_t);
void writeLongcard(long unsigned int c) {
  char ch;
  int i;
  if (c > 9) {
    writeLongcard(c / 10);
    writeLongcard(c % 10);
  } else {
    ch = ((char)(((unsigned int)('0')) + ((unsigned int)(c))));
    i = libc_write(1, &ch, (size_t)1);
  }
}


x86 assembly (clang, -O0):
<writeLongcard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x9,-0x8(%rbp)
jbe    1168 <writeLongcard+0x48>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rdi
call   1040 <writeLongcard@plt>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,%rdi
call   1040 <writeLongcard@plt>
jmp    1188 <writeLongcard+0x68>
mov    -0x8(%rbp),%rax
add    $0x30,%eax
mov    %al,-0x9(%rbp)
mov    $0x1,%edi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <libc_write@plt>
mov    %eax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeLongcard>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
cmp    $0xa,%rdi
jb     1165 <writeLongcard+0x45>
movabs $0xcccccccccccccccd,%rcx
cc cc cc
mov    %rbx,%rax
mul    %rcx
mov    %rdx,%r14
shr    $0x3,%r14
mov    %r14,%rdi
call   1040 <writeLongcard@plt>
add    %r14,%r14
lea    (%r14,%r14,4),%rax
sub    %rax,%rbx
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <writeLongcard@plt>
add    $0x30,%bl
mov    %bl,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
mov    $0x1,%edi
call   1030 <libc_write@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @writeLongcard(i64 %0) {
%2 = alloca i64
%3 = alloca i8
%4 = alloca i32
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = icmp ugt i64 %5, 9
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i64, i64* %2
%9 = udiv i64 %8, 10
%10 = load i64, i64* %2
%11 = urem i64 %10, 10
br label %18
12: ; preds = %1
%13 = load i64, i64* %2
%14 = trunc i64 %13 to i32
%15 = add i32 48, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %3
%17 = call i32 @libc_write(i32 1, i8* %3, i64 1)
store i32 %17, i32* %4
br label %18
18: ; preds = %12, %7
ret void
}

LLVM IR (-O2):
define void @writeLongcard(i64 %0) {
%2 = alloca i8
%3 = icmp ugt i64 %0, 9
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = udiv i64 %0, 10
tail call void @writeLongcard(i64 %5)
%6 = urem i64 %0, 10
tail call void @writeLongcard(i64 %6)
br label %11
7: ; preds = %1
%8 = trunc i64 %0 to i8
%9 = add nuw nsw i8 %8, 48
store i8 %9, i8* %2
%10 = call i32 @libc_write(i32 1, i8* %2, i64 1)
br label %11
11: ; preds = %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: mph [-a] [-m maxlen] [-l] [-d (2|3)] "
                  "[-c x.y] [-s|-S seed]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [67 x i8] c"usage: mph [-a] [-m maxlen] [-l] [-d (2|3)] [-c x.y] [-s|-S seed]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [67 x i8] c"usage: mph [-a] [-m maxlen] [-l] [-d (2|3)] [-c x.y] [-s|-S seed]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void build_so_lib_list() {}


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

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

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

LLVM IR (-O2):
define void @build_so_lib_list() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ serial_puts(char *);
void spinner(void) {
  serial_puts("Spinning\n");
  for (;;) {
  }
}


x86 assembly (clang, -O0):
<spinner>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <serial_puts@plt>
jmp    1120 <spinner+0x10>

x86 assembly (clang, -O2):
<spinner>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <serial_puts@plt>
nopl   (%rax)
jmp    1120 <spinner+0x10>

LLVM IR (-O0):
@.str = [10 x i8] c"Spinning\0A\00"
define void @spinner() {
%1 = call i32 @serial_puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}

LLVM IR (-O2):
@.str = [10 x i8] c"Spinning\0A\00"
define void @spinner() {
%1 = tail call i32 @serial_puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}
int fib(int n) {
  int cur = 1, prev = 0;
  while (n--) {
    int next = prev + cur;
    prev = cur;
    cur = next;
  }
  return prev;
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1143 <fib+0x43>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <fib+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
test   %edi,%edi
je     111a <fib+0x1a>
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
and    $0x7,%ecx
cmp    $0x7,%eax
jae    111d <fib+0x1d>
mov    $0x1,%edx
xor    %esi,%esi
jmp    1145 <fib+0x45>
xor    %eax,%eax
ret
and    $0xfffffff8,%edi
mov    $0x1,%edx
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
add    %edx,%esi
add    %esi,%edx
add    %edx,%esi
add    %esi,%edx
add    %edx,%esi
add    %esi,%edx
add    %edx,%esi
add    %esi,%edx
add    $0xfffffff8,%edi
jne    1130 <fib+0x30>
mov    %esi,%eax
test   %ecx,%ecx
je     115d <fib+0x5d>
nopl   0x0(%rax,%rax,1)
mov    %edx,%eax
mov    %esi,%edx
add    %eax,%edx
mov    %eax,%esi
add    $0xffffffff,%ecx
jne    1150 <fib+0x50>
ret

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %35, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = and i32 %0, 7
%6 = icmp ult i32 %4, 7
br i1 %6, label %23, label %7
7: ; preds = %3
%8 = and i32 %0, -8
br label %9
9: ; preds = %9, %7
%10 = phi i32 [ 0, %7 ], [ %19, %9 ]
%11 = phi i32 [ 1, %7 ], [ %20, %9 ]
%12 = phi i32 [ 0, %7 ], [ %21, %9 ]
%13 = add nsw i32 %10, %11
%14 = add nsw i32 %11, %13
%15 = add nsw i32 %13, %14
%16 = add nsw i32 %14, %15
%17 = add nsw i32 %15, %16
%18 = add nsw i32 %16, %17
%19 = add nsw i32 %17, %18
%20 = add nsw i32 %18, %19
%21 = add i32 %12, 8
%22 = icmp eq i32 %21, %8
br i1 %22, label %23, label %9
23: ; preds = %9, %3
%24 = phi i32 [ undef, %3 ], [ %19, %9 ]
%25 = phi i32 [ 0, %3 ], [ %19, %9 ]
%26 = phi i32 [ 1, %3 ], [ %20, %9 ]
%27 = icmp eq i32 %5, 0
br i1 %27, label %35, label %28
28: ; preds = %23, %28
%29 = phi i32 [ %30, %28 ], [ %25, %23 ]
%30 = phi i32 [ %32, %28 ], [ %26, %23 ]
%31 = phi i32 [ %33, %28 ], [ 0, %23 ]
%32 = add nsw i32 %29, %30
%33 = add i32 %31, 1
%34 = icmp eq i32 %33, %5
br i1 %34, label %35, label %28
35: ; preds = %23, %28, %1
%36 = phi i32 [ 0, %1 ], [ %24, %23 ], [ %30, %28 ]
ret i32 %36
}
/* Variables and functions */
int getchar();
int /*<<< orphan*/ putchar(int);
main(void) {
  int c;
  c = getchar();
  while (c != '\n') {
    putchar(c);
    c = getchar();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
je     115a <main+0x3a>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
jmp    1139 <main+0x19>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%eax
je     1145 <main+0x25>
mov    %eax,%edi
call   1030 <putchar@plt>
jmp    1130 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = icmp eq i32 %1, 10
br i1 %2, label %8, label %3
3: ; preds = %0, %3
%4 = phi i32 [ %6, %3 ], [ %1, %0 ]
%5 = tail call i32 @putchar(i32 %4)
%6 = tail call i32 (...) @getchar()
%7 = icmp eq i32 %6, 10
br i1 %7, label %8, label %3
8: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_array();
int /*<<< orphan*/ test_boolean();
int /*<<< orphan*/ test_dotget_clone();
int /*<<< orphan*/ test_null();
int /*<<< orphan*/ test_number();
int /*<<< orphan*/ test_object();
int /*<<< orphan*/ test_parser();
int /*<<< orphan*/ test_string();
int /*<<< orphan*/ test_write();
int main(int argc, char **argv) {
  test_string();
  test_number();
  test_boolean();
  test_null();
  test_object();
  test_array();
  test_dotget_clone();
  test_write();
  test_parser();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <test_string@plt>
mov    $0x0,%al
call   1080 <test_number@plt>
mov    $0x0,%al
call   10b0 <test_boolean@plt>
mov    $0x0,%al
call   1050 <test_null@plt>
mov    $0x0,%al
call   1070 <test_object@plt>
mov    $0x0,%al
call   1090 <test_array@plt>
mov    $0x0,%al
call   1040 <test_dotget_clone@plt>
mov    $0x0,%al
call   1030 <test_write@plt>
mov    $0x0,%al
call   10a0 <test_parser@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <test_string@plt>
xor    %eax,%eax
call   1080 <test_number@plt>
xor    %eax,%eax
call   10b0 <test_boolean@plt>
xor    %eax,%eax
call   1050 <test_null@plt>
xor    %eax,%eax
call   1070 <test_object@plt>
xor    %eax,%eax
call   1090 <test_array@plt>
xor    %eax,%eax
call   1040 <test_dotget_clone@plt>
xor    %eax,%eax
call   1030 <test_write@plt>
xor    %eax,%eax
call   10a0 <test_parser@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test_string()
%7 = call i32 (...) @test_number()
%8 = call i32 (...) @test_boolean()
%9 = call i32 (...) @test_null()
%10 = call i32 (...) @test_object()
%11 = call i32 (...) @test_array()
%12 = call i32 (...) @test_dotget_clone()
%13 = call i32 (...) @test_write()
%14 = call i32 (...) @test_parser()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_string()
%4 = tail call i32 (...) @test_number()
%5 = tail call i32 (...) @test_boolean()
%6 = tail call i32 (...) @test_null()
%7 = tail call i32 (...) @test_object()
%8 = tail call i32 (...) @test_array()
%9 = tail call i32 (...) @test_dotget_clone()
%10 = tail call i32 (...) @test_write()
%11 = tail call i32 (...) @test_parser()
ret i32 0
}
void ttttt(void) {
  int i;
  float temp = 0.0;
  for (i = 0; i < 10000; i++)
    temp += 5.0;
}


x86 assembly (clang, -O0):
<ttttt>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x2710,-0x4(%rbp)
jge    114c <ttttt+0x4c>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xecf(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1113 <ttttt+0x13>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ttttt() {
%1 = alloca i32
%2 = alloca float
store float 0.000000e+00, float* %2
store i32 0, i32* %1
br label %3
3: ; preds = %11, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 10000
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fadd double %8, 5.000000e+00
%10 = fptrunc double %9 to float
store float %10, float* %2
br label %11
11: ; preds = %6
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
store i32 %13, i32* %1
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @ttttt() {
ret void
}
int libopenal_symbol_is_present(char *s) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @libopenal_symbol_is_present(i8* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, unsigned int,
                         int /*<<< orphan*/);
unsigned int ftell(int /*<<< orphan*/ *);
unsigned int getlen(FILE *f) {
  unsigned int len;
  unsigned int curpos = ftell(f);
  fseek(f, 0, SEEK_END);
  len = ftell(f);
  fseek(f, curpos, SEEK_SET);
  return len;
}


x86 assembly (clang, -O0):
<getlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    0x2e72(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getlen>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %eax,%r14d
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %eax,%ebp
mov    0x2e85(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14d,%esi
call   1040 <fseek@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @getlen(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @ftell(i32* %5)
store i32 %6, i32* %4
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i32 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i32 @ftell(i32* %10)
store i32 %11, i32* %3
%12 = load i32*, i32** %2
%13 = load i32, i32* %4
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i32 %13, i32 %14)
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @getlen(i32* nocapture %0) {
%2 = tail call i32 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i32 0, i32 %3)
%5 = tail call i32 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i32 %2, i32 %6)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ graphicsoff();
int /*<<< orphan*/ killsound();
int /*<<< orphan*/ restorekeyb();
int /*<<< orphan*/ soundkillglob();
int /*<<< orphan*/ soundoff();
void finish(void) {
  killsound();
  soundoff();
  soundkillglob();
  restorekeyb();
  graphicsoff();
}


x86 assembly (clang, -O0):
<finish>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <killsound@plt>
mov    $0x0,%al
call   1030 <soundoff@plt>
mov    $0x0,%al
call   1060 <soundkillglob@plt>
mov    $0x0,%al
call   1070 <restorekeyb@plt>
mov    $0x0,%al
call   1050 <graphicsoff@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<finish>:
push   %rax
xor    %eax,%eax
call   1040 <killsound@plt>
xor    %eax,%eax
call   1030 <soundoff@plt>
xor    %eax,%eax
call   1060 <soundkillglob@plt>
xor    %eax,%eax
call   1070 <restorekeyb@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <graphicsoff@plt>

LLVM IR (-O0):
define void @finish() {
%1 = call i32 (...) @killsound()
%2 = call i32 (...) @soundoff()
%3 = call i32 (...) @soundkillglob()
%4 = call i32 (...) @restorekeyb()
%5 = call i32 (...) @graphicsoff()
ret void
}

LLVM IR (-O2):
define void @finish() {
%1 = tail call i32 (...) @killsound()
%2 = tail call i32 (...) @soundoff()
%3 = tail call i32 (...) @soundkillglob()
%4 = tail call i32 (...) @restorekeyb()
%5 = tail call i32 (...) @graphicsoff()
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_rdev;
};
typedef int /*<<< orphan*/ dev_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
scalar_t__ stat(char const *, struct stat *);
int /*<<< orphan*/ stderr;
dev_t misc_device_rdev(const char *device) {
  struct stat st;
  if (stat(device, &st) == 0)
    return st.st_rdev;
  fprintf(stderr, "Stat of the device '%s' failed.", device);
  exit(8);
}


x86 assembly (clang, -O0):
<misc_device_rdev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jne    115c <misc_device_rdev+0x2c>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe90(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x8,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<misc_device_rdev>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
call   1040 <stat@plt>
test   %rax,%rax
jne    1151 <misc_device_rdev+0x21>
mov    0x8(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
lea    0xe9f(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x8,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
@stderr = global i32 0
@.str = [32 x i8] c"Stat of the device '%s' failed.\00"
define i32 @misc_device_rdev(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%9 = load i32, i32* %8
ret i32 %9
10: ; preds = %1
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %2
%13 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @exit(i32 8)
unreachable
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@stderr = global i32 0
@.str = [32 x i8] c"Stat of the device '%s' failed.\00"
define i32 @misc_device_rdev(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
ret i32 %8
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
%12 = call i32 @exit(i32 8)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ command_loop(int, int /*<<< orphan*/);
void _io_command_loop(int a) { command_loop(a, 0); }


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

x86 assembly (clang, -O2):
<_io_command_loop>:
xor    %esi,%esi
jmp    1030 <command_loop@plt>

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

LLVM IR (-O2):
define void @_io_command_loop(i32 %0) {
%2 = tail call i32 @command_loop(i32 %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fz_trace_end_group(void *user) { printf("</group>\n"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"</group>\0A\00"
define void @fz_trace_end_group(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [9 x i8] c"</group>\00"
define void @fz_trace_end_group(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *cpuidfunc();
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *spValue;
  spValue = cpuidfunc();
  printf("The CPUID is: '%s'\n", spValue);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <cpuidfunc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <cpuidfunc@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"The CPUID is: '%s'\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* (...) @cpuidfunc()
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"The CPUID is: '%s'\0A\00"
define i32 @main() {
%1 = tail call i8* (...) @cpuidfunc()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
unsigned int f66(unsigned int x, unsigned long int y) {
  return (x << y) + (x >> (8 * 4 - y));
}


x86 assembly (clang, -O0):
<f66>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x10(%rbp),%rcx
shr    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f66>:
mov    %rsi,%rcx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f66(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = trunc i64 %6 to i32
%8 = shl i32 %5, %7
%9 = load i32, i32* %3
%10 = load i64, i64* %4
%11 = sub i64 32, %10
%12 = trunc i64 %11 to i32
%13 = lshr i32 %9, %12
%14 = add i32 %8, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @f66(i32 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = shl i32 %0, %3
%5 = sub i32 32, %3
%6 = lshr i32 %0, %5
%7 = add i32 %6, %4
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ closelog();
void _popeye_log_close(void) {
  closelog();
  return;
}


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

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

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

LLVM IR (-O2):
define void @_popeye_log_close() {
%1 = tail call i32 (...) @closelog()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t const);
size_t strlen(char const *);
char *stpcpy(char *restrict dst, const char *restrict src) {
  const size_t length = strlen(src);
  memcpy(dst, src, length + 1);
  return dst + length;
}


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

x86 assembly (clang, -O2):
<stpcpy>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rax,%r15
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <memcpy@plt>
add    %r15,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @stpcpy(i8* noalias %0, i8* noalias %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %5
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = load i64, i64* %5
%11 = add i64 %10, 1
%12 = call i32 @memcpy(i8* %8, i8* %9, i64 %11)
%13 = load i8*, i8** %3
%14 = load i64, i64* %5
%15 = getelementptr inbounds i8, i8* %13, i64 %14
ret i8* %15
}

LLVM IR (-O2):
define i8* @stpcpy(i8* noalias %0, i8* noalias %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add i64 %3, 1
%5 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %4)
%6 = getelementptr inbounds i8, i8* %0, i64 %3
ret i8* %6
}
void foo_2_1_1_1_1_1_2_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_1_1_1_2_2_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2C_SLAVE;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
scalar_t__ ioctl(int, int /*<<< orphan*/, int);
int /*<<< orphan*/ stderr;
void selectDevice(int i2c, int addr, char *name) {
  if (ioctl(i2c, I2C_SLAVE, addr) < 0) {
    fprintf(stderr, "%s not present\n", name);
  }
}


x86 assembly (clang, -O0):
<selectDevice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
jge    1169 <selectDevice+0x49>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe9c(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<selectDevice>:
push   %rbx
mov    %rdx,%rbx
mov    %esi,%edx
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
test   %rax,%rax
js     113b <selectDevice+0x1b>
pop    %rbx
ret
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <fprintf@plt>

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

LLVM IR (-O2):
@I2C_SLAVE = global i32 0
@stderr = global i32 0
@.str = [16 x i8] c"%s not present\0A\00"
define void @selectDevice(i32 %0, i32 %1, i8* %2) {
%4 = load i32, i32* @I2C_SLAVE
%5 = tail call i64 @ioctl(i32 %0, i32 %4, i32 %1)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %10
10: ; preds = %7, %3
ret void
}
void space(int num, int a[], int n) {
  int i = 0;
  while (num != 0) {
    a[i] = num % 10;
    i++;
    num = num / 10;
  }
}


x86 assembly (clang, -O0):
<space>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1151 <space+0x51>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1115 <space+0x15>
pop    %rbp
ret

x86 assembly (clang, -O2):
<space>:
test   %edi,%edi
je     113f <space+0x3f>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movslq %edi,%rax
imul   $0x66666667,%rax,%rdi
mov    %rdi,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rdi
add    %ecx,%edi
lea    (%rdi,%rdi,1),%ecx
lea    (%rcx,%rcx,4),%ecx
mov    %eax,%edx
sub    %ecx,%edx
mov    %edx,(%rsi)
add    $0x9,%eax
add    $0x4,%rsi
cmp    $0x12,%eax
ja     1110 <space+0x10>
ret

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

LLVM IR (-O2):
define void @space(i32 %0, i32* nocapture writeonly %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %14, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %10, %5 ], [ 0, %3 ]
%7 = phi i32 [ %11, %5 ], [ %0, %3 ]
%8 = srem i32 %7, 10
%9 = getelementptr inbounds i32, i32* %1, i64 %6
store i32 %8, i32* %9
%10 = add nuw i64 %6, 1
%11 = sdiv i32 %7, 10
%12 = add i32 %7, 9
%13 = icmp ult i32 %12, 19
br i1 %13, label %14, label %5
14: ; preds = %5, %3
ret void
}
/* Variables and functions */
double DSlater_1S_5S(double, double, double);
double DSlater_5S_1S(double rij, double xii, double xij) {
  return DSlater_1S_5S(rij, xij, xii);
}


x86 assembly (clang, -O0):
<DSlater_5S_1S>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
call   1030 <DSlater_1S_5S@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DSlater_5S_1S>:
movaps %xmm1,%xmm3
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
jmp    1030 <DSlater_1S_5S@plt>

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

LLVM IR (-O2):
define double @DSlater_5S_1S(double %0, double %1, double %2) {
%4 = tail call double @DSlater_1S_5S(double %0, double %2, double %1)
ret double %4
}
/* Variables and functions */
float atan2(float const, float const);
float afe_phi_of_accel(const float *accel) { return atan2(accel[1], accel[2]); }


x86 assembly (clang, -O0):
<afe_phi_of_accel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm1
call   1030 <atan2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<afe_phi_of_accel>:
movss  0x4(%rdi),%xmm0
movss  0x8(%rdi),%xmm1
jmp    1030 <atan2@plt>

LLVM IR (-O0):
define float @afe_phi_of_accel(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 1
%5 = load float, float* %4
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 2
%8 = load float, float* %7
%9 = call float @atan2(float %5, float %8)
ret float %9
}

LLVM IR (-O2):
define float @afe_phi_of_accel(float* nocapture %0) {
%2 = getelementptr inbounds float, float* %0, i64 1
%3 = load float, float* %2
%4 = getelementptr inbounds float, float* %0, i64 2
%5 = load float, float* %4
%6 = tail call float @atan2(float %3, float %5)
ret float %6
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
int set_reg32(uint32_t base, uint8_t reg, uint32_t value) {
  if (base == 0)
    return -1;
  *(uint32_t *)(base + reg) = value;
  return 0;
}


x86 assembly (clang, -O0):
<set_reg32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1127 <set_reg32+0x27>
movl   $0xffffffff,-0x4(%rbp)
jmp    113d <set_reg32+0x3d>
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_reg32>:
test   %rdi,%rdi
je     110c <set_reg32+0xc>
mov    %rdx,(%rsi,%rdi,1)
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @set_reg32(i64 %0, i64 %1, i64 %2) {
%4 = icmp eq i64 %0, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = add nsw i64 %1, %0
%7 = inttoptr i64 %6 to i64*
store i64 %2, i64* %7
br label %8
8: ; preds = %3, %5
%9 = phi i32 [ 0, %5 ], [ -1, %3 ]
ret i32 %9
}
int toascii(int c) { return ((c)&0x7f); }


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

x86 assembly (clang, -O2):
<toascii>:
mov    %edi,%eax
and    $0x7f,%eax
ret

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

LLVM IR (-O2):
define i32 @toascii(i32 %0) {
%2 = and i32 %0, 127
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ countWords(char const *const);
int /*<<< orphan*/ free(char *const);
int /*<<< orphan*/ ranInt(int /*<<< orphan*/);
char *searchWord(char const *const, int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(char *const, char *const);
char *ranWord(const char *const filename, char *const word) {
  char *const re = searchWord(filename, ranInt(countWords(filename)));
  strcpy(word, re);
  free(re);
  return word;
}


x86 assembly (clang, -O0):
<ranWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <countWords@plt>
mov    %eax,%edi
call   1070 <ranInt@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1060 <searchWord@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ranWord>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <countWords@plt>
mov    %eax,%edi
call   1070 <ranInt@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <searchWord@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @ranWord(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @countWords(i8* %7)
%9 = call i32 @ranInt(i32 %8)
%10 = call i8* @searchWord(i8* %6, i32 %9)
store i8* %10, i8** %5
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = call i32 @strcpy(i8* %11, i8* %12)
%14 = load i8*, i8** %5
%15 = call i32 @free(i8* %14)
%16 = load i8*, i8** %4
ret i8* %16
}

LLVM IR (-O2):
define i8* @ranWord(i8* %0, i8* returned %1) {
%3 = tail call i32 @countWords(i8* %0)
%4 = tail call i32 @ranInt(i32 %3)
%5 = tail call i8* @searchWord(i8* %0, i32 %4)
%6 = tail call i32 @strcpy(i8* %1, i8* %5)
%7 = tail call i32 @free(i8* %5)
ret i8* %1
}
void *cpy_swallow(void *ptr) { return ptr; }


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

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

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

LLVM IR (-O2):
define i8* @cpy_swallow(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
char getchar();
int uart0_getc() {
  char c;
  c = getchar();
  return c;
}


x86 assembly (clang, -O0):
<uart0_getc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart0_getc>:
push   %rax
xor    %eax,%eax
call   1030 <getchar@plt>
movsbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @uart0_getc() {
%1 = alloca i8
%2 = call signext i8 (...) @getchar()
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @uart0_getc() {
%1 = tail call signext i8 (...) @getchar()
%2 = sext i8 %1 to i32
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ wctrans_t;

/* Variables and functions */
wint_t towctrans(wint_t c, wctrans_t desc) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @towctrans(i32 %0, i32 %1) {
ret i32 0
}
void fatexec(char *ins) {}


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

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

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

LLVM IR (-O2):
define void @fatexec(i8* nocapture %0) {
ret void
}
int foo(void) {
  int a, b, c;
  asm("# Magic instruction" : "=r"(a) : "r"(0) : "eax", "memory");
  asm("# Magic instruction" : "=r"(b) : "r"(0) : "edx", "memory");
  asm("# Magic instruction" : "=r"(c) : "r"(0) : "ecx", "memory");
  return a + b + c;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
xor    %ecx,%ecx
mov    %ecx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %esi,%esi
add    %ecx,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 asm "# Magic instruction", "=r,r,~{eax},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 0)
store i32 %4, i32* %1
%5 = call i32 asm "# Magic instruction", "=r,r,~{edx},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 0)
store i32 %5, i32* %2
%6 = call i32 asm "# Magic instruction", "=r,r,~{ecx},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 0)
store i32 %6, i32* %3
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = add nsw i32 %7, %8
%10 = load i32, i32* %3
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 asm "# Magic instruction", "=r,r,~{eax},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 0)
%2 = tail call i32 asm "# Magic instruction", "=r,r,~{edx},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 0)
%3 = tail call i32 asm "# Magic instruction", "=r,r,~{ecx},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 0)
%4 = add nsw i32 %2, %1
%5 = add nsw i32 %4, %3
ret i32 %5
}