xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *_strtime(char *s) {
  time_t now;
  time(&now);
  strftime(s, 9, "%T", localtime(&now));
  return s;
}


x86 assembly (clang, -O0):
<_strtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <time@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%ecx
mov    $0x9,%esi
lea    0xe98(%rip),%rdx
call   1050 <strftime@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_strtime>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <time@plt>
mov    %r14,%rdi
call   1030 <localtime@plt>
lea    0xead(%rip),%rdx
mov    %rbx,%rdi
mov    $0x9,%esi
mov    %eax,%ecx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%T\00"
define i8* @_strtime(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @time(i32* %3)
%5 = load i8*, i8** %2
%6 = call i32 @localtime(i32* %3)
%7 = call i32 @strftime(i8* %5, i32 9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%T\00"
define i8* @_strtime(i8* returned %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @time(i32* %2)
%5 = call i32 @localtime(i32* %2)
%6 = call i32 @strftime(i8* %0, i32 9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i8* %0
}
/* Variables and functions */
unsigned char *cbor_write_pint(unsigned char *, unsigned int, unsigned int);
unsigned char *cbor_write_uint(unsigned char *data, unsigned int size,
                               unsigned int value) {
  return cbor_write_pint(data, size, value);
}


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

x86 assembly (clang, -O2):
<cbor_write_uint>:
jmp    1030 <cbor_write_pint@plt>

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

LLVM IR (-O2):
define i8* @cbor_write_uint(i8* %0, i32 %1, i32 %2) {
%4 = tail call i8* @cbor_write_pint(i8* %0, i32 %1, i32 %2)
ret i8* %4
}
void cons2prim_finalize(double *prim, const double *x) {}


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

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

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

LLVM IR (-O2):
define void @cons2prim_finalize(double* nocapture %0, double* nocapture %1) {
ret void
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int read(int, void *, int);
ssize_t readln(int fildes, void *buf, size_t nbyte) {
  int p = 0, r;
  while ((((r = read(fildes, buf, 1)) > 0)) && buf != '\n') {
  }
  return r == 1 ? p + 1 : 0;
}


x86 assembly (clang, -O0):
<readln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
mov    %eax,%ecx
mov    %ecx,-0x20(%rbp)
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x21(%rbp)
jle    115d <readln+0x4d>
mov    $0xa,%eax
cmp    %rax,-0x10(%rbp)
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    116d <readln+0x5d>
jmp    1172 <readln+0x62>
jmp    112a <readln+0x1a>
cmpl   $0x1,-0x20(%rbp)
jne    118a <readln+0x7a>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1194 <readln+0x84>
xor    %eax,%eax
mov    %eax,-0x28(%rbp)
jmp    1194 <readln+0x84>
mov    -0x28(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readln>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0xa,%rbx
je     1139 <readln+0x29>
test   %eax,%eax
jg     1120 <readln+0x10>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @readln(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
store i32 0, i32* %7
br label %9
9: ; preds = %19, %3
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = call i32 @read(i32 %10, i8* %11, i32 1)
store i32 %12, i32* %8
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = load i8*, i8** %5
%16 = icmp ne i8* %15, inttoptr (i64 10 to i8*)
br label %17
17: ; preds = %14, %9
%18 = phi i1 [ false, %9 ], [ %16, %14 ]
br i1 %18, label %19, label %20
19: ; preds = %17
br label %9
20: ; preds = %17
%21 = load i32, i32* %8
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 1
br label %27
26: ; preds = %20
br label %27
27: ; preds = %26, %23
%28 = phi i32 [ %25, %23 ], [ 0, %26 ]
ret i32 %28
}

LLVM IR (-O2):
define i32 @readln(i32 %0, i8* %1, i64 %2) {
%4 = icmp ne i8* %1, inttoptr (i64 10 to i8*)
br label %5
5: ; preds = %5, %3
%6 = tail call i32 @read(i32 %0, i8* %1, i32 1)
%7 = icmp sgt i32 %6, 0
%8 = and i1 %4, %7
br i1 %8, label %5, label %9
9: ; preds = %5
%10 = icmp eq i32 %6, 1
%11 = zext i1 %10 to i32
ret i32 %11
}
int main() {
  unsigned int ui;
  ui = 0x55555555;
  ui = 0xAAAAAAAA;
  ui = 0x00000000;
  ui = 0xFFFFFFFF;
  ui = 0x80000000;
  ui = 0x00000001;
  ui = 0x7FFFFFFF;
  ui = 0xFFFFFFFE;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x55555555,-0x8(%rbp)
movl   $0xaaaaaaaa,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movl   $0x80000000,-0x8(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x7fffffff,-0x8(%rbp)
movl   $0xfffffffe,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1431655765, i32* %2
store i32 -1431655766, i32* %2
store i32 0, i32* %2
store i32 -1, i32* %2
store i32 -2147483648, i32* %2
store i32 1, i32* %2
store i32 2147483647, i32* %2
store i32 -2, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void i2d_PUBKEY(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_PUBKEY() {
ret void
}
signed long long f37(signed long long v_foo) {
  signed long long v_and = v_foo & -25;
  signed long long v_shl = ((unsigned long long)v_and) >> 1;
  return v_shl;
}


x86 assembly (clang, -O0):
<f37>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffffffffffffffe7,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f37>:
mov    %rdi,%rax
shr    %rax
and    $0xfffffffffffffff3,%rax
ret

LLVM IR (-O0):
define i64 @f37(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = and i64 %5, -25
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = lshr i64 %7, 1
store i64 %8, i64* %4
%9 = load i64, i64* %4
ret i64 %9
}

LLVM IR (-O2):
define i64 @f37(i64 %0) {
%2 = lshr i64 %0, 1
%3 = and i64 %2, 9223372036854775795
ret i64 %3
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR90_get(void) { return U_WMRCORENONE_get("U_WMR90"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR90\00"
define i32 @U_WMR90_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR90\00"
define i32 @U_WMR90_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void foo148(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo148(i32 %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ u_char;

/* Variables and functions */
u_char *ngx_strlchr(u_char *p, u_char *last, u_char c) {
  while (p < last) {
    if (*p == c) {
      return p;
    }
    p++;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<ngx_strlchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    114d <ngx_strlchr+0x4d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmp    -0x20(%rbp),%rax
jne    113c <ngx_strlchr+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1155 <ngx_strlchr+0x55>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <ngx_strlchr+0x10>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ngx_strlchr>:
cmp    %rsi,%rdi
jae    111e <ngx_strlchr+0x1e>
mov    %rdi,%rax
nopl   0x0(%rax,%rax,1)
cmp    %rdx,(%rax)
je     1120 <ngx_strlchr+0x20>
add    $0x8,%rax
cmp    %rsi,%rax
jb     1110 <ngx_strlchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64* @ngx_strlchr(i64* %0, i64* readnone %1, i64 %2) {
%4 = icmp ult i64* %0, %1
br i1 %4, label %5, label %12
5: ; preds = %3, %9
%6 = phi i64* [ %10, %9 ], [ %0, %3 ]
%7 = load i64, i64* %6
%8 = icmp eq i64 %7, %2
br i1 %8, label %12, label %9
9: ; preds = %5
%10 = getelementptr inbounds i64, i64* %6, i64 1
%11 = icmp ult i64* %10, %1
br i1 %11, label %5, label %12
12: ; preds = %5, %9, %3
%13 = phi i64* [ null, %3 ], [ null, %9 ], [ %6, %5 ]
ret i64* %13
}
/* Variables and functions */
scalar_t__ isspace(char const);
const char *pi_template_skip_white(const char *pch, const char chDelim) {
  while (isspace(*pch) || chDelim == *pch) {
    pch++;
  }
  return pch;
}


x86 assembly (clang, -O0):
<pi_template_skip_white>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xa(%rbp)
jne    1153 <pi_template_skip_white+0x43>
movsbl -0x9(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
test   $0x1,%al
jne    1163 <pi_template_skip_white+0x53>
jmp    1174 <pi_template_skip_white+0x64>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1122 <pi_template_skip_white+0x12>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pi_template_skip_white>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
jmp    1124 <pi_template_skip_white+0x14>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
movsbl (%rbx),%edi
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <pi_template_skip_white+0x10>
cmp    %bpl,(%rbx)
je     1120 <pi_template_skip_white+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @pi_template_skip_white(i8* %0, i8 signext %1) {
br label %3
3: ; preds = %11, %2
%4 = phi i8* [ %0, %2 ], [ %12, %11 ]
%5 = load i8, i8* %4
%6 = tail call i64 @isspace(i8 signext %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i8, i8* %4
%10 = icmp eq i8 %9, %1
br i1 %10, label %11, label %13
11: ; preds = %3, %8
%12 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
13: ; preds = %8
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ vx86_NBSB_Write16(int, unsigned char, unsigned short);
void sb1_Write16(unsigned char offset, unsigned short val) {
  vx86_NBSB_Write16(3, offset, val);
}


x86 assembly (clang, -O0):
<sb1_Write16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x1(%rbp),%al
mov    $0x3,%edi
movzbl %al,%esi
movzwl -0x4(%rbp),%edx
call   1030 <vx86_NBSB_Write16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sb1_Write16>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0x3,%edi
jmp    1030 <vx86_NBSB_Write16@plt>

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

LLVM IR (-O2):
define void @sb1_Write16(i8 zeroext %0, i16 zeroext %1) {
%3 = tail call i32 @vx86_NBSB_Write16(i32 3, i8 zeroext %0, i16 zeroext %1)
ret void
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn89() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn89");
  return result;
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"fn89\00"
define i8* @fn89() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int Msleep(int nargs, int *args) { sleep(args[0]); }


x86 assembly (clang, -O0):
<Msleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <sleep@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Msleep>:
mov    (%rsi),%edi
jmp    1030 <sleep@plt>

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

LLVM IR (-O2):
define i32 @Msleep(i32 %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i32 @sleep(i32 %3)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *asctime(int /*<<< orphan*/);
int /*<<< orphan*/ localtime(int /*<<< orphan*/ const *);
char *ctime(const time_t *clk) { return asctime(localtime(clk)); }


x86 assembly (clang, -O0):
<ctime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <localtime@plt>
mov    %eax,%edi
call   1040 <asctime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctime>:
push   %rax
call   1030 <localtime@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <asctime@plt>

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

LLVM IR (-O2):
define i8* @ctime(i32* %0) {
%2 = tail call i32 @localtime(i32* %0)
%3 = tail call i8* @asctime(i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
char *quoted(char *target, char *source) {
  sprintf(target, "'%s'", source);
  return target;
}


x86 assembly (clang, -O0):
<quoted>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quoted>:
push   %rbx
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xee2(%rip),%rsi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"'%s'\00"
define i8* @quoted(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [5 x i8] c"'%s'\00"
define i8* @quoted(i8* returned writeonly %0, i8* %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i8* %0
}
char *Strlwr(s0)
char *s0;
{
  char *s;
  for (s = s0; *s; s++) {
    if (isupper(*s))
      *s = tolower(*s);
  }
  return s0;
}


x86 assembly (clang, -O0):
<Strlwr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1180 <Strlwr+0x60>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isupper@plt>
cmp    $0x0,%eax
je     116a <Strlwr+0x4a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
jmp    116f <Strlwr+0x4f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1134 <Strlwr+0x14>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Strlwr>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     1165 <Strlwr+0x45>
lea    0x1(%r14),%rbx
jmp    114b <Strlwr+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1165 <Strlwr+0x45>
movsbl %al,%ebp
mov    %ebp,%edi
call   1040 <isupper@plt>
test   %eax,%eax
je     1140 <Strlwr+0x20>
mov    %ebp,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
jmp    1140 <Strlwr+0x20>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @Strlwr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %23, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %26
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = call i32 @isupper(i32 %12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %22
15: ; preds = %9
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = call i32 @tolower(i32 %18)
%20 = trunc i32 %19 to i8
%21 = load i8*, i8** %3
store i8 %20, i8* %21
br label %22
22: ; preds = %15, %9
br label %23
23: ; preds = %22
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %3
br label %5
26: ; preds = %5
%27 = load i8*, i8** %2
ret i8* %27
}

LLVM IR (-O2):
define i8* @Strlwr(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %13
%5 = phi i8 [ %15, %13 ], [ %2, %1 ]
%6 = phi i8* [ %14, %13 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i32 @isupper(i32 %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %4
%11 = tail call i32 @tolower(i32 %7)
%12 = trunc i32 %11 to i8
store i8 %12, i8* %6
br label %13
13: ; preds = %4, %10
%14 = getelementptr inbounds i8, i8* %6, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %4
17: ; preds = %13, %1
ret i8* %0
}
void acoustic_enforce_free_surf_cuda_(long *Mesh_pointer,
                                      int *ABSORB_INSTEAD_OF_FREE_SURFACE) {}


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

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

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

LLVM IR (-O2):
define void @acoustic_enforce_free_surf_cuda_(i64* nocapture %0, i32* nocapture %1) {
ret void
}
/* Type definitions */
typedef unsigned long uint64_t;

/* Variables and functions */
unsigned long empty_loop(unsigned long);
int /*<<< orphan*/ printf(char *, unsigned long);
int main(int argc, char **argv) {
  uint64_t empty;
  uint64_t iterations = 1000000ul;
  double instructions_per_second = 0;
  empty = empty_loop(iterations);
  printf("Empty loop=%ld nanoseconds\n", empty);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0xf4240,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <empty_loop@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [28 x i8] c"Empty loop=%ld nanoseconds\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 1000000, i64* %7
store double 0.000000e+00, double* %8
%9 = load i64, i64* %7
%10 = call i64 @empty_loop(i64 %9)
store i64 %10, i64* %6
%11 = load i64, i64* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i64 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"Empty loop=%ld nanoseconds\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @empty_loop(i64 1000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i64 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void show_help(char *prog) {
  printf("Usage: %s \n"
         "[-d <device>] (default - %s)\n"
         "[-m <source MAC>] (default - %s)\n"
         "[-h]\n"
         "\n"
         "Mandatory: root privilege\n",
         prog, "lo", "6C:4B:90:11:22:33");
}


x86 assembly (clang, -O0):
<show_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
lea    0xf3c(%rip),%rdx
lea    0xf38(%rip),%rcx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_help>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
lea    0xf49(%rip),%rdx
lea    0xf45(%rip),%rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [106 x i8] c"Usage: %s \0A[-d <device>] (default - %s)\0A[-m <source MAC>] (default - %s)\0A[-h]\0A\0AMandatory: root privilege\0A\00"
@.str.1 = [3 x i8] c"lo\00"
@.str.2 = [18 x i8] c"6C:4B:90:11:22:33\00"
define void @show_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [106 x i8] c"Usage: %s \0A[-d <device>] (default - %s)\0A[-m <source MAC>] (default - %s)\0A[-h]\0A\0AMandatory: root privilege\0A\00"
@.str.1 = [3 x i8] c"lo\00"
@.str.2 = [18 x i8] c"6C:4B:90:11:22:33\00"
define void @show_help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ RAND_MAX;
int /*<<< orphan*/ go(int, int);
double rand();
int rmain() {
  while (1) {
    int x = rand() / (double)RAND_MAX * 1000;
    int y = rand() / (double)RAND_MAX * 1000;
    go(x, y);
  }
}


x86 assembly (clang, -O0):
<rmain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    $0x0,%al
call   1040 <rand@plt>
mov    0x2eb2(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xeb4(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    0x2e7e(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe80(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
cvttsd2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <go@plt>
jmp    1128 <rmain+0x8>

x86 assembly (clang, -O2):
<rmain>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%r14
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2sdq (%r14),%xmm1
divsd  %xmm1,%xmm0
movsd  0xeb5(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ebx
xor    %eax,%eax
call   1040 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2sdq (%r14),%xmm1
divsd  %xmm1,%xmm0
mulsd  0xe92(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    %ebx,%edi
call   1030 <go@plt>
jmp    1130 <rmain+0x10>

LLVM IR (-O0):
@RAND_MAX = global i64 0
define i32 @rmain() {
%1 = alloca i32
%2 = alloca i32
br label %3
3: ; preds = %0, %3
%4 = call double (...) @rand()
%5 = load i64, i64* @RAND_MAX
%6 = sitofp i64 %5 to double
%7 = fdiv double %4, %6
%8 = fmul double %7, 1.000000e+03
%9 = fptosi double %8 to i32
store i32 %9, i32* %1
%10 = call double (...) @rand()
%11 = load i64, i64* @RAND_MAX
%12 = sitofp i64 %11 to double
%13 = fdiv double %10, %12
%14 = fmul double %13, 1.000000e+03
%15 = fptosi double %14 to i32
store i32 %15, i32* %2
%16 = load i32, i32* %1
%17 = load i32, i32* %2
%18 = call i32 @go(i32 %16, i32 %17)
br label %3
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define i32 @rmain() {
br label %1
1: ; preds = %0, %1
%2 = tail call double (...) @rand()
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
%6 = fmul double %5, 1.000000e+03
%7 = fptosi double %6 to i32
%8 = tail call double (...) @rand()
%9 = load i64, i64* @RAND_MAX
%10 = sitofp i64 %9 to double
%11 = fdiv double %8, %10
%12 = fmul double %11, 1.000000e+03
%13 = fptosi double %12 to i32
%14 = tail call i32 @go(i32 %7, i32 %13)
br label %1
}
int guppy_lit_post_setup(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @guppy_lit_post_setup() {
ret i32 0
}

LLVM IR (-O2):
define i32 @guppy_lit_post_setup() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_octave_false_line_comment() {
  test_parser_verify_parse(test_parser_sourcefile("octave", " %{block%} code"),
                           "octave", "%{block%} code", "", 0);
}


x86 assembly (clang, -O0):
<test_octave_false_line_comment>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xec1(%rip),%rdx
lea    0xec8(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_octave_false_line_comment>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xeca(%rip),%rdx
lea    0xed1(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"octave\00"
@.str.1 = [16 x i8] c" %{block%} code\00"
@.str.2 = [15 x i8] c"%{block%} code\00"
@.str.3 = [1 x i8] zeroinitializer
define void @test_octave_false_line_comment() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"octave\00"
@.str.1 = [16 x i8] c" %{block%} code\00"
@.str.2 = [15 x i8] c"%{block%} code\00"
@.str.3 = [1 x i8] zeroinitializer
define void @test_octave_false_line_comment() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
int shl10idiv(int x, int y) {
  long long int bi = x;
  bi <<= 10;
  return bi / y;
}


x86 assembly (clang, -O0):
<shl10idiv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0xa,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<shl10idiv>:
movslq %edi,%rax
shl    $0xa,%rax
movslq %esi,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     111c <shl10idiv+0x1c>
cqto
idiv   %rcx
ret
xor    %edx,%edx
div    %esi
ret

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

LLVM IR (-O2):
define i32 @shl10idiv(i32 %0, i32 %1) {
%3 = sext i32 %0 to i64
%4 = shl nsw i64 %3, 10
%5 = sext i32 %1 to i64
%6 = sdiv i64 %4, %5
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
short rand();
short Random() { return rand(); }


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

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

LLVM IR (-O0):
define signext i16 @Random() {
%1 = call signext i16 (...) @rand()
ret i16 %1
}

LLVM IR (-O2):
define signext i16 @Random() {
%1 = tail call signext i16 (...) @rand()
ret i16 %1
}
int add_categories(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @add_categories() {
ret i32 1
}

LLVM IR (-O2):
define i32 @add_categories() {
ret i32 1
}
void nation_news(char *name, int city) { ; }


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

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

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

LLVM IR (-O2):
define void @nation_news(i8* nocapture %0, i32 %1) {
ret void
}
long next_fibonacci_num(void) {
  static long f1 = 0;
  static long f2 = 1;
  long f = f1 + f2;
  f1 = f2;
  f2 = f;
  return f;
}


x86 assembly (clang, -O0):
<next_fibonacci_num>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f25(%rip),%rax
add    0x2f0e(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2f03(%rip),%rax
mov    %rax,0x2f0c(%rip)
mov    -0x8(%rbp),%rax
mov    %rax,0x2ef1(%rip)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_fibonacci_num>:
mov    0x2f19(%rip),%rcx
mov    0x2f22(%rip),%rax
add    %rcx,%rax
mov    %rcx,0x2f18(%rip)
mov    %rax,0x2f01(%rip)
ret

LLVM IR (-O0):
@next_fibonacci_num.f1 = internal global i64 0
@next_fibonacci_num.f2 = internal global i64 1
define i64 @next_fibonacci_num() {
%1 = alloca i64
%2 = load i64, i64* @next_fibonacci_num.f1
%3 = load i64, i64* @next_fibonacci_num.f2
%4 = add nsw i64 %2, %3
store i64 %4, i64* %1
%5 = load i64, i64* @next_fibonacci_num.f2
store i64 %5, i64* @next_fibonacci_num.f1
%6 = load i64, i64* %1
store i64 %6, i64* @next_fibonacci_num.f2
%7 = load i64, i64* %1
ret i64 %7
}

LLVM IR (-O2):
@next_fibonacci_num.f1 = internal unnamed_addr global i64 0
@next_fibonacci_num.f2 = internal unnamed_addr global i64 1
define i64 @next_fibonacci_num() {
%1 = load i64, i64* @next_fibonacci_num.f1
%2 = load i64, i64* @next_fibonacci_num.f2
%3 = add nsw i64 %2, %1
store i64 %2, i64* @next_fibonacci_num.f1
store i64 %3, i64* @next_fibonacci_num.f2
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
scalar_t__ fputc(int, int /*<<< orphan*/ *);
int fputc_internal(int c, int skipeof, FILE *stream, unsigned *bcount) {
  if (EOF == fputc(c, stream)) {
    if (!skipeof) {
      return (-1);
    }
  }
  ++(*bcount);
  return (0);
}


x86 assembly (clang, -O0):
<fputc_internal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1030 <fputc@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
jne    116b <fputc_internal+0x5b>
cmpl   $0x0,-0xc(%rbp)
jne    1166 <fputc_internal+0x56>
movl   $0xffffffff,-0x4(%rbp)
jmp    117d <fputc_internal+0x6d>
jmp    116b <fputc_internal+0x5b>
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputc_internal>:
push   %rbp
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %esi,%ebp
mov    0x2ec8(%rip),%rax
mov    (%rax),%rbx
mov    %rdx,%rsi
call   1030 <fputc@plt>
test   %ebp,%ebp
jne    113c <fputc_internal+0x2c>
mov    %rax,%rcx
mov    $0xffffffff,%eax
cmp    %rcx,%rbx
je     1142 <fputc_internal+0x32>
addl   $0x1,(%r14)
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@EOF = global i64 0
define i32 @fputc_internal(i32 %0, i32 %1, i32* nocapture %2, i32* nocapture %3) {
%5 = load i64, i64* @EOF
%6 = tail call i64 @fputc(i32 %0, i32* %2)
%7 = icmp ne i64 %5, %6
%8 = icmp ne i32 %1, 0
%9 = or i1 %8, %7
br i1 %9, label %10, label %13
10: ; preds = %4
%11 = load i32, i32* %3
%12 = add i32 %11, 1
store i32 %12, i32* %3
br label %13
13: ; preds = %4, %10
%14 = phi i32 [ 0, %10 ], [ -1, %4 ]
ret i32 %14
}
__attribute__((pure)) _Complex long long foo_llong(int x) {
  _Complex long long r;
  __real r = x + 1;
  __imag r = x - 1;
  return r;
}


x86 assembly (clang, -O0):
<foo_llong>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cltq
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_llong>:
lea    0x1(%rdi),%eax
cltq
add    $0xffffffff,%edi
movslq %edi,%rdx
ret

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

LLVM IR (-O2):
define { i64, i64 } @foo_llong(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = sext i32 %2 to i64
%4 = add nsw i32 %0, -1
%5 = sext i32 %4 to i64
%6 = insertvalue { i64, i64 } poison, i64 %3, 0
%7 = insertvalue { i64, i64 } %6, i64 %5, 1
ret { i64, i64 } %7
}
void reset_press() {}


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

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

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

LLVM IR (-O2):
define void @reset_press() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mill_choose_init(char *);
int mill_choose_wait();
void unused(void) {
  {
    mill_choose_init(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/8l/libmill/refs/heads/master/tests/choose.c"
        ":"
        "102");
    int mill_idx = -2;
    while (1) {
      if (mill_idx != -2) {
        if (0) {
          break;
        }
      }
      mill_idx = mill_choose_wait();
    }
  }
}


x86 assembly (clang, -O0):
<unused>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <mill_choose_init@plt>
movl   $0xfffffffe,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
je     114a <unused+0x2a>
jmp    114a <unused+0x2a>
mov    $0x0,%al
call   1030 <mill_choose_wait@plt>
mov    %eax,-0x4(%rbp)
jmp    113b <unused+0x1b>

x86 assembly (clang, -O2):
<unused>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <mill_choose_init@plt>
nopl   (%rax)
xor    %eax,%eax
call   1030 <mill_choose_wait@plt>
jmp    1130 <unused+0x10>

LLVM IR (-O0):
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/libmill/refs/heads/master/tests/choose.c:102\00"
define void @unused() {
%1 = alloca i32
%2 = call i32 @mill_choose_init(i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0))
store i32 -2, i32* %1
br label %3
3: ; preds = %0, %7
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, -2
br i1 %5, label %6, label %7
6: ; preds = %3
br label %7
7: ; preds = %6, %3
%8 = call i32 (...) @mill_choose_wait()
store i32 %8, i32* %1
br label %3
}

LLVM IR (-O2):
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/libmill/refs/heads/master/tests/choose.c:102\00"
define void @unused() {
%1 = tail call i32 @mill_choose_init(i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (...) @mill_choose_wait()
br label %2
}
/* Variables and functions */
scalar_t__ atoi(char const *);
int read_cli(int argc, char const *argv[]) {
  if (argc != 2) {
    return -1;
  }
  int temp = (unsigned short)atoi(argv[1]);
  if (temp < 8000 || temp > 9000) {
    return -1;
  } else {
    return temp;
  }
}


x86 assembly (clang, -O0):
<read_cli>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1135 <read_cli+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <read_cli+0x64>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atoi@plt>
movzwl %ax,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x1f40,-0x14(%rbp)
jl     1162 <read_cli+0x52>
cmpl   $0x2328,-0x14(%rbp)
jle    116e <read_cli+0x5e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <read_cli+0x64>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_cli>:
mov    $0xffffffff,%eax
cmp    $0x2,%edi
jne    113e <read_cli+0x2e>
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <atoi@plt>
movzwl %ax,%ecx
lea    -0x2329(%rcx),%eax
cmp    $0xfffffc17,%eax
mov    $0xffffffff,%eax
cmovae %ecx,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @read_cli(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 2
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 -1, i32* %3
br label %25
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i64 @atoi(i8* %13)
%15 = trunc i64 %14 to i16
%16 = zext i16 %15 to i32
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = icmp slt i32 %17, 8000
br i1 %18, label %22, label %19
19: ; preds = %10
%20 = load i32, i32* %6
%21 = icmp sgt i32 %20, 9000
br i1 %21, label %22, label %23
22: ; preds = %19, %10
store i32 -1, i32* %3
br label %25
23: ; preds = %19
%24 = load i32, i32* %6
store i32 %24, i32* %3
br label %25
25: ; preds = %23, %22, %9
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @read_cli(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @atoi(i8* %6)
%8 = trunc i64 %7 to i32
%9 = and i32 %8, 65535
%10 = add nsw i32 %9, -9001
%11 = icmp ult i32 %10, -1001
%12 = select i1 %11, i32 -1, i32 %9
br label %13
13: ; preds = %2, %4
%14 = phi i32 [ %12, %4 ], [ -1, %2 ]
ret i32 %14
}