xunge/DecIR huggingface dataset:
int binCoeff(int n, int k) {
  int y1, y2;
  if ((k == 0) || (n == k)) {
    return 1;
  } else {
    y1 = binCoeff(n - 1, k);
    y2 = binCoeff(n - 1, k - 1);
    return y1 + y2;
  }
}


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

x86 assembly (clang, -O2):
<binCoeff>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0x1,%eax
test   %esi,%esi
je     1157 <binCoeff+0x47>
mov    %esi,%r14d
mov    %edi,%r15d
cmp    %esi,%edi
je     1157 <binCoeff+0x47>
xor    %eax,%eax
mov    %r14d,%ebx
mov    %eax,%r12d
lea    -0x1(%r15),%ebp
mov    %ebp,%edi
mov    %r14d,%esi
call   1030 <binCoeff@plt>
add    %r12d,%eax
add    $0xffffffff,%ebx
je     1154 <binCoeff+0x44>
cmp    %r14d,%r15d
mov    %ebx,%r14d
mov    %ebp,%r15d
jne    1130 <binCoeff+0x20>
add    $0x1,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @binCoeff(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 %19, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %12, %6 ], [ %1, %2 ]
%8 = phi i32 [ %10, %6 ], [ %0, %2 ]
%9 = phi i32 [ %13, %6 ], [ 0, %2 ]
%10 = add nsw i32 %8, -1
%11 = tail call i32 @binCoeff(i32 %10, i32 %7)
%12 = add nsw i32 %7, -1
%13 = add nsw i32 %11, %9
%14 = icmp eq i32 %12, 0
%15 = icmp eq i32 %8, %7
%16 = or i1 %14, %15
br i1 %16, label %17, label %6
17: ; preds = %6
%18 = add i32 %13, 1
br label %19
19: ; preds = %17, %2
%20 = phi i32 [ 1, %2 ], [ %18, %17 ]
ret i32 %20
}
void test_110(unsigned short *x, unsigned int *y) { y[0] = x[1] >> 11; }


x86 assembly (clang, -O0):
<test_110>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl 0x2(%rax),%ecx
sar    $0xb,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_110>:
movzwl 0x2(%rdi),%eax
shr    $0xb,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @test_110(i16* %0, i32* %1) {
%3 = alloca i16*
%4 = alloca i32*
store i16* %0, i16** %3
store i32* %1, i32** %4
%5 = load i16*, i16** %3
%6 = getelementptr inbounds i16, i16* %5, i64 1
%7 = load i16, i16* %6
%8 = zext i16 %7 to i32
%9 = ashr i32 %8, 11
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
ret void
}

LLVM IR (-O2):
define void @test_110(i16* nocapture %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds i16, i16* %0, i64 1
%4 = load i16, i16* %3
%5 = lshr i16 %4, 11
%6 = zext i16 %5 to i32
store i32 %6, i32* %1
ret void
}
void Drv_Timer_Init(void) {}


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

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

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

LLVM IR (-O2):
define void @Drv_Timer_Init() {
ret void
}
char *buf() {
  static char bufs[100][1000];
  static int bufCtr = 0;
  char *result = bufs[bufCtr];
  bufCtr = (bufCtr + 1) % 100;
  result[0] = '\0';
  return result;
}


x86 assembly (clang, -O0):
<buf>:
push   %rbp
mov    %rsp,%rbp
movslq 0x1b5c5(%rip),%rcx
lea    0x2f1e(%rip),%rax
imul   $0x3e8,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    0x1b5aa(%rip),%eax
add    $0x1,%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,0x1b599(%rip)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<buf>:
movslq 0x1b5c9(%rip),%rcx
imul   $0x3e8,%rcx,%rdx
lea    0x2f1b(%rip),%r8
lea    (%r8,%rdx,1),%rax
add    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x51eb851f,%rcx,%rdi
mov    %rdi,%rsi
shr    $0x3f,%rsi
sar    $0x25,%rdi
add    %esi,%edi
imul   $0x64,%edi,%esi
sub    %esi,%ecx
mov    %ecx,0x1b592(%rip)
movb   $0x0,(%rdx,%r8,1)
ret

