xunge/DecIR huggingface dataset:
void fd220(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  a:
    goto a;
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd220>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd220+0x7>

x86 assembly (clang, -O2):
<fd220>:
jmp    1100 <fd220>

LLVM IR (-O0):
define void @fd220(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; preds = %37
br label %37
38: ; No predecessors!
%39 = load i32, i32* %2
%40 = zext i32 %39 to i64
br label %41
41: ; preds = %41, %38
br label %41
42: ; preds = %42
br label %42
43: ; No predecessors!
%44 = load i32, i32* %2
%45 = zext i32 %44 to i64
br label %46
46: ; preds = %46, %43
br label %46
47: ; preds = %47
br label %47
}

LLVM IR (-O2):
define void @fd220(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ EVT_exit();
int /*<<< orphan*/ PM_fatalError(char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void _EVT_abort(int signo) {
  char buf[80];
  EVT_exit();
  sprintf(buf, "Terminating on signal %d", signo);
  PM_fatalError(buf);
}


x86 assembly (clang, -O0):
<_EVT_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <EVT_exit@plt>
lea    -0x60(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb0(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x60(%rbp),%rdi
call   1030 <PM_fatalError@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_EVT_abort>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <EVT_exit@plt>
lea    0xeb9(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %ebx,%edx
call   1050 <sprintf@plt>
mov    %r14,%rdi
call   1030 <PM_fatalError@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Terminating on signal %d\00"
define void @_EVT_abort(i32 %0) {
%2 = alloca i32
%3 = alloca [80 x i8]
store i32 %0, i32* %2
%4 = call i32 (...) @EVT_exit()
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%6 = load i32, i32* %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%9 = call i32 @PM_fatalError(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Terminating on signal %d\00"
define void @_EVT_abort(i32 %0) {
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%4 = tail call i32 (...) @EVT_exit()
%5 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = call i32 @PM_fatalError(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/);
void baz(long x, long y, long z) { bar(0, 0, 0); }


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

x86 assembly (clang, -O2):
<baz>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @baz(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = call i32 @bar(i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @baz(i64 %0, i64 %1, i64 %2) {
%4 = tail call i32 @bar(i32 0, i32 0, i32 0)
ret void
}
int main(void) {
  int a = -42;
  a << 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0xffffffd6,-0x4(%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
store i32 -42, i32* %1
%2 = load i32, i32* %1
%3 = shl i32 %2, 1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int C(int n, int k) {
  if (k == 0 || n == k) {
    return 1;
  } else {
    return C(n - 1, k - 1) + C(n - 1, k);
  }
}


x86 assembly (clang, -O0):
<C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1134 <C+0x24>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1140 <C+0x30>
movl   $0x1,-0x4(%rbp)
jmp    116c <C+0x5c>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <C@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1030 <C@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebp
test   %esi,%esi
je     1162 <C+0x52>
mov    %esi,%r14d
mov    %edi,%ebx
cmp    %esi,%edi
je     1162 <C+0x52>
lea    -0x1(%r14),%r15d
neg    %r14d
add    $0xffffffff,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
mov    %r15d,%esi
call   1030 <C@plt>
add    %eax,%ebp
lea    (%r14,%rbx,1),%eax
add    $0xffffffff,%eax
mov    %ebx,%ecx
add    $0xffffffff,%ecx
mov    %ecx,%ebx
cmp    $0xffffffff,%eax
jne    1140 <C+0x30>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @C(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = icmp eq i32 %0, %1
%5 = or i1 %3, %4
br i1 %5, label %17, label %6
6: ; preds = %2
%7 = add nsw i32 %1, -1
br label %8
8: ; preds = %6, %8
%9 = phi i32 [ %0, %6 ], [ %11, %8 ]
%10 = phi i32 [ 0, %6 ], [ %13, %8 ]
%11 = add nsw i32 %9, -1
%12 = tail call i32 @C(i32 %11, i32 %7)
%13 = add nsw i32 %12, %10
%14 = icmp eq i32 %11, %1
br i1 %14, label %15, label %8
15: ; preds = %8
%16 = add i32 %13, 1
br label %17
17: ; preds = %15, %2
%18 = phi i32 [ 1, %2 ], [ %16, %15 ]
ret i32 %18
}
/* Variables and functions */
char *date_get_yesterday_yyyy_mm_dd_string(int);
char *date_get_yesterday_yyyy_mm_dd(int utc_offset) {
  return date_get_yesterday_yyyy_mm_dd_string(utc_offset);
}


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

x86 assembly (clang, -O2):
<date_get_yesterday_yyyy_mm_dd>:
jmp    1030 <date_get_yesterday_yyyy_mm_dd_string@plt>

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

LLVM IR (-O2):
define i8* @date_get_yesterday_yyyy_mm_dd(i32 %0) {
%2 = tail call i8* @date_get_yesterday_yyyy_mm_dd_string(i32 %0)
ret i8* %2
}
/* Type definitions */
struct FILE_TABLE_ENTRY {
  int dummy;
};

/* Variables and functions */
int mem_free(struct FILE_TABLE_ENTRY *);
int free_file_tbl(struct FILE_TABLE_ENTRY *tbl) { return mem_free(tbl); }


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

x86 assembly (clang, -O2):
<free_file_tbl>:
jmp    1030 <mem_free@plt>

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

LLVM IR (-O2):
%struct.FILE_TABLE_ENTRY = type { i32 }
define i32 @free_file_tbl(%struct.FILE_TABLE_ENTRY* %0) {
%2 = tail call i32 @mem_free(%struct.FILE_TABLE_ENTRY* %0)
ret i32 %2
}
int SValBuilderLogicNoCrash(int *x) { return 3 - (int)(x + 3); }


x86 assembly (clang, -O0):
<SValBuilderLogicNoCrash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xc,%rax
mov    %eax,%ecx
mov    $0x3,%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SValBuilderLogicNoCrash>:
mov    $0xfffffff7,%eax
sub    %edi,%eax
ret

LLVM IR (-O0):
define i32 @SValBuilderLogicNoCrash(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
%5 = ptrtoint i32* %4 to i32
%6 = sub nsw i32 3, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @SValBuilderLogicNoCrash(i32* %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = ptrtoint i32* %2 to i64
%4 = trunc i64 %3 to i32
%5 = sub nsw i32 3, %4
ret i32 %5
}
float mus_little_endian_float(unsigned char *inp) {
  float o;
  unsigned char *outp;
  outp = (unsigned char *)&o;
  outp[0] = inp[3];
  outp[1] = inp[2];
  outp[2] = inp[1];
  outp[3] = inp[0];
  return (o);
}


x86 assembly (clang, -O0):
<mus_little_endian_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_little_endian_float>:
mov    (%rdi),%eax
bswap  %eax
movd   %eax,%xmm0
ret

LLVM IR (-O0):
define float @mus_little_endian_float(i8* %0) {
%2 = alloca i8*
%3 = alloca float
%4 = alloca i8*
store i8* %0, i8** %2
%5 = bitcast float* %3 to i8*
store i8* %5, i8** %4
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 3
%8 = load i8, i8* %7
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 2
%13 = load i8, i8* %12
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i64 1
%18 = load i8, i8* %17
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i64 2
store i8 %18, i8* %20
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i64 0
%23 = load i8, i8* %22
%24 = load i8*, i8** %4
%25 = getelementptr inbounds i8, i8* %24, i64 3
store i8 %23, i8* %25
%26 = load float, float* %3
ret float %26
}

LLVM IR (-O2):
define float @mus_little_endian_float(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 8
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 16
%14 = or i32 %9, %13
%15 = load i8, i8* %0
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %14, %17
%19 = bitcast i32 %18 to float
ret float %19
}
/* Variables and functions */
int __sys_pipe2(int *, int /*<<< orphan*/);
int __sys_pipe(int fildes[2]) { return (__sys_pipe2(fildes, 0)); }


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

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

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

LLVM IR (-O2):
define i32 @__sys_pipe(i32* %0) {
%2 = tail call i32 @__sys_pipe2(i32* %0, i32 0)
ret i32 %2
}
void g_timeout_add_full() {}


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

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

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

LLVM IR (-O2):
define void @g_timeout_add_full() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ start_game();
void game_reset(void) { start_game(); }


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

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

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

LLVM IR (-O2):
define void @game_reset() {
%1 = tail call i32 (...) @start_game()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popreal4array_(char *x, unsigned int *n) { popNarray(x, (*n * 4)); }


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

x86 assembly (clang, -O2):
<popreal4array_>:
mov    (%rsi),%esi
shl    $0x2,%esi
jmp    1030 <popNarray@plt>

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

LLVM IR (-O2):
define void @popreal4array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 2
%5 = tail call i32 @popNarray(i8* %0, i32 %4)
ret void
}
double rad_to_deg(double rad) { return rad * 180 / 3.14159265; }


x86 assembly (clang, -O0):
<rad_to_deg>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rad_to_deg>:
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @rad_to_deg(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.800000e+02
%5 = fdiv double %4, 0x400921FB53C8D4F1
ret double %5
}

LLVM IR (-O2):
define double @rad_to_deg(double %0) {
%2 = fmul double %0, 1.800000e+02
%3 = fdiv double %2, 0x400921FB53C8D4F1
ret double %3
}
/* Variables and functions */
int fill_normal_config_req(unsigned char *, int, int, int,
                           int /*<<< orphan*/ *);
int fill_state_req(unsigned char *buf) {
  return fill_normal_config_req(buf, 0x1, 0xb, 0x0, NULL);
}


x86 assembly (clang, -O0):
<fill_state_req>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0xb,%edx
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <fill_normal_config_req@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_state_req>:
mov    $0x1,%esi
mov    $0xb,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <fill_normal_config_req@plt>

LLVM IR (-O0):
define i32 @fill_state_req(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @fill_normal_config_req(i8* %3, i32 1, i32 11, i32 0, i32* null)
ret i32 %4
}

LLVM IR (-O2):
define i32 @fill_state_req(i8* %0) {
%2 = tail call i32 @fill_normal_config_req(i8* %0, i32 1, i32 11, i32 0, i32* null)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ memmove(unsigned char *, unsigned char *, int);
void atm_cell_create_with_header(unsigned char *cell, unsigned char *data,
                                 unsigned char *header) {
  memmove(cell + 5, data, 48);
  memmove(cell, header, 5);
}


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

x86 assembly (clang, -O2):
<atm_cell_create_with_header>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
add    $0x5,%rdi
mov    $0x30,%edx
call   1030 <memmove@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x5,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <memmove@plt>

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

LLVM IR (-O2):
define void @atm_cell_create_with_header(i8* %0, i8* %1, i8* %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 5
%5 = tail call i32 @memmove(i8* %4, i8* %1, i32 48)
%6 = tail call i32 @memmove(i8* %0, i8* %2, i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int n = 365, sum = 0, remainder;
  while (n != 0) {
    remainder = n % 10;
    sum = sum + remainder;
    n = n / 10;
  }
  printf("Sum of digits of number = %d\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x16d,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1161 <main+0x51>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [30 x i8] c"Sum of digits of number = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 365, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %8, %0
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i32, i32* %2
%10 = srem i32 %9, 10
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = add nsw i32 %11, %12
store i32 %13, i32* %3
%14 = load i32, i32* %2
%15 = sdiv i32 %14, 10
store i32 %15, i32* %2
br label %5
16: ; preds = %5
%17 = load i32, i32* %3
%18 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Sum of digits of number = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 14)
ret i32 0
}
int main(void) {
  int x = 5;
  ++x;
  ++x;
  return x - 7;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x7,%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 5, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 7
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int test_imm_BCint32_mem(int *val) {
  return ((*val) & (0xBC << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BCint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0xbc,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_BCint32_mem>:
testb  $0xbc,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_BCint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 188
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void alsoPropagate(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               37, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<alsoPropagate>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x25,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<alsoPropagate>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x25,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.alsoPropagate = [14 x i8] c"alsoPropagate\00"
define void @alsoPropagate() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 37, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.alsoPropagate, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.alsoPropagate = [14 x i8] c"alsoPropagate\00"
define void @alsoPropagate() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 37, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.alsoPropagate, i64 0, i64 0))
ret void
}
void glPushMatrix(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glPushMatrix() {
ret void
}
int SL16_char_to_int(unsigned char *s) {
  if (s[1] & 0x80) {
    return -(int)(0x10000 - ((s[1] << 8) | s[0]));
  } else {
    return (int)(s[1] << 8) | s[0];
  }
}


x86 assembly (clang, -O0):
<SL16_char_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1145 <SL16_char_to_int+0x45>
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
or     %ecx,%eax
mov    $0x10000,%ecx
sub    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    115c <SL16_char_to_int+0x5c>
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SL16_char_to_int>:
movzbl 0x1(%rdi),%eax
mov    %eax,%ecx
shl    $0x8,%ecx
movzbl (%rdi),%edx
lea    (%rcx,%rdx,1),%esi
test   $0x80,%al
lea    -0x10000(%rcx,%rdx,1),%eax
cmove  %esi,%eax
ret

LLVM IR (-O0):
define i32 @SL16_char_to_int(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = and i32 %7, 128
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %23
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = shl i32 %14, 8
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 0
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = or i32 %15, %19
%21 = sub nsw i32 65536, %20
%22 = sub nsw i32 0, %21
store i32 %22, i32* %2
br label %34
23: ; preds = %1
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i64 1
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = shl i32 %27, 8
%29 = load i8*, i8** %3
%30 = getelementptr inbounds i8, i8* %29, i64 0
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = or i32 %28, %32
store i32 %33, i32* %2
br label %34
34: ; preds = %23, %10
%35 = load i32, i32* %2
ret i32 %35
}

LLVM IR (-O2):
define i32 @SL16_char_to_int(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 128
%6 = icmp eq i32 %5, 0
%7 = shl nuw nsw i32 %4, 8
%8 = load i8, i8* %0
%9 = zext i8 %8 to i32
%10 = or i32 %7, %9
%11 = or i32 %10, -65536
%12 = select i1 %6, i32 %10, i32 %11
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ rws_free(void *);
void rws_free_clean(void **mem) {
  if (mem) {
    rws_free(*mem);
    *mem = NULL;
  }
}


x86 assembly (clang, -O0):
<rws_free_clean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113e <rws_free_clean+0x2e>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <rws_free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rws_free_clean>:
test   %rdi,%rdi
je     1129 <rws_free_clean+0x19>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <rws_free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @rws_free_clean(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = icmp ne i8** %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = call i32 @rws_free(i8* %7)
%9 = load i8**, i8*** %2
store i8* null, i8** %9
br label %10
10: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @rws_free_clean(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = tail call i32 @rws_free(i8* %4)
store i8* null, i8** %0
br label %6
6: ; preds = %3, %1
ret void
}
unsigned int unsigned_char_to_unsigned_int(unsigned char src) { return src; }


x86 assembly (clang, -O0):
<unsigned_char_to_unsigned_int>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @unsigned_char_to_unsigned_int(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @unsigned_char_to_unsigned_int(i8 zeroext %0) {
%2 = zext i8 %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void ansi_save() { printf("%c[s", 0x1B); }


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

x86 assembly (clang, -O2):
<ansi_save>:
lea    0xee9(%rip),%rdi
mov    $0x1b,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%c[s\00"
define void @ansi_save() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 27)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%c[s\00"
define void @ansi_save() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 27)
ret void
}
/* Variables and functions */
int getch();
int getCommand() {
  if (getch() == 32) {
    return 32;
  }
}


x86 assembly (clang, -O0):
<getCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getch@plt>
cmp    $0x20,%eax
jne    112f <getCommand+0x1f>
movl   $0x20,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCommand>:
push   %rax
xor    %eax,%eax
call   1030 <getch@plt>
mov    $0x20,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getCommand() {
%1 = alloca i32
%2 = call i32 (...) @getch()
%3 = icmp eq i32 %2, 32
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 32, i32* %1
br label %5
5: ; preds = %4, %0
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @getCommand() {
%1 = tail call i32 (...) @getch()
ret i32 32
}
int do_946() { return 946; }


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

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

LLVM IR (-O0):
define i32 @do_946() {
ret i32 946
}

LLVM IR (-O2):
define i32 @do_946() {
ret i32 946
}
int HelpItem80(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem80() {
ret i32 0
}
void gtk_settings_get_for_screen() {}


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

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

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

LLVM IR (-O2):
define void @gtk_settings_get_for_screen() {
ret void
}
/* Type definitions */
struct timespec {
  double tv_sec;
  double tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
double getTimeDetailed() {
  struct timespec spec;
  clock_gettime(CLOCK_REALTIME, &spec);
  return spec.tv_sec + spec.tv_nsec / 1.0e9;
}


x86 assembly (clang, -O0):
<getTimeDetailed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xec4(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTimeDetailed>:
sub    $0x18,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
movsd  0x10(%rsp),%xmm0
divsd  0xecb(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { double, double }
@CLOCK_REALTIME = global i32 0
define double @getTimeDetailed() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%7 = load double, double* %6
%8 = fdiv double %7, 1.000000e+09
%9 = fadd double %5, %8
ret double %9
}

LLVM IR (-O2):
%struct.timespec = type { double, double }
@CLOCK_REALTIME = global i32 0
define double @getTimeDetailed() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%8 = load double, double* %7
%9 = fdiv double %8, 1.000000e+09
%10 = fadd double %6, %9
ret double %10
}
void *getmemc(int length, int elemsize) {
  int size = length * elemsize;
  return (char *)malloc(size);
}


x86 assembly (clang, -O0):
<getmemc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rdi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getmemc>:
imul   %esi,%edi
movslq %edi,%rdi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @getmemc(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = call i8* @malloc(i64 %10)
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @getmemc(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = sext i32 %3 to i64
%5 = tail call i8* @malloc(i64 %4)
ret i8* %5
}
/* Variables and functions */
bool initial_ident_char(char c) {
  return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '_');
}


x86 assembly (clang, -O0):
<initial_ident_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <initial_ident_char+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    1155 <initial_ident_char+0x55>
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1148 <initial_ident_char+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    1155 <initial_ident_char+0x55>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<initial_ident_char>:
mov    %edi,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
setb   %al
cmp    $0x5f,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @initial_ident_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
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 %22, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
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 %22, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 95
br label %22
22: ; preds = %18, %14, %6
%23 = phi i1 [ true, %14 ], [ true, %6 ], [ %21, %18 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @initial_ident_char(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = icmp eq i8 %0, 95
%6 = or i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
unsigned long HibernateWakeGet(void) {
  return ((*((volatile unsigned long *)(0x400FC010))) &
          (0x00000010 | 0x00000008 | 0x00000200));
}


x86 assembly (clang, -O0):
<HibernateWakeGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fc010,%eax
mov    (%rax),%rax
and    $0x218,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateWakeGet>:
mov    0x400fc010,%rax
40
and    $0x218,%eax
ret

LLVM IR (-O0):
define i64 @HibernateWakeGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%2 = and i64 %1, 536
ret i64 %2
}

LLVM IR (-O2):
define i64 @HibernateWakeGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%2 = and i64 %1, 536
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ getpid();
pid_t s2n_actual_getpid() { return getpid(); }


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

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

LLVM IR (-O0):
define i32 @s2n_actual_getpid() {
%1 = call i32 (...) @getpid()
ret i32 %1
}

LLVM IR (-O2):
define i32 @s2n_actual_getpid() {
%1 = tail call i32 (...) @getpid()
ret i32 %1
}
int parse_mod(const char *n) {
  int count = 0;
  while (*n) {
    if (!(*n >= 0 && *n <= '7'))
      return -1;
    else
      count = count * 8 + *n - '0';
    ++n;
  }
  return count;
}


x86 assembly (clang, -O0):
<parse_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     116e <parse_mod+0x6e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jl     113c <parse_mod+0x3c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x37,%eax
jle    1148 <parse_mod+0x48>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <parse_mod+0x74>
mov    -0x14(%rbp),%eax
shl    $0x3,%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110f <parse_mod+0xf>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_mod>:
mov    (%rdi),%cl
test   %cl,%cl
je     112a <parse_mod+0x2a>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
cmp    $0x37,%cl
ja     112d <parse_mod+0x2d>
movzbl %cl,%ecx
lea    (%rcx,%rax,8),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <parse_mod+0x10>
ret
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @parse_mod(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %28, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %31
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %9
%15 = load i8*, i8** %3
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 55
br i1 %18, label %20, label %19
19: ; preds = %14, %9
store i32 -1, i32* %2
br label %33
20: ; preds = %14
%21 = load i32, i32* %4
%22 = mul nsw i32 %21, 8
%23 = load i8*, i8** %3
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = add nsw i32 %22, %25
%27 = sub nsw i32 %26, 48
store i32 %27, i32* %4
br label %28
28: ; preds = %20
%29 = load i8*, i8** %3
%30 = getelementptr inbounds i8, i8* %29, i32 1
store i8* %30, i8** %3
br label %5
31: ; preds = %5
%32 = load i32, i32* %4
store i32 %32, i32* %2
br label %33
33: ; preds = %31, %19
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @parse_mod(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %15, %9 ], [ %2, %1 ]
%6 = phi i32 [ %13, %9 ], [ 0, %1 ]
%7 = phi i8* [ %14, %9 ], [ %0, %1 ]
%8 = icmp ult i8 %5, 56
br i1 %8, label %9, label %17
9: ; preds = %4
%10 = zext i8 %5 to i32
%11 = shl nsw i32 %6, 3
%12 = add i32 %11, -48
%13 = add i32 %12, %10
%14 = getelementptr inbounds i8, i8* %7, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %4
17: ; preds = %4, %9, %1
%18 = phi i32 [ 0, %1 ], [ %13, %9 ], [ -1, %4 ]
ret i32 %18
}
_Complex long double test_catanl(_Complex long double x) {
  return __builtin_catanl(x);
}


x86 assembly (clang, -O0):
<test_catanl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    0x10(%rbp),%rax
fldt   (%rax)
fldt   0x10(%rax)
fxch   %st(1)
fstpt  -0x40(%rbp)
fstpt  -0x30(%rbp)
movaps -0x40(%rbp),%xmm0
movaps -0x30(%rbp),%xmm1
mov    %rsp,%rax
movaps %xmm1,0x10(%rax)
movaps %xmm0,(%rax)
call   1030 <catanl@plt>
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_catanl>:
sub    $0x48,%rsp
fldt   0x50(%rsp)
fldt   0x60(%rsp)
fxch   %st(1)
fstpt  0x20(%rsp)
fstpt  0x30(%rsp)
movaps 0x20(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
call   1030 <catanl@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @test_catanl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = alloca { x86_fp80, x86_fp80 }
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%5 = load x86_fp80, x86_fp80* %4
%6 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%7 = load x86_fp80, x86_fp80* %6
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 0
%9 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 1
store x86_fp80 %5, x86_fp80* %8
store x86_fp80 %7, x86_fp80* %9
%10 = call { x86_fp80, x86_fp80 } @catanl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %3)
%11 = extractvalue { x86_fp80, x86_fp80 } %10, 0
%12 = extractvalue { x86_fp80, x86_fp80 } %10, 1
%13 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 0
%14 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 1
store x86_fp80 %11, x86_fp80* %13
store x86_fp80 %12, x86_fp80* %14
%15 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2
ret { x86_fp80, x86_fp80 } %15
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @test_catanl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 0
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 1
store x86_fp80 %4, x86_fp80* %7
store x86_fp80 %6, x86_fp80* %8
%9 = tail call { x86_fp80, x86_fp80 } @catanl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %2)
ret { x86_fp80, x86_fp80 } %9
}
/* Variables and functions */
void *malloc(int);
int main() {
  void *x = malloc(-1);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
int /*<<< orphan*/ *opendir(char const *);
int dir_exists(const char *path) {
  DIR *dir = opendir(path);
  if (dir) {
    closedir(dir);
    return 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<dir_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1159 <dir_exists+0x39>
mov    -0x18(%rbp),%rdi
call   1040 <closedir@plt>
movl   $0x1,-0x4(%rbp)
jmp    1160 <dir_exists+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dir_exists>:
push   %rax
call   1030 <opendir@plt>
test   %rax,%rax
je     113a <dir_exists+0x1a>
mov    %rax,%rdi
call   1040 <closedir@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dir_exists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @opendir(i8* %5)
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32*, i32** %4
%11 = call i32 @closedir(i32* %10)
store i32 1, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @dir_exists(i8* nocapture %0) {
%2 = tail call i32* @opendir(i8* %0)
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @closedir(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}