LLVM IR (-O0):
@buf.bufs = internal global [100 x [1000 x i8]] zeroinitializer
@buf.bufCtr = internal global i32 0
define i8* @buf() {
%1 = alloca i8*
%2 = load i32, i32* @buf.bufCtr
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds [100 x [1000 x i8]], [100 x [1000 x i8]]* @buf.bufs, i64 0, i64 %3
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
store i8* %5, i8** %1
%6 = load i32, i32* @buf.bufCtr
%7 = add nsw i32 %6, 1
%8 = srem i32 %7, 100
store i32 %8, i32* @buf.bufCtr
%9 = load i8*, i8** %1
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 0, i8* %10
%11 = load i8*, i8** %1
ret i8* %11
}

LLVM IR (-O2):
@buf.bufs = internal global [100 x [1000 x i8]] zeroinitializer
@buf.bufCtr = internal unnamed_addr global i32 0
define i8* @buf() {
%1 = load i32, i32* @buf.bufCtr
%2 = sext i32 %1 to i64
%3 = getelementptr inbounds [100 x [1000 x i8]], [100 x [1000 x i8]]* @buf.bufs, i64 0, i64 %2, i64 0
%4 = add nsw i32 %1, 1
%5 = srem i32 %4, 100
store i32 %5, i32* @buf.bufCtr
store i8 0, i8* %3
ret i8* %3
}
/* Variables and functions */
bool AONRTCActive(void) {
  return ((
      *((volatile unsigned long
             *)(((unsigned long)(0x40092000 + 0x00000000) & 0xF0000000) |
                0x02000000 |
                (((unsigned long)(0x40092000 + 0x00000000) & 0x000FFFFF) << 5) |
                ((0) << 2)))));
}


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

x86 assembly (clang, -O2):
<AONRTCActive>:
mov    0x43240000,%rax
43
ret

LLVM IR (-O0):
define i32 @AONRTCActive() {
%1 = load volatile i64, i64* inttoptr (i64 1126432768 to i64*)
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @AONRTCActive() {
%1 = load volatile i64, i64* inttoptr (i64 1126432768 to i64*)
%2 = trunc i64 %1 to i32
ret i32 %2
}
void wpas_dbus_signal_debug_timestamp_changed(struct wpa_global *global) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ wcsrchr(int /*<<< orphan*/ *, int /*<<< orphan*/);
void uninivar_wcsrchr(void) {
  wchar_t *ws;
  wchar_t wc;
  (void)wcsrchr(ws, wc);
}


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

x86 assembly (clang, -O2):
<uninivar_wcsrchr>:
jmp    1030 <wcsrchr@plt>

LLVM IR (-O0):
define void @uninivar_wcsrchr() {
%1 = alloca i32*
%2 = alloca i32
%3 = load i32*, i32** %1
%4 = load i32, i32* %2
%5 = call i32 @wcsrchr(i32* %3, i32 %4)
ret void
}

LLVM IR (-O2):
define void @uninivar_wcsrchr() {
%1 = tail call i32 @wcsrchr(i32* undef, i32 undef)
ret void
}
/* Type definitions */
struct queue {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct queue *);
int /*<<< orphan*/ queue_clear(struct queue *);
void queue_free(struct queue *theQueue) {
  queue_clear(theQueue);
  free(theQueue);
  return;
}


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

x86 assembly (clang, -O2):
<queue_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <queue_clear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.queue = type { i32 }
define void @queue_free(%struct.queue* %0) {
%2 = tail call i32 @queue_clear(%struct.queue* %0)
%3 = tail call i32 @free(%struct.queue* %0)
ret void
}
void free_int_mat(int **matrix, int dim1) {
  int i;
  for (i = dim1 - 1; i >= 0; i--)
    free(matrix[i]);
  free(matrix);
}


x86 assembly (clang, -O0):
<free_int_mat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1151 <free_int_mat+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1128 <free_int_mat+0x18>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_int_mat>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %esi,%esi
jle    1146 <free_int_mat+0x36>
mov    %esi,%ebx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x2(%rbx),%eax
mov    (%r14,%rax,8),%rdi
call   1030 <free@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1130 <free_int_mat+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_int_mat(i32** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = and i64 %8, 4294967295
%10 = getelementptr inbounds i32*, i32** %0, i64 %9
%11 = bitcast i32** %10 to i8**
%12 = load i8*, i8** %11
tail call void @free(i8* %12)
%13 = icmp ugt i64 %7, 1
br i1 %13, label %6, label %14
14: ; preds = %6, %2
%15 = bitcast i32** %0 to i8*
tail call void @free(i8* %15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(char *);
int main() {
  foo("one %d two %2x three\n");
  foo("blah %d two %2x three %s xxx %d");
  foo("xyz %d %d %0.2f %s three\n");
  foo("xyz %d %0.2f abc");
  foo("xxx %s");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <foo@plt>
lea    0xeef(%rip),%rdi
call   1030 <foo@plt>
lea    0xf03(%rip),%rdi
call   1030 <foo@plt>
lea    0xf11(%rip),%rdi
call   1030 <foo@plt>
lea    0xf16(%rip),%rdi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [22 x i8] c"one %d two %2x three\0A\00"
@.str.1 = [32 x i8] c"blah %d two %2x three %s xxx %d\00"
@.str.2 = [26 x i8] c"xyz %d %d %0.2f %s three\0A\00"
@.str.3 = [17 x i8] c"xyz %d %0.2f abc\00"
@.str.4 = [7 x i8] c"xxx %s\00"
define i32 @main() {
%1 = call i32 @foo(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @foo(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @foo(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @foo(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @foo(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"one %d two %2x three\0A\00"
@.str.1 = [32 x i8] c"blah %d two %2x three %s xxx %d\00"
@.str.2 = [26 x i8] c"xyz %d %d %0.2f %s three\0A\00"
@.str.3 = [17 x i8] c"xyz %d %0.2f abc\00"
@.str.4 = [7 x i8] c"xxx %s\00"
define i32 @main() {
%1 = tail call i32 @foo(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @foo(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @foo(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @foo(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @foo(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}
int unlockpt(int fd) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @unlockpt(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int __u32;

/* Variables and functions */
__u32 H(__u32 X, __u32 Y, __u32 Z) { return X ^ Y ^ Z; }


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

x86 assembly (clang, -O2):
<H>:
mov    %edi,%eax
xor    %esi,%eax
xor    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @H(i32 %0, i32 %1, i32 %2) {
%4 = xor i32 %1, %0
%5 = xor i32 %4, %2
ret i32 %5
}
int execute_free_hugepages() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_free_hugepages() {
ret i32 0
}
const char *Mutex_Brief(void) { return "Mutual Exclusion Lock"; }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"Mutual Exclusion Lock\00"
define i8* @Mutex_Brief() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [22 x i8] c"Mutual Exclusion Lock\00"
define i8* @Mutex_Brief() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int write_integers_to_defined_output_file(int n, int *a) {
  int i, fail;
  double *c;
  fail = _ada_use_c2phc4c(159, &n, a, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<write_integers_to_defined_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x9f,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_integers_to_defined_output_file>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x9f,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @write_integers_to_defined_output_file(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%8 = load i32*, i32** %4
%9 = load double*, double** %7
%10 = call i32 @_ada_use_c2phc4c(i32 159, i32* %3, i32* %8, double* %9, i32 0)
store i32 %10, i32* %6
%11 = load i32, i32* %6
ret i32 %11
}

LLVM IR (-O2):
define i32 @write_integers_to_defined_output_file(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc4c(i32 159, i32* %3, i32* %1, double* undef, i32 0)
ret i32 %4
}
void foo436(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo436(i32 %0) {
ret void
}
/* Variables and functions */
char getchar();
int clear_stdin() {
  while (getchar() != '\n')
    ;
  return 1;
}


x86 assembly (clang, -O0):
<clear_stdin>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <clear_stdin+0x9>
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1131 <clear_stdin+0x21>
jmp    1119 <clear_stdin+0x9>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_stdin>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <clear_stdin+0x10>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @clear_stdin() {
br label %1
1: ; preds = %5, %0
%2 = call signext i8 (...) @getchar()
%3 = sext i8 %2 to i32
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret i32 1
}

LLVM IR (-O2):
define i32 @clear_stdin() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret i32 1
}
void EmoteInit(const char *path) { (void)(path); }


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

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

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

LLVM IR (-O2):
define void @EmoteInit(i8* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int /*<<< orphan*/);
int /*<<< orphan*/ str_len(char *);
char *str_copy(char *str) {
  if (str == NULL)
    return NULL;
  char *buffer = (char *)malloc(str_len(str));
  buffer = str;
  return buffer;
}


x86 assembly (clang, -O0):
<str_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <str_copy+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1168 <str_copy+0x48>
mov    -0x10(%rbp),%rdi
call   1040 <str_len@plt>
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_copy>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
je     1138 <str_copy+0x18>
mov    %rbx,%rdi
call   1040 <str_len@plt>
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @str_copy(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @str_len(i8* %0)
%5 = tail call i64 @malloc(i32 %4)
br label %6
6: ; preds = %1, %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ PWM_SetBusClockDivider(int);
int /*<<< orphan*/ PWM_SetCoreClockDivider(int);
void PWM_Init(void) {
  PWM_SetCoreClockDivider(1);
  PWM_SetBusClockDivider(1);
}


x86 assembly (clang, -O0):
<PWM_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <PWM_SetCoreClockDivider@plt>
mov    $0x1,%edi
call   1030 <PWM_SetBusClockDivider@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWM_Init>:
push   %rax
mov    $0x1,%edi
call   1040 <PWM_SetCoreClockDivider@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <PWM_SetBusClockDivider@plt>

LLVM IR (-O0):
define void @PWM_Init() {
%1 = call i32 @PWM_SetCoreClockDivider(i32 1)
%2 = call i32 @PWM_SetBusClockDivider(i32 1)
ret void
}

LLVM IR (-O2):
define void @PWM_Init() {
%1 = tail call i32 @PWM_SetCoreClockDivider(i32 1)
%2 = tail call i32 @PWM_SetBusClockDivider(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_threaded_mainloop_get_retval() {
  printf("NOT IMPLEMENTED:"
         "pa_threaded_mainloop_get_retval"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [49 x i8] c"NOT IMPLEMENTED:pa_threaded_mainloop_get_retval\0A\00"
define i32 @pa_threaded_mainloop_get_retval() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [48 x i8] c"NOT IMPLEMENTED:pa_threaded_mainloop_get_retval\00"
define i32 @pa_threaded_mainloop_get_retval() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int test_imm_A1uint32_mem(unsigned int *val) {
  return ((*val) & (0xA1 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A1uint32_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, 161
%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_A1uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 161
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int get_fpu_except_flags(void) {
  int result, set_excepts;
  result = 0;
  return result;
}


x86 assembly (clang, -O0):
<get_fpu_except_flags>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @get_fpu_except_flags() {
ret i32 0
}
void l1_non_existant_jump(void) {
  int (*foo)(void);
  foo = (void *)((0xFFAFFFFC));
  (*foo)();
}


x86 assembly (clang, -O0):
<l1_non_existant_jump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xffaffffc,%eax
mov    %rax,-0x8(%rbp)
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l1_non_existant_jump>:
mov    $0xffaffffc,%eax
jmp    *%rax

LLVM IR (-O0):
define void @l1_non_existant_jump() {
%1 = alloca i32 ()*
store i32 ()* inttoptr (i64 4289724412 to i32 ()*), i32 ()** %1
%2 = load i32 ()*, i32 ()** %1
%3 = call i32 %2()
ret void
}

LLVM IR (-O2):
define void @l1_non_existant_jump() {
%1 = tail call i32 inttoptr (i64 4289724412 to i32 ()*)()
ret void
}
void dr_register_udc(void) {}


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

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

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

LLVM IR (-O2):
define void @dr_register_udc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strlen(char *);
void lol(char *str) {
  char buf[10];
  printf("lol--\n");
  memcpy(buf, str, strlen(str));
  printf("lol++\n");
}


x86 assembly (clang, -O0):
<lol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
lea    -0x12(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lol>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0x6(%rsp),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
lea    0xea4(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"lol--\0A\00"
@.str.1 = [7 x i8] c"lol++\0A\00"
define void @lol(i8* %0) {
%2 = alloca i8*
%3 = alloca [10 x i8]
store i8* %0, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @memcpy(i8* %5, i8* %6, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [6 x i8] c"lol--\00"
@str.2 = [6 x i8] c"lol++\00"
define void @lol(i8* %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @strlen(i8* %0)
%6 = call i32 @memcpy(i8* %3, i8* %0, i32 %5)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main() {
  static int count = 1;
  printf("Count = %d\n", count++);
  while (count < 6) {
    main();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2efb(%rip),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,0x2ef0(%rip)
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x6,0x2edd(%rip)
jge    1163 <main+0x43>
call   1040 <main@plt>
jmp    114c <main+0x2c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2f09(%rip),%esi
lea    0x1(%rsi),%eax
mov    %eax,0x2f00(%rip)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x5,0x2eed(%rip)
jg     115e <main+0x3e>
cs nopw 0x0(%rax,%rax,1)
nop
call   1040 <main@plt>
cmpl   $0x6,0x2ed4(%rip)
jl     1150 <main+0x30>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@main.count = internal global i32 1
@.str = [12 x i8] c"Count = %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @main.count
%3 = add nsw i32 %2, 1
store i32 %3, i32* @main.count
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %5
5: ; preds = %8, %0
%6 = load i32, i32* @main.count
%7 = icmp slt i32 %6, 6
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @main()
br label %5
10: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@main.count = internal unnamed_addr global i32 1
@.str = [12 x i8] c"Count = %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @main.count
%2 = add nsw i32 %1, 1
store i32 %2, i32* @main.count
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = load i32, i32* @main.count
%5 = icmp slt i32 %4, 6
br i1 %5, label %6, label %10
6: ; preds = %0, %6
%7 = tail call i32 @main()
%8 = load i32, i32* @main.count
%9 = icmp slt i32 %8, 6
br i1 %9, label %6, label %10
10: ; preds = %6, %0
ret i32 0
}
/* Variables and functions */
long __TBB_machine_fetchadd4(long volatile *, int);
long __itt_interlocked_increment(volatile long *ptr) {
  return __TBB_machine_fetchadd4(ptr, 1) + 1L;
}


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

x86 assembly (clang, -O2):
<__itt_interlocked_increment>:
push   %rax
mov    $0x1,%esi
call   1030 <__TBB_machine_fetchadd4@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @__itt_interlocked_increment(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = call i64 @__TBB_machine_fetchadd4(i64* %3, i32 1)
%5 = add nsw i64 %4, 1
ret i64 %5
}

LLVM IR (-O2):
define i64 @__itt_interlocked_increment(i64* %0) {
%2 = tail call i64 @__TBB_machine_fetchadd4(i64* %0, i32 1)
%3 = add nsw i64 %2, 1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ fun2();
int /*<<< orphan*/ printf(char *);
void fun1() {
  printf("in func1 !\n");
  fun2();
}


x86 assembly (clang, -O0):
<fun1>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <fun2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun1>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <fun2@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"in func1 !\0A\00"
define void @fun1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @fun2()
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"in func1 !\00"
define void @fun1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @fun2()
ret void
}
int main() {
  if (15 <= 15)
    return 15;
  else
    return 3;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0xf,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 15
}
/* Variables and functions */
float sqrt(float);
float trigwno(float pleura1, float pleura2) {
  float ypoteinousa;
  ypoteinousa = sqrt(pleura1 * pleura1 + pleura2 * pleura2);
  return (pleura1 + pleura2 + ypoteinousa);
}


x86 assembly (clang, -O0):
<trigwno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrt@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trigwno>:
movaps %xmm0,%xmm2
movaps %xmm1,%xmm3
mulss  %xmm1,%xmm3
mulss  %xmm0,%xmm0
addss  %xmm3,%xmm0
xorps  %xmm3,%xmm3
ucomiss %xmm3,%xmm0
jb     1130 <trigwno+0x20>
sqrtss %xmm0,%xmm0
jmp    1150 <trigwno+0x40>
push   %rax
movss  %xmm2,0x4(%rsp)
movss  %xmm1,(%rsp)
call   1030 <sqrt@plt>
movss  (%rsp),%xmm1
movss  0x4(%rsp),%xmm2
add    $0x8,%rsp
addss  %xmm1,%xmm2
addss  %xmm0,%xmm2
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @trigwno(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %3
%8 = load float, float* %4
%9 = load float, float* %4
%10 = fmul float %8, %9
%11 = call float @llvm.fmuladd.f32(float %6, float %7, float %10)
%12 = call float @sqrt(float %11)
store float %12, float* %5
%13 = load float, float* %3
%14 = load float, float* %4
%15 = fadd float %13, %14
%16 = load float, float* %5
%17 = fadd float %15, %16
ret float %17
}

LLVM IR (-O2):
define float @trigwno(float %0, float %1) {
%3 = fmul float %1, %1
%4 = tail call float @llvm.fmuladd.f32(float %0, float %0, float %3)
%5 = tail call float @sqrt(float %4)
%6 = fadd float %0, %1
%7 = fadd float %6, %5
ret float %7
}
unsigned int getMSB(unsigned int value) {
  unsigned int mask = 1 << 31;
  for (int i = 31; i >= 0; i--) {
    if ((value & mask) != 0)
      return i;
    mask >>= 1;
  }
  return -1;
}


x86 assembly (clang, -O0):
<getMSB>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x80000000,-0xc(%rbp)
movl   $0x1f,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1150 <getMSB+0x50>
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
cmp    $0x0,%eax
je     1139 <getMSB+0x39>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <getMSB+0x57>
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1115 <getMSB+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMSB>:
test   %edi,%edi
js     1124 <getMSB+0x24>
mov    $0x80000000,%ecx
mov    $0xffffffe1,%eax
xchg   %ax,%ax
mov    %eax,%edx
lea    0x1(%rdx),%eax
test   %edx,%edx
je     1121 <getMSB+0x21>
shr    %ecx
mov    %ecx,%edx
and    %edi,%edx
je     1110 <getMSB+0x10>
neg    %eax
ret
mov    $0x1f,%eax
ret

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

LLVM IR (-O2):
define i32 @getMSB(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %12
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 31, %1 ]
%5 = phi i32 [ %6, %3 ], [ -2147483648, %1 ]
%6 = lshr i32 %5, 1
%7 = add nsw i32 %4, -1
%8 = icmp ne i32 %4, 0
%9 = and i32 %6, %0
%10 = icmp eq i32 %9, 0
%11 = select i1 %8, i1 %10, i1 false
br i1 %11, label %3, label %12
12: ; preds = %3, %1
%13 = phi i32 [ 31, %1 ], [ %7, %3 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ pthread_self();
int /*<<< orphan*/ pthread_setname_np(int /*<<< orphan*/, char const *);
void dt_pthread_setname(const char *name) {
  pthread_setname_np(pthread_self(), name);
}


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

x86 assembly (clang, -O2):
<dt_pthread_setname>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <pthread_self@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <pthread_setname_np@plt>

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

LLVM IR (-O2):
define void @dt_pthread_setname(i8* %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = tail call i32 @pthread_setname_np(i32 %2, i8* %0)
ret void
}
void pktinit(struct modemchannel *chan, const char *params[]) { return; }


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

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

LLVM IR (-O0):
%struct.modemchannel = type opaque
define void @pktinit(%struct.modemchannel* %0, i8** %1) {
%3 = alloca %struct.modemchannel*
%4 = alloca i8**
store %struct.modemchannel* %0, %struct.modemchannel** %3
store i8** %1, i8*** %4
ret void
}

LLVM IR (-O2):
%struct.modemchannel = type opaque
define void @pktinit(%struct.modemchannel* nocapture %0, i8** nocapture %1) {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ window;
};
struct TYPE_4__ {
  TYPE_1__ xunmap;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xunmap_window(void *_p) {
  return (unsigned long)((XEvent *)_p)->xunmap.window;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xunmap_window(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xunmap_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
int grib_type_to_int(char id) {
  switch (id) {
  case 'd':
    return 2;
    break;
  case 'f':
    return 2;
    break;
  case 'l':
    return 1;
    break;
  case 'i':
    return 1;
    break;
  case 's':
    return 3;
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<grib_type_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffff9c,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0xf,%eax
ja     1170 <grib_type_to_int+0x70>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x2,-0x4(%rbp)
jmp    1177 <grib_type_to_int+0x77>
movl   $0x2,-0x4(%rbp)
jmp    1177 <grib_type_to_int+0x77>
movl   $0x1,-0x4(%rbp)
jmp    1177 <grib_type_to_int+0x77>
movl   $0x1,-0x4(%rbp)
jmp    1177 <grib_type_to_int+0x77>
movl   $0x3,-0x4(%rbp)
jmp    1177 <grib_type_to_int+0x77>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<grib_type_to_int>:
add    $0xffffff9c,%edi
cmp    $0xf,%edi
ja     1124 <grib_type_to_int+0x24>
mov    $0x2,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
ret
mov    $0x1,%eax
ret
xor    %eax,%eax
ret
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @grib_type_to_int(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %11 [
i32 100, label %6
i32 102, label %7
i32 108, label %8
i32 105, label %9
i32 115, label %10
]
6: ; preds = %1
store i32 2, i32* %2
br label %12
7: ; preds = %1
store i32 2, i32* %2
br label %12
8: ; preds = %1
store i32 1, i32* %2
br label %12
9: ; preds = %1
store i32 1, i32* %2
br label %12
10: ; preds = %1
store i32 3, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10, %9, %8, %7, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @grib_type_to_int(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %6 [
i32 100, label %7
i32 102, label %7
i32 108, label %3
i32 105, label %4
i32 115, label %5
]
3: ; preds = %1
br label %7
4: ; preds = %1
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %1, %6, %5, %4, %3
%8 = phi i32 [ 0, %6 ], [ 3, %5 ], [ 1, %4 ], [ 1, %3 ], [ 2, %1 ], [ 2, %1 ]
ret i32 %8
}
_falwcGenericTextPerCharExtents() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_falwcGenericTextPerCharExtents() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CountDown(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  printf("Input: \n");
  printf("Enter a number to count down from: ");
  scanf("%d", &num);
  printf("Output: \n");
  CountDown(num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <CountDown@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
lea    0xec4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%edi
call   1050 <CountDown@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Input: \0A\00"
@.str.1 = [36 x i8] c"Enter a number to count down from: \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [10 x i8] c"Output: \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%7 = load i32, i32* %2
%8 = call i32 @CountDown(i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [36 x i8] c"Enter a number to count down from: \00"
@.str.2 = [3 x i8] c"%d\00"
@str = [8 x i8] c"Input: \00"
@str.4 = [9 x i8] c"Output: \00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.4, i64 0, i64 0))
%7 = load i32, i32* %1
%8 = call i32 @CountDown(i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ adc08d1020_write_reg(int, int);
void default_adc08d1020() {
  adc08d1020_write_reg(0x1, 0xB3FF);
  adc08d1020_write_reg(0x9, 0x3FF);
}


x86 assembly (clang, -O0):
<default_adc08d1020>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0xb3ff,%esi
call   1030 <adc08d1020_write_reg@plt>
mov    $0x9,%edi
mov    $0x3ff,%esi
call   1030 <adc08d1020_write_reg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_adc08d1020>:
push   %rax
mov    $0x1,%edi
mov    $0xb3ff,%esi
call   1030 <adc08d1020_write_reg@plt>
mov    $0x9,%edi
mov    $0x3ff,%esi
pop    %rax
jmp    1030 <adc08d1020_write_reg@plt>

LLVM IR (-O0):
define void @default_adc08d1020() {
%1 = call i32 @adc08d1020_write_reg(i32 1, i32 46079)
%2 = call i32 @adc08d1020_write_reg(i32 9, i32 1023)
ret void
}

LLVM IR (-O2):
define void @default_adc08d1020() {
%1 = tail call i32 @adc08d1020_write_reg(i32 1, i32 46079)
%2 = tail call i32 @adc08d1020_write_reg(i32 9, i32 1023)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free_fun(void *);
void ce_free_msg_space(void *buf) { free_fun(buf); }


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

x86 assembly (clang, -O2):
<ce_free_msg_space>:
jmp    1030 <free_fun@plt>

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

LLVM IR (-O2):
define void @ce_free_msg_space(i8* %0) {
%2 = tail call i32 @free_fun(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int func_impl() { printf("impl\n"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"impl\0A\00"
define i32 @func_impl() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [5 x i8] c"impl\00"
define i32 @func_impl() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void CAN_RX1_IRQHandler(void) {}


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

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

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

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